/* ===========================================================================
   BAMBU STUDIO CONTROL CENTER - Custom Dashboard Builder
   ===========================================================================
    Version: v2.4.1
   Datei: html/css/dashboard-custom.css
   Erstellt: 21.04.2026
   =========================================================================== */

.dashboard-custom {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.custom-dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--bg-secondary), var(--bg-tertiary));
}

.custom-dashboard-toolbar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.custom-dashboard-select,
.custom-dashboard-inspector input,
.custom-dashboard-inspector select {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Roboto Condensed';
}

.custom-dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.custom-dashboard-canvas-wrap,
.custom-dashboard-inspector {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background-color: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.custom-dashboard-canvas-wrap {
    padding: 14px;
    overflow-x: auto;
    overflow-y: hidden;
}

.custom-dashboard-canvas {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: 78px;
    gap: 12px;
    min-height: 720px;
    padding: 6px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(0, 168, 132, 0.05), transparent 20%),
        repeating-linear-gradient(90deg, rgba(127, 140, 160, 0.09) 0 1px, transparent 1px calc(100% / 12)),
        repeating-linear-gradient(180deg, rgba(127, 140, 160, 0.07) 0 1px, transparent 1px 78px),
        var(--bg-tertiary);
}

.custom-dashboard-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(18, 25, 38, 0.92), rgba(11, 17, 28, 0.98));
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(12, 16, 28, 0.22);
}

html[data-theme='light'] .custom-dashboard-widget {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 247, 250, 0.98));
    border-color: rgba(9, 21, 38, 0.08);
    box-shadow: 0 16px 30px rgba(20, 30, 44, 0.08);
}

.custom-dashboard-widget[data-widget-id='fortschritt'] {
    background:
        radial-gradient(circle at top right, rgba(40, 182, 216, 0.18), transparent 42%),
        linear-gradient(180deg, rgba(12, 30, 45, 0.96), rgba(10, 18, 28, 0.98));
}

.custom-dashboard-widget[data-widget-id='status-overview'] {
    background:
        radial-gradient(circle at center right, rgba(0, 168, 132, 0.16), transparent 46%),
        linear-gradient(180deg, rgba(14, 31, 28, 0.96), rgba(11, 19, 20, 0.98));
}

.custom-dashboard-widget[data-widget-id='bett'],
.custom-dashboard-widget[data-widget-id='toolhead-left'],
.custom-dashboard-widget[data-widget-id='toolhead-right'] {
    background:
        radial-gradient(circle at 80% 24%, rgba(255, 138, 61, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(32, 20, 18, 0.96), rgba(18, 14, 14, 0.98));
}

.custom-dashboard-widget[data-widget-id='bauraum'],
.custom-dashboard-widget[data-widget-id='ams'] {
    background:
        radial-gradient(circle at top right, rgba(89, 195, 255, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(15, 25, 34, 0.96), rgba(10, 17, 24, 0.98));
}

.custom-dashboard-widget[data-widget-id='vortek'] {
    background:
        linear-gradient(90deg, rgba(91, 116, 255, 0.12), transparent 28%),
        radial-gradient(circle at right center, rgba(141, 107, 255, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(18, 19, 40, 0.96), rgba(10, 12, 27, 0.98));
}

.custom-dashboard-widget[data-widget-id='stream'],
.custom-dashboard-widget[data-widget-id='thumbnail'] {
    background:
        linear-gradient(180deg, rgba(13, 18, 30, 0.94), rgba(8, 11, 21, 0.99));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='fortschritt'] {
    background:
        radial-gradient(circle at top right, rgba(40, 182, 216, 0.16), transparent 42%),
        linear-gradient(180deg, rgba(252, 254, 255, 0.99), rgba(239, 248, 251, 0.98));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='status-overview'] {
    background:
        radial-gradient(circle at center right, rgba(0, 168, 132, 0.14), transparent 44%),
        linear-gradient(180deg, rgba(251, 255, 254, 0.99), rgba(239, 247, 245, 0.98));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='bett'],
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='toolhead-left'],
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='toolhead-right'] {
    background:
        radial-gradient(circle at 80% 24%, rgba(255, 138, 61, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 251, 248, 0.99), rgba(248, 242, 238, 0.98));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='bauraum'],
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='ams'] {
    background:
        radial-gradient(circle at top right, rgba(89, 195, 255, 0.14), transparent 38%),
        linear-gradient(180deg, rgba(251, 254, 255, 0.99), rgba(240, 246, 250, 0.98));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='vortek'] {
    background:
        linear-gradient(90deg, rgba(91, 116, 255, 0.08), transparent 28%),
        radial-gradient(circle at right center, rgba(141, 107, 255, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(251, 251, 255, 0.99), rgba(242, 243, 250, 0.98));
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='stream'],
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='thumbnail'] {
    background:
        linear-gradient(180deg, rgba(249, 251, 255, 0.99), rgba(240, 244, 250, 0.98));
}

