/* ===========================================================
   Clockwork — design system
   Light: pure white / black / Klein blue.
   Dark:  pure black / white / gold.
   =========================================================== */

:root {
  /* Colours — light */
  --bg:        #FFFFFF;
  --surface:   #F5F5F5;
  --surface-2: #E8E8E8;
  --text:      #000000;
  --text-dim:  #555555;
  --text-mute: #888888;
  --border:    #E0E0E0;
  --border-2:  #C0C0C0;

  --accent:        #0028FF;
  --accent-strong: #001ACC;
  --accent-tint:   #E0E7FF;
  --on-accent:     #FFFFFF;

  --warning:       #D97706;
  --warning-tint:  #FED7AA;
  --danger:        #DC2626;
  --danger-tint:   #FECACA;
  --info:          #0891B2;
  --info-tint:     #CFFAFE;

  /* Type */
  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Geist", system-ui, -apple-system, sans-serif;
  --font-mono:    "Geist Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 22px;
  --tab-h:     64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);

  color-scheme: light;
}

:root[data-theme="dark"] { color-scheme: dark; }

@media (prefers-color-scheme: dark) {
  /* Browser/OS dark preference is intentionally ignored — the user's
     explicit choice in Settings is the only source of truth. See theme.js. */
}

:root[data-theme="dark"] {
  --bg:        #000000;
  --surface:   #0F0F0F;
  --surface-2: #1A1A1A;
  --text:      #FFFFFF;
  --text-dim:  #BBBBBB;
  --text-mute: #777777;
  --border:    #222222;
  --border-2:  #333333;

  --accent:        #FFD700;
  --accent-strong: #FFE55C;
  --accent-tint:   #2D2400;
  --on-accent:     #000000;

  --warning:       #FB923C;
  --warning-tint:  #3D2A0A;
  --danger:        #F87171;
  --danger-tint:   #3D1212;
  --info:          #38BDF8;
  --info-tint:     #0F2A3D;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overscroll-behavior-y: contain;
}

/* ----- Layout primitives ----- */

#view {
  min-height: 100vh;
  padding: calc(var(--safe-top) + 24px) 22px calc(var(--tab-h) + var(--safe-bottom) + 32px);
  max-width: 720px;
  margin: 0 auto;
}

#tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-top: 0.5px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 50;
}
#tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-mute);
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.15s;
}
#tabbar a .tab-glyph {
  font-size: 22px;
  line-height: 1;
}
#tabbar a.active { color: var(--accent); }
#tabbar a:active { transform: scale(0.96); }

/* ----- Typography ----- */

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; margin: 0; color: var(--text); }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.3; font-weight: 500; }
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-weight: 500;
}
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-dim); }
.dim   { color: var(--text-mute); }

/* ----- Buttons ----- */

button, .btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-2);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.08s, background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
  line-height: 1.2;
}
button:active, .btn:active { transform: scale(0.97); }
button:disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}
.btn-ghost {
  background: transparent;
  border-color: var(--border);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > * { flex: 1 1 0; min-width: 0; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* ----- Inputs ----- */

input, textarea, select {
  font-family: var(--font-body);
  font-size: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 0.5px solid var(--border-2);
  background: var(--bg);
  color: var(--text);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
label.field {
  display: block;
  margin-bottom: 14px;
}
label.field > span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
}
input.code-input {
  font-family: var(--font-mono);
  font-size: 28px;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  padding: 18px 14px;
}

/* ----- Cards & lists ----- */

.card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.card + .card { margin-top: 10px; }

.list { list-style: none; padding: 0; margin: 0; }
.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 0.5px solid var(--border);
  gap: 12px;
}
.list-row:last-child { border-bottom: none; }
.list-row.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.list-row.tappable:active { background: var(--surface); }
.list-row .row-main { flex: 1; min-width: 0; }
.list-row .row-aside { color: var(--text-dim); font-family: var(--font-mono); text-align: right; }
.list-row .row-chevron { color: var(--text-mute); font-size: 16px; }

.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--border);
  gap: 12px;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .kv-key { color: var(--text-dim); font-size: 14px; }
.kv-row .kv-val { font-weight: 500; }

/* ----- Status badges ----- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.badge.s-working   { background: var(--accent-tint); color: var(--accent-strong); }
.badge.s-on_break  { background: var(--info-tint);   color: var(--info); }
.badge.s-done_today{ background: var(--surface-2);   color: var(--text-dim); }
.badge.s-absent_today { background: var(--warning-tint); color: var(--warning); }
.badge.s-off_today { background: var(--surface-2); color: var(--text-mute); }

/* ----- Page header ----- */

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
}
.page-head .page-meta { color: var(--text-dim); font-size: 13px; }

section + section { margin-top: 28px; }
section > h3 { margin-bottom: 10px; }

/* ----- Clock screen — the showpiece ----- */

