/* The Grand Detail Client Portal */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --surface-2: #F5F0E8;
  --surface-3: #EDE7DB;
  --line: #E5DFD3;
  --line-strong: #D4CCBD;
  --text: #2C1810;
  --muted: #6B5D50;
  --faint: #A89E92;
  --gold: #8B6914;
  --gold-hover: #6E5210;
  --gold-soft: #F1EAD6;
  --green: #264438;
  --green-soft: #E3ECE6;
  --plum: #7A3B4E;
  --plum-soft: #F3E6EA;
  --blue-soft: #E6EDF3;
  --blue: #34597A;
  --red: #A23B2A;
  --red-soft: #F7E4DF;
  --client: var(--gold);
  --font-display: 'Boska', Georgia, 'Times New Roman', serif;
  --font-body: 'Satoshi', 'Helvetica Neue', Arial, sans-serif;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-full: 999px;
  --shadow-sm: 0 1px 2px rgba(44,24,16,.05);
  --shadow-md: 0 6px 18px rgba(44,24,16,.08);
  --shadow-lg: 0 18px 48px rgba(44,24,16,.16);
  --ease: cubic-bezier(.16,1,.3,1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: none; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.55; color: var(--text); background: var(--bg); min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: var(--gold); }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.01em; }
.hidden { display: none !important; }