.custom-dashboard-widget::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--widget-accent, var(--accent-primary));
}

.custom-dashboard-widget.selected {
    outline: 2px solid var(--accent-primary);
    outline-offset: 1px;
}

.custom-dashboard-widget.dragging {
    opacity: 0.8;
}

.custom-dashboard-widget-handle {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 3;
    padding: 4px 8px;
    border-radius: 999px;
    background-color: rgba(0, 0, 0, 0.22);
    color: #fff;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: grab;
}

.custom-dashboard-widget-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 8px;
    height: 100%;
    padding: 16px;
}

.custom-widget-element {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    min-width: 0;
    max-width: 100%;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.custom-widget-element[data-kind='value'] {
    gap: 4px;
}

.custom-widget-element[data-kind='badge'] {
    gap: 4px;
}

.custom-widget-element[data-vertical-align='center'] {
    justify-content: center;
}

.custom-widget-element[data-vertical-align='bottom'] {
    justify-content: flex-end;
}

.custom-widget-element[data-width-mode='slot'] {
    width: 100%;
    justify-self: stretch;
}

.custom-widget-element[data-width-mode='full'] {
    width: 100%;
    max-width: none !important;
    justify-self: stretch;
}

.custom-widget-element[data-width-mode='auto'] {
    width: auto;
    max-width: 100%;
}

.custom-widget-element[data-width-mode='custom'] {
    width: auto;
    max-width: 100%;
}

.custom-widget-element[data-width-mode='auto'][data-content-align='left'],
.custom-widget-element[data-width-mode='custom'][data-content-align='left'] {
    justify-self: start;
}

.custom-widget-element[data-width-mode='auto'][data-content-align='center'],
.custom-widget-element[data-width-mode='custom'][data-content-align='center'] {
    justify-self: center;
}

.custom-widget-element[data-width-mode='auto'][data-content-align='right'],
.custom-widget-element[data-width-mode='custom'][data-content-align='right'] {
    justify-self: end;
}

.custom-widget-element[data-content-align='left'] {
    align-items: flex-start;
    text-align: left;
}

.custom-widget-element[data-content-align='center'] {
    align-items: center;
    text-align: center;
}

.custom-widget-element[data-content-align='right'] {
    align-items: flex-end;
    text-align: right;
}

.custom-widget-text,
.custom-widget-badge,
.custom-widget-value {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    font-family: 'Roboto Condensed', sans-serif;
}

.custom-widget-element[data-wrap='nowrap'] .custom-widget-text,
.custom-widget-element[data-wrap='nowrap'] .custom-widget-badge,
.custom-widget-element[data-wrap='nowrap'] .custom-widget-value {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.custom-widget-element[data-wrap='wrap'] .custom-widget-text,
.custom-widget-element[data-wrap='wrap'] .custom-widget-badge,
.custom-widget-element[data-wrap='wrap'] .custom-widget-value {
    white-space: normal;
}

.custom-widget-text {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.15;
}

.custom-widget-value {
    font-size: clamp(1.5rem, 2.3vw, 2.45rem);
    line-height: 0.94;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.custom-widget-value-visual {
    width: min(100%, 320px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-primary);
    --custom-value-accent: var(--widget-accent, var(--accent-primary));
}

.custom-widget-value-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.custom-widget-value-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    font-weight: 700;
}

.custom-widget-value-readout,
.custom-widget-gauge-readout {
    font-size: clamp(1.05rem, 2.1vw, 2rem);
    line-height: 0.96;
    font-weight: 700;
    color: inherit;
    letter-spacing: -0.03em;
    text-wrap: balance;
}

.custom-widget-value-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(127, 140, 160, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.custom-widget-value-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--custom-value-accent), var(--custom-value-accent));
    box-shadow: 0 0 18px rgba(0, 0, 0, 0.14);
    transition: width 0.5s ease;
}

.custom-widget-gauge {
    align-items: center;
}

.custom-widget-element[data-width-mode='slot'][data-content-align='left'] .custom-widget-value-visual,
.custom-widget-element[data-width-mode='full'][data-content-align='left'] .custom-widget-value-visual {
    margin-right: auto;
}

