@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/schibsted-grotesk-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/schibsted-grotesk-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/schibsted-grotesk-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/ibm-plex-mono-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #15191f;
  --muted: #67707d;
  --line: #dfe3e8;
  --line-dark: #c8cfd7;
  --paper: #f4f5f2;
  --surface: #ffffff;
  --surface-2: #eef1ed;
  --navy: #172231;
  --accent: #f4a926;
  --teal: #29b49c;
  --danger: #c94a4a;
  --shadow: 0 18px 50px rgba(20, 29, 40, 0.12);
  --radius: 12px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 34, 49, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 34, 49, 0.022) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-size: 14px;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

a { color: inherit; }

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 169, 38, .15), transparent 28%),
    radial-gradient(circle at 85% 78%, rgba(41, 180, 156, .12), transparent 30%),
    var(--navy);
}

.auth-card {
  width: min(480px, 100%);
  padding: clamp(24px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .3);
}

.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { letter-spacing: .08em; }
.auth-brand span { margin-top: 3px; color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .14em; }
.auth-card h1 { margin: 7px 0 10px; font-size: clamp(30px, 7vw, 42px); letter-spacing: -.045em; }
.auth-intro { margin: 0 0 24px; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 15px; }
.auth-form label > span { display: block; margin-bottom: 7px; color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; letter-spacing: .06em; text-transform: uppercase; }
.auth-form input { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-dark); border-radius: 8px; background: white; outline: none; }
.auth-form input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23,34,49,.1); }
.auth-form small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.4; }
.auth-submit { width: 100%; min-height: 48px; margin-top: 2px; }
.auth-message { min-height: 20px; margin: 14px 0 0; color: var(--danger); font-size: 12px; }
.auth-security { display: flex; align-items: center; gap: 8px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.45; }
.setup-list { margin: 0 0 18px; padding-left: 20px; color: #414954; line-height: 1.55; }
.setup-list li + li { margin-top: 8px; }
.setup-key-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-bottom: 20px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.setup-key-row code { overflow-wrap: anywhere; font: 500 14px/1.5 "IBM Plex Mono", monospace; letter-spacing: .08em; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-150%);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--navy);
  color: white;
}
.skip-link:focus { transform: translateY(0); }

.app-shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #edf2f5;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.55);
  background: var(--accent);
  color: var(--navy);
  font: 700 22px/1 "IBM Plex Mono", monospace;
  box-shadow: 5px 5px 0 rgba(0,0,0,.22);
}

.brand-block strong { display: block; letter-spacing: .12em; font-size: 15px; }
.brand-block span { color: #9ca8b7; font: 500 10px/1.4 "IBM Plex Mono", monospace; letter-spacing: .14em; }

.side-nav { display: grid; gap: 6px; padding: 20px 12px; }
.nav-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #aeb8c5;
  text-align: left;
}
.nav-item:hover, .nav-item:focus-visible { background: rgba(255,255,255,.06); color: white; }
.nav-item.is-active { background: #263446; color: white; border-color: rgba(255,255,255,.1); }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 28px;
  background: var(--accent);
}
.nav-icon { font: 500 18px/1 "IBM Plex Mono", monospace; }
.nav-count { min-width: 24px; padding: 2px 7px; border-radius: 999px; background: var(--danger); color: white; text-align: center; font-size: 11px; }