/* ---------- demo bar ---------- */
.demo-bar { background: var(--green); color: #EDE7DB; font-size: 13px; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 16px; flex-wrap: wrap; }
.demo-bar b { color: #E8D9A8; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }
.demo-bar .seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: var(--r-full); padding: 2px; }
.demo-bar .seg button { padding: 3px 12px; border-radius: var(--r-full); color: #EDE7DB; font-size: 12.5px; }
.demo-bar .seg button.on { background: #FAF7F2; color: var(--green); font-weight: 600; }

/* ---------- header ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(250,247,242,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.topbar::before { content: ''; display: block; height: 3px; background: linear-gradient(90deg, var(--gold), var(--client)); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 64px; padding: 0 20px; max-width: 1360px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark { width: 48px; height: 48px; flex-shrink: 0; }
.brand-text { font-family: var(--font-display); font-size: 18px; line-height: 1.05; white-space: nowrap; }
.brand-text small { display: block; font-family: var(--font-body); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.cobrand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cobrand-x { color: var(--faint); font-size: 14px; }
.client-logo { max-height: 34px; max-width: 150px; object-fit: contain; }
.client-name-mark { font-family: var(--font-display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: var(--r-md); color: var(--muted); position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.dot-count { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-full); background: var(--plum); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; border-radius: var(--r-full); background: var(--green); color: #F5F0E8; font-weight: 600; font-size: 13px; display: grid; place-items: center; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); min-width: 220px; padding: 6px; z-index: 60; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: var(--r-sm); text-align: left; font-size: 14px; color: var(--text); text-decoration: none; }
.menu-item:hover { background: var(--surface-2); }
.menu-item svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--muted); }
:where(svg[aria-hidden="true"]:not([width])) { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.menu-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.notif-menu { width: min(380px, 92vw); max-height: 70vh; overflow: auto; }
.notif { padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; display: block; text-decoration: none; color: var(--text); }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--gold-soft); }
.rel { position: relative; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; max-width: 1360px; margin: 0 auto; min-height: calc(100dvh - 67px); }
.sidebar { border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 67px; height: calc(100dvh - 67px); overflow: auto; }
.side-project { padding: 4px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.side-project .eyebrow { margin-bottom: 4px; }
.side-project h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; line-height: 1.15; }
.side-project select { margin-top: 10px; width: 100%; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-md); color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); border: 1px solid var(--line); padding: 8px 9px; }
.nav-item.active svg { color: var(--gold); }
.nav-item .count { margin-left: auto; font-size: 11.5px; font-weight: 700; background: var(--plum-soft); color: var(--plum); padding: 1px 8px; border-radius: var(--r-full); }
.nav-sep { height: 1px; background: var(--line); margin: 12px 6px; }
.main { padding: 28px 32px 64px; min-width: 0; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 24px 64px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 4px; overflow-x: auto; }
  .side-project, .nav-sep { display: none; }
  .nav-item { white-space: nowrap; }
  .main { padding: 20px 16px 48px; }
  .brand-text { display: none; }
  .topbar-inner { padding: 0 12px; gap: 10px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px, 3vw, 34px); line-height: 1.1; margin-top: 4px; }
.page-sub { color: var(--muted); margin-top: 6px; max-width: 64ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- buttons & inputs ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; padding: 9px 18px; border-radius: var(--r-full); border: 1px solid transparent; line-height: 1.3; white-space: nowrap; transition: background .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--gold); color: #FAF7F2; }
.btn-primary:hover { background: var(--gold-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { border-color: var(--line-strong); background: var(--surface); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { color: var(--muted); padding: 7px 12px; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-green { background: var(--green); color: #F5F0E8; }
.btn-green:hover { filter: brightness(1.1); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); font-size: 14.5px; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(139,105,20,.14); }
textarea.input { min-height: 96px; resize: vertical; }
.select-sm { padding: 5px 28px 5px 10px; font-size: 13px; border-radius: var(--r-full); border: 1px solid var(--line-strong); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B5D50' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12px; color: var(--faint); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 8px 0; }
.toggle { appearance: none; width: 38px; height: 22px; border-radius: var(--r-full); background: var(--line-strong); position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: var(--shadow-sm); }
.toggle:checked { background: var(--green); }
.toggle:checked::after { transform: translateX(16px); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.card-body { padding: 8px 20px 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; gap: 10px; } .stat { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; } }
.stack > * + * { margin-top: 16px; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty svg { display: block; width: 34px; height: 34px; color: var(--line-strong); margin: 0 auto 10px; }
.empty h4 { font-family: var(--font-display); font-weight: 400; font-size: 20px; color: var(--text); margin-bottom: 4px; }

/* ---------- dashboard ---------- */
.hero-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px 28px; background: linear-gradient(135deg, #FFFDF9 0%, var(--surface-2) 100%); position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border: 1px solid rgba(139,105,20,.18); transform: rotate(45deg); }
.hero-card h1 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; margin: 6px 0 10px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta svg { width: 15px; height: 15px; color: var(--gold); }
.countdown { text-align: center; padding: 14px 22px; border-radius: var(--r-lg); background: var(--green); color: #F5F0E8; min-width: 132px; position: relative; z-index: 1; }
.countdown .num { font-family: var(--font-display); font-size: 44px; line-height: 1; }
.countdown .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .8; margin-top: 4px; }
@media (max-width: 640px) { .hero-card { grid-template-columns: 1fr; } .countdown { justify-self: start; } }
.stat { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.stat .ring { flex-shrink: 0; }
.stat-num { font-family: var(--font-display); font-size: 30px; line-height: 1; }
.stat-lbl { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.stat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.stat-ico svg { width: 21px; height: 21px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; font-size: 14.5px; }
.date-chip { width: 48px; text-align: center; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 0; background: var(--surface-2); }
.date-chip .m { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.date-chip .d { font-family: var(--font-display); font-size: 20px; line-height: 1.1; }
.feed-item { display: flex; gap: 12px; padding: 10px 0; font-size: 14px; }
.feed-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-2); color: var(--gold); }
.feed-dot svg { width: 15px; height: 15px; }
.budget-bar { height: 10px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; display: flex; }
.budget-bar i { display: block; height: 100%; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; background: var(--c); }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-full); white-space: nowrap; }
.pill-not_started, .pill-draft, .pill-researching, .pill-general { background: var(--surface-3); color: var(--muted); }
.pill-in_progress, .pill-quoted, .pill-design { background: var(--blue-soft); color: var(--blue); }
.pill-waiting_on_client, .pill-pending, .pill-sent, .pill-awaiting_signature, .pill-booked { background: var(--gold-soft); color: var(--gold-hover); }
.pill-complete, .pill-approved, .pill-paid, .pill-signed, .pill-contract_signed, .pill-deposit_paid, .pill-paid_in_full, .pill-active { background: var(--green-soft); color: var(--green); }
.pill-changes_requested, .pill-overdue { background: var(--red-soft); color: var(--red); }
.pill-contract, .pill-invoice, .pill-completed { background: var(--plum-soft); color: var(--plum); }
.owner-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: var(--r-sm); }
.owner-client { background: var(--plum-soft); color: var(--plum); }
.owner-tgd { background: var(--surface-3); color: var(--muted); }
.owner-both { background: var(--blue-soft); color: var(--blue); }

/* ---------- tasks ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 6px 14px; border-radius: var(--r-full); border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--muted); background: var(--surface); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.phase { margin-bottom: 18px; }
.phase-head { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.phase-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 19px; }
.mini-bar { flex: 1; max-width: 160px; height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; margin-left: auto; }
.mini-bar i { display: block; height: 100%; background: var(--green); }
.task { display: grid; grid-template-columns: 26px 1fr auto auto auto; gap: 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: none; }
.task:hover { background: #FFFCF7; }
.task-title { font-weight: 500; cursor: pointer; background: none; text-align: left; padding: 0; }
.task-title:hover { color: var(--gold); }
.task.done .task-title { color: var(--faint); text-decoration: line-through; }
.task .due { font-size: 13px; color: var(--muted); white-space: nowrap; min-width: 66px; text-align: right; }
.task .due.late { color: var(--red); font-weight: 600; }
.task .meta-icons { display: inline-flex; gap: 6px; margin-left: 8px; color: var(--faint); font-size: 12px; vertical-align: middle; }
.cbox { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line-strong); display: grid; place-items: center; background: var(--surface); }
.cbox:hover { border-color: var(--green); }
.cbox.on { background: var(--green); border-color: var(--green); color: #fff; }
.cbox svg { width: 14px; height: 14px; }
@media (max-width: 720px) {
  .task { grid-template-columns: 26px 1fr auto; }
  .task .owner-tag, .task .due { display: none; }
}

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.clickable:hover td { background: #FFFCF7; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--line-strong); }
.tbl .cat-row td { background: #FBF8F2; font-family: var(--font-display); font-size: 16px; padding-top: 14px; }
.tbl tr.selected td { background: var(--green-soft); }
.star { color: var(--line-strong); padding: 4px; }
.star.on { color: var(--gold); }
.star svg { width: 18px; height: 18px; }

/* ---------- files ---------- */
.dropzone { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 26px; text-align: center; color: var(--muted); background: var(--surface); transition: background .2s, border-color .2s; }
.dropzone.over { background: var(--gold-soft); border-color: var(--gold); }
.dropzone svg { display: block; width: 28px; height: 28px; margin: 0 auto 8px; color: var(--gold); }
.file-ico { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); flex-shrink: 0; font-size: 10px; font-weight: 800; letter-spacing: .04em; }

/* ---------- approvals ---------- */
.approval { padding: 20px 22px; display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; }
.approval h3 { font-family: var(--font-display); font-weight: 400; font-size: 21px; margin: 6px 0; }
.approval .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.approval.is-pending { border-left: 4px solid var(--gold); }
.decision { margin-top: 12px; padding: 10px 14px; border-radius: var(--r-md); background: var(--surface-2); font-size: 14px; }
@media (max-width: 640px) { .approval { grid-template-columns: 1fr; } }

/* ---------- timeline ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 4px 0 22px; }
.tl-item::before { content: ''; position: absolute; left: -26px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.tl-item.past::before { background: var(--line-strong); border-color: var(--line-strong); }
.tl-item.event::before { background: var(--green); border-color: var(--green); width: 18px; height: 18px; left: -28px; top: 7px; }
.tl-date { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.tl-title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; margin: 2px 0; }
.tl-item.past .tl-title, .tl-item.past .tl-date { color: var(--faint); }

/* ---------- messages ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; padding: 20px; max-height: 60vh; overflow: auto; }
.msg { display: flex; gap: 10px; max-width: 80%; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: var(--surface-2); padding: 10px 14px; border-radius: 16px 16px 16px 4px; font-size: 14.5px; white-space: pre-wrap; word-wrap: break-word; }
.msg.mine .bubble { background: var(--green); color: #F5F0E8; border-radius: 16px 16px 4px 16px; }
.msg-meta { font-size: 11.5px; color: var(--faint); margin-top: 4px; }
.msg.mine .msg-meta { text-align: right; }
.msg .avatar { width: 30px; height: 30px; font-size: 11px; flex-shrink: 0; }
.composer { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { min-height: 44px; height: 44px; }

/* ---------- modal & drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(26,22,18,.42); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .2s var(--ease); }
.modal { background: var(--bg); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 90vh; overflow: auto; animation: pop .25s var(--ease); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 6px; }
.modal-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 24px; }
.modal-body { padding: 10px 22px 6px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 22px 20px; align-items: center; }
.modal-foot .left { margin-right: auto; }
.drawer-overlay { place-items: stretch end; padding: 0; }
.drawer { background: var(--bg); width: min(520px, 100vw); height: 100dvh; overflow: auto; box-shadow: var(--shadow-lg); animation: slide .3s var(--ease); display: flex; flex-direction: column; }
.drawer .modal-body { flex: 1; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: var(--r-full); font-size: 14px; z-index: 200; box-shadow: var(--shadow-lg); animation: pop .25s var(--ease); }
.toast.err { background: var(--red); }
.banner { padding: 12px 16px; border-radius: var(--r-md); background: var(--plum-soft); color: var(--plum); font-size: 14px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; }
.banner svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(160deg, #FFFDF9 0%, var(--surface-2) 60%, var(--surface-3) 100%); color: var(--text); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 44px; position: relative; overflow: hidden; }
.login-art img { width: min(360px, 70%); margin: auto; }
.login-art p { font-family: var(--font-display); font-size: 22px; max-width: 26ch; line-height: 1.3; color: var(--green); }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 44px clamp(24px, 6vw, 88px); }
.login-form h1 { font-family: var(--font-display); font-weight: 400; font-size: 38px; line-height: 1.05; margin: 8px 0 10px; }
.login-form form { margin-top: 26px; max-width: 400px; }
.sent-box { margin-top: 26px; max-width: 420px; padding: 20px; border-radius: var(--r-lg); background: var(--green-soft); color: var(--green); }
@media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-art { min-height: 240px; padding: 28px; } .login-art p { display: none; } }

/* ---------- admin ---------- */
.client-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.client-card .logo-box { height: 48px; display: flex; align-items: center; }
.client-card .logo-box img { max-height: 44px; max-width: 170px; object-fit: contain; }
.monogram { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); font-family: var(--font-display); font-size: 20px; color: var(--gold); }
.progress { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--client, var(--gold)); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line-strong); }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.logo-preview { height: 72px; border: 1px dashed var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface); padding: 10px; }
.logo-preview img { max-height: 52px; max-width: 220px; object-fit: contain; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 80px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.readonly .staff-only, .readonly .write-only { display: none !important; }

/* ---------- options decisions ---------- */
.opt-table tr.opt-row td { border-bottom: none; padding-bottom: 6px; }
.opt-table tr.note-row td { padding-top: 0; padding-bottom: 14px; }
.opt-table tr.opt-choose td { background: var(--green-soft); }
.opt-table tr.opt-maybe td { background: #FBF6E8; }
.opt-table tr.opt-decline td { color: var(--faint); }
.opt-table tr.opt-decline .opt-name { text-decoration: line-through; color: var(--faint); }
textarea.input.note-input { min-height: 38px; height: 38px; padding: 8px 12px; font-size: 13.5px; background: rgba(255,255,255,.7); resize: none; overflow: hidden; }
.decision { min-width: 118px; }
.decision-choose { background-color: var(--green); color: #F5F0E8; border-color: var(--green); }
.decision-maybe { background-color: var(--gold-soft); color: var(--gold-hover); border-color: var(--gold); }
.decision-decline { background-color: var(--surface-3); color: var(--muted); }
.btn-hidden { background: var(--plum-soft); color: var(--plum); }
.board-hidden { border-style: dashed; border-color: var(--plum); }
.board-hidden .card-head h3::after { content: ' (only you can see this)'; font-family: var(--font-body); font-size: 12px; color: var(--plum); }
