/* Twin Studio Invoicing — editorial v2
   Mirrors the Claude Design v2 prototype: cream paper base + editorial overrides.
   Inter Tight body, Instrument Serif display, hairline ink, square corners. */

:root {
  --bg: #ffffff;
  --canvas: #fafaf8;
  --surface: #ffffff;
  --sidebar: #ffffff;
  --hover: #f4f3ef;
  --table-head: #ffffff;
  --nav-active: #f4f3ef;

  --ink: #0a0a0a;
  --muted: #6f6f6c;

  --border: #0a0a0a;
  --border-soft: rgba(10,10,10,0.10);
  --border-strong: #0a0a0a;

  --accent: #0a0a0a;
  --accent-soft: rgba(10,10,10,0.04);
  --accent-soft-border: rgba(10,10,10,0.20);

  --positive: #1e5a3d;
  --negative: #825b13;

  --display: "Inter Tight", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 0;
  --radius-sm: 0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
a { color: inherit; }

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.18); border-radius: 0; }
*::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }

/* ============ App shell ============ */
.app { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; min-width: 1280px; background: #fff; }
.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 20px 18px 16px;
  display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 4px 0; }
.brand-mark {
  width: 32px; height: 32px; background: #0a0a0a; color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--muted); }

.btn-primary, .btn-secondary, .btn-ghost, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: 0; padding: 9px 16px;
  font-weight: 500; font-size: 13px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.btn-primary { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }
.btn-primary:hover { background: #1f1f1f; }
.btn-secondary { background: #fff; border-color: #0a0a0a; color: #0a0a0a; }
.btn-secondary:hover { background: var(--hover); }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid transparent; padding: 6px 4px; }
.btn-ghost:hover { color: #0a0a0a; }
.btn-danger { background: #fff; border-color: #0a0a0a; color: #0a0a0a; }
.btn-danger:hover { background: var(--hover); }
.btn-lg { padding: 11px 20px; font-size: 13px; }
.btn-block { width: 100%; }

.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 4px; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); padding: 18px 8px 6px; font-weight: 500; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-radius: 0;
  color: #0a0a0a; text-decoration: none; font-weight: 400;
  font-size: 14px; letter-spacing: -0.005em;
}
.nav a:hover { background: transparent; text-decoration: underline; text-underline-offset: 4px; }
.nav a.active { background: transparent; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.nav .nav-ic { flex-shrink: 0; color: #0a0a0a; }
.nav a:not(.active) .nav-ic { color: #6f6f6c; }

.sidebar-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; gap: 10px; }
.user-row { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.avatar {
  width: 28px; height: 28px; border-radius: 0;
  background: #0a0a0a; color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em;
}
.avatar.inline { width: 20px; height: 20px; font-size: 9px; display: inline-grid; vertical-align: middle; margin-right: 6px; }
.lang-toggle { display: inline-flex; border: 1px solid var(--border); padding: 1px; }
.lang-toggle a { padding: 3px 9px; font-size: 11px; text-decoration: none; color: var(--muted); letter-spacing: 0.04em; }
.lang-toggle a.active { background: #0a0a0a; color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; background: #fff; }
.topbar {
  padding: 16px 36px; border-bottom: 1px solid var(--border-soft);
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar h1 { margin: 0; font-family: var(--display); font-size: 28px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.topbar .crumb { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.content { padding: 0 0 80px; }
.content-narrow { max-width: 880px; margin: 0 auto; padding: 28px 36px; }
.content > .alert { margin: 18px 36px 0; }
.content > .card,
.content > .panel,
.content > .dash,
.content > div:not(.alert):not(.content-narrow) { /* allow direct content blocks */ }

/* ============ Dashboard greeting block ============ */
.dash { padding: 0 36px 36px; }
.dash-greet {
  padding: 28px 0 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.dash-eyebrow { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.dash-title { margin: 0; font-family: var(--display); font-size: 42px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.dash-tools { display: flex; align-items: center; gap: 10px; }

.period-seg { display: inline-flex; gap: 18px; align-items: center; padding-right: 6px; }
.period-seg a {
  text-decoration: none; color: var(--muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 2px 0; border-bottom: 1px solid transparent;
}
.period-seg a.active { color: #0a0a0a; border-bottom-color: #0a0a0a; }

/* ============ Stats row ============ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}
.stat { padding: 20px 22px 22px; border-right: 1px solid var(--border-soft); }
.stat:last-child { border-right: none; }
.stat .stat-label { font-size: 11px; color: var(--muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.stat .stat-value { font-family: var(--display); font-size: 30px; font-weight: 400; letter-spacing: -0.02em; line-height: 1; }
.stat .stat-sub { font-size: 11px; color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: 0.06em; min-height: 13px; }

/* ============ Dashboard panels row ============ */
.dash-row {
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 0;
  border-bottom: 1px solid var(--border);
}
.dash-row > .panel { border-right: 1px solid var(--border-soft); }
.dash-row > .panel:last-child { border-right: none; }

.panel { background: #fff; border-radius: 0; }
.panel + .panel { border-top: 1px solid var(--border-soft); }
.dash-row + .panel { margin-top: 0; }
.panel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 22px 14px; border-bottom: 1px solid var(--border-soft);
}
.panel-title { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.panel-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.panel-meta { font-size: 12px; color: var(--muted); }
.panel-meta strong { color: var(--ink); font-weight: 600; }
.panel-body { padding: 6px 22px 14px; }
.panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 22px; border-top: 1px solid var(--border-soft); background: var(--accent-soft);
}

/* Settlement member rows */
.m-row {
  display: grid; grid-template-columns: 36px 1fr 110px 110px;
  gap: 14px; align-items: center; padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
}
.m-row:last-child { border-bottom: none; }
.m-main { min-width: 0; }
.m-name-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.m-name { font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em; }
.m-share { font-size: 11.5px; color: var(--muted); }
.m-share strong { color: var(--ink); font-weight: 600; }
.m-bar { position: relative; height: 6px; background: var(--hover); overflow: visible; }
.m-bar-fill { display: block; height: 100%; background: #0a0a0a; }
.m-bar-mark { position: absolute; top: -3px; bottom: -3px; width: 1.5px; background: rgba(10,10,10,0.45); }
.m-col { text-align: right; }
.m-col-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 2px; }
.m-col-value { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.balance.pos { color: var(--positive); }
.balance.neg { color: var(--negative); }

.settle-line { font-size: 13.5px; letter-spacing: -0.005em; }
.settle-line strong { font-weight: 600; }
.settle-amt { font-weight: 600; margin-left: 8px; }

/* Goals (ring + meta) */
.goals-list { padding: 6px 14px 4px; }
.goal-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 8px; border-bottom: 1px solid var(--border-soft);
}
.goal-row:last-child { border-bottom: none; }
.ring {
  width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(#0a0a0a var(--p, 0deg), #e8e6e0 0deg);
  display: grid; place-items: center; position: relative;
}
.ring::before {
  content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%;
}
.ring-label { position: relative; font-size: 11px; font-weight: 600; letter-spacing: -0.005em; }
.goal-meta { flex: 1; min-width: 0; }
.goal-meta-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.goal-meta-value { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.goal-meta-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ============ Tables ============ */
.table-wrap { padding: 0; }
.table { width: 100%; border-collapse: collapse; background: transparent; }
.table th {
  text-align: left; font-weight: 500; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted);
  padding: 12px 22px; background: transparent;
  border-bottom: 1px solid var(--border-soft);
}
.table td { padding: 14px 22px; border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--hover); }
.table-card { border: none; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); border-radius: 0; overflow: hidden; }
.table a { color: inherit; text-decoration: none; }
.table a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============ Cards (used outside dashboard) ============ */
.card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 0;
  padding: 22px; margin-bottom: 16px;
}
.card-title { margin: 0 0 4px; font-family: var(--display); font-size: 22px; font-weight: 400; letter-spacing: -0.01em; }
.card-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; }
.section-title { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 10px; font-weight: 500; }

/* ============ Status badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0; border-radius: 0; font-size: 11px; font-weight: 500;
  border: none; background: transparent; color: #0a0a0a;
  white-space: nowrap; text-transform: uppercase; letter-spacing: 0.06em;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 0; background: #0a0a0a; display: inline-block; }
.badge.draft::before    { background: #c4c4c2; }
.badge.sent::before     { background: transparent; border: 1px solid #0a0a0a; }
.badge.paid::before     { background: #0a0a0a; }
.badge.unpaid::before   { background: transparent; border: 1px solid #0a0a0a; }
.badge.rejected::before { background: #0a0a0a; transform: rotate(45deg) scale(1.1); }

/* ============ Filter chip row ============ */
.chips { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 18px; border-bottom: 1px solid var(--border-soft); padding-bottom: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 0 10px; margin-right: 22px;
  border: none; border-bottom: 1px solid transparent;
  background: transparent; font-size: 11.5px; color: var(--muted);
  text-decoration: none; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.chip:hover { color: #0a0a0a; }
.chip.active { color: #0a0a0a; border-bottom: 1px solid #0a0a0a; margin-bottom: -1px; }
.chip .count { color: var(--muted); font-size: 10.5px; }
.chip.active .count { color: #0a0a0a; }

/* ============ Forms ============ */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.label { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.input, .select, .textarea {
  width: 100%; padding: 8px 0; background: transparent;
  border: none; border-bottom: 1px solid var(--border);
  border-radius: 0; font-size: 13.5px; color: #0a0a0a; outline: none; height: 36px;
}
.textarea {
  min-height: 90px; resize: vertical; padding: 10px 12px; height: auto;
  border: 1px solid var(--border-soft);
}
.input:focus, .select:focus, .textarea:focus { border-color: #0a0a0a; box-shadow: none; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.checkbox input[type="checkbox"] { accent-color: #0a0a0a; }
.select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M0 0l5 6 5-6z' fill='%230a0a0a'/></svg>");
  background-repeat: no-repeat; background-position: right 0 center; padding-right: 18px;
}

.alert { padding: 11px 14px; border-radius: 0; margin-bottom: 14px; font-size: 13px; border: 1px solid; background: #fff; }
.alert-success { border-color: #0a0a0a; color: #0a0a0a; }
.alert-error   { border-color: #82202c; color: #82202c; background: #fff; }
.alert-info    { border-color: #0a0a0a; color: #0a0a0a; }

/* ============ Auth pages ============ */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: #fff; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border-soft); padding: 32px 36px; }
.auth-card h1 { margin: 0 0 6px; font-family: var(--display); font-size: 34px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.05; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 22px; }
.auth-foot a { color: #0a0a0a; font-weight: 500; }

/* ============ Editor ============ */
.editor { display: grid; grid-template-columns: 1fr 460px; gap: 28px; align-items: start; padding: 28px 36px 80px; }
.editor-form { min-width: 0; }
.editor-preview { position: sticky; top: 28px; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.preview-frame { background: #fff; border: 1px solid var(--border); border-radius: 0; overflow: hidden; }
.line-row { display: grid; grid-template-columns: 28px 1fr 90px 110px 110px 32px; gap: 8px; align-items: center; padding: 6px 0; }
.line-row .label-min { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.drag-handle { color: var(--muted); cursor: grab; user-select: none; text-align: center; }
.line-remove { background: transparent; border: none; color: var(--muted); cursor: pointer; font-size: 18px; }
.line-remove:hover { color: #0a0a0a; }
.totals-box { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; max-width: 320px; margin-left: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.totals-box .total-row { display: contents; }
.totals-box .grand { font-family: var(--display); font-size: 22px; font-weight: 400; padding-top: 10px; border-top: 1px solid var(--border); margin-top: 6px; letter-spacing: -0.01em; }
.editor-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 0; border-top: 1px solid var(--border); margin-top: 20px; position: sticky; bottom: 0; background: #fff; }

/* ============ Invoice template (preview + PDF) ============ */
.inv {
  width: 800px; padding: 56px;
  background: #fff; color: #0a0a0a;
  font-family: "Inter Tight", system-ui, sans-serif; font-size: 13px;
}
.inv-preview-scale { transform: scale(.55); transform-origin: top left; }
.inv-preview-wrap { height: 660px; overflow: hidden; }
.inv-head { width: 100%; }
.inv-head td { vertical-align: top; padding: 0; }
.inv-title { font-family: var(--display); font-size: 32px; font-weight: 400; letter-spacing: -0.02em; margin: 0 0 6px; }
.inv-meta { font-size: 11px; color: #6f6f6c; text-transform: uppercase; letter-spacing: 0.06em; }
.inv-parties { width: 100%; margin-top: 32px; }
.inv-parties td { vertical-align: top; width: 50%; padding-right: 16px; }
.inv-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.1em; color: #6f6f6c; margin-bottom: 6px; }
.inv-party-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.inv-table { width: 100%; border-collapse: collapse; margin-top: 28px; }
.inv-table th { background: #0a0a0a; color: #fff; text-align: left; padding: 9px 10px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.inv-table td { padding: 9px 10px; border-bottom: 1px solid rgba(10,10,10,0.1); font-size: 12px; }
.inv-totals { width: 320px; margin-left: auto; margin-top: 16px; border-collapse: collapse; }
.inv-totals td { padding: 5px 0; font-size: 12px; }
.inv-totals .grand td { border-top: 2px solid #0a0a0a; padding-top: 8px; font-family: var(--display); font-size: 18px; font-weight: 400; letter-spacing: -0.01em; }
.inv-notes { margin-top: 28px; font-size: 12px; color: #444; }
.inv-sign { width: 100%; margin-top: 56px; border-top: 1px solid var(--border); padding-top: 14px; }
.inv-sign td { font-size: 10px; color: #6f6f6c; padding-top: 18px; text-transform: uppercase; letter-spacing: 0.08em; }
.inv-logo { font-family: var(--display); font-weight: 400; font-size: 22px; color: #0a0a0a; letter-spacing: -0.02em; }

/* ============ View page ============ */
.view-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; padding: 28px 36px 80px; }
.view-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 28px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.timeline li:last-child { border-bottom: none; }
.timeline .when { color: var(--muted); font-size: 11px; }

/* Empty state */
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty h3 { margin: 0 0 6px; color: #0a0a0a; font-family: var(--display); font-weight: 400; font-size: 22px; }

/* Pagination */
.pager { display: flex; gap: 0; justify-content: center; margin-top: 18px; }
.pager a, .pager span { padding: 6px 12px; border-radius: 0; border: 1px solid var(--border); text-decoration: none; font-size: 12px; color: #0a0a0a; margin-right: -1px; }
.pager .active { background: #0a0a0a; color: #fff; border-color: #0a0a0a; }

/* Color swatch */
.swatches { display: flex; gap: 8px; }
.swatch { width: 26px; height: 26px; border-radius: 0; border: 1px solid var(--border); cursor: pointer; }
.swatch.active { outline: 2px solid #0a0a0a; outline-offset: 3px; }

/* Display utility */
.display { font-family: var(--display); font-weight: 400; letter-spacing: -0.02em; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; }

/* Sans display headings need more weight than the old serif (which read fine at 400) */
.dash-title, .topbar h1, .auth-card h1, .card-title, .panel-title,
.stat-value, .goal-value, .goal-meta-value, .totals-box .grand,
.inv-title, .inv-logo, .empty h3, .inv-totals .grand td, .m-col-value {
  font-weight: 600 !important;
  letter-spacing: -0.025em;
}

/* ============ Expense group: full-width layout ============ */
.exp-page { padding: 28px 36px 80px; }
.exp-head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding-bottom:16px; border-bottom:1px solid var(--border); margin-bottom:20px; }
.exp-head h2 { margin:0; font-size:24px; font-weight:600; letter-spacing:-0.02em; }
.exp-grid { display:grid; grid-template-columns: 1fr 320px; gap:32px; align-items:start; }
.exp-rail { display:flex; flex-direction:column; gap:22px; position:sticky; top:28px; }
.exp-rail .card, .exp-main .card { margin-bottom:0; }

/* ============ Slide-in drawer ============ */
.drawer-overlay { position:fixed; inset:0; background:rgba(10,10,10,0.35); opacity:0; visibility:hidden; transition:opacity .18s ease; z-index:50; }
.drawer-overlay.open { opacity:1; visibility:visible; }
.drawer { position:fixed; top:0; right:0; height:100vh; width:520px; max-width:92vw; background:#fff; border-left:1px solid var(--border); box-shadow:-12px 0 40px rgba(10,10,10,0.10); transform:translateX(100%); transition:transform .22s ease; z-index:51; display:flex; flex-direction:column; }
.drawer.open { transform:translateX(0); }
.drawer-head { display:flex; align-items:center; justify-content:space-between; padding:22px 28px; border-bottom:1px solid var(--border); }
.drawer-head h3 { margin:0; font-size:20px; font-weight:600; letter-spacing:-0.02em; }
.drawer-close { background:none; border:none; font-size:24px; cursor:pointer; color:var(--muted); line-height:1; }
.drawer-close:hover { color:#0a0a0a; }
.drawer-body { padding:24px 28px; overflow-y:auto; flex:1; }
.drawer-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 28px; border-top:1px solid var(--border); background:#fff; }
