/* Operator reports keep the shared app shell and dense tables; only their page content takes the cafe surface system. */
.cafe-report-page {
    box-sizing: border-box;
    min-height: 100dvh;
    padding: clamp(24px, 3.5vw, 44px);
    color: var(--cafe-text);
    background: radial-gradient(ellipse at 12% 0, color-mix(in srgb, var(--cafe-primary) 17%, transparent), transparent 40%), var(--cafe-canvas);
}

.cafe-report-shell {
    width: min(1600px, 100%);
    min-width: 0;
    margin-inline: auto;
}

.cafe-report-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.cafe-report-heading h1 {
    margin: 0;
    color: var(--cafe-text);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
}

.cafe-report-heading h1 span {
    color: var(--cafe-accent);
}

.cafe-report-heading .cafe-page-eyebrow {
    margin-bottom: 9px;
    font-size: 11px;
}

.cafe-report-description {
    max-width: 720px;
    margin: 8px 0 0;
    color: var(--cafe-text-subtle);
    font-size: 16px;
    line-height: 1.5;
}

.cafe-report-grid {
    border: 1px solid var(--cafe-border);
    border-radius: 16px;
    background: var(--cafe-surface) !important;
    box-shadow: var(--cafe-shadow-card);
}

.cafe-report-grid .mud-table-toolbar {
    min-height: 56px;
    border-bottom: 1px solid var(--cafe-border);
    background: var(--cafe-surface-raised);
}

.cafe-report-toolbar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.cafe-report-grid .mud-table-head .mud-table-cell {
    border-bottom-color: var(--cafe-border);
    background: var(--cafe-surface-soft);
    color: var(--cafe-text-muted);
}

.cafe-report-grid .mud-table-body .mud-table-cell {
    border-bottom-color: var(--cafe-line);
    font-size: 16px;
    line-height: 1.4;
}

.cafe-report-grid .mud-table-body .mud-typography {
    font-size: 16px;
    line-height: 1.4;
}

.cafe-report-grid .mud-table-body .mud-table-row:hover {
    background: color-mix(in srgb, var(--cafe-accent) 7%, transparent) !important;
}

.cafe-report-grid .mud-chip {
    border-color: var(--cafe-border-strong);
    background-color: var(--cafe-surface-raised);
    color: var(--cafe-text-muted);
}

.cafe-report-grid .mud-chip-color-success {
    border-color: color-mix(in srgb, var(--cafe-success) 35%, transparent);
    background-color: color-mix(in srgb, var(--cafe-success) 9%, transparent);
    color: var(--cafe-success);
}

.cafe-report-grid .mud-chip-color-warning {
    border-color: color-mix(in srgb, var(--cafe-warning) 35%, transparent);
    background-color: color-mix(in srgb, var(--cafe-warning) 9%, transparent);
    color: var(--cafe-warning);
}

.cafe-report-grid .mud-chip-color-error {
    border-color: color-mix(in srgb, var(--cafe-danger) 35%, transparent);
    background-color: color-mix(in srgb, var(--cafe-danger) 9%, transparent);
    color: var(--cafe-danger);
}

.cafe-report-grid .mud-icon-button:focus-visible,
.cafe-report-grid .mud-chip:focus-visible {
    outline: 2px solid var(--cafe-accent-soft);
    outline-offset: 2px;
}

.cafe-energy-dashboard .cafe-report-heading {
    margin-bottom: 14px;
}

.cafe-energy-cycle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
    padding: 8px 12px;
    border: 1px solid var(--cafe-border-strong);
    border-radius: 999px;
    background: var(--cafe-surface-raised);
    color: var(--cafe-accent-soft);
    font-size: 16px;
    font-weight: 700;
}

.cafe-energy-grid {
    margin-top: 0;
}

.cafe-energy-card {
    border-color: var(--cafe-border) !important;
    border-radius: 16px;
    background: linear-gradient(145deg, var(--cafe-surface-raised), var(--cafe-surface)) !important;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%);
}

.cafe-energy-card-title {
    color: var(--cafe-accent-soft);
    font-weight: 800;
}

.cafe-energy-cost-value {
    color: var(--cafe-text) !important;
}

.cafe-water-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--cafe-border);
}

.cafe-water-heading {
    margin-bottom: 14px;
}

.cafe-water-heading .cafe-page-eyebrow {
    margin-bottom: 4px;
}

.cafe-water-heading h2 {
    margin: 0;
    color: var(--cafe-text);
    font-size: 22px;
    font-weight: 800;
}

.cafe-karaoke-debug .cafe-report-shell {
    width: min(1120px, 100%);
}

.cafe-debug-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.cafe-debug-panel {
    display: grid;
    gap: 16px;
    border-color: var(--cafe-border) !important;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--cafe-surface-raised), var(--cafe-surface)) !important;
}

.cafe-debug-panel-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cafe-debug-panel-heading h2 {
    margin: 0;
    color: var(--cafe-text);
    font-size: 18px;
    font-weight: 800;
}

.cafe-debug-panel-heading p {
    margin: 4px 0 0;
    color: var(--cafe-text-muted);
    font-size: 16px;
}

.cafe-debug-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--cafe-border-strong);
    border-radius: 12px;
    background: var(--cafe-surface-raised);
    color: var(--cafe-accent-soft);
}

.cafe-debug-submit {
    min-height: 44px;
    border-radius: 11px;
    font-weight: 800;
}

.cafe-debug-panel .mud-alert {
    margin: 0;
}

.cafe-report-loading,
.cafe-report-empty {
    border-color: var(--cafe-border) !important;
    border-radius: 16px;
    background: var(--cafe-surface-raised) !important;
    color: var(--cafe-text-muted);
}

@media (max-width: 1023.98px) {
    .cafe-report-page {
        padding: 82px 18px 24px;
    }
}

@media (max-width: 650px) {
    .cafe-report-heading {
        align-items: start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 16px;
    }

    .cafe-report-heading .mud-button-root {
        width: 100%;
    }

    .cafe-report-grid {
        height: calc(100dvh - 280px) !important;
        min-height: 360px;
    }

    .cafe-report-page .mud-icon-button {
        min-width: 44px;
        min-height: 44px;
    }

    .cafe-report-toolbar {
        flex-wrap: wrap;
        overflow: visible !important;
    }

    .cafe-report-toolbar > * {
        max-width: 100%;
    }

    .cafe-debug-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cafe-energy-cycle {
        margin-bottom: 14px;
        font-size: 16px;
    }

    .cafe-energy-card .mud-typography-caption {
        font-size: 16px;
        line-height: 1.4;
    }
}
