:root {
  --bg: #f5f5f7;
  --card-bg: #ffffff;
  --border: #e4e4e7;
  --border-soft: rgba(0, 0, 0, 0.06);
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --header-bg: #1d1d1f;
  --accent-blue: #0071e3;
  --accent-partner: #5e5ce6;

  --status-cold: #86868b;
  --status-engaged: #0071e3;
  --status-active: #ff9500;
  --status-settled: #30d158;
  --status-lost: #ff3b30;

  --amber-bg: #fff3de;
  --amber-text: #9a5b00;

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.35), 0 4px 14px rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; }

html { -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Helvetica, Arial, sans-serif;
  font-optical-sizing: auto;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Header ---------- */

.topbar {
  background: var(--header-bg);
  color: #fff;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.demo-badge {
  background: rgba(255, 149, 0, 0.18);
  color: #ffb340;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 5px;
  align-self: center;
}
.topbar-title h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.topbar-title p {
  margin: 5px 0 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: rgba(255, 255, 255, 0.56);
}

.topbar-actions { display: flex; gap: 10px; }

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

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 590;
  letter-spacing: -0.005em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateZ(0) scale(1);
  transition: transform 100ms cubic-bezier(0.2, 0, 0, 1), background-color 150ms ease, opacity 150ms ease;
}
.btn:active { transform: scale(0.96); }
.btn svg { flex-shrink: 0; }

.btn-add { background: var(--header-bg); color: #fff; }
.btn-add:hover { background: #000; }
.topbar .btn-add { background: #fff; color: var(--header-bg); }
.topbar .btn-add:hover { background: #f0f0f0; }
.topbar .btn-secondary { background: rgba(255, 255, 255, 0.14); color: #fff; }
.topbar .btn-secondary:hover { background: rgba(255, 255, 255, 0.22); }

.btn-secondary { background: rgba(0, 0, 0, 0.06); color: var(--text); }
.btn-secondary:hover { background: rgba(0, 0, 0, 0.1); }

.btn-danger { background: rgba(255, 59, 48, 0.1); color: #d70015; }
.btn-danger:hover { background: rgba(255, 59, 48, 0.16); }

.btn-tiny { padding: 5px 9px; font-size: 12px; border-radius: 6px; letter-spacing: 0.005em; }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn:disabled:active { transform: none; }

.card-icon-btn {
  border: 1px solid var(--border-soft);
  background: #fff;
  border-radius: 6px;
  font-size: 12px;
  padding: 4px 7px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 100ms cubic-bezier(0.2, 0, 0, 1), background-color 150ms ease;
}
.card-icon-btn:hover { background: var(--bg); }
.card-icon-btn:active { transform: scale(0.92); }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: #fff;
  box-shadow: 0 1px 0 var(--border-soft), 0 6px 12px -8px rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  flex-shrink: 0;
  z-index: 2;
  position: relative;
}

.search-input {
  flex: 0 0 240px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.search-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}

/* Pipeline toggle now lives in the dark header (see .topbar-actions), so its
   colors are the light-on-dark treatment — same idea as .topbar .btn-secondary. */
.pipeline-toggle {
  position: relative;
  display: flex;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 9px;
  padding: 2px;
}
.toggle-indicator {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: 60px;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  z-index: 0;
  transition: background-color 200ms ease;
}
/* Referral Partners gets a distinct accent so the two pipelines read apart at a glance. */
.pipeline-toggle.is-partner .toggle-indicator { background: var(--accent-partner); }
.toggle-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 7px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 590;
  letter-spacing: -0.005em;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.65);
  transition: color 200ms ease;
}
.toggle-btn.active { color: var(--header-bg); }
.pipeline-toggle.is-partner .toggle-btn.active { color: #fff; }

/* ---------- Board ---------- */

.board {
  display: flex;
  gap: 16px;
  padding: 20px 28px;
  overflow-x: auto;
  align-items: flex-start;
  flex: 1;
  min-height: 0;
}

/* ---------- Filter button + panel ---------- */

.filter-wrap { position: relative; flex-shrink: 0; }

.btn-icon-square {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 100ms cubic-bezier(0.2, 0, 0, 1);
}
.btn-icon-square:hover { background: var(--bg); }
.btn-icon-square:active { transform: scale(0.94); }
.btn-icon-square.active { border-color: var(--accent-blue); color: var(--accent-blue); background: rgba(0, 113, 227, 0.08); }

.filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--accent-blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-soft);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-section h4 {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.filter-checkbox-list { display: flex; flex-direction: column; gap: 6px; }
.filter-checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.filter-checkbox-list input[type="checkbox"] { accent-color: var(--accent-blue); }
.filter-checkbox-list .filter-swatch-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Client sub-view tabs (Board / Completed / Archived) — inline in the toolbar ---------- */

.view-tabs {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.view-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.view-tab:hover { background: rgba(0, 0, 0, 0.04); }
.view-tab.active { background: rgba(0, 113, 227, 0.1); color: var(--accent-blue); }

/* ---------- List view (Completed / Archived) ---------- */

.list-view {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 12px;
  padding: 20px 28px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.list-view .card { width: 260px; flex-shrink: 0; }
.list-view .empty-column { width: 100%; }

.column {
  min-width: 250px;
  max-width: 250px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}
.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
}
.column-badge {
  background: var(--header-bg);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  flex-shrink: 0;
}
.column-title-group h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.column-title-group span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-muted);
}

.column-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 2px 2px 12px;
  min-height: 0;
  mask-image: linear-gradient(to bottom, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 10px, black calc(100% - 10px), transparent 100%);
}
.column-cards::-webkit-scrollbar { width: 6px; }
.column-cards::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 3px; }
.column-cards::-webkit-scrollbar-track { background: transparent; }

.board::-webkit-scrollbar { height: 8px; }
.board::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.15); border-radius: 4px; }
.board::-webkit-scrollbar-track { background: transparent; }

