/*
 * Visual style: clean, white, Microsoft Fluent 2–inspired
 * (Segoe UI, neutral greys, soft elevation, rounded corners),
 * on top of Atlassian-style structure and content principles
 * (8px spacing grid, side navigation, status labels, flags, sentence case).
 * Light theme only.
 */
:root {
  /* Text */
  --ds-text: #242424;
  --ds-text-subtle: #424242;
  --ds-text-subtlest: #707070;
  --ds-text-inverse: #FFFFFF;
  --ds-text-brand: #0F6CBD;
  --ds-text-danger: #B10E1C;
  --ds-text-success: #0E700E;
  --ds-text-warning: #8A3707;
  --ds-link: #0F6CBD;

  /* Surfaces */
  --ds-canvas: #F5F5F5;
  --ds-surface: #FFFFFF;
  --ds-surface-sunken: #FAFAFA;
  --ds-surface-raised: #FFFFFF;
  --ds-surface-overlay: #FFFFFF;
  --ds-nav: #FAFAFA;
  --ds-bg-neutral: #F5F5F5;
  --ds-bg-neutral-hovered: #EBEBEB;
  --ds-bg-neutral-subtle-hovered: #F0F0F0;
  --ds-bg-selected: #EBF3FC;
  --ds-bg-brand-bold: #0F6CBD;
  --ds-bg-brand-bold-hovered: #115EA3;
  --ds-bg-brand-bold-pressed: #0C3B5E;
  --ds-bg-danger-bold: #C50F1F;
  --ds-bg-danger-bold-hovered: #A50D1A;
  --ds-bg-input: #FFFFFF;

  /* Tinted badges */
  --ds-bg-success: #F1FAF1;   --ds-border-success: #9FD89F;  --ds-bg-success-bold: #107C10;
  --ds-bg-information: #EBF3FC; --ds-border-information: #B4D6FA;
  --ds-bg-warning: #FFF9F5;   --ds-border-warning: #FDCFB4;  --ds-bg-warning-bold: #F7630C;
  --ds-bg-danger: #FDF3F4;    --ds-border-danger-l: #EEACB2; --ds-bg-danger-bold-l: #D13438;
  --ds-bg-discovery: #F7F4FB; --ds-text-discovery: #5C2E91; --ds-border-discovery: #D1C2E9;
  --ds-bg-neutral-l: #F5F5F5; --ds-border-neutral-l: #E0E0E0;

  /* Strokes & elevation */
  --ds-border: #E0E0E0;
  --ds-border-strong: #D1D1D1;
  --ds-border-input: #D1D1D1;
  --ds-border-input-bottom: #616161;
  --ds-border-focused: #0F6CBD;
  --ds-border-danger: #C50F1F;
  --ds-shadow-raised: 0 0 2px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --ds-shadow-card-hover: 0 0 2px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.10);
  --ds-shadow-overlay: 0 0 2px rgba(0,0,0,.12), 0 14px 28px rgba(0,0,0,.14);
  --ds-blanket: rgba(0,0,0,.4);

  /* Space (8px grid) */
  --space-050: 4px; --space-075: 6px; --space-100: 8px; --space-150: 12px; --space-200: 16px;
  --space-250: 20px; --space-300: 24px; --space-400: 32px; --space-500: 40px; --space-600: 48px;
  --radius: 4px; --radius-lg: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-code: "Cascadia Mono", Consolas, ui-monospace, Menlo, monospace;
  --topnav-h: 48px;
  --sidenav-w: 248px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--ds-text);
  background: var(--ds-canvas); -webkit-font-smoothing: antialiased;
}
a { color: var(--ds-link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; color: var(--ds-text); font-family: var(--font-display); }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; }
h2 { font-size: 20px; line-height: 28px; font-weight: 600; }
h3 { font-size: 16px; line-height: 22px; font-weight: 600; }
h4 { font-size: 14px; line-height: 20px; font-weight: 600; }
p { margin: 0 0 var(--space-100); }
code, .mono { font-family: var(--font-code); font-size: 12px; }
:focus-visible { outline: 2px solid var(--ds-text); outline-offset: 1px; border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.subtle { color: var(--ds-text-subtle); }
.subtlest { color: var(--ds-text-subtlest); font-size: 12px; line-height: 16px; }
.stack > * + * { margin-top: var(--space-200); }
.row { display: flex; align-items: center; gap: var(--space-100); }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; min-width: 0; }
.hidden { display: none !important; }

