/* Portelle · interface styles. Fonts: Inter and Fraunces (SIL OFL 1.1), self-hosted. */
@font-face { font-family: 'Inter'; src: url('fonts/Inter-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-400.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/Fraunces-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }

:root {
  --brand: #032c1d;
  --brand-ink: color-mix(in srgb, var(--brand) 92%, #000);
  --brand-2: color-mix(in srgb, var(--brand) 78%, #fff);
  --brand-soft: color-mix(in srgb, var(--brand) 7%, #fff);
  --brand-line: color-mix(in srgb, var(--brand) 22%, #fff);
  --gold: #a07a3f;
  --gold-soft: #f7f0e3;
  --gold-line: #e7d6b6;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #16201b;
  --ink-2: #4e5954;
  --ink-3: #8a928e;
  --line: #e7e3da;
  --line-2: #efece5;
  --ok: #1d7a4c;    --ok-soft: #e7f4ec;
  --warn: #a8620c;  --warn-soft: #fcf2e4;
  --bad: #b23a2e;   --bad-soft: #fbeceb;
  --info: #2c5b8f;  --info-soft: #ebf2fa;
  --muted-soft: #f1efe9;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(22, 32, 27, .04), 0 1px 3px rgba(22, 32, 27, .05);
  --shadow-lg: 0 18px 40px -12px rgba(22, 32, 27, .22), 0 4px 10px -4px rgba(22, 32, 27, .08);
  --sidebar: 252px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.xs { width: 13px; height: 13px; }
svg.i.lg { width: 22px; height: 22px; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.serif { font-family: var(--serif); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.mt { margin-top: 16px; } .mt-sm { margin-top: 8px; } .mt-lg { margin-top: 28px; }
.right { margin-left: auto; }

/* ---- Shell -------------------------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--brand); color: #e9efe9; display: flex; flex-direction: column; z-index: 40; }
.side-head { padding: 22px 20px 12px; }
.logo { display: block; }
.logo-img { height: 30px; width: auto; display: block; filter: brightness(0) invert(1); }
.tenant { margin: 18px 0 0; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.05); }
.tenant-badge { width: 30px; height: 30px; border-radius: 8px; background: var(--gold); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: none; letter-spacing: .02em; }
.tenant-name { font-weight: 600; font-size: 13px; line-height: 1.25; color: #fff; }
.tenant-sub { font-size: 11.5px; color: rgba(255,255,255,.6); }
.nav { flex: 1; overflow-y: auto; padding: 6px 12px 16px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.45); padding: 16px 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: rgba(255,255,255,.78); font-weight: 500; font-size: 13.5px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.on { background: rgba(255,255,255,.13); color: #fff; }
.nav a.on svg { color: #e4c58d; }
.nav .count { margin-left: auto; background: #e4c58d; color: var(--brand); font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.nav .count.n { background: rgba(255,255,255,.16); color: #fff; }
.side-foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 11.5px; color: rgba(255,255,255,.5); display: flex; justify-content: space-between; }
.side-foot a:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.menu-btn { display: none; }
.search-btn { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--ink-3); min-width: 320px; text-align: left; }
.search-btn:hover { border-color: var(--brand-line); }
.search-btn span { flex: 1; }
.search-btn kbd, .kbd { font: 500 11px var(--font); background: var(--muted-soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; color: var(--ink-2); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.today-pill { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.viewas { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 5px; }
.viewas-l { font-size: 11.5px; color: var(--ink-3); }
.viewas select { border: 0; background: transparent; font-weight: 600; font-size: 13px; padding: 2px 4px; max-width: 290px; cursor: pointer; outline: none; }

.page { padding: 18px 28px 60px; max-width: 1360px; width: 100%; }
.page.full { max-width: none; padding: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.015em; line-height: 1.15; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.crumb a:hover { color: var(--brand); }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* ---- Buttons & inputs --------------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--surface); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; line-height: 1.2; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn.gold:hover { background: color-mix(in srgb, var(--gold) 88%, #000); }
.btn.soft { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--muted-soft); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { padding: 4px 8px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.icon { padding: 7px; }
.btn.icon.sm { padding: 5px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.on { background: var(--gold-soft); border-color: var(--gold-line); color: var(--gold); }
.input, .select { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { resize: vertical; min-height: 70px; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a928e' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; padding-right: 32px; }
.toolbar .select { width: auto; }
.field { display: block; }
.field .lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { display: block; font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.search-input { position: relative; }
.search-input svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search-input .input { padding-left: 34px; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search-input { flex: 1; min-width: 220px; max-width: 380px; }
.seg { display: inline-flex; background: var(--muted-soft); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg .n { color: var(--ink-3); font-weight: 500; margin-left: 2px; }

/* ---- Cards, tables, chips ----------------------------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--line-2); }
.card-head h2, .card-head h3 { font-family: var(--serif); font-size: 17.5px; font-weight: 600; letter-spacing: -0.005em; display: flex; align-items: center; gap: 9px; }
.card-head h2 svg.i, .card-head h3 svg.i { color: var(--gold); }
.card-head h2 .serif { font-size: 17px; }
.card-head .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 6px 18px; }
.card.gold { background: linear-gradient(180deg, var(--gold-soft), #fff 70%); border-color: var(--gold-line); }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: var(--surface-2); }
.t .r { text-align: right; }
.row-link { font-weight: 600; }
.row-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.sb { font-size: 12.5px; color: var(--ink-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--muted-soft); color: var(--ink-2); white-space: nowrap; line-height: 1.6; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.plain { background: transparent; border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; font-size: 11.5px; flex: none; letter-spacing: .02em; }
.avatar.sq { border-radius: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.avatar.sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; }
.agent-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.stars { color: #d9d3c6; letter-spacing: 1px; font-size: 13px; }
.stars .on { color: var(--gold); }
.pref { display: inline-flex; gap: 3px; align-items: center; }
.pref em { font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-right: 6px; min-width: 46px; text-align: right; }
.pref i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); display: block; }
.pref i.on { background: var(--brand); }
.pref.neg { font-size: 11px; font-weight: 600; color: var(--bad); }
.strength { display: inline-flex; align-items: center; gap: 2px; }
.strength i { width: 6px; height: 12px; border-radius: 2px; background: var(--line); display: block; }
.strength i:nth-child(2) { height: 12px; }
.strength i.on { background: var(--gold); }
.strength em { font-style: normal; font-size: 12px; color: var(--ink-2); margin-left: 6px; }
.season { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.season.s0 { background: var(--bad-soft); color: var(--bad); }
.season.s1 { background: var(--warn-soft); color: var(--warn); }
.season.s2 { background: var(--info-soft); color: var(--info); }
.season.s3 { background: var(--ok-soft); color: var(--ok); }
.empty { padding: 34px 16px; text-align: center; color: var(--ink-3); display: grid; justify-items: center; gap: 8px; }
.empty svg { width: 26px; height: 26px; }
.dthumb { --h: 200; width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; background: linear-gradient(140deg, hsl(var(--h) 38% 30%), hsl(calc(var(--h) + 35) 42% 58%)); color: #fff; font-family: var(--serif); font-size: 18px; position: relative; overflow: hidden; }
.dthumb::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 15%, rgba(255,255,255,.35), transparent 45%); }
.dthumb.lg { width: 100%; height: 120px; border-radius: 12px 12px 0 0; display: block; }
.dthumb.lg::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 2px, transparent 2px 22px), linear-gradient(0deg, rgba(0,0,0,.35), transparent 60%); z-index: 1; }
.dthumb.lg .big { position: absolute; right: 4%; bottom: -12%; font-size: 260px; line-height: 1; opacity: .16; }
.dthumb.lg .lbl { position: absolute; left: 28px; bottom: 22px; z-index: 2; font-size: 30px; line-height: 1.1; text-shadow: 0 2px 12px rgba(0,0,0,.25); }
.dthumb.lg .lbl em { display: block; font: 600 11px var(--font); letter-spacing: .18em; text-transform: uppercase; opacity: .85; margin-top: 6px; font-style: normal; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .meta { font-size: 12.5px; color: var(--ink-3); }
a.list-row:hover .strong { color: var(--brand); }

/* ---- Stats -------------------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; box-shadow: var(--shadow); position: relative; }
.stat-ic { position: absolute; right: 14px; top: 14px; color: var(--gold); opacity: .8; }
.stat-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.stat-value { font-family: var(--serif); font-size: 27px; font-weight: 600; margin-top: 4px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat.quiet .stat-value { color: var(--ink-3); }
.bars { display: grid; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 80px; align-items: center; gap: 10px; font-size: 13px; }
.bar-row .track { height: 10px; background: var(--muted-soft); border-radius: 5px; overflow: hidden; }
.bar-row .fill { height: 100%; background: var(--brand); border-radius: 5px; }
.bar-row .fill.gold { background: var(--gold); }
.bar-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---- Dashboard ---------------------------------------------------------------------------- */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--brand); color: #fff; border-radius: 18px; padding: 24px 28px; margin-bottom: 20px; position: relative; overflow: hidden; }
.hello::after { content: ''; position: absolute; right: -60px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 1px solid rgba(228, 197, 141, .25); box-shadow: 0 0 0 40px rgba(228,197,141,.04), 0 0 0 80px rgba(228,197,141,.03); }
.hello h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.hello p { color: rgba(255,255,255,.72); margin-top: 4px; }
.hello-ask { display: flex; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 6px; width: min(520px, 48%); position: relative; z-index: 1; }
.hello-ask input { flex: 1; background: transparent; border: 0; color: #fff; outline: none; padding: 6px 8px; }
.hello-ask input::placeholder { color: rgba(255,255,255,.55); }
.moment { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.moment:last-child { border-bottom: 0; }
.moment-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--gold-soft); color: var(--gold); }
.moment-ic.bad { background: var(--bad-soft); color: var(--bad); }
.moment-ic.info { background: var(--info-soft); color: var(--info); }
.when { margin-left: auto; text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.when b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: 0; }

/* ---- Client profile ----------------------------------------------------------------------- */
.profile-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.profile-head h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; }
.profile-head .meta { color: var(--ink-2); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.profile-head .meta span { display: inline-flex; align-items: center; gap: 5px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs .n { font-size: 11px; background: var(--muted-soft); border-radius: 999px; padding: 0 7px; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.prefs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; padding: 4px 0; }
.bullets { margin: 0; padding: 0; list-style: none; }
.bullets li { position: relative; padding: 4px 0 4px 18px; font-size: 13.5px; }
.bullets li::before { content: ''; position: absolute; left: 3px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.bullets.neg li::before { background: var(--bad); }
.member { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.member:last-child { border-bottom: 0; }
.trip-card { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.trip-card:last-child { border-bottom: 0; }
.trip-card .dthumb { width: 52px; height: 52px; font-size: 22px; }
.debrief { margin-top: 10px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.debrief b { font-weight: 600; color: var(--ink-2); }
.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 10px 0; }
.tl-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--muted-soft); color: var(--ink-2); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; font-size: 13px; }
.notice svg { margin-top: 1px; }
.notice.warn { background: var(--warn-soft); color: #6b3f07; }
.notice.bad { background: var(--bad-soft); color: #7a241b; }
.notice.info { background: var(--info-soft); color: #1d3d63; }
.notice.gold { background: var(--gold-soft); color: #5d4520; border: 1px solid var(--gold-line); }

/* ---- Planner ------------------------------------------------------------------------------ */
.planner { display: grid; grid-template-columns: 264px minmax(0, 1fr); height: calc(100vh - 61px); }
.planner.with-brief { grid-template-columns: 264px minmax(0, 1fr) 300px; }
.threads { border-right: 1px solid var(--line); background: var(--surface-2); display: flex; flex-direction: column; min-height: 0; }
.threads-head { padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.threads-list { overflow-y: auto; padding: 0 8px 14px; flex: 1; }
.thread { display: block; padding: 10px 10px; border-radius: 10px; margin-bottom: 2px; }
.thread:hover { background: var(--muted-soft); }
.thread.on { background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.thread .tt { font-weight: 600; font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread .ts { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.thread .ts .grow { overflow: hidden; text-overflow: ellipsis; }
.thread .ts + .ts { margin-top: 0; }
.chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg); }
.chat-head { padding: 14px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; background: var(--surface); }
.chat-head h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 24px; scroll-behavior: smooth; position: relative; }
.chat-inner { max-width: 940px; margin: 0 auto; }
.msg { display: flex; gap: 12px; margin-bottom: 20px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { background: var(--brand); color: #fff; border-radius: 16px 16px 4px 16px; padding: 11px 15px; max-width: 72%; white-space: pre-wrap; }
.msg.ai .ai-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; flex: none; }
.msg.ai .ai-mark img { width: 18px; filter: brightness(0) invert(1); }
.msg.ai .ai-body { flex: 1; min-width: 0; }
.msg.ai .ai-text { background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 14px 18px; line-height: 1.6; }
.ai-lead { font-family: var(--serif); font-size: 17px; font-weight: 600; line-height: 1.4; }
.ai-points { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.ai-points li { position: relative; padding-left: 16px; color: var(--ink-2); font-size: 13.5px; }
.ai-points li::before { content: ''; position: absolute; left: 2px; top: 9px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.msg .stamp { display: flex; align-items: center; gap: 12px; }
.fb { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.fb button { border: 1px solid var(--line); background: var(--surface); border-radius: 7px; width: 24px; height: 22px; display: inline-grid; place-items: center; color: var(--ink-2); padding: 0; }
.fb button:hover { border-color: var(--gold-line); color: var(--gold); }
.composer-note { font-size: 11.5px; color: var(--ink-3); margin-top: 7px; text-align: center; }
.can { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; text-align: left; }
.can > div { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: var(--ink-2); }
.can svg { color: var(--gold); margin-top: 2px; }
.can b { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.msg .stamp { font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.thinking { display: grid; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 13px 16px; font-size: 13px; color: var(--ink-2); }
.thinking .step { display: flex; align-items: center; gap: 9px; opacity: .35; transition: opacity .3s; }
.thinking .step.on { opacity: 1; }
.thinking .step.done svg { color: var(--ok); }
.spin { width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.composer { border-top: 1px solid var(--line); background: var(--surface); padding: 12px 24px 16px; }
.composer-inner { max-width: 940px; margin: 0 auto; }
.composer-box { display: flex; gap: 8px; align-items: flex-end; border: 1px solid var(--line); border-radius: 14px; padding: 6px 6px 6px 14px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.composer-box:focus-within { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.composer textarea { flex: 1; border: 0; outline: none; resize: none; min-height: 24px; max-height: 160px; padding: 7px 0; line-height: 1.5; background: transparent; }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.suggest button { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; color: var(--ink-2); }
.suggest button:hover { border-color: var(--gold-line); background: var(--gold-soft); color: var(--ink); }
.chat-empty { text-align: center; padding: 50px 20px 20px; max-width: 620px; margin: 0 auto; }
.chat-empty h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 14px 0 6px; }
.chat-empty .mark { width: 56px; height: 56px; border-radius: 16px; background: var(--brand); display: inline-grid; place-items: center; }
.chat-empty .mark img { width: 30px; filter: brightness(0) invert(1); }
.client-pick { display: flex; gap: 8px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.brief { border-left: 1px solid var(--line); background: var(--surface); overflow-y: auto; padding: 18px; }
.brief h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin: 18px 0 8px; }
.brief h3:first-child { margin-top: 0; }
.brief .kv { grid-template-columns: 90px 1fr; font-size: 12.5px; gap: 6px 10px; }

.options { display: grid; gap: 16px; margin-top: 14px; }
.opt { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.opt.short { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow); }
.opt-top { display: grid; grid-template-columns: 112px 1fr auto; gap: 16px; padding: 16px; align-items: start; }
.opt-top .dthumb { width: 112px; height: 112px; border-radius: 12px; font-size: 44px; }
.opt-letter { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.opt h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; line-height: 1.15; margin-top: 2px; }
.opt .tagline { color: var(--ink-2); margin-top: 2px; font-family: var(--serif); font-style: italic; }
.opt-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12.5px; color: var(--ink-2); }
.opt-meta span { display: inline-flex; align-items: center; gap: 5px; }
.opt-cost { text-align: right; }
.opt-cost .v { font-family: var(--serif); font-size: 20px; font-weight: 600; white-space: nowrap; }
.opt-cost .l { font-size: 11.5px; color: var(--ink-3); }
.opt-actions { display: flex; gap: 6px; margin-top: 10px; justify-content: flex-end; }
.opt-sec { border-top: 1px solid var(--line-2); padding: 14px 16px; }
.opt-sec h4 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.opt-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.opt-cols > .opt-sec + .opt-sec { border-left: 1px solid var(--line-2); }
.stay { display: flex; gap: 10px; align-items: center; padding: 6px 0; }
.stay .nights { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.lev { background: linear-gradient(180deg, var(--gold-soft), #fffdf8); }
.lev h4 { color: var(--gold); }
.lev-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px dashed var(--gold-line); }
.lev-item:last-child { border-bottom: 0; }
.lev-item .txt { flex: 1; font-size: 13px; }
.lev-item .deal { display: block; font-size: 12.5px; color: #6b5226; margin-top: 2px; }
.warns { display: grid; gap: 6px; }
.warn-line { display: flex; gap: 8px; font-size: 13px; align-items: flex-start; }
.warn-line svg { margin-top: 2px; }
.warn-line.bad svg { color: var(--bad); }
.warn-line.warn svg { color: var(--warn); }
.warn-line.info svg { color: var(--info); }
.days { display: grid; gap: 0; }
.day { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.day:last-child { border-bottom: 0; }
.day .dn { font-weight: 700; font-size: 12px; color: var(--gold); letter-spacing: .04em; }
.day .dd { font-size: 11.5px; color: var(--ink-3); }
.day .dt { font-weight: 600; }
.day .dx { color: var(--ink-2); }
details.more > summary { list-style: none; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--brand); display: inline-flex; align-items: center; gap: 4px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary svg { transform: rotate(180deg); }
.cost-table { font-size: 12.5px; width: 100%; }
.cost-table td { padding: 3px 0; }
.cost-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.cost-table tr.total td { border-top: 1px solid var(--line); font-weight: 700; padding-top: 6px; }
.wild-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #6c3fb0; background: #f2ecfb; padding: 2px 8px; border-radius: 999px; margin-left: 6px; letter-spacing: .02em; vertical-align: middle; }
.shortbar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 12px; background: var(--brand); color: #fff; border-radius: 12px; padding: 10px 12px 10px 16px; margin: 0 auto 10px; max-width: 940px; box-shadow: var(--shadow-lg); }
.shortbar .btn { border-color: transparent; }

/* ---- Modal, toast, palette ---------------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(16, 24, 20, .42); display: grid; place-items: start center; padding: 7vh 16px 16px; z-index: 100; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; width: min(560px, 100%); box-shadow: var(--shadow-lg); animation: pop .18s ease-out; }
.modal.wide { width: min(780px, 100%); }
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 6px; }
.modal-head h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; }
.modal-head .sub { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.modal-body { padding: 12px 20px 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.palette { width: min(620px, 100%); overflow: hidden; }
.p-input { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.p-input input { flex: 1; border: 0; outline: none; font-size: 15px; }
.p-results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.p-group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; padding: 10px 10px 4px; }
.p-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; }
.p-item.on, .p-item:hover { background: var(--brand-soft); }
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 11px; box-shadow: var(--shadow-lg); font-weight: 500; animation: pop .2s; }
.toast svg { color: #e4c58d; }

/* ---- Deal & contact cards ----------------------------------------------------------------- */
.deal-title { font-weight: 600; }
.deal-val { font-family: var(--serif); font-weight: 600; font-size: 15px; white-space: nowrap; }
.contact-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.contact-card:last-child { border-bottom: 0; }
.intro { padding: 16px 18px; border-bottom: 1px solid var(--line-2); }
.intro:last-child { border-bottom: 0; }
.intro .msgq { margin-top: 8px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; border-left: 3px solid var(--gold); }
.intro .reply { margin-top: 6px; font-size: 13px; padding: 8px 12px; border-left: 3px solid var(--brand-line); color: var(--ink-2); }

/* ---- Extensions & settings ---------------------------------------------------------------- */
.ext { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.ext-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.ext h3 { font-size: 15.5px; }
.ext p { color: var(--ink-2); font-size: 13px; flex: 1; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch.on { border-color: var(--ink); }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.radio-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.radio-card.on { border-color: var(--brand); background: var(--brand-soft); }
.radio-card input { margin-top: 3px; accent-color: var(--brand); }
.radio-card b { display: block; }
.radio-card span { font-size: 12.5px; color: var(--ink-2); }

/* ---- Proposal (client-facing page) -------------------------------------------------------- */
.proposal { background: #fbfaf7; min-height: 100vh; }
.prop-bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: var(--ink); color: #fff; font-size: 13px; }
.prop-bar .btn { border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; }
.prop-bar .btn.gold { background: var(--gold); border-color: var(--gold); }
.prop-hero { background: var(--brand); color: #fff; padding: 72px 24px 64px; text-align: center; position: relative; overflow: hidden; }
.prop-hero::before { content: ''; position: absolute; left: 50%; top: 50%; width: 760px; height: 760px; transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(228, 197, 141, .2); box-shadow: 0 0 0 60px rgba(228,197,141,.03), 0 0 0 120px rgba(228,197,141,.025); }
.prop-hero > * { position: relative; }
.prop-hero .agency { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #e4c58d; }
.prop-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1.1; margin: 16px auto 12px; max-width: 760px; }
.prop-hero p { color: rgba(255,255,255,.75); max-width: 620px; margin: 0 auto; font-size: 16px; }
.prop-wrap { max-width: 920px; margin: 0 auto; padding: 48px 24px 80px; }
.prop-intro { font-family: var(--serif); font-size: 19px; line-height: 1.65; color: #2b3631; text-align: center; max-width: 720px; margin: 0 auto 50px; white-space: pre-wrap; }
.prop-opt { margin-bottom: 64px; break-inside: avoid-page; }
.prop-opt .dthumb.lg { height: 220px; border-radius: 18px; }
.prop-opt .head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 22px 0 10px; }
.prop-opt h2 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; }
.prop-opt .lead { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 17px; }
.prop-opt .price { text-align: right; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.prop-opt .price b { display: block; font-family: var(--serif); font-size: 22px; color: var(--ink); font-weight: 600; }
.prop-cols { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; margin-top: 18px; }
.prop-h { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin: 0 0 10px; }
.prop-days .day { grid-template-columns: 64px 1fr; }
.prop-foot { text-align: center; color: var(--ink-3); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 22px; }
.prop-foot .sig { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 4px; }

/* ---- Responsive --------------------------------------------------------------------------- */
.brief-btn { display: none; }
@media (max-width: 1600px) { .planner.with-brief { grid-template-columns: 250px minmax(0, 1fr); } .planner.with-brief > .brief { display: none; } .brief-btn { display: inline-flex; } }
.modal .brief { border: 0; padding: 0; overflow: visible; }
.opt { container-type: inline-size; }
@container (max-width: 700px) {
  .opt-cols { grid-template-columns: 1fr; }
  .opt-cols > .opt-sec + .opt-sec { border-left: 0; border-top: 1px solid var(--line-2); }
  .opt-top { grid-template-columns: 76px 1fr; }
  .opt-top .dthumb { width: 76px; height: 76px; font-size: 30px; }
  .opt-cost { grid-column: span 2; text-align: left; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .opt-actions { margin: 0 0 0 auto; }
}
@media (max-width: 1100px) {
  .g-main, .g3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-cols { grid-template-columns: 1fr; }
  .opt-cols > .opt-sec + .opt-sec { border-left: 0; }
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .search-btn { min-width: 0; flex: 1; }
  .search-btn span, .search-btn kbd, .today-pill, .viewas-l { display: none; }
  .top { padding: 10px 16px; }
  .page { padding: 14px 16px 50px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .member { flex-wrap: wrap; }
  .profile-head { gap: 12px; }
  .profile-head .avatar.lg { width: 44px; height: 44px; font-size: 15px; }
  .profile-head h1 { font-size: 24px; }
  .profile-head .actions { width: 100%; }
  .chat-head { padding: 10px 16px; flex-wrap: wrap; }
  .chat-head h2 { font-size: 16px; }
  .msg.user .bubble { max-width: 88%; }
  .contact-card { grid-template-columns: auto 1fr; }
  .contact-card > :last-child { grid-column: 2; }
  .planner, .planner.with-brief { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 57px); }
  .threads { display: none; }
  .chat-scroll { padding: 16px; }
  .composer { padding: 10px 16px 14px; position: sticky; bottom: 0; }
  .opt-top { grid-template-columns: 64px 1fr; }
  .opt-top .dthumb { width: 64px; height: 64px; font-size: 26px; }
  .opt-cost { grid-column: span 2; text-align: left; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .opt-actions { margin-top: 0; }
  .hello { flex-direction: column; align-items: stretch; }
  .hello-ask { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .prefs-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 110px 1fr; }
  .prop-cols { grid-template-columns: 1fr; }
  .prop-hero h1 { font-size: 34px; }
  .bar-row { grid-template-columns: 100px 1fr 64px; }
  .radio-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px 13px; }
  .stat-value { font-size: 21px; }
  .stat-ic { display: none; }
  .viewas select { max-width: 150px; }
  .page-head h1 { font-size: 25px; }
  .trip-card { grid-template-columns: 40px 1fr; }
  .trip-card > :last-child { grid-column: 2; }
  .trip-card .dthumb { width: 40px; height: 40px; }
}

@media print {
  .prop-bar { display: none; }
  .proposal { background: #fff; }
  .prop-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; padding: 50px 24px; }
  .dthumb { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .prop-opt { page-break-inside: avoid; }
}
.card > .chat { flex: 1; min-width: 0; }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv .chip { white-space: normal; text-align: left; }
.card-head { flex-wrap: wrap; }
.seg { flex-wrap: wrap; max-width: 100%; }
.toolbar .select { max-width: 100%; }
.contact-card > div { min-width: 0; overflow-wrap: anywhere; }
.chips .chip { white-space: normal; }

/* ---- Polish pass ------------------------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.input:focus-visible, .select:focus-visible { outline: none; }
.btn { min-height: 34px; }
.btn.sm { min-height: 30px; }
.btn.xs { min-height: 26px; }
.feed-item .chip, .list-row .chip, .moment .chip { align-self: center; }
.page-head .sub { max-width: 760px; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.legend .l3 { background: var(--ok); } .legend .l2 { background: var(--info); } .legend .l1 { background: var(--warn); } .legend .l0 { background: var(--bad); }
.empty .btn { margin-top: 6px; }
.empty-hero { padding: 36px 24px; text-align: center; }
.empty-hero h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 10px 0 4px; }
.empty-hero p { color: var(--ink-2); max-width: 460px; margin: 0 auto 14px; }
.empty-hero .ic { width: 46px; height: 46px; border-radius: 14px; background: var(--gold-soft); color: var(--gold); display: inline-grid; place-items: center; }
.meta-dot::before { content: '·'; margin: 0 6px; color: var(--ink-3); }
.archived-bar { display: flex; align-items: center; gap: 10px; background: var(--muted-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--ink-2); }
.member.click { cursor: pointer; border-radius: 8px; }
.member.click:hover { background: var(--surface-2); }
.date-row { display: flex; align-items: center; gap: 10px; }
.t th.r { text-align: right; }
.team-name { font-weight: 600; }
.deal-title.link { cursor: pointer; }
.deal-title.link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 880px) { .can { grid-template-columns: 1fr; } }

/* ---- Product tour -------------------------------------------------------------------------- */
.tour-layer { position: fixed; inset: 0; z-index: 300; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 3px rgba(214, 182, 126, .95), 0 0 0 9999px rgba(2, 22, 14, .6); transition: top .3s ease, left .3s ease, width .3s ease, height .3s ease; pointer-events: none; }
.tour-card { position: fixed; width: 400px; max-width: calc(100vw - 24px); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(3, 44, 29, .08); padding: 20px 22px 18px; transition: top .3s ease, left .3s ease, opacity .15s; }
.tour-card.tour-loading { opacity: 0; }
.tour-card h3 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin: 10px 0 6px; line-height: 1.25; }
.tour-card p { color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.tour-step { font-size: 12px; font-weight: 600; color: var(--gold); letter-spacing: .02em; }
.tour-bar { height: 3px; border-radius: 3px; background: var(--line-2); margin-top: 8px; overflow: hidden; }
.tour-bar span { display: block; height: 100%; background: var(--gold); border-radius: 3px; transition: width .3s ease; }
.tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.tour-skip { border: 0; background: none; padding: 0; color: var(--ink-3); font-weight: 500; font-size: 13px; }
.tour-skip:hover { color: var(--ink); }
.tour-card.tour-center { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 500px; padding: 32px; }
.tour-layer.dim { background: rgba(2, 22, 14, .6); animation: fade .2s ease-out; }
.tour-center h2 { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.015em; margin: 20px 0 10px; line-height: 1.15; }
.tour-center p + p { margin-top: 10px; }
.tour-center .tour-actions { margin-top: 24px; justify-content: flex-end; }
.tour-logo { height: 34px; width: auto; display: block; }
.tour-muted { color: var(--ink-3) !important; font-size: 13px !important; }
.tour-card.tour-dock { left: 12px !important; right: 12px; top: auto !important; bottom: 12px; width: auto; }
.touring * { scroll-margin-top: 84px; }
@media (max-width: 880px) {
  .tour-btn span { display: none; }
  .tour-btn { width: 34px; padding: 0; }
  .tour-card.tour-center { width: calc(100vw - 32px); padding: 24px; }
}
