/*
 * EnterpriseControl portal — premium admin design system.
 * Inter type, deep slate sidebar, indigo primary on cool paper, soft layered depth.
 * Keep tokens in sync with Theme/EcTheme.cs.
 */
:root {
    --ink: #0F172A;
    --ink-2: #1E293B;
    --slate: #64748B;
    --slate-2: #94A3B8;
    --indigo: #4F46E5;
    --indigo-2: #4338CA;
    --indigo-soft: #EEF0FD;
    --paper: #F5F7FB;
    --surface: #FFFFFF;
    --rule: #E6E9EF;
    --rule-soft: #EEF1F5;
    --green: #15A06B;
    --green-soft: #E4F6EE;
    --red: #E11D48;
    --red-soft: #FCE7EC;
    --amber: #C2770B;
    --focus: #4F46E5;

    --r-lg: 16px;
    --r-md: 12px;
    --r-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.04);
    --shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 2px 4px rgba(15,23,42,.04);
    --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
    --measure: 72ch;
}

html, body {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    font-feature-settings: "cv11" 1, "tnum" 1;
    background: var(--paper);
    color: var(--ink);
    margin: 0;
    overflow-x: clip;
    max-width: 100vw;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.ec-shell { min-height: 100vh; background: var(--paper); overflow-x: clip; max-width: 100vw; }

/* ---------- Tally lamp (live/recording state) ---------- */
.ec-tally { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; color: var(--slate); white-space: nowrap; }
.ec-tally-lamp { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: #CBD5E1; }
.ec-tally-on { color: var(--green); }
.ec-tally-on .ec-tally-lamp { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.ec-tally-away { color: #B45309; }
.ec-tally-away .ec-tally-lamp { background: #F59E0B; box-shadow: 0 0 0 3px #FEF3C7; }
.ec-tally-view { color: var(--indigo); }
.ec-tally-view .ec-tally-lamp { background: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
.ec-tally-rec { color: var(--red); }
.ec-tally-rec .ec-tally-lamp { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); animation: ec-rec 1.4s ease-in-out infinite; }
@keyframes ec-rec { 50% { opacity: .4; } }

/* ---------- Sidebar ---------- */
.ec-drawer {
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%) !important;
    color: #fff !important;
    border: none !important;
}
.ec-drawer .mud-drawer-content { display: flex !important; flex-direction: column; height: 100%; padding: 0 !important; overflow: hidden !important; }
.ec-nav { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ec-brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 1.35rem 1.25rem 1.5rem; color: #fff; text-decoration: none;
    font-weight: 700; font-size: 1.02rem; letter-spacing: -.01em;
}
.ec-brand-mark {
    width: 34px; height: 34px; border-radius: 9px; flex: 0 0 auto;
    background: linear-gradient(140deg, var(--indigo) 0%, #7C73F0 100%);
    display: grid; place-items: center; box-shadow: 0 4px 12px rgba(79,70,229,.45);
}
.ec-brand-mark .ec-tally-lamp { background: #fff; box-shadow: none; }
.ec-nav-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .25rem .7rem 1rem; }
.ec-nav-gap { height: 1px; background: rgba(255,255,255,.08); margin: .9rem .6rem; }
.ec-nav-link { color: rgba(255,255,255,.72) !important; border-radius: var(--r-sm) !important; margin: .12rem 0 !important; font-weight: 500 !important; }
.ec-nav-link .mud-nav-link { padding: .6rem .8rem !important; }
.ec-nav-link .mud-nav-link-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-nav-link .mud-nav-link:hover { background: rgba(255,255,255,.07) !important; color: #fff !important; }
.ec-nav-link .mud-nav-link.active {
    background: linear-gradient(90deg, rgba(79,70,229,.30), rgba(79,70,229,.14)) !important;
    color: #fff !important; box-shadow: inset 3px 0 0 var(--indigo);
}
.ec-nav-link .mud-nav-link.active .mud-icon-root { color: #fff !important; }

/* ---------- Top bar ---------- */
.ec-topbar { background: rgba(255,255,255,.85) !important; backdrop-filter: saturate(180%) blur(8px); color: var(--ink) !important; border-bottom: 1px solid var(--rule); }
.ec-topbar-pill { display: flex; align-items: center; gap: .55rem; background: transparent; border: 1px solid transparent; border-radius: 999px; padding: .25rem .6rem .25rem .3rem; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.ec-topbar-pill:hover { border-color: var(--rule); background: var(--surface); box-shadow: var(--shadow-sm); }
.ec-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(140deg, var(--indigo), #7C73F0); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .72rem; }
.ec-user-meta span { display: block; line-height: 1.2; }
.ec-user-name { font-weight: 600; font-size: .85rem; }
.ec-user-role { font-size: .74rem; color: var(--slate); }

/* ---------- Page frame ---------- */
.ec-main.mud-main-content {
    padding: calc(var(--mud-appbar-height) + 1.75rem) 2rem 2.5rem !important;
    background: var(--paper); min-height: 100vh; width: auto !important; max-width: 100% !important;
}
.ec-page { max-width: 1280px; margin: 0 auto; }
.ec-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem 1.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.ec-page-header-text { min-width: 0; }
.ec-page-title { margin: 0; font-size: 1.6rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.ec-page-subtitle { margin: .35rem 0 0; color: var(--slate); max-width: var(--measure); }
.ec-page-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ec-page-toolbar { margin-bottom: 1rem; }
.ec-page-toolbar .mud-grid { margin: 0 !important; width: 100% !important; }

/* ---------- Panels ---------- */
.ec-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.25rem 1.4rem; box-shadow: var(--shadow-sm); max-width: 100%; min-width: 0; }
.ec-page-panel { padding: 0; overflow: hidden; }
.ec-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .6rem; }
.ec-panel-title { margin: 0; font-size: 1rem; font-weight: 650; letter-spacing: -.01em; }
.ec-panel-note { color: var(--slate); margin: .5rem 0 .25rem; max-width: 52ch; }
.ec-panel-fill { height: 100%; }
.ec-panel-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; padding: 2rem 1rem; color: var(--slate); }
.ec-panel-empty-icon { font-size: 2rem !important; color: var(--slate-2) !important; }
.ec-panel-empty p { margin: 0; max-width: 40ch; font-size: .88rem; }

/* ---------- KPI cards ---------- */
.ec-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; margin-bottom: 1.4rem; }
.ec-kpi {
    position: relative; background: var(--surface); border: 1px solid var(--rule);
    border-radius: var(--r-lg); padding: 1.25rem 1.3rem; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: .15rem; overflow: hidden;
}
.ec-kpi::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--indigo), #7C73F0); opacity: .9; }
.ec-kpi-icon { width: 40px; height: 40px; border-radius: var(--r-md); display: grid; place-items: center; margin-bottom: .6rem; }
.ec-kpi-icon .mud-icon-root { font-size: 1.3rem; }
.ec-kpi-icon.i-indigo { background: var(--indigo-soft); color: var(--indigo); }
.ec-kpi-icon.i-green { background: var(--green-soft); color: var(--green); }
.ec-kpi-icon.i-red { background: var(--red-soft); color: var(--red); }
.ec-kpi-icon.i-slate { background: #EEF1F5; color: var(--slate); }
.ec-kpi-label { font-size: .8rem; color: var(--slate); font-weight: 500; }
.ec-kpi-value { font-size: 2rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; color: var(--ink); }
.ec-kpi-foot { font-size: .78rem; color: var(--slate-2); margin-top: .1rem; }

/* ---------- Dashboard lists ---------- */
.ec-dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.ec-onboard { max-width: 640px; }
.ec-list-row { display: flex; align-items: center; gap: .85rem; padding: .7rem .35rem; border-bottom: 1px solid var(--rule-soft); color: inherit; text-decoration: none; border-radius: var(--r-sm); transition: background .12s ease; }
.ec-list-row:last-child { border-bottom: 0; }
.ec-list-row:hover { background: var(--paper); }
.ec-list-chip { width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); }
.ec-list-chip .mud-icon-root { font-size: 1.05rem; }
.ec-list-icon { color: var(--slate) !important; }
.ec-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ec-list-main .ec-person-name, .ec-list-main .ec-person-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-list-side { font-size: .82rem; color: var(--slate); text-align: right; white-space: nowrap; }

.ec-steps { margin: .5rem 0 1.4rem 1.1rem; padding: 0; line-height: 1.95; max-width: var(--measure); color: var(--ink-2); }
.ec-steps a { color: var(--indigo); font-weight: 600; }

/* ---------- People ---------- */
.ec-person { display: flex; align-items: center; gap: .7rem; }
.ec-person-avatar { width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--indigo-soft); color: var(--indigo); font-weight: 700; font-size: .75rem; }
.ec-person-name { font-weight: 600; line-height: 1.3; }
.ec-person-sub { display: block; font-size: .8rem; color: var(--slate); line-height: 1.4; }
.ec-muted { color: var(--slate-2); font-size: .85rem; }

/* ---------- Tables ---------- */
.ec-table { width: 100%; max-width: 100%; background: transparent !important; }
.ec-table .mud-table-container, .ec-page-panel .mud-table-container { overflow-x: auto !important; max-width: 100%; }
.ec-page-panel .mud-table-root { height: auto !important; }
.ec-table .mud-table-head .mud-table-cell {
    font-size: .74rem; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .04em;
    background: #FAFBFC; border-bottom: 1px solid var(--rule); padding-top: .7rem; padding-bottom: .7rem;
}
.ec-table .mud-table-body .mud-table-cell { border-bottom: 1px solid var(--rule-soft); padding-top: .8rem; padding-bottom: .8rem; vertical-align: middle; }
.ec-table .mud-table-body .mud-table-row:hover { background: var(--paper); }
.ec-table .mud-table-body .mud-table-row:last-child .mud-table-cell { border-bottom: 0; }
.ec-table-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.ec-search { max-width: 360px; flex: 1 1 240px; }
.ec-cell-wrap { white-space: normal !important; }
.ec-cell-clamp { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-row-actions { display: flex; align-items: center; gap: .35rem; justify-content: flex-end; }
.ec-row-actions .mud-button-root, .ec-page-actions .mud-button-root, .ec-table .mud-button-root { white-space: nowrap; }

/* Live-updates indicator on Devices */
.ec-live { display: inline-flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 600; color: var(--slate); margin-right: .5rem; padding: .3rem .7rem; border-radius: 999px; background: #EEF1F5; }
.ec-live.on { color: var(--green); background: var(--green-soft); }
.ec-live .ec-tally-lamp { background: currentColor; box-shadow: none; }
.ec-live.on .ec-tally-lamp { animation: ec-rec 1.8s ease-in-out infinite; }

/* ---------- Empty / loading ---------- */
.ec-empty { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; padding: 2.5rem 1.5rem; max-width: 60ch; }
.ec-empty-icon { color: var(--slate-2) !important; font-size: 2rem !important; }
.ec-empty-title { font-weight: 650; font-size: 1.1rem; }
.ec-empty-message { color: var(--slate); }
.ec-empty-actions { margin-top: .9rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.ec-skeleton { padding: .35rem .25rem; }
.ec-skeleton-row { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid var(--rule-soft); }
.ec-skeleton-row:last-child { border-bottom: 0; }
.ec-skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: .35rem; }

/* ---------- MudBlazor polish ---------- */
.mud-button-root { border-radius: var(--r-sm) !important; font-weight: 600; }
.mud-button-filled { box-shadow: var(--shadow-sm) !important; }
.mud-button-filled.mud-button-filled-primary { background: var(--indigo) !important; }
.mud-button-filled.mud-button-filled-primary:hover { background: var(--indigo-2) !important; box-shadow: 0 4px 14px rgba(79,70,229,.35) !important; }
.mud-button-outlined { border-color: var(--rule) !important; }
.mud-chip { border-radius: var(--r-sm) !important; font-weight: 600; }
.mud-dialog { border-radius: var(--r-lg) !important; box-shadow: var(--shadow-lg) !important; }
.mud-dialog .mud-dialog-title { font-weight: 650; letter-spacing: -.01em; }
.mud-snackbar { border-radius: var(--r-md) !important; font-weight: 500; box-shadow: var(--shadow-lg) !important; }
.mud-alert { border-radius: var(--r-md) !important; }
.mud-input-outlined-border { border-radius: var(--r-sm) !important; }
.mud-table { background: transparent !important; }

.mud-picker-dialog .mud-picker-calendar-container, .mud-picker-dialog .mud-picker-calendar { width: 100%; min-width: 280px; overflow: visible !important; }
.mud-picker-calendar-header, .mud-picker-calendar-header .mud-picker-calendar-header-day { overflow: visible !important; }
.mud-picker .mud-picker-calendar-day { width: 36px !important; height: 36px !important; margin: 0 !important; }
.mud-popover, .mud-overlay, .mud-dialog-container { overflow: visible !important; }

/* ---------- Sign-in ---------- */
.ec-auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(1200px 600px at 50% -10%, #28345A 0%, #0F172A 60%); }
.ec-auth-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--r-lg); padding: 2.25rem 2.25rem 2.5rem; box-shadow: var(--shadow-lg); }
.ec-auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; margin-bottom: 1.75rem; }
.ec-auth-brand .ec-brand-mark { background: linear-gradient(140deg, var(--indigo), #7C73F0); }
.ec-auth-title { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; }
.ec-auth-sub { margin: .35rem 0 1.4rem; color: var(--slate); }
.ec-auth-form { display: flex; flex-direction: column; gap: .35rem; }
.ec-auth-form label { font-size: .85rem; font-weight: 600; margin-top: .6rem; }
.ec-auth-form input { font: inherit; padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: var(--r-sm); background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s; }
.ec-auth-form input:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-soft); }
.ec-auth-form button { margin-top: 1.5rem; padding: .8rem; border: 0; border-radius: var(--r-sm); background: var(--indigo); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(79,70,229,.35); transition: background .12s; }
.ec-auth-form button:hover { background: var(--indigo-2); }
.ec-auth-error { background: var(--red-soft); color: #9F1239; border-left: 3px solid var(--red); border-radius: 6px; padding: .65rem .8rem; margin-bottom: .5rem; font-size: .9rem; }

/* ---------- Connection-lost overlay ---------- */
.ec-reconnect { position: fixed; inset: 0; z-index: 3000; display: none; align-items: flex-start; justify-content: center; padding-top: 12vh; background: rgba(15,23,42,.4); backdrop-filter: blur(3px); }
.ec-reconnect.ec-reconnect-visible { display: flex; }
.ec-reconnect-card { display: flex; align-items: center; gap: .9rem; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 1rem 1.25rem; max-width: 360px; box-shadow: var(--shadow-lg); }
.ec-reconnect-title { font-weight: 650; }
.ec-reconnect-text { font-size: .9rem; color: var(--slate); }
.ec-reconnect .ec-when-reconnecting, .ec-reconnect .ec-when-reloading { display: none; }
.ec-reconnect[data-state="reconnecting"] .ec-when-reconnecting, .ec-reconnect[data-state="reloading"] .ec-when-reloading { display: block; }
.ec-reconnect-spinner { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; border: 3px solid var(--rule); border-top-color: var(--indigo); animation: ec-spin .9s linear infinite; }
@keyframes ec-spin { to { transform: rotate(360deg); } }

#blazor-error-ui { display: none; }

/* Blazor focuses the page <h1> after navigation for screen readers; don't draw a box around it. */
.ec-page-title:focus, .ec-page-title:focus-visible, h1:focus { outline: none; }

/* ---------- Livelier surfaces ---------- */
.ec-main.mud-main-content {
    background:
        radial-gradient(900px 380px at 100% -80px, rgba(124,115,240,.10), transparent 70%),
        radial-gradient(700px 300px at 0% -60px, rgba(14,165,233,.07), transparent 70%),
        var(--paper);
}
.ec-kpi { transition: transform .15s ease, box-shadow .15s ease; }
.ec-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.ec-kpi:nth-child(2)::after { background: linear-gradient(90deg, #15A06B, #34D399); }
.ec-kpi:nth-child(3)::after { background: linear-gradient(90deg, #E11D48, #FB7185); }
.ec-kpi:nth-child(4)::after { background: linear-gradient(90deg, #0EA5E9, #38BDF8); }
.ec-kpi-icon.i-slate { background: #E6F6FD; color: #0EA5E9; }
.mud-button-filled.mud-button-filled-primary:disabled,
.mud-button-filled.mud-button-filled-primary.mud-button-disabled {
    background: #E2E8F0 !important; color: #94A3B8 !important; box-shadow: none !important;
}

/* ---------- Avatars ---------- */
.ec-avatar-solid { color: #fff !important; box-shadow: 0 2px 6px rgba(15,23,42,.12); }
.ec-avatar-sm { width: 30px; height: 30px; font-size: .7rem; }
.ec-avatar-lg {
    width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center;
    color: #fff; font-weight: 700; font-size: .9rem; box-shadow: 0 3px 10px rgba(15,23,42,.15);
}

/* ---------- Filter bar ---------- */
.ec-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.ec-filter-employee { flex: 2 1 240px; }
.ec-filter-date { flex: 1 1 170px; }
.ec-filter-actions { display: flex; gap: .4rem; align-items: center; }
.ec-filter-bar .mud-input-control { margin-top: 0 !important; }

/* ---------- Recordings by employee ---------- */
.ec-rec-summary { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; color: var(--slate); margin: .25rem 0 1rem .2rem; font-size: .9rem; }
.ec-rec-summary b { color: var(--ink); }
.ec-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--slate-2); }
.ec-rec-group {
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm); margin-bottom: 1.1rem; overflow: hidden;
}
.ec-rec-group-head {
    display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #FAFBFE, #fff); border-bottom: 1px solid var(--rule-soft);
}
.ec-rec-group-text { flex: 1; min-width: 0; }
.ec-rec-group-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.ec-rec-group-stats { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.ec-stat-pill { font-size: .78rem; font-weight: 600; color: var(--indigo); background: var(--indigo-soft); padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.ec-rec-list { display: flex; flex-direction: column; }
.ec-rec-row {
    display: flex; align-items: center; gap: .9rem; padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--rule-soft); transition: background .12s ease;
}
.ec-rec-row:last-child { border-bottom: 0; }
.ec-rec-row:hover { background: var(--paper); }
.ec-app-badge { width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto; display: grid; place-items: center; }
.ec-rec-main { flex: 1; min-width: 0; }
.ec-rec-title { font-weight: 600; }
.ec-rec-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; min-width: 90px; }
.ec-rec-duration { display: inline-flex; align-items: center; gap: .3rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.ec-rec-duration .mud-icon-root { font-size: 1rem; color: var(--slate-2); }

@media (max-width: 600px) {
    .ec-rec-group-head { flex-wrap: wrap; }
    .ec-rec-group-stats { width: 100%; justify-content: flex-start; }
    .ec-rec-row { flex-wrap: wrap; padding: .75rem 1rem; row-gap: .5rem; }
    .ec-rec-main { flex: 1 1 calc(100% - 60px); }
    .ec-rec-meta { align-items: center; flex-direction: row; gap: .6rem; min-width: 0; margin-left: 50px; margin-right: auto; }
    .ec-filter-actions { width: 100%; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .ec-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ec-dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .ec-main.mud-main-content { padding: calc(var(--mud-appbar-height) + 1rem) 1rem 1.5rem !important; }
    .ec-kpis { grid-template-columns: minmax(0, 1fr); }
    .ec-page-title { font-size: 1.35rem; }
    .ec-page-actions { width: 100%; }
    .ec-table-toolbar { padding: .75rem; }
    .ec-search { max-width: none; }
    .ec-cell-clamp { max-width: 18ch; }
}
@media (prefers-reduced-motion: reduce) {
    .ec-tally-rec .ec-tally-lamp, .ec-live.on .ec-tally-lamp, .ec-reconnect-spinner { animation: none; }
}

/* Dashboard: needs attention */
.ec-attention { margin-bottom: 1.25rem; border-left: 4px solid #f59e0b; }
.ec-attention .ec-panel-title { display: flex; align-items: center; gap: .4rem; }
.ec-attention-icon { color: #f59e0b; }
.ec-list-chip.ec-chip-red { background: rgba(239, 68, 68, .12); color: #dc2626; }
.ec-list-chip.ec-chip-amber { background: rgba(245, 158, 11, .14); color: #b45309; }

/* ---------- Free trial banner ---------- */
.ec-trial-banner { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .6rem .9rem; border-radius: var(--r-sm, 8px); background: var(--indigo-soft, #eef0ff); color: var(--ink-2, #333); font-size: .88rem; }
.ec-trial-banner b { color: var(--indigo, #4f46e5); }
.ec-trial-banner.ec-trial-urgent { background: #fff4e5; }
.ec-trial-banner.ec-trial-urgent b { color: #b45309; }
.ec-steps-check { list-style: none; margin: .5rem 0 1.4rem; padding: 0; line-height: 1.9; }
.ec-steps-check li { display: flex; gap: .55rem; align-items: baseline; }
.ec-steps-check .ec-step-mark { width: 1.2rem; flex: 0 0 auto; font-weight: 700; color: var(--slate, #64748b); }
.ec-steps-check .ec-step-done .ec-step-mark { color: #16a34a; }
.ec-steps-check .ec-step-done span:last-child { color: var(--slate, #64748b); }
.ec-steps-check a { color: var(--indigo); font-weight: 600; }
