/* The Event Co HQ — base + components. Tokens live in tokens.css. */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs-md)/var(--lh) var(--font-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); line-height: 1.2; }
h2 { font-size: var(--fs-xl); line-height: 1.25; }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: var(--fs-sm); }
.xs { font-size: var(--fs-xs); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--accent-soft); }
.eyebrow { font: 600 var(--fs-xs)/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface);
  border-right: 1px solid var(--line); padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.brand__mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), #ffd86b); display: grid; place-items: center; color: #1b1a17; font-weight: 800; box-shadow: var(--shadow-1); }
.brand__name { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.brand__sub { font-size: var(--fs-xs); color: var(--text-3); margin-top: 1px; }
.nav-section { padding: 12px 8px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md);
  color: var(--text-2); font-weight: 500; border: 0; background: transparent; width: 100%; text-align: left;
  transition: background var(--dur-1), color var(--dur-1);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; opacity: 0.85; }
.nav-item .nav-badge { margin-left: auto; }
.nav-footer { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.search-trigger {
  display: flex; align-items: center; gap: 10px; width: min(460px, 100%); height: 36px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--text-3);
}
.search-trigger:hover { border-color: var(--line-strong); }
.search-trigger .kbd { margin-left: auto; }
.page { padding: 22px var(--gutter) 60px; max-width: var(--content-max); width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--text-2); margin-top: 4px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 600; font-size: var(--fs-md); white-space: nowrap; transition: background var(--dur-1), border-color var(--dur-1), transform var(--dur-1), box-shadow var(--dur-1);
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1b1a17; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.btn.danger { color: var(--bad-ink); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.sm { height: 30px; padding: 0 10px; font-size: var(--fs-sm); border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: var(--fs-xs); border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn.icon { width: 36px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--r-md) 0 0 var(--r-md); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--r-md) var(--r-md) 0; }

.kbd { font: 500 var(--fs-xs)/1 var(--font-mono); padding: 3px 6px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-3); }

