/* AdvEntInn house style (UI specification, SRS Appendix A) */
html, body {
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

.text-none { text-transform: none !important; }

.global-search { max-width: 280px; background: rgba(255, 255, 255, 0.95); border-radius: 4px; }
.global-search .mud-input { color: #1d2733; }

.page-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.page-header h1 { font-size: 1.35rem; font-weight: 500; margin: 0; }
.page-header .spacer { flex: 1 1 auto; }

.status-chip { font-weight: 500; letter-spacing: 0.02em; }

/* Dark grid header rows (Appendix A) */
.adv-grid .mud-table-head .mud-table-cell,
.adv-grid thead th {
    background: #2F3B4C;
    color: #fff;
    font-weight: 500;
}
.adv-grid .mud-table-cell { padding-top: 6px; padding-bottom: 6px; }
/* MudTable FixedHeader paints sticky header cells with the surface colour; keep the dark header readable */
.adv-grid .mud-table-sticky-header thead th, .adv-grid.mud-table-sticky-header thead th { background: #2F3B4C !important; color: #fff !important; }
.adv-grid th, .adv-grid td, .adv-grid .mud-table-cell { white-space: nowrap; }
.adv-grid td.wrap { white-space: normal; min-width: 220px; }
.mud-simple-table.adv-grid .mud-table-container, .mud-table.adv-grid .mud-table-container { overflow-x: auto; }
h1:focus { outline: none; }

.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.negative { color: #C62828; }
.line-reversed td { text-decoration: line-through; color: #8a94a3; }
.line-child td:nth-child(3) { padding-left: 28px; }

.kpi { padding: 14px 18px; }
.kpi .kpi-value { font-size: 1.9rem; font-weight: 500; line-height: 1.1; }
.kpi .kpi-label { color: #5b6675; font-size: 0.85rem; }

.rate-cell { min-width: 150px; }
.rate-cell .price { font-size: 1.05rem; font-weight: 600; }
.rate-cell.selected { outline: 2px solid #1E5AA8; outline-offset: -2px; background: #EAF1FB; }
.matrix th, .matrix td { vertical-align: top; }

.summary-sticky { position: sticky; top: 72px; }

/* Sign-in (static page) */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0B3D6E, #1E5AA8); padding: 16px; }
.login-card { background: #fff; border-radius: 8px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); padding: 32px; width: 100%; max-width: 400px; }
.login-brand { font-size: 1.8rem; font-weight: 700; color: #0B3D6E; }
.login-subtitle { color: #5b6675; margin-bottom: 20px; }
.login-card form { display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 0.85rem; color: #2F3B4C; margin-top: 8px; }
.login-card input { padding: 10px 12px; border: 1px solid #c6cdd6; border-radius: 4px; font-size: 1rem; }
.login-card input:focus { outline: 2px solid #1E5AA8; border-color: #1E5AA8; }
.login-card button { margin-top: 18px; padding: 10px; background: #1E5AA8; color: #fff; border: 0; border-radius: 4px; font-size: 1rem; cursor: pointer; }
.login-card button:hover { background: #174a8c; }
.login-error { background: #fdecea; color: #8a1c1c; border-radius: 4px; padding: 10px 12px; margin-bottom: 8px; }
.login-note { color: #5b6675; font-size: 0.8rem; margin-top: 16px; }
.login-users { font-size: 0.85rem; color: #2F3B4C; }
.login-users ul { padding-left: 18px; margin: 6px 0 0; }

/* Printable reports (audit packet) */
@media print {
    .mud-appbar, .mud-drawer, .no-print, .mud-snackbar-provider { display: none !important; }
    .mud-main-content { padding: 0 !important; margin: 0 !important; }
    .packet { box-shadow: none !important; }
    .adv-grid th, .adv-grid td { white-space: normal; }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* channel manager */
.kpi { min-width: 150px; }
.mono { font-family: Consolas, "Courier New", monospace; font-size: 0.8rem; }
td.wrap, .wrap { white-space: normal; word-break: break-word; max-width: 420px; }
pre.payload { background: #f5f7fa; border: 1px solid #dde3ea; border-radius: 4px; padding: 10px; max-height: 55vh; overflow: auto;
    font-size: 0.78rem; white-space: pre-wrap; word-break: break-all; }
.kpi .kpi-link { font-size: inherit; font-weight: inherit; }
