/* Asurion Deploy — local portal styles. No external assets. */
:root {
  --bg: #000;
  --bg-elev: #0a0a0a;
  --surface: #0a0a0a;
  --surface-2: #111;
  --surface-3: #1a1a1a;
  --border: #242424;
  --border-strong: #2e2e2e;
  --text: #ededed;
  --text-2: #a1a1a1;
  --muted: #888;
  --faint: #666;
  --accent: #e8412c;
  --accent-hover: #ff5a43;
  --accent-soft: rgba(232, 65, 44, 0.16);
  --navy: #171717;
  --ready: #50e3c2;
  --ready-soft: rgba(80, 227, 194, 0.12);
  --error: #ff5d5d;
  --error-soft: rgba(255, 93, 93, 0.12);
  --warn: #f0b23e;
  --warn-soft: rgba(240, 178, 62, 0.12);
  --preview: #7aa2ff;
  --preview-soft: rgba(122, 162, 255, 0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 248px;
  --topbar-h: 48px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--text); }
p { margin: 0; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; }
h1 { font-size: 22px; font-weight: 600; }
h2 { font-size: 14px; font-weight: 500; }
h3 { font-size: 15px; font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.break { word-break: break-all; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

/* Icons */
.icon { width: 18px; height: 18px; flex: none; }
.icon--sm { width: 14px; height: 14px; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-word { font-weight: 700; font-size: 18px; letter-spacing: -0.03em; }
.brand-product { font-weight: 500; font-size: 18px; color: var(--muted); letter-spacing: -0.02em; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 8px;
  background: #000;
  border-right: 1px solid var(--border);
  padding: 10px 10px 8px;
}
.sidebar-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 6px; }
.team-row {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
  padding: 4px 6px; border-radius: 8px;
}
.team-row:hover { background: var(--surface-2); }
.team-row .brand-mark { width: 22px; height: 22px; border-radius: 6px; }
.team-name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-close { display: none; }
.find {
  position: relative; display: flex; align-items: center; margin: 0 2px 6px;
}
.find .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; width: 15px; height: 15px; }
.find input {
  width: 100%; height: 34px; padding: 0 36px 0 32px;
  font: inherit; font-size: 13.5px; color: var(--text);
  background: #0a0a0a; border: 1px solid var(--border); border-radius: 8px;
}
.find input::placeholder { color: var(--faint); }
.find input:focus { outline: none; border-color: #3a3a3a; }
.find kbd {
  position: absolute; right: 8px; font: 11px var(--mono); color: var(--faint);
  border: 1px solid var(--border-strong); border-radius: 4px; padding: 0 5px; line-height: 16px;
}
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-divider { height: 1px; margin: 8px 8px; background: var(--border); }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 8px;
  color: #a1a1a1; font-weight: 500; font-size: 13.5px;
}
.nav-link:hover { background: #141414; color: var(--text); }
.nav-link[aria-current="page"] { background: #1c1c1c; color: var(--text); }
.nav-link .icon { width: 16px; height: 16px; }
.sidebar-foot {
  margin-top: auto; display: grid; gap: 6px;
  padding: 8px 4px 4px; border-top: 1px solid var(--border);
}
.host-note { margin: 0; padding: 0 8px; color: var(--faint); font-size: 11.5px; }
.sidebar-foot .user-menu { width: 100%; }
.sidebar-foot .user-menu summary { width: 100%; border: 0; border-radius: 8px; padding: 6px; }
.sidebar-foot .menu { left: 8px; right: auto; top: auto; bottom: calc(100% + 6px); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ready); box-shadow: 0 0 0 0 rgba(53, 194, 122, 0.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(53, 194, 122, 0.5); } 70% { box-shadow: 0 0 0 7px rgba(53, 194, 122, 0); } 100% { box-shadow: 0 0 0 0 rgba(53, 194, 122, 0); } }
.scrim { display: none; }

.main-col { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: var(--topbar-h); padding: 0 22px;
  background: #000;
  border-bottom: 1px solid var(--border);
}
.nav-toggle { display: none; }
.crumb, .crumb-page { margin: 0; font-size: 13.5px; color: var(--muted); }
.crumb-page { margin-left: auto; color: var(--text-2); }
.team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-avatar {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, var(--navy), #24345f); color: #fff;
  font-size: 11px; font-weight: 700; border: 1px solid var(--border-strong);
}
.team-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--text-2); background: var(--surface-2);
}
.pill--env { color: #fff; border-color: transparent; background: var(--accent); padding: 1px 7px; font-size: 11px; letter-spacing: 0.01em; }

.search {
  position: relative; display: flex; align-items: center;
  margin-left: auto; width: min(340px, 100%);
}
.search .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 36px; padding: 0 36px 0 34px;
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.search input::placeholder { color: var(--faint); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search kbd {
  position: absolute; right: 8px; font: 11px var(--mono); color: var(--faint);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px;
}

.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  color: var(--text-2); background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.nav-toggle, .icon-btn.nav-close { display: none; }

.user-menu { position: relative; }
.user-menu summary {
  display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer;
  padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid var(--border);
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--surface-2); }
.avatar {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12px;
}
.user-name { font-weight: 500; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px;
}
.menu-label { padding: 8px 10px; color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-label strong { color: var(--text); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text-2); }
.menu-item:hover { background: var(--surface-2); color: var(--text); }

.content { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 22px 22px 64px; }
.content:focus { outline: none; }
.footer {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 12px;
}

/* Page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.lede { margin-top: 6px; color: var(--muted); max-width: 640px; }
.lede strong { color: var(--text); font-weight: 600; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions form { margin: 0; }
.page-head--project h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-hero { display: flex; gap: 16px; align-items: center; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--faint); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn--primary { background: var(--text); color: #0a0d14; }
.btn--primary:hover { background: #fff; color: #0a0d14; }
.page-actions .btn--primary, .not-found .btn--primary { background: var(--accent); color: #fff; }
.page-actions .btn--primary:hover, .not-found .btn--primary:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--link { height: auto; padding: 0; background: none; color: var(--muted); font-weight: 500; }
.btn--link:hover { color: var(--text); }
.btn[aria-busy="true"] { opacity: 0.6; cursor: progress; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.card--flush { padding: 0; }
.card-title { font-size: 14px; margin-bottom: 14px; color: var(--text); }

.overview { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.overview-main, .project-stack { display: grid; gap: 22px; min-width: 0; }
.panel { min-width: 0; }
.panel-head, .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head h2, .section-head h2 { color: var(--text); font-weight: 500; }
.text-link { color: var(--muted); font-size: 13px; }
.text-link:hover { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { position: relative; overflow: hidden; background: #000; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.stat-value { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.stat-hint { color: var(--faint); font-size: 12px; }
.stat--ready .stat-value { color: var(--ready); }
.stat--error .stat-value { color: var(--error); }
.empty-panel { display: grid; justify-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--muted); }
.empty-glyph { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); color: var(--faint); }
.preview-list { gap: 10px; }
.preview-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.project-rail { position: sticky; top: 64px; min-width: 0; }

.section { margin-bottom: 36px; min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; }

/* Project cards */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.project-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-width: 100%; padding: 14px 14px 12px; background: #0a0a0a; transition: border-color 0.15s; overflow: hidden; }
.project-card:hover { border-color: #3a3a3a; }
.project-card-top { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.project-identity { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.project-identity:hover .project-name { text-decoration: underline; text-underline-offset: 3px; }
.project-title { display: grid; min-width: 0; }
.project-name, .project-domain, .project-commit span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-name { font-weight: 600; color: var(--text); }
.project-domain { color: var(--muted); font-size: 12.5px; }
.project-commit, .project-source { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text-2); font-size: 13px; min-width: 0; }
.project-commit span { min-width: 0; }
.project-commit .icon, .project-source { color: var(--faint); }
.project-source { font-size: 12.5px; }
.status-ring {
  display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--border-strong); color: var(--faint);
}
.status-ring--ready { color: #49c17a; border-color: #1f6b45; background: rgba(73, 193, 122, 0.08); }
.status-ring--error { color: var(--error); border-color: rgba(255, 93, 93, 0.45); }
.project-icon {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 8px;
  background: #171717; border: 1px solid var(--border-strong);
  font-weight: 650; font-size: 11px; color: var(--text-2);
}
.project-icon--lg { width: 52px; height: 52px; border-radius: 12px; font-size: 16px; }
.meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.meta dt { color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.meta dd { margin: 2px 0 0; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta dd a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.meta-wide { grid-column: 1 / -1; }
.note, .callout { display: flex; gap: 8px; align-items: flex-start; color: #f5cf86; font-size: 12.5px; }
.note .icon, .callout .icon { color: var(--warn); margin-top: 1px; }
.callout { background: var(--warn-soft); border: 1px solid rgba(240, 178, 62, 0.35); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 20px; font-size: 13.5px; }
.card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--ready { color: var(--ready); background: var(--ready-soft); border-color: rgba(53, 194, 122, 0.3); }
.badge--error { color: var(--error); background: var(--error-soft); border-color: rgba(255, 93, 93, 0.3); }
.badge--neutral { color: var(--text-2); background: var(--surface-2); border-color: var(--border-strong); }
.env { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.env--prod { color: #ffb4a8; background: var(--accent-soft); }
.env--preview { color: var(--preview); background: var(--preview-soft); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; font-size: 11px; color: var(--muted); border: 1px dashed var(--border-strong); }

/* Tables */
.table-wrap { overflow-x: auto; max-width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--faint); background: var(--bg-elev); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.015); }
.table a:hover { text-decoration: underline; text-underline-offset: 3px; }
.table .strong { color: var(--text); }
.cell-sub { display: block; font-size: 12px; color: var(--faint); margin-top: 1px; }
.table-wrap .empty { border-top: 1px solid var(--border); }
tr.row-new td { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px;
  padding: 14px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.field { display: grid; gap: 5px; min-width: 160px; }
.field--search { flex: 1 1 260px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); }
.field select, .field input {
  height: 36px; font: inherit; color: var(--text);
  background: var(--bg-elev); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 10px;
}
.field select:focus, .field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon .icon { position: absolute; left: 10px; color: var(--faint); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 34px; }
.filter-actions { display: flex; gap: 12px; align-items: center; height: 36px; }
.js [data-no-js] { display: none; }
.result-count { color: var(--muted); font-size: 12.5px; margin: 0 2px 12px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }

/* Key-value */
.prod-panel { margin-bottom: 16px; }
.prod-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr); gap: 18px; }
.prod-preview {
  display: grid; align-content: center; justify-items: center; gap: 6px; min-height: 180px;
  border-radius: 10px; border: 1px solid var(--border); background: radial-gradient(420px 160px at 50% 40%, #1a1a1a, #050505);
  color: var(--text);
}
.prod-preview:hover { border-color: #3a3a3a; }
.prod-preview-kicker { font-weight: 600; }
.prod-meta { display: grid; gap: 12px; margin: 0; align-content: start; }
.prod-meta dt { color: var(--faint); font-size: 12px; }
.prod-meta dd { margin: 2px 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.prod-footnote { margin-top: 14px; color: var(--muted); font-size: 13px; }
.detail-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr); gap: 12px; margin-bottom: 22px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; background: #111; }
.check strong, .check .muted { display: block; }
.check-mark { display: grid; place-items: center; width: 18px; height: 18px; margin-top: 2px; color: var(--ready); }
.check--done { background: #10243a; }
.count-pill { display: inline-flex; margin-left: 8px; padding: 0 7px; border-radius: 999px; background: #1c1c1c; color: var(--muted); font-size: 12px; font-weight: 500; }
.observe { display: grid; gap: 12px; margin: 0; }
.observe dt { color: var(--faint); font-size: 12px; }
.observe dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; }
.overview-card { margin-bottom: 28px; }
.kv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 20px; margin: 0; }
.kv-grid dt, .kv-list dt { color: var(--faint); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.kv-grid dd { margin: 4px 0 0; color: var(--text-2); overflow-wrap: anywhere; }
.kv-grid dd a:hover, .kv-list dd a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.kv-wide { grid-column: span 3; }
.kv-list { display: grid; margin: 0; }
.kv-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv-list > div:last-child { border-bottom: 0; }
.kv-list dd { margin: 0; color: var(--text-2); }
.kv-list.card { padding: 6px 18px; margin-bottom: 12px; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.settings-grid .kv-list > div { grid-template-columns: 140px minmax(0, 1fr); }

/* Tabs */
.tablist { display: none; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; overflow-x: auto; }
.js .tablist { display: flex; }
.tab {
  font: inherit; font-weight: 500; color: var(--muted); background: none; border: 0; cursor: pointer;
  padding: 10px 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-panel { margin-bottom: 28px; }
.tab-panel:focus-visible { outline-offset: 6px; }
.panel-title { margin-bottom: 12px; }
.js .panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.empty-card { display: grid; gap: 6px; }

/* Activity feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.feed-item:last-child { border-bottom: 0; }
.feed-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border-strong); color: var(--muted); background: var(--surface-2); }
.feed-icon .icon { width: 15px; height: 15px; }
.feed-icon--accent { color: var(--accent); border-color: rgba(232, 65, 44, 0.4); background: var(--accent-soft); }
.feed-icon--warn { color: var(--warn); border-color: rgba(240, 178, 62, 0.4); background: var(--warn-soft); }
.feed-body { min-width: 0; color: var(--text-2); }
.feed-body strong { color: var(--text); }
.feed-body a { color: var(--text); }
.feed-body a:hover { text-decoration: underline; text-underline-offset: 3px; }
.feed-meta { color: var(--faint); font-size: 12px; margin-top: 2px; }

.chip-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.chip { display: inline-block; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-2); }
.chip:hover { border-color: var(--muted); }

.not-found { max-width: 480px; margin: 48px auto; display: grid; gap: 10px; justify-items: start; padding: 32px; }
.eyebrow { color: var(--accent); font: 600 12px var(--mono); letter-spacing: 0.1em; }

/* Toasts */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-left: 3px solid var(--ready);
  border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow); color: var(--text-2);
  animation: toast-in 0.2s ease-out;
}
.toast--error { border-left-color: var(--error); }
.toast strong { display: block; color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Responsive */
@media (max-width: 1080px) {
  .split, .overview, .prod-grid, .detail-split { grid-template-columns: minmax(0, 1fr); }
  .project-rail { position: static; order: -1; }
}
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kv-wide { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50; width: min(280px, 86vw);
    transform: translateX(-100%); visibility: hidden; box-shadow: var(--shadow);
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  .nav-open .sidebar { transform: none; visibility: visible; transition: transform 0.22s ease; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  .icon-btn.nav-toggle, .icon-btn.nav-close { display: inline-grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .search kbd { display: none; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .team-name { max-width: 9rem; }
  .user-name { display: none; }
  .crumb-page { display: none; }
  .search { width: auto; flex: 1; }
  .content { padding: 22px 14px 40px; }
  h1 { font-size: 22px; }
  .stats { gap: 10px; }
  .stat-value { font-size: 26px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .kv-list > div, .settings-grid .kv-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .field { flex: 1 1 140px; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
