@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

/* ============= TOKENS ============= */
:root {
  --bg: #f6f5f1;
  --paper: #fbfaf6;
  --ink: #0f100e;
  --ink-2: #39413d;
  --mute: #7a8079;
  --line: #e8e5da;
  --line-2: #efece2;
  --accent: #3e5b48;
  --accent-2: #e8efd8;
  --gold: #b0894a;
  --peach: #f4d4bf;
  --lav: #dcd6f0;
  --sage: #c8d6bd;
  --sky: #c4d9e6;
  --coral: #f0b8a8;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

/* ============= RESET & BASE ============= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); font-family: 'Geist', system-ui, sans-serif; color: var(--ink); font-size: 13.5px; -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }
.serif { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: -.01em; font-style: italic; }
.mono { font-family: 'Geist Mono', monospace; font-size: 11.5px; letter-spacing: 0; }

/* ============= LAYOUT ============= */
.app { width: 1440px; margin: 0 auto; display: flex; min-height: 100vh; }
.sidebar { width: 240px; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; flex-shrink: 0; border-right: 1px solid var(--line); background: var(--bg); overflow-y: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 28px 32px 48px; flex: 1; }
.topbar { height: 64px; padding: 0 32px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; background: rgba(246,245,241,.85); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); z-index: 5; border-bottom: 1px solid var(--line); }