/* ---------- Chips / pills / badges ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 500; font-size: var(--fs-sm);
  transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1);
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--text); color: var(--text-inverse); border-color: var(--text); }
.chip .count { font-family: var(--font-mono); font-size: var(--fs-xs); opacity: 0.75; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--text-3)); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  background: var(--pill-bg, var(--surface-2)); color: var(--pill-fg, var(--text-2)); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.good { --pill-bg: var(--good-soft); --pill-fg: var(--good-ink); }
.pill.warn { --pill-bg: var(--warn-soft); --pill-fg: var(--warn-ink); }
.pill.bad { --pill-bg: var(--bad-soft); --pill-fg: var(--bad-ink); }
.pill.info { --pill-bg: var(--info-soft); --pill-fg: var(--info-ink); }
.pill.violet { --pill-bg: var(--violet-soft); --pill-fg: var(--violet-ink); }
.pill.teal { --pill-bg: var(--teal-soft); --pill-fg: var(--teal-ink); }
.pill.accent { --pill-bg: var(--accent-soft); --pill-fg: var(--accent-ink); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--accent); color: #1b1a17; font: 700 10.5px/1 var(--font-mono); }
.badge.neutral { background: var(--surface-3); color: var(--text-2); }
.badge.red { background: var(--bad); color: #fff; }
.tag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--text-2); }

/* ---------- Cards / panels ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card.pad { padding: 18px; }
.card.pad-sm { padding: 12px 14px; }
.card__head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card__head h3 { font-size: var(--fs-md); }
.card__body { padding: 18px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; }
.stat__label { color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.stat__value { font-size: var(--fs-2xl); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat__sub { color: var(--text-2); font-size: var(--fs-sm); }
.stat--accent { border-top: 3px solid var(--accent); }
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table th { text-align: left; font: 600 var(--fs-xs)/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1); }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover { background: var(--surface-2); }
.table tbody tr.selected { background: var(--accent-soft); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table .thumb { width: 56px; height: 38px; border-radius: 6px; object-fit: cover; background: var(--surface-2); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.field .hint { font-size: var(--fs-xs); color: var(--text-3); }
.field.error .input, .field.error .select, .field.error .textarea { border-color: var(--bad); }
.field .error-text { font-size: var(--fs-xs); color: var(--bad-ink); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--accent-glow); }
.input.sm, .select.sm { height: 32px; padding: 0 10px; font-size: var(--fs-sm); }
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a867c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--surface-2); color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; }
.input-group .addon.pre { border-left: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); }
.input-group .addon.pre + .input { border-radius: 0 var(--r-md) var(--r-md) 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-md); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); border: 0; transition: background var(--dur-2); flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform var(--dur-2) var(--ease-out); }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(16px); }
.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: var(--r-md); gap: 2px; }
.segmented button { height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs button { height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--text-2); font-weight: 600; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }

/* ---------- Overlays: modal, drawer, menu, toast ---------- */
.overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 80; animation: fade var(--dur-2) both; }
.modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; pointer-events: none; }
.modal__panel { pointer-events: auto; width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-3); animation: pop var(--dur-2) var(--ease-out) both; }
.modal__panel.wide { width: min(880px, 100%); }
.modal__panel.xl { width: min(1180px, 100%); }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.modal__head h2 { font-size: var(--fs-lg); }
.modal__body { padding: 6px 20px 20px; }
.modal__foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(520px, 100%); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slide-in var(--dur-3) var(--ease-out) both; }
.drawer.wide { width: min(760px, 100%); }
.drawer__head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer__foot { padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-2); display: flex; gap: 8px; }
.menu { position: absolute; z-index: 95; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); animation: pop var(--dur-1) var(--ease-out) both; }
.menu button, .menu a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; text-align: left; color: var(--text); font-size: var(--fs-md); }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu button.danger { color: var(--bad-ink); }
.menu .sep { height: 1px; background: var(--line); margin: 6px 0; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: var(--r-md); background: var(--text); color: var(--text-inverse); box-shadow: var(--shadow-3); font-weight: 500; animation: rise var(--dur-3) var(--ease-out) both; }
.toast.good { background: var(--good); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast .btn { height: 28px; padding: 0 10px; background: rgba(255,255,255,0.15); border-color: transparent; color: inherit; }
.tooltip { position: absolute; z-index: 130; padding: 6px 9px; border-radius: 7px; background: var(--text); color: var(--text-inverse); font-size: var(--fs-xs); pointer-events: none; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98) } to { opacity: 1; transform: none } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes rise { from { transform: translateY(10px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes shimmer { to { background-position: -200% 0 } }

/* ---------- Empty / loading ---------- */
.empty { display: grid; place-items: center; text-align: center; padding: 56px 20px; color: var(--text-2); gap: 6px; }
.empty .icon { width: 48px; height: 48px; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); margin-bottom: 6px; }
.empty h3 { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- Avatar ---------- */
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); font: 700 var(--fs-xs)/1 var(--font-ui); flex: 0 0 auto; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: var(--fs-md); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; min-height: 60vh; scroll-snap-type: x proximity; }
.kanban__col { flex: 0 0 280px; display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-lg); border: 1px solid transparent; max-height: calc(100vh - 230px); scroll-snap-align: start; transition: border-color var(--dur-1), background var(--dur-1); }
.kanban__col.drop { border-color: var(--accent); background: var(--accent-soft); }
.kanban__head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 700; font-size: var(--fs-sm); }
.kanban__head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--col, var(--text-3)); }
.kanban__head .sum { margin-left: auto; color: var(--text-3); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; }
.kanban__body { flex: 1; overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px 10px 12px; box-shadow: var(--shadow-1); cursor: grab; position: relative; transition: box-shadow var(--dur-1), transform var(--dur-1); }
.kcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--col, var(--text-3)); }
.kcard:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.kcard.dragging { opacity: 0.4; }
.kcard__title { font-weight: 600; }
.kcard__sub { color: var(--text-2); font-size: var(--fs-sm); }
.kcard__meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: var(--fs-xs); color: var(--text-3); }
.kcard__meta .price { margin-left: auto; font-family: var(--font-mono); font-weight: 600; color: var(--good-ink); }
.kcard__thumb { width: 100%; aspect-ratio: 16/9; border-radius: 7px; object-fit: cover; margin-bottom: 8px; background: var(--surface-2); }

/* ---------- Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.tl-item::before { content: ""; position: absolute; left: 12px; top: 26px; bottom: 0; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.tl-icon svg { width: 13px; height: 13px; }
.tl-body { font-size: var(--fs-sm); }
.tl-body .when { color: var(--text-3); font-size: var(--fs-xs); margin-left: 6px; font-family: var(--font-mono); }

/* ---------- Command palette ---------- */
.palette { position: fixed; z-index: 100; left: 50%; top: 12vh; transform: translateX(-50%); width: min(640px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-3); overflow: hidden; animation: pop var(--dur-2) var(--ease-out) both; }
.palette input { width: 100%; height: 54px; padding: 0 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: var(--fs-lg); outline: none; }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.palette__item.active, .palette__item:hover { background: var(--surface-2); }
.palette__item .type { margin-left: auto; font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.palette__group { padding: 10px 12px 4px; font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

/* ---------- Banner ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-size: var(--fs-sm); }
.banner.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.banner.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }
.banner.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad-ink); }
.banner.good { background: var(--good-soft); border-color: transparent; color: var(--good-ink); }

/* ---------- Mobile ---------- */
.mobile-nav { display: none; }
@media (max-width: 900px) {
  :root { --gutter: 14px; }
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .sidebar.open { display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 110; box-shadow: var(--shadow-3); }
  .topbar { height: 52px; }
  .page { padding: 14px var(--gutter) 90px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .drawer { top: auto; left: 0; right: 0; width: 100%; height: 86vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; animation: rise var(--dur-3) var(--ease-out) both; }
  .modal { padding: 10px; align-items: end; }
  .kanban__col { flex: 0 0 86vw; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: var(--surface); border-top: 1px solid var(--line); z-index: 70; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10.5px; font-weight: 600; }
  .mobile-nav a.active { color: var(--accent-ink); }
  .mobile-nav svg { width: 20px; height: 20px; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 901px) { .show-mobile { display: none !important; } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }
