:root {
  color-scheme: light;
  --ink: #171427;
  --muted: #6e6a7d;
  --faint: #9995a7;
  --line: #e8e5ef;
  --surface: #ffffff;
  --canvas: #f6f5f9;
  --purple: #5a3fd6;
  --purple-dark: #352284;
  --purple-soft: #efebff;
  --teal: #008f83;
  --teal-soft: #dff8f4;
  --amber: #ce7700;
  --amber-soft: #fff2d7;
  --red: #c13750;
  --red-soft: #ffebef;
  --green: #247d51;
  --green-soft: #e4f6ec;
  --nav: #171231;
  --nav-soft: #272047;
  --shadow: 0 18px 55px rgba(26, 20, 55, .14);
  --radius: 18px;
  --radius-sm: 11px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { height: 100%; }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--purple); }
h1, h2, h3, h4, p { margin-top: 0; }
kbd {
  display: inline-flex;
  min-width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 1px solid rgba(74, 65, 105, .18);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--muted);
  background: rgba(255,255,255,.72);
  font-size: 11px;
  font-family: inherit;
}

[hidden] { display: none !important; }
.mobile-only { display: none !important; }
.muted { color: var(--muted); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 720;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: wait; }
.button--primary { color: white; background: linear-gradient(135deg, #684ae5, #4930b5); box-shadow: 0 8px 20px rgba(77, 51, 186, .2); }
.button--primary:hover:not(:disabled) { box-shadow: 0 10px 24px rgba(77, 51, 186, .3); }
.button--quiet { border-color: var(--line); background: white; color: var(--ink); }
.button--danger { color: var(--red); border-color: #f0cfd5; background: white; }
.button--wide { width: 100%; }
.button--small { min-height: 34px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
.text-button { padding: 4px 7px; border: 0; color: var(--purple); background: transparent; cursor: pointer; font-weight: 700; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}
.icon-button:hover { background: rgba(90, 63, 214, .08); }

.brand { display: flex; align-items: center; gap: 11px; color: white; }
.brand-mark {
  width: 38px;
  height: 42px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 94% 17%, 87% 76%, 50% 100%, 13% 76%, 6% 17%);
  background: linear-gradient(150deg, #a594ff, #5c42db 58%, #13c7b6);
  color: white;
  font-weight: 900;
  font-size: 18px;
  text-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.brand > span:last-child { display: grid; line-height: 1.15; }
.brand strong { font-size: 16px; letter-spacing: -.02em; }
.brand small { margin-top: 4px; color: #a9a2c9; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.brand--large .brand-mark { width: 46px; height: 52px; font-size: 21px; }
.brand--large strong { font-size: 20px; }

.avatar {
  width: 34px;
  height: 34px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: var(--purple);
  font-size: 12px;
  font-weight: 850;
}
.avatar--purple { background: #775ae6; }
.avatar--teal { background: #049b90; }
.avatar--amber { background: #d6810b; }

/* Login */
.login-page {
  min-height: 100vh;
  display: block;
  padding: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(13, 122, 112, .06), transparent 38%),
    radial-gradient(circle at bottom right, rgba(44, 95, 207, .05), transparent 32%),
    linear-gradient(180deg, #f6fafa 0%, #eef5f4 100%);
}
.login-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  position: relative;
  overflow: hidden;
  background: transparent;
}
.login-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image:
    linear-gradient(rgba(13, 122, 112, .85) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 122, 112, .85) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.72), rgba(0,0,0,.22) 55%, transparent 86%);
}
.login-story {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 31px 56px 42px;
  color: #102c33;
  position: relative;
  z-index: 1;
}
.login-wordmark {
  width: min(300px, 72%);
  height: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.login-story-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(42px, 7vh, 68px);
  padding: 30px 0 12px;
}
.login-copy { max-width: 640px; position: relative; z-index: 1; }
.eyebrow { display: block; margin-bottom: 9px; color: var(--purple); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .13em; }
.login-copy h1 { margin: 0 0 18px; font-size: clamp(34px, 3.2vw, 48px); line-height: 1.08; letter-spacing: -.045em; }
.login-copy h1 em {
  color: transparent;
  background: linear-gradient(90deg, #0ea897, #3c9fd1 53%, #8555ca);
  background-clip: text;
  -webkit-background-clip: text;
  font-style: normal;
}
.login-copy p { max-width: 610px; margin: 0; color: #17343a; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.62; }
.login-copy strong { font-weight: 750; }
.accent-cyan { color: #087d88; }
.accent-teal { color: #087c68; }
.accent-blue { color: #285fbb; }
.accent-purple { color: #7041aa; }
.accent-amber { color: #a45f00; }
.capability-grid {
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px 18px;
  position: relative;
  z-index: 1;
}
.capability-grid > div { min-width: 0; }
.capability-grid strong, .capability-grid span { display: block; }
.capability-grid strong { margin-bottom: 3px; font-size: 17px; line-height: 1.15; }
.capability-grid span { color: #294149; font-size: 11px; line-height: 1.35; }
.login-card-wrap {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 32px 48px;
}
.login-card {
  width: min(448px, 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 27px;
  padding: 32px;
  border: 1px solid rgba(35, 73, 78, .13);
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 30px 80px -45px rgba(11, 42, 49, .42), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(22px);
}
.login-kicker { color: #087d88; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .18em; }
.login-card h2 { margin: 7px 0 5px; font-size: 27px; letter-spacing: -.035em; }
.login-card p { color: var(--muted); }
.status-pill i, .sync-state i { width: 7px; height: 7px; border-radius: 50%; background: #2da869; box-shadow: 0 0 0 4px rgba(45,168,105,.12); }
.login-card form { display: grid; gap: 20px; }
.login-card label { display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.login-card input { width: 100%; height: 49px; padding: 0 14px; border: 1px solid #dce7e5; border-radius: 10px; outline: none; background: rgba(241,247,246,.75); }
.login-card input:focus { border-color: #20a99d; box-shadow: 0 0 0 3px rgba(13,122,112,.1); }
.password-field { display: flex; align-items: center; border: 1px solid #dce7e5; border-radius: 10px; background: rgba(241,247,246,.75); }
.password-field:focus-within { border-color: #20a99d; box-shadow: 0 0 0 3px rgba(13,122,112,.1); }
.password-field input { border: 0; box-shadow: none !important; background: transparent; }
.login-card .text-button { color: #087d88; }
.login-card .button--primary { background: linear-gradient(135deg, #0e9f91, #367fc6 58%, #7047bb); box-shadow: 0 9px 24px rgba(22, 120, 133, .22); }
.form-error { padding: 10px 12px; border-radius: 9px; color: var(--red); background: var(--red-soft); font-size: 12px; font-weight: 700; }
.login-note { margin: 0; padding-top: 18px; border-top: 1px solid #e2ebea; font-size: 11px; line-height: 1.6; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 246px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 30; padding: 22px 14px 14px; color: #ded9f1; background: var(--nav); }
.nav-scrim { display: none; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 25px; }
.main-nav { display: grid; gap: 5px; }
.main-nav button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border: 0; border-radius: 10px; color: #aaa4c2; background: transparent; cursor: pointer; text-align: left; font-weight: 660; }
.main-nav button:hover { color: white; background: rgba(255,255,255,.055); }
.main-nav button.active { color: white; background: linear-gradient(105deg, #403192, #32276e); box-shadow: inset 3px 0 #9a86ff; }
.nav-icon { width: 22px; color: #8172d5; text-align: center; font-size: 18px; }
.main-nav button.active .nav-icon { color: #b1a3ff; }
.main-nav b { min-width: 22px; margin-left: auto; padding: 2px 5px; border-radius: 999px; color: #b9b2d2; background: rgba(255,255,255,.08); font-size: 10px; text-align: center; }
.sidebar-foot { margin-top: auto; position: relative; }
.event-card { display: flex; align-items: flex-start; gap: 10px; margin: 0 4px 13px; padding: 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 10px; background: rgba(255,255,255,.035); }
.event-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #39cf9a; box-shadow: 0 0 0 4px rgba(57,207,154,.11); }
.event-card div { display: grid; }
.event-card strong { color: #e8e4f6; font-size: 10px; }
.event-card small { margin-top: 2px; color: #8f88ac; font-size: 9px; }
.user-chip { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; border: 0; border-top: 1px solid rgba(255,255,255,.08); color: white; background: transparent; cursor: pointer; text-align: left; }
.user-chip > span:nth-child(2) { min-width: 0; display: grid; flex: 1; }
.user-chip strong, .user-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip strong { font-size: 11px; }
.user-chip small { color: #8f88ac; font-size: 9px; }
.user-menu { position: absolute; left: 4px; right: 4px; bottom: 61px; overflow: hidden; border: 1px solid #39305a; border-radius: 10px; background: #211a3d; box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.user-menu button { width: 100%; padding: 11px 13px; border: 0; color: white; background: transparent; cursor: pointer; text-align: left; font-size: 12px; }
.user-menu button:hover { background: rgba(255,255,255,.08); }
.app-content { min-width: 0; }
.topbar { height: 72px; position: sticky; top: 0; display: flex; align-items: center; gap: 16px; z-index: 20; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); }
.global-search { width: min(430px, 44vw); display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--canvas); }
.global-search > span { color: var(--faint); font-size: 20px; }
.global-search input { width: 100%; height: 40px; border: 0; outline: none; background: transparent; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-state { display: inline-flex; align-items: center; gap: 8px; color: var(--green); font-size: 11px; font-weight: 800; }
.sync-state.saving { color: var(--amber); }
.sync-state.saving i { background: var(--amber); box-shadow: 0 0 0 4px rgba(206,119,0,.12); }
.sync-state.offline { color: var(--red); }
.sync-state.offline i { background: var(--red); box-shadow: 0 0 0 4px rgba(193,55,80,.12); }
#main { min-height: calc(100vh - 72px); padding: 28px; outline: none; }
.loading-state { min-height: 65vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 32px; height: 32px; border: 3px solid var(--purple-soft); border-top-color: var(--purple); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Dashboard and pages */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin-bottom: 5px; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; letter-spacing: -.042em; }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; gap: 9px; }
.metrics-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric-card { min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 5px 16px rgba(35,28,65,.035); }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 720; }
.metric-card strong { font-size: 27px; line-height: 1; letter-spacing: -.04em; }
.metric-card small { color: var(--faint); font-size: 10px; }
.metric-card--accent { color: white; border: 0; background: linear-gradient(145deg, #6046d7, #382584); }
.metric-card--accent span, .metric-card--accent small { color: #d5cef9; }
.metric-card--warn strong { color: var(--red); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .85fr); gap: 18px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(35,28,65,.035); }
.panel + .panel { margin-top: 18px; }
.panel-head { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 15px; letter-spacing: -.015em; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px; }
.panel-empty { padding: 40px 18px; color: var(--muted); text-align: center; }
.link-button { padding: 5px; border: 0; color: var(--purple); background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; }
.lead-mini-list { display: grid; }
.lead-mini { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 13px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.lead-mini:last-child { border-bottom: 0; }
.lead-mini:hover { background: #faf9fc; }
.lead-mini-main { min-width: 0; }
.lead-mini-main strong, .lead-mini-main span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-mini-main strong { font-size: 12px; }
.lead-mini-main span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.lead-mini-meta { display: grid; justify-items: end; gap: 4px; color: var(--muted); font-size: 9px; }
.grade { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--muted); background: #f0eef4; font-weight: 900; }
.grade--a { color: #9c243c; background: #ffe2e8; }
.grade--b { color: #9a5a00; background: #ffedca; }
.grade--p { color: #4932aa; background: #ebe6ff; }
.grade--c { color: #15644f; background: #def5ec; }
.grade--x { color: #6c6975; background: #ebe9ee; }
.grade--unqualified { color: #756f85; background: #f1eff5; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 3px 8px; border-radius: 999px; color: #4d4860; background: #f0eef5; font-size: 9px; font-weight: 800; white-space: nowrap; }
.badge--purple { color: var(--purple-dark); background: var(--purple-soft); }
.badge--red { color: var(--red); background: var(--red-soft); }
.badge--green { color: var(--green); background: var(--green-soft); }
.badge--amber { color: var(--amber); background: var(--amber-soft); }
.team-bars { display: grid; gap: 16px; }
.team-bar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; font-size: 11px; }
.team-progress, .target-progress { width: 100%; height: 8px; display: block; overflow: hidden; border: 0; border-radius: 999px; background: #efedf4; appearance: none; }
.team-progress::-webkit-progress-bar, .target-progress::-webkit-progress-bar { border-radius: 999px; background: #efedf4; }
.team-progress::-webkit-progress-value { border-radius: 999px; background: linear-gradient(90deg, #654ae0, #8a72ec); }
.team-progress::-moz-progress-bar { border-radius: 999px; background: linear-gradient(90deg, #654ae0, #8a72ec); }
.target-list { display: grid; gap: 14px; }
.target-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.target-row > span { font-size: 11px; font-weight: 700; }
.target-row > strong { font-size: 11px; }
.target-progress { grid-column: 1 / 3; height: 6px; }
.target-progress::-webkit-progress-value { border-radius: 999px; background: var(--teal); }
.target-progress::-moz-progress-bar { border-radius: 999px; background: var(--teal); }
.signal-callout { padding: 16px; border: 1px solid #ded7ff; border-radius: 13px; background: linear-gradient(135deg, #faf8ff, #f1eeff); }
.signal-callout .eyebrow { margin-bottom: 6px; }
.signal-callout h3 { margin-bottom: 7px; font-size: 15px; }
.signal-callout p { margin: 0; color: var(--muted); font-size: 11px; }

/* Lead list */
.filterbar { display: flex; align-items: center; gap: 9px; margin-bottom: 15px; padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.filterbar select, .filterbar input { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; background: #fbfafd; font-size: 11px; }
.filterbar .filter-spacer { flex: 1; }
.result-count { color: var(--muted); font-size: 11px; }
.lead-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: white; }
.lead-table { width: 100%; min-width: 920px; border-collapse: collapse; }
.lead-table th { position: sticky; top: 0; z-index: 1; padding: 11px 13px; color: var(--muted); background: #f7f6f9; font-size: 9px; text-align: left; text-transform: uppercase; letter-spacing: .08em; }
.lead-table td { padding: 12px 13px; border-top: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.lead-table tbody tr { cursor: pointer; }
.lead-table tbody tr:hover { background: #faf9fc; }
.lead-name { max-width: 220px; }
.lead-name strong, .lead-name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-name span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.lead-risk { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warning-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--red); }
.empty-page { min-height: 380px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.empty-page strong { color: var(--ink); font-size: 16px; }

/* Forms and modal */
dialog { border: 0; padding: 0; color: inherit; overscroll-behavior: contain; }
dialog::backdrop { background: rgba(17, 13, 38, .62); backdrop-filter: blur(5px); }
.modal { width: min(760px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); overflow: hidden; border-radius: 20px; background: white; box-shadow: var(--shadow); }
.modal--capture { width: min(960px, calc(100vw - 28px)); }
.modal--scanner { width: min(720px, calc(100vw - 28px)); }
.modal--lead { width: min(1040px, calc(100vw - 28px)); }
.modal--small { width: min(470px, calc(100vw - 28px)); }
.modal form { margin: 0; }
.modal--capture > form, .modal--small > form, .scanner-shell { max-height: calc(100dvh - 28px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.modal-head { min-height: 91px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.modal--scanner .dialog-close { width: 44px; height: 44px; flex: 0 0 44px; }
.modal-head .eyebrow { margin-bottom: 4px; }
.modal-head h2 { margin: 0 0 3px; font-size: 22px; letter-spacing: -.03em; }
.modal-head p { margin: 0; color: var(--muted); font-size: 11px; }
.modal-body { max-height: calc(100vh - 240px); overflow-y: auto; padding: 22px 24px; }
.modal-actions { min-height: 68px; display: flex; align-items: center; gap: 9px; padding: 12px 24px; border-top: 1px solid var(--line); background: #faf9fc; }
.modal-spacer { flex: 1; }
.capture-body { min-height: 0; max-height: none; display: block; padding: 17px 20px 20px; overflow-y: auto; background: #f8f7fa; }
.capture-body > * + * { margin-top: 12px; }
.capture-primary, .capture-disclosure { border: 1px solid var(--line); border-radius: 14px; background: white; }
.capture-primary { padding: 17px; }
.capture-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.capture-section-heading h3 { margin: 0 0 2px; font-size: 14px; }
.capture-section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.required-badge { flex: 0 0 auto; padding: 5px 9px; border-radius: 999px; color: var(--purple-dark); background: var(--purple-soft); font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.capture-essential-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.button--scan { min-height: 42px; color: #086f68; border-color: #bde7e2; background: #e9faf7; box-shadow: none; }
.capture-badge-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 13px; padding: 10px 12px; border: 1px solid #bfe7df; border-radius: 10px; background: #edfaf7; }
.capture-badge-result > div { min-width: 0; display: grid; }
.capture-badge-result strong { color: #15644f; font-size: 10px; }
.capture-badge-result span { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.capture-ai-opt-in { display: flex; align-items: flex-start; gap: 10px; margin-top: 13px; padding: 11px 12px; border: 1px solid #dcd4ff; border-radius: 10px; background: #faf9ff; cursor: pointer; }
.capture-ai-opt-in input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--purple); }
.capture-ai-opt-in span { display: grid; gap: 2px; }
.capture-ai-opt-in strong { color: var(--purple-dark); font-size: 10px; }
.capture-ai-opt-in small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.capture-disclosure { overflow: hidden; }
.capture-disclosure > summary { min-height: 62px; display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; list-style: none; }
.capture-disclosure > summary::-webkit-details-marker { display: none; }
.capture-disclosure > summary::after { content: "⌄"; flex: 0 0 auto; color: var(--faint); font-size: 18px; transition: transform .16s ease; }
.capture-disclosure[open] > summary::after { transform: rotate(180deg); }
.capture-disclosure > summary > span { min-width: 0; display: grid; flex: 1; }
.capture-disclosure > summary > span strong { font-size: 12px; }
.capture-disclosure > summary > span small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.capture-disclosure > summary > b { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #f1eff5; font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.capture-disclosure-body { padding: 17px; border-top: 1px solid var(--line); }
.capture-save-hint { color: var(--muted); font-size: 10px; }
.capture-save-hint strong { color: var(--ink); }
.scanner-body { min-height: 0; max-height: none; display: block; overflow-y: auto; background: #f8f7fa; }
.scanner-body > * + * { margin-top: 13px; }
.scanner-preview { width: min(100%, 420px); aspect-ratio: 1; min-height: 0; margin-inline: auto; position: relative; overflow: hidden; border-radius: 15px; background: #171427; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.scanner-preview video { width: 100%; height: 100%; min-height: 0; aspect-ratio: 1; display: block; object-fit: cover; }
.scanner-reticle { width: min(72%, 300px); height: auto; aspect-ratio: 1; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 2px solid rgba(255,255,255,.88); border-radius: 18px; box-shadow: 0 0 0 999px rgba(9,7,22,.28); }
.scanner-reticle::before, .scanner-reticle::after, .scanner-reticle i::before, .scanner-reticle i::after { content: ""; width: 26px; height: 26px; position: absolute; border-color: #53e0cc; border-style: solid; }
.scanner-reticle::before { left: -3px; top: -3px; border-width: 4px 0 0 4px; border-radius: 16px 0 0; }
.scanner-reticle::after { right: -3px; top: -3px; border-width: 4px 4px 0 0; border-radius: 0 16px 0 0; }
.scanner-reticle i::before { left: -3px; bottom: -3px; border-width: 0 0 4px 4px; border-radius: 0 0 0 16px; }
.scanner-reticle i::after { right: -3px; bottom: -3px; border-width: 0 4px 4px 0; border-radius: 0 0 16px; }
.scanner-status { margin: 0; padding: 10px 12px; border-radius: 9px; color: #4d485c; background: white; font-size: 10px; font-weight: 700; }
.scanner-status.success { color: var(--green); background: var(--green-soft); }
.scanner-status.error { color: var(--red); background: var(--red-soft); }
.scanner-attestation { min-height: 54px; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border: 1px solid #d9d4e4; border-radius: 10px; background: white; cursor: pointer; }
.scanner-attestation input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--purple); }
.scanner-attestation span { display: grid; gap: 3px; }
.scanner-attestation strong { color: var(--ink); font-size: 10px; }
.scanner-attestation small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.scanner-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.scanner-file { position: relative; }
.scanner-file.disabled { opacity: .48; pointer-events: none; }
.scanner-manual { border: 1px solid var(--line); border-radius: 11px; background: white; }
.scanner-manual summary { min-height: 46px; display: flex; align-items: center; padding: 9px 12px; cursor: pointer; color: var(--purple); font-size: 10px; font-weight: 800; }
.scanner-manual[open] { padding-bottom: 12px; }
.scanner-manual[open] summary { margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.scanner-manual .field, .scanner-manual .button { margin-inline: 12px; width: calc(100% - 24px); }
.scanner-manual .button { margin-top: 9px; }
.scanner-privacy { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.capture-contact-pair { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 10px; }
.field--span { grid-column: 1 / -1; }
.quick-row { display: grid; grid-template-columns: 1.3fr .8fr .9fr; gap: 14px; margin-top: 14px; }
.capture-disclosure-body > .quick-row:first-child { margin-top: 0; }
.field { display: grid; gap: 6px; }
.field > span, .chip-field legend { color: #4d485c; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.field em { color: var(--purple); font-style: normal; text-transform: none; letter-spacing: 0; }
.field small, .chip-field small { color: var(--faint); font-weight: 600; text-transform: none; letter-spacing: 0; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: 0; color: var(--ink); background: #fcfbfd; }
.field input, .field select { min-height: 42px; padding: 0 11px; }
.field textarea { min-height: 65px; padding: 10px 11px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8772e7; box-shadow: 0 0 0 3px rgba(90,63,214,.09); background: white; }
.field [aria-invalid="true"] { border-color: #d86479; box-shadow: 0 0 0 3px rgba(216,100,121,.1); background: #fff7f8; }
.field input.ocr-suggested { border-color: #29aa93; background: #edfaf7; box-shadow: inset 3px 0 #29aa93; }
.field input:invalid:not(:placeholder-shown) { border-color: #df8c9b; }
.chip-field { margin: 17px 0; padding: 0; border: 0; }
.chip-field legend { margin-bottom: 8px; }
.choice-chips { display: flex; gap: 7px; }
.choice-chips--wrap { flex-wrap: wrap; }
.choice-chip { min-height: 35px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; cursor: pointer; font-size: 10px; font-weight: 720; }
.choice-chip:hover { border-color: #c6bdf2; }
.choice-chip.selected { border-color: #7b63e3; color: var(--purple-dark); background: var(--purple-soft); box-shadow: inset 0 0 0 1px #7b63e3; }
.choice-chip i { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 5px; color: #777184; background: #f0eef4; font-size: 8px; font-style: normal; }
.choice-chip.selected i { color: white; background: var(--purple); }
.live-grade { min-width: 112px; display: flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 11px; background: #faf9fc; }
.live-grade strong { width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: white; background: #aaa5b5; font-size: 17px; }
.live-grade span { color: var(--muted); font-size: 9px; line-height: 1.2; }
.score-grid { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 11px; align-items: center; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; }
.score-label strong { display: block; font-size: 10px; }
.score-label span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.score-buttons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.score-buttons button { height: 31px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #faf9fc; cursor: pointer; font-size: 10px; font-weight: 800; }
.score-buttons button.selected { border-color: var(--purple); color: white; background: var(--purple); }
.inline-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 9px; color: var(--muted); background: #f5f3fa; font-size: 10px; }
.route-summary { margin-bottom: 17px; padding: 14px; border: 1px solid #dcd4ff; border-radius: 12px; background: #f8f6ff; }
.route-summary h3 { margin: 0 0 5px; font-size: 14px; }
.route-summary p { margin: 0; color: var(--muted); font-size: 10px; }
.route-toggle { display: flex; gap: 11px; align-items: flex-start; margin-top: 17px; padding: 14px; border: 1px solid #dcd4ff; border-radius: 11px; background: #faf9ff; cursor: pointer; }
.route-toggle input { width: 18px; height: 18px; accent-color: var(--purple); }
.route-toggle span { display: grid; }
.route-toggle strong { font-size: 11px; }
.route-toggle small { margin-top: 3px; color: var(--muted); font-size: 9px; }

/* Lead drawer */
.lead-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.lead-title { display: flex; gap: 13px; min-width: 0; }
.lead-title h2 { margin: 0 0 3px; font-size: 23px; letter-spacing: -.035em; }
.lead-title p { margin: 0; color: var(--muted); }
.lead-title-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.drawer-actions { display: flex; gap: 7px; }
.lead-drawer-body { max-height: calc(100vh - 115px); overflow-y: auto; padding: 20px 24px 30px; }
.drawer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, .75fr); gap: 16px; }
.drawer-section { margin-bottom: 16px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.drawer-section h3 { margin: 0 0 13px; font-size: 13px; }
.drawer-section-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 13px; }
.drawer-section-head h3 { margin: 0; }
.next-move-card { border-color: #dcd4ff; background: linear-gradient(135deg, #fff, #f8f6ff); }
.record-editor > summary { margin-bottom: 0; cursor: pointer; list-style: none; }
.record-editor > summary::-webkit-details-marker { display: none; }
.record-editor[open] > summary { margin-bottom: 13px; }
.record-editor.dirty { border-color: #e4c079; box-shadow: 0 0 0 3px rgba(206,119,0,.08); }
.pitch-card { padding: 16px; border: 1px solid #dcd4ff; border-radius: 14px; background: linear-gradient(135deg, #f9f7ff, #f0ecff); }
.pitch-card .eyebrow { margin-bottom: 4px; }
.pitch-card h3 { margin: 0 0 8px; font-size: 15px; }
.pitch-card blockquote { margin: 0; color: #403a50; font-size: 12px; line-height: 1.65; }
.pitch-card footer { margin-top: 11px; padding-top: 10px; border-top: 1px solid #ded7fb; color: var(--muted); font-size: 10px; }
.warning-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.warning-list li { padding: 8px 10px; border-radius: 8px; color: #9b3148; background: var(--red-soft); font-size: 10px; }
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.detail-item { min-width: 0; }
.detail-item span { display: block; margin-bottom: 3px; color: var(--faint); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.detail-item strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 650; }
.signal-list { display: flex; flex-wrap: wrap; gap: 6px; }
.signal-list--spaced { margin-top: 13px; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 9px; position: relative; padding: 0 0 14px; }
.activity-item:not(:last-child)::after { content: ""; width: 1px; position: absolute; left: 4px; top: 10px; bottom: 0; background: var(--line); }
.activity-item > i { width: 9px; height: 9px; margin-top: 4px; z-index: 1; border: 2px solid white; border-radius: 50%; background: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.activity-item strong { display: block; font-size: 10px; }
.activity-item p { margin: 2px 0; color: var(--muted); font-size: 9px; }
.activity-item time { color: var(--faint); font-size: 8px; }
.ai-research-card { overflow: hidden; border-color: #cec4fb; background: linear-gradient(150deg, #fff 0%, #faf8ff 70%, #f2faff 100%); box-shadow: 0 9px 26px rgba(65,45,145,.07); }
.ai-research-head { align-items: flex-start; margin: -2px 0 12px; }
.ai-research-head .eyebrow { margin-bottom: 2px; }
.ai-research-head h3 { margin: 0; font-size: 16px; }
.ai-research-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.ai-opt-in { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 13px; padding: 10px 11px; border: 1px solid #ddd7f3; border-radius: 10px; background: rgba(255,255,255,.82); cursor: pointer; }
.ai-opt-in input { width: 18px; height: 18px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--purple); }
.ai-opt-in span { display: grid; gap: 2px; }
.ai-opt-in strong { color: var(--purple-dark); font-size: 10px; }
.ai-opt-in small { color: var(--muted); font-size: 9px; line-height: 1.45; }
.ai-status { padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.ai-status > div { display: flex; align-items: flex-start; gap: 11px; }
.ai-status strong { display: block; font-size: 11px; }
.ai-status p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.ai-status > div:last-child:not(:first-child) { margin-top: 11px; }
.ai-status--running { border-color: #cfc5fb; color: var(--purple-dark); background: #f8f6ff; }
.ai-status--warning { border-color: #efd19b; background: var(--amber-soft); }
.ai-status--error { border-color: #efc7cf; background: var(--red-soft); }
.ai-status progress { width: 100%; height: 5px; display: block; margin-top: 12px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: #e3def8; }
.ai-status progress::-webkit-progress-bar { background: #e3def8; }
.ai-status progress:indeterminate { background: linear-gradient(90deg, #e3def8 0 28%, #7258df 45% 55%, #e3def8 72% 100%); background-size: 220% 100%; animation: research-progress 1.4s linear infinite; }
.loader--small { width: 22px; height: 22px; flex: 0 0 auto; border-width: 2px; }
@keyframes research-progress { to { background-position: -220% 0; } }
.ai-existing { display: grid; gap: 10px; margin-top: 12px; }
.ai-existing > span { color: var(--muted); font-size: 9px; }
.ai-result { display: grid; gap: 11px; }
.ai-advisory { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
.ai-opening { padding: 15px; border: 1px solid #cabefa; border-radius: 12px; background: linear-gradient(135deg, #f4f0ff, #edf9ff); }
.ai-opening .eyebrow { margin-bottom: 5px; }
.ai-opening blockquote { margin: 0; color: #312650; font-size: 15px; font-weight: 720; line-height: 1.48; letter-spacing: -.012em; }
.ai-opening small { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.ai-adjacent-evidence { display: grid; gap: 5px; margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(90,63,214,.13); }
.ai-adjacent-evidence > span { color: var(--faint); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.ai-adjacent-evidence > div { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-adjacent-evidence a { max-width: 100%; overflow: hidden; padding: 3px 6px; border: 1px solid #d9d1f5; border-radius: 999px; color: var(--purple-dark); background: rgba(255,255,255,.84); text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 780; }
.ai-adjacent-evidence--empty { color: var(--amber); }
.ai-summary-grid, .ai-brief-grid, .ai-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-block { min-width: 0; padding: 12px; border-radius: 10px; background: rgba(244,243,248,.92); }
.ai-block-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; }
.ai-block-heading .badge { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.ai-block h4 { margin: 0 0 6px; color: var(--purple-dark); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.ai-block p { margin: 0; color: #484254; font-size: 10px; line-height: 1.6; }
.ai-block > small { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.ai-block ul, .ai-block ol { display: grid; gap: 6px; margin: 0; padding-left: 17px; color: #484254; font-size: 10px; }
.ai-evidence-list { padding: 0 !important; list-style: none; }
.ai-evidence-list li { display: grid; gap: 4px; padding-bottom: 7px; border-bottom: 1px solid rgba(77,72,96,.09); }
.ai-evidence-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.ai-evidence-list li > span small { color: var(--faint); white-space: nowrap; }
.ai-evidence-list a { width: max-content; max-width: 100%; color: var(--purple); font-size: 8px; font-weight: 800; }
.ai-caveats { display: grid; gap: 5px; padding: 11px 12px; border: 1px solid #ecd8a9; border-radius: 10px; color: #76500d; background: #fff9e9; font-size: 9px; }
.ai-caveats ul { display: grid; gap: 3px; margin: 0; padding-left: 16px; }
.ai-more { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: white; }
.ai-more summary { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; color: var(--purple-dark); cursor: pointer; font-size: 9px; font-weight: 800; }
.ai-more-grid { padding: 0 10px 10px; }
.ai-sources { display: grid; gap: 7px; padding-top: 2px; }
.ai-sources > strong { color: var(--muted); font-size: 9px; }
.source-list { display: flex; flex-wrap: wrap; gap: 5px; }
.source-list a { max-width: 100%; overflow: hidden; padding: 4px 7px; border: 1px solid #ded8f4; border-radius: 999px; color: var(--purple-dark); background: white; text-overflow: ellipsis; white-space: nowrap; font-size: 8px; font-weight: 750; }
.edit-form-section { margin: 18px 0 0; }
.edit-form-section summary { padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 11px; font-weight: 800; }
.edit-form-section > div { padding: 7px 0 15px; }
.score-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.embedded-actions { position: sticky; bottom: -17px; z-index: 3; margin: 16px -17px -17px; box-shadow: 0 -8px 20px rgba(35,28,65,.06); }
.stack-actions { display: grid; gap: 8px; margin-top: 14px; }
.contact-actions { display: flex; gap: 7px; margin-top: 13px; }
.meeting-editor-list { display: grid; gap: 12px; margin-top: 10px; }
.meeting-update-form { padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #faf9fc; }
.meeting-editor-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 9px; }
.meeting-editor-head span { color: var(--muted); }
.meeting-editor-actions, .meeting-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meeting-editor-actions .button, .meeting-form-actions .button { flex: 1 1 180px; }
.meeting-form-error { margin: 0; }
.calendar-help { margin: -5px 0 13px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.invite-action { border-color: #c9e1d8; color: #12624f; background: #f4fbf8; }
.invite-copy-dialog textarea { width: 100%; min-height: 260px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fcfbfd; resize: vertical; line-height: 1.55; }

/* Guide and meetings */
.guide-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); overflow: hidden; margin-bottom: 18px; border-radius: 20px; color: white; background: linear-gradient(135deg, #1d1740, #4b36a4); }
.guide-hero-main { padding: 34px; }
.guide-hero .eyebrow { color: #b5a7ff; }
.guide-hero h1 { margin-bottom: 10px; font-size: 32px; letter-spacing: -.045em; }
.guide-hero p { max-width: 620px; color: #d1cbe8; }
.guide-location { max-width: 620px; display: grid; gap: 2px; margin: 16px 0 4px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.17); border-radius: 10px; background: rgba(255,255,255,.08); }
.guide-location strong { color: white; font-size: 11px; }
.guide-location span { color: #cfc9e8; font-size: 9px; }
.pocket-flow { display: inline-flex; margin-top: 10px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 9px; color: white; background: rgba(255,255,255,.07); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.guide-hero-side { display: grid; place-content: center; gap: 9px; padding: 25px; background: rgba(255,255,255,.06); }
.guide-hero-side .button { min-width: 220px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card { padding: 19px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.guide-card h2 { margin-bottom: 12px; font-size: 14px; }
.guide-card ol, .guide-card ul { display: grid; gap: 10px; margin: 0; padding-left: 19px; color: var(--muted); font-size: 11px; }
.meeting-list { display: grid; gap: 10px; }
.meeting-card { display: grid; grid-template-columns: 115px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.meeting-time strong, .meeting-time span { display: block; }
.meeting-time strong { font-size: 12px; }
.meeting-time span { color: var(--muted); font-size: 9px; }
.meeting-main strong, .meeting-main span { display: block; }
.meeting-main span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.meeting-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.followup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.followup-card { padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.followup-card > header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.followup-card > header strong, .followup-card > header span { display: block; }
.followup-card > header div > span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.followup-template { min-height: 44px; margin: 12px 0; padding: 9px 10px; border-radius: 9px; color: var(--muted); background: #f7f6fa; font-size: 9px; line-height: 1.5; }
.followup-quick-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.followup-quick-form .button { align-self: end; }
.ops-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, .8fr); gap: 16px; align-items: start; }
.ops-main, .ops-side { display: grid; gap: 16px; }
.ops-entry-form { grid-template-columns: 1fr; }
.ops-entry-form > .button { grid-column: 1 / -1; }
.huddle-days details { border-bottom: 1px solid var(--line); }
.huddle-days details:last-child { border-bottom: 0; }
.huddle-days summary { padding: 11px 0; cursor: pointer; font-size: 11px; font-weight: 800; }
.huddle-list { display: grid; gap: 7px; padding: 0 0 12px; }
.huddle-row { display: grid; grid-template-columns: minmax(220px, 1fr) 85px minmax(120px, .65fr) 155px auto; gap: 7px; align-items: center; padding: 8px; border-radius: 9px; background: #f8f7fb; }
.huddle-row strong, .huddle-row span { display: block; }
.huddle-row strong { font-size: 9px; }
.huddle-row span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.huddle-row input, .huddle-row select, .account-plan-row input, .account-plan-row select { min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: white; font: inherit; font-size: 9px; }
.account-list { display: grid; gap: 7px; padding: 12px 16px 16px; }
.account-plan-row { display: grid; grid-template-columns: minmax(140px, 1fr) 65px 120px 110px minmax(140px, 1fr) auto auto; gap: 7px; align-items: center; }
.account-plan-row > div strong, .account-plan-row > div span { display: block; }
.account-plan-row > div strong { font-size: 10px; }
.account-plan-row > div span { color: var(--muted); font-size: 8px; }
.check-inline { display: flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 8px; }
.check-inline input { width: 14px; height: 14px; }
.compact-log { display: grid; gap: 8px; padding: 13px 16px 16px; }
.compact-log > div { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.compact-log > div:last-child { padding-bottom: 0; border: 0; }
.compact-log strong, .compact-log span { display: block; }
.compact-log strong { font-size: 9px; }
.compact-log span { margin-top: 2px; color: var(--muted); font-size: 8px; }
.mini-create { margin-top: 10px; border-top: 1px solid var(--line); }
.mini-create summary { padding: 10px 0 4px; cursor: pointer; color: var(--purple); font-size: 9px; font-weight: 800; }
.mini-create form { padding-top: 8px; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: 380px; padding: 11px 14px; border-radius: 10px; color: white; background: #27213f; box-shadow: 0 10px 30px rgba(20,15,45,.25); font-size: 11px; font-weight: 700; animation: toast-in .2s ease; }
.toast--success { background: #216f4a; }
.toast--error { background: #9f3045; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .guide-grid { grid-template-columns: 1fr 1fr; }
  .ops-grid { grid-template-columns: 1fr; }
  .account-plan-row { grid-template-columns: minmax(150px, 1fr) 65px 120px 110px; }
}

@media (min-width: 720px) and (max-width: 1180px) {
  .ops-entry-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .mobile-only { display: inline-grid !important; }
  body.nav-open { overflow: hidden; }
  .app-shell { display: block; }
  .sidebar { width: 272px; position: fixed; left: -292px; z-index: 70; transition: left .2s ease; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .sidebar.open { left: 0; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 60; border: 0; pointer-events: none; opacity: 0; background: rgba(17, 13, 38, .5); transition: opacity .2s ease; }
  .nav-scrim.open { pointer-events: auto; opacity: 1; }
  .topbar { height: 64px; gap: 11px; padding: 0 18px; }
  .global-search { min-width: 0; flex: 1; width: auto; }
  .global-search kbd, .topbar .button kbd { display: none; }
  .topbar-actions { gap: 8px; }
  #excel-export { min-width: 102px; padding: 0 11px; }
  #new-lead { min-width: 136px; padding: 0 13px; }
  #main { min-height: calc(100vh - 64px); padding: 20px 18px 90px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .guide-hero { grid-template-columns: 1fr; }
  .guide-hero-side { grid-template-columns: 1fr 1fr; }
  .meeting-card { grid-template-columns: 85px minmax(0,1fr); }
  .meeting-card > :last-child { grid-column: 2; }
  .modal--lead { width: min(880px, calc(100vw - 24px)); }
  .drawer-grid { grid-template-columns: 1fr; }
  .followup-grid { grid-template-columns: 1fr; }
  .account-plan-row { grid-template-columns: minmax(180px, 1fr) repeat(3, minmax(90px, .5fr)); }
}

@media (max-width: 880px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 27px 30px 36px; }
  .login-story-body { padding: 42px 0 5px; gap: 40px; }
  .login-copy, .capability-grid { max-width: 720px; }
  .login-card-wrap { min-height: auto; padding: 18px 30px 52px; }
  .login-card { width: min(560px, 100%); }
}

@media (min-width: 641px) and (max-height: 800px) {
  .scanner-preview { width: min(100%, 300px); }
}

@media (max-width: 640px) {
  .login-grid { opacity: .15; mask-image: linear-gradient(180deg, rgba(0,0,0,.68), transparent 70%); }
  .login-story { padding: 21px 18px 27px; }
  .login-wordmark { width: min(270px, 82%); }
  .login-story-body { padding: 29px 0 0; gap: 29px; }
  .login-copy h1 { margin-bottom: 14px; font-size: 34px; }
  .login-copy p { font-size: 14px; line-height: 1.55; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 12px; }
  .capability-grid strong { font-size: 15px; }
  .capability-grid span { font-size: 10px; }
  .login-card-wrap { padding: 8px 15px 34px; }
  .login-card { gap: 23px; padding: 25px 20px; border-radius: 20px; }
  .login-card h2 { font-size: 24px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 104px; padding: 14px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-actions { width: 100%; }
  .filterbar { flex-wrap: wrap; }
  .filterbar select { flex: 1; }
  .filterbar .filter-spacer { display: none; }
  .topbar { gap: 7px; padding: 0 10px; }
  .topbar .sync-state, #excel-export { display: none !important; }
  #new-lead { min-width: 44px; width: 44px; padding: 0; font-size: 0; }
  #new-lead span { font-size: 20px; }
  #main { padding-inline: 12px; }
  .modal { width: 100vw; max-width: none; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .modal--capture > form, .modal--small > form, .scanner-shell { max-height: 100dvh; height: 100dvh; }
  .modal-body { max-height: calc(100dvh - 180px); padding: 18px 17px; }
  .capture-body { max-height: none; padding: 12px; }
  .modal-head { padding: 18px 17px 14px; }
  .modal-actions { min-height: 70px; padding: 10px 12px; }
  .capture-save-hint, .modal-actions .modal-spacer { display: none; }
  #save-and-view, #save-and-next { min-width: 0; flex: 1; padding-inline: 10px; }
  .capture-primary, .capture-disclosure-body { padding: 14px; }
  .capture-section-heading p, .capture-disclosure > summary > span small { display: none; }
  .capture-disclosure > summary { padding-inline: 14px; }
  .capture-section-heading { align-items: center; }
  .capture-essential-actions { gap: 6px; }
  .button--scan { padding-inline: 10px; }
  .scanner-body { max-height: none; padding: 12px; }
  .form-grid--2, .form-grid--3, .capture-contact-pair, .quick-row, .score-edit-grid, .followup-quick-form, .account-plan-row { grid-template-columns: 1fr; }
  .huddle-row { grid-template-columns: minmax(0, 1fr) 105px; }
  .huddle-row input[name="issue_decision"] { grid-column: 1 / -1; }
  .huddle-row input[name="due_at"] { grid-column: 1; }
  .huddle-row .button { grid-column: 2; }
  .score-row { grid-template-columns: 1fr; }
  .choice-chips { flex-wrap: wrap; }
  .lead-drawer-head { padding: 17px; }
  .lead-title h2 { font-size: 19px; }
  .lead-drawer-body { max-height: calc(100dvh - 90px); padding: 16px; }
  .meeting-card-actions { align-items: stretch; flex-direction: column; }
  .meeting-card-actions .invite-action { width: 100%; }
  .drawer-actions .button span { display: none; }
  .ai-research-head { align-items: center; }
  .ai-research-head p { display: none; }
  .ai-research-head .button { flex: 0 0 auto; padding-inline: 10px; }
  .ai-summary-grid, .ai-brief-grid, .ai-more-grid { grid-template-columns: 1fr; }
  .ai-opening blockquote { font-size: 14px; }
  .ai-block-heading { flex-wrap: wrap; }
  .ai-advisory { align-items: flex-start; }
  .guide-hero-main { padding: 25px; }
  .guide-hero-side { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }
}

@media (pointer: coarse) {
  .button, .main-nav button, .field input, .field select, .choice-chip, .filterbar select, .filterbar input, .link-button { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; }
  .global-search input { height: 44px; }
  .score-buttons button { height: 44px; }
  .capture-disclosure > summary { min-height: 66px; }
  .source-list a, .ai-evidence-list a, .ai-adjacent-evidence a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 10px; }
  .huddle-days summary, .mini-create summary { min-height: 44px; display: flex; align-items: center; }
  .huddle-row input, .huddle-row select, .account-plan-row input, .account-plan-row select { height: 44px; }
  .lead-table td { padding-block: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
