@font-face { font-family: Inter; src: url('/assets/brand/fonts/Inter-Variable.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('/assets/brand/fonts/PlusJakartaSans-Variable.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }

:root { color: var(--iot-text-primary); background: var(--iot-bg); font: 15px/1.5 var(--iot-font-body); }
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, dl, dd { margin: 0; }
button, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--iot-focus-ring); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--iot-font-display); letter-spacing: -.025em; }
a { color: inherit; }
.icon-sheet, .visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.skip { position: fixed; z-index: 2; top: 10px; left: 10px; padding: 8px 14px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.signin { display: grid; place-items: center; min-height: 100dvh; padding: clamp(16px, 5vw, 56px); color: var(--iot-text-primary); background: var(--iot-forest-950); }
.signin-card { width: min(100%, 420px); padding: clamp(23px, 5vw, 42px); border: 1px solid var(--iot-border); border-radius: var(--iot-radius-lg); background: var(--iot-surface); }
.signin-card img { display: block; max-width: 100%; height: auto; margin-bottom: 34px; }
.signin-card h1 { font-size: clamp(1.7rem, 6vw, 2.2rem); line-height: 1.1; }
.signin-card p { margin-top: 11px; color: var(--iot-text-secondary); }
.signin-providers { display: grid; gap: 10px; margin-top: 24px; }
.signin-provider { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--iot-border); border-radius: var(--iot-radius-sm); color: var(--iot-text-primary); background: var(--iot-surface-subtle); text-decoration: none; font-weight: 650; }
.signin-provider:hover { border-color: var(--iot-focus-ring); }
.signin-provider .icon { color: var(--iot-text-secondary); }
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 0; height: 100dvh; padding: 30px 20px 20px; color: var(--iot-text-primary); background: var(--iot-forest-950); }
.logo { display: block; max-width: 100%; height: auto; margin-left: 7px; }
.navigation { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 45px; text-align: left; border-radius: var(--iot-radius-sm); border: 1px solid transparent; background: transparent; color: var(--iot-text-secondary); font-weight: 600; }
.nav-item:hover { background: rgb(240 253 244 / 7%); }
.nav-item[aria-pressed="true"] { color: #a9eee0; background: rgb(45 212 191 / 13%); border-color: rgb(45 212 191 / 22%); }
.site-picker { display: grid; gap: 7px; }
.site-picker label { margin-left: 5px; color: var(--iot-text-secondary); font-size: .85rem; font-weight: 600; }
.site-picker select { width: 100%; min-height: 42px; padding: 7px 8px; border: 1px solid #435448; border-radius: var(--iot-radius-sm); background: #182d21; color-scheme: dark; }
.account { margin-top: auto; display: flex; align-items: center; gap: 10px; padding-top: 16px; border-top: 1px solid var(--iot-border); }
.account > div { min-width: 0; }
.account strong { display: block; overflow-wrap: anywhere; font-size: .9rem; }
.account button { padding: 0; border: 0; color: var(--iot-text-secondary); background: transparent; text-decoration: underline; font-size: .82rem; }
.avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; color: #a9eee0; background: #1b4434; font-weight: 700; }
.workspace-bar { display: flex; justify-content: space-between; gap: 14px; min-height: 72px; padding: 16px clamp(22px, 4vw, 60px); border-bottom: 1px solid var(--iot-border); background: var(--iot-surface); }
.workspace-name, .presence { display: flex; min-width: 0; align-items: center; gap: 9px; }
.workspace-name strong { overflow-wrap: anywhere; }
.workspace-name .icon { color: var(--iot-mint-700); }
.presence { justify-content: flex-end; flex-wrap: wrap; color: var(--iot-text-secondary); font-size: .85rem; }
.content { width: min(100%, 1550px); margin-inline: auto; padding: 30px clamp(22px, 4vw, 60px) 60px; }
.page-heading { margin-bottom: 22px; }
.page-heading h1 { font-size: clamp(2rem, 4.5vw, 3.05rem); line-height: 1.13; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 64px; padding: 11px 17px; border: 1px solid var(--iot-border); border-radius: var(--iot-radius-md); background: var(--iot-surface); }
.metric span, .panel-heading span, .quiet { color: var(--iot-text-secondary); }
.metric strong { font-size: 1.75rem; line-height: 1; font-variant-numeric: tabular-nums; }
.notice { margin-bottom: 16px; padding: 11px 15px; border: 1px solid #edc789; border-radius: var(--iot-radius-sm); background: #fff3de; color: #70400b; }
.notice[data-tone="danger"] { border-color: #e3b7ad; background: #fff0eb; color: #882c1d; }
.incident-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(290px, .95fr); align-items: start; gap: 16px; }
.panel { min-width: 0; border: 1px solid var(--iot-border); border-radius: var(--iot-radius-md); background: var(--iot-surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--iot-border); }
.panel-heading h2 { font-size: 1rem; }
.panel-heading span { font-size: .83rem; white-space: nowrap; }
.incident { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 11px; width: 100%; padding: 13px 15px 13px 18px; text-align: left; border: 0; border-left: 3px solid transparent; border-bottom: 1px solid var(--iot-border); background: transparent; }
.incident:last-child { border-bottom: 0; }
.incident:hover { background: #f5f8f4; }
.incident[aria-pressed="true"] { border-left-color: var(--iot-mint-700); background: #eff8f2; }
.incident[data-new="true"] { border-left-color: #c1513f; }
.incident-name { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 1rem; font-weight: 700; }
.incident-meta { display: block; margin-top: 2px; color: var(--iot-text-secondary); font-size: .83rem; overflow-wrap: anywhere; }
.incident-end { display: grid; justify-items: end; gap: 7px; color: var(--iot-text-secondary); font-size: .82rem; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 8px; border-radius: var(--iot-radius-full); color: #4d5c53; background: #eef0ed; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status[data-tone="good"] { color: #116657; background: #def5eb; }
.status[data-tone="warn"] { color: #835015; background: #fdf0da; }
.status[data-tone="danger"] { color: #a23a2c; background: #fce9e4; }
.details-body, .list-empty { padding: 19px 18px; }
.location { display: flex; align-items: flex-start; gap: 8px; margin-top: 9px; }
.location .icon { margin-top: 4px; color: var(--iot-mint-700); }
.location h3 { font-size: clamp(1.25rem, 2.3vw, 1.75rem); line-height: 1.2; overflow-wrap: anywhere; }
.location-caption { margin: 6px 0 0 28px; color: var(--iot-text-secondary); font-size: .88rem; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin: 18px 0 14px; }
.detail-meta dt { color: var(--iot-text-secondary); font-size: .82rem; }
.detail-meta dd { overflow-wrap: anywhere; font-weight: 600; }
.command { display: grid; gap: 5px; margin: 12px 0; font-size: .86rem; }
.actions { margin-top: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 7px 14px; border: 1px solid transparent; border-radius: var(--iot-radius-sm); font-weight: 650; }
.button.primary { background: var(--iot-action-bg); color: var(--iot-action-text); }
.button.primary:hover:not(:disabled) { background: #235241; }
.button.secondary { background: var(--iot-surface); border-color: var(--iot-border); }
.button.secondary:hover { background: var(--iot-surface-subtle); }
.button:disabled { opacity: .5; }
.more { margin: 12px 15px; }
.action-note { margin: 5px 0 0; color: var(--iot-text-secondary); font-size: .85rem; }
.timeline { margin-top: 20px; padding-top: 13px; border-top: 1px solid var(--iot-border); }
.timeline h3 { font-size: .95rem; }
.timeline ol { padding: 0; margin: 6px 0 0; list-style: none; }
.timeline li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #efeeea; font-size: .87rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline time { flex-shrink: 0; color: var(--iot-text-secondary); font-variant-numeric: tabular-nums; }
dialog { width: min(90vw, 435px); padding: 21px; border: 1px solid var(--iot-border); border-radius: var(--iot-radius-md); background: var(--iot-surface); color: var(--iot-text-primary); }
dialog::backdrop { background: rgb(9 26 17 / 67%); }
dialog p { margin: 6px 0 17px; }
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 970px) {
  .shell { grid-template-columns: 185px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .incident-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .shell { display: block; }
  .sidebar { position: static; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: auto; gap: 12px; padding: 13px; }
  .logo { width: 112px; align-self: center; }
  .account { grid-column: 2; grid-row: 1; justify-self: end; max-width: 100%; margin: 0; padding: 0; border: 0; }
  .account strong { font-size: .8rem; }
  .avatar { width: 28px; height: 28px; font-size: .8rem; }
  .navigation { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .site-picker { grid-column: 1 / -1; }
  .workspace-bar { flex-wrap: wrap; padding: 12px 14px; }
  .presence { justify-content: flex-start; }
  .content { padding: 20px 14px 36px; }
  .page-heading { margin-bottom: 15px; }
  .metric { padding-inline: 10px; }
}
