* {
    box-sizing: border-box;
}


body {
    margin: 0;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #111827;
    color: #f9fafb;
}


.dashboard {
    max-width: 520px;

    margin: 0 auto;
    padding: 24px;
}


/* ==========================================================
   HEADER
   ========================================================== */

header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 35px;
}


h1 {
    margin: 0;

    font-size: 26px;
}


.mode {
    margin-top: 5px;

    color: #9ca3af;

    font-size: 14px;
}


.logout {
    color: #9ca3af;

    text-decoration: none;

    font-size: 14px;
}


/* ==========================================================
   AKTUELLE TEMPERATUR
   ========================================================== */

.current {
    text-align: center;

    margin-bottom: 30px;
}


.temperature {
    font-size: 54px;
    font-weight: 600;
}


.subtitle {
    color: #9ca3af;
}


/* ==========================================================
   CARDS
   ========================================================== */

.card {
    background: #1f2937;

    border-radius: 16px;

    padding: 20px;

    margin-bottom: 15px;
}


.card h2 {
    margin:
        0
        0
        16px
        0;

    color: #9ca3af;

    font-size: 15px;
    font-weight: 500;
}


/* ==========================================================
   TEMPERATURREGLER
   ========================================================== */

.temperature-control {
    display: flex;

    justify-content: space-between;
    align-items: center;
}


.temperature-control span {
    font-size: 28px;
    font-weight: 600;
}


.temperature-control button {
    width: 56px;
    height: 56px;

    border: 0;
    border-radius: 50%;

    background: #374151;
    color: white;

    font-size: 30px;

    cursor: pointer;
}


.temperature-control button:hover {
    background: #4b5563;
}


.temperature-control button:active {
    transform: scale(0.94);
}


/* ==========================================================
   BETRIEBSMODUS
   ========================================================== */

.mode-control {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 8px;
}


.mode-button {
    min-height: 44px;

    padding:
        10px
        8px;

    border:
        1px
        solid
        #4b5563;

    border-radius: 10px;

    background: #374151;
    color: #f9fafb;

    font: inherit;

    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.1s ease;
}


.mode-button:hover {
    background: #4b5563;
}


.mode-button:active {
    transform: scale(0.97);
}


.mode-button.active {
    border-color: #f59e0b;

    background: #f59e0b;
    color: #111827;

    font-weight: 650;
}


.mode-button:disabled {
    opacity: 0.55;

    cursor: default;
}


/* ==========================================================
   SCHNELLSTATUS
   ========================================================== */

.status-grid {
    display: grid;

    grid-template-columns:
        1fr
        1fr;

    gap: 10px;

    margin-top: 18px;
    margin-bottom: 15px;
}


.status-card {
    background: #1f2937;

    border-radius: 12px;

    padding: 14px;

    font-size: 14px;
}


.dot {
    display: inline-block;

    width: 10px;
    height: 10px;

    margin-right: 8px;

    border-radius: 50%;
}


.dot.active {
    background: #22c55e;
}


.dot.inactive {
    background: #6b7280;
}


/* ==========================================================
   BETRIEBSDATEN
   ========================================================== */

.telemetry-card {
    margin-top: 0;
}


.telemetry-grid {
    display: flex;

    flex-direction: column;
}


.telemetry-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 18px;

    min-height: 40px;

    padding:
        7px
        0;

    border-bottom:
        1px
        solid
        #374151;
}


.telemetry-row:last-child {
    border-bottom: 0;
}


.telemetry-row span {
    color: #9ca3af;

    font-size: 13px;

    line-height: 1.3;
}


.telemetry-row strong {
    flex-shrink: 0;

    color: #f9fafb;

    font-size: 13px;
    font-weight: 600;

    text-align: right;

    white-space: nowrap;
}


/* ==========================================================
   AKTIONEN
   ========================================================== */

.action-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-top: 0;
    margin-bottom: 18px;
}


.override-actions {
    margin: 0;
}


.override-actions[hidden] {
    display: none;
}


.action-button {
    width: 100%;

    padding: 16px;

    border: 0;
    border-radius: 12px;

    background: #374151;
    color: #f9fafb;

    font-size: 15px;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.1s ease;
}


.action-button:hover {
    background: #4b5563;
}