.sidebar-foot { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.1); }
.security-stamp { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.status-dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(41,180,156,.15); }
.security-stamp strong { display: block; font-size: 12px; }
.security-stamp small { display: block; margin-top: 3px; color: #8f9aa8; font-size: 10px; word-break: break-all; }

.main-area { min-width: 0; }
.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 26px;
  background: rgba(244,245,242,.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.title-group { min-width: 180px; }
.eyebrow { color: var(--muted); font: 500 10px/1.3 "IBM Plex Mono", monospace; letter-spacing: .12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-box {
  width: min(34vw, 380px);
  min-height: 44px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line-dark);
  border-radius: 9px;
  background: var(--surface);
}
.search-box:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23,34,49,.1); }
.search-box input { min-width: 0; border: 0; outline: 0; background: transparent; }
kbd { padding: 3px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: #f7f8f6; color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; }

.primary-button, .ghost-button, .icon-button, .danger-link, .record-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 600;
}
.primary-button { padding: 0 16px; border: 1px solid var(--navy); background: var(--navy); color: white; box-shadow: 3px 3px 0 rgba(244,169,38,.85); }
.primary-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 rgba(244,169,38,.85); }
.ghost-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line-dark); background: var(--surface); color: var(--ink); text-decoration: none; }
.ghost-button:hover { border-color: var(--navy); }
.full-width { width: 100%; }
.sidebar .ghost-button { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.14); color: white; box-shadow: none; }
.icon-button { width: 42px; padding: 0; border: 1px solid var(--line); background: var(--surface); font-size: 24px; }
.danger-link { border: 0; background: transparent; color: var(--danger); }
.mobile-menu { display: none; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px 26px 0; }
.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.metric-card::after { content: ""; position: absolute; right: -28px; bottom: -35px; width: 90px; height: 90px; border: 12px solid rgba(23,34,49,.035); border-radius: 50%; }
.metric-card span { color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin-top: 6px; font: 700 28px/1.1 "IBM Plex Mono", monospace; }
.metric-card small { display: block; margin-top: 6px; color: var(--muted); }
.metric-alert { border-top: 3px solid var(--accent); }
.metric-recurring { border-top: 3px solid var(--teal); }

