:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #e4e7ec;
  --text: #1a1d23;
  --text-dim: #667085;
  --text-faint: #98a2b3;
  --primary: #4f46e5;
  --primary-soft: #eef2ff;
  --green: #16a34a; --green-soft: #dcfce7;
  --amber: #d97706; --amber-soft: #fef3c7;
  --red: #dc2626; --red-soft: #fee2e2;
  --blue: #2563eb; --blue-soft: #dbeafe;
  --purple: #7c3aed; --purple-soft: #ede9fe;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1);
  --shadow-lg: 0 8px 24px rgba(16,24,40,.12);
  --radius: 12px;
  --sidebar-w: 248px;
  color-scheme: light; /* native controls (selects, scrollbars) follow the theme */
}
[data-theme="dark"] {
  --bg: #0c0e12;
  --surface: #15181e;
  --surface-2: #1c2027;
  --border: #262b33;
  --text: #e6e8ec;
  --text-dim: #98a2b3;
  --text-faint: #667085;
  --primary: #7c83ff;
  --primary-soft: #1e2030;
  --green: #4ade80; --green-soft: #14271a;
  --amber: #fbbf24; --amber-soft: #2a2008;
  --red: #f87171; --red-soft: #2a1414;
  --blue: #60a5fa; --blue-soft: #0f1d33;
  --purple: #a78bfa; --purple-soft: #1c1633;
  --shadow: 0 1px 2px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* sane default for any inline svg; specific rules below override */
svg { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.14em; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 8px; }

/* layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); padding: 18px 14px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  transition: width .18s ease, padding .18s ease; overflow: hidden;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 4px 8px 16px; flex-shrink: 0; }
.brand-logo { height: auto; width: 134px; max-width: 100%; display: block; }
.brand-logo.dark { display: none; }
[data-theme="dark"] .brand-logo.light { display: none; }
[data-theme="dark"] .brand-logo.dark { display: block; }
.brand-sub { font-size: 12px; font-weight: 600; color: var(--text-dim); letter-spacing: .01em; }
.brand-mark { display: none; } /* compact badge, shown only in the collapsed rail */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; }
/* thin, unobtrusive scrollbar for the nav when it overflows */
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.nav::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); padding: 14px 10px 6px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: var(--text-dim); font-weight: 500; cursor: pointer; transition: .12s;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav a .badge { margin-left: auto; }
.sidebar-foot { flex-shrink: 0; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--border); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.me .avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--purple-soft); color: var(--purple);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.me b { font-size: 13px; } .me small { display: block; color: var(--text-dim); font-size: 11px; }

