:root { color-scheme: dark; }
.dashboard-shell { min-height: 100dvh; font-family: var(--ng-font-sans); font-size: 15px; line-height: 1.5; background: radial-gradient(900px 500px at 80% -10%, #142946 0, #08111f 62%); }
.skip-link { position: fixed; left: 10px; top: -60px; z-index: 100; background: #fff; color: #06101f; padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { top: 10px; }
.dashboard-topbar { position: sticky; top: 0; z-index: 10; }
.dashboard-top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dashboard-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 18px; max-width: 1240px; margin: 0 auto; padding: 18px 16px 48px; }
.dashboard-sidebar { position: sticky; top: 76px; align-self: start; border: 1px solid var(--ng-line, #263950); border-radius: 16px; padding: 14px; background: rgba(12,24,42,.78); }
.dashboard-identity { display: flex; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 1px solid #22334c; min-width: 0; }
.dashboard-identity > div { min-width: 0; }
.dashboard-identity b, .dashboard-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-identity small { color: var(--ng-muted, #93a4c2); font-size: 11px; margin-top: 2px; }
.dashboard-avatar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dashboard-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: rgba(91,140,255,.2); border: 1px solid #3b5d8b; font-weight: 800; }
.dashboard-nav { display: grid; gap: 3px; margin-top: 12px; }
.dashboard-nav a { color: #c6d5ea; text-decoration: none; padding: 9px 10px; border-radius: 9px; font-size: 13px; }
.dashboard-nav a:hover, .dashboard-nav a:focus-visible, .dashboard-nav a[aria-current="page"] { background: rgba(91,140,255,.16); color: #fff; outline: none; }
.dashboard-main { min-width: 0; }
.dashboard-loading { padding: 40px 10px; color: #93a4c2; }
.dashboard-hero { border: 1px solid #29415f; border-radius: 18px; padding: 20px; background: linear-gradient(130deg, rgba(19,44,76,.9), rgba(10,20,36,.88)); }
.dashboard-hero h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 36px); }
.dashboard-hero p { max-width: 780px; color: #b7c7dc; }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.dashboard-card { grid-column: span 4; border: 1px solid #263950; border-radius: 14px; padding: 14px; background: rgba(12,24,42,.75); min-width: 0; }
.dashboard-card--wide { grid-column: span 8; }
.dashboard-card--full { grid-column: 1 / -1; }
.dashboard-card b.kpi { display: block; font-size: 28px; color: #ffd479; }
.dashboard-card h2, .dashboard-card h3 { margin: 0 0 8px; font-size: 15px; }
.dashboard-card small, .dashboard-muted { color: #90a4c2; }
.dashboard-list { display: grid; gap: 7px; margin: 8px 0 0; padding: 0; list-style: none; }
.dashboard-list li { border-bottom: 1px solid #1d2e46; padding: 8px 0; min-width: 0; }
.dashboard-list li:last-child { border-bottom: 0; }
.dashboard-list b, .dashboard-list span { overflow-wrap: anywhere; }
.dashboard-empty { color: #9db0c8; padding: 10px 0; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.dashboard-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.dashboard-toolbar input, .dashboard-toolbar select { min-height: 38px; border: 1px solid #2a405e; border-radius: 9px; background: #0a1627; color: #dce8f8; padding: 7px 9px; }
.dashboard-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.dashboard-form label { display: grid; gap: 5px; color: #9db0c8; font-size: 12px; }
.dashboard-form input, .dashboard-form select, .dashboard-form textarea { width: 100%; min-height: 44px; border: 1px solid #2a405e; border-radius: 9px; background: #0a1627; color: #dce8f8; padding: 9px; font: inherit; font-size: 16px; }
.dashboard-form textarea { min-height: 96px; resize: vertical; }
.dashboard-form input:focus-visible, .dashboard-form select:focus-visible, .dashboard-form textarea:focus-visible { outline: 2px solid #8ec5ff; outline-offset: 2px; }
.dashboard-form__wide { grid-column: 1 / -1; }
.dashboard-table-wrap { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.dashboard-table th, .dashboard-table td { text-align: left; padding: 8px; border-bottom: 1px solid #1d2e46; vertical-align: top; }
.dashboard-table th { color: #91a4c0; font-weight: 600; }
.dashboard-lock { border: 1px dashed #3b5677; border-radius: 12px; padding: 14px; color: #b6c8df; }
.dashboard-lock a { color: #9bd8ff; }
.dashboard-pill { display: inline-block; border: 1px solid #34526f; border-radius: 999px; padding: 2px 7px; font-size: 10px; color: #a7d8f3; }
.dashboard-danger { color: #ff9daa; }
@media (max-width: 850px) {
  .dashboard-layout { grid-template-columns: 1fr; padding: 12px 10px 40px; }
  .dashboard-sidebar { position: static; }
  .dashboard-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-card, .dashboard-card--wide { grid-column: 1 / -1; }
  .dashboard-form { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .dashboard-topbar { padding: 9px 10px; }
  .dashboard-top-actions .ng-btn { padding: 7px 8px; }
  .dashboard-identity { padding-bottom: 9px; }
  .dashboard-nav { grid-template-columns: 1fr 1fr; gap: 2px; }
  .dashboard-nav a { padding: 8px 7px; font-size: 12px; }
  .dashboard-table { display: block; overflow-x: auto; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

.dashboard-dialog { width:min(460px,92vw); border:1px solid #3b5677; border-radius:16px; padding:18px; background:#0d1a2c; color:#dce8f8; }
.dashboard-dialog::backdrop { background:rgba(0,0,0,.7); }
.dashboard-dialog h2 { margin-top:0; font-size:20px; }
.dashboard-danger { color:#ff9daa; border-color:#7a2632; }

/* Local, opt-in dashboard economy mode. Does not touch the map, WSS or alerts. */
.ng-low-data.dashboard-shell { background: #08111f; }
.ng-low-data .dashboard-hero,
.ng-low-data .dashboard-card { background: #0b1423; }
.ng-low-data .dashboard-hero { background: #0f1a2c; }
.ng-low-data * { animation: none !important; transition: none !important; }
