:root {
  color-scheme: dark;
  --base: #101523;
  --panel: #171e2f;
  --raised: #20293d;
  --line: #2c374d;
  --text: #edf1f8;
  --muted: #a2afc9;
  --cold: #9fe1e8;
  --red: #ff8492;
  --amber: #ffc876;
  --green: #8bddb4;
  --blue: #94bdfc;
  --sans: "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
  font: 14px/1.5 var(--sans);
  color: var(--text);
  background: var(--base);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; color: inherit; }
button, summary, select { cursor: pointer; }
a { color: var(--cold); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
summary:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid var(--cold); outline-offset: 2px; }
button:disabled { opacity: .45; cursor: default; }
button { border: 0; background: transparent; }
button, summary { touch-action: manipulation; }
[hidden] { display: none !important; }
.masthead { background: #141a29; border-bottom: 1px solid var(--line); }
.masthead-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  max-width: 1720px; min-height: 68px; margin: auto; padding: 10px clamp(14px, 3vw, 48px);
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.brand-context { display: block; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .025em; margin-top: 4px; }
.brand-symbol { position: relative; width: 36px; height: 36px; border-radius: 12px; flex: none; background: #fa475e; }
.brand-symbol::before {
  content: ""; position: absolute; inset: 7px; border: 1px solid #fff; border-radius: 50%;
  background: radial-gradient(circle, #fff 1.4px, transparent 2px), linear-gradient(146deg, transparent 49%, #fff 49%, #fff 54%, transparent 54%) center / 12px 12px no-repeat;
}
.brand-symbol::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; border: 1px solid #fff; opacity: .65; }
.masthead-actions { display: flex; gap: 10px; align-items: center; }
.connection { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); margin-right: 10px; font-size: 12px; white-space: nowrap; }
.connection span, .screen-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.connection[data-state="live"] span { background: var(--green); box-shadow: 0 0 0 3px #8bddb422; }
.connection[data-state="offline"] span { background: var(--red); }
.secondary, .primary { min-height: 36px; padding: 7px 12px; border-radius: 7px; font-weight: 600; }
.secondary { background: var(--raised); border: 1px solid var(--line); }
.secondary:hover { background: #2b3650; }
.primary { background: var(--cold); color: #0d2631; }
.primary:hover { background: #bdf4f4; }
.inbox-toggle { display: flex; gap: 8px; align-items: center; }
.unread { border-radius: 12px; padding: 1px 7px; background: #6b2b42; color: #ffe8f0; font-size: 11px; }
.popover { position: relative; z-index: 5; }
.popover summary { list-style: none; white-space: nowrap; } .popover summary::-webkit-details-marker { display: none; }
.popover summary > span { color: var(--cold); margin-right: 4px; }
.popover-body { position: absolute; top: calc(100% + 8px); right: 0; width: max-content; padding: 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); box-shadow: 0 12px 36px #080b15cc; }
.popover-body button { display: flex; align-items: center; padding: 9px 10px; gap: 8px; width: 100%; text-align: left; border-radius: 5px; }
.popover-body button:hover { background: var(--raised); }
.menu-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--mark); flex: none; }
.severe { --mark: var(--red); } .info { --mark: var(--blue); } .success { --mark: var(--green); } .muted { --mark: var(--muted); }
.dashboard { max-width: 1720px; margin: auto; padding: 31px clamp(14px, 3vw, 48px) 36px; }
.session-gate { max-width: 1720px; margin: auto; padding: clamp(32px, 10vh, 100px) clamp(14px, 3vw, 48px) 36px; }
.sign-in.panel { width: min(100%, 410px); margin: 0 auto; padding: clamp(19px, 5vw, 32px); border-top-color: var(--cold); }
.sign-in h1 { font-size: clamp(24px, 5vw, 34px); margin: 0 0 19px; }
.sign-in form { display: grid; gap: 6px; }
.sign-in label, #session-status { color: var(--muted); }
.sign-in input { width: 100%; min-height: 42px; background: var(--base); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-bottom: 7px; }
.sign-in button { justify-self: start; min-width: 106px; }
.overview-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.screen-label { display: flex; color: var(--muted); align-items: center; gap: 9px; font-size: 12px; }
.screen-indicator { width: 6px; height: 6px; background: var(--blue); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(27px, 3.1vw, 42px); line-height: 1.1; font-weight: 670; letter-spacing: -.05em; margin-top: 7px; }
.shift { display: flex; align-items: center; gap: 10px; flex: none; max-width: min(40vw, 360px); }
.shift > span:last-child { min-width: 0; }
.shift small { display: block; color: var(--muted); font-size: 11px; }
.shift strong { font-size: 12px; font-weight: 600; }
.shift small, .shift strong { overflow-wrap: anywhere; }
.avatar { height: 32px; width: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #273550; color: #c7dbff; font: 600 11px var(--mono); }
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel);
  border: 1px solid var(--line); border-radius: 11px; margin-bottom: 19px; overflow: hidden;
}
.metric { display: flex; align-items: center; justify-content: flex-start; text-align: left; padding: 13px 17px; min-width: 0; gap: 12px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; } .metric:hover { background: var(--raised); }
.metric:focus-visible { outline-offset: -3px; }
.metric-mark { width: 4px; height: 30px; background: var(--accent); border-radius: 3px; flex: none; }
.metric-info { display: grid; gap: 3px; min-width: 0; }
.metric-info > span { color: var(--muted); font-size: 12px; line-height: 1.15; }
.metric strong { color: var(--accent); font: 600 27px/1.12 var(--mono); letter-spacing: -.055em; }
.metric-active { --accent: var(--text); } .metric-critical { --accent: var(--red); }
.metric-warning { --accent: var(--amber); } .metric-closed { --accent: var(--green); }
.workspace { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(315px, 1fr); gap: 16px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); min-width: 0; }
.queue-tabs { display: flex; gap: clamp(8px, 1.6vw, 24px); padding: 0 14px; border-bottom: 1px solid var(--line); }
.queue-tabs button { padding: 14px 2px 11px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.queue-tabs button:hover { color: var(--text); }
.queue-tabs button[aria-pressed="true"] { color: var(--cold); border-bottom-color: var(--cold); }
.filters { display: grid; grid-template-columns: minmax(190px, 1.45fr) repeat(3, minmax(90px, 1fr)); gap: 7px; padding: 12px; }
input, select, textarea { border: 1px solid var(--line); background: #111827; border-radius: 6px; padding: 8px; min-width: 0; }
input::placeholder { color: #8e9cb7; opacity: 1; }
.filters input, .filters select { width: 100%; font-size: 12px; min-height: 35px; }
.search { position: relative; display: block; }
.search input { padding-left: 28px; }
.search > span { position: absolute; top: 11px; left: 10px; width: 10px; height: 10px; border: 1px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search > span::after { content: ""; position: absolute; bottom: -2px; right: -4px; width: 5px; height: 1px; background: var(--muted); transform: rotate(45deg); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 640px; text-align: left; }
th, td { padding: 10px 11px; }
th { font-weight: 600; font-size: 11px; color: var(--muted); background: #131b2b; border-block: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 14px; }
td { height: 58px; border-bottom: 1px solid #273248; }
tbody tr:last-child td { border-bottom: none; }
tbody tr[data-selected="true"] { background: #27344b; }
tr[data-selected="true"] td:first-child { box-shadow: inset 3px 0 var(--cold); }
tr[data-id]:hover { background: #222e44; cursor: pointer; }
tr[data-id][data-selected="true"]:hover { background: #2a3d58; }
.incident-title { text-align: left; font-weight: 650; padding: 0; line-height: 1.2; color: var(--text); }
.incident-context { font-size: 11px; color: var(--muted); display: block; margin-top: 3px; line-height: 1.35; }
.priority, .status { display: inline-block; font-size: 11px; font-weight: 630; line-height: 1.2; border-radius: 4px; padding: 4px 6px; white-space: nowrap; }
.priority { font-family: var(--mono); font-size: 12px; border: 1px solid #505c73; }
.p-p1 { background: #4b283b; color: #ff9cab; border-color: #754258; } .p-p2 { background: #423423; color: #ffd08b; border-color: #64513a; }
.p-p3 { background: #263858; color: #b2d1ff; border-color: #405a83; } .p-p4 { background: #293345; color: #c5d0e9; border-color: #42516c; }
.s-new { color: #b6d5ff; background: #293853; } .s-acknowledged { color: #c9d4fa; background: #383856; }
.s-in_progress { color: #9fe1e8; background: #263b48; } .s-monitoring { color: #ffc876; background: #433a2e; }
.s-resolved { color: #8bddb4; background: #283e3b; }
.ownership { font-size: 12px; line-height: 1.25; }
.no-owner { color: var(--muted); }
.timer { font: 600 13px/1.2 var(--mono); white-space: nowrap; color: var(--text); }
.timer[data-state="soon"] { color: var(--amber); } .timer[data-state="overdue"], .timer[data-state="breached"] { color: var(--red); }
.timer[data-state="met"] { color: var(--green); }
.empty { color: var(--muted); padding: 27px 17px; text-align: center; }
.queue-footer { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); min-height: 47px; }
.pager { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--mono); }
.icon-button { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 5px; font-size: 18px; display: grid; place-items: center; line-height: 1; }
.icon-button:not(:disabled):hover { background: var(--raised); }
.detail { overflow: hidden; scroll-margin-top: 10px; }
.detail-head { padding: 15px 16px 13px; border-bottom: 1px solid var(--line); }
.detail-signal { display: flex; gap: 7px; align-items: center; margin-bottom: 9px; }
.incident-id { font: 600 11px var(--mono); color: #a9b8d5; margin-right: auto; }
.detail-head h2 { font-size: 23px; line-height: 1.15; letter-spacing: -.035em; font-weight: 650; margin-bottom: 7px; }
.detail-head p { color: var(--muted); font-size: 12px; }
.detail-body { padding: 0 15px 13px; }
.ownership-details { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 10px 0 12px; }
.ownership-details div { min-width: 0; }
.ownership-details dt { color: var(--muted); font-size: 11px; }
.ownership-details dd { margin: 1px 0 0; font-size: 12px; font-weight: 620; }
.sla-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.sla-card { background: #121a2b; border: 1px solid var(--line); border-radius: 7px; padding: 8px; min-width: 0; }
.sla-card small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.sla-card .timer { font-size: 14px; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.detail-actions button { min-height: 32px; padding: 5px 8px; font-size: 11px; }
.detail-section { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 12px; }
.detail-section-header { display: flex; gap: 5px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.detail-section h3 { font-size: 13px; font-weight: 650; }
.card-status { font-size: 12px; color: var(--muted); }
.signal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.signal-list li { display: grid; gap: 3px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; overflow-wrap: anywhere; }
.signal-list small { color: var(--muted); }
.signal-list a { justify-self: start; }
.text-button { padding: 0; font-size: 12px; color: var(--cold); text-align: left; }
.text-button:hover { text-decoration: underline; }
.assistant-summary { font-size: 12px; }
.assistant-summary p { margin-bottom: 5px; }
.assistant-summary .assistant-risk { color: var(--amber); }
.assistant-summary .ai-draft { padding: 7px; background: #202b41; border-left: 2px solid #a4bfff; }
.team-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 7px; background: #1d3444; border: 1px solid #315366; border-radius: 6px; padding: 7px 8px; color: #c2f2f4; }
.team-suggestion small { display: block; opacity: .88; }
.assistant-source { color: var(--muted); font-size: 11px; margin-top: 5px; }
.assistant-evidence { display: inline-flex; gap: 7px; margin-top: 5px; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 5px 5px 6px 12px; border-left: 1px solid #3e4f6b; margin-left: 4px; font-size: 12px; }
.timeline li::before { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); top: 10px; left: -3px; }
.timeline li.timeline-selected { background: #25344d; border-radius: 2px 6px 6px 2px; }
.timeline time, .timeline span { color: var(--muted); font-size: 10px; }
.timeline time { font-family: var(--mono); }
.inbox { position: fixed; top: 64px; right: clamp(7px, 3vw, 48px); width: min(350px, calc(100% - 14px)); z-index: 8; background: #1b2437; box-shadow: 0 15px 50px #060912b8; }
.inbox-header, .inbox-tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; }
.inbox-header h2 { font-size: 17px; } .inbox-tools { color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line); }
.notification-list { max-height: min(510px, 70vh); overflow: auto; }
.notification { display: grid; grid-template-columns: 7px 1fr auto; gap: 9px; align-items: start; padding: 11px 12px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); }
.notification:hover { background: #293650; }
.notification.is-unread { background: #222f47; } .notification.is-unread:hover { background: #2a3b58; }
.notification .menu-mark { margin-top: 8px; }
.notification small { display: block; color: var(--muted); font-size: 11px; }
.notification time { color: var(--muted); font: 10px var(--mono); align-self: center; }
.toast { position: fixed; bottom: 18px; right: 18px; z-index: 10; display: flex; align-items: center; gap: 10px; width: min(350px, calc(100vw - 36px)); padding: 10px 13px; border: 1px solid #426078; border-left: 4px solid var(--cold); border-radius: 7px; background: #24344a; color: var(--text); box-shadow: 0 7px 20px #080b15b8; }
.toast[data-kind="critical"], .toast[data-kind="error"] { border-left-color: var(--red); }
.toast[data-kind="resolved"] { border-left-color: var(--green); }
.toast .text-button { margin-left: auto; }
dialog { width: min(395px, calc(100% - 26px)); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 17px; }
dialog::backdrop { background: #090d1bb8; }
dialog h2 { font-size: 20px; margin-bottom: 13px; }
dialog label { color: var(--muted); } dialog select, dialog textarea { width: 100%; margin-top: 5px; }
.dialog-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 9px; }
.form-error { font-size: 12px; color: var(--red); min-height: 18px; }
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(280px, .45fr); gap: 12px; }
  .filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(164px, 1.45fr) repeat(3, minmax(86px, 1fr)); }
}
@media (max-width: 560px) {
  .masthead-inner { gap: 4px; }
  .masthead-actions { gap: 5px; }
  .masthead-actions .secondary { padding-inline: 7px; font-size: 11px; }
  .connection { font-size: 0; margin-right: 2px; gap: 0; }
  .brand { font-size: 15px; gap: 6px; }
  .brand-context { font-size: 9px; }
  .brand-symbol { width: 29px; height: 29px; border-radius: 8px; }
  .brand-symbol::before { inset: 5px; }
  .brand-symbol::after { inset: 8px; }
  .dashboard { padding-top: 18px; }
  .overview-header { align-items: center; flex-wrap: wrap; gap: 8px; }
  .shift { max-width: 100%; }
  .screen-label { font-size: 11px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 9px 10px; }
  .metric:nth-child(2) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric strong { font-size: 22px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .queue-tabs { gap: 10px; padding-inline: 8px; }
  .queue-tabs button { font-size: 12px; }
  .inbox-toggle { gap: 3px; }
}
