:root {
  --brand-navy: #124f9f;
  --brand-blue: #2e85df;
  --brand-sky: #6bc5f2;
  --ink: #173553;
  --ink-strong: #102a43;
  --muted: #667f96;
  --muted-2: #8aa0b4;
  --line: #dce8f2;
  --line-soft: #eaf1f7;
  --surface: #fff;
  --surface-soft: #f6fafe;
  --body: #eef5fa;
  --nav: #0d2948;
  --nav-soft: #15395f;
  --success: #159b72;
  --success-soft: #e8f7f2;
  --warning: #d58b18;
  --warning-soft: #fff7e6;
  --danger: #d75151;
  --danger-soft: #fff0ef;
  --shadow-sm: 0 1px 2px rgba(13, 41, 72, .05), 0 8px 24px rgba(13, 41, 72, .04);
  --shadow-lg: 0 22px 55px rgba(18, 79, 159, .13);
  --radius: 14px;
  --sidebar-width: 242px;
  --sidebar-collapsed-width: 76px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #dbeafe;
  --ink-strong: #f0f7ff;
  --muted: #92a9be;
  --muted-2: #6f879d;
  --line: #29465f;
  --line-soft: #243d54;
  --surface: #142b40;
  --surface-soft: #18334a;
  --body: #0e2235;
  --success-soft: #123d36;
  --warning-soft: #493819;
  --danger-soft: #4b292b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2), 0 8px 24px rgba(0,0,0,.12);
}
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--body); font-size: 14px; line-height: 1.5; }
.portal-page { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.lucide { width: 1.15em; height: 1.15em; stroke-width: 1.8; }

/* Authentication */
.login-page { min-height: 100vh; background: #f5faff; overflow-x: hidden; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 1.07fr) minmax(430px, .93fr); position: relative; }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: 54px clamp(42px, 6vw, 96px); color: #fff; overflow: hidden; background: linear-gradient(145deg, #0d3f7d 0%, #1769bb 53%, #3aa5df 100%); }
.login-story::before { content: ""; position: absolute; width: 580px; height: 580px; border-radius: 50%; right: -220px; top: -210px; border: 1px solid rgba(255,255,255,.17); box-shadow: 0 0 0 65px rgba(255,255,255,.035), 0 0 0 130px rgba(255,255,255,.025); }
.login-story::after { content: ""; position: absolute; inset: auto -10% -27% 17%; height: 54%; background: linear-gradient(145deg, transparent 0 40%, rgba(255,255,255,.06) 40% 42%, transparent 42%), linear-gradient(35deg, transparent 0 50%, rgba(255,255,255,.07) 50% 52%, transparent 52%); transform: rotate(-5deg); }
.login-brand, .login-story-copy, .login-story-foot { position: relative; z-index: 1; }
.login-brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; color: #fff; font-size: 24px; font-weight: 750; letter-spacing: -.025em; }
.login-brand img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.login-story-copy { max-width: 610px; margin: auto 0; padding: 60px 0; }
.eyebrow { margin: 0 0 7px; text-transform: uppercase; letter-spacing: .13em; font-size: 11px; line-height: 1.3; font-weight: 800; color: var(--brand-blue); }
.login-story .eyebrow { color: #a8dcfa; }
.login-story h1 { margin: 0 0 22px; max-width: 620px; font-size: clamp(40px, 4.5vw, 68px); line-height: 1.04; letter-spacing: -.045em; }
.login-story-copy > p:not(.eyebrow) { max-width: 540px; color: rgba(255,255,255,.82); font-size: 17px; line-height: 1.72; }
.login-proof { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 35px; }
.login-proof span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.09); color: rgba(255,255,255,.92); font-size: 12px; font-weight: 700; backdrop-filter: blur(10px); }
.login-story-foot { color: rgba(255,255,255,.62); font-size: 12px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 55px; background: rgba(255,255,255,.92); }
.login-form-wrap { width: min(100%, 420px); }
.mobile-login-logo { display: none; align-items: center; gap: 10px; color: #173553; font-size: 22px; font-weight: 750; letter-spacing: -.025em; }
.mobile-login-logo img { width: 41px; height: 41px; border-radius: 50%; object-fit: cover; }
.login-form-wrap h2 { margin: 0 0 8px; color: #173553; font-size: 35px; line-height: 1.2; letter-spacing: -.035em; }
.login-intro { margin: 0 0 34px; color: #667f96; font-size: 15px; }
.form-alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 22px; padding: 12px 14px; color: #a53d3d; background: #fff0ef; border: 1px solid #f3ceca; border-radius: 10px; }
.form-alert svg { flex: 0 0 auto; margin-top: 2px; }
.login-form { display: grid; gap: 10px; }
.login-form label { color: #274a68; font-size: 12px; font-weight: 750; }
.remember-browser { display: flex; align-items: center; gap: 9px; margin-top: 12px; cursor: pointer; }
.remember-browser input { flex: 0 0 auto; width: 18px; height: 18px; accent-color: var(--brand-blue); }
.form-help { margin: 0; color: #667f96; font-size: 13px; line-height: 1.5; }
.browser-security { margin-top: 28px; padding-top: 22px; border-top: 1px solid #d8e5ef; }
.browser-security h3 { margin: 0; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.input-shell { position: relative; display: flex; align-items: center; }
.input-shell > svg { position: absolute; z-index: 1; left: 15px; color: #89a3b9; }
.input-shell input { width: 100%; height: 52px; padding: 0 46px; border: 1px solid #d8e5ef; border-radius: 11px; outline: none; color: #173553; background: #fbfdff; transition: .18s ease; }
.input-shell input:focus { border-color: #2e85df; box-shadow: 0 0 0 4px rgba(46,133,223,.11); background: #fff; }
.password-toggle { position: absolute; right: 7px; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: #7690a7; cursor: pointer; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; font-weight: 750; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.primary-button { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-navy), var(--brand-blue)); box-shadow: 0 9px 24px rgba(18,79,159,.19); }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(18,79,159,.26); }
.login-button { height: 52px; margin-top: 16px; }
.login-help { margin: 32px 0 0; color: #7c93a7; text-align: center; font-size: 12px; }
.login-help a { color: var(--brand-navy); font-weight: 750; }

/* Main shell */
.portal-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); color: rgba(255,255,255,.75); background: linear-gradient(180deg, #0c2b4a 0%, #0d243c 100%); box-shadow: 8px 0 35px rgba(6,30,53,.1); transition: width .2s ease, transform .2s ease; }
.sidebar-brand { display: flex; align-items: center; justify-content: space-between; height: 79px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand-link { display: flex; align-items: center; min-width: 0; gap: 11px; color: #fff; }
.sidebar-brand-mark { display: block; flex: 0 0 auto; width: 37px; height: 37px; aspect-ratio: 1 / 1; border-radius: 50%; object-fit: cover; }
.sidebar-brand-name { overflow: hidden; font-size: 17px; font-weight: 750; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-close { display: none; border: 0; background: none; color: #fff; }
.side-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 12px; }
.nav-label { margin: 8px 12px 9px; color: rgba(255,255,255,.36); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-label-spaced { margin-top: 30px; }
.nav-link { display: flex; align-items: center; gap: 11px; min-height: 43px; margin: 3px 0; padding: 0 12px; border-radius: 9px; color: rgba(255,255,255,.68); font-weight: 650; transition: .16s ease; }
.nav-link svg { flex: 0 0 auto; width: 18px; height: 18px; color: #71b9eb; font-size: 17px; }
.nav-link span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link b { min-width: 23px; padding: 2px 6px; border-radius: 99px; color: rgba(255,255,255,.68); background: rgba(255,255,255,.07); text-align: center; font-size: 10px; }
.nav-link:hover, .nav-link.active { color: #fff; background: rgba(56,150,226,.18); }
.nav-link.active { box-shadow: inset 3px 0 0 #64c3f2; }
.nav-link .alert-count { color: #ffd4a1; background: rgba(230,147,47,.18); }
.account-initial { display: grid !important; place-items: center; flex: 0 0 auto !important; width: 25px; height: 25px; border-radius: 7px; color: #bfe7ff; background: rgba(107,197,242,.14); font-size: 11px; }
.sidebar-health { display: flex; align-items: flex-start; gap: 10px; margin: 0 12px 14px; padding: 13px; border: 1px solid rgba(107,197,242,.14); border-radius: 10px; background: rgba(107,197,242,.07); }
.health-pulse, .pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #45cea2; box-shadow: 0 0 0 4px rgba(69,206,162,.13); }
.health-pulse { flex: 0 0 auto; margin-top: 5px; }
.sidebar-health strong, .sidebar-health span { display: block; }
.sidebar-health strong { color: #dbf3ff; font-size: 11px; }
.sidebar-health span { margin-top: 2px; color: rgba(255,255,255,.42); font-size: 9px; }
.sidebar-user { display: flex; align-items: center; gap: 9px; min-height: 74px; padding: 12px 14px; border-top: 1px solid rgba(255,255,255,.07); }
.user-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 35px; height: 35px; border-radius: 10px; color: #eaf8ff; background: linear-gradient(145deg, #2e85df, #54b6ea); font-weight: 800; }
.sidebar-user > div { flex: 1; min-width: 0; }
.sidebar-user strong, .sidebar-user span { display: block; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user div span { color: rgba(255,255,255,.44); font-size: 9px; }
.sidebar-user button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 8px; color: rgba(255,255,255,.48); background: transparent; cursor: pointer; }
.sidebar-user button:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar-scrim { display: none; }
.main-column { min-width: 0; min-height: 100vh; margin-left: var(--sidebar-width); transition: margin-left .2s ease; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; align-items: center; justify-content: space-between; height: 79px; padding: 0 30px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); }
.topbar-left { display: flex; align-items: center; gap: 13px; }
.topbar-kicker { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; }
.topbar h1 { margin: 1px 0 0; color: var(--ink-strong); font-size: 17px; line-height: 1.2; letter-spacing: -.01em; }
.menu-button { display: grid; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.live-indicator { display: flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 99px; color: var(--success); background: var(--success-soft); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.live-indicator span { width: 6px; height: 6px; border-radius: 50%; background: var(--success); animation: live 2s infinite; }
@keyframes live { 50% { box-shadow: 0 0 0 5px rgba(21,155,114,0); } 0%,100% { box-shadow: 0 0 0 1px rgba(21,155,114,.2); } }
.updated-time { color: var(--muted-2); font-size: 10px; }
.icon-button, .menu-button { place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: var(--surface); cursor: pointer; }
.icon-button { display: grid; }
.icon-button:hover { color: var(--brand-blue); border-color: color-mix(in srgb, var(--brand-blue) 40%, var(--line)); }
.icon-button.is-spinning svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-main { width: min(1500px, 100%); min-width: 0; min-height: calc(100vh - 130px); margin: 0 auto; padding: 30px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.page-heading h2 { margin: 0; color: var(--ink-strong); font-size: 25px; letter-spacing: -.035em; }
.page-heading > div > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.select-label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
select { height: 38px; padding: 0 35px 0 11px; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: var(--surface); }
.heading-badges { display: flex; gap: 7px; }

/* Cards and dashboard */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { display: flex; align-items: center; gap: 13px; min-height: 105px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.stat-icon { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 12px; }
.stat-icon.blue { color: var(--brand-blue); background: #eaf4fe; }
.stat-icon.cyan { color: #148cbf; background: #e8f8fd; }
.stat-icon.green { color: var(--success); background: var(--success-soft); }
.stat-icon.amber { color: var(--warning); background: var(--warning-soft); }
.stat-card p, .stat-card small { margin: 0; }
.stat-card p { color: var(--muted); font-size: 10px; font-weight: 700; }
.stat-card strong { display: block; margin: 1px 0 0; color: var(--ink-strong); font-size: 25px; line-height: 1.15; letter-spacing: -.04em; }
.stat-card strong em { color: var(--muted-2); font-size: 13px; font-style: normal; font-weight: 650; }
.stat-card small { color: var(--muted-2); font-size: 9px; }
.attention-banner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 15px; margin-top: 14px; padding: 14px 16px; border: 1px solid #f0d8a5; border-radius: var(--radius); background: linear-gradient(100deg, var(--warning-soft), var(--surface)); box-shadow: var(--shadow-sm); }
.attention-icon { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 11px; color: var(--warning); background: color-mix(in srgb, var(--warning) 13%, transparent); }
.attention-banner h3, .attention-banner p { margin: 0; }
.attention-banner h3 { color: var(--ink-strong); font-size: 13px; }
.attention-banner div > p:last-child { margin-top: 2px; color: var(--muted); font-size: 10px; }
.attention-banner div > p span { color: var(--warning); font-weight: 700; }
.secondary-button { min-height: 35px; padding: 0 13px; border: 1px solid var(--line); color: var(--brand-navy); background: var(--surface); font-size: 10px; }
.secondary-button:hover { border-color: var(--brand-blue); box-shadow: 0 5px 15px rgba(18,79,159,.1); }
.banner-arrow { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: var(--muted); }
.banner-arrow:hover { color: var(--brand-blue); background: var(--surface); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(270px, .75fr); gap: 14px; margin-top: 14px; }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.trend-panel, .health-panel { padding: 19px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.panel h3, .section-head h3 { margin: 0; color: var(--ink-strong); font-size: 15px; letter-spacing: -.02em; }
.range-control { display: flex; padding: 3px; border-radius: 8px; background: var(--surface-soft); }
.range-control a { padding: 5px 10px; border-radius: 6px; color: var(--muted); font-size: 9px; font-weight: 750; }
.range-control a.active { color: var(--brand-navy); background: var(--surface); box-shadow: 0 1px 4px rgba(13,41,72,.1); }
.chart-summary { display: flex; align-items: flex-end; justify-content: space-between; margin: 19px 1px 0; }
.chart-summary span, .chart-summary p { color: var(--muted-2); font-size: 9px; }
.chart-summary strong { display: block; color: var(--ink-strong); font-size: 22px; }
.chart-summary p { margin: 0; }
.chart-wrap { position: relative; min-height: 292px; margin-top: 2px; }
.portal-chart { width: 100%; min-width: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 99px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pill svg { font-size: 11px; }
.status-pill.healthy, .status-pill.resolved { color: var(--success); background: var(--success-soft); }
.status-pill.attention, .status-pill.alert, .status-pill.warning, .status-pill.open { color: var(--warning); background: var(--warning-soft); }
.status-pill.offline, .status-pill.retired { color: var(--muted); background: var(--surface-soft); }
.status-pill.acknowledged { color: var(--brand-blue); background: #e9f4ff; }
.health-score { display: flex; align-items: center; gap: 8px; padding: 10px 0 7px; }
.health-score #protection-chart { flex: 0 0 132px; width: 132px; }
.health-score > div:last-child strong { color: var(--ink-strong); }
.health-score p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.health-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-soft); }
.health-list li { display: flex; align-items: center; justify-content: space-between; min-height: 36px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.health-list li span { display: flex; align-items: center; gap: 8px; }
.health-list li:nth-child(1) svg { color: var(--success); }
.health-list li:nth-child(2) svg, .health-list li:nth-child(3) svg { color: var(--warning); }
.health-list strong { color: var(--ink-strong); }
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 14px; margin-top: 14px; }
.telemetry-history-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 14px; margin-top: 14px; }
.telemetry-history-panel { min-width: 0; padding: 19px; }
.compact-history { min-height: 235px; }
.analytics-panel { min-width: 0; padding: 19px; }
.panel-note { color: var(--muted-2); font-size: 9px; }
.compact-chart { min-height: 235px; margin-top: 2px; }
.section-block { margin-top: 26px; }
.equipment-overview-block { margin-top: 18px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 11px; }
.section-head a { display: inline-flex; align-items: center; gap: 6px; color: var(--brand-blue); font-size: 10px; font-weight: 750; }
.sensor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sensor-card { position: relative; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.sensor-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--success); }
.sensor-card.alert::before { background: var(--warning); }
.sensor-card.warning::before { background: #e1ad45; }
.sensor-card.offline::before { background: var(--muted-2); }
.sensor-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sensor-symbol { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--brand-blue); background: #eaf4fe; }
.sensor-card h4 { margin: 1px 0 0; overflow: hidden; color: var(--ink-strong); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sensor-location { margin: 12px 0 0; color: var(--muted-2); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.sensor-gateway { display: flex; align-items: center; gap: 5px; margin: 5px 0 0; color: var(--muted); font-size: 8px; font-weight: 650; }
.sensor-gateway svg { width: 12px; height: 12px; color: var(--brand-sky); }
.sensor-reading { display: flex; align-items: baseline; gap: 9px; margin-top: 13px; }
.sensor-reading strong { color: var(--ink-strong); font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.sensor-reading span { color: var(--muted-2); font-size: 8px; }
.sensor-secondary { display: grid; gap: 5px; margin: 13px 0 0; }
.sensor-secondary div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sensor-secondary dt { display: flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 8px; }
.sensor-secondary dd { margin: 0; color: var(--ink); font-size: 9px; font-weight: 750; }
.sensor-meta { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding-top: 11px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 8px; }
.sensor-meta span { display: flex; align-items: center; gap: 4px; }
.sensor-meta span:last-child { margin-left: auto; }
.equipment-health-grid, .equipment-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.equipment-health-card { position: relative; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.equipment-health-card[data-equipment-href] { cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.equipment-health-card[data-equipment-href]:hover { border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.equipment-health-card[data-equipment-href]:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
.equipment-health-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--success); content: ""; }
.equipment-health-card.warning::before { background: var(--warning); }
.equipment-health-card.alert::before { background: var(--danger); }
.equipment-health-card.offline::before { background: var(--muted-2); }
.equipment-health-head, .equipment-admin-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.equipment-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; color: var(--brand-blue); background: #eaf4fe; }
.equipment-symbol svg { width: 21px; height: 21px; }
.equipment-health-head .sensor-location, .equipment-admin-head .sensor-location { margin: 0; }
.equipment-health-head h4, .equipment-admin-head h3 { margin: 2px 0 0; overflow: hidden; color: var(--ink-strong); text-overflow: ellipsis; white-space: nowrap; }
.equipment-health-head h4 { font-size: 15px; }
.equipment-admin-head h3 { font-size: 16px; }
.equipment-health-head small, .equipment-admin-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.equipment-health-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.equipment-health-summary > div { min-width: 0; padding: 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); }
.equipment-health-summary span, .equipment-health-summary strong { display: block; }
.equipment-health-summary span { color: var(--muted-2); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.equipment-health-summary strong { margin-top: 4px; overflow: hidden; color: var(--ink-strong); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-sensor-list { display: grid; gap: 0; margin-top: 13px; border-top: 1px solid var(--line-soft); }
.equipment-sensor-list > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid var(--line-soft); }
.equipment-sensor-list > div > span:first-child { display: flex; align-items: center; min-width: 0; gap: 7px; }
.equipment-sensor-list > div > span:first-child svg { flex: 0 0 auto; color: var(--brand-sky); }
.equipment-sensor-list b { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-sensor-values { display: grid; justify-items: end; min-width: 0; }
.equipment-sensor-values strong { color: var(--ink-strong); font-size: 11px; }
.equipment-sensor-values small { max-width: 230px; overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-sensor-list > p { margin: 14px 0 2px; color: var(--muted); font-size: 10px; }
.equipment-health-card footer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 13px; color: var(--muted-2); font-size: 8px; }
.equipment-health-card footer span:last-child { margin-left: auto; }
.equipment-report-link { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--brand-blue); font-weight: 800; }
.equipment-admin-card { min-width: 0; padding: 19px; }
.equipment-admin-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 17px 0 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.equipment-admin-facts div { min-width: 0; padding: 12px; }
.equipment-admin-facts div:nth-child(even) { border-left: 1px solid var(--line-soft); }
.equipment-admin-facts div:nth-child(n + 3) { border-top: 1px solid var(--line-soft); }
.equipment-admin-facts dt { color: var(--muted-2); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.equipment-admin-facts dd { margin: 3px 0 0; overflow: hidden; color: var(--ink-strong); font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.equipment-admin-sensors { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 13px; }
.equipment-admin-sensors > span:not(.muted-note) { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 99px; color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 700; }
.equipment-admin-sensors svg { width: 12px; height: 12px; color: var(--brand-sky); }
.equipment-empty { grid-column: 1 / -1; min-height: 360px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.equipment-empty .action-button { margin-top: 18px; }
.inline-empty, .empty-state { display: grid; place-items: center; text-align: center; color: var(--muted); }
.inline-empty { grid-column: 1 / -1; min-height: 190px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); }
.inline-empty svg { font-size: 26px; color: var(--brand-sky); }
.empty-state { min-height: 430px; }
.empty-state > span { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; color: var(--brand-blue); background: #eaf4fe; }
.empty-state > span svg { font-size: 29px; }
.empty-state h2 { margin: 17px 0 4px; color: var(--ink-strong); }
.empty-state p { margin: 0; }

/* Tables, gateways, alerts */
.table-panel { overflow: hidden; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px; border-bottom: 1px solid var(--line); }
.search-field { position: relative; flex: 0 1 380px; }
.search-field svg { position: absolute; left: 12px; top: 50%; color: var(--muted-2); transform: translateY(-50%); }
.search-field input { width: 100%; height: 38px; padding: 0 12px 0 37px; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--ink); background: var(--surface-soft); }
.search-field input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px rgba(46,133,223,.1); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 40px; padding: 0 15px; color: var(--muted-2); background: var(--surface-soft); text-align: left; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
td { height: 68px; padding: 10px 15px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--brand-blue) 3%, var(--surface)); }
.selectable-row { cursor: pointer; }
.selectable-row:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: -2px; background: color-mix(in srgb, var(--brand-blue) 5%, var(--surface)); }
.table-sensor { display: flex; align-items: center; gap: 10px; }
.table-sensor > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--brand-blue); background: #eaf4fe; }
.table-sensor strong, .table-sensor small { display: block; }
.table-sensor strong { color: var(--ink-strong); font-size: 11px; }
.table-sensor small { margin-top: 2px; color: var(--muted-2); font-size: 8px; }
.sensor-detail-link:hover strong { color: var(--brand-blue); }
.table-gateway { display: flex; align-items: center; gap: 8px; }
.table-gateway > svg { flex: 0 0 auto; width: 15px; height: 15px; color: var(--brand-sky); }
.table-gateway strong, .table-gateway small { display: block; }
.table-gateway strong { color: var(--ink-strong); font-size: 10px; }
.table-gateway small { margin-top: 2px; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.reading-value { color: var(--ink-strong); font-size: 14px; }
.reading-detail { display: block; max-width: 240px; margin-top: 2px; overflow: hidden; color: var(--muted-2); font-size: 8px; text-overflow: ellipsis; }
.table-empty { height: 180px; text-align: center; }
.gateway-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gateway-card { padding: 20px; }
.gateway-head { display: flex; align-items: center; justify-content: space-between; }
.gateway-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--brand-blue); background: #eaf4fe; }
.gateway-card h3 { margin: 2px 0 0; font-size: 18px; }
.gateway-slug { margin: 3px 0 0; color: var(--muted-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.gateway-details { display: grid; grid-template-columns: repeat(2, 1fr); margin: 19px 0 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.gateway-details div { padding: 13px; }
.gateway-details div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.gateway-details div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
.gateway-details dt { color: var(--muted-2); font-size: 8px; font-weight: 700; text-transform: uppercase; }
.gateway-details dd { margin: 3px 0 0; color: var(--ink-strong); font-size: 11px; font-weight: 750; }
.gateway-ups { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-top: 13px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-soft); }
.gateway-ups > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--brand-blue); background: var(--surface); }
.gateway-ups > div { display: grid; gap: 2px; min-width: 0; }
.gateway-ups small { color: var(--muted-2); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.gateway-ups strong { color: var(--ink-strong); font-size: 10px; }
.gateway-ups p { margin: 0; color: var(--muted); font-size: 8px; }
.gateway-topic { display: grid; gap: 4px; margin-top: 13px; }
.gateway-topic span { color: var(--muted-2); font-size: 8px; text-transform: uppercase; }
.gateway-topic code { overflow: hidden; padding: 8px 10px; border-radius: 7px; color: var(--brand-blue); background: var(--surface-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.page-heading-actions, .form-actions, .gateway-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.action-button, .small-button, .danger-button { min-height: 38px; padding: 0 14px; }
.small-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 10px; font-weight: 750; cursor: pointer; }
.small-button:hover { color: var(--brand-blue); border-color: color-mix(in srgb, var(--brand-blue) 40%, var(--line)); }
.danger-button { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.danger-button:hover { background: var(--danger-soft); }
.gateway-actions { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.gateway-trust { display: grid; gap: 7px; margin-top: 12px; }
.gateway-trust .status-pill { width: max-content; }
.gateway-trust p { margin: 0; color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.gateway-trust-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gateway-trust-row > span:first-child { color: var(--muted); font-size: 9px; font-weight: 700; }
.gateway-evidence-identity code { color: var(--ink); font-size: 8px; overflow-wrap: anywhere; white-space: normal; }
.page-notice { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; font-weight: 650; }
.page-notice.success { color: var(--success); background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 28%, var(--line)); }
.page-notice.warning { color: var(--warning); background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 28%, var(--line)); }
.page-notice a { text-decoration: underline; text-underline-offset: 2px; }
.page-notice.error { color: var(--danger); background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 28%, var(--line)); }
.admin-form-panel, .credential-panel { max-width: 920px; padding: 24px; }
.sensor-type-note { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.sensor-type-note > span { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; color: var(--brand-blue); background: var(--surface); }
.sensor-type-note strong, .sensor-type-note small { display: block; }
.sensor-type-note strong { color: var(--ink-strong); font-size: 11px; }
.sensor-type-note small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.admin-form { display: grid; gap: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.admin-form label { display: grid; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 750; }
.admin-form label > span, .client-choice-list legend { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: var(--surface); }
.admin-form input, .admin-form select { height: 42px; padding: 0 12px; }
.admin-form textarea { min-height: 96px; padding: 10px 12px; line-height: 1.45; resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-blue) 12%, transparent); }
.admin-form input[readonly] { color: var(--muted); background: var(--surface-soft); cursor: not-allowed; }
.admin-form label small, .muted-note { color: var(--muted-2); font-size: 9px; font-weight: 500; }
.alert-routing-panel { max-width: 980px; }
.alert-delivery-summary { display: flex; gap: 18px; margin: -4px 0 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.alert-delivery-summary strong { color: var(--ink-strong); font-size: 13px; }
.alert-delivery-summary .has-failures, .alert-delivery-summary .has-failures strong { color: var(--danger); }
.alert-routing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-form .alert-route-card { align-content: start; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.alert-route-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; }
.alert-route-icon.service { color: var(--danger); background: var(--danger-soft); }
.alert-route-icon.maintenance { color: var(--warning); background: var(--warning-soft); }
.alert-route-copy { display: grid; gap: 4px; min-height: 70px; }
.admin-form .alert-route-copy strong { color: var(--ink-strong); font-size: 13px; letter-spacing: 0; text-transform: none; }
.admin-form .alert-route-copy small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-form .alert-route-help { color: var(--muted); font-size: 9px; line-height: 1.45; }
.form-guidance { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 9px; color: var(--muted); background: var(--surface-soft); font-size: 10px; line-height: 1.5; }
.form-guidance svg { flex: 0 0 auto; margin-top: 1px; color: var(--brand-blue); }
.collector-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.collector-key > span, .collector-key > small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; font-weight: 700; }
.collector-key > span { letter-spacing: .06em; text-transform: uppercase; }
.collector-key code { min-width: 0; overflow-wrap: anywhere; color: var(--brand-blue); }
.client-choice-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.client-choice-list legend { padding: 0 6px; }
.client-choice-list label { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--surface-soft); }
.client-choice-list input { width: 17px; height: 17px; }
.client-choice-list strong, .client-choice-list small { display: block; }
.client-choice-list strong { color: var(--ink-strong); font-size: 11px; }
.equipment-sensor-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.equipment-sensor-choices label { cursor: pointer; }
.equipment-sensor-choices label:has(input:checked) { border-color: color-mix(in srgb, var(--brand-blue) 45%, var(--line)); background: color-mix(in srgb, var(--brand-blue) 7%, var(--surface)); }
.form-help { display: flex; align-items: flex-start; gap: 7px; margin: -10px 0 0; color: var(--muted); font-size: 9px; }
.form-help svg { flex: 0 0 auto; margin-top: 2px; color: var(--brand-blue); }
.credential-list { display: grid; gap: 0; margin: 0 0 22px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.credential-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.credential-list > div:last-child { border-bottom: 0; }
.credential-list dt { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.credential-list dd { min-width: 0; margin: 0; color: var(--ink-strong); font-size: 11px; }
.credential-list code { overflow-wrap: anywhere; color: var(--brand-blue); }
.credential-secret dd { display: flex; align-items: center; gap: 10px; }
.credential-secret code { flex: 1; padding: 10px; border-radius: 7px; background: var(--surface-soft); }
.text-end { text-align: right; }
.sensor-detail-summary { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.4fr); align-items: center; gap: 28px; margin-bottom: 14px; padding: 22px; }
.sensor-detail-identity { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sensor-detail-icon { display: grid; place-items: center; flex: 0 0 auto; width: 54px; height: 54px; border-radius: 15px; color: var(--brand-blue); background: #eaf4fe; }
.sensor-detail-icon svg { width: 25px; height: 25px; }
.sensor-detail-identity h3 { margin: 2px 0 7px; overflow-wrap: anywhere; color: var(--ink-strong); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.sensor-detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.sensor-detail-facts div { min-width: 0; padding: 12px; }
.sensor-detail-facts div:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line-soft); }
.sensor-detail-facts div:nth-child(n + 4) { border-top: 1px solid var(--line-soft); }
.sensor-detail-facts dt { color: var(--muted-2); font-size: 8px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.sensor-detail-facts dd { margin: 3px 0 0; overflow: hidden; color: var(--ink-strong); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.sensor-detail-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); gap: 14px; }
.sensor-readings-panel, .raw-payload-panel { min-width: 0; padding: 20px; }
.sensor-reading-list { display: grid; gap: 8px; margin-top: 17px; }
.sensor-reading-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); }
.sensor-reading-item > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--brand-blue); background: var(--surface); }
.sensor-reading-item small, .sensor-reading-item strong { display: block; }
.sensor-reading-item small { color: var(--muted-2); font-size: 8px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.sensor-reading-item strong { margin-top: 2px; color: var(--ink-strong); font-size: 13px; }
.sensor-reading-item code { color: var(--muted); font-size: 9px; }
.raw-payload-panel pre { max-height: 520px; margin: 17px 0 0; overflow: auto; padding: 16px; border: 1px solid var(--line-soft); border-radius: 10px; color: var(--ink); background: var(--surface-soft); font-size: 10px; line-height: 1.65; tab-size: 2; }
.raw-payload-panel code { white-space: pre-wrap; overflow-wrap: anywhere; }
.compact-empty { min-height: 150px; }
.alert-list-panel { overflow: hidden; }
.alert-list-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.alert-list-head h3, .alert-list-head p { margin: 0; }
.alert-list-head p { color: var(--muted); font-size: 9px; }
.alert-bulk-tools { display: flex; align-items: center; gap: 12px; padding: 10px 19px; border-bottom: 1px solid var(--line-soft); background: var(--surface-soft); }
.alert-select-all { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-strong); font-size: 10px; font-weight: 750; cursor: pointer; }
.alert-select-all input, .alert-select-control input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand-blue); cursor: pointer; }
.alert-selection-count { margin-right: auto; color: var(--muted-2); font-size: 9px; }
.alert-bulk-tools button:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.alert-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 17px 19px; border-bottom: 1px solid var(--line-soft); }
.alert-row:last-child { border-bottom: 0; }
.alert-row-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--warning); background: var(--warning-soft); }
.alert-row.resolved .alert-row-icon { color: var(--success); background: var(--success-soft); }
.alert-row-main > div:first-child { display: flex; align-items: center; gap: 8px; }
.severity-label { color: var(--muted-2); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.alert-class-label { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 7px; font-size: 8px; font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: .07em; }
.alert-class-label.service { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.alert-class-label.maintenance { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
.equipment-sensor-state { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.alert-row h4 { margin: 6px 0 1px; color: var(--ink-strong); font-size: 12px; }
.alert-row p { margin: 0; color: var(--muted); font-size: 10px; }
.alert-row small, .ack-by { color: var(--muted-2); font-size: 8px; }
.alert-archive-form { margin: 0; justify-self: end; }
.alert-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.alert-select-control { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; }
.alert-select-control:hover { border-color: var(--brand-blue); }
.archive-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; }
.alert-acknowledgement, .alert-awaiting-response, .alert-missing-response { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--success); border-radius: 0 8px 8px 0; background: var(--success-soft); color: var(--ink); }
.alert-acknowledgement > strong, .alert-acknowledgement > span, .alert-awaiting-response > strong, .alert-awaiting-response > span, .alert-missing-response > strong, .alert-missing-response > span { display: block; }
.alert-acknowledgement > span, .alert-awaiting-response > span, .alert-missing-response > span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.alert-acknowledgement > p { margin-top: 5px; color: var(--ink); }
.alert-acknowledgement strong { color: var(--ink-strong); }
.alert-awaiting-response { border-left-color: var(--warning); background: var(--warning-soft); }
.alert-missing-response { border-left-color: var(--muted-2); background: var(--surface-soft); }
.acknowledge-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--surface); box-shadow: 0 24px 70px rgba(5, 22, 38, .28); }
.acknowledge-dialog::backdrop { background: rgba(5, 19, 33, .62); backdrop-filter: blur(3px); }
.acknowledge-dialog form { display: grid; gap: 16px; padding: 22px; }
.acknowledge-dialog header { display: flex; justify-content: space-between; gap: 18px; }
.acknowledge-dialog h2, .acknowledge-dialog p { margin: 0; }
.acknowledge-dialog h2 { color: var(--ink-strong); font-size: 17px; }
.acknowledge-dialog header p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.acknowledge-dialog label { display: grid; gap: 7px; color: var(--ink-strong); font-size: 11px; font-weight: 700; }
.acknowledge-dialog textarea { min-height: 120px; padding: 11px 12px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; outline: none; color: var(--ink); background: var(--surface); }
.acknowledge-dialog textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-blue) 12%, transparent); }
.acknowledge-dialog .form-actions { margin-top: 0; }
.acknowledge-error { color: var(--danger) !important; font-size: 10px; }

.equipment-report-page { min-height: 100vh; background: var(--body); }
.equipment-report-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 50px; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.report-toolbar-actions { display: flex; gap: 8px; }
.report-ranges { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.report-ranges a { padding: 7px 10px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 700; text-decoration: none; }
.report-ranges a.active { color: #fff; background: var(--primary); }
.report-download-error { margin: -6px 0 14px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--line)); border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 10px; }
.equipment-report { padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.report-heading, .report-equipment-heading, .report-section-heading, .report-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.report-heading { padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.report-brand { display: flex; align-items: center; gap: 11px; }
.report-brand img { width: 42px; height: 42px; object-fit: contain; }
.report-brand div, .report-generated { display: grid; gap: 2px; }
.report-brand strong { color: var(--ink-strong); font-size: 17px; }
.report-brand span, .report-generated span { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.report-brand-banner { display: flex; align-items: center; justify-content: space-between; gap: 25px; min-height: 68px; padding: 13px 18px; border-radius: 12px; color: #fff; background: linear-gradient(110deg, #0d2e4c, #124f7c); }
.report-brand-lockup { display: flex; align-items: center; gap: 11px; }
.report-brand-lockup img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.report-brand-lockup strong { font-size: 20px; letter-spacing: -.025em; }
.report-brand-context { display: grid; gap: 2px; text-align: right; }
.report-brand-context strong { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.report-brand-context span { color: #a9c9df; font-size: 8px; text-transform: uppercase; letter-spacing: .12em; }
.report-generated { text-align: right; }
.report-generated strong { color: var(--ink-strong); font-size: 10px; }
.report-equipment-heading { padding: 28px 0 20px; }
.report-equipment-heading h1 { margin: 3px 0; color: var(--ink-strong); font-size: 26px; }
.report-equipment-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.report-context-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.report-context-grid > div { display: grid; gap: 3px; min-width: 0; padding: 13px 14px; border-left: 1px solid var(--line); background: var(--surface-soft); }
.report-context-grid > div:first-child { border-left: 0; }
.report-context-grid span { color: var(--brand-blue); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.report-context-grid strong, .report-context-grid small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-context-grid strong { color: var(--ink-strong); font-size: 10px; }
.report-context-grid small { color: var(--muted); font-size: 8px; }
.report-result-panel { position: relative; margin-top: 20px; padding: 20px; border: 1px solid var(--line); border-left: 4px solid var(--brand-blue); border-radius: 12px; background: var(--surface-soft); break-inside: avoid-page; }
.report-result-panel.healthy { border-left-color: var(--success); }
.report-result-panel.warning { border-left-color: var(--warning); }
.report-result-panel.alert { border-left-color: var(--danger); }
.report-result-panel.retired { border-left-color: var(--muted); }
.report-result-panel > .status-pill { position: absolute; top: 20px; right: 20px; }
.report-result-copy { padding-right: 130px; }
.report-result-copy h2 { margin: 3px 0 4px; color: var(--ink-strong); font-size: 21px; }
.report-result-copy > p:last-child { max-width: 850px; margin: 0 0 15px; color: var(--ink); font-size: 10px; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.report-summary-grid > div { display: grid; gap: 4px; padding: 15px; border-left: 1px solid var(--line); background: var(--surface); }
.report-summary-grid > div:first-child { border-left: 0; }
.report-summary-grid span, .report-summary-grid small { color: var(--muted); font-size: 9px; }
.report-summary-grid strong { color: var(--ink-strong); font-size: 14px; }
.report-verification-summary { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.report-verification-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; }
.report-verification-summary-heading > div { display: grid; gap: 2px; }
.report-verification-summary-heading strong { color: var(--ink-strong); font-size: 10px; }
.report-verification-summary-heading small, .report-verification-summary-heading > span { color: var(--muted); font-size: 8px; }
.report-verification-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-top: 1px solid var(--line); background: var(--line); }
.report-verification-strip > div { display: grid; gap: 2px; min-width: 0; padding: 9px 12px; background: var(--surface-soft); box-shadow: inset 0 2px 0 var(--muted); }
.report-verification-strip > div.healthy { box-shadow: inset 0 2px 0 var(--success); }
.report-verification-strip > div.warning { box-shadow: inset 0 2px 0 var(--warning); }
.report-verification-strip > div.alert { box-shadow: inset 0 2px 0 var(--danger); }
.report-verification-strip span { overflow: hidden; color: var(--muted); font-size: 7px; font-weight: 800; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.report-verification-strip strong { overflow: hidden; color: var(--ink-strong); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-verification-details { margin: 10px 12px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); }
.report-verification-details summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 12px; color: var(--ink-strong); cursor: pointer; list-style: none; }
.report-verification-details summary::-webkit-details-marker { display: none; }
.report-verification-details summary::after { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--brand-blue); font-size: 15px; font-weight: 700; content: "+"; }
.report-verification-details[open] summary::after { content: "−"; }
.report-verification-details summary:hover { background: color-mix(in srgb, var(--brand-blue) 4%, transparent); }
.report-verification-details summary:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
.report-verification-details summary span { font-size: 9px; font-weight: 800; }
.report-verification-details summary small { color: var(--muted); font-size: 8px; }
.report-verification-details-body { padding: 12px; border-top: 1px solid var(--line-soft); }
.report-verification-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-verification-grid > article { padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 10px; background: var(--surface); }
.report-verification-grid > article.healthy { border-left-color: var(--success); }
.report-verification-grid > article.warning { border-left-color: var(--warning); }
.report-verification-grid > article.alert { border-left-color: var(--danger); }
.report-verification-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-verification-grid span { color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.report-verification-grid strong { color: var(--ink-strong); font-size: 11px; }
.report-verification-grid p { margin: 7px 0 0; color: var(--ink); font-size: 8px; line-height: 1.45; }
.report-stream-list { display: grid; gap: 9px; margin-top: 12px; }
.report-stream-list > article { padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.report-stream-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.report-stream-heading > div { display: grid; gap: 2px; }
.report-stream-heading strong { color: var(--ink-strong); font-size: 10px; }
.report-stream-heading small { color: var(--muted); font-size: 8px; }
.report-stream-list dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 15px; margin: 11px 0 0; }
.report-stream-list dl > div { min-width: 0; }
.report-stream-list dt { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.report-stream-list dd { margin: 3px 0 0; color: var(--ink); font-size: 8px; overflow-wrap: anywhere; }
.report-hash { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.report-integrity-badge { display: inline-flex; align-items: center; width: fit-content; padding: 3px 6px; border-radius: 999px; color: var(--muted); background: var(--line-soft); font-size: 7px; font-weight: 800; white-space: nowrap; }
.report-integrity-badge.verified { color: var(--success); background: var(--success-soft); }
.report-integrity-badge.legacy { color: var(--warning); background: var(--warning-soft); }
.report-integrity-badge.invalid { color: var(--danger); background: var(--danger-soft); }
.report-verification-summary > .report-verification-notice { margin: 10px 12px 0; }
.report-verification-notice { margin: 12px 0 0; padding: 10px 12px; border-radius: 8px; color: var(--ink); background: color-mix(in srgb, var(--brand-blue) 7%, var(--surface)); font-size: 8px; line-height: 1.45; }
.report-exclusions { padding: 16px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--danger) 4%, var(--surface)); }
.report-section { margin-top: 28px; break-inside: avoid-page; }
.report-section-heading { margin-bottom: 11px; }
.report-section-heading h2 { margin: 2px 0 0; color: var(--ink-strong); font-size: 16px; }
.report-section-heading > span { color: var(--muted); font-size: 10px; }
.equipment-temperature-report-chart { min-height: 300px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-soft); }
.report-sensor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.report-sensor-grid article { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.report-sensor-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.report-sensor-grid article > p { margin: 4px 0 12px; color: var(--muted); font-size: 9px; }
.report-sensor-grid dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.report-sensor-grid dl div { display: grid; gap: 3px; }
.report-sensor-grid dt { color: var(--muted); font-size: 8px; }
.report-sensor-grid dd { margin: 0; color: var(--ink-strong); font-size: 10px; font-weight: 700; }
.report-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 11px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.report-table th { padding: 9px 11px; color: var(--muted); background: var(--surface-soft); text-align: left; text-transform: uppercase; letter-spacing: .06em; }
.report-table td { padding: 11px; border-top: 1px solid var(--line-soft); color: var(--ink); vertical-align: top; }
.report-table td strong, .report-table td small { display: block; }
.report-table td small { margin-top: 3px; color: var(--muted); }
.report-table td p { max-width: 330px; margin: 6px 0 0; color: var(--ink); line-height: 1.45; }
.report-table.compact td { padding-block: 8px; }
.report-empty { padding: 20px !important; color: var(--muted); text-align: center; }
.report-methodology { break-inside: auto; }
.report-methodology-list { margin: 14px 0 0; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.report-methodology-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); border-top: 1px solid var(--line-soft); }
.report-methodology-list > div:first-child { border-top: 0; }
.report-methodology-list dt, .report-methodology-list dd { padding: 10px 12px; }
.report-methodology-list dt { color: var(--muted); background: var(--surface-soft); font-size: 9px; font-weight: 800; }
.report-methodology-list dd { margin: 0; color: var(--ink); font-size: 9px; }
.report-footer { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.retired-equipment-panel { margin-top: 18px; padding: 18px; }
.retired-equipment-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
.retired-equipment-list > a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-soft); }
.retired-equipment-list > a:hover { border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--line)); }
.retired-equipment-list > a > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--muted); background: var(--surface); }
.retired-equipment-list > a > div { display: grid; min-width: 0; }
.retired-equipment-list strong { overflow: hidden; color: var(--ink-strong); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.retired-equipment-list small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.retired-equipment-list > a > svg { color: var(--brand-blue); }

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  html[data-theme] {
    color-scheme: light;
    --ink: #173553;
    --ink-strong: #102a43;
    --muted: #526b7c;
    --muted-2: #728897;
    --surface: #fff;
    --surface-soft: #f4f7f9;
    --body: #fff;
    --line: #cfd9e0;
    --line-soft: #dce4e9;
  }
  body.equipment-report-page { color: #172b3a; background: #fff; }
  .no-print { display: none !important; }
  .equipment-report-shell { width: 100%; padding: 0; }
  .equipment-report { padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .report-context-grid, .report-result-panel, .report-summary-grid, .report-verification-summary, .report-verification-details, .report-verification-grid > article, .report-stream-list > article, .report-sensor-grid article, .report-table-wrap, .report-methodology-list { border-color: #cfd9e0; }
  .report-table-wrap { overflow: visible; }
  .report-table th { color: #425b6c; background: #eef3f6; }
  .report-table td { color: #172b3a; border-color: #dce4e9; }
  .report-brand-banner { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-result-panel, .report-context-grid > div, .report-summary-grid > div, .report-verification-strip > div, .report-verification-grid > article, .report-integrity-badge, .report-methodology-list dt { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .report-verification-details { margin-inline: 0; }
  .report-verification-details > summary { display: none; }
  .report-verification-details > :not(summary) { display: block !important; }
  .report-alert-section { break-before: page; }
  .report-table tr { break-inside: avoid; }
}
.ack-by { text-align: right; }
.portal-footer { display: flex; justify-content: space-between; padding: 18px 30px 24px; color: var(--muted-2); font-size: 9px; }
.portal-footer a { color: var(--brand-blue); }

html[data-theme="dark"] .stat-icon.blue, html[data-theme="dark"] .sensor-symbol, html[data-theme="dark"] .equipment-symbol, html[data-theme="dark"] .table-sensor > span, html[data-theme="dark"] .gateway-icon, html[data-theme="dark"] .empty-state > span { background: #173d5d; }
html[data-theme="dark"] .stat-icon.cyan { background: #164153; }
html[data-theme="dark"] .status-pill.acknowledged { background: #173d5d; }

@media (min-width: 861px) {
  body.sidebar-condensed .sidebar { width: var(--sidebar-collapsed-width); }
  body.sidebar-condensed .main-column { margin-left: var(--sidebar-collapsed-width); }
  body.sidebar-condensed .sidebar-brand { justify-content: center; padding-inline: 10px; }
  body.sidebar-condensed .sidebar-brand-name,
  body.sidebar-condensed .nav-link > span:not(.account-initial),
  body.sidebar-condensed .nav-link > b,
  body.sidebar-condensed .sidebar-health,
  body.sidebar-condensed .sidebar-user > div,
  body.sidebar-condensed .sidebar-user > form { display: none; }
  body.sidebar-condensed .side-nav { padding-inline: 10px; }
  body.sidebar-condensed .nav-label { display: flex; align-items: center; justify-content: center; height: 18px; margin: 10px 0 7px; overflow: hidden; color: transparent; font-size: 0; }
  body.sidebar-condensed .nav-label::after { width: 24px; height: 1px; background: rgba(255,255,255,.13); content: ""; }
  body.sidebar-condensed .nav-label-spaced { margin-top: 24px; }
  body.sidebar-condensed .nav-link { justify-content: center; gap: 0; padding-inline: 0; }
  body.sidebar-condensed .nav-link.active { box-shadow: inset 3px 0 0 #64c3f2; }
  body.sidebar-condensed .sidebar-user { justify-content: center; padding-inline: 10px; }
}

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sensor-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
  .health-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 25px; }
  .health-panel .panel-head { grid-column: 1 / -1; }
  .sensor-detail-summary { grid-template-columns: 1fr; }
  .equipment-health-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-scrim { position: fixed; z-index: 45; inset: 0; background: rgba(7,23,38,.55); backdrop-filter: blur(2px); }
  body.menu-open .sidebar-scrim { display: block; }
  .sidebar-close { display: grid; place-items: center; }
  .main-column { margin-left: 0; }
  .topbar { padding: 0 18px; }
  .page-main { padding: 22px 18px; }
  .portal-footer { padding-inline: 18px; }
  .gateway-grid { grid-template-columns: 1fr; }
  .equipment-admin-grid { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .sensor-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .login-shell { display: block; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; padding: 35px 23px; }
  .mobile-login-logo { display: flex; margin-bottom: 48px; }
  .updated-time { display: none; }
  .topbar-kicker { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .stats-grid, .sensor-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 92px; }
  .attention-banner { grid-template-columns: auto 1fr auto; }
  .attention-banner .secondary-button, .attention-banner > .status-pill { grid-column: 2; justify-self: start; }
  .banner-arrow { grid-column: 3; grid-row: 1; }
  .chart-wrap { min-height: 255px; }
  .health-panel { display: block; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .search-field { flex-basis: auto; }
  .alert-row { grid-template-columns: auto 1fr; align-items: flex-start; }
  .alert-row > .secondary-button, .alert-row > .ack-by, .alert-row > .alert-archive-form, .alert-row > .alert-row-actions { grid-column: 2; justify-self: start; }
  .alert-bulk-tools { align-items: flex-start; flex-wrap: wrap; }
  .alert-selection-count { flex: 1 1 auto; }
  .form-grid, .client-choice-list, .equipment-sensor-choices, .alert-routing-grid { grid-template-columns: 1fr; }
  .equipment-sensor-list > div { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; padding: 8px 0; }
  .equipment-sensor-values { grid-column: 1 / -1; grid-row: 2; justify-items: start; padding-left: 22px; }
  .equipment-sensor-list > div > .status-pill { grid-column: 2; grid-row: 1; }
  .sensor-detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sensor-detail-facts div { border-top: 1px solid var(--line-soft); border-left: 0 !important; }
  .sensor-detail-facts div:nth-child(-n + 2) { border-top: 0; }
  .sensor-detail-facts div:nth-child(even) { border-left: 1px solid var(--line-soft) !important; }
  .credential-list > div { grid-template-columns: 1fr; gap: 5px; }
  .credential-secret dd { align-items: stretch; flex-direction: column; }
  .equipment-report-shell { width: min(100% - 18px, 1180px); padding-top: 10px; }
  .report-toolbar { align-items: stretch; flex-direction: column; }
  .report-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .report-ranges { justify-content: center; overflow-x: auto; }
  .equipment-report { padding: 19px 15px; }
  .report-heading, .report-equipment-heading, .report-section-heading { align-items: flex-start; }
  .report-context-grid, .report-summary-grid, .report-verification-grid, .report-sensor-grid { grid-template-columns: 1fr; }
  .report-verification-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-verification-summary-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .report-context-grid > div { border-top: 1px solid var(--line); border-left: 0; }
  .report-context-grid > div:first-child { border-top: 0; }
  .report-result-panel > .status-pill { position: static; margin-bottom: 12px; }
  .report-result-copy { padding-right: 0; }
  .report-methodology-list > div { grid-template-columns: 1fr; }
  .report-stream-list dl { grid-template-columns: 1fr; }
  .retired-equipment-list { grid-template-columns: 1fr; }
  .report-summary-grid > div { border-top: 1px solid var(--line); border-left: 0; }
  .report-summary-grid > div:first-child { border-top: 0; }
  .portal-footer { flex-direction: column; gap: 5px; }
}
@media (max-width: 460px) {
  .live-indicator { display: none; }
  .page-main { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .stats-grid { gap: 9px; }
  .trend-panel, .health-panel { padding: 15px; }
  .chart-summary p { display: none; }
  .gateway-details { grid-template-columns: 1fr; }
  .gateway-details div:nth-child(odd) { border-right: 0; }
  .gateway-details div:nth-child(n+2) { border-top: 1px solid var(--line-soft); }
  .report-verification-strip { grid-template-columns: 1fr; }
}
.mfa-setup-key {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  overflow-wrap: anywhere;
  border: 1px solid rgba(18, 79, 159, 0.2);
  border-radius: 0.75rem;
  background: rgba(18, 79, 159, 0.06);
  letter-spacing: 0.08em;
}

.mfa-qr {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.mfa-qr img {
  width: min(240px, 100%);
  height: auto;
  padding: 0.6rem;
  border: 1px solid rgba(18, 79, 159, 0.2);
  border-radius: 0.9rem;
  background: #fff;
}

.mfa-manual {
  margin-bottom: 1rem;
  color: var(--muted, #526173);
}

.mfa-uri {
  margin-bottom: 1rem;
  color: var(--muted, #526173);
}

.mfa-uri code {
  display: block;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
}
