:root {
  --bg: #0c1018;
  --surface: #141924;
  --surface2: #1b2230;
  --border: #2c3548;
  --text: #e9eef7;
  --muted: #8b96ab;
  --accent: #5b8def;
  --accent2: #7c5cff;
  --green: #3dd68c;
  --amber: #f5b942;
  --red: #f07178;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.28);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "Segoe UI Mono", ui-monospace, Consolas, monospace;
  font-family: var(--font);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 42% at 0% -8%, rgba(91, 141, 239, 0.1), transparent 52%),
    radial-gradient(ellipse 48% 36% at 100% 0%, rgba(124, 92, 255, 0.07), transparent 48%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  gap: .65rem;
  align-items: center;
  padding: 1.1rem 1rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand h1 {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-brand .subtitle {
  margin: .1rem 0 0;
  color: var(--muted);
  font-size: .72rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .75rem .55rem 1rem;
  overflow-y: auto;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.nav-group[hidden] { display: none; }
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: .48rem .55rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-group-toggle:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.04);
}
.nav-group[open] .nav-group-toggle {
  color: var(--text);
  background: rgba(91, 141, 239, .08);
  border-color: rgba(91, 141, 239, .18);
}
.nav-group-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  flex-shrink: 0;
  border-radius: 6px;
  background: rgba(255,255,255,.05);
  color: var(--muted);
  transition: background .15s ease, color .15s ease;
}
.nav-group-icon svg {
  width: .95rem;
  height: .95rem;
  display: block;
}
.nav-group-toggle:hover .nav-group-icon,
.nav-group[open] .nav-group-toggle .nav-group-icon {
  color: var(--accent);
  background: rgba(91, 141, 239, .16);
}
.nav-group-label {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.nav-group-chevron {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .55;
  transition: transform .15s ease, opacity .15s ease;
  flex-shrink: 0;
  margin-left: auto;
}
.nav-group-toggle:hover .nav-group-chevron,
.nav-group[open] .nav-group-chevron {
  opacity: .85;
}
.nav-group:not([open]) .nav-group-chevron {
  transform: rotate(-90deg);
}
.nav-group:not([open]) .nav-group-items {
  display: none;
}
.nav-group-items {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .15rem 0 .2rem .2rem;
  margin-left: .7rem;
  border-left: 1px solid rgba(42, 49, 68, .9);
}
.nav-group.has-active .nav-group-label {
  color: var(--text);
}
.nav-group.has-active:not([open]) .nav-group-toggle {
  color: var(--text);
}
.nav-group.has-active:not([open]) .nav-group-icon {
  color: var(--accent);
  background: rgba(91, 141, 239, .16);
}

.nav-subgroup {
  display: flex;
  flex-direction: column;
  gap: .05rem;
  margin: .15rem 0;
}
.nav-subgroup-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: left;
  padding: .35rem .55rem;
  border-radius: 8px;
  cursor: pointer;
}
.nav-subgroup-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}
.nav-subgroup[open] .nav-subgroup-toggle {
  color: var(--text);
}
.nav-subgroup-label { flex: 1; }
.nav-subgroup:not([open]) .nav-subgroup-items { display: none; }
.nav-subgroup:not([open]) .nav-group-chevron { transform: rotate(-90deg); }
.nav-subgroup-items {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .1rem 0 .15rem .55rem;
  margin-left: .55rem;
  border-left: 1px solid rgba(42, 49, 68, .75);
}
.nav-subgroup-items .tab {
  font-size: .8rem;
  padding-left: .55rem;
}

.main-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  max-width: calc(100vw - 220px);
}

.main-shell .header {
  margin-bottom: 1rem;
}

.header-title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.header-title .muted-note {
  margin: .2rem 0 0;
  font-size: .82rem;
}

.app { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

.main-shell > .header,
.main-shell > .banner,
.main-shell > .panel,
.main-shell > .footer {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.main-shell > .header {
  margin-top: 1.25rem;
}

.main-shell > .footer {
  margin-bottom: 1.25rem;
  margin-top: auto;
  padding-top: 1rem;
}

.header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}

.header-clock {
  display: grid;
  grid-template-columns: repeat(5, minmax(4.25rem, 1fr));
  gap: .45rem;
  padding: .55rem .75rem;
  background: color-mix(in srgb, var(--surface2) 88%, #000);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 10px;
  min-width: 27rem;
  font-family: var(--font-mono);
  box-shadow: 0 0 0 1px rgba(91, 141, 239, 0.08);
}

.header-clock-zone {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .12rem;
  line-height: 1.15;
}

.header-clock-zone.is-primary .header-clock-time {
  font-size: 1.28rem;
}

.header-clock-time {
  font-variant-numeric: tabular-nums;
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
}

.header-clock-label {
  font-size: .64rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: right;
}

.brand { display: flex; gap: .75rem; align-items: center; }
.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
h1 { margin: 0; font-size: 1.35rem; font-weight: 700; }
.subtitle { margin: .15rem 0 0; color: var(--muted); font-size: .85rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: end;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
input[type=date], select {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .5rem .65rem;
  border-radius: 8px;
  font-size: .9rem;
}
.tech-select { min-width: 200px; }

.btn {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .55rem 1rem;
  font-weight: 600;
  cursor: pointer;
  font-size: .875rem;
  font-family: inherit;
  transition: transform .14s ease, filter .14s ease, color .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent) 100%);
  color: #fff;
}
.btn:not(:disabled):hover { transform: translateY(-1px); }
.btn.primary:not(:disabled):hover {
  filter: brightness(1.08);
  box-shadow: 0 5px 16px color-mix(in srgb, var(--accent) 24%, transparent);
}
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn.ghost:not(:disabled):hover,
.btn:not(.primary):not(.ghost):not(:disabled):hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface2));
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
}
.btn:not(:disabled):active {
  transform: translateY(0);
  filter: brightness(.96);
}
.btn:disabled,
.btn[aria-busy='true'] {
  cursor: wait;
  opacity: .58;
  transform: none;
  box-shadow: none;
}
.btn-compact { font-size: .75rem; padding: .25rem .55rem; }

.copy-id {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  border: 0;
  background: transparent;
  color: inherit;
  padding: .1rem .2rem;
  border-radius: 5px;
  cursor: copy;
  font: inherit;
}
.copy-id:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.copy-id::after {
  content: '⧉';
  color: var(--muted);
  font-size: .8em;
  opacity: 0;
  transition: opacity .14s ease;
}
.copy-id:hover::after,
.copy-id:focus-visible::after { opacity: 1; }
.copy-id.copy-id-icon::after { content: none; }
.hw-serial-actions {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
}
.copy-id-icon {
  color: var(--muted);
  font-size: .78rem;
  opacity: .72;
}
.copy-id-icon:hover,
.copy-id-icon:focus-visible {
  color: var(--accent);
  opacity: 1;
}

.copy-toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10000;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: .7rem .9rem;
  border: 1px solid color-mix(in srgb, var(--green) 45%, var(--border));
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 94%, var(--green));
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: .84rem;
  animation: copy-toast-in .18s ease-out;
}
@keyframes copy-toast-in {
  from { opacity: 0; transform: translateY(6px); }
}

.tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .5rem;
}
.tab {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: .55rem .75rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: .84rem;
  text-align: left;
  width: 100%;
  line-height: 1.35;
}
.tab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.tab.active {
  color: var(--text);
  background: var(--surface2);
  box-shadow: inset 3px 0 0 var(--accent);
}

.banner {
  background: rgba(245,185,66,.12);
  border: 1px solid rgba(245,185,66,.35);
  color: var(--amber);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .875rem;
}

.panel { display: none; }
.panel.active { display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: none;
}
.card .label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.card .value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: .35rem 0 .2rem;
  line-height: 1.1;
}
.card .hint { font-size: .78rem; color: var(--muted); }

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  margin-bottom: 1rem;
}
.section h2 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.bar-chart { display: flex; flex-direction: column; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 60px; gap: .75rem; align-items: center; font-size: .82rem; }
.bar-track { background: var(--surface2); border-radius: 6px; height: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 6px; }