.clock-screen {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: calc(100vh - var(--tab-h) - var(--safe-bottom) - var(--safe-top) - 48px);
}
.clock-fortnight {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--border);
}
.clock-timer {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
}
.clock-timer .timer-display {
  font-family: var(--font-mono);
  font-size: clamp(72px, 18vw, 116px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.clock-timer.is-paused .timer-display { color: var(--text-mute); }
.clock-timer .timer-caption {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 14px;
  font-family: var(--font-mono);
}
.clock-timer .timer-caption strong { color: var(--text); font-weight: 500; }
.clock-actions { display: grid; gap: 10px; padding-top: 8px; }
.clock-actions .btn { padding: 18px 22px; font-size: 16px; }
.clock-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-mute);
  padding-top: 14px;
}

/* ----- Now / Earlier sheet ----- */

.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}
.sheet {
  background: var(--bg);
  width: 100%;
  max-width: 520px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px 22px calc(22px + var(--safe-bottom));
  animation: slideUp 0.22s cubic-bezier(.22,.61,.36,1);
}
.sheet h2 { font-size: 18px; margin-bottom: 4px; }
.sheet .sheet-sub { color: var(--text-dim); font-size: 14px; margin-bottom: 18px; }
.sheet .btn-row { margin-top: 12px; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

/* ----- Day-of-week chips (Settings → working days) ----- */

.dow-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.dow-chip {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 0;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.dow-chip.on {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent-strong);
  font-weight: 500;
}

/* ----- Toasts ----- */

#toasts {
  position: fixed;
  left: 0; right: 0;
  top: calc(var(--safe-top) + 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 200;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  pointer-events: auto;
  animation: toastIn 0.2s ease, toastOut 0.2s ease 3s forwards;
  max-width: 90vw;
  text-align: center;
}
.toast.err { background: var(--danger); color: #fff; }
.toast.ok  { background: var(--accent); color: var(--on-accent); }
@keyframes toastIn  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-12px); } }

/* ----- Misc ----- */

.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.row > .grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.spacer { flex: 1; }
.hidden, [hidden] { display: none !important; }
.flag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  background: var(--warning-tint);
  color: var(--warning);
  border-radius: 999px;
  font-weight: 500;
  margin-left: 6px;
}

/* ----- Empty / loading states ----- */

.empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-mute);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
}
.loading {
  text-align: center;
  padding: 32px 0;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ----- Offline indicator ----- */

.offline-bar {
  background: var(--warning);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 6px 10px;
  letter-spacing: 0.02em;
}

/* ----- Day / Week view toggle ----- */

.view-toggle {
  display: flex;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 18px;
  gap: 3px;
}
.vt-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: calc(var(--radius-sm) - 2px);
  padding: 8px 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mute);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.vt-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

/* ----- Week grid ----- */