.empty-column {
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 20px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- Cards ---------- */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
  cursor: pointer;
  transition: box-shadow 200ms cubic-bezier(0.2, 0, 0, 1), transform 200ms cubic-bezier(0.2, 0, 0, 1);
}
.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px; }
.card-name {
  font-weight: 650;
  font-size: 14px;
  letter-spacing: -0.005em;
  margin: 0;
}

.card-meta {
  font-size: 12px;
  font-weight: 450;
  letter-spacing: 0.005em;
  color: var(--text-muted);
  margin: 4px 0 8px;
}

.next-action-pill {
  display: inline-block;
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
}

.last-contact {
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-actions { display: flex; gap: 6px; }
.card-actions .btn { flex: 1; }

.partner-count {
  font-size: 11px;
  font-weight: 450;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 480px;
  max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
  transform: scale(0.96);
  opacity: 0;
}
.modal-small { width: 380px; }

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-header h2 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.modal-close {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, transform 100ms cubic-bezier(0.2, 0, 0, 1);
}
.modal-close:hover { background: rgba(0, 0, 0, 0.06); }
.modal-close:active { transform: scale(0.9); }

.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.field-group { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group.hidden { display: none; }
.field-group label {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 590;
  letter-spacing: 0.005em;
  color: var(--text-muted);
  gap: 5px;
}
.field-group .full-width { grid-column: 1 / -1; }
.field-group input, .field-group select, .field-group textarea {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-weight: 400;
  background: #fff;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.field-group textarea { min-height: 60px; resize: vertical; }

.modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}
.spacer { flex: 1; }

.call-type-row { display: flex; gap: 8px; }
.radio-pill {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 150ms ease, background-color 150ms ease;
}
.radio-pill:has(input:checked) {
  border-color: var(--accent-blue);
  background: rgba(0, 113, 227, 0.08);
}

.hidden { display: none !important; }

/* ---------- Auth screen ---------- */

.auth-view {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 360px;
  max-width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-modal);
  padding: 28px 26px;
}
.auth-card h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.auth-card > p { margin: 0 0 18px; font-size: 13px; }

.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 590;
  color: var(--text-muted);
}
.auth-card input {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  font-weight: 400;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.auth-card input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15);
}
.auth-card button[type="submit"] { margin-top: 6px; }