.custom-widget-element[data-width-mode='slot'][data-content-align='center'] .custom-widget-value-visual,
.custom-widget-element[data-width-mode='full'][data-content-align='center'] .custom-widget-value-visual {
    margin-left: auto;
    margin-right: auto;
}

.custom-widget-element[data-width-mode='slot'][data-content-align='right'] .custom-widget-value-visual,
.custom-widget-element[data-width-mode='full'][data-content-align='right'] .custom-widget-value-visual {
    margin-left: auto;
}

.custom-widget-gauge-shell {
    position: relative;
    width: min(100%, 160px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.custom-widget-gauge.is-half .custom-widget-gauge-shell {
    aspect-ratio: 1.45 / 1;
}

.custom-widget-gauge-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.custom-widget-gauge-track,
.custom-widget-gauge-fill {
    fill: none;
    stroke-width: 9;
    stroke-linecap: round;
}

.custom-widget-gauge-track {
    stroke: rgba(127, 140, 160, 0.22);
}

.custom-widget-gauge-fill {
    stroke: var(--custom-value-accent);
    transition: stroke-dashoffset 0.5s ease;
    filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.16));
}

.custom-widget-gauge-readout {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
}

.custom-widget-gauge.is-half .custom-widget-gauge-readout {
    align-items: flex-end;
    padding-bottom: 16px;
}

.custom-widget-fan-body {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.custom-widget-fan-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: var(--custom-value-accent);
    fill: currentColor;
    transform-origin: center;
}

.custom-widget-fan-icon.spinning {
    animation: dashboardFanSpin linear infinite;
}

.custom-widget-fan-body .custom-widget-value-track {
    flex: 1;
}