.workspace-panel { margin: 16px 26px 26px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 32px rgba(23,34,49,.06); overflow: hidden; }
.workspace-toolbar { min-height: 58px; display: flex; align-items: center; gap: 16px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.segmented-control { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.segmented-control button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.segmented-control button.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.09); }
.filter-cluster { display: flex; align-items: center; gap: 12px; }
.filter-cluster select { min-height: 36px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 0 30px 0 10px; }
.check-filter { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.sync-state { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; }
.sync-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.sync-state.is-saving span { background: var(--accent); animation: pulse 1s infinite; }
.sync-state.is-error span { background: var(--danger); }

.app-content { min-height: 420px; }
.loading-state, .empty-state { min-height: 420px; display: grid; place-items: center; padding: 40px; color: var(--muted); text-align: center; }

.board { display: flex; gap: 10px; align-items: flex-start; overflow-x: auto; padding: 14px; scroll-snap-type: x proximity; }
.board-column { flex: 0 0 294px; min-height: 390px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #f3f5f2; scroll-snap-align: start; transition: border-color .2s ease, background .2s ease; }
.board-column.is-over { border-color: var(--column-color); background: color-mix(in srgb, var(--column-color) 9%, white); }
.column-header { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 8px; min-height: 42px; padding: 2px 4px 10px; }
.column-swatch { width: 10px; height: 28px; border-radius: 4px; background: var(--column-color); }
.column-title strong { display: block; font-size: 13px; }
.column-title small { display: block; margin-top: 2px; color: var(--muted); font: 500 9px/1 "IBM Plex Mono", monospace; }
.column-count { min-width: 25px; padding: 3px 7px; border-radius: 999px; background: white; border: 1px solid var(--line); text-align: center; font: 500 10px/1 "IBM Plex Mono", monospace; }
.color-dot-control { position: relative; width: 28px; height: 28px; overflow: hidden; border: 0; padding: 0; border-radius: 7px; background: transparent; }
.color-dot-control input { position: absolute; inset: -8px; width: 44px; height: 44px; opacity: 0; cursor: pointer; }
.color-dot-control::after { content: "◐"; color: var(--muted); font-size: 16px; }
.column-cards { display: grid; gap: 8px; min-height: 310px; }
.deal-card { position: relative; padding: 13px 13px 11px; border: 1px solid var(--line); border-left: 4px solid var(--card-color, var(--column-color)); border-radius: 9px; background: var(--card-bg, white); box-shadow: 0 2px 7px rgba(23,34,49,.06); cursor: grab; transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.deal-card:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(23,34,49,.1); }
.deal-card.is-dragging { opacity: .45; transform: rotate(1.2deg); }
.deal-card button { text-align: left; }
.deal-company { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 700; line-height: 1.35; }
.deal-company:hover { text-decoration: underline; text-underline-offset: 3px; }
.deal-contact { min-height: 18px; margin-top: 4px; color: var(--muted); font-size: 12px; }
.deal-next { margin: 10px 0; padding: 8px 9px; border: 1px dashed var(--line-dark); border-radius: 7px; background: rgba(255,255,255,.65); color: #38404a; font-size: 11px; line-height: 1.4; }
.deal-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font: 500 9px/1.2 "IBM Plex Mono", monospace; }
.age-badge { padding: 4px 7px; border-radius: 999px; background: color-mix(in srgb, var(--column-color) 14%, white); color: color-mix(in srgb, var(--column-color) 65%, #15191f); }
.due-badge { color: var(--danger); }

.table-wrap { overflow: auto; max-height: calc(100vh - 290px); }
.crm-table { width: 100%; min-width: 1580px; border-collapse: separate; border-spacing: 0; }
.crm-table th { position: sticky; top: 0; z-index: 3; height: 42px; padding: 0 10px; border-bottom: 1px solid var(--line-dark); background: #eef1ed; color: var(--muted); text-align: left; font: 500 9px/1 "IBM Plex Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.crm-table td { max-width: 270px; padding: 9px 10px; border-bottom: 1px solid var(--line); background: var(--row-bg, white); vertical-align: middle; }
.crm-table tr:hover td { background: #fafbf9; }
.crm-table .company-cell { position: sticky; left: 0; z-index: 2; min-width: 210px; border-left: 4px solid var(--row-color, var(--line-dark)); }
.company-button { padding: 0; border: 0; background: transparent; font-weight: 700; text-align: left; }
.cell-muted { color: var(--muted); }
.cell-truncate { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-status { min-height: 32px; min-width: 150px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: white; }

.contact-dialog { width: min(960px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 14px; background: transparent; box-shadow: var(--shadow); }
.contact-dialog::backdrop { background: rgba(10,15,22,.62); backdrop-filter: blur(3px); }
.dialog-shell { background: var(--surface); border-radius: 14px; overflow: hidden; }
.dialog-header { display: flex; align-items: flex-start; gap: 20px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.dialog-header > div { min-width: 0; flex: 1; }
.dialog-header h2 { margin: 4px 0 2px; font-size: clamp(22px, 3vw, 30px); letter-spacing: -.035em; }
.dialog-header p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.dialog-tabs { display: flex; gap: 6px; padding: 8px 14px 0; border-bottom: 1px solid var(--line); background: #f7f8f6; }
.dialog-tabs button { min-height: 40px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.dialog-tabs button.is-active { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.dialog-tabs span { display: inline-block; min-width: 20px; margin-left: 4px; padding: 2px 5px; border-radius: 999px; background: var(--surface-2); font-size: 10px; }
.dialog-body { max-height: calc(100vh - 190px); overflow-y: auto; }
.tab-panel { display: none; padding: 20px 22px 24px; }
.tab-panel.is-active { display: block; animation: panel-in .24s var(--ease); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label > span { display: block; margin-bottom: 6px; color: var(--muted); font: 500 10px/1 "IBM Plex Mono", monospace; text-transform: uppercase; letter-spacing: .05em; }
.field-span-2 { grid-column: span 2; }
input, select, textarea { color: var(--ink); }
.form-grid input:not([type="color"]), .form-grid select, .form-grid textarea, .activity-composer input, .activity-composer select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: white;
  outline: none;
}
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .activity-composer input:focus, .activity-composer select:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(23,34,49,.09); }
.color-field { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.color-field input { width: 44px; height: 38px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: white; }
.color-field button { min-height: 36px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--muted); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-actions > div { display: flex; gap: 8px; }

.activity-composer { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; margin-bottom: 18px; }
.timeline-list { display: grid; gap: 0; }
.timeline-entry { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; padding: 0 0 18px; }
.timeline-entry::after { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 1px; background: var(--line); }
.timeline-entry:last-child::after { display: none; }
.timeline-marker { position: relative; z-index: 1; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--entry-color, var(--navy)); color: white; font-size: 10px; }
.timeline-content { padding-top: 2px; }
.timeline-content strong { display: block; font-size: 12px; }
.timeline-content p { margin: 4px 0 0; color: #414954; line-height: 1.5; white-space: pre-wrap; }
.timeline-time { color: var(--muted); font: 500 9px/1.4 "IBM Plex Mono", monospace; white-space: nowrap; }

.info-banner { margin-bottom: 14px; padding: 11px 12px; border: 1px solid #e6c373; border-radius: 8px; background: #fff7dd; color: #66501c; }
.drive-actions { display: flex; gap: 8px; margin-bottom: 14px; }
.voice-recorder { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f7f8f6; }
.voice-recorder strong, .voice-recorder small { display: block; }
.voice-recorder small { margin-top: 3px; color: var(--muted); }
.record-button { padding: 0 13px; border: 1px solid #dfb7b7; background: white; color: #9f3030; }
.record-button span { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: #d34c4c; }
.record-button.is-recording { background: #d34c4c; color: white; animation: pulse 1.2s infinite; }
.record-button.is-recording span { background: white; }
.record-time { font: 500 12px/1 "IBM Plex Mono", monospace; }
.file-drop { min-height: 150px; display: grid; place-items: center; align-content: center; gap: 5px; border: 1.5px dashed var(--line-dark); border-radius: 10px; background: #fbfcfa; text-align: center; cursor: pointer; }
.file-drop:hover, .file-drop.is-over { border-color: var(--teal); background: #f0faf7; }
.file-drop input { display: none; }
.file-drop-icon { font-size: 28px; color: var(--teal); }
.file-drop small { color: var(--muted); }
.files-list { display: grid; gap: 8px; margin-top: 14px; }
.file-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.file-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-2); font: 500 10px/1 "IBM Plex Mono", monospace; }
.file-row strong, .file-row small { display: block; }
.file-row small { margin-top: 2px; color: var(--muted); }
.file-row a { font-weight: 600; color: #225aa6; }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display: grid; gap: 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 14px; border-left: 4px solid var(--teal); border-radius: 8px; background: var(--navy); color: white; box-shadow: var(--shadow); animation: toast-in .25s var(--ease); }
.toast.is-error { border-color: var(--danger); }

@keyframes pulse { 50% { opacity: .55; } }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .brand-block { justify-content: center; padding-inline: 10px; }
  .brand-block > div:last-child, .nav-item:not(.is-active)::after, .nav-item { font-size: 0; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  .nav-icon { font-size: 19px; }
  .nav-count { position: absolute; margin: -25px 0 0 24px; font-size: 9px; }
  .security-stamp > div, .sidebar-foot .ghost-button { display: none; }
  .security-stamp { justify-content: center; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 50; width: 250px; transform: translateX(-105%); transition: transform .25s var(--ease); }
  .sidebar.is-open { transform: translateX(0); box-shadow: var(--shadow); }
  .brand-block { justify-content: flex-start; padding-inline: 20px; }
  .brand-block > div:last-child { display: block; }
  .nav-item { grid-template-columns: 28px 1fr auto; justify-items: initial; padding: 0 12px; font-size: 14px; }
  .nav-count { position: static; margin: 0; font-size: 10px; }
  .security-stamp > div, .sidebar-foot .ghost-button { display: block; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .mobile-menu { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 8px; background: white; }
  .title-group { min-width: 0; }
  .top-actions { width: 100%; margin: 0; }
  .search-box { width: auto; flex: 1; }
  .search-box kbd { display: none; }
  .primary-button { white-space: nowrap; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px 0; }
  .metric-card { min-height: 96px; padding: 13px; }
  .metric-card strong { font-size: 22px; }
  .workspace-panel { margin: 12px 14px 18px; }
  .workspace-toolbar { flex-wrap: wrap; }
  .filter-cluster { order: 3; width: 100%; overflow-x: auto; }
  .sync-state { margin-left: auto; }
  .board-column { flex-basis: 84vw; }
  .form-grid { grid-template-columns: 1fr; }
  .field-span-2 { grid-column: auto; }
  .activity-composer { grid-template-columns: 1fr; }
  .voice-recorder { grid-template-columns: 1fr auto; }
  .record-time { grid-column: 2; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions > div { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