.demo-hint {
  background: rgba(255, 149, 0, 0.1);
  color: #9a5b00;
  font-size: 12px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.auth-error {
  background: rgba(255, 59, 48, 0.1);
  color: #d70015;
  font-size: 12px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 8px;
}

.auth-info {
  background: rgba(52, 199, 89, 0.12);
  color: #1a7d34;
  font-size: 12px;
  font-weight: 550;
  padding: 8px 12px;
  border-radius: 8px;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 590;
  color: var(--accent-blue);
  cursor: pointer;
  text-align: left;
  align-self: flex-start;
}
.link-btn:hover { text-decoration: underline; }

/* ---------- Settings page ---------- */

.settings-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 28px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
}

.settings-section {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.settings-section h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.settings-section p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 56ch;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.text-muted { font-size: 12px; letter-spacing: 0.01em; color: var(--text-muted); }

.file-input-label { cursor: pointer; display: inline-flex; align-items: center; }

.import-mapping {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.import-mapping .field-group { margin-bottom: 16px; }

.import-preview-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  margin-bottom: 4px;
}
.import-preview-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.import-preview-table th, .import-preview-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.import-preview-table th {
  background: rgba(0, 0, 0, 0.03);
  font-weight: 600;
  color: var(--text-muted);
}
.import-preview-table tr:last-child td { border-bottom: none; }

.import-result {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(48, 209, 88, 0.1);
  color: #1a7d34;
  font-size: 13px;
  font-weight: 550;
}

/* ---------- Labels ---------- */

.label-name-input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  width: 220px;
}

.color-swatch-picker { display: flex; gap: 6px; }
.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 100ms cubic-bezier(0.2, 0, 0, 1), border-color 150ms ease;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: var(--header-bg); }

.labels-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.label-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 20px;
  padding: 5px 6px 5px 12px;
  font-size: 13px;
  font-weight: 550;
}
.label-row .label-swatch-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.label-row .label-delete-btn {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.label-row .label-delete-btn:hover { background: rgba(255, 59, 48, 0.15); color: #d70015; }

.labels-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.labels-field-title {
  font-size: 12px;
  font-weight: 590;
  letter-spacing: 0.005em;
  color: var(--text-muted);
}

.label-chip-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.label-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
button.label-chip {
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  color: var(--text-muted);
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
button.label-chip.selected { border-color: transparent; }

.card-label-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }

/* ---------- Accessibility: reduced motion / transparency / contrast ---------- */

@media (prefers-reduced-motion: reduce) {
  .modal-overlay, .modal, .toggle-indicator, .card {
    transition: opacity 150ms ease, transform 150ms ease !important;
  }
  .btn, .card-icon-btn, .modal-close {
    transition: background-color 150ms ease, opacity 150ms ease !important;
  }
  .btn:active, .card-icon-btn:active, .modal-close:active { transform: none !important; }
  .card:hover { transform: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .modal-overlay { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(0, 0, 0, 0.55); }
}

@media (prefers-contrast: more) {
  :root { --border: #a1a1a6; --border-soft: #a1a1a6; --text-muted: #3a3a3c; }
  .card, .empty-column { border-width: 1.5px; }
}

/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .topbar {
    flex-wrap: wrap;
    padding: 12px 16px;
    gap: 10px;
  }
  .brand-logo { height: 32px; }
  .topbar-title h1 { font-size: 17px; }
  .topbar-title p { font-size: 12px; }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .pipeline-toggle { flex: 1 1 100%; }
  .pipeline-toggle .toggle-btn { flex: 1; text-align: center; }
  .topbar-actions > .btn { flex: 1 1 auto; }

  .toolbar {
    padding: 10px 16px;
    gap: 8px;
  }
  .search-input { flex: 1 1 auto; min-width: 0; }
  .view-tabs { width: 100%; }
  .filter-panel { left: auto; right: 0; width: min(240px, calc(100vw - 32px)); }

  .board, .list-view { padding: 14px 16px; }
  .board { scroll-snap-type: x mandatory; }
  .column {
    min-width: 84vw;
    max-width: 84vw;
    scroll-snap-align: start;
  }
  .list-view .card { width: 100%; }

  .settings-view { padding: 16px 16px 40px; gap: 14px; }
  .settings-section { padding: 16px; }

  .modal-overlay { padding: 0; }
  .modal, .modal-small {
    width: 100vw;
    max-width: 100vw;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  .field-group { grid-template-columns: 1fr; }

  .auth-view { padding: 16px; }
  .auth-card { padding: 22px 18px; }
}