.sw-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}
.sw-charts-dynamic {
  gap: 1.15rem;
}
.sw-charts-hint {
  grid-column: 1 / -1;
  margin: 0 0 .15rem;
}
.chart-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  position: relative;
  animation: chart-card-in .45s ease-out both;
}
.sw-charts-dynamic .chart-card:nth-child(2) { animation-delay: .04s; }
.sw-charts-dynamic .chart-card:nth-child(3) { animation-delay: .08s; }
.sw-charts-dynamic .chart-card:nth-child(4) { animation-delay: .12s; }
.sw-charts-dynamic .chart-card:nth-child(5) { animation-delay: .16s; }
.sw-charts-dynamic .chart-card:nth-child(6) { animation-delay: .2s; }
.sw-charts-dynamic .chart-card:nth-child(7) { animation-delay: .24s; }
.sw-charts-dynamic .chart-card:nth-child(8) { animation-delay: .28s; }
.sw-charts-dynamic .chart-card:nth-child(9) { animation-delay: .32s; }
.sw-charts-dynamic .chart-card:nth-child(10) { animation-delay: .36s; }
@keyframes chart-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.chart-card-wide { grid-column: 1 / -1; }
.chart-card h3 {
  margin: 0 0 .75rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
}
.chart-donut-wrap { position: relative; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.chart-donut { width: 160px; height: 160px; flex-shrink: 0; }
.chart-donut-center { fill: var(--text); font-size: 1.1rem; font-weight: 700; }
.chart-donut-sub { fill: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; }
.chart-segment {
  cursor: pointer;
  transition: opacity .15s, filter .15s;
  transform-origin: center;
  animation: chart-seg-in .55s ease-out both;
}
@keyframes chart-seg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.chart-segment:hover, .chart-segment:focus {
  opacity: .85;
  outline: none;
  filter: brightness(1.15);
}
.chart-legend {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  flex: 1;
  min-width: 140px;
}
.chart-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: .45rem .55rem;
  align-items: center;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: .78rem;
  text-align: left;
  padding: .25rem .35rem;
  border-radius: 6px;
  cursor: pointer;
}
.chart-legend-item:hover { background: rgba(255,255,255,.04); }
.chart-legend-item strong { font-size: .82rem; }
.chart-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.chart-legend-row {
  flex-direction: row;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  margin-bottom: .75rem;
}
.chart-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .75rem;
  color: var(--muted);
}
.interactive-bar-chart { display: flex; flex-direction: column; gap: .65rem; }
.chart-bar-row {
  display: grid;
  grid-template-columns: minmax(80px, 110px) 1fr auto;
  gap: .65rem;
  align-items: center;
  font-size: .78rem;
  padding: .15rem 0;
  border-radius: 6px;
}
.chart-bar-row.is-clickable { cursor: pointer; }
.chart-bar-row:hover { background: rgba(255,255,255,.03); }
.chart-bar-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.chart-bar-track {
  background: var(--bg);
  border-radius: 6px;
  height: 12px;
  overflow: hidden;
}
.chart-bar-fill {
  height: 100%;
  width: var(--bar-width, 0%);
  border-radius: 6px;
  transform-origin: left center;
  animation: chart-bar-grow .7s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--bar-delay, 0ms);
  transition: filter .15s;
}
@keyframes chart-bar-grow {
  from { transform: scaleX(0); opacity: .55; }
  to { transform: scaleX(1); opacity: 1; }
}
.chart-bar-row:hover .chart-bar-fill { filter: brightness(1.12); }
.chart-bar-value { font-weight: 600; font-size: .78rem; white-space: nowrap; }
.interactive-compare-chart { display: flex; flex-direction: column; gap: .85rem; }
.chart-compare-row {
  display: grid;
  grid-template-columns: minmax(100px, 140px) 1fr minmax(90px, 130px);
  gap: .75rem;
  align-items: center;
  font-size: .78rem;
  padding: .35rem .25rem;
  border-radius: 8px;
}
.chart-compare-row.is-clickable { cursor: pointer; }
.chart-compare-row:hover { background: rgba(255,255,255,.03); }
.chart-compare-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-weight: 600;
}
.chart-compare-tracks {
  display: flex;
  flex-direction: column;
  gap: .28rem;
}
.chart-compare-track {
  background: var(--bg);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}
.chart-compare-fill {
  height: 100%;
  width: var(--bar-width, 0%);
  border-radius: 6px;
  transform-origin: left center;
  animation: chart-bar-grow .75s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--bar-delay, 0ms);
}
.chart-compare-fill.assigned { background: #5b8def; }
.chart-compare-fill.purchased { background: #3dd68c; }
.chart-compare-fill.active90 { background: #2bb8a6; }
.chart-compare-meta {
  font-weight: 600;
  font-size: .75rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.interactive-stack-chart { display: flex; flex-direction: column; gap: .55rem; }
.chart-stack-row.is-clickable { cursor: pointer; border-radius: 6px; padding: .15rem 0; }
.chart-stack-row.is-clickable:hover { background: rgba(255,255,255,.03); }
.chart-stack-row {
  display: grid;
  grid-template-columns: minmax(90px, 130px) 1fr 48px;
  gap: .65rem;
  align-items: center;
  font-size: .78rem;
}
.chart-stack-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.chart-stack-track {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg);
}
.chart-stack-seg {
  height: 100%;
  min-width: 2px;
  cursor: pointer;
  transition: filter .15s, opacity .15s;
}
.chart-stack-seg:hover { filter: brightness(1.2); opacity: .95; }
.chart-stack-total { text-align: right; font-weight: 600; font-size: .78rem; }
.chart-tooltip {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  background: #252b3a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .45rem .65rem;
  font-size: .75rem;
  line-height: 1.45;
  box-shadow: var(--shadow);
  max-width: 220px;
}
.chart-tooltip strong { color: var(--text); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
th, td {
  text-align: left;
  padding: .65rem .5rem;
  border-bottom: 1px solid var(--border);
}
th { color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; }
tr:hover td { background: var(--surface2); }

.pill {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}
.pill.sim { background: rgba(245,185,66,.15); color: var(--amber); }
.pill.live { background: rgba(61,214,140,.15); color: var(--green); }

.footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .78rem;
}

.loading { color: var(--muted); padding: 2rem; text-align: center; }
.genie-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 12rem;
  padding: 3rem 1.5rem;
}
.genie-loading-icon {
  font-size: 1.75rem;
  line-height: 1;
  animation: genie-pulse 1.6s ease-in-out infinite;
}
.genie-loading p {
  margin: 0;
  font-size: 1rem;
  color: var(--text, #e6edf3);
  letter-spacing: 0.01em;
}
.genie-loading.is-thinking .genie-loading-icon {
  animation: genie-think 1.2s ease-in-out infinite;
}
@keyframes genie-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes genie-think {
  0%, 100% { transform: rotate(-8deg) scale(0.95); opacity: 0.6; }
  50% { transform: rotate(8deg) scale(1.05); opacity: 1; }
}
.error { color: var(--red); padding: 1rem; background: rgba(240,113,120,.1); border-radius: 8px; }

.muted-note { color: var(--muted); font-size: .85rem; margin: 0 0 .75rem; }
.field-hint { display: block; color: var(--muted); font-size: .78rem; margin-top: .25rem; font-weight: normal; }
.sw-callout { background: rgba(110,181,255,.08); border: 1px solid rgba(110,181,255,.25); border-radius: 8px; padding: .75rem 1rem; margin: .75rem 0 1rem; line-height: 1.5; }
.sw-callout code { font-size: .82rem; }
.sw-steps { margin: 0 0 1rem 1.25rem; line-height: 1.5; }
.sw-steps a { color: var(--accent, #6eb5ff); }
.sw-field-full { grid-column: 1 / -1; }

.status-time-filter-card {
  border-top: 3px solid var(--accent);
}
.status-time-filter-head,
.status-time-section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.status-time-filter-head h2,
.status-time-section-head h2 {
  margin: 0 0 .3rem;
}
.status-time-filters {
  display: grid;
  grid-template-columns: minmax(9rem, .8fr) minmax(9rem, .8fr) minmax(14rem, 1.4fr) minmax(15rem, 1.5fr) minmax(11rem, 1fr) auto;
  gap: .7rem;
  align-items: end;
}
.status-time-filters label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 600;
}
.status-time-filters input,
.status-time-filters select {
  width: 100%;
}
.status-time-filters input[type="date"] {
  min-height: 36px;
  padding: .45rem .6rem;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 7px;
  color-scheme: dark;
}
.status-time-filter-actions {
  display: flex;
  gap: .45rem;
  white-space: nowrap;
}
.status-time-scope-note {
  margin: .8rem 0 0;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
}
.status-time-definitions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  margin: 0 0 1rem;
}
.status-time-definitions > div {
  min-height: 100%;
  padding: .8rem .9rem;
  background: rgba(91, 141, 239, .07);
  border: 1px solid rgba(91, 141, 239, .22);
  border-radius: 8px;
}
.status-time-definitions strong,
.status-time-definitions span {
  display: block;
}
.status-time-definitions strong {
  margin-bottom: .3rem;
  font-size: .82rem;
}
.status-time-definitions span {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}
.status-time-parked {
  border-left: 3px solid var(--amber);
}
.status-time-split {
  display: grid;
  grid-template-columns: minmax(22rem, .8fr) minmax(30rem, 1.2fr);
  gap: 1rem;
}
.status-time-split h3 {
  margin: .8rem 0 .55rem;
  font-size: .9rem;
}

@media (max-width: 1180px) {
  .status-time-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .status-time-definitions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .status-time-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .status-time-filter-head,
  .status-time-section-head {
    flex-direction: column;
  }
  .status-time-filters,
  .status-time-definitions {
    grid-template-columns: 1fr;
  }
  .status-time-filter-actions {
    flex-wrap: wrap;
  }
}
.sw-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.sw-form label { display: flex; flex-direction: column; font-size: .9rem; font-weight: 600; }
.sw-form input, .sw-form select { margin-top: .35rem; font-weight: normal; }
.form-msg-error {
  color: var(--red);
  padding: .65rem .85rem;
  background: rgba(240,113,120,.12);
  border: 1px solid rgba(240,113,120,.35);
  border-radius: 8px;
  margin-top: .75rem;
}
.sw-dormant-summary { margin: 0 0 1.15rem; }
.sw-license-filters { margin: .85rem 0 1rem; }
.sw-m365-banner {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(245,185,66,.35);
  background: rgba(245,185,66,.08);
  color: var(--text);
  font-size: .9rem;
  line-height: 1.45;
}
.sw-m365-banner.is-error {
  border-color: rgba(240,113,120,.45);
  background: rgba(240,113,120,.1);
}
.sw-m365-banner code {
  font-size: .82em;
}
.sw-portal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}
.sw-portal-title {
  margin: 0 0 .35rem;
  font-size: 1.35rem;
}
.sw-portal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem 1rem;
  max-width: 100%;
}
.sw-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-bottom: 1.1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--border);
}
.sw-subtab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: .45rem .85rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: .82rem;
}
.sw-subtab:hover {
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.sw-subtab.active {
  color: var(--text);
  background: var(--surface2);
  border-color: var(--border);
}
.sw-subpanel { display: none; }
.sw-subpanel.active { display: block; }
.sw-panel-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.sw-panel-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sw-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.sw-section-heading {
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  font-weight: 650;
}
.sw-edit-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-top: .35rem;
}
.sw-form-actions {
  margin-top: 1rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}
