:root {
  color-scheme: dark;
  --ink: #f3f3f3;
  --ink-soft: #d0d0d0;
  --neutral-950: #0b0b0b;
  --neutral-900: #ededed;
  --neutral-800: #dedede;
  --neutral-700: #d4d4d4;
  --neutral-600: #bdbdbd;
  --neutral-100: #292929;
  --neutral-50: #202020;
  --paper: #101010;
  --surface: #191919;
  --surface-muted: #202020;
  --line: #333333;
  --line-strong: #5c5c5c;
  --muted: #ababab;
  --danger: #eeeeee;
  --danger-soft: #282828;
  --warning: #d0d0d0;
  --warning-soft: #242424;
  --logo-cut: #101010;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: var(--font-sans);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .025), 0 8px 24px rgba(0, 0, 0, .12);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .6);
  --radius: 12px;
  --sidebar-width: 248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--font-sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .58; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
button, input, select, textarea, a { outline: 2px solid transparent; outline-offset: 3px; }
:focus-visible { outline-color: #bdbdbd !important; }
::selection { background: #1c1c1c; color: var(--neutral-950); }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
h1 { letter-spacing: -.035em; }
h2, h3 { letter-spacing: -.02em; }
strong { font-weight: 650; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; z-index: 200; left: 16px; top: -80px; padding: 11px 16px; border-radius: 8px; background: var(--surface); color: var(--neutral-900); font-weight: 650; box-shadow: var(--shadow-lg); }
.skip-link:focus { top: 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #1c1c1c; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; color: var(--neutral-600); font-size: 10px; font-weight: 750; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
.eyebrow--light { color: #bdbdbd; }
.eyebrow-line { display: inline-block; width: 24px; height: 1px; background: currentColor; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.55; }

/* Access screen */
.auth-shell { display: grid; grid-template-columns: minmax(360px, 1.04fr) minmax(430px, .96fr); min-height: 100svh; }
.auth-intro { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; min-height: 100svh; padding: 44px clamp(40px, 5.4vw, 86px); background: var(--neutral-900); color: #bdbdbd; }
.auth-intro::before { position: absolute; z-index: -1; content: ""; width: 520px; height: 520px; right: -180px; top: 11%; border: 1px solid rgba(0, 0, 0, .1); border-radius: 50%; box-shadow: 0 0 0 70px rgba(0, 0, 0, .025), 0 0 0 140px rgba(0, 0, 0, .025); }
.auth-intro::after { position: absolute; z-index: -1; content: ""; inset: auto 0 0; height: 36%; opacity: .18; background-image: linear-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 48px 48px; mask-image: linear-gradient(transparent, #ffffff); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--neutral-900); }
.brand-mark { width: 40px; height: 40px; flex: 0 0 auto; color: var(--neutral-900); }
.brand-name { display: block; font-size: 23px; font-weight: 740; letter-spacing: -.055em; line-height: 1.1; }
.brand-caption { margin-left: 4px; padding-left: 14px; border-left: 1px solid rgba(0, 0, 0, .22); color: #bdbdbd; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.brand--light { color: #bdbdbd; }
.brand--light .brand-mark { color: #bdbdbd; --logo-cut: var(--neutral-900); }
.auth-panel { display: grid; place-items: center; padding: 42px; background: var(--surface); }
.auth-card { width: min(100%, 400px); }
.auth-card h2 { margin-bottom: 13px; font-family: var(--font-serif); font-size: 39px; font-weight: 400; letter-spacing: -.035em; }
.auth-description { margin-bottom: 29px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-mobile-brand { display: none; margin-bottom: 40px; }
.auth-footnote { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 35px 0 0; color: #bdbdbd; font-size: 10px; }
.auth-footnote .icon { width: 14px; }
.auth-loading { display: grid; justify-items: center; gap: 16px; padding: 60px 0; color: var(--muted); text-align: center; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { min-width: 0; margin-bottom: 18px; }
.field label { display: flex; align-items: baseline; gap: 6px; margin-bottom: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.field label .optional { color: var(--muted); font-size: 10px; font-weight: 400; }
.field input, .field select, .field textarea { display: block; width: 100%; min-height: 45px; border: 1px solid var(--line-strong); border-radius: 8px; background: #1c1c1c; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field input, .field select { padding: 10px 12px; }
.field textarea { min-height: 100px; padding: 11px 12px; line-height: 1.5; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #bdbdbd; opacity: 1; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #383838; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--neutral-600); box-shadow: 0 0 0 3px rgba(0, 0, 0, .09); outline: none; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--danger); }
.field select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, #1c1c1c 50%), linear-gradient(135deg, #1c1c1c 50%, transparent 50%); background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.field-hint, .field-error { margin: 6px 0 0; font-size: 10.5px; line-height: 1.5; }
.field-hint { color: var(--muted); }
.field-error, .form-error { color: var(--danger); }
.form-error { margin: 8px 0 15px; padding: 10px 12px; border-radius: 7px; background: var(--danger-soft); font-size: 12px; line-height: 1.5; }
.input-with-icon { position: relative; }
.input-with-icon > .icon { position: absolute; left: 12px; top: 13px; width: 18px; color: var(--muted); pointer-events: none; }
.input-with-icon input { padding-left: 39px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 650; line-height: 1.4; transition: background .15s, border-color .15s, transform .15s; }
.button:not(:disabled):active { transform: translateY(1px); }
.button .icon { width: 17px; height: 17px; }
.button--wide { width: 100%; min-height: 48px; }
.button--primary { border-color: var(--neutral-900); background: var(--neutral-900); color: #bdbdbd; }
.button--primary:hover:not(:disabled) { border-color: var(--neutral-700); background: var(--neutral-700); }
.button--secondary { border-color: var(--line-strong); background: var(--surface); color: var(--neutral-900); }
.button--secondary:hover:not(:disabled) { border-color: #383838; background: var(--neutral-50); }
.button--ghost { border-color: transparent; background: transparent; color: var(--ink-soft); }
.button--ghost:hover:not(:disabled) { background: #1c1c1c; }
.button--danger { border-color: var(--danger); background: var(--danger); color: #bdbdbd; }
.button--danger:hover:not(:disabled) { background: #1c1c1c; }
.button--small { min-height: 34px; padding: 7px 11px; font-size: 11px; }
.button--text { min-height: 30px; padding: 4px 7px; border-color: transparent; background: transparent; color: var(--neutral-700); }
.button--text:hover:not(:disabled) { background: var(--neutral-50); }
.divider { display: flex; align-items: center; gap: 13px; margin: 27px 0 21px; color: #bdbdbd; font-size: 10px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-access-copy { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; }
.demo-access-copy > .icon { margin-top: 2px; color: var(--neutral-600); }
.demo-access-copy p { margin: 0; color: var(--muted); font-size: 11px; }
.demo-access-copy strong { color: var(--ink); font-size: 12px; }
.demo-access .fine-print { margin: 12px 0 0; text-align: center; font-size: 10px; }
.setup-icon { display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 26px; border-radius: 13px; background: var(--neutral-50); color: var(--neutral-700); }
.setup-icon .icon { width: 25px; height: 25px; }
.setup-requirements { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 20px; }
.setup-requirements code { padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-muted); color: var(--ink-soft); font-size: 10px; overflow-wrap: anywhere; }
.setup-requirements span { padding: 5px 0; color: var(--muted); font-size: 11px; }
#setup-refresh { margin-top: 18px; }
.enrollment-pending { display: grid; gap: 9px; overflow-wrap: anywhere; }
.enrollment-pending code { font-size: 12px; font-weight: 650; }
#auth-content > .form-error { margin: 0 0 18px; }
.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 11.5px; line-height: 1.55; }
.notice p { margin: 0; }
.notice > .icon { width: 18px; height: 18px; margin-top: 1px; }
.notice--info { border-color: #383838; background: var(--neutral-50); color: #bdbdbd; }
.notice--warning { border-color: #383838; background: var(--warning-soft); color: #bdbdbd; }

/* App shell */
.app-shell { min-height: 100svh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; display: flex; flex-direction: column; width: var(--sidebar-width); padding: 27px 17px 17px; background: var(--neutral-950); color: #bdbdbd; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 10px; }
.sidebar-brand { color: #bdbdbd; }
.sidebar-brand .brand-mark { color: #bdbdbd; --logo-cut: var(--neutral-950); }
.sidebar-brand .brand-name { font-size: 25px; }
.brand-subtitle { display: block; margin-top: 4px; color: #bdbdbd; font-size: 8px; font-weight: 550; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-close { display: none; }
.sidebar-nav { margin-top: 48px; }
.nav-label { margin: 0 13px 12px; color: #bdbdbd; font-size: 9px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.nav-label--second { margin-top: 32px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 13px; min-height: 44px; margin: 4px 0; padding: 10px 13px; border-radius: 8px; color: #bdbdbd; font-size: 12px; font-weight: 520; transition: color .15s, background .15s; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { background: rgba(0, 0, 0, .06); color: #bdbdbd; }
.nav-link[aria-current="page"] { background: #1c1c1c; color: #bdbdbd; }
.nav-link[aria-current="page"]::before { position: absolute; content: ""; left: 0; width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: #1c1c1c; }
.sidebar-spacer { flex: 1; min-height: 35px; }
.sidebar-note { display: flex; gap: 9px; margin: 0 7px 22px; padding: 13px 11px; border: 1px solid rgba(0, 0, 0, .13); border-radius: 8px; color: #bdbdbd; }
.sidebar-note .icon { width: 15px; height: 15px; margin-top: 2px; }
.sidebar-note p { margin: 0; font-size: 9.5px; line-height: 1.6; }
.sidebar-note strong { display: block; margin-bottom: 3px; color: #bdbdbd; font-size: 10px; }
.owner-card { display: flex; align-items: center; gap: 10px; padding: 16px 8px 4px; border-top: 1px solid rgba(0, 0, 0, .13); }
.owner-avatar { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 50%; background: #1c1c1c; color: var(--neutral-900); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.owner-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; font-size: 9px; color: #bdbdbd; }
.owner-email { overflow: hidden; color: #bdbdbd; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; padding: 0; border: 0; border-radius: 7px; background: transparent; color: inherit; transition: background .15s, color .15s; }
.icon-button:hover:not(:disabled) { background: rgba(0, 0, 0, .13); }
.icon-button .icon { width: 18px; height: 18px; }
.owner-card .icon-button { width: 31px; height: 31px; color: #bdbdbd; }
.workspace { min-height: 100svh; margin-left: var(--sidebar-width); }
.topbar { display: flex; align-items: center; gap: 18px; min-height: 111px; padding: 25px clamp(26px, 3.2vw, 48px) 22px; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .95); }
.page-heading { min-width: 0; flex: 1; }
.page-heading h1 { margin: 0; font-family: var(--font-serif); font-size: clamp(29px, 2.8vw, 38px); font-weight: 400; }
.page-heading .eyebrow { margin-bottom: 4px; font-size: 8.5px; }
.page-actions { display: flex; align-items: center; gap: 10px; }
.nav-menu { display: none; }
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 11px; padding: 9px 25px; border-bottom: 1px solid #383838; background: #1c1c1c; color: #bdbdbd; }
.demo-banner > .icon { width: 17px; }
.demo-banner p { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; margin: 0; font-size: 10px; }
.demo-banner strong { font-size: 10.5px; }
.content { width: min(100%, 1550px); min-height: calc(100svh - 165px); margin: 0 auto; padding: 30px clamp(26px, 3.2vw, 48px) 45px; }
.workspace-footer { display: flex; justify-content: space-between; gap: 15px; margin: 0 clamp(26px, 3.2vw, 48px); padding: 17px 0 22px; border-top: 1px solid var(--line); color: #bdbdbd; font-size: 9px; }
.workspace-footer > span:last-child { display: flex; align-items: center; gap: 7px; }
.workspace-footer .status-dot { width: 5px; height: 5px; background: #1c1c1c; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 23px; }
.view-heading h2 { margin: 0 0 5px; font-size: 18px; font-weight: 650; }
.view-heading p { max-width: 670px; margin: 0; color: var(--muted); font-size: 12px; }
.view-heading .eyebrow { margin-bottom: 8px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; color: var(--neutral-700); font-size: 11px; font-weight: 650; }
.text-link:hover { color: var(--neutral-900); text-decoration: underline; text-underline-offset: 4px; }
.text-link .icon { width: 15px; height: 15px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 14px; font-weight: 680; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-body { padding: 22px; }
.badge { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.badge .icon { width: 11px; height: 11px; }
.badge--draft { border-color: #383838; background: #1c1c1c; color: #bdbdbd; }
.badge--active { border-color: #383838; background: #1c1c1c; color: #bdbdbd; }
.badge--archived { border-color: #383838; background: #1c1c1c; color: #bdbdbd; }
.badge--planned, .badge--blocked { border-color: #383838; background: var(--warning-soft); color: #bdbdbd; }
.badge--available, .badge--configured { border-color: #383838; background: #1c1c1c; color: #bdbdbd; }
.badge--neutral { border-color: var(--line); background: var(--surface-muted); color: var(--muted); }
.badge--demo { border-color: #383838; background: #1c1c1c; color: #bdbdbd; }
.demo-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--warning); font-size: 9px; font-weight: 650; }
.demo-tag .icon { width: 11px; height: 11px; }
.subtle { color: var(--muted); }
.muted-icon { color: #bdbdbd; }

/* Overview */
.welcome-panel { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-bottom: 24px; padding: 30px 34px; border-radius: var(--radius); background: var(--neutral-900); color: #bdbdbd; }
.welcome-panel::after { position: absolute; z-index: -1; content: ""; width: 320px; height: 320px; right: -60px; border: 1px solid rgba(0, 0, 0, .14); border-radius: 50%; box-shadow: 0 0 0 44px rgba(0, 0, 0, .035), 0 0 0 88px rgba(0, 0, 0, .035); }
.welcome-panel .eyebrow { color: #bdbdbd; }
.welcome-panel h2 { max-width: 660px; margin: 0 0 9px; font-family: var(--font-serif); font-size: clamp(24px, 2.5vw, 34px); font-weight: 400; letter-spacing: -.025em; }
.welcome-panel p:last-child { max-width: 670px; margin: 0; color: #bdbdbd; font-size: 12px; }
.welcome-panel .button { flex: 0 0 auto; border-color: #383838; background: #1c1c1c; color: var(--neutral-900); }
.welcome-panel .button:hover { background: #1c1c1c; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 32px; }
.stat-card { min-width: 0; padding: 20px 21px; }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.stat-card-top .icon { width: 17px; height: 17px; color: #bdbdbd; }
.stat-value { margin: 10px 0 6px; font-family: var(--font-serif); font-size: 35px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-note { margin: 0; color: #bdbdbd; font-size: 9.5px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .8fr); gap: 22px; }
.recent-projects { padding: 6px 22px 10px; }
.compact-project { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #383838; }
.compact-project:last-child { border-bottom: 0; }
.compact-project-main { flex: 1; min-width: 0; }
.compact-project-title { display: block; overflow: hidden; margin-bottom: 3px; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.compact-project-title:hover { color: var(--neutral-600); }
.compact-project-meta { display: block; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.compact-project > .icon { width: 15px; color: #bdbdbd; }
.project-monogram { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid #383838; border-radius: 10px; background: #1c1c1c; color: var(--neutral-700); font-family: var(--font-serif); font-size: 18px; }
.roadmap-mini { padding: 20px 22px; }
.roadmap-mini > p { color: var(--muted); font-size: 11px; }
.roadmap-mini-list { display: grid; gap: 17px; margin: 22px 0 0; padding: 0; list-style: none; }
.roadmap-mini-list li { display: flex; align-items: center; gap: 11px; font-size: 11px; }
.module-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid #383838; border-radius: 9px; background: var(--neutral-50); color: var(--neutral-600); }
.module-icon .icon { width: 17px; height: 17px; }
.roadmap-mini-list .badge { margin-left: auto; }

/* Project portfolio */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding: 11px; }
.search-field { position: relative; flex: 1; min-width: 130px; }
.search-field .icon { position: absolute; top: 11px; left: 12px; width: 17px; height: 17px; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; min-height: 38px; padding: 8px 12px 8px 38px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--ink); font-size: 12px; }
.search-field input::placeholder { color: #bdbdbd; }
.search-field input:focus { border-color: var(--line-strong); background: #1c1c1c; outline: none; box-shadow: 0 0 0 3px rgba(0, 0, 0, .08); }
.filter-field { position: relative; display: flex; align-items: center; gap: 7px; padding-left: 13px; border-left: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.filter-field select { min-width: 132px; min-height: 36px; padding: 7px 29px 7px 10px; border: 1px solid transparent; border-radius: 6px; background: var(--surface-muted); color: var(--ink-soft); font-size: 11px; }
.portfolio-summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 2px 14px; color: var(--muted); font-size: 10px; }
.portfolio-summary .text-link { font-size: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project-grid > .empty-state { grid-column: 1 / -1; }
.project-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 270px; padding: 22px; transition: border-color .18s, transform .18s, box-shadow .18s; }
.project-card:hover { border-color: #383838; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0, 0, 0, .07); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.project-card-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.project-card h3 { margin: 0 0 7px; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.project-domain { display: flex; align-items: center; gap: 5px; min-width: 0; margin: 0 0 13px; color: var(--neutral-600); font-size: 10px; }
.project-domain .icon { width: 13px; height: 13px; }
.project-domain span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-domain.is-unset { color: #bdbdbd; }
.project-niche { display: -webkit-box; overflow: hidden; margin-bottom: 20px; color: var(--muted); font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.project-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 15px; border-top: 1px solid #383838; }
.project-type { color: #bdbdbd; font-size: 9px; }
.project-card-actions { display: flex; align-items: center; gap: 3px; }
.project-card-actions .icon-button { width: 30px; height: 30px; color: var(--muted); }
.project-card-actions .icon-button .icon { width: 15px; height: 15px; }
.open-project { margin-left: 4px; }
.empty-state { display: flex; flex-direction: column; align-items: center; max-width: 560px; margin: 40px auto; padding: 44px 25px; text-align: center; }
.empty-state-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 21px; border: 1px solid #383838; border-radius: 18px; background: #1c1c1c; color: var(--neutral-600); transform: rotate(-3deg); }
.empty-state-icon .icon { width: 29px; height: 29px; transform: rotate(3deg); }
.empty-state h2, .empty-state h3 { margin-bottom: 9px; font-family: var(--font-serif); font-size: 25px; font-weight: 400; }
.empty-state p { max-width: 420px; margin-bottom: 22px; color: var(--muted); font-size: 12px; }
.empty-state .button { margin-top: 2px; }
.panel > .empty-state { margin-top: 10px; margin-bottom: 10px; }
.empty-inline { padding: 25px; color: var(--muted); font-size: 11px; text-align: center; }

/* Detail */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; }
.back-link:hover { color: var(--neutral-700); }
.back-link .icon { width: 15px; height: 15px; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 24px; padding: 27px 29px; }
.detail-identity { display: flex; align-items: flex-start; gap: 17px; min-width: 0; }
.detail-identity .project-monogram { width: 52px; height: 52px; border-radius: 13px; font-size: 25px; }
.detail-identity h2 { margin: 1px 0 6px; font-size: 22px; overflow-wrap: anywhere; }
.detail-identity .project-domain { margin-bottom: 10px; font-size: 11px; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .8fr); gap: 22px; }
.detail-section { margin-bottom: 23px; }
.detail-description { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 24px 0 0; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-facts dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.detail-facts dd { margin: 0; font-size: 11px; font-weight: 600; overflow-wrap: anywhere; }
.modules-intro { margin-bottom: 14px; color: var(--muted); font-size: 11px; }
.modules-list { padding: 0 21px; }
.module-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 17px 0; border-bottom: 1px solid #383838; }
.module-row:last-child { border-bottom: 0; }
.module-row h3 { margin: 0 0 4px; font-size: 12px; font-weight: 650; }
.module-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.module-row-action { display: flex; align-items: center; gap: 8px; }
.module-row-action .button { white-space: nowrap; }
.detail-side .panel { margin-bottom: 20px; }
.publication-note { padding: 20px 22px; background: #1c1c1c; }
.publication-note .module-icon { margin-bottom: 13px; background: transparent; }
.publication-note h3 { margin-bottom: 8px; font-size: 13px; }
.publication-note p { margin: 0; color: #bdbdbd; font-size: 10.5px; }
.mini-jobs { padding: 5px 20px 13px; }
.mini-job { padding: 14px 0; border-bottom: 1px solid var(--line); }
.mini-job:last-child { border-bottom: 0; }
.mini-job-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-bottom: 6px; font-size: 11px; font-weight: 650; }
.mini-job time { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }

/* Requests, audit, integrations */
.request-summary { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; color: var(--muted); font-size: 11px; }
.request-summary > .icon { color: var(--warning); }
.filter-link { display: inline-flex; margin-bottom: 15px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--surface-muted); color: var(--muted); font-size: 9px; font-weight: 650; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 16px 20px; border-bottom: 1px solid #383838; font-size: 11px; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #1c1c1c; }
.table-primary { display: block; margin-bottom: 4px; color: var(--ink); font-weight: 650; }
.table-secondary { display: block; color: var(--muted); font-size: 10px; }
.table-summary { min-width: 230px; max-width: 480px; color: var(--ink-soft); line-height: 1.6; overflow-wrap: anywhere; }
.table-project-link { color: var(--neutral-700); font-weight: 600; }
.table-project-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-date { color: var(--muted); font-size: 10px; white-space: nowrap; }
.audit-target { display: block; max-width: 380px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; overflow-wrap: anywhere; }
.audit-action { display: flex; align-items: center; gap: 9px; }
.audit-action .icon { width: 15px; height: 15px; color: var(--neutral-600); }
.integration-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 22px; }
.integration-intro p { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; }
.integration-intro .badge { margin-top: 3px; }
.integrations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.integration-card { padding: 22px; }
.integration-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.integration-provider { display: flex; align-items: center; gap: 12px; min-width: 0; }
.provider-mark { display: grid; place-items: center; width: 39px; height: 39px; flex: 0 0 auto; border: 1px solid #383838; border-radius: 10px; background: var(--neutral-50); color: var(--neutral-700); font-family: var(--font-serif); font-size: 19px; text-transform: uppercase; }
.integration-provider h3 { margin: 0 0 3px; font-size: 14px; overflow-wrap: anywhere; }
.integration-provider code { color: var(--muted); font-size: 9px; }
.integration-description { margin: 17px 0; color: var(--muted); font-size: 10.5px; }
.integration-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.integration-updated { color: var(--muted); font-size: 9px; }
.integration-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.integration-safety { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; padding: 16px 18px; color: var(--muted); font-size: 10.5px; }
.integration-safety .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--neutral-600); }
.integration-safety p { margin: 0; }

/* Loading, dialogs and toasts */
.loading-state { display: grid; justify-items: center; gap: 13px; min-height: 240px; align-content: center; color: var(--muted); font-size: 12px; }
.loading-state .spinner { color: var(--neutral-600); }
.skeleton { border-radius: 5px; background: #1c1c1c; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.error-state { max-width: 560px; margin: 50px auto; padding: 30px; text-align: center; }
.error-state > .icon { width: 30px; height: 30px; margin-bottom: 13px; color: var(--danger); }
.error-state h2 { margin-bottom: 9px; font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.error-state p { color: var(--muted); font-size: 12px; }
.dialog { width: min(calc(100% - 32px), 500px); max-height: min(90svh, 850px); padding: 0; overflow: auto; border: 1px solid #383838; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.dialog--wide { width: min(calc(100% - 32px), 650px); }
.dialog--small { width: min(calc(100% - 32px), 440px); }
.dialog::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
.dialog-frame { margin: 0; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 26px 13px; }
.dialog-header h2 { margin: 0; font-family: var(--font-serif); font-size: 27px; font-weight: 400; }
.dialog-header .icon-button { margin-top: -5px; margin-right: -8px; color: var(--muted); }
.dialog-header .eyebrow { margin-bottom: 6px; font-size: 9px; }
.dialog-body { padding: 8px 26px 12px; }
.dialog-description { margin-bottom: 23px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 17px 26px 22px; border-top: 1px solid var(--line); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field--full { grid-column: 1 / -1; }
.danger-icon { display: grid; place-items: center; width: 41px; height: 41px; border-radius: 11px; background: var(--danger-soft); color: var(--danger); }
.danger-icon .icon { width: 20px; height: 20px; }
.dialog--small .dialog-body h2 { margin-bottom: 12px; font-family: var(--font-serif); font-size: 26px; font-weight: 400; }
.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; display: grid; gap: 10px; width: min(calc(100% - 32px), 380px); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 14px 15px; border: 1px solid #383838; border-radius: 11px; background: #1c1c1c; color: var(--ink); box-shadow: 0 10px 40px rgba(0, 0, 0, .16); pointer-events: auto; animation: toast-in .2s ease-out; }
.toast > .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--neutral-600); }
.toast p { flex: 1; margin: 0; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.toast .icon-button { width: 25px; height: 25px; margin: -4px -5px 0 0; color: var(--muted); }
.toast .icon-button .icon { width: 14px; height: 14px; }
.toast--error { border-color: #383838; background: #1c1c1c; }
.toast--error > .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.nav-overlay { display: none; }

@media (min-width: 861px) {
  .sidebar .sidebar-close { display: none; }
}

@media (min-width: 1500px) {
  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
  :root { --sidebar-width: 220px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid, .detail-grid { grid-template-columns: minmax(0, 1.45fr) minmax(220px, .8fr); gap: 16px; }
  .auth-shell { grid-template-columns: minmax(340px, .9fr) minmax(410px, 1.1fr); }
  .auth-intro { padding: 35px; }
  .auth-intro h1 { font-size: 46px; }
  .welcome-panel { padding: 26px; }
  .module-row-action { flex-direction: column; align-items: flex-end; }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 248px; }
  .sidebar { transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-close, .nav-menu { display: inline-grid; }
  .workspace { margin-left: 0; }
  .nav-overlay { position: fixed; z-index: 35; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgba(0, 0, 0, .48); }
  .topbar { min-height: 94px; }
  .overview-grid, .detail-grid { grid-template-columns: 1fr; }
  .overview-grid .panel, .detail-grid .panel { min-width: 0; }
  .roadmap-mini-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .roadmap-mini-list li { flex-wrap: wrap; }
  .roadmap-mini-list .badge { margin-left: 45px; }
  .detail-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .detail-side .panel { margin-bottom: 0; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-intro { display: none; }
  .auth-panel { min-height: 100svh; }
  .auth-mobile-brand { display: inline-flex; }
}

@media (max-width: 600px) {
  .auth-panel { align-items: start; padding: 30px 24px; }
  .auth-card { max-width: 420px; margin: auto; }
  .auth-card h2 { font-size: 34px; }
  .auth-mobile-brand { margin-bottom: 50px; }
  .topbar { flex-wrap: wrap; gap: 12px; min-height: 92px; padding: 18px 18px; }
  .page-heading { order: 1; }
  .page-heading h1 { font-size: 29px; }
  .page-heading .eyebrow { font-size: 7.5px; }
  .nav-menu { order: 0; margin-left: -6px; }
  .page-actions { order: 2; width: 100%; padding-left: 31px; }
  .page-actions .button { width: 100%; }
  .demo-banner { align-items: flex-start; padding: 10px 16px; }
  .demo-banner p { display: block; text-align: left; }
  .demo-banner p span { display: block; margin-top: 2px; line-height: 1.5; }
  .content { min-height: calc(100svh - 150px); padding: 22px 17px 35px; }
  .workspace-footer { margin: 0 18px; }
  .workspace-footer > span:first-child { display: none; }
  .workspace-footer { justify-content: flex-end; }
  .view-heading { align-items: flex-start; margin-bottom: 18px; }
  .view-heading h2 { font-size: 16px; }
  .view-heading p { font-size: 11px; }
  .welcome-panel { display: block; padding: 25px 22px; }
  .welcome-panel h2 { font-size: 26px; }
  .welcome-panel .button { margin-top: 20px; }
  .stats-grid { gap: 10px; margin-bottom: 23px; }
  .stat-card { padding: 16px; }
  .stat-card-top { font-size: 9px; }
  .stat-card-top .icon { display: none; }
  .stat-value { font-size: 31px; }
  .stat-note { font-size: 8.5px; line-height: 1.45; }
  .panel-header { padding: 17px; }
  .panel-body { padding: 17px; }
  .recent-projects { padding-left: 17px; padding-right: 17px; }
  .roadmap-mini-list { grid-template-columns: 1fr; }
  .roadmap-mini-list .badge { margin-left: auto; }
  .toolbar { flex-wrap: wrap; padding: 8px; }
  .search-field { flex-basis: 100%; }
  .filter-field { width: 100%; padding: 6px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .filter-field select { flex: 1; }
  .project-grid, .integrations-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 245px; }
  .portfolio-summary { align-items: flex-start; }
  .detail-hero { display: block; padding: 21px; }
  .detail-actions { margin: 20px 0 0 69px; }
  .detail-facts { gap: 10px; }
  .modules-list { padding: 0 17px; }
  .module-row { grid-template-columns: auto minmax(0, 1fr); gap: 11px; }
  .module-row-action { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; margin-top: -2px; }
  .detail-side { grid-template-columns: 1fr; }
  .integration-card { padding: 18px; }
  .integration-card-head { gap: 7px; }
  .integration-card-head > .badge { font-size: 8px; }
  .integration-card-foot { align-items: flex-start; flex-direction: column; }
  .integration-actions { justify-content: flex-start; }
  .data-table th, .data-table td { padding: 13px 15px; }
  .table-summary { min-width: 200px; }
  .dialog { width: calc(100% - 22px); max-height: calc(100svh - 24px); border-radius: 13px; }
  .dialog-header { padding: 21px 20px 12px; }
  .dialog-body { padding: 8px 20px 12px; }
  .dialog-footer { padding: 15px 20px 20px; }
  .dialog-footer .button { flex: 1; padding-left: 10px; padding-right: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .toast-region { right: 16px; bottom: 16px; }
  .empty-state { margin: 23px auto; padding: 30px 15px; }
}

@media (max-width: 370px) {
  .detail-identity { gap: 12px; }
  .detail-identity .project-monogram { width: 43px; height: 43px; }
  .detail-actions { margin-left: 0; }
  .detail-actions .button { flex: 1; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Monochrome identity: quiet graphite surfaces, without decorative artwork. */
.auth-shell { background: #0b0b0b; grid-template-columns: minmax(360px, 1.1fr) minmax(420px, 1fr); }
.auth-intro { background: linear-gradient(155deg, #272727 0%, #1b1b1b 42%, #101010 100%); padding: 48px; border-right: 1px solid #292929; }
.auth-intro::before, .auth-intro::after { content: none; }
.brand--light .brand-mark, .sidebar-brand .brand-mark { color: #f1f1f1; --logo-cut: #101010; }
.auth-panel { position: relative; background: radial-gradient(ellipse at 100% 0, #202020 0, transparent 58%), #101010; padding: 64px; }
.auth-card { width: min(100%, 372px); }
.auth-card h2 { font-size: 36px; font-weight: 600; letter-spacing: -.045em; margin-bottom: 32px; }
.auth-card .field { margin-bottom: 24px; }
.auth-card .field label { font-size: 12px; }
.auth-card .field input { min-height: 50px; background: #171717; }
.auth-card .button--wide { min-height: 50px; }
.auth-mobile-brand { margin-bottom: 56px; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field input:focus { border-color: #cfcfcf; box-shadow: 0 0 0 3px rgba(255,255,255,.1); }
:focus-visible { outline-color: #ffffff !important; }
::selection { background: #e5e5e5; color: #101010; }
.button--primary, .button--danger { background: #f1f1f1; border-color: #f1f1f1; color: #111111; }
.button--primary:hover:not(:disabled), .button--danger:hover:not(:disabled) { background: #d5d5d5; border-color: #d5d5d5; }
.button--secondary:hover:not(:disabled) { border-color: #8e8e8e; }
.button--danger { border-style: double; border-width: 3px; }
.form-error { border: 1px solid #777777; border-left: 3px solid #ededed; }
.notice--warning { border-style: dashed; }
.sidebar { border-right: 1px solid #303030; }
.nav-link[aria-current="page"] { background: #272727; color: #ffffff; }
.nav-link[aria-current="page"]::before { background: #f5f5f5; }
.owner-avatar { background: #e5e5e5; color: #151515; }
.topbar { background: rgba(16,16,16,.96); }
.page-heading h1, .dialog-header h2, .dialog--small .dialog-body h2, .empty-state h2, .empty-state h3 { font-weight: 550; }
.workspace { background: radial-gradient(ellipse at 95% 0, #1d1d1d 0, transparent 42%), #101010; }
.welcome-panel { background: linear-gradient(120deg, #282828, #191919 65%, #121212); border: 1px solid #454545; }
.welcome-panel h2 { font-weight: 550; }
.welcome-panel::after { border-color: #555555; box-shadow: 0 0 0 44px rgba(255,255,255,.025), 0 0 0 88px rgba(255,255,255,.02); }
.welcome-panel .button { background: #efefef; color: #111111; border-color: #efefef; }
.welcome-panel .button:hover { background: #d5d5d5; }
.stat-value { font-weight: 550; letter-spacing: -.055em; }
.badge--active, .badge--available, .badge--configured { border-color: #858585; color: #eeeeee; background: #303030; }
.badge--planned, .badge--blocked { border-style: dashed; color: #d6d6d6; }
.badge--archived { border-style: dotted; }
.status-dot, .workspace-footer .status-dot { background: #c7c7c7; }
.dialog { border-color: #555555; }
.dialog::backdrop, .nav-overlay { background: rgba(0,0,0,.72); }
.toast { background: #242424; border-color: #686868; }
.toast--error { border-left: 3px solid #eeeeee; }
@media (max-width: 1120px) and (min-width: 861px) {
  .auth-panel { padding: 40px; }
}
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { background: linear-gradient(155deg, #222222 0%, #161616 42%, #101010 100%); }
}
@media (max-width: 600px) {
  .auth-panel { padding: 40px 26px; }
  .auth-card { padding: 24px 0; }
  .auth-card h2 { font-size: 32px; }
}