/* ============= SIDEBAR ============= */
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 22px; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--ink); color: #fbfaf6; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; font-family: 'Instrument Serif', serif; font-style: italic; }
.brand h1 { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.brand p { font-size: 11px; color: var(--mute); margin-top: 1px; }
.workspace { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); margin-bottom: 20px; cursor: pointer; transition: background var(--duration-fast); }
.workspace:hover { background: #fff; }
.ws-left { display: flex; align-items: center; gap: 9px; }
.ws-avatar { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ws-name { font-size: 12.5px; font-weight: 600; }
.ws-role { font-size: 10.5px; color: var(--mute); }
.side-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--mute); font-weight: 500; padding: 14px 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer; margin-bottom: 1px; transition: background var(--duration-fast); }
.nav-item:hover { background: var(--line-2); }
.nav-item.active { background: var(--ink); color: #fbfaf6; }
.nav-item.active svg { color: #fbfaf6; }
.nav-item svg { width: 15px; height: 15px; color: var(--ink-2); flex-shrink: 0; }
.nav-item .n { margin-left: auto; font-size: 11px; color: var(--mute); font-family: 'Geist Mono', monospace; }
.nav-item.active .n { color: #c8ccc4; }
.side-foot { margin-top: auto; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.side-foot-item { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 8px; color: var(--mute); font-size: 12.5px; cursor: pointer; transition: all var(--duration-fast); }
.side-foot-item:hover { color: var(--ink); background: var(--line-2); }
.side-foot-item svg { width: 14px; height: 14px; }

/* ============= TOPBAR ============= */
.search { flex: 1; max-width: 480px; position: relative; }
.search input { width: 100%; height: 38px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 0 90px 0 40px; font-family: inherit; font-size: 13px; color: var(--ink); outline: none; transition: var(--duration-fast); }
.search input::placeholder { color: var(--mute); }
.search input:focus { border-color: var(--ink-2); background: #fff; }
.search svg { position: absolute; left: 14px; top: 11px; width: 16px; height: 16px; color: var(--mute); }
.search .k { position: absolute; right: 10px; top: 8px; font-family: 'Geist Mono', monospace; font-size: 10.5px; color: var(--mute); background: #fff; border: 1px solid var(--line); padding: 3px 7px; border-radius: 6px; }
.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ico { width: 38px; height: 38px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-2); position: relative; cursor: pointer; transition: background var(--duration-fast); }
.ico:hover { background: #fff; }
.ico svg { width: 16px; height: 16px; }
.ico .pip { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; border: 1px solid transparent; transition: all var(--duration-fast); }
.btn:active { transform: scale(0.98); }
.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-dark { background: var(--ink); color: #fbfaf6; }
.btn-dark:hover { background: #000; }
.btn-dark:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-dark:disabled:hover { background: var(--ink); }
.btn svg { width: 14px; height: 14px; }
.avatar-ring { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #c9b17e, #8a6f45); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }

/* ============= HERO ============= */
.hero { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; gap: 24px; }
.hero-left .eyebrow { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--mute); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.hero-left h2 { font-size: 38px; font-weight: 400; letter-spacing: -.02em; line-height: 1.1; color: var(--ink); }
.hero-left h2 em { font-family: 'Instrument Serif', serif; font-style: italic; color: var(--accent); }
.hero-left p { color: var(--mute); margin-top: 8px; font-size: 13.5px; max-width: 520px; }
.hero-right { display: flex; gap: 8px; flex-shrink: 0; }

/* ============= SIGNAL BAR ============= */
.signal { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.sig { background: var(--paper); padding: 18px 20px; position: relative; animation: fadeIn var(--duration-normal) var(--ease-out) both; }
.sig:nth-child(1) { animation-delay: 0ms; }
.sig:nth-child(2) { animation-delay: 50ms; }
.sig:nth-child(3) { animation-delay: 100ms; }
.sig:nth-child(4) { animation-delay: 150ms; }
.sig-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--mute); font-weight: 500; gap: 8px; }
.sig-val { font-size: 32px; font-weight: 400; font-family: 'Instrument Serif', serif; letter-spacing: -.01em; margin-top: 8px; color: var(--ink); line-height: 1; }
.sig-val .unit { font-family: 'Geist', sans-serif; font-size: 14px; color: var(--mute); font-weight: 400; margin-left: 4px; }
.sig-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11.5px; color: var(--mute); }
.trend-up { color: #3e6b4d; font-weight: 500; font-family: 'Geist Mono', monospace; font-size: 11px; }
.trend-down { color: #a03928; font-weight: 500; font-family: 'Geist Mono', monospace; font-size: 11px; }
.spark { width: 60px; height: 22px; }

/* ============= GRID / PANELS ============= */
.grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 20px; margin-bottom: 22px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: 0 1px 0 rgba(15,16,14,.02); }
.panel-elev { background: linear-gradient(180deg, #fbfaf6 0%, #f6f2e5 100%); border: 1px solid var(--line); border-radius: 20px; padding: 24px; position: relative; overflow: hidden; box-shadow: 0 12px 40px -18px rgba(62,91,72,.25), 0 1px 0 rgba(255,255,255,.6) inset; }
.panel-elev::before { content: ""; position: absolute; top: -40px; right: -40px; width: 180px; height: 180px; background: radial-gradient(circle, rgba(176,137,74,.25), transparent 70%); pointer-events: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.p-title { font-size: 18px; font-weight: 500; letter-spacing: -.01em; }
.p-title em { font-family: 'Instrument Serif', serif; font-style: italic; color: var(--accent); font-weight: 400; }
.p-sub { font-size: 12px; color: var(--mute); margin-top: 4px; }

/* ============= TAGS ============= */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; padding: 4px 9px; border-radius: 20px; font-weight: 500; background: var(--line-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; transition: border-color var(--duration-fast); }
.tag:hover { border-color: var(--ink-2); }
.tag-dot { width: 6px; height: 6px; border-radius: 50%; }
.tag.sage { background: var(--accent-2); color: var(--accent); border-color: #d5deaa; }
.tag.gold { background: #f5e8cd; color: #8a6a3c; border-color: #e6d3ac; }
.tag.peach { background: var(--peach); color: #a35134; border-color: #eec3ad; }
.tag.lav { background: var(--lav); color: #5c4a99; border-color: #c8c1e2; }
.tag.sky { background: var(--sky); color: #37617c; border-color: #a9c5d6; }
.tag.coral { background: var(--coral); color: #95371f; border-color: #e5a493; }
.tag.gray { background: #eae7dc; color: var(--ink-2); border-color: var(--line); }

/* ============= COMMITMENT CARD ============= */
.commit-hero { display: flex; align-items: baseline; gap: 14px; margin-bottom: 6px; }
.commit-hero .big { font-family: 'Instrument Serif', serif; font-size: 64px; line-height: 1; color: var(--ink); font-style: italic; }
.commit-hero .of { color: var(--mute); font-size: 20px; font-family: 'Instrument Serif', serif; }
.commit-hero .lbl { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.commit-sub { color: var(--ink-2); font-size: 13.5px; margin-bottom: 16px; max-width: 420px; }
.progress-track { height: 6px; background: #eae7dc; border-radius: 6px; overflow: hidden; margin: 14px 0 20px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent) 0%, #5b8069 100%); border-radius: 6px; transition: width var(--duration-normal) var(--ease-out); }
.commit-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 24px; font-size: 12.5px; font-weight: 500; transition: all var(--duration-fast); }
.pill:hover { border-color: var(--ink-2); }
.pill.done { background: var(--accent); color: #fff; border-color: var(--accent); }
.pill.done svg { color: #fff; }
.pill.dashed { background: transparent; border-style: dashed; color: var(--mute); cursor: pointer; }
.pill .avatar-tiny { width: 18px; height: 18px; border-radius: 50%; background: #eae7dc; color: var(--ink-2); font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.pill.done .avatar-tiny { background: rgba(255,255,255,.2); color: #fff; }
.pill svg { width: 12px; height: 12px; }
.commit-cta { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.cta-text { font-size: 12.5px; color: var(--ink-2); }
.cta-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--ink); color: #fbfaf6; border-radius: 24px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: background var(--duration-fast); }
.cta-btn:hover { background: #000; }
.cta-btn svg { width: 12px; height: 12px; }

/* ============= FOCUS PANEL ============= */
.focus-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.focus-item:last-child { border-bottom: none; padding-bottom: 0; }
.focus-item:first-child { padding-top: 0; }
.fi-icon { width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.fi-icon svg { width: 15px; height: 15px; }
.fi-body { flex: 1; min-width: 0; }
.fi-title { font-size: 13px; font-weight: 500; color: var(--ink); display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fi-meta { font-size: 12px; color: var(--mute); margin-top: 3px; line-height: 1.45; }
.fi-actions { display: flex; gap: 6px; margin-top: 8px; }
.fi-a { font-size: 11.5px; padding: 4px 10px; border-radius: 16px; background: #fff; border: 1px solid var(--line); cursor: pointer; color: var(--ink-2); font-weight: 500; transition: all var(--duration-fast); }
.fi-a.primary { background: var(--ink); color: #fbfaf6; border-color: var(--ink); }
.fi-a:hover { border-color: var(--ink-2); }

/* ============= BUCKET CARDS ============= */
.buckets-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 6px; }
.bkt { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; position: relative; overflow: hidden; transition: transform var(--duration-fast); }
.bkt:hover { transform: translateY(-2px); }
.bkt::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: 14px 14px 0 0; }
.bkt.rq::after { background: var(--accent); }
.bkt.rf::after { background: var(--gold); }
.bkt.vc::after { background: #8b7ec9; }
.bkt.rm::after { background: #c8846a; }
.bkt-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.bkt-name { font-family: 'Geist Mono', monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.bkt-val { font-family: 'Instrument Serif', serif; font-size: 34px; line-height: 1; color: var(--ink); }
.bkt-desc { font-size: 11.5px; color: var(--mute); margin-top: 8px; }
.bkt-progress { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-2); }
.mini-bar { width: 70px; height: 4px; background: #eae7dc; border-radius: 3px; overflow: hidden; }
.mini-bar .mf { height: 100%; border-radius: 3px; }

/* ============= TABLE ============= */
.tbl-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tbl-head { padding: 20px 22px 14px; display: flex; justify-content: space-between; align-items: flex-end; }
.tbl-filters { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 24px; background: #fff; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); cursor: pointer; font-weight: 500; transition: all var(--duration-fast); }
.chip:hover { border-color: var(--ink-2); }
.chip svg { width: 12px; height: 12px; }
.chip.on { background: var(--ink); color: #fbfaf6; border-color: var(--ink); }
.chip .x { color: var(--mute); }
.chip.on .x { color: #c8ccc4; }
table { width: 100%; border-collapse: collapse; }
thead th { text-align: left; padding: 12px 22px; font-family: 'Geist Mono', monospace; font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--mute); font-weight: 500; background: #f2efe4; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
tbody td { padding: 16px 22px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
tbody tr { transition: background var(--duration-fast); }
tbody tr:hover { background: #fff; }
tbody tr:last-child td { border-bottom: none; }
.co { display: flex; align-items: center; gap: 12px; }
.co-logo { width: 36px; height: 36px; border-radius: 11px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12.5px; flex-shrink: 0; font-family: 'Geist', sans-serif; }
.co-logo-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }
.co-name { font-weight: 500; color: var(--ink); font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.co-link { color: var(--ink); transition: color var(--duration-fast); }
.co-link:hover { color: var(--accent); }
.anchor-star { color: var(--gold); display: inline-flex; }
.anchor-star svg { width: 12px; height: 12px; }
.co-meta { font-size: 11.5px; color: var(--mute); margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.co-meta .dot { width: 2px; height: 2px; border-radius: 50%; background: var(--mute); }
.prio-p0 { color: #a03928; font-family: 'Geist Mono', monospace; font-weight: 500; font-size: 11.5px; }
.prio-p1 { color: #8a6a3c; font-family: 'Geist Mono', monospace; font-weight: 500; font-size: 11.5px; }
.prio-p2 { color: var(--mute); font-family: 'Geist Mono', monospace; font-weight: 500; font-size: 11.5px; }
.prio-p3 { color: var(--mute); font-family: 'Geist Mono', monospace; font-weight: 500; font-size: 11.5px; }
.score-wrap { display: flex; align-items: center; gap: 9px; }
.score-dots { display: flex; gap: 3px; }
.sd { width: 8px; height: 8px; border-radius: 50%; background: #eae7dc; transition: background var(--duration-fast); }
.sd.on { background: var(--accent); }
.score-num { font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--ink-2); }
.last { display: flex; align-items: center; gap: 8px; color: var(--mute); font-size: 12px; }
.last.stale { color: #a03928; font-weight: 500; }
.rowmenu { color: var(--mute); cursor: pointer; width: 26px; height: 26px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: all var(--duration-fast); }
.rowmenu:hover { background: var(--line-2); color: var(--ink); }
.tbl-foot { padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; background: #f2efe4; border-top: 1px solid var(--line); font-size: 12px; color: var(--mute); font-family: 'Geist Mono', monospace; }
.foot-nav { display: flex; gap: 4px; }
.fn { width: 28px; height: 28px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-2); transition: all var(--duration-fast); font-size: 12px; }
.fn:hover { border-color: var(--ink-2); }
.fn.on { background: var(--ink); color: #fbfaf6; border-color: var(--ink); }

/* ============= AI STRIP ============= */
.ai-strip { margin-top: 22px; padding: 18px 22px; border-radius: 16px; background: linear-gradient(120deg, #eef1e3 0%, #f6f5f1 60%, #f2ead8 100%); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; animation: fadeIn var(--duration-normal) var(--ease-out); }
.ai-left { display: flex; align-items: center; gap: 14px; }
.ai-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--ink); color: #fbfaf6; display: flex; align-items: center; justify-content: center; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 20px; }
.ai-msg .t { font-size: 14px; font-weight: 500; }
.ai-msg .t em { font-family: 'Instrument Serif', serif; font-style: italic; color: var(--accent); font-weight: 400; }
.ai-msg .s { font-size: 12.5px; color: var(--mute); margin-top: 3px; }
.ai-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ============= FOOTER ============= */
.footer { padding: 24px 32px; font-size: 11.5px; color: var(--mute); display: flex; justify-content: space-between; font-family: 'Geist Mono', monospace; }
.footer .links { display: flex; gap: 20px; }
.footer-link { cursor: pointer; transition: color var(--duration-fast); }
.footer-link:hover { color: var(--ink); }

/* ============= TOAST ============= */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 500; color: #fff; pointer-events: auto; opacity: 0; transform: translateY(16px); transition: all var(--duration-normal) var(--ease-out); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-exit { opacity: 0; transform: translateY(-8px); }
.toast-info { background: var(--ink); }
.toast-success { background: var(--accent); }
.toast-warning { background: #b0894a; }

/* ============= MODAL ============= */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,16,14,.4); z-index: 100; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity var(--duration-fast); backdrop-filter: blur(4px); }
.modal-backdrop.modal-visible { opacity: 1; }
.modal { background: var(--paper); border-radius: 20px; padding: 0; width: 480px; max-height: 80vh; overflow-y: auto; box-shadow: 0 24px 64px rgba(0,0,0,.2); transform: scale(0.95); transition: transform var(--duration-normal) var(--ease-out); }
.modal-visible .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { font-size: 20px; color: var(--mute); cursor: pointer; background: none; border: none; width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--line-2); color: var(--ink); }
.modal-body { padding: 20px 24px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px 20px; border-top: 1px solid var(--line); }
.modal-form { display: flex; flex-direction: column; gap: 12px; }
.modal-form label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.modal-contacts { display: flex; flex-direction: column; gap: 8px; }
.modal-check { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* ============= DROPDOWN ============= */
.dropdown-panel { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 50; animation: fadeIn var(--duration-fast) var(--ease-out); max-height: 320px; overflow-y: auto; }
.dropdown-item { padding: 8px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; transition: background var(--duration-fast); }
.dropdown-item:hover { background: var(--line-2); color: var(--ink); }
.dropdown-item.selected { color: var(--accent); font-weight: 500; }
.dropdown-check { color: var(--accent); font-size: 12px; }

/* ============= LOGIN ============= */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; padding: 40px; }
.login-container { max-width: 600px; width: 100%; }
.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.login-title { font-size: 32px; font-weight: 400; letter-spacing: -.02em; margin-bottom: 8px; font-family: 'Instrument Serif', serif; font-style: italic; }
.login-subtitle { color: var(--mute); font-size: 14px; margin-bottom: 24px; }
.login-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.login-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; transition: all var(--duration-fast); }
.login-card:hover { border-color: var(--accent); background: #fff; transform: translateY(-2px); }
.login-card-active { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px var(--accent-2); }
.login-card-disabled { opacity: 0.5; cursor: not-allowed; }
.login-card-disabled:hover { border-color: var(--line); background: var(--paper); transform: none; }
.login-avatar { width: 40px; height: 40px; border-radius: 10px; color: #fff; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.login-info { flex: 1; min-width: 0; }
.login-name { font-weight: 600; font-size: 14px; }
.login-role { font-size: 12px; color: var(--mute); }
.login-city { font-size: 11px; color: var(--mute); font-family: 'Geist Mono', monospace; }
.login-label { font-size: 10px; color: var(--mute); text-align: right; }
.login-form { display: flex; align-items: center; gap: 16px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.login-selected { flex: 1; font-size: 14px; color: var(--ink-2); }
.login-submit { height: 42px; padding: 0 24px; font-size: 14px; }

/* ============= DETAIL PAGES ============= */
.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; font-size: 13px; color: var(--mute); }
.bc-link { color: var(--accent); }
.bc-link:hover { text-decoration: underline; }
.bc-sep { color: var(--line); }
.bc-current { color: var(--ink); font-weight: 500; }
.detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.detail-header-left { display: flex; align-items: center; gap: 16px; }
.detail-header-right { display: flex; gap: 8px; }
.detail-name { font-size: 24px; font-weight: 500; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.detail-meta { font-size: 13px; color: var(--mute); margin-top: 4px; }
.anchor-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--gold); font-weight: 500; background: #f5e8cd; padding: 4px 10px; border-radius: 20px; border: 1px solid #e6d3ac; }
.detail-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.detail-field label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 500; font-family: 'Geist Mono', monospace; display: block; margin-bottom: 6px; }
.field-value { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.field-editable { cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background var(--duration-fast); }
.field-editable:hover { background: var(--line-2); }
.detail-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.detail-tab { padding: 10px 20px; font-size: 13px; font-weight: 500; color: var(--mute); cursor: pointer; border-bottom: 2px solid transparent; transition: all var(--duration-fast); background: none; }
.detail-tab:hover { color: var(--ink); }
.detail-tab.active { color: var(--ink); border-bottom-color: var(--accent); }
.detail-section { margin-top: 24px; }
.detail-section h4 { font-size: 15px; font-weight: 500; margin-bottom: 16px; }

/* ============= ACTIVITY TIMELINE ============= */
.activity-new-entry { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 20px; }
.activity-new-entry h4 { font-size: 14px; font-weight: 500; margin-bottom: 12px; }
.entry-form { display: flex; flex-direction: column; gap: 10px; }
.form-select { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; color: var(--ink); outline: none; }
.form-select:focus { border-color: var(--accent); }
.form-textarea { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; color: var(--ink); outline: none; resize: vertical; min-height: 80px; }
.form-textarea:focus { border-color: var(--accent); }
.form-input { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; color: var(--ink); outline: none; }
.form-input:focus { border-color: var(--accent); }
.activity-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.timeline { position: relative; }
.timeline-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); animation: slideUp var(--duration-normal) var(--ease-out) both; }
.timeline-item:last-child { border-bottom: none; }
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.timeline-dot.sage { background: var(--accent); }
.timeline-dot.lav { background: #8b7ec9; }
.timeline-dot.sky { background: #37617c; }
.timeline-dot.gold { background: var(--gold); }
.timeline-dot.peach { background: #c8846a; }
.timeline-dot.coral { background: #a03928; }
.timeline-dot.gray { background: var(--mute); }
.timeline-content { flex: 1; min-width: 0; }
.timeline-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.timeline-date { font-size: 11.5px; color: var(--mute); font-family: 'Geist Mono', monospace; margin-left: auto; }
.timeline-text { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.timeline-next { font-size: 12px; color: var(--accent); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.timeline-opp { font-size: 11.5px; color: var(--mute); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* ============= CONTACTS ============= */
.contacts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.contact-card { display: flex; gap: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; transition: all var(--duration-fast); }
.contact-card:hover { border-color: var(--ink-2); transform: translateY(-1px); }
.contact-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent-2); color: var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-avatar-sm { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-2); color: var(--accent); font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info { flex: 1; min-width: 0; }
.contact-name { font-weight: 500; font-size: 13.5px; }
.contact-role { font-size: 12px; color: var(--mute); margin-top: 2px; }
.contact-detail { font-size: 12px; color: var(--ink-2); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.contact-detail svg { width: 12px; height: 12px; color: var(--mute); }
.contact-meta { font-size: 11px; color: var(--mute); margin-top: 6px; }

/* ============= OPPORTUNITIES ============= */
.opp-card { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; transition: all var(--duration-fast); }
.opp-card:hover { border-color: var(--ink-2); }
.opp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.opp-type { font-weight: 500; font-size: 14px; }
.opp-date { font-size: 11.5px; color: var(--mute); margin-top: 2px; font-family: 'Geist Mono', monospace; }
.opp-contacts { font-size: 12px; color: var(--ink-2); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.opp-due { font-size: 12px; color: var(--mute); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.opp-link { font-size: 12.5px; color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.opp-link:hover { text-decoration: underline; }

/* ============= STAGE STEPPER ============= */
.stage-stepper { display: flex; align-items: center; gap: 0; padding: 24px 0; margin-bottom: 24px; }
.stage-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.stage-dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--mute); background: #fff; transition: all var(--duration-fast); }
.stage-step.done .stage-dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.stage-step.active .stage-dot { background: var(--ink); border-color: var(--ink); color: #fff; }
.stage-step.lost .stage-dot { background: #a03928; border-color: #a03928; color: #fff; }
.stage-label { font-size: 11px; color: var(--mute); text-align: center; max-width: 90px; }
.stage-step.active .stage-label { color: var(--ink); font-weight: 500; }
.stage-step.done .stage-label { color: var(--accent); }
.stage-line { flex: 1; height: 2px; background: var(--line); min-width: 20px; }
.stage-actions { display: flex; gap: 8px; margin-bottom: 24px; }

/* ============= ALERT BANNER ============= */
.alert-banner { padding: 14px 20px; border-radius: 12px; font-size: 13px; display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-weight: 500; }
.alert-banner.warning { background: #fef3cd; color: #856404; border: 1px solid #ffeaa8; }
.alert-banner.info { background: var(--accent-2); color: var(--accent); border: 1px solid #d5deaa; }

/* ============= WEEKLY COMMITMENT ============= */
.commitment-counter { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; padding: 16px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.commit-count-bar { display: flex; gap: 8px; }
.commit-slot { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--mute); background: #fff; transition: all var(--duration-fast); }
.commit-slot.filled { background: var(--accent); border-color: var(--accent); color: #fff; }
.commit-count-label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.wc-filters { display: flex; gap: 8px; margin-bottom: 16px; }
.wc-table { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 24px; }
.wc-table table { width: 100%; }
.wc-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ============= NOTIFICATIONS ============= */
.notif-filters { display: flex; gap: 8px; margin-bottom: 24px; }
.notif-group { margin-bottom: 24px; }
.notif-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--mute); font-weight: 500; font-family: 'Geist Mono', monospace; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-item { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; cursor: pointer; transition: background var(--duration-fast); position: relative; }
.notif-item:hover { background: var(--paper); }
.notif-item.unread { background: var(--paper); border: 1px solid var(--line); margin-bottom: 4px; }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.notif-body { flex: 1; min-width: 0; }
.notif-message { font-size: 13px; color: var(--ink); line-height: 1.45; }
.notif-item.unread .notif-message { font-weight: 500; }
.notif-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--mute); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

/* ============= COMMITMENT HISTORY ============= */
.history-card { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-week { font-weight: 500; font-size: 14px; }
.history-pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* ============= LINKED CONTACTS ============= */
.linked-contacts { display: flex; flex-wrap: wrap; gap: 12px; }
.linked-contact { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.text-muted { color: var(--mute); font-size: 13px; }

/* ============= EMPTY STATES ============= */
.empty-state { text-align: center; padding: 40px 20px; color: var(--mute); }
.empty-state p { font-size: 14px; margin-top: 8px; }
.empty-icon { display: flex; justify-content: center; margin-bottom: 8px; }
.empty-icon svg { width: 48px; height: 48px; color: var(--line); }

/* ============= ANIMATIONS ============= */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-row { animation: slideUp var(--duration-normal) var(--ease-out) both; }

/* ============= SORTABLE ============= */
.sortable-th { cursor: pointer; }
.sortable-th:hover { color: var(--ink); }