.sw-dormant-kpis {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.1rem;
  margin-bottom: 0;
}
.sw-intel {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin-top: .35rem;
}
.sw-intel-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.15rem;
}
.sw-intel-kpis .card {
  min-height: 6.25rem;
}
.sw-intel-kpis .value {
  font-size: 1.45rem;
  word-break: break-word;
}
.sw-intel-note { margin: 0; }
.sw-intel-charts .sw-charts-grid {
  margin: 0;
  gap: 1.15rem;
}
.sw-intel-table {
  padding-top: .15rem;
}
.sw-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.5rem;
  margin-bottom: .75rem;
}
.sw-filter-bar-top {
  padding: .85rem 1.05rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  margin-bottom: 0;
}
.sw-filter-bar label {
  display: flex;
  flex-direction: column;
  font-size: .85rem;
  font-weight: 600;
  min-width: 220px;
}
.sw-filter-bar label:has(#swLicenseUser),
.sw-filter-bar label:has(#swIntelUser) {
  min-width: min(360px, 100%);
  flex: 1 1 280px;
}
.sw-filter-bar select { margin-top: .35rem; font-weight: normal; }
.cache-note {
  color: var(--amber);
  font-size: .8rem;
  margin-bottom: 1rem;
  padding: .5rem .75rem;
  background: rgba(245,185,66,.08);
  border-radius: 8px;
  border: 1px solid rgba(245,185,66,.2);
}

.perf-header h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.perf-header { margin-bottom: 1.25rem; }

.kpi-delta {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: .35rem;
  vertical-align: middle;
}

.delta-cell { color: var(--muted); font-size: .8rem; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}

.ticket-summary {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .15rem;
  max-width: 280px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .45rem;
  margin: .1rem .15rem .1rem 0;
  border-radius: 4px;
  background: var(--surface2);
  color: var(--text);
  white-space: nowrap;
}

.status-pill.bad {
  background: rgba(240,113,120,.18);
  color: var(--red);
}

.status-pill.warn {
  background: rgba(245,185,66,.18);
  color: var(--amber);
}

.row-selected td {
  background: rgba(88,166,255,.08) !important;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.ticket-table a { color: var(--accent); text-decoration: none; }
.ticket-table a:hover { text-decoration: underline; }

.row-alert td { background: rgba(240,113,120,.08) !important; }
.row-warn td { background: rgba(245,185,66,.08) !important; }

.alert-section { border-color: rgba(240,113,120,.25); }

.pill.alert { background: rgba(240,113,120,.18); color: var(--red); }
.pill.warn { background: rgba(245,185,66,.18); color: var(--amber); }
.pill.muted { background: var(--surface2); color: var(--muted); }

.compact-table td:last-child { text-align: right; font-weight: 600; }
.compact-table td:first-child { color: var(--muted); }

.survey-list { display: flex; flex-direction: column; gap: .65rem; }
.survey-row {
  padding: .75rem 1rem;
  background: var(--surface2);
  border-radius: 8px;
  border: 1px solid var(--border);
}
.survey-feedback {
  margin-top: .35rem;
  font-size: .85rem;
  color: var(--text);
  font-style: italic;
}

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 1fr; gap: .25rem; }
}

.health-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  align-items: flex-end;
  padding: 1rem;
  margin-bottom: .75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.health-filters label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.health-filters select,
.health-filters input[type="search"] {
  min-width: 9rem;
  padding: .45rem .6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .875rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.health-filters input[type="search"] { min-width: 12rem; }
.health-filter-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  align-items: center;
  margin-bottom: .75rem;
}
.flag-cell {
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.flag-cell.ok { color: var(--muted); }
.flag-cell.warn { color: var(--amber); }
.flag-cell.bad { color: var(--red); }
.flag-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
}
.flag-score.ok { background: rgba(61,214,140,.15); color: var(--green); }
.flag-score.attention { background: rgba(245,185,66,.15); color: var(--amber); }
.flag-score.watch { background: rgba(245,185,66,.22); color: var(--amber); }
.flag-score.critical { background: rgba(240,113,120,.18); color: var(--red); }
.coaching-hint {
  font-size: .8rem;
  color: var(--muted);
  max-width: 22rem;
  line-height: 1.35;
}
.ai-coaching-block {
  margin-top: .45rem;
  padding-top: .45rem;
  border-top: 1px dashed rgba(255,255,255,.08);
  color: var(--text);
  font-size: .78rem;
}
.ai-insight-body {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  line-height: 1.55;
  font-size: .92rem;
}
.ai-insight-body h2, .ai-insight-body h3 {
  font-size: 1rem;
  margin: 1rem 0 .5rem;
  color: var(--text);
}
.ai-insight-body h2:first-child, .ai-insight-body h3:first-child { margin-top: 0; }
.ai-insight-body ul, .ai-insight-body ol {
  margin: .35rem 0 .75rem 1.25rem;
  padding: 0;
}
.ai-insight-body li { margin: .25rem 0; }
.ai-insight-meta {
  font-size: .78rem;
  color: var(--muted);
  margin-bottom: .65rem;
}
.ai-ask-form {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-width: 42rem;
}
.ai-ask-form textarea {
  min-height: 5rem;
  resize: vertical;
  padding: .65rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.2);
  color: var(--text);
  font: inherit;
}
.ai-ask-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}
.ai-teaser-headline {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 .5rem;
  line-height: 1.4;
}
.redflags-table-wrap { margin-top: 1rem; }
.redflags-table-scroll {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(255,255,255,.02);
}
.redflags-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}
.redflags-table th,
.redflags-table td {
  padding: .45rem .55rem;
  vertical-align: middle;
  white-space: nowrap;
}
.redflags-table thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.redflags-table .rf-group-head {
  text-align: center;
  border-bottom: none;
  color: var(--text);
  font-size: .68rem;
}
.redflags-table .rf-subhead th {
  font-size: .68rem;
  font-weight: 600;
}
.redflags-table th:not(.rf-sticky-col):not(:first-child),
.redflags-table td:not(.rf-agent-cell):not(.rf-coaching-toggle-cell) { text-align: center; }
.redflags-table .rf-agent-cell {
  min-width: 11rem;
  max-width: 14rem;
  white-space: normal;
  text-align: left;
  font-weight: 600;
}
.redflags-table .rf-agent-name { font-weight: 600; }
.redflags-table .rf-hint-preview {
  margin-top: .25rem;
  font-size: .72rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.35;
}
.redflags-table .rf-time-cell {
  font-size: .78rem;
  color: var(--muted);
  max-width: 5rem;
}
.redflags-table .rf-coaching-toggle-cell {
  text-align: right;
  padding-right: .65rem;
}
.redflags-table .rf-coaching-toggle {
  font-size: .72rem;
  padding: .25rem .55rem;
  white-space: nowrap;
}
.redflags-table .rf-main-row td {
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.redflags-table .rf-coaching-row td {
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}
.rf-coaching-panel {
  padding: .85rem 1rem 1rem;
  line-height: 1.5;
}
.rf-coaching-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: .65rem 0 .25rem;
}
.rf-coaching-panel .rf-coaching-label:first-child { margin-top: 0; }
.rf-coaching-panel .rule-hint {
  font-size: .84rem;
  color: var(--text);
}
.rf-coaching-panel .ai-coaching-block {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  font-size: .84rem;
  color: var(--text);
  white-space: normal;
  max-width: none;
}
.redflags-table td:first-child { font-weight: 600; }

.redflags-table a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.redflags-table a:hover { opacity: .85; }