.action-button:active {
    transform: scale(0.985);
}


.action-button:disabled {
    opacity: 0.5;

    cursor: default;
}


/* ==========================================================
   FEHLER
   ========================================================== */

.error {
    color: #f87171;

    text-align: center;

    margin-top: 20px;
}


/* ==========================================================
   LOGIN
   ========================================================== */

.login-page {
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        radial-gradient(
            circle at top,
            #1f2937 0,
            #111827 45%,
            #0b1120 100%
        );
}


.login-shell {
    width: 100%;

    max-width: 390px;
}


.login-card {
    background:
        rgba(
            31,
            41,
            55,
            0.96
        );

    border:
        1px
        solid
        #374151;

    border-radius: 20px;

    padding:
        30px
        26px
        24px;

    box-shadow:
        0
        24px
        60px
        rgba(
            0,
            0,
            0,
            0.35
        );
}


.login-icon {
    width: 58px;
    height: 58px;

    margin:
        0
        auto
        20px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 5px;

    border-radius: 16px;

    background: #374151;
}


.heat-line {
    width: 4px;
    height: 24px;

    border-radius: 999px;

    background: #f59e0b;

    transform: skewY(-18deg);
}


.heat-line:nth-child(2) {
    height: 30px;
}


.login-heading {
    text-align: center;

    margin-bottom: 28px;
}


.login-heading h1 {
    margin: 0;

    font-size: 26px;
    font-weight: 650;
}


.login-heading p {
    margin:
        8px
        0
        0;

    color: #9ca3af;

    font-size: 14px;
}


.login-form {
    display: flex;

    flex-direction: column;

    gap: 18px;
}


.login-field {
    display: flex;

    flex-direction: column;

    gap: 7px;
}


.login-field span {
    color: #d1d5db;

    font-size: 13px;
    font-weight: 500;
}


.login-field input {
    width: 100%;
    height: 48px;

    padding:
        0
        14px;

    border:
        1px
        solid
        #4b5563;

    border-radius: 11px;

    background: #111827;
    color: #f9fafb;

    font: inherit;
    font-size: 16px;

    outline: none;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}


.login-field input:hover {
    border-color: #6b7280;
}


.login-field input:focus {
    border-color: #f59e0b;

    box-shadow:
        0
        0
        0
        3px
        rgba(
            245,
            158,
            11,
            0.14
        );

    background: #0f172a;
}


.login-button {
    height: 50px;

    margin-top: 2px;

    border: 0;

    border-radius: 11px;

    background: #f59e0b;
    color: #111827;

    font: inherit;

    font-size: 15px;
    font-weight: 650;

    cursor: pointer;

    transition:
        transform 0.1s ease,
        filter 0.15s ease;
}


.login-button:hover {
    filter: brightness(1.08);
}


.login-button:active {
    transform: scale(0.985);
}


.login-error {
    padding:
        11px
        13px;

    border:
        1px
        solid
        rgba(
            248,
            113,
            113,
            0.35
        );

    border-radius: 10px;

    background:
        rgba(
            127,
            29,
            29,
            0.2
        );

    color: #fca5a5;

    font-size: 13px;

    text-align: center;
}


.login-footer {
    margin-top: 22px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    color: #6b7280;

    font-size: 12px;
}