/* Prod Bugs — last comment cell */
.lc-cell { max-width: 240px; }
.lc { display: flex; flex-direction: column; gap: 2px; }
.lc-meta { font-size: 11px; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.lc-text { font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

/* Budget & Cost — hide/show sensitive figures */
.budget-toolbar { display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.budget-toolbar .subtabs { flex: 1; }
.fig-btn { flex-shrink: 0; }
#view-budget.hide-figures .kpi-row,
#view-budget.hide-figures .panel,
#view-budget.hide-figures .chart-wrap {
  filter: blur(9px); user-select: none; pointer-events: none; transition: filter .12s ease;
}
@media print { #view-budget.hide-figures .kpi-row, #view-budget.hide-figures .panel, #view-budget.hide-figures .chart-wrap { filter: none !important; } }

/* Budget & Cost */
.rate-note { display: flex; align-items: center; gap: 9px; margin: 2px 0 14px; padding: 10px 14px; border-radius: 10px;
  background: rgba(217,119,6,.10); border: 1px solid rgba(217,119,6,.3); color: var(--text); font-size: 12.5px; }
.rate-note svg { width: 16px; height: 16px; color: #d97706; flex-shrink: 0; }
.rate-note code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.est-form { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.est-form input { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; color: var(--text); font: inherit; font-size: 14px; min-width: 150px; outline: none; }
.est-form input:focus { border-color: var(--primary); }

/* AI engineering digest */
.digest-empty { display: flex; align-items: center; gap: 14px; }
.digest-empty .ai-badge { flex-shrink: 0; }
.digest .dg-top { display: flex; gap: 14px; align-items: flex-start; }
.dg-rationale { font-size: 14px; font-weight: 500; margin: 0 0 6px; flex: 1; line-height: 1.5; }
.dg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 8px; }
@media (max-width: 760px) { .dg-grid { grid-template-columns: 1fr; } }
.dg-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 8px; }
.dg-h svg { width: 15px; height: 15px; }
.dg-item { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.45; }
.dg-item:first-of-type { border-top: none; }
.dg-hi { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; }
.impact, .pri-tag { flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.impact.high, .pri-tag.p1 { background: rgba(220,38,38,.13); color: #dc2626; }
.impact.medium, .pri-tag.p2 { background: rgba(217,119,6,.14); color: #d97706; }
.impact.low, .pri-tag.p3 { background: rgba(8,145,178,.13); color: #0891b2; }
.dg-weekly { display: flex; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 10px; background: var(--surface-2); }
.dg-weekly svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--primary); margin-top: 2px; }
.dg-weekly p { margin: 3px 0 0; font-size: 13px; line-height: 1.55; color: var(--text); font-style: italic; }
.ai-tag { display: inline-block; font-size: 9.5px; font-weight: 700; background: rgba(139,92,246,.16); color: #7c3aed; padding: 1px 5px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }

/* Engineering Metrics — team filter bar */
.eng-filter-row { display: flex; align-items: center; gap: 12px; margin: 2px 0 14px; flex-wrap: wrap; }
.eng-filter-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; }
.eng-filter-label svg { width: 15px; height: 15px; }
.eng-filter-row .segmented { flex-wrap: wrap; }
tr.row-hi > td { background: var(--primary-soft); }

/* AI Usage — model pills + chart titles */
.model-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.model-pill { background: rgba(139,92,246,.13); color: #7c3aed; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 99px; }
.model-pill b { color: #6d28d9; margin-left: 2px; }
[data-theme="dark"] .model-pill { color: #c4b5fd; background: rgba(139,92,246,.18); }
[data-theme="dark"] .model-pill b { color: #ddd6fe; }
.chart-title { font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 10px; }

/* Engineering Metrics — DORA level chips + health grade banner */
.level-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .03em; vertical-align: middle; }
.level-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.level-chip.elite { color: #16a34a; background: rgba(22,163,74,.13); }
.level-chip.high { color: #0891b2; background: rgba(8,145,178,.13); }
.level-chip.medium { color: #d97706; background: rgba(217,119,6,.14); }
.level-chip.low { color: #dc2626; background: rgba(220,38,38,.13); }
.kpi.dora .label .proxy { font-size: 9.5px; font-weight: 700; text-transform: uppercase; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; margin-left: 4px; letter-spacing: .04em; }
.eng-grade-banner { display: flex; align-items: center; gap: 18px; padding: 18px 20px; margin: 4px 0 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.eng-grade { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center;
  font-size: 34px; font-weight: 800; color: #fff; flex-shrink: 0; }
.eng-grade.a { background: linear-gradient(135deg, #16a34a, #22c55e); }
.eng-grade.b { background: linear-gradient(135deg, #0891b2, #06b6d4); }
.eng-grade.c { background: linear-gradient(135deg, #d97706, #f59e0b); }
.eng-grade.d { background: linear-gradient(135deg, #ea580c, #f97316); }
.eng-grade.f { background: linear-gradient(135deg, #dc2626, #ef4444); }
.eng-grade.na { background: var(--surface-2); color: var(--text-dim); }

/* Clickable insight cards + "view related tickets" link */
.ins-card.clickable { cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.ins-card.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.rec-link { display: flex; align-items: center; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border);
  color: var(--primary); font-weight: 600; font-size: 13px; }
.rec-link svg { width: 15px; height: 15px; }
.rec-link svg:last-child { margin-left: auto; }
.ins-card.clickable:hover .rec-link svg:last-child { transform: translateX(3px); transition: transform .12s; }

/* Modal */
#modal-root .modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(2, 6, 23, .55);
  backdrop-filter: blur(2px); display: grid; place-items: center; padding: 24px; animation: fade .12s ease; }
#modal-root .modal { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  width: min(960px, 100%); max-height: 86vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); overflow: hidden; }
#modal-root .modal-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
#modal-root .modal-head h3 { font-size: 16px; margin: 0; flex: 1; line-height: 1.35; }
#modal-root .modal-body { padding: 18px 20px; overflow: auto; }
#modal-root .modal-sub { display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 13px; margin-bottom: 14px; text-transform: capitalize; }
#modal-root .modal-sub svg { width: 15px; height: 15px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* Create-ticket form */
.create-form { display: flex; flex-direction: column; gap: 12px; }
.create-form .cf-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.create-form #cf-bug-fields .cf-row { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .create-form .cf-row { grid-template-columns: 1fr; } }
.cf-field { display: flex; flex-direction: column; gap: 4px; }
.cf-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); }
.cf-label .req { color: #d03b3b; }
.cf-field input, .cf-field select, .cf-field textarea {
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px;
  color: var(--text); font: inherit; font-size: 13.5px; outline: none; width: 100%; }
.cf-field textarea { resize: vertical; line-height: 1.5; }
.cf-field input:focus, .cf-field select:focus, .cf-field textarea:focus { border-color: var(--primary); }
.cf-hint { font-size: 11px; color: var(--text-faint); }
.cf-msg { font-size: 12.5px; min-height: 16px; }
.cf-msg.err { color: #d03b3b; font-weight: 600; }
.cf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 2px; }

/* Toast */
#toast { position: fixed; bottom: 22px; right: 22px; z-index: 200; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: 12px; padding: 13px 18px;
  font-size: 13.5px; box-shadow: var(--shadow-lg); max-width: 380px; opacity: 0; transform: translateY(10px);
  pointer-events: none; transition: opacity .18s, transform .18s; }
#toast.show { opacity: 1; transform: none; pointer-events: auto; }
#toast a { color: var(--primary); font-weight: 700; }

/* Collapsed icon-rail sidebar (desktop) */
.app.collapsed { --sidebar-w: 70px; }
.app.collapsed .sidebar { padding: 18px 10px; }
.app.collapsed .brand { align-items: center; justify-content: center; padding: 6px 0 18px; }
.app.collapsed .brand > div,
.app.collapsed .brand-logo,
.app.collapsed .nav a span,
.app.collapsed .me > div { display: none !important; }
.app.collapsed .brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, #003D71, #0b5c86); color: #fff; font-weight: 800;
  font-size: 12px; letter-spacing: -.02em;
}
.app.collapsed .nav a { justify-content: center; padding: 10px 0; gap: 0; }
.app.collapsed .nav-label { font-size: 0; padding: 9px 0 3px; margin: 0 12px; border-top: 1px solid var(--border); }
.app.collapsed .me { justify-content: center; padding: 6px 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px;
  border-bottom: 1px solid var(--border); background: var(--surface);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 650; }
.topbar .sub { color: var(--text-dim); font-size: 12.5px; }
.search { margin-left: auto; position: relative; }
.search input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 12px 8px 34px; color: var(--text); width: 230px; font-size: 13px; outline: none;
}
.search input:focus { border-color: var(--primary); }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--text-faint); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-dim); display: grid; place-items: center;
  cursor: pointer; transition: .12s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

.content { padding: 24px 26px 60px; }
.view { display: none; }
.view.active { display: block; animation: fade .25s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* live banner */
.live-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.live-pill.live { background: var(--green-soft); color: var(--green); }
.live-pill.sample { background: var(--amber-soft); color: var(--amber); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* kpi cards */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.kpi .label { color: var(--text-dim); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .label .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.kpi .ic svg { width: 16px; height: 16px; }
.kpi .num { font-size: 28px; font-weight: 700; margin-top: 10px; letter-spacing: -.02em; }
.kpi .num .u { font-size: 62%; font-weight: 600; color: var(--text-dim); margin-left: 1px; }
.kpi .foot { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }

.section-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; }
.section-head .spacer { flex: 1; }
.section-head h2 { font-size: 15.5px; margin: 0; font-weight: 650; }
.section-head .count { color: var(--text-faint); font-size: 13px; }
.section-head > svg { width: 18px; height: 18px; color: var(--text-dim); }

/* Collapsible sections (native <details>) — collapsed by default */
details.collapsible { margin: 0; }
details.collapsible > summary { cursor: pointer; list-style: none; user-select: none; }
details.collapsible > summary::-webkit-details-marker { display: none; }
details.collapsible > summary::after { content: "▸"; margin-left: auto; color: var(--text-faint); font-size: 13px; transition: transform .15s ease; }
details.collapsible[open] > summary::after { transform: rotate(90deg); }
details.collapsible > summary:hover h2 { color: var(--accent, #6366f1); }

/* team cards */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.team-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); transition: .15s; }
.team-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.team-card .tc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.team-card h3 { margin: 0; font-size: 15px; }
.team-card .proc { font-size: 11px; color: var(--text-dim); }
.chip { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 16px; background: var(--surface-2); color: var(--text-dim); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.purple { background: var(--purple-soft); color: var(--purple); }
.tc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
.tc-stats div { text-align: center; background: var(--surface-2); border-radius: 8px; padding: 8px 4px; }
.tc-stats b { display: block; font-size: 17px; }
.tc-stats span { font-size: 10.5px; color: var(--text-dim); }
.avatars { display: flex; align-items: center; }
.avatars .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; border: 2px solid var(--surface); margin-left: -7px; background: var(--blue-soft); color: var(--blue); }
.avatars .av:first-child { margin-left: 0; }
.tc-flow { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-dim); margin: 2px 0 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.tc-flow svg { width: 14px; height: 14px; color: var(--purple); }
.tc-flow b { color: var(--text); }
.tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.tc-foot .sm { font-size: 11.5px; color: var(--text-dim); }

/* tables */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-faint); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: .1s; }
tbody tr:hover { background: var(--surface-2); }
.tkey { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 600; color: var(--primary); }
a.tkey:hover { text-decoration: underline; }
.muted { color: var(--text-dim); }
.tag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; display: inline-block; }
.tag.todo { background: var(--surface-2); color: var(--text-dim); }
.tag.prog { background: var(--blue-soft); color: var(--blue); }
.tag.review { background: var(--purple-soft); color: var(--purple); }
.tag.blocked { background: var(--red-soft); color: var(--red); }
.tag.done { background: var(--green-soft); color: var(--green); }
.due.overdue { color: var(--red); font-weight: 600; }
.due.due-soon { color: var(--amber); font-weight: 600; }
.prio { display: inline-flex; align-items: center; gap: 5px; }
.prio .pd { width: 7px; height: 7px; border-radius: 2px; }
.prio.High .pd, .prio.Highest .pd { background: var(--red); }
.prio.Medium .pd { background: var(--amber); }
.prio.Low .pd, .prio.Lowest .pd, .prio.None .pd { background: var(--text-faint); }

/* attention list */
.att-item { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.att-item:last-child { border-bottom: none; }
.att-flag { width: 4px; align-self: stretch; border-radius: 3px; }
.att-flag.overdue { background: var(--red); } .att-flag.blocked { background: var(--purple); }
.att-flag.due-soon { background: var(--amber); } .att-flag.later { background: var(--blue); }
.att-body { flex: 1; min-width: 0; }
.att-body .t { font-weight: 550; }
.att-body .m { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.att-due { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-dim); background: var(--surface-2); padding: 4px 9px; border-radius: 7px; }
.att-due svg { width: 13px; height: 13px; }
.att-due.overdue { background: var(--red-soft); color: var(--red); }
.att-due.due-soon { background: var(--amber-soft); color: var(--amber); }

/* agents */
.agent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.agent-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .15s; }
.agent-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.agent-card .ah { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.agent-card .emoji { font-size: 24px; width: 44px; height: 44px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; }
.agent-card h3 { margin: 0; font-size: 14.5px; }
.agent-card .cat { font-size: 11px; color: var(--text-dim); }
.agent-card p { color: var(--text-dim); font-size: 12.5px; margin: 0 0 14px; flex: 1; }
.agent-card .invoke { font-family: ui-monospace, monospace; font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.copy-btn { cursor: pointer; color: var(--text-faint); }
.copy-btn:hover { color: var(--primary); }
/* live agent run UI */
.agent-card .live-dot { color: var(--green); font-weight: 600; }
.agent-input { width: 100%; resize: vertical; min-height: 42px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; color: var(--text); font: inherit; font-size: 13px; outline: none; margin-bottom: 10px; }
.agent-input:focus { border-color: var(--primary); }
.agent-card .agent-run { width: 100%; justify-content: center; }
.agent-out { margin-top: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 13px 15px; font-size: 13px; line-height: 1.55; max-height: 380px; overflow: auto; }
.agent-out.loading { color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.agent-out.loading svg { width: 16px; height: 16px; color: var(--primary); animation: spin 1.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn.spinning svg { animation: spin .8s linear infinite; }
.icon-btn:disabled { opacity: .6; cursor: default; }
/* Help / Take-a-tour button — branded so newcomers notice it */
#help-btn { color: #fff; border-color: transparent; background: linear-gradient(140deg, var(--primary), var(--purple)); box-shadow: 0 4px 12px rgba(79,70,229,.28); }
#help-btn:hover { color: #fff; filter: brightness(1.08); }
#help-btn.attention { animation: helpPulse 1.6s ease-out 4; }
@keyframes helpPulse {
  0%   { box-shadow: 0 0 0 0 rgba(79,70,229,.5), 0 4px 12px rgba(79,70,229,.28); }
  70%  { box-shadow: 0 0 0 12px rgba(79,70,229,0), 0 4px 12px rgba(79,70,229,.28); }
  100% { box-shadow: 0 0 0 0 rgba(79,70,229,0), 0 4px 12px rgba(79,70,229,.28); }
}
@media (prefers-reduced-motion: reduce) { #help-btn.attention { animation: none; } }
.agent-out h3 { font-size: 14px; margin: 12px 0 6px; } .agent-out h4 { font-size: 13px; margin: 10px 0 4px; }
.agent-out ul { margin: 6px 0; padding-left: 20px; } .agent-out li { margin: 3px 0; }
.agent-out code, .notice code { background: var(--primary-soft); color: var(--primary); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
.agent-warn { color: var(--amber); }
/* a little extra polish */
.agent-card { background: linear-gradient(180deg, var(--surface), var(--surface)); border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--primary), var(--purple)) 1; }
.kpi { position: relative; overflow: hidden; }

/* reports */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.fbtn { padding: 7px 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); cursor: pointer; font-size: 13px; font-weight: 500; transition: .12s; }
.fbtn:hover { background: var(--surface-2); }
.fbtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.ext-badge { font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; background: var(--surface-2); color: var(--text-dim); }
.ext-badge.pdf { background: var(--red-soft); color: var(--red); }
.ext-badge.html { background: var(--amber-soft); color: var(--amber); }
.ext-badge.xlsx, .ext-badge.csv { background: var(--green-soft); color: var(--green); }
.ext-badge.docx { background: var(--blue-soft); color: var(--blue); }

/* MS panel */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.msg-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.msg-item:last-child { border-bottom: none; }
.msg-item .av { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex-shrink: 0; }
.notice { background: var(--amber-soft); color: var(--amber); border-radius: 10px; padding: 12px 16px; font-size: 13px; margin-bottom: 16px; }
.notice ol { margin: 8px 0 0; padding-left: 20px; } .notice li { margin: 3px 0; }

/* Ask AI box */
.ask-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 22px; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--primary), var(--purple)) 1; }
.ask-head { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 11px; }
.ask-head svg { width: 18px; height: 18px; color: var(--primary); }
.ask-head .muted { font-weight: 400; }
.ask-row { display: flex; gap: 10px; }
.ask-row input { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 11px 14px; color: var(--text); font: inherit; font-size: 14px; outline: none; }
.ask-row input:focus { border-color: var(--primary); }
.ask-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 5px 12px; font-size: 12px; color: var(--text-dim); cursor: pointer; transition: .12s; }
.chip-btn:hover { border-color: var(--primary); color: var(--primary); }
.ask-answer { margin-top: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; font-size: 13.5px; line-height: 1.55; max-height: 440px; overflow: auto; }
.ask-answer.loading { color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.ask-answer.loading svg { width: 16px; height: 16px; color: var(--primary); animation: spin 1.4s linear infinite; }
.ask-answer h3, .ask-answer h4 { font-size: 14px; margin: 10px 0 5px; }
.ask-answer ul { margin: 6px 0; padding-left: 20px; } .ask-answer li { margin: 3px 0; }
.ask-answer code { background: var(--primary-soft); color: var(--primary); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

/* AI insights */
.ins-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); margin-bottom: 20px; }
.ins-head .ai-badge { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--purple)); color: #fff; flex-shrink: 0; }
.ins-head .ai-badge svg { width: 22px; height: 22px; }
.ins-head h2 { margin: 0; font-size: 16px; }
.ins-head .meta { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.ins-head .spacer { flex: 1; }
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 9px; border: 1px solid var(--primary); background: var(--primary); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; transition: .12s; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .6; cursor: default; }
.btn svg { width: 15px; height: 15px; }
.mode-tag { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 16px; background: var(--purple-soft); color: var(--purple); }
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ins-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.ins-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.ins-card .bar { height: 4px; }
.ins-card.high .bar { background: var(--red); } .ins-card.medium .bar { background: var(--amber); } .ins-card.low .bar { background: var(--blue); }
.ins-card .body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ins-card .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pri { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 3px 8px; border-radius: 6px; }
.pri.high { background: var(--red-soft); color: var(--red); } .pri.medium { background: var(--amber-soft); color: var(--amber); } .pri.low { background: var(--blue-soft); color: var(--blue); }
.ins-card h3 { margin: 0; font-size: 14.5px; line-height: 1.35; }
.ins-card .detail { font-size: 13px; color: var(--text-dim); margin: 0; }
.ins-card .action { font-size: 12.5px; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; }
.ins-card .action svg { width: 15px; height: 15px; color: var(--amber); margin-top: 1px; flex-shrink: 0; }
.ins-card .subj { font-size: 11.5px; color: var(--text-faint); }
.src-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; margin-left: auto; }
.src-tag.claude { background: var(--purple-soft); color: var(--purple); } .src-tag.rule { background: var(--surface-2); color: var(--text-faint); }

.badge.amber { background: var(--amber); }

/* prod-bugs filter bar + selected team card */
.kpi.sel { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary), var(--shadow-lg); transform: translateY(-2px); }
.kpi.sel .num { color: var(--primary); }
.kpi.dim { opacity: .5; }
.kpi.dim:hover { opacity: 1; }
.sel-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 7px; border-radius: 10px; background: var(--primary); color: #fff; margin-left: 6px; }
.sel-tag svg { width: 11px; height: 11px; }
.fbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.fsel { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: .03em; }
.fsel select, .fsel input { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 8px 11px; color: var(--text); font: inherit; font-size: 13px; min-width: 140px; cursor: pointer; outline: none; }
.fsel input { cursor: text; min-width: 220px; }
.fsel input:focus, .fsel select:focus { border-color: var(--primary); }
.fsel select:focus { border-color: var(--primary); }
.fclear { align-self: center; color: var(--primary); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.fclear:hover { text-decoration: underline; }
.kpi-flt { display: inline-flex; align-items: center; gap: 7px; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 600; padding: 7px 12px; border-radius: 9px; align-self: center; }
.kpi-flt .x { cursor: pointer; opacity: .7; } .kpi-flt .x:hover { opacity: 1; }
.team-collapse { margin-bottom: 8px; }
.team-collapse > summary { cursor: pointer; display: flex; align-items: center; gap: 9px; font-size: 15.5px; font-weight: 650; color: var(--text); list-style: none; padding: 4px 0; }
.team-collapse > summary::-webkit-details-marker { display: none; }
.team-collapse > summary::before { content: "▸"; color: var(--text-faint); font-size: 12px; transition: transform .15s; }
.team-collapse[open] > summary::before { transform: rotate(90deg); }
.team-collapse > summary svg { width: 18px; height: 18px; color: var(--text-dim); }
.team-collapse > summary .count { color: var(--text-faint); font-size: 13px; font-weight: 400; }
.kpi.mine { border-color: var(--primary); }
.mine-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 1px 6px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); margin-left: 4px; }
.tm-chip { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 14px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.bug-bk { white-space: normal; }

/* Employee Performance */
.perf-head-card { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.perf-head-card .avatar.big { width: 54px; height: 54px; font-size: 19px; flex-shrink: 0; }
.perf-id { flex: 1; min-width: 0; }
.perf-id h2 { margin: 0 0 3px; font-size: 20px; }
.perf-id .meta { font-size: 12.5px; color: var(--text-dim); }
.perf-dir { text-align: right; flex-shrink: 0; max-width: 340px; }
.perf-dir-badge { display: inline-block; font-size: 15px; font-weight: 800; color: var(--dc); padding: 6px 14px; border-radius: 20px; background: color-mix(in srgb, var(--dc) 12%, transparent); }
.perf-dir-sub { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
.perf-tiles { margin-bottom: 16px; }
.perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
@media (max-width: 920px) { .perf-grid { grid-template-columns: 1fr; } }
.perf-grid .chart-wrap svg { width: 100%; height: auto; }
.perf-note { font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.perf-snap-panel { margin-bottom: 16px; }
.perf-snap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 4px; }
@media (max-width: 920px) { .perf-snap { grid-template-columns: 1fr 1fr; } }
.snap { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.snap-dim { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); }
.snap-chip { display: inline-block; margin: 6px 0 4px; font-size: 13px; font-weight: 800; padding: 3px 12px; border-radius: 14px; }
.snap-chip.vgood { color: #0ca30c; background: rgba(12, 163, 12, .12); }
.snap-chip.vmid { color: var(--text); background: var(--surface-2); }
.snap-chip.vbad { color: #d03b3b; background: rgba(208, 59, 59, .12); }
.snap-chip.vgray { color: var(--text-faint); background: var(--surface-2); }
.snap-sub { font-size: 11px; color: var(--text-dim); }
.perf-insights { margin: 16px 0; }
.perf-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 920px) { .perf-2col { grid-template-columns: 1fr; } }
.perf-list { margin: 6px 0 0 18px; padding: 0; font-size: 12.5px; line-height: 1.6; }
.perf-list li { margin-bottom: 7px; }
.perf-cmp th, .perf-cmp td { font-size: 12.5px; }
.goal-line { border-bottom: 1px solid var(--border); height: 34px; font-size: 12px; color: var(--text-dim); padding-top: 14px; }
.bug-bk .bk-test { color: #2563eb; font-weight: 600; }
.src-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 11px; font-weight: 700;
  color: #4f46e5; background: var(--primary-soft); padding: 2px 9px; border-radius: 14px; }
.src-chip svg { width: 11px; height: 11px; }
.src-jira { font-size: 11.5px; }
tr.row-created > td { background: color-mix(in srgb, var(--primary) 6%, transparent); }
tr.row-created .tkey { font-weight: 700; }
.btn-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: var(--primary); background: var(--primary-soft); border: none; border-radius: 8px; padding: 4px 10px; white-space: nowrap; }
.btn-mini svg { width: 12px; height: 12px; }
.btn-mini:hover { filter: brightness(.95); }
.vuln-jira { white-space: nowrap; }
.vuln-jira .tkey { font-weight: 700; }
.print-only { display: none !important; }
.bug-bk .bk-open { color: #d97706; font-weight: 600; }
.bug-bk .bk-blocked { color: #dc2626; font-weight: 600; }
.bug-bk .bk-pass { color: #16a34a; font-weight: 600; }
.bug-bk .bk-closed { color: var(--text-dim); font-weight: 600; }

/* JQL panel */
.jql-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 16px; margin-bottom: 18px; }
.jql-box summary { cursor: pointer; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; color: var(--text); list-style: none; }
.jql-box summary::-webkit-details-marker { display: none; }
.jql-box summary svg { width: 15px; height: 15px; color: var(--text-dim); }
.jql-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); }
.jql-box textarea { width: 100%; margin-top: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 11px 13px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.5; resize: vertical; outline: none; }
.jql-box textarea:focus { border-color: var(--primary); }
.jql-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.jql-msg { font-size: 12px; }
.jql-msg.err { color: var(--red); font-weight: 600; }

/* clickable KPI cards */
.kpi.clickable { cursor: pointer; transition: .15s; }
.kpi.clickable:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: var(--primary); }
.kpi .go { position: absolute; right: 14px; bottom: 12px; color: var(--text-faint); opacity: 0; transition: .15s; }
.kpi .go svg { width: 14px; height: 14px; }
.kpi.clickable:hover .go { opacity: 1; }

/* ticket filter banner */
.filter-banner { display: flex; align-items: center; gap: 10px; background: var(--primary-soft); color: var(--primary); border-radius: 10px; padding: 9px 14px; margin-bottom: 14px; font-size: 13px; font-weight: 500; }
.filter-banner .clear { margin-left: auto; cursor: pointer; font-weight: 600; }
.filter-banner .clear:hover { text-decoration: underline; }

/* leadership update */
.lead-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.lf-row { display: flex; align-items: center; gap: 10px; }
.lead-form input[type=date], .lead-form textarea { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; color: var(--text); font: inherit; font-size: 13px; outline: none; }
.lead-form input[type=date]:focus, .lead-form textarea:focus { border-color: var(--primary); }
.lead-form textarea { resize: vertical; }
.lead-form .btn { align-self: flex-start; }
.past-list { display: flex; flex-direction: column; gap: 10px; }
.past-item { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--surface-2); }
.pi-head { display: flex; align-items: center; margin-bottom: 6px; }
.pi-del { margin-left: auto; }
.pi-text { font-size: 12.5px; color: var(--text-dim); white-space: pre-wrap; max-height: 120px; overflow: auto; line-height: 1.5; }
.draft-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.btn-ghost { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-ghost svg { width: 14px; height: 14px; }

/* segmented view switcher */
.segmented { display: inline-flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.seg { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border: none; background: none; color: var(--text-dim); font: inherit; font-size: 13px; font-weight: 600; border-radius: 7px; cursor: pointer; }
.seg svg { width: 15px; height: 15px; }
.seg:hover { color: var(--text); }
.seg.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* kanban board */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start; }
.kcol { flex: 0 0 272px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; max-height: 74vh; }
.kcol-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 13px; font-weight: 650; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-dim); position: sticky; top: 0; background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: 12px 12px 0 0; z-index: 1; }
.kcol-head .kname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcount { flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1px 9px; font-size: 12px; color: var(--text); }
.kcards { padding: 10px; display: flex; flex-direction: column; gap: 9px; overflow-y: auto; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--text-faint); border-radius: 9px; padding: 10px 11px; box-shadow: var(--shadow); transition: .12s; }
.kcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.kcard.prio-Highest, .kcard.prio-High { border-left-color: var(--red); }
.kcard.prio-Medium { border-left-color: var(--amber); }
.kcard.prio-Low, .kcard.prio-Lowest, .kcard.prio-None { border-left-color: var(--blue); }
.kc-top { display: flex; align-items: center; justify-content: space-between; }
.kc-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; font-weight: 600; color: var(--primary); }
.kc-sum { font-size: 12.5px; margin: 6px 0 9px; line-height: 1.4; color: var(--text); }
.kc-dates { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-dim); background: var(--surface-2); padding: 3px 8px; border-radius: 6px; margin-bottom: 8px; }
.kc-dates svg { width: 12px; height: 12px; }
.kc-dates.od { background: var(--red-soft); color: var(--red); }
.kc-foot { display: flex; align-items: center; justify-content: space-between; }
.kc-type { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .02em; }
.kc-asg { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-size: 9.5px; font-weight: 700; }
.kempty { color: var(--text-faint); font-size: 12px; text-align: center; padding: 16px 0; }
/* work-by-developer breakdown — reuses .tb-* rows; bar is stacked by issue type */
.dev-breakdown .tb-label { width: 170px; }
.tb-stack { display: flex; height: 100%; border-radius: 6px; overflow: hidden; }
.tb-seg { height: 100%; display: flex; align-items: center; justify-content: center; min-width: 4px; }
.tb-seg span { font-size: 10px; font-weight: 700; color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
/* work-by-type breakdown */
.tb-row { display: flex; align-items: center; gap: 14px; padding: 7px 0; }
.tb-label { width: 120px; flex-shrink: 0; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tb-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.tb-bar { flex: 1; display: flex; height: 18px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.tb-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width .2s; }
.tb-bar .seg-done, .tb-bar .seg-od, .tb-bar .seg-rem { height: 100%; transition: width .2s; }
.seg-done { background: #16a34a; } .seg-od { background: #dc2626; } .seg-rem { background: #4f46e5; }
.tb-label .av { vertical-align: middle; }
.tb-val { width: 84px; text-align: right; font-size: 12.5px; color: var(--text-dim); flex-shrink: 0; }

/* report sub-tabs */
.subtabs { display: flex; gap: 8px; margin-bottom: 18px; border-bottom: 1px solid var(--border); padding-bottom: 0; flex-wrap: wrap; }
.subtab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border: none; background: none; color: var(--text-dim); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtab svg { width: 16px; height: 16px; }
.subtab:hover { color: var(--text); }
.subtab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* cycle-time charts */
.chart-wrap { padding: 14px; overflow-x: auto; }
/* override the global icon-sizing rule (svg{width:1em}) for real charts */
.chart-wrap svg { display: block; width: 100%; height: auto; max-width: 960px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 4px 2px; font-size: 12px; color: var(--text-dim); }
.chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend .lg i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cycle-actions .btn-ghost { margin-left: 0; }

/* ---- Prod Bugs report visuals — shared by the PDF (print) and the Image export.
   These only style `.bug-print-report` (display:none on screen) and `.print-footer`
   (`.print-only`, hidden on screen), so they have NO effect on the live web view.
   The image export clones `.bug-print-report` into a visible off-screen box that
   carries `.report-shot`, so these rules render there too. ---- */
.bug-print-report svg, .report-shot svg { width: 100%; height: auto; }
.bp-head { border-bottom: 2px solid #4f46e5; padding-bottom: 7px; margin-bottom: 10px; }
.bp-head h2 { font-size: 21px; margin: 0; letter-spacing: -.2px; color: #0b0b0b; }
.bp-scope { font-size: 14px; font-weight: 700; color: #4f46e5; margin: 2px 0 3px; }
.bp-scope-sub { font-weight: 600; color: #52514e; font-size: 12px; }
.bp-meta { font-size: 10.5px; color: #898781; margin: 0; }
.print-footer { text-align: center; font-size: 8px; color: #898781; letter-spacing: .02em;
  border-top: 1px solid #e1e0d9; padding-top: 3px; margin: 0 2mm; }
.bp-tiles { display: flex; gap: 6px; margin-bottom: 7px; }
.bp-tile { flex: 1; border: 1px solid #d4d7dd; border-radius: 8px; padding: 5px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 3px 8px rgba(17, 24, 39, .10), inset 0 1px 0 #ffffff;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bp-lbl { font-size: 7.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #52514e; }
.bp-val { font-size: 18px; font-weight: 700; color: #0b0b0b; line-height: 1.1; }
.bp-sub { font-size: 8.5px; font-weight: 600; color: #52514e; }
.bp-block { border: 1px solid #d4d7dd; border-radius: 8px; padding: 6px 10px; break-inside: avoid;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 3px 8px rgba(17, 24, 39, .10), inset 0 1px 0 #ffffff;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bp-wide { margin-bottom: 12px; }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.bp-full { grid-column: 1 / -1; }
.bp-title { font-size: 10.5px; font-weight: 700; color: #0b0b0b; margin-bottom: 4px; }
.bug-print-report .chart-legend, .report-shot .chart-legend { padding: 3px 2px 0; font-size: 9.5px; color: #52514e; }
.bp-teams { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 7px; }
.bp-team { border: 1px solid #d4d7dd; border-radius: 8px; padding: 5px 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 3px 8px rgba(17, 24, 39, .10), inset 0 1px 0 #ffffff;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bp-team-head { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 700; color: #0b0b0b; }
.bp-dot { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.bp-team-total { margin-left: auto; font-size: 14px; font-weight: 700; }
.bp-team-bar { display: flex; gap: 2px; height: 8px; border-radius: 3px; overflow: hidden; margin: 4px 0 3px; }
.bp-team-bar span { min-width: 3px; }
.bp-team-nums { font-size: 7.5px; color: #52514e; line-height: 1.25; }
.bp-single { border: 1px solid #d4d7dd; border-radius: 9px; padding: 9px 14px; margin-bottom: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 3px 8px rgba(17, 24, 39, .10), inset 0 1px 0 #ffffff;
  print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.bp-single-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #0b0b0b; }
.bp-single-total { margin-left: auto; font-size: 18px; font-weight: 700; }
.bp-single-bar { display: flex; gap: 2px; height: 13px; border-radius: 5px; overflow: hidden; margin: 7px 0 5px; }
.bp-single-bar span { min-width: 5px; }
.bp-single-nums { font-size: 11.5px; color: #52514e; }
/* Off-screen container the image export renders into (html2canvas) */
.report-shot { position: fixed; left: -100000px; top: 0; width: 820px; background: #fff; padding: 20px; }

/* =====================================================================
   Engineering Metrics — export document (PDF + PNG), single source of truth.
   Applied by adding `.pdf-shot` to #view-report during export, removed after.
   html2canvas (PNG) ignores @media print, so ALL visual styling lives here as a
   class; @media print below only handles page setup (margins, page breaks, footer).
   Design: ink-on-paper, one blue accent (title rule only), all-sans with a real
   type scale + tabular numerals, borderless metric cells, hairline rules.
   Palette — ink #0f1216 · body #3d434c · muted #8a919b · faint #aab0b8
             hairline #e7e9ee · rule #d3d7de · accent #2a44c8 · paper #fff
   ===================================================================== */
#view-report.pdf-shot {
  --doc-font: "Avenir Next", "Avenir", -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --doc-ink: #171a2b; --doc-body: #3f4457; --doc-muted: #666d80; --doc-faint: #82889a;
  --doc-hairline: #e8eaf1; --doc-brand: #4f46e5; --doc-brand-soft: #eef0fd;
  --doc-card-border: #e3e6f0;
  --doc-card-shadow: 0 1px 2px rgba(23,26,43,.05), 0 3px 8px rgba(79,70,229,.07), 0 10px 24px rgba(23,26,43,.06);
  color: var(--doc-body); background: #fff;
  font-family: var(--doc-font);
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
  font-size: 12px; line-height: 1.5; letter-spacing: .002em;
}
#view-report.pdf-shot * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

/* --- what shows / hides in the export --- */
#view-report.pdf-shot .no-pdf,
#view-report.pdf-shot .eng-filter-row,
#view-report.pdf-shot .eng-grade-banner,
#view-report.pdf-shot #report-body > .cycle-actions,
#view-report.pdf-shot .section-head > svg,
#view-report.pdf-shot .kpi .label .ic,
#view-report.pdf-shot .ai-badge { display: none !important; }
#view-report.pdf-shot .print-only { display: block !important; }
#view-report.pdf-shot details.collapsible > *:not(summary) { display: block !important; }
#view-report.pdf-shot details.collapsible > summary::after { display: none !important; }
#view-report.pdf-shot details.collapsible > summary { cursor: default; }
/* keep the "AI Usage" heading, strip its toolbar chrome so it reads as a section */
#view-report.pdf-shot #aiusage-body .cycle-actions {
  display: flex !important; background: none !important; border: 0 !important;
  box-shadow: none !important; padding: 0 !important; margin: 34px 0 14px !important;
  border-bottom: 1px solid #e7e9ee !important; padding-bottom: 9px !important; align-items: baseline;
}
#view-report.pdf-shot #aiusage-body .cycle-actions .spacer,
#view-report.pdf-shot #aiusage-body .cycle-actions .btn,
#view-report.pdf-shot #aiusage-body .cycle-actions .btn-ghost { display: none !important; }

/* --- title block (page 1). Signature: brand gradient strip + indigo title rule. --- */
#view-report.pdf-shot .pdf-head { margin: 0 0 30px; padding: 16px 0 18px; border-bottom: 1px solid var(--doc-hairline); position: relative; }
#view-report.pdf-shot .pdf-head::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 45%, #0891b2 100%); }
#view-report.pdf-shot .pdf-head-row { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 12px; }
#view-report.pdf-shot .pdf-org { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--doc-ink); }
#view-report.pdf-shot .pdf-org span { color: var(--doc-faint); font-weight: 600; letter-spacing: .1em; }
#view-report.pdf-shot .pdf-tag { font-size: 8.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #b42318; background: #fdf4f3; border: 1px solid #f0d5d2; border-radius: 3px; padding: 4px 9px; }
#view-report.pdf-shot .pdf-title { font-size: 33px; line-height: 1.04; font-weight: 700; letter-spacing: -.02em; color: var(--doc-ink); margin: 24px 0 0; padding-left: 16px; border-left: 4px solid var(--doc-brand); }
#view-report.pdf-shot .pdf-subtitle { display: none; }
#view-report.pdf-shot .pdf-facts { display: flex; flex-wrap: wrap; margin-top: 22px; }
#view-report.pdf-shot .pdf-facts span { padding: 0 18px; border-left: 2px solid var(--doc-brand-soft); font-size: 9.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--doc-muted); }
#view-report.pdf-shot .pdf-facts span:first-child { padding-left: 0; border-left: 0; }

/* --- section headers: brand marker + hairline --- */
#view-report.pdf-shot .section-head { align-items: baseline; gap: 10px; margin: 34px 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--doc-hairline); }
#view-report.pdf-shot .section-head h2,
#view-report.pdf-shot #aiusage-body .cycle-actions h2 { font-size: 14px; font-weight: 700; letter-spacing: -.01em; color: var(--doc-ink); }
#view-report.pdf-shot .section-head h2::before,
#view-report.pdf-shot #aiusage-body .cycle-actions h2::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--doc-brand); margin-right: 9px; transform: rotate(45deg) translateY(-1px); }
#view-report.pdf-shot .section-head .count,
#view-report.pdf-shot #aiusage-body .cycle-actions .meta { font-size: 9.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--doc-faint); }

/* --- KPI cards: executive left-accent tiles — white card, soft shadow, 3px accent
       bar on the left edge cycling the brand palette per position in the row. --- */
#view-report.pdf-shot .kpi-row { display: flex; flex-wrap: nowrap; gap: 12px; margin: 0 0 26px; border: 0; border-radius: 0; overflow: visible; }
#view-report.pdf-shot .kpi {
  flex: 1 1 0; min-width: 0;
  background: #fff !important;
  border: 1px solid var(--doc-card-border) !important; border-left: 3px solid #8b5cf6 !important;
  border-radius: 8px !important;
  box-shadow: 0 1px 2px rgba(23,26,43,.05), 0 4px 10px rgba(23,26,43,.06) !important;
  transform: none !important; padding: 14px 16px;
}
#view-report.pdf-shot .kpi:nth-child(2) { border-left-color: #0891b2 !important; }
#view-report.pdf-shot .kpi:nth-child(3) { border-left-color: #16a34a !important; }
#view-report.pdf-shot .kpi:nth-child(4) { border-left-color: #d97706 !important; }
#view-report.pdf-shot .kpi:nth-child(5) { border-left-color: #4f46e5 !important; }
/* label reserves two lines so numbers baseline-align across a row even when one label wraps */
#view-report.pdf-shot .kpi .label { font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--doc-muted); min-height: 24px; align-items: flex-start; }
#view-report.pdf-shot .kpi .num { font-size: 28px; font-weight: 700; letter-spacing: -.025em; line-height: 1; color: var(--doc-ink); margin-top: 8px; font-variant-numeric: tabular-nums; }
#view-report.pdf-shot .kpi .num .u { font-size: 60%; font-weight: 600; color: var(--doc-muted); margin-left: 1px; }
#view-report.pdf-shot .kpi .foot { font-size: 9px; color: var(--doc-faint); margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 5px; }
#view-report.pdf-shot .kpi.dora .label .proxy { font-size: 8px; color: var(--doc-faint); }
/* level chips: soft colored pills (the app's own semantics, print-safe) */
#view-report.pdf-shot .level-chip { font-size: 8.5px; padding: 2px 7px; }

/* --- panels + charts: full-width scale, gentle depth --- */
#view-report.pdf-shot .panel { background: #fff !important; border: 1px solid var(--doc-card-border) !important; border-radius: 10px; box-shadow: 0 1px 2px rgba(23,26,43,.04) !important; overflow: hidden; }
#view-report.pdf-shot .panel:has(> .tb-bar) { padding: 16px 20px; }
#view-report.pdf-shot .chart-wrap { padding: 18px 20px; overflow: visible; }
#view-report.pdf-shot .chart-wrap svg { width: 100%; height: auto; display: block; }
#view-report.pdf-shot .chart-wrap svg text { font-family: var(--doc-font); }
#view-report.pdf-shot .chart-wrap svg line[stroke="#e2e8f0"] { stroke: #eef0f5; }
/* axis/tick text stays #64748b (4.7:1 on white — WCAG AA); do not lighten */
#view-report.pdf-shot .chart-title { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--doc-muted); margin-bottom: 14px; }
#view-report.pdf-shot .chart-legend { padding: 12px 0 0; font-size: 9.5px; color: var(--doc-muted); gap: 18px; }
#view-report.pdf-shot .chart-legend .lg i { width: 9px; height: 9px; border-radius: 2px; }

/* --- work-delivered bars: soften full-saturation semantics for the document --- */
#view-report.pdf-shot .seg-done { background: #34a668; }
#view-report.pdf-shot .seg-od { background: #df5b5b; }
#view-report.pdf-shot .tb-bar { background: #f0f2f7; height: 12px; border-radius: 3px; }
#view-report.pdf-shot .tb-label { font-size: 10.5px; color: var(--doc-body); }
#view-report.pdf-shot .tb-val { font-size: 10px; color: var(--doc-muted); }

/* --- tables: brand-tinted header band, hairline zebra rows --- */
#view-report.pdf-shot table { font-size: 10.5px; }
#view-report.pdf-shot th { background: var(--doc-brand-soft) !important; border-bottom: 1px solid #d8dcf6 !important; color: #4a4f80; font-size: 8.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; padding: 9px 12px; }
#view-report.pdf-shot td { padding: 8px 12px; border-bottom: 1px solid #eef0f5; font-size: 10.5px; color: var(--doc-body); }
#view-report.pdf-shot tbody tr:nth-child(even) td { background: #fafbfe; }
#view-report.pdf-shot tbody tr:hover { background: none !important; }
#view-report.pdf-shot tr.row-hi > td { background: var(--doc-brand-soft) !important; }
#view-report.pdf-shot .chip { font-size: 9.5px; padding: 2px 8px; }
#view-report.pdf-shot .model-pill { font-size: 10px; padding: 3px 10px; }
#view-report.pdf-shot .ai-tag { font-size: 8.5px; }

/* --- footer --- */
#view-report.pdf-shot .pdf-foot { position: static; margin-top: 30px; padding-top: 10px; border-top: 1px solid var(--doc-hairline); font-size: 8.5px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--doc-faint); text-align: center; }

@media print {
  .sidebar, .topbar, .cycle-actions, .subtabs, .fbar, .jql-box, #flt-create-2 { display: none !important; }
  .app, .main, .content { display: block !important; padding: 0 !important; }
  .view:not(.active) { display: none !important; }
  .view.active { display: block !important; }
  .panel, .kpi { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .chart-wrap { overflow: visible !important; }
  table { font-size: 11px; }
  a, .tkey { color: #1a56db !important; text-decoration: underline; }
  .row-actions svg { display: none; }

  /* Prod Bugs print report: PDF page 1 = summary tiles + charts only; cards follow from page 2 */
  .print-only { display: block !important; }
  .bug-print-report { break-after: page; page-break-after: always; }
  .print-footer { position: fixed; bottom: 4mm; left: 0; right: 0; }
  #view-filters .bug-team-row { display: none !important; }

  /* ===== Engineering Metrics — page setup only =====
     All visual styling is in the `.pdf-shot` block (applied during print too).
     Here we only add what's specific to paper: page breaks + a running footer. */
  #view-report.pdf-shot .pdf-head { break-after: avoid; }
  #view-report.pdf-shot .section-head { break-after: avoid; }
  #view-report.pdf-shot .kpi-row,
  #view-report.pdf-shot .panel,
  #view-report.pdf-shot .chart-wrap,
  #view-report.pdf-shot details.collapsible { break-inside: avoid; }
  #view-report.pdf-shot table tr { break-inside: avoid; }
  /* footer repeats on every printed page (static in the PNG) */
  #view-report.pdf-shot .pdf-foot { position: fixed; bottom: 7mm; left: 12mm; right: 12mm; margin-top: 0; background: #fff; }

  /* Employee Performance report — compact one-page PDF */
  #view-perf .perf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
  #view-perf .panel { padding: 10px 13px; }
  #view-perf .perf-head-card { margin-bottom: 10px; }
  #view-perf .kpi-row { margin-bottom: 10px; }
  #view-perf .perf-dir-badge { background: none; padding: 0; }
  #view-perf .chart-wrap svg { width: 100%; height: auto; }
  #view-perf .section-head svg { width: 15px; height: 15px; }
  #view-perf .avatar.big { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #view-perf .perf-tasks { break-before: page; page-break-before: always; }
  #view-perf .perf-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  #view-perf .perf-snap { grid-template-columns: repeat(3, 1fr); }
  #view-perf .snap-chip { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #view-perf .goal-line { border-bottom: 1px solid #999; }
  #view-perf .perf-2col .panel { break-inside: avoid; }
  #view-perf .perf-work table { font-size: 10.5px; }
  #view-perf .perf-work tr { break-inside: avoid; }
  #view-perf .perf-work { overflow: visible !important; break-inside: auto !important; }

  /* Prod Bugs: the 11-column grid can't fit a page — print each issue as a labeled card
     so every column's data is fully visible (no clipping, no ellipsis). */
  #view-filters .panel { overflow: visible !important; break-inside: auto !important; border: none !important; }
  #view-filters table, #view-filters tbody { display: block; width: 100%; }
  #view-filters thead { display: none; }
  #view-filters tbody tr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px 16px;
    padding: 10px 13px; border: 1px solid #d4d7dd; border-radius: 10px; margin: 0 0 10px;
    break-inside: avoid; page-break-inside: avoid;
    background: linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
    box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 3px 8px rgba(17, 24, 39, .10), inset 0 1px 0 #ffffff;
    print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #view-filters tbody td { display: block; border: none !important; padding: 0 !important;
    max-width: none !important; white-space: normal !important; overflow: visible !important; }
  #view-filters tbody td::before { content: attr(data-l); display: block; font-size: 8.5px;
    font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #777; margin-bottom: 1px; }
  #view-filters tbody td.cell-summary, #view-filters tbody td.lc-cell { grid-column: 1 / -1; }
  #view-filters tbody td.row-actions { display: none; }
  #view-filters .lc-cell, #view-filters .lc-text { max-width: none !important; white-space: normal !important;
    overflow: visible !important; text-overflow: clip !important; }
  #view-filters .lc-meta { white-space: normal; }
}

.empty { text-align: center; padding: 50px 20px; color: var(--text-faint); }
.empty svg { width: 40px; height: 40px; opacity: .5; display: block; margin: 0 auto 12px; }
/* animated loading state — spinning icon + pulsing text so it's clearly working, not frozen */
.empty.loading svg { opacity: 1; color: var(--primary); animation: spin 1s linear infinite; }
.empty.loading p { color: var(--text); font-weight: 600; }
.empty.loading .loading-sub { display: block; font-size: 12px; font-weight: 400; color: var(--text-dim); margin-top: 6px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.row-actions svg { width: 13px; height: 13px; }
.copy-btn svg { width: 15px; height: 15px; }
.badge { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 20px; background: var(--red); color: #fff; }
.row-actions a { color: var(--primary); font-weight: 600; font-size: 12.5px; }

@media (max-width: 920px) {
  .sidebar { position: fixed; left: -260px; z-index: 30; transition: .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .split { grid-template-columns: 1fr; }
  .search input { width: 140px; }
}
.menu-toggle { display: grid; }

/* ---------- Vulnerabilities (Security & Quality) ---------- */
.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--c); }
.sev .pd { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.sev-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; margin-top: 4px; }
.sev-seg { display: flex; align-items: center; justify-content: center; min-width: 26px; color: #fff; font-size: 12px; font-weight: 700; }
.sev-seg span { text-shadow: 0 1px 2px rgba(0,0,0,.35); }
.sev-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-dim); }
.sev-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sev-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.sev-legend em { color: var(--red); font-style: normal; font-weight: 600; }
.sla-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 12px; white-space: nowrap; }
.sla-badge.ok { background: var(--green-soft); color: var(--green); }
.sla-badge.warn { background: var(--amber-soft); color: var(--amber); }
.sla-badge.breach { background: var(--red-soft); color: var(--red); }

/* ---------- Vulnerabilities — PDF / print export ---------- */
@media print {
  /* drop the browser's own print header (date/title) & footer (URL / page number):
     they render in the page margin, so a zero margin leaves no room for them.
     Spacing is re-added as content padding below. */
  @page { margin: 0; }
  html, body { margin: 0 !important; }
  .content { padding: 14mm 12mm !important; }
  /* force all Security & Quality colors to render (browsers drop backgrounds by default) */
  #view-vulns, #view-vulns * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  /* keep the report title/subtitle, drop only the action buttons */
  #view-vulns .cycle-actions { display: flex !important; }
  #view-vulns .cycle-actions .spacer, #view-vulns .cycle-actions .btn, #view-vulns .cycle-actions .btn-ghost { display: none !important; }
  #view-vulns #vuln-create, #view-vulns .btn-mini { display: none !important; }
  /* make hyperlinks visible on paper: show the target URL next to each link */
  #view-vulns .row-actions svg { display: none !important; }
  #view-vulns .row-actions a::after { content: " " attr(href); font-size: 8.5px; font-weight: 400; color: #475569; word-break: break-all; }
  #view-vulns .tkey[href]::after { content: " (" attr(href) ")"; font-size: 8px; font-weight: 400; color: #64748b; word-break: break-all; }
  #view-vulns .sev-seg span { color: #fff !important; }
}

/* ---------- Vulnerabilities — notify / email draft ---------- */
.kpi[data-vteam] { position: relative; }
.tc-notify { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-dim); cursor: pointer; opacity: .55; transition: .12s; }
.tc-notify:hover { opacity: 1; color: var(--primary); border-color: var(--primary); background: var(--primary-soft, var(--surface-2)); }
.tc-notify svg { width: 15px; height: 15px; }
.mail-form { display: flex; flex-direction: column; gap: 12px; }
.mail-form .ml { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.mail-form input, .mail-form textarea { font: inherit; font-size: 13px; font-weight: 400; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; width: 100%; }
.mail-form textarea { resize: vertical; line-height: 1.5; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.mail-form input:focus, .mail-form textarea:focus { outline: none; border-color: var(--primary); }
.mail-note { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim);
  background: var(--amber-soft); border-radius: 9px; padding: 9px 11px; }
.mail-note svg { width: 15px; height: 15px; flex: none; }
.mail-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 2px; }
.vr-policy { font-size: 12.5px; color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px; margin: 16px 0 4px; }
@media print { .tc-notify { display: none !important; } }

/* ---------- UX polish pass (2026-07) ---------- */
/* 1. Theme-aware charts: the inline SVGs hardcode light-theme paper colors;
      remap them in dark mode. Exports (PNG/PDF serialize the raw SVG) keep the
      light paper, which is what you want when sharing. */
[data-theme="dark"] .content svg rect[fill="#ffffff"] { fill: var(--surface-2); }
[data-theme="dark"] .content svg line[stroke="#e2e8f0"] { stroke: #262b33; }
[data-theme="dark"] .content svg line[stroke="#cbd5e1"] { stroke: #333a45; }
[data-theme="dark"] .content svg text[fill="#64748b"] { fill: #98a2b3; }
[data-theme="dark"] .content svg text[fill="#475569"],
[data-theme="dark"] .content svg text[fill="#334155"] { fill: #cbd5e1; }

/* 2. Data-grade numerals: keep digit columns steady while scanning. */
td, th, .kpi .num, .num, .count { font-variant-numeric: tabular-nums; }

/* 3. Visible keyboard focus (WCAG 2.4.7) without hurting mouse users. */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 0; }

/* 4. Don't let content stretch edge-to-edge on ultrawide monitors. */
.content { max-width: 1640px; margin: 0 auto; width: 100%; }

/* 5. Status-tag contrast in dark mode ("New"/todo was grey-on-grey). */
[data-theme="dark"] .tag.todo { color: #c3cad6; background: #262b33; }

/* 6. "+N more" expander for long Working-on key lists (Teams & People). */
.more-keys { display: inline-block; border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-dim); font: inherit; font-size: 11px; font-weight: 600; padding: 1px 8px;
  border-radius: 10px; cursor: pointer; transition: .12s; vertical-align: 1px; }
.more-keys:hover { color: var(--primary); border-color: var(--primary); }
td .tkey { line-height: 1.9; }

/* formatted email preview inside the notify modal (email HTML is inline-styled
   for light backgrounds, so the container stays white in both themes) */
.mail-preview { background: #ffffff; color: #1e293b; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 18px; max-height: 400px; overflow: auto; font-weight: 400; cursor: text; }
.mail-preview:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mail-hint { font-weight: 400; font-size: 11px; color: var(--text-faint); margin-left: 6px; }

/* ==================== Login / access gate ==================== */
/* App is hidden until a session exists; login screen shows only when needed. */
body:not(.authed) .app { display: none !important; }
#login-screen { display: none; }
body.show-login #login-screen {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  position: fixed; inset: 0; z-index: 2000; background: var(--bg);
}

/* left brand panel */
.login-brand-panel {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  padding: 48px 52px; color: #fff; overflow: hidden;
  background: linear-gradient(150deg, #002a50 0%, #003D71 46%, #0b5c86 100%);
}
.login-brand-panel::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background: radial-gradient(900px 500px at 85% -10%, rgba(124,164,187,.28), transparent 60%);
}
.login-brand-top, .login-brand-body, .login-brand-foot { position: relative; z-index: 1; }
.login-brand-top { display: flex; align-items: center; gap: 12px; }
.login-brand-logo { width: 172px; height: auto; display: block; }
.login-form-logo { width: 150px; height: auto; display: block; margin-bottom: 24px; }
.login-logo {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 800; font-size: 18px; letter-spacing: -.02em; color: #4f46e5;
  background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.login-brand-name { font-size: 15px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-brand-body { max-width: 480px; }
.login-eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.72); margin-bottom: 14px; }
.login-brand-body h2 { font-size: 33px; line-height: 1.12; font-weight: 800; letter-spacing: -.02em; margin: 0 0 12px; }
.login-brand-body p { font-size: 14.5px; line-height: 1.6; margin: 0 0 26px; color: rgba(255,255,255,.84); }
.login-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.login-features li { display: flex; align-items: flex-start; gap: 13px; }
.login-features .lf-ic { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.16); }
.login-features .lf-ic svg { width: 18px; height: 18px; }
.login-features .lf-text { display: flex; flex-direction: column; gap: 1px; }
.login-features .lf-text b { font-size: 14px; font-weight: 650; color: #fff; }
.login-features .lf-text span { font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.72); }
.login-meta { display: flex; align-items: center; gap: 8px; margin-top: 26px; font-size: 12px; font-weight: 500; color: rgba(255,255,255,.78); }
.login-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); flex: none; }
.login-brand-foot { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.62); }

/* right form panel */
.login-form-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-card { width: 100%; max-width: 372px; display: flex; flex-direction: column; }
.login-mark {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  font-weight: 800; font-size: 19px; color: #fff; margin-bottom: 22px;
  background: linear-gradient(140deg, var(--primary), var(--purple));
  box-shadow: 0 8px 20px rgba(79,70,229,.28);
}
.login-title { font-size: 25px; font-weight: 750; letter-spacing: -.02em; color: var(--text); margin: 0 0 5px; }
.login-subtitle { font-size: 14px; color: var(--text-dim); margin: 0 0 26px; }
.login-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.login-label { font-size: 12.5px; font-weight: 600; color: var(--text-dim); }
.login-field input {
  width: 100%; height: 44px; padding: 0 14px; font-size: 14.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login-field input::placeholder { color: var(--text-faint); }
.login-field input:focus { border-color: #003D71; box-shadow: 0 0 0 3px rgba(0,61,113,.16); }
.login-pass { position: relative; display: block; }
.login-pass input { padding-right: 44px; }
.login-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none;
  color: var(--text-faint); cursor: pointer; border-radius: 8px;
}
.login-eye:hover { color: var(--text-dim); background: var(--surface-2); }
.login-eye.on { color: #003D71; }
.login-eye svg { width: 18px; height: 18px; }
.login-error {
  font-size: 13px; color: var(--red); background: var(--red-soft); border: 1px solid rgba(220,38,38,.25);
  border-radius: 9px; padding: 9px 12px; margin-bottom: 16px;
}
.login-submit {
  height: 46px; border: 0; border-radius: 10px; cursor: pointer; margin-top: 4px;
  font-size: 15px; font-weight: 650; color: #fff;
  background: linear-gradient(140deg, #003D71, #0b5c86);
  box-shadow: 0 8px 20px rgba(0,61,113,.28); transition: filter .15s, transform .05s;
}
.login-submit:hover { filter: brightness(1.06); }
.login-submit:active { transform: translateY(1px); }
.login-submit:disabled { opacity: .7; cursor: default; }

/* logout button in sidebar footer */
.sidebar-foot { display: flex; align-items: center; gap: 8px; }
.sidebar-foot .me { flex: 1; min-width: 0; }
.logout-btn { flex: none; color: var(--text-dim); }
.logout-btn:hover { color: var(--red); }

@media (max-width: 860px) {
  body.show-login #login-screen { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
}

/* ==================== Quick Links — compact link rows ==================== */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; margin-bottom: 12px; }
.link-card {
  --lc: var(--primary);
  position: relative; display: flex; align-items: center; gap: 13px; text-decoration: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
  padding: 11px 13px; box-shadow: var(--shadow); cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.link-card::before { content: ""; position: absolute; inset: 0; background: var(--lc); opacity: .045; pointer-events: none; }
.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--lc); }
.link-chip { position: relative; flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--lc); box-shadow: 0 6px 14px -6px var(--lc); }
.link-chip svg { width: 19px; height: 19px; }
.link-body { position: relative; flex: 1; min-width: 0; }
.link-name { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; color: var(--text); }
.link-tag { flex: none; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lc); padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--lc) 12%, transparent); }
.link-url { display: block; margin-top: 2px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-cta { position: relative; flex: none; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--lc); padding: 6px 10px; border-radius: 8px; background: color-mix(in srgb, var(--lc) 12%, transparent); transition: background .14s ease, color .14s ease; }
.link-cta svg { width: 13px; height: 13px; }
.link-card:hover .link-cta { background: var(--lc); color: #fff; }
/* environment color tones */
.link-card.tone-amber { --lc: #d97706; }
.link-card.tone-blue  { --lc: #2563eb; }
.link-card.tone-green { --lc: #16a34a; }
.link-card.tone-teal  { --lc: #0891b2; }
.link-card.tone-slate { --lc: #64748b; }
@media (max-width: 560px) { .link-cta span { display: none; } }

/* ==================== Guided tour / onboarding ==================== */
.tour-overlay { position: fixed; inset: 0; z-index: 3000; background: transparent; }
.tour-overlay.dim { background: rgba(15,19,43,.58); }
.tour-spot {
  position: fixed; z-index: 3001; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(15,19,43,.58), 0 0 0 2px var(--primary), 0 0 0 6px rgba(79,70,229,.35);
  transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
.tour-card {
  position: fixed; z-index: 3002; width: 336px; max-width: calc(100vw - 24px);
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 20px 20px 16px;
  animation: fade .18s ease;
}
.tour-card.center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: 400px; }
.tour-progress { display: flex; gap: 5px; margin-bottom: 12px; }
.tour-progress span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: .2s; }
.tour-progress span.on { width: 20px; border-radius: 3px; background: var(--primary); }
.tour-step { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.tour-card h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.tour-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--text-dim); }
.tour-card p b { color: var(--text); font-weight: 650; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.tour-nav { display: flex; gap: 8px; }
.tour-skip { background: none; border: 0; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-faint); }
.tour-skip:hover { color: var(--text-dim); }
.tour-btn { cursor: pointer; font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 9px; border: 1px solid var(--border); }
.tour-btn.ghost { background: var(--surface); color: var(--text-dim); }
.tour-btn.ghost:hover { border-color: var(--text-faint); color: var(--text); }
.tour-btn.primary { border: 0; color: #fff; background: linear-gradient(140deg, var(--primary), #6d28d9); box-shadow: 0 6px 16px rgba(79,70,229,.28); }
.tour-btn.primary:hover { filter: brightness(1.06); }

/* ==================== What's New / release notes ==================== */
.wn-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); }
#whatsnew-btn { position: relative; }
.wn-lead { margin: 0 0 16px; font-size: 13.5px; color: var(--text-dim); }
.wn-release { padding: 16px 0; border-top: 1px solid var(--border); }
.wn-release:first-of-type { border-top: 0; padding-top: 2px; }
.wn-relhead { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.wn-ver { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; }
.wn-badge-latest { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #fff; background: linear-gradient(140deg, var(--primary), var(--purple)); padding: 3px 8px; border-radius: 6px; }
.wn-date { margin-left: auto; font-size: 12px; color: var(--text-faint); }
.wn-title { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.wn-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.wn-items li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text); }
.wn-tag { flex: none; margin-top: 1px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; min-width: 62px; text-align: center; }
.wn-tag.new { color: #15803d; background: var(--green-soft); }
.wn-tag.improved { color: #1d4ed8; background: var(--blue-soft); }
.wn-tag.fixed { color: #b45309; background: var(--amber-soft); }
.wn-empty { padding: 24px; text-align: center; color: var(--text-faint); }

/* ==================== Login: GitHub SSO button + divider ==================== */
.sso-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 46px; margin-bottom: 4px; border-radius: 10px; text-decoration: none;
  font-size: 14.5px; font-weight: 600; color: #fff; background: #1f2328;
  border: 1px solid #1f2328; transition: filter .15s, transform .05s;
}
.sso-btn:hover { filter: brightness(1.15); }
.sso-btn:active { transform: translateY(1px); }
.sso-btn svg { width: 20px; height: 20px; }
[data-theme="dark"] .sso-btn { background: #e6edf3; border-color: #e6edf3; color: #0d1117; }
.sso-btn[hidden] { display: none !important; }

/* ---- SSO block on the login form (shown above the credential fields) ---- */
@keyframes paneIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.sso-section[hidden] { display: none; }
.sso-note { display: flex; align-items: flex-start; gap: 8px; margin: 12px 2px 0; font-size: 12px; color: var(--text-dim); line-height: 1.5; }
.sso-note svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--text-faint); }
.sso-note b { color: var(--text); font-weight: 650; }
.sso-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--text-faint); font-size: 12px; }
.sso-divider::before, .sso-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ==================== Needs Attention — triage board ==================== */
.att-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.att-stat { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left;
  cursor: pointer; padding: 15px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); transition: transform .12s, box-shadow .12s, border-color .12s; }
.att-stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.att-stat.on { border-color: var(--c); box-shadow: 0 0 0 2px var(--c) inset; }
.att-stat-ic { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); }
.att-stat-ic svg { width: 16px; height: 16px; }
.att-stat-n { font-size: 26px; font-weight: 750; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.att-stat-l { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.att-stat.cat-overdue { --c: #dc2626; } .att-stat.cat-blocked { --c: #7c3aed; }
.att-stat.cat-due-soon { --c: #d97706; } .att-stat.cat-high { --c: #2563eb; }

.att-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.att-toolbar .spacer { flex: 1; }
.att-showing { font-size: 13px; color: var(--text-dim); }
.att-showing b { color: var(--text); }
.att-clear { border: 0; background: none; color: var(--primary); font-weight: 600; cursor: pointer; font-size: 13px; }
.att-select { height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); padding: 0 10px; font-size: 13px; cursor: pointer; }

.att-group { margin-bottom: 20px; }
.att-group-head { display: flex; align-items: center; gap: 9px; margin: 0 2px 10px; }
.att-group-head svg { width: 16px; height: 16px; color: var(--c); }
.att-group-head h3 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.att-group-head .count { font-size: 11px; font-weight: 700; color: #fff; background: var(--c); padding: 1px 8px; border-radius: 10px; }
.att-group-head.cat-overdue { --c: #dc2626; } .att-group-head.cat-blocked { --c: #7c3aed; }
.att-group-head.cat-due-soon { --c: #d97706; } .att-group-head.cat-high { --c: #2563eb; }

.att-list { overflow: hidden; }
.att-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background .12s; }
.att-row:last-child { border-bottom: none; }
.att-row:hover { background: var(--surface-2); }
.att-row.cat-overdue { --c: #dc2626; } .att-row.cat-blocked { --c: #7c3aed; }
.att-row.cat-due-soon { --c: #d97706; } .att-row.cat-high { --c: #2563eb; }
.att-bar { width: 4px; align-self: stretch; background: var(--c); flex: none; }
.att-type { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-dim); }
.att-type.bug { background: var(--red-soft); color: var(--red); }
.att-type svg { width: 17px; height: 17px; }
.att-main { flex: 1; min-width: 0; }
.att-title { display: block; font-size: 13.5px; font-weight: 550; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-title .tkey { margin-right: 7px; }
.att-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; font-size: 12px; color: var(--text-dim); flex-wrap: wrap; }
.att-av { width: 20px; height: 20px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 9px; font-weight: 700; display: inline-grid; place-items: center; }
.att-meta .dot { opacity: .45; }
.att-right { flex: none; display: flex; align-items: center; gap: 12px; padding-right: 14px; }
.att-count { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--text-dim); }
.att-count svg { width: 13px; height: 13px; }
.att-count.overdue { color: var(--red); } .att-count.due-soon { color: var(--amber); } .att-count.none { color: var(--text-faint); }
.att-reason { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 3px 10px; border-radius: 20px; color: #fff; background: var(--c); white-space: nowrap; }
.att-go { color: var(--text-faint); }
.att-go svg { width: 16px; height: 16px; }
.att-row:hover .att-go { color: var(--c); }
@media (max-width: 760px) {
  .att-stats { grid-template-columns: repeat(2, 1fr); }
  .att-right { gap: 8px; }
  .att-reason { display: none; }
}

/* ==================== Ask AI — saved answer + recent questions ==================== */
.ask-saved { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 11.5px; font-weight: 600;
  color: var(--green); background: var(--green-soft); border-radius: 8px; padding: 4px 10px; }
.ask-saved svg { width: 13px; height: 13px; }
.ask-history { margin-top: 14px; }
.ask-hist-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; }
.ask-hist-head svg { width: 14px; height: 14px; color: var(--text-faint); }
.ask-hist-head .muted { font-weight: 400; }
.ask-hist-clear { margin-left: auto; border: 0; background: none; color: var(--text-faint); font-size: 12px; cursor: pointer; }
.ask-hist-clear:hover { color: var(--red); }
.ask-hist-list { display: flex; flex-direction: column; gap: 6px; }
.ask-hist-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; transition: border-color .12s, background .12s; }
.ask-hist-item:hover { border-color: var(--primary); background: var(--surface-2); }
.ah-q { flex: 1; min-width: 0; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-t { flex: none; font-size: 11px; color: var(--text-faint); }

/* ==================== Login — interactions & motion ==================== */
/* entrance: form card + staggered brand copy rise in */
@keyframes loginRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
body.show-login .login-card { animation: loginRise .55s cubic-bezier(.2,.7,.2,1) both; }
body.show-login .login-brand-body h2 { animation: loginRise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: .04s; }
body.show-login .login-brand-body p { animation: loginRise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: .12s; }
body.show-login .login-features li { animation: loginRise .5s ease both; }
body.show-login .login-features li:nth-child(1) { animation-delay: .18s; }
body.show-login .login-features li:nth-child(2) { animation-delay: .26s; }
body.show-login .login-features li:nth-child(3) { animation-delay: .34s; }
body.show-login .login-features li:nth-child(4) { animation-delay: .42s; }
body.show-login .login-features li:nth-child(5) { animation-delay: .50s; }
body.show-login .login-meta { animation: loginRise .6s ease both; animation-delay: .58s; }

/* ambient aurora on the brand panel — the login's signature (subtle, slow) */
.login-brand-panel::after {
  content: ""; position: absolute; inset: -25%; opacity: .6; pointer-events: none;
  background:
    radial-gradient(38% 38% at 22% 22%, rgba(124,164,187,.34), transparent 60%),
    radial-gradient(34% 34% at 84% 16%, rgba(11,92,134,.50), transparent 62%),
    radial-gradient(46% 46% at 72% 86%, rgba(37,99,235,.26), transparent 60%);
  animation: aurora 20s ease-in-out infinite;
}
@keyframes aurora {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, -2%) scale(1.06); }
  66% { transform: translate(-2%, 2%) scale(1.03); }
}

/* sign-in button: spinner + disabled-until-valid + success */
.login-submit { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.login-submit svg { width: 16px; height: 16px; }
.login-submit:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; filter: none; }
.btn-spin { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; margin-right: 8px; }

/* Caps Lock warning */
.caps-hint { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 11.5px; font-weight: 600; color: #b45309; }
.caps-hint[hidden] { display: none; }
.caps-hint svg { width: 13px; height: 13px; }
[data-theme="dark"] .caps-hint { color: #f59e0b; }

/* error: icon + shake */
.login-error { display: flex; align-items: center; gap: 8px; }
.login-error[hidden] { display: none; }
.login-error svg { width: 15px; height: 15px; flex: none; }
@keyframes shake { 10%,90% { transform: translateX(-1px); } 20%,80% { transform: translateX(2px); } 30%,50%,70% { transform: translateX(-6px); } 40%,60% { transform: translateX(6px); } }
.login-card.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97) both; }

@media (prefers-reduced-motion: reduce) {
  body.show-login .login-card, body.show-login .login-brand-body h2, body.show-login .login-brand-body p,
  body.show-login .login-features li, body.show-login .login-meta,
  .login-brand-panel::after, .login-card.shake, .btn-spin { animation: none !important; }
}

/* ==================== Login — refined fields & SSO button ==================== */
.login-input { position: relative; display: flex; align-items: center; }
/* leading icon = the injected svg that is a direct child (the eye's svg is nested in its button) */
.login-input > svg { position: absolute; left: 14px; width: 17px; height: 17px; color: var(--text-faint); pointer-events: none; transition: color .15s; }
.login-input:focus-within > svg { color: #0b5c86; }
.login-field input { height: 46px; padding-left: 42px; border-radius: 11px; }
.login-input.has-eye input { padding-right: 44px; }
.login-field input:hover:not(:focus) { border-color: #c7ccd6; }
.login-field input:focus { border-color: #0b5c86; box-shadow: 0 0 0 4px rgba(11,92,134,.15); }
[data-theme="dark"] .login-field input:hover:not(:focus) { border-color: #3a4453; }

/* GitHub SSO button — subtle depth + hover lift */
.sso-btn { box-shadow: 0 1px 2px rgba(0,0,0,.10); transition: transform .14s ease, box-shadow .14s ease, filter .15s ease; }
.sso-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,.22); filter: brightness(1.12); }
.sso-btn:active { transform: translateY(0); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.sso-btn svg { transition: transform .15s ease; }
.sso-btn:hover svg { transform: scale(1.06); }

/* ==================== Skeleton loading (shimmer) ==================== */
.skeleton-list { padding: 2px 0; }
.sk-row { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.sk-row:last-child { border-bottom: none; }
.sk { background: var(--surface-2); border-radius: 6px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: shimmer 1.3s infinite; }
[data-theme="dark"] .sk::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.07), transparent); }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-flag { width: 4px; height: 34px; border-radius: 3px; flex: none; }
.sk-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 10px; }
.sk-line.w30 { width: 30%; } .sk-line.w40 { width: 40%; } .sk-line.w50 { width: 50%; }
.sk-line.w60 { width: 60%; } .sk-line.w70 { width: 70%; } .sk-line.w80 { width: 80%; }
.sk-pill { width: 66px; height: 20px; border-radius: 20px; flex: none; }
/* KPI + team-card placeholders */
.sk-kpi { display: flex; flex-direction: column; gap: 12px; }
.sk-kpi .label { display: flex; align-items: center; gap: 8px; }
.sk-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.sk-num { width: 60px; height: 26px; border-radius: 7px; }
.sk-num.sm { width: 28px; height: 18px; margin: 0 auto 6px; }
.sk-card { display: flex; flex-direction: column; gap: 14px; }
.sk-card .tc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sk-card .tc-head .sk-line { flex: 1; height: 14px; }
.sk-card .tc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.sk-avs { width: 96px; height: 24px; border-radius: 20px; }
.sk-card .tc-foot { display: flex; align-items: center; justify-content: space-between; }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }

/* ==================== Prod Bugs — multi-select chip filters ==================== */
.bug-filters { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 18px; margin: 4px 0 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.ff-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ff-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.ff-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ff-chip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 12.5px; font-weight: 500;
  color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 5px 11px; transition: .12s; }
.ff-chip:hover { border-color: var(--primary); color: var(--text); }
.ff-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.ff-n { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: 10px; background: rgba(0,0,0,.06); color: inherit; }
[data-theme="dark"] .ff-n { background: rgba(255,255,255,.10); }
.ff-chip.on .ff-n { background: var(--primary); color: #fff; }
.ff-clear { margin-left: auto; align-self: center; border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.ff-clear:hover { text-decoration: underline; }

/* grid: assignee avatar */
.cell-assignee { display: inline-flex; align-items: center; gap: 8px; }
.mini-av { width: 22px; height: 22px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  font-size: 9px; font-weight: 700; background: var(--primary-soft); color: var(--primary); }

/* ---------- Feedback board (feature requests / bug reports / votes) ---------- */
.fb-form { padding: 18px 18px 16px; margin-bottom: 20px; }
.fb-form-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.fb-form-head > svg { width: 22px; height: 22px; color: var(--primary); flex: none; margin-top: 1px; }
.fb-form-head b { display: block; font-size: 15px; }
.fb-form-head span { display: block; font-size: 12.5px; color: var(--text-dim); margin-top: 2px; max-width: 640px; }
.fb-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.fb-type { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 9px; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-dim); background: var(--surface);
  border: 1px solid var(--border); transition: .12s; }
.fb-type svg { width: 15px; height: 15px; }
.fb-type:hover { border-color: var(--c); color: var(--text); }
.fb-type.on { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, transparent); }
.fb-input, .fb-textarea { width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px 13px; color: var(--text); font: inherit; font-size: 14px; outline: none; transition: .12s; }
.fb-input { margin-bottom: 10px; }
.fb-textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.fb-input:focus, .fb-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.fb-form-actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.fb-form-actions .btn { margin-left: auto; }
.fb-msg { font-size: 12.5px; font-weight: 600; }
.fb-msg.ok { color: var(--green); }
.fb-msg.err { color: var(--red); }

.fb-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.fb-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-fchip { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 500;
  padding: 6px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-dim); transition: .12s; }
.fb-fchip:hover { border-color: var(--primary); color: var(--text); }
.fb-fchip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.fb-sort { display: inline-flex; margin-left: auto; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.fb-sort button { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 12px; border: none; background: var(--surface); color: var(--text-dim); cursor: pointer; }
.fb-sort button.on { background: var(--primary); color: #fff; }

.fb-cards { display: flex; flex-direction: column; gap: 10px; }
.fb-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; transition: .12s; }
.fb-card:hover { border-color: var(--text-faint); }
.fb-vote { display: flex; flex-direction: column; align-items: center; gap: 1px; flex: none; width: 52px; padding: 8px 0;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-dim); cursor: pointer; transition: .12s; }
.fb-vote:hover { border-color: var(--primary); color: var(--primary); }
.fb-vote.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.fb-caret { font-size: 12px; line-height: 1; }
.fb-vote b { font-size: 15px; font-weight: 700; }
.fb-body { flex: 1; min-width: 0; }
.fb-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fb-type-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .02em;
  color: var(--c); }
.fb-type-badge svg { width: 13px; height: 13px; }
.fb-status { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 20px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.fb-title { font-size: 14.5px; font-weight: 650; color: var(--text); }
.fb-detail { font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; white-space: pre-wrap; }
.fb-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 8px; }
.fb-admin { display: flex; align-items: center; gap: 8px; flex: none; align-self: center; }
.fb-admin label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.fb-admin select { font: inherit; font-size: 12.5px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; outline: none; }
.fb-del { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-faint); cursor: pointer; transition: .12s; }
.fb-del:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }
.fb-del svg { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .fb-card { flex-wrap: wrap; }
  .fb-admin { width: 100%; margin-top: 6px; }
  .fb-admin select { flex: 1; }
}

/* ---------- World Clock (header modal) — raised tiles with depth ---------- */
#modal-root .modal.modal-compact { width: min(480px, 100%); }
.wc { width: 100%; }
/* segmented tab control */
.wc-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; box-shadow: inset 0 1px 2px rgba(16,24,40,.06); }
.wc-tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 8px; border: 0;
  background: none; font: inherit; font-size: 13px; font-weight: 650; color: var(--text-faint); cursor: pointer;
  border-radius: 9px; transition: color .18s, background .18s, box-shadow .18s, transform .05s; }
.wc-tab svg { width: 15px; height: 15px; }
.wc-tab:hover { color: var(--text-dim); }
.wc-tab.on { color: var(--text); background: var(--surface);
  box-shadow: 0 1px 1px rgba(255,255,255,.7) inset, 0 1px 2px rgba(16,24,40,.10), 0 4px 10px rgba(16,24,40,.10); }
.wc-tab:active { transform: translateY(1px); }
[data-theme="dark"] .wc-tab.on { box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 6px rgba(0,0,0,.45); }

.wc-pane { display: none; }
.wc-pane.active { display: block; animation: paneIn .3s cubic-bezier(.2,.7,.2,1) both; }
.wc-rows { display: flex; flex-direction: column; gap: 10px; }

/* raised zone tile: subtle top-lit gradient + layered drop shadow = 3D depth */
.wc-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, #ffffff 12%), var(--surface));
  box-shadow: 0 1px 1px rgba(255,255,255,.6) inset, 0 1px 2px rgba(16,24,40,.06), 0 6px 16px rgba(16,24,40,.08);
  transition: transform .16s cubic-bezier(.2,.7,.2,1), box-shadow .16s; }
.wc-row:hover { transform: translateY(-2px);
  box-shadow: 0 1px 1px rgba(255,255,255,.6) inset, 0 2px 4px rgba(16,24,40,.08), 0 14px 30px rgba(16,24,40,.14); }
[data-theme="dark"] .wc-row { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, #ffffff 14%), var(--surface));
  box-shadow: 0 1px 0 rgba(255,255,255,.05) inset, 0 2px 6px rgba(0,0,0,.4), 0 8px 20px rgba(0,0,0,.35); }
[data-theme="dark"] .wc-row:hover { box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 4px 10px rgba(0,0,0,.45), 0 16px 34px rgba(0,0,0,.5); }
.wc-row.self { border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 15%, var(--surface)), color-mix(in srgb, var(--primary) 7%, var(--surface)));
  box-shadow: 0 1px 1px rgba(255,255,255,.5) inset, 0 6px 20px color-mix(in srgb, var(--primary) 32%, transparent); }

.wc-lead { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* day / night indicator chip */
.wc-dn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none;
  box-shadow: 0 1px 2px rgba(16,24,40,.12), 0 3px 8px rgba(16,24,40,.10); }
.wc-dn svg { width: 18px; height: 18px; }
.wc-dn.day { background: linear-gradient(155deg, #fde68a, #f59e0b); color: #7c2d12; }
.wc-dn.night { background: linear-gradient(155deg, #475569, #1e293b); color: #cbd5e1; }
.wc-place { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wc-place b { font-size: 14px; font-weight: 650; color: var(--text); white-space: nowrap; }
.wc-off { align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .03em; color: var(--text-dim);
  background: var(--surface-2); border: 1px solid var(--border); padding: 1px 7px; border-radius: 20px; font-variant-numeric: tabular-nums; }

.wc-clockval { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.wc-time { display: inline-flex; align-items: baseline; gap: 2px; color: var(--text); font-variant-numeric: tabular-nums; }
.wc-hm { font-size: 25px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.wc-sec { font-size: 13px; font-weight: 600; color: var(--text-faint); }
.wc-ap { font-size: 11px; font-weight: 700; color: var(--text-dim); margin-left: 3px; text-transform: uppercase; letter-spacing: .04em; }
.wc-row.self .wc-hm { color: var(--primary); }
.wc-date { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-dim); }
.wc-daytag { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 20px;
  background: var(--surface-2); color: var(--text-faint); }
.wc-daytag.next { background: var(--blue-soft); color: var(--blue); }
.wc-daytag.prev { background: var(--amber-soft); color: var(--amber); }

.wc-convert-form { display: flex; gap: 10px; margin-bottom: 14px; }
.wc-convert-form label { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.wc-convert-form input, .wc-convert-form select { font: inherit; font-size: 13.5px; padding: 10px 11px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); outline: none;
  box-shadow: inset 0 1px 2px rgba(16,24,40,.05); transition: border-color .15s, box-shadow .15s; }
.wc-convert-form input:focus, .wc-convert-form select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.wc-hint { display: flex; align-items: center; gap: 8px; margin: 2px 0 14px; font-size: 12px; color: var(--text-dim); }
.wc-hint svg { width: 14px; height: 14px; color: var(--text-faint); flex: none; }
.wc-empty { padding: 22px; text-align: center; font-size: 12.5px; color: var(--text-faint); }