/* ITS Executive Analytics */
.itd-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.itd-section-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.15);
  color: var(--text-muted, #aab);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.itd-section-btn:hover { border-color: rgba(255,255,255,.25); color: var(--text); }
.itd-section-btn.active {
  background: rgba(99, 179, 237, 0.18);
  border-color: rgba(99, 179, 237, 0.45);
  color: var(--text);
  font-weight: 600;
}
.itd-ai-block { margin-top: 0.5rem; }
.growth-badge { font-size: 0.78rem; font-weight: 600; }
.growth-up { color: #f6ad55; }
.growth-down { color: #68d391; }
.ticket-table.compact th,
.ticket-table.compact td { padding: 0.4rem 0.55rem; font-size: 0.88rem; }
.status-pill.ok { background: rgba(104, 211, 145, 0.15); color: #68d391; }
.itd-filters label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.82rem; min-width: 0; }
.itd-filter-card {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.12);
}
.itd-filter-group + .itd-filter-group { margin-top: 0.75rem; }
.itd-filter-group-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted, #889);
  margin-bottom: 0.45rem;
}
.itd-filters {
  display: grid;
  gap: 0.75rem 1rem;
  width: 100%;
}
.itd-filters-row1 { grid-template-columns: minmax(12rem, 1.4fr) repeat(2, minmax(9rem, 1fr)); }
.itd-filters-row2 { grid-template-columns: repeat(5, minmax(9rem, 1fr)); }
@media (max-width: 1100px) {
  .itd-filters-row1,
  .itd-filters-row2 { grid-template-columns: repeat(2, minmax(9rem, 1fr)); }
}
@media (max-width: 640px) {
  .itd-filters-row1,
  .itd-filters-row2 { grid-template-columns: 1fr; }
}
.itd-filter-search { grid-column: 1 / -1; }
@media (min-width: 1101px) {
  .itd-filters-row1 .itd-filter-search { grid-column: auto; }
}
.itd-input,
.itd-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.2);
  color: inherit;
  font: inherit;
  font-size: 0.88rem;
}
.itd-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
.itd-filter-actions-spacer { flex: 1 1 auto; min-width: 0.5rem; }
.itd-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 0.5rem;
}
.itd-file-input { max-width: 22rem; font-size: 0.88rem; }
.itd-employee-upload { margin-bottom: 0.5rem; }