/* ---------- Layout: top bar + side navigation ---------- */
.topnav {
  position: fixed; inset: 0 0 auto 0; height: var(--topnav-h); z-index: 10;
  display: flex; align-items: center; gap: var(--space-150); padding: 0 var(--space-200);
  background: var(--ds-surface); border-bottom: 1px solid var(--ds-border);
}
.product { display: flex; align-items: center; gap: var(--space-100); font-weight: 600; font-size: 15px; color: var(--ds-text); }
.product:hover { text-decoration: none; }
.product-logo { width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center;
  background: var(--ds-bg-brand-bold); color: var(--ds-text-inverse); }
.product-logo svg { width: 16px; height: 16px; }
.topnav .role-chip { margin-left: var(--space-050); }
.sidenav {
  position: fixed; top: var(--topnav-h); bottom: 0; left: 0; width: var(--sidenav-w);
  padding: var(--space-150) var(--space-100); overflow-y: auto;
  background: var(--ds-nav); border-right: 1px solid var(--ds-border);
}
.sidenav-section { margin: var(--space-250) var(--space-150) var(--space-075); font-size: 12px; font-weight: 600;
  line-height: 16px; color: var(--ds-text-subtlest); }
.sidenav-section:first-child { margin-top: var(--space-050); }
.navlink {
  position: relative; display: flex; align-items: center; gap: var(--space-150); height: 36px; padding: 0 var(--space-150);
  border-radius: var(--radius); color: var(--ds-text-subtle);
}
.navlink:hover { background: var(--ds-bg-neutral-subtle-hovered); text-decoration: none; color: var(--ds-text); }
.navlink[aria-current="page"] { background: var(--ds-surface); color: var(--ds-text); font-weight: 600; box-shadow: var(--ds-shadow-raised); }
.navlink[aria-current="page"]::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--ds-bg-brand-bold); }
.navlink[aria-current="page"] svg { color: var(--ds-text-brand); }
.navlink svg { width: 20px; height: 20px; flex: none; }
.navlink .badge { margin-left: auto; }
.main { margin-left: var(--sidenav-w); padding-top: var(--topnav-h); min-height: 100%; }
.page { max-width: 1240px; padding: var(--space-400) var(--space-500) var(--space-600); }
@media (max-width: 900px) {
  .sidenav { width: 60px; padding: var(--space-150) var(--space-075); }
  .sidenav-section, .navlink span, .navlink .badge { display: none; }
  .navlink { justify-content: center; padding: 0; }
  .main { margin-left: 60px; }
  .page { padding: var(--space-200); }
}