.custom-widget-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background-color: rgba(0, 168, 132, 0.12);
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.custom-widget-element[data-element-id='title'] .custom-widget-text {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.custom-widget-element[data-kind='value'] .custom-widget-value {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

.custom-dashboard-widget[data-widget-id='fortschritt'] .custom-widget-element[data-element-id='wert'] .custom-widget-value {
    color: #7de4ff;
}

.custom-dashboard-widget[data-widget-id='status-overview'] .custom-widget-element[data-element-id='status'] .custom-widget-value {
    color: #7ef0c8;
}

.custom-dashboard-widget[data-widget-id='bett'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
.custom-dashboard-widget[data-widget-id='toolhead-left'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
.custom-dashboard-widget[data-widget-id='toolhead-right'] .custom-widget-element[data-element-id='temp'] .custom-widget-value {
    color: #ffb27a;
}

.custom-dashboard-widget[data-widget-id='bauraum'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
.custom-dashboard-widget[data-widget-id='ams'] .custom-widget-element[data-element-id='slot'] .custom-widget-value {
    color: #8fdcff;
}

.custom-dashboard-widget[data-widget-id='vortek'] .custom-widget-element[data-element-id='duese'] .custom-widget-value {
    color: #b7b0ff;
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='fortschritt'] .custom-widget-element[data-element-id='wert'] .custom-widget-value {
    color: #0088a8;
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='status-overview'] .custom-widget-element[data-element-id='status'] .custom-widget-value {
    color: #007d5f;
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='bett'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='toolhead-left'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='toolhead-right'] .custom-widget-element[data-element-id='temp'] .custom-widget-value {
    color: #c85b14;
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='bauraum'] .custom-widget-element[data-element-id='temp'] .custom-widget-value,
html[data-theme='light'] .custom-dashboard-widget[data-widget-id='ams'] .custom-widget-element[data-element-id='slot'] .custom-widget-value {
    color: #0d83aa;
}

html[data-theme='light'] .custom-dashboard-widget[data-widget-id='vortek'] .custom-widget-element[data-element-id='duese'] .custom-widget-value {
    color: #5b55d8;
}

.custom-dashboard-widget[data-widget-id='fortschritt'] .custom-widget-element[data-element-id='eta'] .custom-widget-text,
.custom-dashboard-widget[data-widget-id='fortschritt'] .custom-widget-element[data-element-id='datei'] .custom-widget-text {
    color: rgba(232, 245, 248, 0.82);
}

.custom-dashboard-widget[data-widget-id='stream'] .custom-widget-placeholder,
.custom-dashboard-widget[data-widget-id='thumbnail'] .custom-widget-placeholder,
.custom-dashboard-widget[data-widget-id='stream'] .custom-widget-stream,
.custom-dashboard-widget[data-widget-id='thumbnail'] .custom-widget-image {
    border-radius: 14px;
}

.custom-dashboard-widget[data-widget-id='stream'] .custom-widget-placeholder,
.custom-dashboard-widget[data-widget-id='thumbnail'] .custom-widget-placeholder {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.custom-widget-element[data-element-id='status'] .custom-widget-value,
.custom-widget-element[data-element-id='wert'] .custom-widget-value,
.custom-widget-element[data-element-id='temp'] .custom-widget-value,
.custom-widget-element[data-element-id='slot'] .custom-widget-value,
.custom-widget-element[data-element-id='duese'] .custom-widget-value {
    font-size: clamp(1.7rem, 2.6vw, 2.75rem);
}

.custom-widget-element[data-element-id='status'] .custom-widget-value-readout,
.custom-widget-element[data-element-id='wert'] .custom-widget-value-readout,
.custom-widget-element[data-element-id='temp'] .custom-widget-value-readout,
.custom-widget-element[data-element-id='slot'] .custom-widget-value-readout,
.custom-widget-element[data-element-id='duese'] .custom-widget-value-readout,
.custom-widget-element[data-element-id='status'] .custom-widget-gauge-readout,
.custom-widget-element[data-element-id='wert'] .custom-widget-gauge-readout,
.custom-widget-element[data-element-id='temp'] .custom-widget-gauge-readout,
.custom-widget-element[data-element-id='slot'] .custom-widget-gauge-readout,
.custom-widget-element[data-element-id='duese'] .custom-widget-gauge-readout {
    font-size: clamp(1.25rem, 2.4vw, 2.4rem);
}

.custom-widget-element[data-element-id='modell'] .custom-widget-text,
.custom-widget-element[data-element-id='target'] .custom-widget-text,
.custom-widget-element[data-element-id='humidity'] .custom-widget-text,
.custom-widget-element[data-element-id='wechsel'] .custom-widget-text,
.custom-widget-element[data-element-id='datei'] .custom-widget-text,
.custom-widget-element[data-element-id='eta'] .custom-widget-text,
.custom-widget-element[data-element-id='temp'] .custom-widget-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.custom-widget-element[data-element-id='datei'] .custom-widget-text {
    max-width: 100%;
    opacity: 0.92;
}

.custom-widget-element[data-element-id='eta'] .custom-widget-text,
.custom-widget-element[data-element-id='humidity'] .custom-widget-text,
.custom-widget-element[data-element-id='target'] .custom-widget-text {
    font-size: 0.76rem;
    color: var(--text-tertiary);
}

.custom-widget-element[data-kind='image'],
.custom-widget-element[data-kind='stream'] {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.custom-widget-element[data-kind='image'][data-width-mode='full'],
.custom-widget-element[data-kind='stream'][data-width-mode='full'] {
    justify-self: stretch;
    align-self: stretch;
    width: 100%;
    height: 100%;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-content-align='left'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-content-align='left'] {
    justify-self: start;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-content-align='center'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-content-align='center'] {
    justify-self: center;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-content-align='right'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-content-align='right'] {
    justify-self: end;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-vertical-align='top'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-vertical-align='top'] {
    align-self: start;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-vertical-align='center'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-vertical-align='center'] {
    align-self: center;
}

.custom-widget-element[data-kind='image']:not([data-width-mode='full'])[data-vertical-align='bottom'],
.custom-widget-element[data-kind='stream']:not([data-width-mode='full'])[data-vertical-align='bottom'] {
    align-self: end;
}

.custom-widget-image,
.custom-widget-stream,
.custom-widget-placeholder {
    width: 100%;
    height: auto;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    border: 1px dashed rgba(127, 140, 160, 0.3);
}

.custom-widget-image {
    object-fit: cover;
    display: block;
}

.custom-widget-stream {
    display: block;
    border: 1px solid rgba(127, 140, 160, 0.24);
    background-color: rgba(0, 0, 0, 0.18);
}

.custom-widget-element[data-kind='image'][data-width-mode='full'] .custom-widget-image,
.custom-widget-element[data-kind='stream'][data-width-mode='full'] .custom-widget-stream,
.custom-widget-element[data-kind='image'][data-width-mode='full'] .custom-widget-placeholder,
.custom-widget-element[data-kind='stream'][data-width-mode='full'] .custom-widget-placeholder {
    width: 100%;
    height: 100%;
    min-height: 90px;
}

.custom-widget-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    color: var(--text-tertiary);
    font-size: 0.82rem;
    text-align: center;
}

.custom-dashboard-inspector {
    padding: 16px;
    position: sticky;
    top: 16px;
}

.custom-dashboard-inspector-empty {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

.custom-dashboard-inspector h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
}

.custom-dashboard-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.custom-dashboard-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-dashboard-field-preset-row {
    gap: 8px;
}

.custom-dashboard-preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.custom-dashboard-preset-buttons .btn {
    min-width: 0;
}

.custom-dashboard-field label,
.custom-dashboard-elements-head,
.custom-dashboard-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.custom-dashboard-elements {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-dashboard-elements-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 14px 0 10px;
    flex-wrap: wrap;
}

.custom-dashboard-elements-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.custom-dashboard-section {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background-color: var(--bg-tertiary);
    overflow: hidden;
}

.custom-dashboard-section-body {
    padding: 12px;
}

.custom-dashboard-section.is-collapsed .custom-dashboard-section-body {
    display: none;
}

.custom-dashboard-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Roboto Condensed';
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.custom-dashboard-section-toggle-indicator {
    font-size: 1rem;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.custom-dashboard-section.is-collapsed .custom-dashboard-section-toggle-indicator {
    transform: rotate(-90deg);
}

.custom-dashboard-element-card {
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.custom-dashboard-element-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 0;
}

.custom-dashboard-element-toggle {
    padding: 0;
    flex: 1 1 auto;
}

.custom-dashboard-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.custom-dashboard-footer-note {
    font-size: 0.84rem;
    color: var(--text-tertiary);
}

@media (max-width: 1100px) {
    .custom-dashboard-shell {
        grid-template-columns: 1fr;
    }

    .custom-dashboard-inspector {
        position: static;
    }

    .custom-dashboard-canvas {
        min-width: 940px;
    }
}

@media (max-width: 760px) {
    .custom-dashboard-toolbar {
        padding: 10px;
        gap: 10px;
    }

    .custom-dashboard-toolbar-group {
        width: 100%;
        gap: 8px;
    }

    .custom-dashboard-toolbar-group > * {
        flex: 1 1 180px;
    }

    .custom-dashboard-select {
        width: 100%;
    }

    .custom-dashboard-field-grid {
        grid-template-columns: 1fr;
    }

    .custom-dashboard-canvas {
        min-width: 880px;
        min-height: 620px;
        gap: 10px;
        padding: 4px;
    }

    .custom-dashboard-canvas-wrap,
    .custom-dashboard-inspector {
        border-radius: 14px;
    }

    .custom-dashboard-canvas-wrap,
    .custom-dashboard-inspector,
    .custom-dashboard-element-card {
        padding-left: 12px;
        padding-right: 12px;
    }

    .custom-dashboard-section-body {
        padding: 10px;
    }

    .custom-dashboard-element-card-head {
        padding: 10px 10px 0;
    }

    .custom-dashboard-widget {
        border-radius: 16px;
    }

    .custom-dashboard-widget-grid {
        gap: 6px;
        padding: 14px 12px 12px;
    }

    .custom-dashboard-widget-handle {
        top: 7px;
        right: 8px;
        padding: 3px 7px;
        font-size: 0.68rem;
    }

    .custom-widget-value {
        font-size: clamp(1.4rem, 4vw, 2.2rem);
    }

    .custom-widget-element[data-element-id='status'] .custom-widget-value,
    .custom-widget-element[data-element-id='wert'] .custom-widget-value,
    .custom-widget-element[data-element-id='temp'] .custom-widget-value,
    .custom-widget-element[data-element-id='slot'] .custom-widget-value,
    .custom-widget-element[data-element-id='duese'] .custom-widget-value {
        font-size: clamp(1.55rem, 4.8vw, 2.35rem);
    }

    .custom-widget-text {
        font-size: 0.82rem;
    }

    .custom-widget-element[data-element-id='title'] .custom-widget-text {
        font-size: 0.68rem;
    }

    .custom-dashboard-action-row > * {
        flex: 1 1 100%;
    }

    .custom-dashboard-elements-actions {
        width: 100%;
    }

    .custom-dashboard-elements-actions > * {
        flex: 1 1 180px;
    }

    .custom-dashboard-inspector {
        padding-top: 14px;
        padding-bottom: 14px;
    }
}

@media (max-width: 480px) {
    .custom-dashboard {
        gap: 12px;
    }

    .custom-dashboard-toolbar-group > * {
        flex-basis: 100%;
    }

    .custom-dashboard-canvas-wrap {
        padding: 10px;
    }

    .custom-dashboard-canvas {
        min-width: 820px;
        min-height: 560px;
        gap: 8px;
    }

    .custom-dashboard-widget-grid {
        padding: 12px 10px 10px;
    }

    .custom-widget-placeholder {
        min-height: 78px;
        font-size: 0.78rem;
    }

    .custom-dashboard-inspector h3 {
        font-size: 0.98rem;
    }
}