.itd-workforce-head {
  grid-template-columns: repeat(4, minmax(9rem, 1fr));
  margin-bottom: 0.25rem;
}
@media (max-width: 1200px) {
  .itd-workforce-head { grid-template-columns: repeat(2, minmax(9rem, 1fr)); }
}
@media (max-width: 640px) {
  .itd-workforce-head { grid-template-columns: 1fr; }
}
.itd-ratio-highlight {
  border: 1px solid rgba(138, 180, 255, 0.45);
  background: linear-gradient(135deg, rgba(70, 71, 117, 0.35), rgba(98, 100, 167, 0.2));
  box-shadow: 0 0 0 1px rgba(138, 180, 255, 0.08) inset;
}
.itd-ratio-highlight .value {
  font-size: 1.75rem;
  letter-spacing: 0.02em;
  color: #8ab4ff;
}
.itd-ratio-segment {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.itd-ratio-segment .value {
  font-size: 1.35rem;
  color: #c8d8ff;
}
.itd-ratio-missing {
  border: 1px dashed rgba(255, 255, 255, 0.2);
  opacity: 0.92;
}
.itd-partial-year-banner {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(246, 173, 85, 0.45);
  background: rgba(92, 46, 0, 0.35);
  font-size: 0.9rem;
  line-height: 1.45;
}
.row-partial-year td { border-left: 3px solid rgba(246, 173, 85, 0.5); }

/* Time off — KPI row + calendar */
.leave-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.leave-kpi-card {
  text-align: center;
  min-height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.leave-kpi-card .value { font-size: 1.85rem; }
@media (max-width: 720px) {
  .leave-kpi-row { grid-template-columns: 1fr; }
}

.leave-calendar-wrap { margin-top: 1rem; }
.leave-calendar-wrap.is-loading,
#leaveTableSection.is-loading {
  opacity: 0.55;
  pointer-events: none;
}
.leave-cal-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.leave-cal-header h3 { margin: 0; }
.leave-cal-nav { display: flex; align-items: center; gap: 0.5rem; }
.leave-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
}
.leave-cal-weekdays,
.leave-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.leave-cal-weekdays {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.leave-cal-weekdays div { text-align: center; padding: 0.25rem; }
.leave-cal-cell {
  min-height: 88px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem;
  font-size: 0.78rem;
}
.leave-cal-cell.empty { background: transparent; border-color: transparent; }
.leave-cal-cell.overlap { border-color: rgba(245, 185, 66, 0.65); background: rgba(245, 185, 66, 0.08); }
.leave-cal-cell.demo { min-height: auto; display: inline-block; padding: 0.2rem 0.5rem; }
.leave-cal-daynum { font-weight: 600; margin-bottom: 0.25rem; color: var(--muted); }
.leave-cal-chips { display: flex; flex-direction: column; gap: 2px; }
.leave-chip {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.72rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.leave-chip.approved { background: rgba(61, 214, 140, 0.2); color: #9ae6b4; border: 1px solid rgba(61, 214, 140, 0.35); }
.leave-chip.pending {
  background: rgba(245, 185, 66, 0.12);
  color: #fbd38d;
  border: 1px dashed rgba(245, 185, 66, 0.45);
}
.leave-pending-banner { border: 1px solid rgba(245, 185, 66, 0.35); border-radius: var(--radius); padding: 0.5rem; }
.leave-filters { margin-bottom: 0.75rem; }
.leave-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  max-width: 220px;
}
.leave-manager-form .form-grid,
.leave-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 1rem;
  margin: 0.75rem 0;
  align-items: end;
}
.leave-manager-form label,
.leave-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
}
.leave-form-grid .leave-form-note { grid-column: span 2; }
.leave-manager-form select,
.leave-manager-form input[type=date],
.leave-manager-form input[type=text] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-transform: none;
  width: 100%;
  box-sizing: border-box;
}
.leave-manager-form input[type=date] {
  min-height: 2.4rem;
  cursor: pointer;
  color-scheme: dark;
}
.leave-form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.leave-row-actions {
  white-space: nowrap;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.leave-edit-panel {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}
.leave-filters {
  display: flex;
  align-items: end;
  gap: 0.75rem 1rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .leave-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leave-form-grid .leave-form-note { grid-column: span 2; }
}
@media (max-width: 560px) {
  .leave-form-grid { grid-template-columns: 1fr; }
  .leave-form-grid .leave-form-note { grid-column: span 1; }
}
.row-amend td { border-left: 3px solid rgba(91, 141, 239, 0.5); }

.cost-investment-form { margin-top: 1rem; }
.cost-total-card {
  border-color: color-mix(in srgb, var(--accent, #5b8def) 45%, var(--border));
  background: color-mix(in srgb, var(--accent, #5b8def) 8%, var(--surface));
}
.cost-total-card .value {
  font-size: 1.35rem;
}
.cost-investment-form .form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin: 0.75rem 0;
}
.cost-investment-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  min-height: 3.75rem;
  justify-content: flex-end;
}
.cost-investment-form label:last-child {
  grid-column: span 1;
}
@media (max-width: 1100px) {
  .cost-investment-form .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .cost-investment-form .form-grid {
    grid-template-columns: 1fr;
  }
  .cost-investment-form label {
    min-height: 0;
  }
}
.cost-investment-form input[type=number],
.cost-investment-form input[type=text] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-transform: none;
}

/* Work logs */
.work-logs-filters {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-top: 0.75rem;
}
.work-logs-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
}
.work-logs-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.work-logs-filters input[type=text] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.9rem;
  text-transform: none;
  width: 100%;
  box-sizing: border-box;
}
.wl-detail-row td { background: var(--surface); padding: 0.75rem !important; }
.wl-detail-pre {
  margin: 0;
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
  color: var(--muted);
}
.pill.danger { background: rgba(240, 113, 120, 0.2); color: #feb2b2; }
.pill.muted { background: rgba(139, 149, 168, 0.15); color: var(--muted); }

@media (max-width: 1100px) {
  .sidebar { width: 188px; }
  .main-shell { max-width: calc(100vw - 188px); }
  .tab { font-size: .78rem; padding: .45rem .55rem; }
}

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    padding: .5rem;
    max-height: none;
  }
  .nav-group {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .25rem;
  }
  .nav-group-items {
    flex-direction: row;
    flex-wrap: wrap;
    padding-left: 0;
    margin-left: 0;
    border-left: none;
  }
  .tab {
    width: auto;
    flex: 1 1 calc(50% - .5rem);
    min-width: 140px;
    box-shadow: none;
  }
  .tab.active { box-shadow: inset 0 -2px 0 var(--accent); }
  .main-shell { max-width: 100%; }
  .main-shell > .header,
  .main-shell > .banner,
  .main-shell > .panel,
  .main-shell > .footer {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  .header-clock {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .header-clock-zone {
    align-items: flex-start;
  }
  .header-clock-label {
    text-align: left;
  }
}

/* Access / SSO user chrome */
.sidebar-nav { flex: 1; }
.sidebar-user {
  margin-top: auto;
  padding: 0.85rem 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}
.sidebar-user-name { margin: 0; font-weight: 600; }
.sidebar-user-meta {
  margin: 0.2rem 0 0.5rem;
  color: var(--muted);
  word-break: break-all;
}
.sidebar-logout {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
}
.sidebar-logout:hover { text-decoration: underline; }

/* Access admin — card rows, not stretched table */
.access-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}
.access-panel-head h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.access-panel-head .muted-note { margin: 0.15rem 0; }
.access-bootstrap { font-size: 0.75rem !important; }
.access-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.1rem;
}
.access-card {
  display: grid;
  grid-template-columns: minmax(12rem, 1.2fr) 10.5rem minmax(14rem, 2fr) auto;
  gap: 1rem 1.25rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.access-card-user {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.access-card-user strong {
  font-size: 0.95rem;
  line-height: 1.3;
}
.access-card-email,
.access-card-meta {
  color: var(--muted);
  font-size: 0.75rem;
  word-break: break-all;
}
.access-field-label {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.access-card-role .access-role {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font-size: 0.85rem;
}
.access-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  max-width: none;
}
.access-all-tabs {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.access-tab {
  font-size: 0.78rem;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.access-card-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-top: 1.15rem;
}
.access-card-actions .btn {
  min-width: 4.5rem;
}
.access-portal .sw-panel-body { padding-top: .5rem; }
.access-editor {
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2, var(--surface));
}
.access-profile-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.access-log-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1rem;
}
.access-log-list { display: grid; gap: .65rem; }
.access-log-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .85rem 1rem;
  background: var(--surface);
}
.access-log-top {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  margin-bottom: .35rem;
}
.access-log-top time { color: var(--muted); font-size: .8rem; }
.access-log-body p { margin: .35rem 0; }
.access-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  font-size: .82rem;
  margin-top: .35rem;
}
.access-log-ua { margin-top: .4rem; font-size: .78rem; }
.access-log-ua code {
  display: block;
  white-space: pre-wrap;
  word-break: break-all;
  margin-top: .25rem;
}
.access-log-login { border-left: 3px solid var(--green, #3dd68c); }
@media (max-width: 980px) {
  .access-card {
    grid-template-columns: 1fr 1fr;
  }
  .access-card-tabs { grid-column: 1 / -1; }
  .access-card-actions {
    grid-column: 1 / -1;
    padding-top: 0;
    justify-content: flex-start;
  }
}
@media (max-width: 560px) {
  .access-card { grid-template-columns: 1fr; }
}

/* Public + dashboard service status */
.status-page-body {
  background: var(--bg);
}
.status-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.status-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.status-brand img {
  border-radius: 10px;
}
.status-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.status-brand h1 {
  margin: 2px 0 0;
  font-size: 22px;
}
.status-hero {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 20px;
}
.status-hero h2 {
  margin: 0 0 6px;
  font-size: 28px;
}
.status-hero-operational { border-color: color-mix(in srgb, var(--green) 45%, var(--border)); }
.status-hero-degraded { border-color: color-mix(in srgb, var(--amber) 55%, var(--border)); }
.status-hero-outage { border-color: color-mix(in srgb, var(--red, #c44) 55%, var(--border)); }
.status-hero-unknown { border-color: var(--border); }

/* IT Pulse: in-table drill-down link and inline dependency owner field. */
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}
.link-button:hover { text-decoration: underline; }
.data-table input.input {
  width: 100%;
  min-width: 180px;
  padding: 6px 8px;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.pulse-report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pulse-confidence {
  display: grid;
  justify-items: end;
  flex: 0 0 auto;
}
.pulse-confidence strong {
  font-family: var(--font-mono);
  font-size: 2rem;
  line-height: 1;
}
.pulse-confidence span,
.pulse-unavailable {
  color: var(--muted);
  font-size: .78rem;
}
.pulse-report-kpis {
  margin-bottom: 24px;
}
.pulse-report-kpi .value {
  min-height: 2rem;
}
.pulse-report-section {
  margin: 24px 0;
}
.pulse-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.pulse-breakdown {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pulse-breakdown h3 {
  margin: 0 0 16px;
  font-size: .95rem;
}
.pulse-breakdown-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 2fr) auto;
  align-items: center;
  gap: 10px;
  margin: 9px 0;
  font-size: .78rem;
}
.pulse-breakdown-row > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pulse-breakdown-row strong {
  min-width: 2.5rem;
  font-family: var(--font-mono);
  text-align: right;
}
.pulse-breakdown-track {
  height: 6px;
  overflow: hidden;
  background: var(--surface2);
  border-radius: 999px;
}
.pulse-breakdown-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: inherit;
}
.pulse-breakdown-empty {
  padding: 18px;
  color: var(--muted);
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
}
.server-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
  box-shadow: var(--shadow);
}
.server-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.server-card header strong {
  font-size: .95rem;
  letter-spacing: .01em;
}
.server-card.is-down {
  opacity: .72;
}
.server-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  list-style: none;
  margin: 10px 0 4px;
  padding: 0;
}
.server-facts li {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: .72rem;
  color: var(--muted);
}
.server-facts b {
  color: var(--text);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.server-meter {
  display: grid;
  grid-template-columns: 4.4rem 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: .78rem;
  color: var(--muted);
}
.server-meter b {
  font-family: var(--font-mono);
  text-align: right;
  color: var(--text);
  font-weight: 600;
}
.server-meter-track {
  height: 6px;
  overflow: hidden;
  background: var(--surface2);
  border-radius: 999px;
}
.server-meter-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.server-meter-track i.is-ok { background: var(--green); }
.server-meter-track i.is-warm { background: var(--amber); }
.server-meter-track i.is-hot { background: var(--red); }
.server-procs-label {
  margin: 12px 0 0;
  font-size: .72rem;
  color: var(--muted);
}
.server-procs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.server-procs li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: .75rem;
  color: var(--muted);
  padding: 2px 0;
}
.server-procs b {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 600;
}
.pulse-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.pulse-event-legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: .78rem;
}
.pulse-event-legend span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--accent);
}
.pulse-event-legend span:nth-child(2)::before { background: var(--amber); }
.pulse-event-legend span:nth-child(3)::before { background: var(--green); }
.pulse-lifecycle-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  min-height: 130px;
  padding: 18px;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pulse-lifecycle-day {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 18px;
  height: 92px;
  flex: 1 0 14px;
}
.pulse-lifecycle-day span {
  width: 33%;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
}
.pulse-event-opened { background: var(--accent); }
.pulse-event-reopened { background: var(--amber); }
.pulse-event-resolved { background: var(--green); }
.pulse-trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.pulse-trend-card {
  min-width: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pulse-trend-card strong {
  display: block;
  margin-bottom: 12px;
  overflow: hidden;
  color: var(--muted);
  font: 600 .75rem var(--font-mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pulse-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 58px;
}
.pulse-trend-bars span {
  min-width: 3px;
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--muted);
  opacity: .85;
}
.pulse-trend-bars .ok { background: var(--green); }
.pulse-trend-bars .warn { background: var(--amber); }
.pulse-trend-bars .bad { background: var(--red); }
.pulse-trend-bars .unknown {
  background: repeating-linear-gradient(
    135deg,
    var(--muted) 0 3px,
    transparent 3px 6px
  );
}
@media (max-width: 760px) {
  .pulse-report-hero,
  .pulse-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .pulse-confidence { justify-items: start; }
  .pulse-event-legend { flex-wrap: wrap; }
}
.status-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
}
.status-toolbar .muted-note { margin: 0; max-width: 42rem; }
.status-refresh-btn { flex-shrink: 0; }
.status-legend { margin: 0 0 8px; }
.status-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.status-row-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.status-row-head h3 {
  margin: 0;
  font-size: 16px;
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}
.status-dot-operational { background: var(--green); }
.status-dot-degraded, .status-dot-not_configured { background: var(--amber); }
.status-dot-outage { background: var(--red); }
.status-pill {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface2);
}
.status-pill-operational { color: var(--green); }
.status-pill-degraded, .status-pill-not_configured { color: var(--amber); }
.status-pill-outage { color: var(--red); }
.status-pill-maintenance { color: #5b8def; }
.status-dot-maintenance { background: #5b8def; }
.status-bars {
  display: flex;
  gap: 2px;
  height: 26px;
  margin-top: 10px;
}
.status-bar {
  flex: 1;
  min-width: 0;
  border-radius: 2px;
  background: #2a3144;
}
.status-bar.operational { background: var(--green); }
.status-bar.degraded, .status-bar.not_configured { background: var(--amber); }
.status-bar.outage { background: var(--red); }
.status-bar.maintenance { background: #5b8def; opacity: 0.9; }
.status-bar.empty { background: #2a3144; opacity: 0.55; }
.status-bar-key {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.1rem;
  margin: 0 0 1rem;
  font-size: .78rem;
  color: var(--muted);
}
.status-bar-key span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.status-bar-key .status-bar {
  width: 10px;
  height: 14px;
  border-radius: 2px;
  display: inline-block;
  opacity: 1;
}
.status-row-meta {
  text-align: right;
  min-width: 120px;
}
.status-row-meta strong { display: block; font-size: 14px; }
.status-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
}
.status-link:hover { text-decoration: underline; }
.status-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.status-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.status-tab.is-active {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--surface2);
}
.status-group {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.status-group-summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
}
.status-group-summary::-webkit-details-marker { display: none; }
.status-group-summary::after {
  content: '+';
  margin-left: auto;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.status-group[open] .status-group-summary::after {
  content: '−';
}
.status-group-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.status-group-title {
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}
.status-group-summary-meta {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  margin-left: auto;
  padding-right: 12px;
}
.status-group-note {
  margin: 0;
  padding: 0 18px 6px;
}
.status-group .status-list {
  padding: 0 18px 8px;
}
.status-group .status-row:last-child {
  border-bottom: 0;
}
#panel-serviceStatus .status-hero { margin-top: 8px; }
.host-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.host-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
}
.host-card .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.host-card .value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 4px;
}
.host-card .hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.host-history h3 {
  font-size: 14px;
  margin: 0 0 8px;
}
.host-spark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  padding: 4px 0;
}
.host-spark span {
  flex: 1;
  min-width: 4px;
  background: color-mix(in srgb, var(--green) 70%, var(--border));
  border-radius: 2px 2px 0 0;
}
.host-section-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 20px 0 10px;
}
.host-alerts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 4px;
}
.host-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}
.host-alert-sev {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  min-width: 64px;
  color: var(--muted);
}
.host-alert-critical {
  border-color: color-mix(in srgb, var(--red) 55%, var(--border));
  background: color-mix(in srgb, var(--red) 12%, var(--panel));
}
.host-alert-warning {
  border-color: color-mix(in srgb, var(--amber) 55%, var(--border));
  background: color-mix(in srgb, var(--amber) 12%, var(--panel));
}
.host-alert-info {
  border-color: color-mix(in srgb, var(--border) 80%, transparent);
}
.host-alert-ok {
  border-color: color-mix(in srgb, var(--green) 40%, var(--border));
  color: var(--muted);
}
.host-deps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.host-dep {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
}
.host-dep-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.host-dep-top strong {
  flex: 1;
  font-size: 13px;
}
.host-dep-outage {
  border-color: color-mix(in srgb, var(--red) 50%, var(--border));
}
.host-dep-degraded {
  border-color: color-mix(in srgb, var(--amber) 50%, var(--border));
}
.host-charts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.host-charts-monitor {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .host-charts-monitor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.host-chart-panel {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px 8px;
  background: color-mix(in srgb, var(--panel) 94%, #000 6%);
}
.host-chart-wide {
  grid-column: 1 / -1;
}
.host-chart-wide .host-chart-svg-lg {
  height: 200px;
}
.host-chart-panel header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.host-chart-panel .unit {
  font-weight: 500;
  color: var(--muted);
  font-size: 11px;
}
.host-chart-svg {
  width: 100%;
  height: 64px;
  display: block;
}
.host-chart-svg-lg {
  height: 140px;
}
.host-chart-grid {
  stroke: color-mix(in srgb, var(--border) 80%, transparent);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}
.host-chart-axis {
  fill: var(--muted);
  font-size: 9px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.host-chart-line {
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.host-chart-fill {
  opacity: 0.18;
}
.host-chart-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.host-chart-empty {
  margin: 12px 0;
  font-size: 12px;
}
@media (max-width: 700px) {
  .status-row { grid-template-columns: 1fr; }
  .status-row-meta { text-align: left; }
  .status-group-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .status-group-summary-meta {
    text-align: left;
  }
}

/* Dashboard Network tab */
.network-dashboard { display: grid; gap: 1.25rem; }
.network-hero {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.network-hero-operational { border-color: color-mix(in srgb, var(--green) 35%, var(--border)); }
.network-hero-degraded { border-color: color-mix(in srgb, var(--amber) 40%, var(--border)); }
.network-hero-outage { border-color: color-mix(in srgb, var(--red) 40%, var(--border)); }
.network-hero h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.network-hero-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(4rem, 1fr));
  gap: 0.75rem;
  min-width: 20rem;
}
.network-location-block {
  display: grid;
  gap: 0.75rem;
}
.network-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.15rem 0.1rem;
}
.network-location-head h3 {
  margin: 0;
  font-size: 1.1rem;
}
.network-hero-stats div {
  text-align: center;
  padding: 0.5rem 0.4rem;
  border-radius: 10px;
  background: var(--surface2);
}
.network-hero-stats span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.network-hero-stats strong { font-size: 1.2rem; }
.network-site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.network-site-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.1rem 1.15rem;
  display: grid;
  gap: 0.75rem;
}
.network-site-degraded { border-color: color-mix(in srgb, var(--amber) 45%, var(--border)); }
.network-site-outage { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.network-site-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.network-site-head h3 { margin: 0 0 0.2rem; font-size: 1.05rem; }
.network-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.55rem;
}
.network-metric {
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: var(--surface2);
}
.network-metric span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.network-metric strong { font-size: 13px; }
.network-offline h4 { margin: 0 0 0.35rem; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.network-offline ul { margin: 0; padding-left: 1.1rem; }
.network-offline-ok { margin: 0; }
.network-device-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}
.network-device-table { margin-top: 0.5rem; font-size: 12px; }
.network-ai-ask { margin-top: 0.25rem; }
@media (max-width: 700px) {
  .network-hero-stats { grid-template-columns: repeat(3, 1fr); min-width: 0; width: 100%; }
  .network-metrics { grid-template-columns: 1fr 1fr; }
}


/* Public status shell (FrontiersOS-inspired) */
.status-page { max-width: 1040px; }
.fos-brand { margin-bottom: 18px; }
.fos-brand h1 { margin: 0; font-size: 22px; }
.fos-tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.01em;
  text-transform: none;
}
.fos-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, #000);
}
.fos-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.fos-nav-item:hover { color: var(--text); background: var(--surface2); }
.fos-nav-item.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 28%, var(--surface2));
}
.fos-nav-icon { opacity: 0.85; font-size: 14px; }
.fos-feedback-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.fos-feedback-banner strong { margin-right: 8px; }
.fos-feedback-banner span { color: var(--muted); font-size: 13px; }
.fos-feedback-link {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.fos-feedback-link:hover { text-decoration: underline; }
.fos-overview-hero { margin-bottom: 22px; }
.fos-overview-hero h2 { margin: 4px 0 8px; font-size: 28px; line-height: 1.2; }
.fos-rel-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
}
.fos-rel-filter-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.fos-rel-filter {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.fos-rel-filter em { font-style: normal; opacity: .75; margin-left: 4px; }
.fos-rel-filter:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.fos-rel-filter.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 22%, var(--surface2));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.fos-rel-filter-feature.is-active { background: color-mix(in srgb, #3b82f6 22%, var(--surface)); border-color: #3b82f6; color: #93c5fd; }
.fos-rel-filter-improved.is-active { background: color-mix(in srgb, #94a3b8 18%, var(--surface)); }
.fos-rel-filter-fix.is-active { background: color-mix(in srgb, #ef4444 18%, var(--surface)); border-color: #ef4444; color: #fca5a5; }
.fos-rel-filter-soon.is-active { background: color-mix(in srgb, #e2e8f0 12%, var(--surface)); }
.fos-rel-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11.5rem;
  gap: 1.5rem;
  align-items: start;
}
.fos-rel-feed { display: flex; flex-direction: column; gap: 1.75rem; min-width: 0; }
.fos-rel-month-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.fos-rel-month-head h2 { margin: 0; font-size: 1.15rem; }
.fos-rel-month-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fos-rel-version {
  padding: 1rem 0 1.35rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.fos-rel-version:last-child { border-bottom: 0; }
.fos-rel-version-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 6px;
}
.fos-rel-version-head h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.fos-rel-version-head time { font-size: 13px; color: var(--muted); margin-left: 10px; }
.fos-rel-current {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  vertical-align: middle;
}
.fos-rel-summary {
  margin: 0 0 1rem;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  font-style: italic;
}
.fos-rel-items { display: flex; flex-direction: column; gap: 1rem; }
.fos-rel-item {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.fos-rel-item-body h4 { margin: 0 0 6px; font-size: 15px; line-height: 1.35; }
.fos-rel-item-body p { margin: 0 0 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.fos-rel-item-body ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.fos-rel-item-body li { margin: 0.2rem 0; }
.fos-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.4rem;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.fos-tag-feature { color: #93c5fd; background: color-mix(in srgb, #3b82f6 22%, var(--surface)); border-color: color-mix(in srgb, #3b82f6 50%, var(--border)); }
.fos-tag-improved { color: #cbd5e1; background: color-mix(in srgb, #64748b 22%, var(--surface)); border-color: color-mix(in srgb, #94a3b8 40%, var(--border)); }
.fos-tag-fix { color: #fca5a5; background: color-mix(in srgb, #ef4444 18%, var(--surface)); border-color: color-mix(in srgb, #ef4444 45%, var(--border)); }
.fos-tag-soon { color: var(--text); background: color-mix(in srgb, #e2e8f0 10%, var(--surface)); border-color: var(--border); }
.fos-rel-jump {
  position: sticky;
  top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 12px 14px;
}
.fos-rel-jump h3 {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.fos-rel-jump-month { margin-bottom: 12px; }
.fos-rel-jump-month-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 4px;
}
.fos-rel-jump-vers { display: flex; flex-direction: column; gap: 2px; }
.fos-rel-jump-vers a,
.fos-rel-jump a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 6px;
  padding: 3px 6px;
}
.fos-rel-jump a:hover { color: var(--text); background: var(--surface2); }
.fos-rel-jump a.is-active {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 18%, var(--surface2));
}
@media (max-width: 900px) {
  .fos-rel-layout { grid-template-columns: 1fr; }
  .fos-rel-jump { position: static; }
  .fos-rel-item { grid-template-columns: 1fr; }
}
.fos-cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.fos-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px 16px 16px;
  border-top: 3px solid var(--fos-accent, var(--accent));
}
.fos-card-icon { font-size: 22px; margin-bottom: 8px; }
.fos-card h3 { margin: 0 0 8px; font-size: 15px; }
.fos-card p { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.fos-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.fos-pill-live { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.fos-pill-partial { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, var(--border)); }
.fos-pill-soon { color: var(--muted); }
.fos-guide {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 28px 24px;
}
.fos-guide h2 { margin: 0 0 8px; }
.fos-guide .btn { margin-top: 12px; display: inline-block; text-decoration: none; }
.fos-modal[hidden] { display: none !important; }
.fos-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
.fos-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.fos-modal-card {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 24px 22px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.fos-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.fos-modal-card h2 { margin: 0 0 4px; font-size: 22px; }
.fos-info-box {
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-size: 13px;
  color: var(--muted);
}
.fos-suggest-form label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
}
.fos-field-hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
  margin: 2px 0 6px;
  font-size: 12px;
}
.fos-suggest-form input,
.fos-suggest-form select,
.fos-suggest-form textarea {
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.fos-suggest-identity {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.fos-check {
  display: flex !important;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
  font-weight: 400 !important;
}
.fos-check input { width: auto; margin-top: 3px; }
.fos-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.fos-form-error { color: var(--red); font-size: 13px; }
.fos-form-ok { color: var(--green); font-size: 13px; }
@media (max-width: 640px) {
  .fos-nav { border-radius: 16px; }
  .fos-suggest-identity { grid-template-columns: 1fr; }
  .status-page { padding: 24px 16px 64px; }
}

/* Dashboard Improvements tab */
.imp-sug-list { display: grid; gap: 12px; }
.imp-sug-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px 16px;
}
.imp-sug-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.imp-sug-head h3 { margin: 0; font-size: 15px; }
.imp-status {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  padding: 4px 8px;
  font-size: 12px;
}

/* ── Shelfware (executive licence pack) ─────────────────────── */
.shelfware-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 1.25rem;
}
.shelfware-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.shelfware-kpi .label {
  color: var(--muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.shelfware-kpi .value {
  margin-top: .35rem;
  font-size: 1.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.shelfware-kpi .hint {
  margin-top: .25rem;
  color: var(--muted);
  font-size: .78rem;
}
.shelfware-kpi.warn .value { color: var(--amber); }
.shelfware-kpi.ok .value { color: var(--green); }
.shelfware-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.shelfware-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.shelfware-table th,
.shelfware-table td {
  padding: .7rem .85rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
  white-space: nowrap;
}
.shelfware-table th:first-child,
.shelfware-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: var(--surface);
}
.shelfware-table thead th {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
  background: var(--surface2);
}
.shelfware-table tbody tr:hover td { background: rgba(91, 141, 239, .06); }
.shelfware-table tbody tr:hover td:first-child { background: var(--surface2); }
.shelfware-table .muted-row td { color: var(--muted); }
.shelfware-table .shelf-high { color: var(--amber); font-weight: 600; }
.shelfware-table .shelf-critical { color: var(--red); font-weight: 700; }
.shelfware-sku-list {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .72rem;
}
.shelfware-defs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0 0 1rem;
}
.shelfware-defs dt { color: var(--muted); font-size: .78rem; }
.shelfware-defs dd { margin: .15rem 0 0; font-size: .9rem; }
.shelfware-charts { margin-top: .25rem; }
.shelfware-charts .chart-card-wide { margin-top: 1rem; }
.shelfware-compare-row { cursor: default; }
@media (max-width: 900px) {
  .shelfware-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shelfware-defs { grid-template-columns: 1fr; }
}

/* Hardware / Assets */
.hw-toolbar { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; justify-content:space-between; margin-bottom:.75rem; }
.hw-search-form, .hw-import-form { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.hw-search-form input, .hw-import-form input[type=text], .hw-search-form select {
  background: var(--surface2); border:1px solid var(--border); color:var(--text);
  border-radius:8px; padding:.45rem .6rem; font-size:.85rem;
}
.hw-summary-pills { display:flex; flex-wrap:wrap; gap:.35rem; }
.hw-import-box {
  background: var(--surface2); border:1px solid var(--border); border-radius:10px;
  padding:1rem 1.1rem; margin-bottom:1.25rem;
}
.hw-import-box h3 { margin:0 0 .35rem; font-size:1rem; }
.hw-check { font-size:.82rem; color:var(--muted); display:inline-flex; gap:.35rem; align-items:center; }
.hw-grid-2 { display:grid; grid-template-columns: 1.2fr .8fr; gap:1.25rem; }
@media (max-width: 1100px) { .hw-grid-2 { grid-template-columns: 1fr; } }
.hw-life-cards { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:.75rem; margin-bottom:1rem; }
.hw-life-card {
  background: var(--surface2); border:1px solid var(--border); border-radius:10px;
  padding:.85rem 1rem; display:flex; flex-direction:column; gap:.25rem;
}
.hw-life-card strong { font-size:1.45rem; }
.hw-life-card span { color:var(--muted); font-size:.78rem; }
.hw-life-due { border-color: #c45c4a; background: linear-gradient(160deg, rgba(196,92,74,.14), var(--surface2)); }
.hw-life-due strong { color: #b84332; }
.hw-life-soon { border-color: #c9a227; background: linear-gradient(160deg, rgba(201,162,39,.14), var(--surface2)); }
.hw-life-soon strong { color: #9a7a10; }
.hw-life-ok { border-color: #3d9a6a; background: linear-gradient(160deg, rgba(61,154,106,.14), var(--surface2)); }
.hw-life-ok strong { color: #2a7a50; }
.hw-life-unknown { border-color: var(--border); }
.hw-stack { display:flex; height:10px; border-radius:999px; overflow:hidden; margin:0 0 1.25rem; background:var(--surface2); }
.hw-stack-seg { min-width:0; }
.hw-seg-due { background:#c45c4a; }
.hw-seg-soon { background:#c9a227; }
.hw-seg-ok { background:#3d9a6a; }
.hw-seg-unknown { background:#9aa3ad; }
.hw-life-charts { display:grid; grid-template-columns:1fr; gap:1.25rem; margin-bottom:1.25rem; }
.hw-life-pies {
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:1rem;
  margin-bottom:1.25rem;
}
.hw-bars { display:flex; flex-direction:column; gap:.4rem; }
.hw-bar-row { display:grid; grid-template-columns:5.5rem 1fr 2.5rem; gap:.5rem; align-items:center; }
.hw-bar-label { font-size:.78rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hw-bar-track { height:8px; background:var(--surface2); border-radius:999px; overflow:hidden; border:1px solid var(--border); }
.hw-bar-fill { height:100%; border-radius:999px; }
.hw-bar-year { background:#2f6fed; }
.hw-bar-status { background:#5b6b7c; }
.hw-bar-val { font-size:.78rem; text-align:right; }
.hw-subnav { flex-wrap: wrap; align-items: center; gap: .35rem .25rem; }
.hw-subnav-sep {
  display: inline-flex; align-items: center;
  margin: 0 .35rem 0 .65rem; padding: .15rem .55rem;
  font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--border);
}
.hw-serial-link { background:none; border:none; padding:0; cursor:pointer; color:inherit; }
.hw-serial-link:hover code { text-decoration:underline; }
.hw-panel-body { padding-top: .25rem; }
.hw-section-lead { margin: 0 0 1rem; color: var(--text); opacity: .85; }
.hw-rpt-layout {
  display: grid;
  grid-template-columns: minmax(15rem, 20rem) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.hw-rpt-catalog { display: flex; flex-direction: column; gap: .5rem; max-height: 70vh; overflow: auto; }
.hw-rpt-card {
  text-align: left;
  padding: .85rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  color: var(--text);
}
.hw-rpt-card:hover { border-color: #2f6fed; }
.hw-rpt-card.active {
  border-color: #2f6fed;
  box-shadow: inset 0 0 0 1px #2f6fed;
  background: color-mix(in srgb, #2f6fed 10%, var(--surface));
}
.hw-rpt-card-top { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.hw-rpt-card-top strong { font-size: .95rem; line-height: 1.3; color: var(--text); font-weight: 650; }
.hw-rpt-meta { display: flex; flex-wrap: wrap; gap: .35rem .65rem; font-size: .78rem; color: color-mix(in srgb, var(--text) 72%, var(--muted)); }
.hw-rpt-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.hw-rpt-ok { color: #86efac; border-color: #3d9a6a; background: rgba(61,154,106,.2); }
.hw-rpt-partial { color: #fde68a; border-color: #c9a227; background: rgba(201,162,39,.18); }
.hw-rpt-planned { color: color-mix(in srgb, var(--text) 70%, var(--muted)); background: var(--surface2); }
.hw-rpt-detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.15rem;
}
.hw-rpt-detail-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
  margin-bottom: .35rem;
}
.hw-rpt-detail h3 { margin: 0; font-size: 1.15rem; color: var(--text); }
.hw-rpt-desc { margin: .35rem 0 .5rem; font-size: .9rem; line-height: 1.45; color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.hw-rpt-audience { font-size: .82rem; margin: 0 0 .85rem; color: color-mix(in srgb, var(--text) 70%, var(--muted)); }
.hw-rpt-params {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: .75rem;
  margin: .85rem 0;
}
.hw-rpt-field { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: color-mix(in srgb, var(--text) 75%, var(--muted)); }
.hw-rpt-field input,
.hw-rpt-field select,
.hw-date-input,
.filters input[type="date"] {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: .5rem .65rem;
  font-size: .9rem;
  color-scheme: dark;
  min-height: 2.35rem;
}
.hw-rpt-field input[type="date"],
.hw-date-input,
.filters input[type="date"] {
  min-width: 10.5rem;
}
.hw-rpt-field select { cursor: pointer; }
.hw-rpt-field-suggest { position: relative; }
.hw-create-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: .25rem;
}
.hw-create-advanced {
  margin: .25rem 0 .85rem;
  padding-top: .65rem;
  border-top: 1px solid var(--border);
}
.hw-create-advanced-title {
  margin: 0 0 .65rem;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
}
.hw-create-notes { grid-column: 1 / -1; }
.hw-person-suggest {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 14rem;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
  padding: .25rem;
}
.hw-person-suggest[hidden] { display: none !important; }
.hw-person-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: .45rem .55rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: .85rem;
}
.hw-person-suggest-item:hover,
.hw-person-suggest-item:focus {
  background: color-mix(in srgb, var(--accent, #5b8def) 22%, var(--surface2));
}
.hw-person-suggest-empty { padding: .5rem .55rem; }
.hw-rpt-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 1rem; }
.hw-rpt-result { margin-top: .5rem; }
.hw-rpt-pies { margin: .35rem 0 1rem; }
.hw-rpt-summary ul { margin: .35rem 0 .75rem; padding-left: 1.1rem; font-size: .85rem; }
.hw-rpt-table { font-size: .8rem; }
@media (max-width: 980px) {
  .hw-rpt-layout { grid-template-columns: 1fr; }
  .hw-rpt-catalog { max-height: none; }
}
.hw-click-row { cursor: pointer; }
.hw-click-row:hover { background: rgba(91, 141, 239, .08); }
.hw-click-row:focus { outline: 2px solid rgba(91, 141, 239, .45); outline-offset: -2px; }
.hw-person-picks { display:flex; flex-direction:column; gap:.5rem; max-width:36rem; }
.hw-person-pick {
  text-align:left; padding:.75rem .9rem; border:1px solid var(--border); border-radius:10px;
  background:var(--surface2); cursor:pointer; display:flex; flex-direction:column; gap:.2rem;
}
.hw-person-pick:hover { border-color:#2f6fed; }
.hw-person-typeahead { position:relative; flex:1; min-width:18rem; max-width:28rem; }
.hw-person-typeahead input { width:100%; box-sizing:border-box; }
.hw-person-drop {
  position:absolute; z-index:40; left:0; right:0; top:calc(100% + 4px);
  max-height:18rem; overflow:auto;
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  box-shadow:0 10px 28px rgba(0,0,0,.28);
  display:flex; flex-direction:column; padding:.25rem;
}
.hw-person-drop[hidden] { display:none !important; }
.hw-person-drop-item {
  text-align:left; border:0; background:transparent; color:inherit; cursor:pointer;
  padding:.55rem .65rem; border-radius:8px; display:flex; flex-direction:column; gap:.15rem;
}
.hw-person-drop-item span { font-size:.78rem; color:var(--muted); }
.hw-person-drop-item:hover,
.hw-person-drop-item.active { background:var(--surface2); }
.hw-person-drop-empty { padding:.65rem .75rem; font-size:.85rem; color:var(--muted); }
.hw-device-hero {
  display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between;
  padding:1rem; border:1px solid var(--border); border-radius:12px; background:var(--surface2); margin-bottom:1rem;
}
.hw-mdm-panel {
  border:1px solid var(--border); border-radius:12px; padding:1rem; background:var(--surface2); margin-bottom:1rem;
}
.hw-mdm-panel h3 { margin:0 0 .35rem; font-size:1rem; }
.hw-mdm-panel .hw-device-meta { margin-top:.65rem; }
.hw-mdm-panel .hw-device-meta span { display:block; font-size:.72rem; text-transform:none; }
.hw-device-edit {
  border:1px solid var(--border); border-radius:12px; padding:1rem; background:var(--surface2); margin-bottom:1.25rem;
}
.hw-device-edit h3 { margin:0 0 .75rem; font-size:1rem; }
.hw-edit-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(12rem,1fr)); gap:.65rem .75rem;
}
.hw-edit-grid label {
  display:flex; flex-direction:column; gap:.25rem; font-size:.78rem; color:var(--muted);
}
.hw-edit-grid input, .hw-edit-grid select, .hw-edit-grid textarea {
  font:inherit; color:inherit; background:var(--surface); border:1px solid var(--border);
  border-radius:8px; padding:.45rem .55rem;
}
.hw-edit-span2 { grid-column: 1 / -1; }
.hw-edit-actions { display:flex; align-items:center; gap:.75rem; margin-top:.9rem; }
body.hw-modal-open { overflow: hidden; }
.hw-device-modal { z-index: 90; }
.hw-device-modal .hw-device-modal-card {
  width: min(920px, 100%);
  max-height: min(92vh, 960px);
  padding: 20px 22px 24px;
}
.hw-device-modal .hw-device-modal-card h3 { margin: 1.1rem 0 .55rem; font-size: 1rem; }

/* Inventory audit */
.hw-audit-hero {
  display:flex; flex-wrap:wrap; gap:1rem; justify-content:space-between; align-items:flex-start;
  margin-bottom:1rem;
}
.hw-audit-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.hw-audit-kpis {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(7.5rem,1fr)); gap:.65rem; margin-bottom:1rem;
}
.hw-audit-kpi {
  border:1px solid var(--border); border-radius:12px; padding:.65rem .75rem; background:var(--surface2);
  display:flex; flex-direction:column; gap:.2rem;
}
.hw-audit-kpi span { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.hw-audit-kpi strong { font-size:1.25rem; }
.hw-audit-kpi.ok { border-color: color-mix(in srgb, #3d9a6a 45%, var(--border)); }
.hw-audit-kpi.warn { border-color: color-mix(in srgb, #c9a227 50%, var(--border)); }
.hw-audit-kpi.bad { border-color: color-mix(in srgb, #d64545 45%, var(--border)); }
.hw-audit-scan-form {
  display:flex; flex-wrap:wrap; gap:.65rem; align-items:flex-end;
  padding:1rem; border:1px solid var(--border); border-radius:12px; background:var(--surface2);
  margin-bottom:1.25rem;
}
.hw-audit-scan-label { flex:1; min-width:min(100%, 18rem); display:flex; flex-direction:column; gap:.35rem; font-size:.85rem; color:var(--muted); }
.hw-audit-scan-label input {
  font:inherit; font-size:1.15rem; color:inherit; background:var(--surface);
  border:2px solid var(--accent); border-radius:10px; padding:.7rem .85rem;
}
.hw-audit-section { margin-bottom:1.25rem; }
.hw-audit-section h3 { display:flex; align-items:center; gap:.5rem; margin:0 0 .5rem; font-size:1rem; }
.hw-audit-manager {
  border:1px solid var(--border); border-radius:12px; padding:1rem; background:var(--surface2); margin-bottom:1.25rem;
}
.hw-audit-pre {
  white-space:pre-wrap; font:inherit; font-size:.88rem; margin:.5rem 0 .75rem;
  padding:.75rem; border-radius:8px; background:var(--surface); border:1px solid var(--border);
}
.hw-audit-row-active { outline: 2px solid var(--accent); }
.hw-audit-start { margin-bottom:1.5rem; }

@media (max-width: 860px) {
  .hw-life-cards { grid-template-columns: 1fr 1fr; }
  .hw-life-charts { grid-template-columns: 1fr; }
  .hw-life-pies { grid-template-columns: 1fr; }
}