/* ---------- Page header ---------- */
.page-header { margin-bottom: var(--space-300); }
.breadcrumbs { display: flex; gap: var(--space-050); color: var(--ds-text-subtlest); margin-bottom: var(--space-050); font-size: 12px; }
.breadcrumbs a { color: var(--ds-text-subtlest); }
.breadcrumbs span::before { content: "›"; margin-right: var(--space-050); }
.page-header .row { align-items: center; flex-wrap: wrap; }
.page-header p { margin-top: var(--space-050); color: var(--ds-text-subtlest); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-075);
  height: 32px; padding: 0 var(--space-150); border: 1px solid var(--ds-border-strong); border-radius: var(--radius);
  font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: var(--ds-surface); color: var(--ds-text); transition: background .1s, border-color .1s;
}
.btn:hover { background: var(--ds-bg-neutral-subtle-hovered); border-color: #C7C7C7; text-decoration: none; }
.btn:active { background: #E0E0E0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ds-bg-brand-bold); border-color: transparent; color: var(--ds-text-inverse); }
.btn-primary:hover { background: var(--ds-bg-brand-bold-hovered); border-color: transparent; }
.btn-primary:active { background: var(--ds-bg-brand-bold-pressed); }
.btn-danger { background: var(--ds-bg-danger-bold); border-color: transparent; color: var(--ds-text-inverse); }
.btn-danger:hover { background: var(--ds-bg-danger-bold-hovered); border-color: transparent; }
.btn-subtle { background: transparent; border-color: transparent; }
.btn-subtle:hover { background: var(--ds-bg-neutral-subtle-hovered); border-color: transparent; }
.btn-link { background: transparent; border-color: transparent; color: var(--ds-link); padding: 0 var(--space-050); font-weight: 400; height: auto; }
.btn-link:hover { background: transparent; border-color: transparent; text-decoration: underline; }
.btn-block { width: 100%; height: 36px; }
.btn-icon { width: 32px; padding: 0; }

/* ---------- Badges (status labels), counters, avatars ---------- */
.lozenge {
  display: inline-flex; align-items: center; height: 20px; padding: 0 var(--space-100); border-radius: 999px; max-width: 220px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
  background: var(--ds-bg-neutral-l); color: var(--ds-text-subtle); border: 1px solid var(--ds-border-neutral-l);
}
.lozenge.success { background: var(--ds-bg-success); color: var(--ds-text-success); border-color: var(--ds-border-success); }
.lozenge.inprogress { background: var(--ds-bg-information); color: var(--ds-text-brand); border-color: var(--ds-border-information); }
.lozenge.moved { background: var(--ds-bg-warning); color: var(--ds-text-warning); border-color: var(--ds-border-warning); }
.lozenge.removed { background: var(--ds-bg-danger); color: var(--ds-text-danger); border-color: var(--ds-border-danger-l); }
.lozenge.new { background: var(--ds-bg-discovery); color: var(--ds-text-discovery); border-color: var(--ds-border-discovery); }
.badge { display: inline-block; min-width: 20px; padding: 0 var(--space-075); border-radius: 999px;
  background: var(--ds-bg-neutral-hovered); color: var(--ds-text-subtle); font-size: 12px; line-height: 18px; font-weight: 600; text-align: center; }
.badge.primary { background: var(--ds-bg-brand-bold); color: var(--ds-text-inverse); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 10px; font-weight: 600; color: #fff; background: #0F6CBD; }
.avatar.lg { width: 32px; height: 32px; font-size: 12px; }
.priority { display: inline-flex; align-items: center; gap: var(--space-050); }
.priority svg { width: 16px; height: 16px; }

/* ---------- Cards / tiles ---------- */
.card { background: var(--ds-surface-raised); border-radius: var(--radius-lg); box-shadow: var(--ds-shadow-raised); padding: var(--space-300); }
.card > h3 { margin-bottom: var(--space-200); }
.grid { display: grid; gap: var(--space-200); }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: var(--space-300); }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.halves { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .grid.two, .grid.halves { grid-template-columns: 1fr; } }
.kpi { padding: var(--space-200) var(--space-250); }
.kpi .label { color: var(--ds-text-subtlest); font-size: 12px; line-height: 16px; font-weight: 600; }
.kpi .value { font-family: var(--font-display); font-size: 28px; line-height: 36px; font-weight: 600; margin-top: var(--space-050); }
.kpi .hint { color: var(--ds-text-subtlest); font-size: 12px; }
.kpi.danger .value { color: var(--ds-text-danger); }
.kpi.brand .value { color: var(--ds-text-brand); }

/* ---------- Progress bar ---------- */
.progress { display: flex; align-items: center; gap: var(--space-100); min-width: 120px; }
.progress-track { flex: 1; height: 4px; border-radius: 2px; background: var(--ds-bg-neutral-hovered); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 2px; background: var(--ds-bg-brand-bold); }
.progress-bar.success { background: var(--ds-bg-success-bold); }
.progress-bar.warning { background: var(--ds-bg-warning-bold); }
.progress-bar.danger { background: var(--ds-bg-danger-bold-l); }
.progress-label { font-size: 12px; color: var(--ds-text-subtle); min-width: 32px; text-align: right; }

/* ---------- Stacked bar ---------- */
.stacked { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--ds-bg-neutral); margin-bottom: var(--space-200); gap: 2px; }
.stacked > div { height: 100%; }
.legend { display: grid; gap: var(--space-100); }
.legend-item { display: flex; align-items: center; gap: var(--space-100); }
.legend-swatch { width: 10px; height: 10px; border-radius: 50%; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.dt { width: 100%; border-collapse: collapse; }
.dt th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ds-text-subtlest); padding: var(--space-100) var(--space-150);
  border-bottom: 1px solid var(--ds-border); white-space: nowrap; }
