@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 520;
  font-display: swap;
  src: url("/fonts/fraunces-520.woff2") format("woff2");
}
@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/outfit-400.woff2") format("woff2");
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/outfit-500.woff2") format("woff2");
}
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/outfit-600.woff2") format("woff2");
}

:root {
  --purple: #6939f0;
  --blue: #2793ff;
  --ink: #0e0c0a;
  --muted: #6d675f;
  --paper: #f7f5ef;
  --card: #fffcf8;
  --line: rgba(14, 12, 10, 0.12);
  --serif: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: Outfit, "Avenir Next", "Segoe UI", sans-serif;
  --radius: 4px;
  --shadow: 0 1px 0 rgba(14, 12, 10, 0.04), 0 18px 40px rgba(48, 28, 12, 0.05);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px;
  flex: none;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(12, 8, 32, 0.18), rgba(6, 16, 40, 0.28)),
    linear-gradient(168deg, #6939f0 0%, #3d63f6 55%, #2793ff 100%);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 560;
  letter-spacing: -0.02em;
  padding: 0 8px 28px;
}
.brand img { border-radius: 8px; display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 240ms ease, color 240ms ease;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.sidebar nav a.active { background: rgba(255, 255, 255, 0.18); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; }
.who { margin: 0; font-size: 13px; word-break: break-all; }
.role { margin: 4px 0 12px; color: rgba(255, 255, 255, 0.72); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.footlink { color: #fff; text-decoration: none; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.45); margin-right: 12px; }
.copy-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.copy-row .copy { margin: 0; flex: 1; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; letter-spacing: 0.04em; }
.signout {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  padding: 8px 12px;
  cursor: pointer;
  transition: background 240ms ease, border-color 240ms ease;
}
.signout:hover { background: rgba(255, 255, 255, 0.12); }

.main { flex: 1; min-width: 0; }
.page { padding: 48px 56px 80px; max-width: 1440px; }
.page.narrow { max-width: 720px; }
.kicker {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
h1, h2 { font-family: var(--serif); font-weight: 520; letter-spacing: -0.03em; }
h1 { font-size: 46px; line-height: 1.05; margin: 0; }
h2 { font-size: 28px; margin: 0 0 16px; }
h2 span { color: var(--muted); font-family: var(--sans); font-size: 14px; letter-spacing: 0; margin-left: 8px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.meta { margin: 8px 0 0; color: var(--muted); }
.lede { font-size: 18px; max-width: 38ch; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 8px;
  margin-bottom: 22px;
}
.panel .table-wrap { margin: 0 -22px; }
.banner {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--purple);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 18px;
}
.banner.warn { border-left-color: #9a3b2f; }
.empty { color: var(--muted); padding: 12px 0 20px; }
.empty-state { padding: 48px 36px 56px; }
.empty-state h2 { margin-bottom: 8px; }
.flag {
  display: inline-block;
  margin-left: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hint { color: var(--muted); margin-top: 0; }

.button, .button.secondary, .textlink, .open, .text-danger {
  transition: transform 240ms ease, filter 240ms ease, background 240ms ease, border-color 240ms ease;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(115deg, #6939f0 0%, #4866f8 100%);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 -1px 0 #2793ff;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.button:disabled { opacity: 0.6; transform: none; cursor: progress; }
.button.secondary, a.button.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.textlink, .open {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(105, 57, 240, 0.45);
  padding-bottom: 1px;
}
.textlink:hover, .open:hover { border-bottom-color: var(--blue); }
.text-danger {
  background: none;
  border: 0;
  padding: 0;
  color: #7a3a32;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.button-row, .export-row, .client-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 18px; }

.toolbar, .upload-form, .inline-form, .stack { display: flex; flex-wrap: wrap; gap: 14px 16px; align-items: flex-end; margin-bottom: 22px; }
.stack { flex-direction: column; align-items: stretch; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); min-width: 160px; }
.stack label, .upload-form label { min-width: 0; }
input, select, textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 8px 12px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 240ms ease, box-shadow 240ms ease;
}
textarea { min-height: 88px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: rgba(105, 57, 240, 0.45); }
.checkline { flex-direction: row; align-items: center; text-transform: none; letter-spacing: 0; font-size: 14px; min-width: 0; gap: 8px; }
.checkline input { min-height: 0; }
.copy { width: 100%; margin-bottom: 12px; }

.upload { margin-left: auto; }
.upload summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: linear-gradient(115deg, #6939f0 0%, #4866f8 100%);
  color: #fff;
  box-shadow: inset 0 -1px 0 #2793ff;
}
.upload summary::-webkit-details-marker { display: none; }
.upload-form {
  margin-top: 16px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
tbody tr { transition: background 200ms ease; }
tbody tr:hover { background: rgba(105, 57, 240, 0.035); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num span { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.name { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.rowlink { text-decoration: none; border-bottom: 1px solid transparent; }
.rowlink:hover { border-bottom-color: var(--purple); }
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.status.approved { border-color: rgba(105, 57, 240, 0.35); color: #3d2a9a; }
.status.waiting { color: var(--muted); }
.check { width: 44px; }
.check input { width: 16px; height: 16px; accent-color: #6939f0; }
.icon-link {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: #4866f8;
}
.icon-link svg { width: 18px; height: 18px; fill: currentColor; }
tfoot td { font-weight: 600; border-bottom: 0; }
.client-card { padding-bottom: 22px; }
.admin-tools { padding-bottom: 18px; }

.savebar {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  padding: 14px 18px;
  background: rgba(255, 252, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(40, 24, 10, 0.08);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.savebar p { margin: 0; }
.save-actions { display: flex; align-items: center; gap: 14px; }
#save-status { color: var(--muted); min-width: 4.5rem; text-align: right; }

.login {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(380px, 0.85fr);
  overflow: hidden;
  color: #fff;
  background: #0b0826;
}
.login-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: linear-gradient(135deg, #1b0c52 0%, #2b1b97 38%, #1f45c0 72%, #1368d6 100%); }
.login-bg .orb { position: absolute; border-radius: 50%; filter: blur(90px); will-change: transform; }
.login-bg .o1 { width: 62vmax; height: 62vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle at 40% 40%, #9a6bff 0%, rgba(122, 77, 255, 0) 68%); opacity: 0.9; animation: drift-a 34s ease-in-out infinite alternate; }
.login-bg .o2 { width: 58vmax; height: 58vmax; right: -16vmax; bottom: -24vmax; background: radial-gradient(circle at 50% 50%, #2f9bff 0%, rgba(39, 147, 255, 0) 66%); opacity: 0.85; animation: drift-b 40s ease-in-out infinite alternate; }
.login-bg .o3 { width: 46vmax; height: 46vmax; left: 22%; top: 18%; background: radial-gradient(circle, #5b3df0 0%, rgba(91, 61, 240, 0) 64%); opacity: 0.7; animation: drift-c 46s ease-in-out infinite alternate; }
.login-bg .o4 { width: 30vmax; height: 30vmax; right: 18%; top: -8vmax; background: radial-gradient(circle, #7fb8ff 0%, rgba(127, 184, 255, 0) 66%); opacity: 0.38; animation: drift-a 52s ease-in-out infinite alternate-reverse; }
.login-bg .grain {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(8, 6, 40, 0) 38%, rgba(6, 4, 30, 0.55) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 120px);
}
@keyframes drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(9vmax, 7vmax, 0) scale(1.12); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0) scale(1.05); } to { transform: translate3d(-10vmax, -6vmax, 0) scale(0.94); } }
@keyframes drift-c { from { transform: translate3d(-6vmax, 4vmax, 0) scale(0.95); } to { transform: translate3d(8vmax, -5vmax, 0) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .login-bg .orb { animation: none; } }
.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px clamp(40px, 6vw, 104px);
  color: #fff;
}
.login-brand h1 {
  font-size: clamp(56px, 7.2vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 520;
  max-width: 9.5ch;
  text-shadow: 0 8px 60px rgba(10, 6, 60, 0.35);
}
.brand-rule { display: block; width: 112px; height: 2px; margin-top: 44px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)); }
.login-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 64px clamp(32px, 5vw, 88px);
}
.glass {
  position: relative;
  width: min(440px, 100%);
  padding: 52px 46px 46px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  box-shadow: 0 40px 90px -24px rgba(4, 2, 40, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.glass::before { content: ""; position: absolute; inset: -16px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 30px; pointer-events: none; }
.login-mark { display: block; width: 104px; height: 104px; border-radius: 26px; margin-bottom: 34px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.45), 0 22px 60px -10px rgba(140, 94, 255, 0.85); }
.login-panel h2 { font-size: 42px; margin-bottom: 26px; color: #fff; }
.login-panel .meta { color: rgba(255, 255, 255, 0.72); margin: -14px 0 22px; }
.login-panel .stack { max-width: none; margin-bottom: 0; gap: 20px; }
.login-panel label { color: rgba(255, 255, 255, 0.72); }
.login-panel input {
  min-height: 52px;
  border-radius: 12px;
  background: rgba(10, 8, 52, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #fff;
  padding: 10px 16px;
}
.login-panel input:hover { border-color: rgba(255, 255, 255, 0.5); }
.login-panel input:focus { outline: none; border-color: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 4px rgba(150, 120, 255, 0.35); }
.login-panel input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: #fff; box-shadow: 0 0 0 100px rgba(36, 28, 122, 0.95) inset; border-color: rgba(255, 255, 255, 0.4); }
.login-panel .button {
  margin-top: 10px;
  min-height: 54px;
  border-radius: 12px;
  font-weight: 560;
  letter-spacing: 0.05em;
  background: linear-gradient(115deg, #8a5cff 0%, #4a6dff 55%, #2f9bff 100%);
  box-shadow: 0 16px 40px -12px rgba(88, 110, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.login-panel .banner { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); color: #fff; border-radius: 12px; }
.login-panel .banner.warn { border-left-color: #ffb4a8; }

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar {
    width: 100%;
    height: auto;
    position: sticky;
    z-index: 10;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 12px 16px;
  }
  .brand { padding: 0; }
  .sidebar nav { flex-direction: row; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; display: flex; align-items: center; gap: 10px; }
  .role { display: none; }
  .who { display: none; }
  .page { padding: 28px 16px 96px; }
  h1 { font-size: 34px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .upload { margin-left: 0; }
  .login { grid-template-columns: 1fr; }
  .login-brand { min-height: 34vh; padding: 56px 28px 16px; }
  .login-brand h1 { font-size: 48px; }
  .brand-rule { margin-top: 24px; }
  .login-panel { padding: 24px 24px 64px; }
  .glass { padding: 40px 28px 34px; }
  .savebar { flex-direction: column; align-items: stretch; }
  .save-actions { justify-content: space-between; }
}


/* ---- v3: refined inner pages ---- */
:root {
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(28, 20, 70, 0.05), 0 18px 44px -18px rgba(44, 32, 110, 0.16);
}
body { background: radial-gradient(1100px 520px at 88% -8%, rgba(105, 57, 240, 0.055), transparent 70%), var(--paper); }
.sidebar {
  background:
    radial-gradient(420px 320px at 12% -6%, rgba(190, 160, 255, 0.38), transparent 70%),
    radial-gradient(360px 300px at 110% 105%, rgba(70, 170, 255, 0.4), transparent 70%),
    linear-gradient(180deg, rgba(14, 8, 44, 0.16), rgba(6, 14, 46, 0.3)),
    linear-gradient(170deg, #6a3cf1 0%, #3b5df4 56%, #2490fb 100%);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.1) inset, 14px 0 44px -22px rgba(36, 24, 110, 0.5);
}
.brand img { border-radius: 10px; box-shadow: 0 6px 20px -6px rgba(10, 6, 60, 0.6); }
.sidebar nav a { border-radius: 10px; font-size: 14.5px; padding: 10px 14px; }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.1)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.signout { border-radius: 10px; }
.page { padding: 56px 64px 96px; }
h1 { font-size: 44px; }
.page-head { margin-bottom: 32px; }
.kicker { letter-spacing: 0.2em; }
.panel { border-radius: var(--radius-lg); border-color: rgba(28, 20, 70, 0.08); padding: 26px 26px 10px; margin-bottom: 24px; }
.panel .table-wrap { margin: 0 -26px; }
.banner { border-radius: var(--radius); border-color: rgba(28, 20, 70, 0.08); box-shadow: 0 8px 24px -16px rgba(44, 32, 110, 0.18); }
.button {
  border-radius: var(--radius);
  background: linear-gradient(115deg, #7442f2 0%, #4a6bf8 55%, #2f93fb 100%);
  box-shadow: 0 8px 22px -10px rgba(72, 102, 248, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.button:hover { filter: brightness(1.06); box-shadow: 0 12px 28px -10px rgba(72, 102, 248, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.button.secondary, a.button.secondary { background: #fff; border: 1px solid rgba(28, 20, 70, 0.14); box-shadow: 0 1px 2px rgba(28, 20, 70, 0.05); }
.button.secondary:hover, a.button.secondary:hover { border-color: rgba(105, 57, 240, 0.5); filter: none; box-shadow: 0 6px 16px -10px rgba(72, 102, 248, 0.5); }
.upload summary { border-radius: var(--radius); background: linear-gradient(115deg, #7442f2 0%, #4a6bf8 55%, #2f93fb 100%); box-shadow: 0 8px 22px -10px rgba(72, 102, 248, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28); }
.upload-form { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
input, select, textarea { border-radius: var(--radius); border-color: rgba(28, 20, 70, 0.13); box-shadow: 0 1px 2px rgba(28, 20, 70, 0.03) inset; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(105, 57, 240, 0.7); box-shadow: 0 0 0 4px rgba(105, 57, 240, 0.14); }

/* tables */
.table-wrap { max-height: min(72vh, 820px); overflow: auto; }
table { font-size: 14px; }
th, td { padding: 14px 16px; border-bottom: 1px solid rgba(28, 20, 70, 0.07); }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  box-shadow: 0 1px 0 rgba(28, 20, 70, 0.1);
}
tbody tr:hover { background: linear-gradient(90deg, rgba(105, 57, 240, 0.055), rgba(39, 147, 255, 0.045)); }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { background: rgba(105, 57, 240, 0.04); border-top: 1px solid rgba(28, 20, 70, 0.1); }

/* checkboxes */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border-radius: 6px;
  border: 1.5px solid rgba(28, 20, 70, 0.28);
  background: #fff;
  cursor: pointer;
  box-shadow: none;
  vertical-align: middle;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
input[type="checkbox"]:hover { border-color: rgba(105, 57, 240, 0.7); }
input[type="checkbox"]:checked, input[type="checkbox"]:indeterminate {
  border-color: transparent;
  background: linear-gradient(135deg, #7442f2, #3f7bfa);
  box-shadow: 0 4px 10px -4px rgba(72, 102, 248, 0.8);
}
input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 4px;
  height: 8.5px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
input[type="checkbox"]:indeterminate::after { content: ""; position: absolute; left: 4px; right: 4px; top: 7.5px; height: 2px; background: #fff; border-radius: 1px; }
.check input { width: 18px; height: 18px; }

/* pills */
.status {
  border-radius: 999px;
  min-height: 26px;
  padding: 0 12px;
  border: 0;
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.08em;
  background: rgba(28, 20, 70, 0.06);
  color: #5d5873;
}
.status.approved { background: linear-gradient(115deg, rgba(116, 66, 242, 0.14), rgba(47, 147, 251, 0.14)); color: #3a2a9c; }
.status.waiting { background: rgba(28, 20, 70, 0.06); color: #6d675f; }
.flag {
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(105, 57, 240, 0.1);
  color: #5a3bd0;
  font-size: 10px;
  font-weight: 560;
}
.savebar { border-radius: var(--radius-lg); box-shadow: 0 18px 50px -18px rgba(44, 32, 110, 0.3); }
.name { gap: 10px; }
.client-card header { margin-bottom: 6px; }

/* v3 spacing fixes */
.page { padding: 52px 56px 96px; }
th, td { padding: 13px 12px; }
td:first-child, th:first-child { padding-left: 16px; }
td:last-child, th:last-child { padding-right: 16px; }
.table-wrap td:first-child { white-space: nowrap; }
.table-wrap th { letter-spacing: 0.1em; }
.client-card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 14px; padding-bottom: 26px; }
.client-card > * { margin: 0; }
.client-card > header, .client-card > .client-actions, .client-card > .stack, .client-card > a.text-danger { flex: 0 0 100%; }
.client-card header h2 { margin-bottom: 6px; }
.client-card .client-actions { margin: 0; }
.client-card .inline-form, .client-card form { margin-bottom: 0; }
.client-card .stack .button { align-self: flex-start; }
.client-card .stack textarea { max-width: 560px; }

/* save confirmation */
.save-toast { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; padding: 0 24px 104px; pointer-events: none; animation: toast-in 380ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.save-toast-card {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 620px;
  padding: 22px 26px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(120deg, rgba(88, 52, 220, 0.96), rgba(40, 104, 245, 0.96));
  box-shadow: 0 30px 70px -20px rgba(36, 28, 120, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.save-toast.error .save-toast-card { background: linear-gradient(120deg, #7a2f3a, #a2403f); }
.save-toast-card strong { display: block; font-family: var(--serif); font-weight: 520; font-size: 24px; letter-spacing: -0.02em; }
.save-toast-card p { margin: 4px 0 0; color: rgba(255, 255, 255, 0.84); font-size: 14px; }
.save-toast-mark { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); }
.save-toast-mark::after { content: ""; position: absolute; left: 16px; top: 10px; width: 9px; height: 18px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.save-toast-close { flex: none; border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12); color: #fff; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.save-toast-close:hover { background: rgba(255, 255, 255, 0.22); }
@keyframes toast-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
#save-status { color: #3a2a9c; font-weight: 500; }

/* admin export */
.export-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; padding: 26px 28px; margin-bottom: 24px; border-radius: var(--radius-lg); border: 1px solid rgba(105, 57, 240, 0.2); background: linear-gradient(120deg, rgba(116, 66, 242, 0.08), rgba(47, 147, 251, 0.08)), var(--card); box-shadow: var(--shadow); }
.export-card h2 { margin: 0; }
.export-card .export-row { margin: 0; }
.export-card .button { min-height: 48px; padding: 0 22px; }
.row-actions { white-space: nowrap; }
.row-actions .open { margin-right: 12px; }
.pill-link { display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; margin-right: 6px; border-radius: 999px; font-size: 12px; font-weight: 560; text-decoration: none; color: #3a2a9c; background: linear-gradient(115deg, rgba(116, 66, 242, 0.14), rgba(47, 147, 251, 0.14)); transition: filter 200ms ease; }
.pill-link:hover { filter: brightness(0.94); }

/* report charts */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 20px;
}
.kpi {
  background: var(--card);
  border: 1px solid rgba(28, 20, 70, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
  min-width: 0;
}
.kpi-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.kpi-value {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 520;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.kpi-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  min-height: 1.3em;
}
.kpi .spark { display: block; width: 100%; height: 36px; margin-top: 12px; }
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
  align-items: start;
}
.chart-panel {
  background: var(--card);
  border: 1px solid rgba(28, 20, 70, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 28px 24px;
  min-width: 0;
}
.chart-panel.wide { grid-column: 1 / -1; }
.chart-panel h2 { margin: 0; }
.chart-panel .meta { margin: 6px 0 0; }
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 13px;
}
.chart-legend .swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 3px;
  vertical-align: -1px;
}
.chart-legend .swatch.sent { background: linear-gradient(180deg, #7a4cf4, #3d7af8); }
.chart-legend .swatch.replies { background: #1e7ef0; border-radius: 50%; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-svg text { font-family: var(--sans); fill: var(--ink); }
.chart-svg .tick { font-size: 11px; fill: var(--muted); }
.chart-svg .axis-x { font-size: 12px; fill: var(--muted); }
.chart-svg .bar-label { font-size: 11px; font-weight: 560; fill: #3a2a9c; }
.chart-svg .bar-label.reply { fill: #155fbe; stroke: #fffcf8; stroke-width: 4px; paint-order: stroke; stroke-linejoin: round; }
.chart-svg .funnel-label { font-size: 13px; fill: var(--ink); }
.chart-svg .funnel-value { font-size: 13px; font-weight: 560; fill: #3a2a9c; }
.funnel-svg { margin-top: 22px; }
.rate-svg { margin-top: 14px; }
@media (max-width: 1180px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .charts-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
}

/* report charts: six tiles and bar percentages */
.kpi-row { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 18px 16px 14px; }
.kpi-value { font-size: 28px; }
.kpi-meta { font-size: 12px; line-height: 1.35; }
.chart-svg .funnel-onbar { font-size: 11px; font-weight: 600; fill: #fff; }
.profile-break { margin: 8px 0 28px; }
.profile-break h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 520; font-size: 22px; letter-spacing: -0.02em; }
.profile-break .meta { margin: 0 0 12px; }
.profile-break .table-wrap { margin: 0; border: 1px solid rgba(28, 20, 70, 0.08); border-radius: 12px; }
a.sortlink { color: inherit; text-decoration: none; border-bottom: 1px solid transparent; }
a.sortlink:hover { border-bottom-color: var(--purple); }
@media (max-width: 1400px) {
  .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-row { grid-template-columns: 1fr 1fr; }
}

/* SmartData: calm, spacious surfaces */
.sd-page { max-width: 1240px; --sd-ink: #1a1625; --sd-soft: #f4f1fb; --sd-line: rgba(28, 20, 70, 0.07); }
.sd-page .page-head { margin-bottom: 8px; }
.sd-page .lede { font-size: 17px; color: var(--muted); max-width: 62ch; margin: 0 0 30px; line-height: 1.6; }
.sd-page .kicker { margin-bottom: 14px; }
.sd-page .meta { color: var(--muted); font-size: 13.5px; margin: 6px 0; }
.sd-page .muted { color: #a29cb2; }
.sd-page .banner { background: #fff; border: 0; border-left: 3px solid #8a5cff; border-radius: 14px; padding: 16px 20px; margin: 0 0 22px; box-shadow: 0 14px 34px -22px rgba(44, 32, 110, 0.28); animation: sd-rise 420ms ease both; }
.sd-page .banner.warn { border-left-color: #c2594a; }
.card { background: #fff; border-radius: 22px; padding: 38px 44px; margin: 0 0 28px; box-shadow: 0 1px 2px rgba(28, 20, 70, 0.04), 0 28px 60px -34px rgba(44, 32, 110, 0.22); border: 0; animation: sd-rise 520ms ease both; }
.card h2 { font-family: var(--serif); font-weight: 520; font-size: 24px; margin: 0 0 6px; letter-spacing: -0.01em; }
.card.quiet { background: rgba(255, 255, 255, 0.55); box-shadow: none; padding: 26px 36px; }
.card.quiet h2 { font-size: 17px; }
.card .stack { margin-bottom: 0; }
@keyframes sd-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .sd-page .banner, .sd-bar { animation: none !important; transition: none !important; } }

.subtabs { display: flex; gap: 28px; margin: 6px 0 30px; border: 0; }
.subtabs a { text-decoration: none; padding: 6px 0 10px; font-size: 14.5px; color: var(--muted); border-bottom: 2px solid transparent; transition: color 200ms ease, border-color 200ms ease; }
.subtabs a.active { color: var(--sd-ink); border-bottom-color: #7442f2; }
.subtabs a:hover { color: var(--sd-ink); }

.sd-page input:not([type="checkbox"]), .sd-page select, .sd-page textarea { background: var(--sd-soft); border: 1px solid transparent; border-radius: 14px; min-height: 48px; padding: 10px 16px; font-size: 15px; width: 100%; transition: background 220ms ease, box-shadow 220ms ease; }
.sd-page textarea { min-height: 84px; line-height: 1.5; }
.sd-page input:hover, .sd-page select:hover, .sd-page textarea:hover { border-color: transparent; background: #efeafa; }
.sd-page input:focus, .sd-page select:focus, .sd-page textarea:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px rgba(116, 66, 242, 0.5), 0 10px 26px -14px rgba(72, 102, 248, 0.5); }
.sd-page label, .sd-page .field-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #7a7490; font-weight: 500; }
.sd-page .field { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.sd-page .field-label { display: block; }
.sd-page label.inline { flex-direction: row; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--sd-ink); min-width: 0; font-weight: 400; }
.sd-page label.inline.small { font-size: 13px; }
.sd-page .hint { font-size: 12.5px; color: #8b8599; text-transform: none; letter-spacing: 0; line-height: 1.5; font-weight: 400; }
.sd-page .inline-pair { display: flex; gap: 18px; flex-wrap: wrap; }
.sd-page .inline-pair label { flex: 1; min-width: 190px; }
.sd-page .inline-form { margin: 14px 0 6px; }
.sd-page .inline-form input { width: auto; min-width: 100px; }

.sd-sec { padding: 0 0 36px; margin: 0 0 36px; border-bottom: 1px solid var(--sd-line); }
.sd-sec h2 { font-size: 22px; margin-bottom: 22px; }
.sd-sec:last-of-type { border-bottom: 0; }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 32px; }
.sd-grid .wide, .sd-grid > .wide { grid-column: span 2; }
.sd-presets { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 32px; }
.sd-presets .field-label { margin-right: 4px; }
.pill { font: inherit; font-size: 13.5px; padding: 8px 16px; border-radius: 999px; border: 0; background: var(--sd-soft); color: #3d2a9a; cursor: pointer; transition: background 200ms ease, transform 200ms ease, box-shadow 200ms ease; }
.pill:hover { background: #e8e0fb; transform: translateY(-1px); }
.pill.ghost { background: transparent; color: var(--muted); }
.pill.active { background: linear-gradient(115deg, #7442f2, #3f7bfa); color: #fff; box-shadow: 0 10px 22px -12px rgba(72, 102, 248, 0.8); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { flex-direction: row; min-width: 0; text-transform: none !important; letter-spacing: 0 !important; font-size: 13.5px !important; color: var(--sd-ink) !important; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px !important; min-height: 0 !important; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; background: var(--sd-soft); transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease; }
.chip:hover span { background: #e8e0fb; }
.chip input:checked + span { background: linear-gradient(115deg, #7442f2, #3f7bfa); color: #fff; box-shadow: 0 10px 22px -12px rgba(72, 102, 248, 0.8); }
.chip input:focus-visible + span { outline: 2px solid #7442f2; outline-offset: 2px; }

/* searchable multi-select */
.ms { position: relative; }
.ms:not(.ms-ready) { min-height: 48px; background: var(--sd-soft); border-radius: 14px; }
.ms-box { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 48px; padding: 7px 14px; background: var(--sd-soft); border-radius: 14px; cursor: text; transition: background 220ms ease, box-shadow 220ms ease; }
.ms:hover .ms-box { background: #efeafa; }
.ms.open .ms-box, .ms-box:focus-within { background: #fff; box-shadow: 0 0 0 2px rgba(116, 66, 242, 0.5), 0 10px 26px -14px rgba(72, 102, 248, 0.5); }
.ms-chips { display: contents; }
.ms-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; border-radius: 999px; background: linear-gradient(115deg, rgba(116, 66, 242, 0.14), rgba(47, 147, 251, 0.14)); color: #3a2a9c; font-size: 13.5px; animation: sd-pop 220ms ease both; }
.ms-chip button { all: unset; cursor: pointer; width: 20px; height: 20px; line-height: 19px; text-align: center; border-radius: 50%; color: #6a58c4; font-size: 16px; transition: background 160ms ease; }
.ms-chip button:hover { background: rgba(58, 42, 156, 0.16); }
@keyframes sd-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.sd-page .ms-input { flex: 1; min-width: 140px; width: auto !important; min-height: 32px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 4px 2px !important; border-radius: 0 !important; }
.ms-toggle { all: unset; width: 22px; height: 22px; cursor: pointer; opacity: 0.45; background: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236d675f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ms-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 8px); max-height: 280px; overflow: auto; background: #fff; border-radius: 16px; padding: 8px; box-shadow: 0 30px 60px -20px rgba(44, 32, 110, 0.35), 0 0 0 1px rgba(28, 20, 70, 0.05); animation: sd-rise 180ms ease both; }
.ms-opt { padding: 10px 14px; border-radius: 10px; font-size: 14.5px; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--sd-ink); }
.ms-opt:hover, .ms-opt.on { background: var(--sd-soft); color: #3a2a9c; }
.ms-none { padding: 12px 14px; color: #9a94a8; font-size: 13.5px; }
.ms-hidden { display: none; }
.sig[hidden] { display: none; }
.sig { padding: 20px 22px; background: rgba(244, 241, 251, 0.6); border-radius: 16px; }

.sd-foot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 28px; padding-top: 8px; }
.sd-foot .num-field { min-width: 0; width: 160px; display: flex; flex-direction: column; gap: 9px; }
.sd-foot label.inline { padding-bottom: 12px; }
.sd-foot .button { margin-left: auto; min-width: 170px; min-height: 50px; border-radius: 14px; }
.sd-form > .hint { margin: 22px 0 0; }
.button { border-radius: 14px; }
.button.busy { opacity: 0.7; }

/* admin settings drawer */
.sd-admin { padding: 8px 44px; }
.sd-admin summary { list-style: none; cursor: pointer; padding: 22px 0; font-family: var(--serif); font-size: 19px; display: flex; justify-content: space-between; align-items: center; color: var(--sd-ink); }
.sd-admin summary::-webkit-details-marker { display: none; }
.sd-admin summary::after { content: "+"; font-size: 22px; color: var(--muted); transition: transform 200ms ease; }
.sd-admin details[open] summary::after { transform: rotate(45deg); }
.sd-admin-body { display: grid; gap: 34px; padding: 4px 0 30px; }
.sd-admin-body h3 { font-size: 15px; margin: 0 0 4px; font-weight: 560; }
.sd-empty { text-align: center; padding: 70px 40px; }
.sd-empty h2 { font-size: 30px; }

/* clean tables */
table.clean th { background: transparent; box-shadow: none; font-size: 11px; letter-spacing: 0.12em; color: #8b8599; font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--sd-line); }
table.clean td { padding: 18px 16px; border-bottom: 1px solid rgba(28, 20, 70, 0.045); vertical-align: top; font-size: 14.5px; }
table.clean tbody tr { transition: background 180ms ease; }
table.clean tbody tr:hover { background: rgba(116, 66, 242, 0.045); }
table.clean tbody tr.is-picked { background: rgba(116, 66, 242, 0.085); }
table.clean tbody tr.is-saved { opacity: 0.55; }
.table-card { padding: 22px 12px 14px; }
.table-card .table-wrap { margin: 0; max-height: none; overflow-x: auto; }
.sd-table td.pick, .sd-table th.pick { width: 54px; padding-left: 26px; }
.sd-table td.wrap { min-width: 220px; max-width: 320px; }
.sd-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.who-name { display: block; font-weight: 520; color: var(--sd-ink); }
.sub-link { display: block; font-size: 12.5px; color: #6a58c4; text-decoration: none; margin-top: 2px; }
.sub-link:hover { text-decoration: underline; }
.sig-line { display: block; font-size: 13px; color: #7a7490; margin-top: 3px; line-height: 1.45; }
.sig-line b { color: #4b4560; font-weight: 520; margin-right: 4px; }
.verdict { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 11.5px; letter-spacing: 0.06em; font-weight: 560; }
.v-match { background: rgba(116, 66, 242, 0.14); color: #3a2a9c; }
.v-no_match { background: rgba(194, 89, 74, 0.12); color: #96382b; }
.v-unknown, .v-unchecked { background: rgba(28, 20, 70, 0.06); color: #6d675f; }
.vfilter { display: flex; gap: 10px; padding: 8px 26px 18px; flex-wrap: wrap; }
.status-cell { width: 90px; }

/* sticky action bar */
.sd-results-wrap { position: relative; }
.sd-bar { position: sticky; bottom: 22px; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 8px; padding: 16px 24px; border-radius: 22px; background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 30px 70px -24px rgba(44, 32, 110, 0.45), 0 0 0 1px rgba(28, 20, 70, 0.05); opacity: 1; transform: none; pointer-events: auto; }
.sd-bar.show { opacity: 1; transform: none; pointer-events: auto; }
.sd-bar .bar-hint { color: var(--muted, #6b6780); font-size: 13px; }
.sd-bar:not(.is-idle) .bar-hint { display: none; }
.sd-bar button:disabled, .sd-bar .button:disabled { opacity: 0.45; cursor: not-allowed; }
.company-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.company-link:hover { color: var(--accent, #4f46e5); }
tr.highlight td { background: #f4f0ff; box-shadow: inset 3px 0 0 #6d5ae6; }
.page-head-actions { display: flex; align-items: center; gap: 16px; }
.bar-left, .bar-right { display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
.bar-count { font-size: 15px; color: var(--sd-ink); }
.bar-count strong { font-family: var(--serif); font-size: 24px; font-weight: 520; margin-right: 4px; }
.linkish { all: unset; cursor: pointer; font-size: 13.5px; color: #5a3bd0; }
.linkish:hover { text-decoration: underline; }
.bar-field { flex-direction: row !important; align-items: center; gap: 10px !important; min-width: 0 !important; }
.sd-bar select { width: auto !important; min-width: 190px; min-height: 42px !important; }
.sd-bar input#sd-listname { width: 200px !important; min-height: 42px !important; }
.sd-bar input[hidden] { display: none; }
.sd-bar .button { min-height: 44px; padding: 0 20px; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 14px 46px; margin: 0 0 22px; padding: 0 2px; }
.stat-strip span { display: block; font-family: var(--serif); font-size: 30px; line-height: 1.1; color: var(--sd-ink); }
.stat-strip label { margin-top: 4px; font-size: 11px; min-width: 0; }
.sd-page .export-card { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.sd-page .table-wrap { max-height: none; }
.sd-page td.row-actions form { margin: 0; }
.sd-page .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.sd-page .two-col .card { margin-bottom: 0; }
.sd-page .toolbar { margin: 8px 0 22px; }
.sd-page .toolbar input, .sd-page .toolbar select { min-width: 220px; width: auto; }
td.research { min-width: 320px; max-width: 460px; white-space: normal; font-size: 13px; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .sd-grid { grid-template-columns: 1fr; } .sd-grid .wide { grid-column: auto; } .card { padding: 26px 22px; } .sd-page .two-col { grid-template-columns: 1fr; } }

/* SmartData spacing refinements */
.page.sd-page { max-width: 1380px; padding: 52px 44px 120px; }
.sd-table th, .sd-table td { padding-left: 12px; padding-right: 12px; }
.sd-table .who-name { white-space: nowrap; }
.sd-table td.num, .sd-table th.num { white-space: nowrap; }
.sd-table td:nth-child(3) { min-width: 130px; }
.sd-table td:nth-child(4) { min-width: 170px; }
.sd-table td:nth-child(5) { min-width: 110px; }
.sd-bar { padding: 14px 22px; gap: 10px 20px; }
.sd-bar label.inline.small { white-space: nowrap; }
.sd-bar select { min-width: 150px; max-width: 220px; }
.sd-bar input#sd-listname { width: 180px !important; }

.retry-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 6px; }
.retry-form { margin: 0; }
.retry-form .button { min-height: 42px; }
.review-summary .filter-link, button.filter-link { all: unset; cursor: pointer; color: #5a3bd0; text-decoration: underline; text-underline-offset: 3px; }
.review-summary .filter-link:hover { color: #3a2a9c; }
.empty-filter { text-align: center; padding: 28px 16px 12px; color: #7a7490; }
.saved-row, .saved-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; }
.saved-head { align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.saved-load { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; flex: 1; min-width: 240px; }
.saved-name { min-width: 220px; flex: 1; }
.sd-page .button.danger-quiet { color: #96382b; }
.vfilter .only-full { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--sd-ink, #1a1625); }

.match-used { margin: 0 0 10px; font-size: 0.95rem; font-weight: 600; color: #1e1b4b; }

.criteria-sum { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin: 0 0 16px; }
.criteria-sum h2 { margin: 0 0 6px; font-size: 1.05rem; }
.criteria-sum .button { flex: 0 0 auto; }
.sd-progress { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: #eef2ff; color: #1e1b4b; }
.sd-progress.hidden { display: none; }
.busy-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #4338ca; margin-right: 6px; animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.sd-contacts { border: 0; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; }
.sd-contacts legend { font-size: 15px; font-weight: 600; margin: 0 16px 0 0; padding: 0; }
.sd-contacts .hint { flex: 1 1 100%; margin: 4px 0 0; }

/* Saved searches card: one aligned row, equal 44px controls */
.sd-saved .saved-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.sd-saved .saved-row .field.grow { flex: 1 1 280px; min-width: 240px; margin: 0; display: flex; align-items: center; }
.sd-saved .saved-row select, .sd-saved .saved-row input, .sd-saved .saved-row .button { height: 44px; min-height: 44px; box-sizing: border-box; margin: 0; }
.sd-saved .saved-row select { width: 100%; }
.sd-saved .saved-row .button { display: inline-flex; align-items: center; justify-content: center; padding-top: 0; padding-bottom: 0; white-space: nowrap; }
.sd-saved .saved-row .inline-form { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin: 0; }
.sd-saved .saved-row .inline-form input { width: 190px; min-width: 150px; }
.company-link.no-site { text-decoration-style: dotted; }

/* empty state + match chip (4:25 PM) */
.match-chip { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: #eef0ff; color: #312e81; font-size: 0.82rem; font-weight: 600; }
.sd-empty { padding: 44px 32px; }
.sd-empty h2 { font-size: 24px; margin: 0 0 8px; }
.sd-empty .meta { margin: 0 auto; max-width: 520px; }
.search-details { margin: 6px 0 14px; font-size: 0.9rem; color: #6b7280; }
.search-details summary { cursor: pointer; color: #6b7280; width: fit-content; }
.search-details p { margin: 6px 0 0; }
.run-stamp { margin: 18px 0 0; font-size: 0.85rem; }

/* activity chart: calm axes, hover tooltips instead of crowded labels */
.chart-svg .tick { font-size: 11px; }
.chart-svg .axis-x { font-size: 11px; fill: #6b6788; }
.chart-svg .axis-title { font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.chart-svg .bar-label { font-size: 10.5px; fill: #4b4770; }
.chart-svg .bar-group:hover .sent-bar { opacity: 1; }
.chart-svg .bar-group:hover rect:first-of-type { fill: rgba(105, 57, 240, 0.05); }