.login-status-dot {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: #22c55e;
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 480px) {

    .dashboard {
        padding:
            20px
            16px;
    }


    .login-page {
        padding: 18px;
    }


    .login-card {
        padding:
            26px
            20px
            22px;

        border-radius: 17px;
    }


    .telemetry-row {
        gap: 10px;
    }


    .telemetry-row span {
        max-width: 62%;
    }


    .telemetry-row strong {
        font-size: 12px;
    }

}
/* Analysis navigation and dashboard */
.page-nav { display:flex; gap:10px; margin:-17px 0 23px; }
.page-nav a { flex:1; min-width:0; display:flex; align-items:center; justify-content:center;
    padding:12px; text-align:center; border-radius:10px;
    background:#1f2937; border:1px solid #374151; color:#cbd5e1; text-decoration:none; }
.page-nav a.active { color:#111827; background:#f59e0b; border-color:#f59e0b; font-weight:600; }
@media(max-width:380px) {
  .page-nav { gap:6px; }
  .page-nav a { padding:10px 6px; font-size:14px; }
}
.analysis-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.analysis-kpi { padding:12px; border-radius:12px; background:#111827; }
.analysis-kpi .label { display:block; color:#9ca3af; font-size:12px; }
.analysis-kpi strong { display:block; font-size:22px; padding-top:6px; }
.analysis-controls { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:15px; }
.analysis-controls select { color:#f9fafb; background:#374151; padding:9px; border:1px solid #4b5563; border-radius:10px; }
.analysis-info { color:#9ca3af; font-size:12px; line-height:1.5; margin-top:15px; }

/* Analysis history charts */
.analysis-chart { display:block; width:100%; height:250px; margin-top:14px; }
.analysis-chart-small { height:125px; }
.analysis-legend { display:flex; flex-wrap:wrap; gap:10px 16px; color:#9ca3af; font-size:12px; line-height:1.7; }
.legend-item { display:inline-flex; align-items:center; gap:7px; }
.legend-swatch { display:inline-block; width:22px; border-top:3px solid; border-radius:4px; }
.legend-ist { color:#60a5fa; }
.legend-soll { color:#34d399; }
.legend-aussen { color:#fbbf24; }
.legend-heating { color:#fb923c; }

/* Estimated fuel counter on heating dashboard */
.fuel-counter-card { border:1px solid #4b5563; }
.fuel-counter-main { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; }
.fuel-counter-value { font-size:clamp(32px, 6vw, 46px); font-weight:750; color:#fbbf24; font-variant-numeric:tabular-nums; }
.fuel-counter-subtitle, .fuel-counter-since, .fuel-counter-note { font-size:13px; color:#9ca3af; line-height:1.5; }
.fuel-counter-since { margin-top:7px; }
.fuel-counter-note { margin-top:14px; }
.fuel-reset-button { max-width:100%; min-height:44px; cursor:pointer; }
.fuel-reset-button:disabled { opacity:.6; cursor:wait; }

/* Daily-use heating dashboard: grouped controls and progressive disclosure */
.ops-page, .analysis-page { max-width: 760px; }
.ops-header { margin-bottom: 25px; }
.ops-hero { padding: 18px 20px; margin-bottom: 15px; background:#1f2937; border-radius:16px; }
.ops-hero-label { color:#9ca3af; font-size:13px; }
.ops-hero .temperature { margin:6px 0 16px; font-size:clamp(40px,7vw,58px); }
.ops-status-grid { grid-template-columns:repeat(auto-fit,minmax(135px,1fr)); margin:0; gap:8px; }
.ops-status-grid .status-card { padding:10px; background:#111827; font-size:13px; }
.ops-temperature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ops-temperature-group { min-width:0; background:#111827; border-radius:12px; padding:13px; }
.ops-control-label { color:#9ca3af; font-size:13px; margin-bottom:10px; }
.ops-temperature-group .temperature-control { gap:8px; }
.ops-temperature-group .temperature-control span { font-size:clamp(17px,3vw,24px); white-space:nowrap; }
.ops-temperature-group .temperature-control button { flex:0 0 44px; width:44px; height:44px; font-size:24px; }
.ops-control-divider { border-top:1px solid #374151; margin:18px 0; }
.ops-actions-title { margin-top:20px!important; }
.ops-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:0; }
.ops-actions .mode-actions, .ops-actions .override-actions { min-width:0; }
.ops-actions .action-button { min-height:46px; padding:11px 8px; font-size:14px; }
.ops-action-primary { background:#b45309; color:#fff; font-weight:650; }
.ops-action-muted { background:#374151; }
.ops-metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.ops-metric { min-width:0; border:1px solid #374151; background:#111827; border-radius:10px; padding:11px; }
.ops-metric-label { display:block; color:#9ca3af; font-size:12px; min-height:30px; }
.ops-metric strong { display:block; margin-top:8px; font-size:clamp(16px,2.6vw,22px); overflow-wrap:anywhere; }
.ops-note { color:#9ca3af; font-size:12px; margin:12px 0 0; }
.ops-heading-row { display:flex; gap:10px; justify-content:space-between; align-items:center; }
.ops-heading-row h2 { margin-bottom:12px; }
.ops-tag { font-size:11px; border:1px solid #4b5563; border-radius:999px; padding:4px 9px; color:#d1d5db; }
.ops-details { padding:0; overflow:hidden; }
.ops-details summary { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:17px 20px; cursor:pointer; font-weight:650; list-style:none; }
.ops-details summary::-webkit-details-marker { display:none; }
.ops-details summary::after { content:"▾"; color:#fbbf24; margin-left:auto; transition:transform .15s; }
.ops-details[open] summary::after { transform:rotate(180deg); }
.ops-details > .telemetry-grid, .ops-details > .analysis-grid, .ops-details > .analysis-info { margin:0 20px 18px; }
.ops-detail-hint { color:#9ca3af; font-size:12px; font-weight:400; }
.ops-select-label { display:flex; align-items:center; gap:8px; font-size:13px; color:#9ca3af; }
.analysis-group-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ops-details .analysis-group-grid { padding-top:10px; }
@media(max-width:520px) {
  .ops-temperature-grid { grid-template-columns:1fr; }
  .ops-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-status-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-detail-hint { display:none; }
}
@media(max-width:380px) {
  .analysis-group-grid { grid-template-columns:1fr; }
  .ops-metric-grid { grid-template-columns:1fr 1fr; }
  .ops-actions { grid-template-columns:1fr; }
}

.ops-extra-charts { padding:0 16px 10px; }
.ops-extra-charts .card { background:#111827; }

/* Mobile-first compact controls and prominent fuel total */
.fuel-counter-priority { padding:14px 16px; }
.fuel-counter-priority .ops-heading-row h2 { margin-bottom:8px; }
.fuel-counter-priority .fuel-counter-main { flex-wrap:nowrap; gap:12px; align-items:center; }
.fuel-counter-priority .fuel-counter-main > div { min-width:0; flex:1; }
.fuel-counter-priority .fuel-counter-value { font-size:clamp(29px,7.5vw,39px); line-height:1.12; }
.fuel-counter-priority .fuel-counter-subtitle,
.fuel-counter-priority .fuel-counter-since { font-size:11px; }
.fuel-counter-priority .fuel-counter-note { margin-top:9px; font-size:11px; }
.fuel-counter-priority .fuel-reset-button { width:auto; flex:0 0 auto; min-width:76px; min-height:44px; padding:10px 12px; font-size:13px; }
.ops-controls { padding:14px; }
.ops-controls h2 { margin-bottom:10px; }
.ops-temperature-grid { gap:8px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.ops-temperature-group { padding:8px; }
.ops-control-label { font-size:12px; margin-bottom:7px; }
.ops-temperature-group .temperature-control { gap:3px; }
.ops-temperature-group .temperature-control button { flex:0 0 36px; width:36px; height:44px; border-radius:10px; }
.ops-temperature-group .temperature-control span { min-width:0; font-size:clamp(13px,3.4vw,21px); text-align:center; }
.ops-control-divider { margin:12px 0; }
.ops-actions-title { margin-top:12px!important; }
.ops-actions .action-button { min-height:44px; }
@media(max-width:520px) {
  .ops-temperature-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ops-page { padding:12px; }
  .ops-header { margin-bottom:16px; }
  .ops-hero { padding:14px; }
}
@media(max-width:360px) {
  .ops-temperature-group { padding:6px; }
  .ops-temperature-group .temperature-control button { flex-basis:32px; width:32px; }
  .fuel-counter-priority .fuel-reset-button { min-width:66px; padding:8px; }
}

/* Integrated mobile header: status + resettable oil estimate */
.ops-hero { padding:12px 14px; }
.ops-hero .temperature { margin:3px 0 9px; font-size:clamp(37px,8vw,51px); }
.ops-status-chips { display:flex; flex-wrap:wrap; gap:5px; margin:0; }
.ops-status-chips .status-card { display:inline-flex; align-items:center; padding:6px 9px; min-height:28px; border-radius:999px; font-size:11px; line-height:1.2; white-space:nowrap; }
.ops-status-chips .dot { width:8px; height:8px; margin-right:5px; flex:none; }
.ops-hero-fuel { border-top:1px solid #374151; margin-top:12px; padding-top:11px; }
.ops-fuel-heading { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:baseline; gap:4px 10px; }
.ops-fuel-heading h2 { font-size:13px; font-weight:600; color:#e5e7eb; margin:0; }
.ops-fuel-estimate { color:#9ca3af; font-size:11px; }
.ops-fuel-main { display:flex; flex-wrap:nowrap; align-items:center; gap:12px; margin-top:5px; }
.ops-fuel-reading { flex:1; min-width:0; }
.ops-hero-fuel .fuel-counter-value { font-size:clamp(27px,7vw,37px); line-height:1.15; }
.ops-hero-fuel .fuel-counter-since { margin-top:2px; font-size:11px; overflow-wrap:anywhere; }
.ops-hero-fuel .fuel-reset-button { width:auto; flex:0 0 auto; min-width:72px; min-height:44px; padding:8px 13px; font-size:13px; }
.ops-fuel-note { margin:7px 0 0; font-size:10px; line-height:1.4; }
@media (max-width:520px) {
  .ops-hero { padding:11px 12px; }
  .ops-status-chips { display:flex; gap:5px; }
}
@media (max-width:350px) {
  .ops-status-chips .status-card { padding:5px 7px; font-size:10px; }
  .ops-hero-fuel .fuel-reset-button { min-width:66px; padding:8px 10px; }
}

/* Keep viewport width stable when content/scrollbars change while polling.
   A changing scrollbar width near a mobile breakpoint can flip layouts. */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

/* Hall hero: temperature and fuel left, compact vertical status right */
.ops-hero-layout { display:grid; grid-template-columns:minmax(0,1fr) max-content; gap:12px; align-items:start; }
.ops-hero-primary { min-width:0; }
.ops-hero-status.ops-status-chips { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; gap:5px; margin:0; }
.ops-hero-status.ops-status-chips .status-card { min-height:28px; width:100%; padding:5px 8px; white-space:nowrap; font-size:11px; }
.ops-hero-primary .ops-hero-fuel { margin-top:9px; padding-top:9px; }
.ops-hero-primary .ops-fuel-heading { display:block; }
.ops-hero-primary .ops-fuel-heading h2 { margin:0 0 3px; }
.ops-hero-primary .ops-fuel-estimate { display:block; font-size:10px; }
.ops-hero-primary .ops-fuel-main { display:flex; flex-wrap:wrap; gap:7px; }
.ops-hero-primary .fuel-reset-button { flex:0 0 auto; min-height:44px; }
@media (max-width:360px) {
  .ops-hero-layout { gap:7px; }
  .ops-hero-status.ops-status-chips .status-card { padding:5px 6px; font-size:10px; }
  .ops-hero-primary .fuel-counter-value { font-size:25px; }
}

/* Balanced mobile hero: status beside temperature, fuel on its own full-width row.
   Override old two-column fuel/status layout without touching app logic. */
.ops-hero-top { display:grid; grid-template-columns:minmax(0,1fr) 112px; align-items:start; gap:12px; }
.ops-hero-temperature { min-width:0; }
.ops-hero-top .ops-hero-status.ops-status-chips { display:flex; flex-direction:column; flex-wrap:nowrap; gap:4px; align-items:stretch; }
.ops-hero-top .ops-hero-status .status-card { box-sizing:border-box; width:100%; min-height:25px; padding:4px 7px; font-size:10px; }
.ops-hero > .ops-hero-fuel { margin-top:11px; padding-top:10px; }
.ops-hero > .ops-hero-fuel .ops-fuel-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:4px 8px; }
.ops-hero > .ops-hero-fuel .ops-fuel-main { display:flex; flex-wrap:nowrap; gap:12px; align-items:center; }
.ops-hero > .ops-hero-fuel .ops-fuel-reading { flex:1; min-width:0; }
.ops-hero > .ops-hero-fuel .fuel-reset-button { flex:0 0 auto; min-width:74px; }
@media(max-width:360px) {
  .ops-hero-top { grid-template-columns:minmax(0,1fr) 96px; gap:7px; }
  .ops-hero-top .ops-hero-status .status-card { font-size:10px; padding:4px 5px; }
}

/* Six status indicators in two compact columns; keep temperature readable. */
.ops-hero-top { grid-template-columns:minmax(0,1fr) minmax(148px, 46%); gap:10px; }
.ops-hero-top .ops-hero-status.ops-status-chips {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px; align-content:start;
}
.ops-hero-top .ops-hero-status .status-card {
  min-width:0; width:100%; min-height:30px; padding:5px 6px;
  font-size:10px; white-space:normal; line-height:1.18;
}
.ops-hero-top .ops-hero-status .dot { flex-shrink:0; }
.ops-hero > .ops-hero-fuel { margin-top:7px; padding-top:7px; }
.ops-hero > .ops-hero-fuel .ops-fuel-heading { gap:2px 8px; }
.ops-hero > .ops-hero-fuel .ops-fuel-main { margin-top:2px; gap:8px; }
.ops-hero > .ops-hero-fuel .fuel-counter-since { margin-top:0; }
.ops-hero > .ops-hero-fuel .ops-fuel-note { margin:3px 0 0; font-size:10px; }
@media (max-width:370px) {
  .ops-hero-top { grid-template-columns:minmax(0,1fr) minmax(146px, 53%); gap:6px; }
  .ops-hero-top .ops-hero-status .status-card { padding:4px; font-size:9px; }
  .ops-hero-top .temperature { font-size:clamp(29px,8.5vw,40px); }
}

/* Confirmation dialog for a deliberate, potentially irreversible fuel counter reset. */
.fuel-reset-dialog {
  width:min(92vw,430px); max-width:430px; padding:22px;
  color:var(--text,#f9fafb); background:#1f2937;
  border:1px solid #64748b; border-radius:16px; box-shadow:0 20px 65px #000a;
}
.fuel-reset-dialog::backdrop { background:rgba(0,0,0,.72); }
.fuel-reset-dialog h2 { margin:0 0 12px; font-size:21px; }
.fuel-reset-dialog p { line-height:1.5; margin:0 0 12px; }
.fuel-reset-dialog-hint { color:#9ca3af; font-size:13px; }
.fuel-reset-dialog-actions { display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; margin-top:18px; }
.fuel-reset-dialog-actions button { min-height:46px; flex:1 1 150px; }
.fuel-dialog-cancel { background:#374151; }
.fuel-dialog-danger { background:#b91c1c; color:#fff; font-weight:650; }
.fuel-dialog-danger:focus-visible,.fuel-dialog-cancel:focus-visible { outline:3px solid #fbbf24; outline-offset:2px; }

/* Manual fuel and ESP32 hysteresis: changes only on explicit save. */
.fuel-editor { margin-top:12px; border-top:1px solid #374151; padding-top:9px; }
.fuel-editor summary { cursor:pointer; font-size:12px; font-weight:600; }
.fuel-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin:12px 0; }
.fuel-edit-grid label { display:flex; flex-direction:column; gap:6px; font-size:12px; color:#d1d5db; }
.fuel-edit-grid input {
  box-sizing:border-box; width:100%; min-width:0; border:1px solid #64748b;
  background:#111827; color:#f9fafb; border-radius:9px;
  min-height:42px; padding:8px 10px; font-size:16px;
}
.fuel-edit-grid input:focus-visible { outline:3px solid #60a5fa; outline-offset:1px; }
#fuel-edit-message,#hysteresis-message { font-size:12px; min-height:16px; margin:8px 0; }
@media(max-width:360px) { .fuel-edit-grid {grid-template-columns:1fr;} }

/* Current heating warnings and the worker's last confirmed ntfy messages. */
.notification-card { padding:12px 16px; }
.notification-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:0 12px; }
.notification-heading h2 { margin:0; }
#notifications-status { display:block; font-size:11px; line-height:1.4; }
#notifications-status[hidden] { display:none; }
.notification-status-ok { color:#a7f3d0; }
.notification-status-unknown { color:#fcd34d; }
.notification-current { display:flex; flex-wrap:wrap; align-items:flex-start; gap:5px; margin-top:4px; }
.notification-item { min-width:0; max-width:100%; border:0; border-radius:999px; background:#111827; }
.notification-item summary { display:flex; align-items:center; padding:6px 9px; min-height:28px; font-size:11px; line-height:1.2; font-weight:400; cursor:pointer; list-style:none; }
.notification-item summary::-webkit-details-marker { display:none; }
.notification-item .dot { flex:none; width:8px; height:8px; margin-right:5px; background:#6b7280; }
.notification-item .dot.active { background:#22c55e; }
.notification-item .notification-dot-alarm { background:#ef4444; }
.notification-item .notification-dot-warning,.notification-item .notification-dot-watch { background:#f59e0b; }
.notification-item[open] { flex-basis:100%; border-radius:10px; }
.notification-item summary:focus-visible { outline:2px solid #fbbf24; outline-offset:2px; }
.notification-item p { margin:0; padding:3px 9px 9px; font-size:12px; line-height:1.5; color:#d1d5db; overflow-wrap:anywhere; }
.notification-alarm { background:#371c25; }
.notification-alarm summary { color:#fecaca; }
.notification-warning { background:#322819; }
.notification-warning summary,.notification-watch summary { color:#fde68a; }
.notification-watch { background:#322819; }
.notification-history { margin-top:5px; }
.notification-history summary { cursor:pointer; min-height:28px; padding-top:7px; font-size:11px; font-weight:400; }
.notification-history ol { list-style:none; padding:0; margin:0; }
.notification-history li { border-top:1px solid #374151; padding:12px 0; overflow-wrap:anywhere; }
.notification-history li strong { display:block; font-size:13px; }
.notification-history li p { margin:5px 0 0; font-size:12px; line-height:1.55; color:#d1d5db; }
.notification-note,.notification-time,.notification-empty { font-size:11px; line-height:1.5; color:#9ca3af; }
.notification-delivery { font-size:12px; line-height:1.5; color:#fcd34d; }
.notification-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; font-size:12px; font-weight:600; }
.notification-toggle input { appearance:none; position:relative; width:44px; height:25px; margin:0; border:1px solid #6b7280; border-radius:20px; background:#374151; cursor:pointer; }
.notification-toggle input::before { content:""; position:absolute; width:17px; height:17px; left:3px; top:3px; border-radius:50%; background:#e5e7eb; transition:transform .15s; }
.notification-toggle input:checked { background:#047857; border-color:#34d399; }
.notification-toggle input:checked::before { transform:translateX(19px); }
.notification-toggle input:focus-visible { outline:3px solid #fbbf24; outline-offset:3px; }
.notification-toggle input:disabled { opacity:.55; cursor:wait; }
#monitoring-message { display:block; margin-top:5px; font-size:12px; color:#d1d5db; line-height:1.5; }
#monitoring-message:empty { display:none; }
#monitoring-confirm-dialog button { border:1px solid #6b7280; border-radius:8px; }
#monitoring-confirm-dialog .fuel-dialog-cancel { color:#f9fafb; }
@media(max-width:600px) {
    .notification-card { padding:10px 12px; }
}

/* Pause is the middle column on wide screens, below temperature on narrow screens. */
@media (min-width: 651px) {
  .ops-hero-top {
    grid-template-columns: minmax(0,1.02fr) minmax(0,.95fr) minmax(0,1.9fr);
    align-items: stretch;
  }
}
.ops-pause-control {
  min-width:0; display:flex; flex-direction:column; justify-content:center;
  gap:7px; padding:10px; border-radius:12px;
  background:#172132; border:1px solid #374151;
}
.ops-pause-control strong {font-size:13px;line-height:1.35;overflow-wrap:anywhere;}
@media (max-width:650px) {
  .ops-hero-top {grid-template-columns:minmax(0,1fr) minmax(148px,46%);}
  .ops-hero-temperature {grid-column:1;grid-row:1;}
  .ops-hero-status {grid-column:2;grid-row:1;}
  .ops-pause-control {grid-column:1/-1;grid-row:2;display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 10px;gap:4px 8px;}
}
@media (max-width:370px) {
  .ops-hero-top {grid-template-columns:minmax(0,1fr) minmax(146px,53%);gap:6px;}
}

/* Compact inline extrema chips above the chart. */
.temperature-extrema {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin:8px 0 0;
}
.temperature-extreme {
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  padding:5px 8px;
  border:1px solid #374151;
  border-radius:7px;
  background:#1f2937;
}
.temperature-extreme span { color:#9ca3af; font-size:11px; }
.temperature-extreme strong {
  font-size:12px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  overflow-wrap:anywhere;
}
@media (max-width:700px) {
  .temperature-extrema {grid-template-columns:repeat(2,minmax(0,1fr));}
}