.dt td { padding: var(--space-150); border-bottom: 1px solid #F0F0F0; vertical-align: middle; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover { background: var(--ds-surface-sunken); }
.dt tr.clickable { cursor: pointer; }
.dt .key { color: var(--ds-text-subtlest); white-space: nowrap; font-size: 12px; }
.dt .primary-cell { font-weight: 600; color: var(--ds-text); }
.page > div > .table-wrap, .page > div > div > .table-wrap { background: var(--ds-surface); border-radius: var(--radius-lg); box-shadow: var(--ds-shadow-raised); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: var(--space-050); }
.field + .field, .field-row + .field, .field + .field-row { margin-top: var(--space-200); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-200); }
.field-row .field + .field { margin-top: 0; }
label, .label { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ds-text); }
.req { color: var(--ds-text-danger); margin-left: 2px; }
.helper { font-size: 12px; line-height: 16px; color: var(--ds-text-subtlest); }
.error-msg { font-size: 12px; line-height: 16px; color: var(--ds-text-danger); }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 32px; padding: var(--space-050) var(--space-100); font: inherit; color: var(--ds-text);
  background: var(--ds-bg-input); border: 1px solid var(--ds-border-input); border-bottom-color: var(--ds-border-input-bottom);
  border-radius: var(--radius);
}
input::placeholder, textarea::placeholder { color: #9E9E9E; }
textarea { min-height: 88px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #C7C7C7; border-bottom-color: var(--ds-text-subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-bottom: 2px solid var(--ds-border-focused); padding-bottom: 3px; }
textarea:focus { padding-bottom: 3px; }
input[aria-invalid=true] { border-bottom-color: var(--ds-border-danger); }
input:disabled, select:disabled { background: var(--ds-bg-neutral); color: var(--ds-text-subtlest); }
input[type=range] { width: 100%; accent-color: var(--ds-bg-brand-bold); }
.checkbox { display: flex; align-items: center; gap: var(--space-100); font-size: 14px; font-weight: 400; color: var(--ds-text); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; margin: 0; accent-color: var(--ds-bg-brand-bold); }
.checkbox:has(input:disabled) { color: var(--ds-text-subtlest); cursor: not-allowed; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-100); margin-bottom: var(--space-200); align-items: center; }
.toolbar input[type=search] { width: 260px; }
.toolbar select { width: auto; }
.form-footer { display: flex; justify-content: flex-end; gap: var(--space-100); margin-top: var(--space-300); }
fieldset { border: 1px solid var(--ds-border); border-radius: var(--radius-lg); padding: var(--space-200); margin: var(--space-200) 0 0; }
legend { padding: 0 var(--space-050); font-weight: 600; }
.form-section { padding: var(--space-250) 0; border-top: 1px solid var(--ds-border); }
.form-section:first-of-type { border-top: 0; padding-top: var(--space-100); }
.form-section > h3 { font-size: 15px; margin-bottom: var(--space-050); }
.form-section > h3 + .field { margin-top: var(--space-150); }
.form-section > .helper { margin-bottom: var(--space-150); }
.form-section > .field + .helper, .form-section > .inset + .helper { margin-top: var(--space-100); }
.inset { margin-top: var(--space-150); padding: var(--space-200); background: var(--ds-surface-sunken); border: 1px solid var(--ds-border); border-radius: var(--radius-lg); }

/* ---------- Message bars ---------- */
.section-msg { display: flex; gap: var(--space-150); padding: var(--space-150) var(--space-200); border-radius: var(--radius);
  background: var(--ds-bg-information); border: 1px solid var(--ds-border-information); margin-bottom: var(--space-200); }
.section-msg svg { width: 20px; height: 20px; flex: none; color: var(--ds-text-brand); }
.section-msg.warning { background: var(--ds-bg-warning); border-color: var(--ds-border-warning); } .section-msg.warning svg { color: var(--ds-bg-warning-bold); }
.section-msg.error { background: var(--ds-bg-danger); border-color: var(--ds-border-danger-l); } .section-msg.error svg { color: var(--ds-text-danger); }
.section-msg.success { background: var(--ds-bg-success); border-color: var(--ds-border-success); } .section-msg.success svg { color: var(--ds-text-success); }
.section-msg h4 { margin-bottom: 2px; }

/* ---------- Toasts ---------- */
.flags { position: fixed; right: var(--space-300); bottom: var(--space-300); z-index: 600; display: flex; flex-direction: column-reverse; gap: var(--space-100); }
.flag { width: 360px; max-width: calc(100vw - 32px); display: flex; gap: var(--space-150); padding: var(--space-150) var(--space-200);
  border-radius: var(--radius-lg); background: var(--ds-surface-overlay); box-shadow: var(--ds-shadow-overlay); animation: flag-in .2s ease-out; }
.flag svg { width: 20px; height: 20px; flex: none; }
.flag.success svg { color: var(--ds-text-success); }
.flag.error svg { color: var(--ds-text-danger); }
.flag.info svg { color: var(--ds-text-brand); }
.flag h4 { margin-bottom: 2px; }
@keyframes flag-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Dialogs ---------- */
.blanket { position: fixed; inset: 0; background: var(--ds-blanket); z-index: 500; display: grid; place-items: start center; padding: 48px var(--space-200); overflow-y: auto; }
.modal { width: 600px; max-width: 100%; background: var(--ds-surface-overlay); border-radius: var(--radius-lg); box-shadow: var(--ds-shadow-overlay); }
.modal.sm { width: 440px; }
.modal.lg { width: 680px; }
.modal header { padding: var(--space-300) var(--space-300) var(--space-100); display: flex; align-items: center; }
.modal header h2 { flex: 1; }
.modal .body { padding: var(--space-100) var(--space-300); }
.modal footer { padding: var(--space-200) var(--space-300) var(--space-300); display: flex; justify-content: flex-end; gap: var(--space-100); }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: var(--space-600) var(--space-300); max-width: 464px; margin: 0 auto; }
.empty > .ico svg { width: 64px; height: 64px; color: var(--ds-text-subtlest); opacity: .5; margin-bottom: var(--space-200); }
.empty h3 { font-size: 18px; line-height: 24px; margin-bottom: var(--space-100); }
.empty p { color: var(--ds-text-subtlest); margin-bottom: var(--space-300); }