.week-grid {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.wg-row {
  display: flex;
  align-items: stretch;
  border-top: 0.5px solid var(--border);
}
.wg-header {
  border-top: none;
}
.wg-name-col {
  flex: 0 0 100px;
  padding: 9px 8px 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.wg-header .wg-name-col {
  /* spacer — intentionally empty */
}
.wg-day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 2px;
  min-width: 0;
}
.wg-day-col.wg-today {
  background: var(--accent-tint);
}
.wg-day-col.wg-past {
  /* subtle — let dot opacity do the work */
}

/* Header labels */
.wg-day-letter {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-mute);
  font-family: var(--font-body);
  line-height: 1;
}
.wg-day-num {
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  color: var(--text);
  margin-top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wg-today .wg-day-num {
  background: var(--accent);
  color: var(--on-accent);
}

/* Presence dot */
.wg-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
/* Past days: fade unscored dots */
.wg-past .wg-dot {
  opacity: 0.28;
}
/* Today: colour by live status */
.wg-today .wg-dot               { background: var(--text-dim); opacity: 1; }
.wg-today .wg-dot.s-working     { background: var(--accent); }
.wg-today .wg-dot.s-on_break    { background: var(--info); }
.wg-today .wg-dot.s-done_today  { background: var(--text-dim); }
.wg-today .wg-dot.s-absent_today { background: var(--warning); }

/* ----- Tasks ----- */

.task-list {
  padding: 4px 0;
}
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
}
.task-row.task-done .task-title {
  text-decoration: line-through;
  color: var(--text-mute);
}
.task-check {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: transparent;
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.task-row.task-done .task-check {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.task-main {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.task-title {
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Helper chip badges */
.helper-chips {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.helper-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
}
.helper-chip-more {
  background: var(--surface-2);
  color: var(--text-dim);
}

/* Helper picker tick column */
.hp-tick {
  display: inline-block;
  width: 20px;
  text-align: center;
  color: var(--accent);
  font-weight: 600;
}

/* Task meta (relative date + owner) under the title */
.task-meta {
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Details list inside the task edit sheet */
.task-details {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  font-size: 13px;
}
.task-details li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 0.5px solid var(--border);
}
.task-details li:last-child {
  border-bottom: none;
}

/* Task sort bar — small "Sort" label + 3-pill view-toggle */
.task-sort-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.task-sort-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-mute);
  flex-shrink: 0;
}
.task-sort-toggle {
  flex: 1;
  margin-bottom: 0;
}
.task-sort-toggle .vt-btn {
  font-size: 13px;
  padding: 6px 0;
}

/* ===========================================================
   Venues / Projects directory
   =========================================================== */

/* Search field on the list */
#vn-search { -webkit-appearance: none; appearance: none; }

/* Directory cards */
.venue-card {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.venue-card:active { background: var(--surface-2); transform: scale(0.995); }
.venue-card .vc-main { flex: 1; min-width: 0; }
.venue-card .vc-name { font-weight: 500; font-size: 16px; }
.venue-card .vc-clients { color: var(--text-dim); font-size: 14px; margin-top: 2px; }
.venue-card .vc-place { color: var(--text-mute); font-size: 13px; margin-top: 2px; font-family: var(--font-mono); }
.venue-card .vc-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.venue-card .row-chevron { font-size: 22px; color: var(--text-mute); }

/* Spec / status badges (extends .badge) */
.badge.neutral { background: var(--surface-2); color: var(--text-dim); }
.badge.neutral::before { display: none; }
.badge.w-ok  { background: var(--accent-tint); color: var(--accent-strong); }
.badge.w-ok::before  { display: none; }
.badge.w-exp { background: var(--warning-tint); color: var(--warning); }
.badge.w-exp::before { display: none; }

/* Collapsible detail sections (native <details>) */
details.section {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
}
details.section > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}
details.section > summary::-webkit-details-marker { display: none; }
details.section > summary::after {
  content: "⌄";
  color: var(--text-mute);
  font-size: 18px;
  transition: transform 0.18s ease;
}
details.section[open] > summary::after { transform: rotate(180deg); }
details.section > summary:active { background: var(--surface-2); }
details.section .section-body { padding: 4px 18px 16px; }
details.section .section-body .field:last-child,
details.section .section-body .kv-row:last-child { margin-bottom: 0; }

/* Editing: leave room for the fixed save bar */
.venue-detail.is-editing { padding-bottom: 96px; }

/* Fixed save/cancel bar, sitting above the tab bar */
.edit-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tab-h) + var(--safe-bottom));
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-top: 0.5px solid var(--border);
  z-index: 50;
  max-width: 640px;
  margin: 0 auto;
}
.edit-bar > * { flex: 1 1 0; }

/* Client chip editor */
.chip-edit { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; }
.chip-edit-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 6px 5px 11px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 500;
}
.chip-edit-item .chip-x {
  all: unset;
  cursor: pointer;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  color: var(--accent-strong);
}
.chip-edit-item .chip-x:active { background: rgba(0,0,0,0.08); }

/* Contact view + editor */
.contact-view { padding: 8px 0; border-bottom: 0.5px solid var(--border); }
.contact-view:last-child { border-bottom: none; }
.contact-view .cv-name { font-weight: 500; }
.contact-edit-row {
  border: 0.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 10px;
}
.cer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cer-grid input { font-size: 15px; }
.contact-edit-row .cer-remove { margin-top: 8px; width: 100%; }

/* Numeric pair inputs (W × H, cabinet grid) */
.pair-grid { display: flex; align-items: center; gap: 10px; }
.pair-grid input { flex: 1; }
.pair-grid .pair-x { color: var(--text-mute); font-family: var(--font-mono); }

/* ===========================================================
   Typeahead search-and-select (Org/Venue pickers)
   =========================================================== */
.ta { position: relative; }
.ta-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ta-chips:not(:empty) { margin-bottom: 8px; }
.ta-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 6px 5px 11px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-size: 13px; font-weight: 500;
}
.ta-chip-x {
  all: unset; cursor: pointer;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; font-size: 15px; line-height: 1;
  color: var(--accent-strong);
}
.ta-chip-x:active { background: rgba(0,0,0,0.08); }
.ta-input-wrap { position: relative; }
.ta-menu {
  position: fixed;
  z-index: 200;
  background: var(--bg);
  border: 0.5px solid var(--border-2);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
  max-height: 240px; overflow-y: auto;
}
.ta-opt {
  padding: 11px 14px; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-bottom: 0.5px solid var(--border);
}
.ta-opt:last-child { border-bottom: none; }
.ta-opt:active, .ta-opt.active { background: var(--surface); }
.ta-opt-sub { color: var(--text-mute); font-size: 12px; font-family: var(--font-mono); flex-shrink: 0; }
.ta-add {
  padding: 11px 14px; cursor: pointer;
  color: var(--accent-strong); font-weight: 500;
  border-top: 0.5px solid var(--border);
}
.ta-add:active, .ta-add.active { background: var(--accent-tint); }
.ta-empty { padding: 11px 14px; color: var(--text-mute); font-size: 13px; }