/* ---------- Activity / comments ---------- */
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; gap: var(--space-150); padding: var(--space-150) 0; border-bottom: 1px solid #F0F0F0; }
.activity li:last-child { border-bottom: 0; }
.activity li > .lozenge, .activity li > .priority { align-self: center; flex: none; }
.activity .meta { color: var(--ds-text-subtlest); font-size: 12px; line-height: 16px; }
.activity .body { white-space: pre-wrap; word-break: break-word; margin-top: var(--space-050); }
.activity .internal { background: var(--ds-bg-warning); border: 1px solid var(--ds-border-warning); border-radius: var(--radius); padding: var(--space-100) var(--space-150); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 var(--space-300); position: relative; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--ds-border); }
.timeline li { position: relative; padding-bottom: var(--space-300); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ds-bg-brand-bold); box-shadow: 0 0 0 3px var(--ds-surface); }
.timeline li.muted::before { background: #BDBDBD; }

/* ---------- Detail layout ---------- */
.details { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-300); }
@media (max-width: 1000px) { .details { grid-template-columns: 1fr; } }
.props { display: grid; grid-template-columns: 110px 1fr; gap: var(--space-150) var(--space-200); align-items: center; margin: 0; }
.props dt { color: var(--ds-text-subtlest); font-size: 12px; font-weight: 600; }
.props dd { margin: 0; }
.desc { white-space: pre-wrap; word-break: break-word; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: var(--space-100); margin-bottom: var(--space-200); }
.tab { position: relative; background: none; border: 0; font: inherit; color: var(--ds-text-subtle); padding: var(--space-100) var(--space-150);
  border-radius: var(--radius); cursor: pointer; }
.tab:hover { background: var(--ds-bg-neutral-subtle-hovered); color: var(--ds-text); }
.tab[aria-selected=true] { color: var(--ds-text); font-weight: 600; }
.tab[aria-selected=true]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 2px; background: var(--ds-bg-brand-bold); }

/* ---------- Sign-in screens ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: var(--space-400) var(--space-200); background: var(--ds-canvas); }
.auth-card { width: 440px; max-width: 100%; background: var(--ds-surface); box-shadow: var(--ds-shadow-overlay);
  border-radius: var(--radius-lg); padding: var(--space-500) var(--space-500); }
.auth-card .brand { display: flex; align-items: center; gap: var(--space-100); margin-bottom: var(--space-300); }
.auth-card .brand h3 { font-size: 15px; }
.auth-card h1 { font-size: 24px; line-height: 32px; margin-bottom: var(--space-200); }
.auth-card > p { text-align: left !important; }
.auth-card form .btn-block { margin-top: var(--space-300); }
.qr { display: block; margin: var(--space-200) auto; border-radius: var(--radius); background: #fff; padding: var(--space-100); border: 1px solid var(--ds-border); }
.secret { display: block; text-align: center; font-family: var(--font-code); letter-spacing: 1px; word-break: break-all;
  background: var(--ds-bg-neutral); padding: var(--space-100); border-radius: var(--radius); }
.otp-input { text-align: center; font-size: 20px !important; letter-spacing: 8px; font-family: var(--font-code) !important; min-height: 40px !important; }
.steps { padding-left: var(--space-250); margin: 0 0 var(--space-200); color: var(--ds-text-subtle); }
.steps li + li { margin-top: var(--space-050); }
.copy-box { display: flex; gap: var(--space-100); align-items: center; }
.copy-box code { flex: 1; padding: var(--space-075) var(--space-100); background: var(--ds-bg-neutral); border: 1px solid var(--ds-border); border-radius: var(--radius); font-size: 14px; }

.spinner { width: 24px; height: 24px; border: 3px solid var(--ds-bg-neutral-hovered); border-top-color: var(--ds-bg-brand-bold);
  border-radius: 50%; animation: spin .8s linear infinite; margin: var(--space-600) auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.dropdown { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 240px; background: var(--ds-surface-overlay);
  box-shadow: var(--ds-shadow-overlay); border-radius: var(--radius-lg); padding: var(--space-050); z-index: 20; }
.menu .menu-head { padding: var(--space-100) var(--space-150); border-bottom: 1px solid var(--ds-border); margin-bottom: var(--space-050); }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: var(--space-075) var(--space-150); background: none; border: 0;
  border-radius: var(--radius); font: inherit; color: var(--ds-text); cursor: pointer; }
.menu button:hover, .menu a:hover { background: var(--ds-bg-neutral-subtle-hovered); text-decoration: none; }

/* ---------- Charts ---------- */
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1200px) { .grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 800px) { .grid.three { grid-template-columns: 1fr; } }
.grid + .grid { margin-top: var(--space-200); }
.chart-card > h3 { margin-bottom: var(--space-050); }
.chart-card > .chart-sub { color: var(--ds-text-subtlest); font-size: 12px; line-height: 16px; margin-bottom: var(--space-200); }
.chart-empty { color: var(--ds-text-subtlest); padding: var(--space-400) 0; text-align: center; }

.chart-donut { display: flex; align-items: center; justify-content: center; gap: var(--space-250); flex-wrap: wrap; }
.chart-donut-svg { width: 128px; height: 128px; flex: none; overflow: visible; }
.chart-mark { transition: opacity .12s; }
.chart-mark.dim, .chart-legend li.dim { opacity: .3; }
.chart-center-value { font-family: var(--font-display); font-size: 28px; font-weight: 600; fill: var(--ds-text); }
.chart-center-label { font-size: 11px; fill: var(--ds-text-subtlest); }
.chart-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: grid; gap: var(--space-100); }
.chart-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 34px; align-items: center; gap: var(--space-100); cursor: default; transition: opacity .12s; }
.chart-swatch { width: 10px; height: 10px; border-radius: 50%; }
.chart-legend-label { color: var(--ds-text-subtle); line-height: 16px; }
.chart-legend-value { font-weight: 600; color: var(--ds-text); text-align: right; }
.chart-legend-pct { color: var(--ds-text-subtlest); font-size: 12px; text-align: right; }

.chart-bars { display: grid; gap: var(--space-150); }
.chart-bar-row { display: grid; grid-template-columns: minmax(0, 40%) 1fr 44px; align-items: center; gap: var(--space-150); }
.chart-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ds-text-subtle); }
.chart-bar-track { height: 16px; display: flex; align-items: center; cursor: default; }
.chart-bar-track.scaled { background: linear-gradient(#F0F0F0, #F0F0F0) left center / 100% 10px no-repeat; border-radius: 4px; }
.chart-bar { height: 10px; border-radius: 0 4px 4px 0; min-width: 0; }
.chart-bar-value { text-align: right; font-weight: 600; color: var(--ds-text); font-size: 13px; }

.chart-tip { position: fixed; z-index: 700; display: none; pointer-events: none; padding: var(--space-075) var(--space-100);
  background: var(--ds-surface); color: var(--ds-text); border-radius: var(--radius); box-shadow: var(--ds-shadow-overlay); font-size: 12px; line-height: 16px; }
.chart-tip-title { font-weight: 600; }

/* ---------- Project timeline ---------- */
.timelog-day + .timelog-day { margin-top: var(--space-250); }
.timelog-date { display: flex; align-items: center; gap: var(--space-100); font-weight: 600; font-size: 13px; color: var(--ds-text);
  padding-bottom: var(--space-075); border-bottom: 1px solid var(--ds-border); }
.timelog .activity li { align-items: flex-start; }
.timelog .activity li > .row { align-self: center; flex: none; }
.timelog .btn-subtle { height: 28px; padding: 0 var(--space-100); font-weight: 400; color: var(--ds-text-subtle); }

/* ---------- Excel preview ---------- */
.page:has(.xv) { max-width: none; }
.xv-bar { display: flex; align-items: center; gap: var(--space-100); flex-wrap: wrap; margin-bottom: var(--space-150); }
.xv-frame { display: block; width: 100%; height: 640px; min-height: 480px; border: 1px solid var(--ds-border-strong);
  border-radius: var(--radius-lg); background: #fff; box-shadow: var(--ds-shadow-raised); }
.xv code { font-size: 13px; background: rgba(0,0,0,.06); padding: 0 4px; border-radius: 3px; }
.brand-logo { height: 36px; width: auto; display: block; }
.brand-logo.lg { height: 44px; }
.product-name { padding-left: var(--space-150); margin-left: var(--space-050); border-left: 1px solid var(--ds-border); font-weight: 600; }
.auth-card .brand { flex-direction: column; align-items: flex-start; gap: var(--space-100); }
@media (max-width: 600px) { .product-name { display: none; } }
