:root {
  color-scheme: light;
  --navy:#132943; --navy-deep:#0d2037; --ink:#142941; --muted:#51637b;
  --line:#dbe3ed; --canvas:#f3f6fa; --blue:#1856ad; --blue-dark:#15478c;
  --white:#fff; --green:#087454; --amber:#8b560a;
  font-family:"Inter", "Segoe UI", system-ui, sans-serif;
  color:var(--ink); background:var(--canvas); font-synthesis:none;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; min-width:280px; }
button,input,select { font:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.55; cursor:default; }
button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible { outline:3px solid #4a8ade; outline-offset:3px; }
h1,h2,h3,p { margin:0; }
small { font-size:.84rem; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.auth { min-height:100svh; display:grid; grid-template-columns:minmax(320px, .95fr) minmax(380px, 1.05fr); background:white; }
.brand-side { position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:68px; overflow:hidden; padding:clamp(32px,6vw,86px); color:white; background:linear-gradient(155deg,#142e4b 0%,#0d2037 78%); }
.brand-side::after { content:""; position:absolute; inset:auto -230px -395px auto; width:720px; aspect-ratio:1; border:1px solid #91b9df24; border-radius:50%; box-shadow:0 0 0 55px #91b9df12,0 0 0 110px #91b9df10,0 0 0 165px #91b9df0c; pointer-events:none; }
.brand-side > * { position:relative; z-index:1; }
.brand { display:flex; align-items:center; gap:13px; font-weight:700; }
.brand small { display:block; margin-top:4px; color:#b8cade; font-weight:500; }
.brand-mark { display:grid; place-items:center; flex:0 0 46px; height:46px; border-radius:10px; background:#e0ecfb; color:#173b66; font-weight:850; letter-spacing:.025em; font-size:.88rem; }
.hero h1 { font-size:clamp(2.85rem,5.6vw,5.6rem); font-weight:720; letter-spacing:-.065em; line-height:.99; max-width:7ch; }
.hero p { color:#c4d6eb; margin-top:25px; line-height:1.65; max-width:31ch; }
.preview-label { width:fit-content; border:1px solid #84a1bf63; color:#e1ecf9; border-radius:6px; padding:7px 10px; letter-spacing:.035em; font-size:.81rem; font-weight:650; }
.auth-main { display:grid; place-items:center; padding:48px 28px; }
.auth-card { width:min(100%,440px); }
.auth-card h2 { font-size:2.1rem; letter-spacing:-.04em; margin-bottom:7px; }
.subtitle { color:var(--muted); line-height:1.55; }
.tabs { display:grid; grid-template-columns:1fr 1fr; padding:4px; gap:4px; background:#eef2f7; border-radius:10px; margin:26px 0 22px; }
.tabs button { border:1px solid transparent; border-radius:7px; padding:10px 7px; background:transparent; color:#40546d; font-weight:650; font-size:.9rem; min-height:44px; }
.tabs [aria-selected="true"] { background:white; color:#153c70; border-color:#d9e2ed; box-shadow:0 1px 3px #10264510; }
.field { display:grid; gap:7px; margin-bottom:17px; }
label,.field-label { font-size:.9rem; font-weight:650; }
input,select { width:100%; min-height:45px; background:#fff; border:1px solid #aebdd0; border-radius:8px; color:var(--ink); padding:9px 12px; }
select { appearance:none; padding-right:32px; background-image:linear-gradient(45deg,transparent 48%,#42607f 50%),linear-gradient(135deg,#42607f 48%,transparent 50%); background-position:calc(100% - 17px) center,calc(100% - 12px) center; background-size:5px 5px; background-repeat:no-repeat; }
.primary,.secondary,.plain { border-radius:8px; min-height:42px; padding:10px 15px; font-weight:680; font-size:.91rem; }
.primary { color:white; background:var(--blue); border:1px solid var(--blue); }
.primary:hover { background:var(--blue-dark); }
.secondary { color:#163d71; background:white; border:1px solid #b3c3d7; }
.secondary:hover { background:#edf4fd; }
.plain { color:inherit; background:transparent; border:1px solid currentColor; }
.full { width:100%; }
.form-error { color:#a63536; line-height:1.4; }
.form-error:empty { display:none; }
.form-error:not(:empty) { margin:0 0 12px; }
.demo-help { background:#f2f6fc; border:1px solid var(--line); border-radius:9px; padding:13px 14px; margin-top:20px; line-height:1.55; font-size:.88rem; color:#455b74; }
.demo-help label { display:block; margin-top:9px; }
.demo-help code { color:#153d70; font-weight:700; }
.dashboard { min-height:100svh; display:grid; grid-template-columns:230px minmax(0,1fr); }
.sidebar { background:var(--navy-deep); padding:24px 16px; color:white; display:flex; flex-direction:column; gap:28px; }
.sidebar .brand { margin-left:5px; }
.sidebar .brand-mark { flex-basis:40px; height:40px; }
.sidebar nav { display:grid; gap:7px; }
.sidebar nav button { text-align:left; border:1px solid transparent; background:transparent; color:#cbd9ea; border-radius:8px; padding:11px 12px; min-height:44px; font-weight:650; }
.sidebar nav [aria-current="page"] { background:#254d78; color:#fff; border-color:#51719a; }
.sidebar .preview-label { margin-top:auto; }
.workspace { min-width:0; }
.topline { background:white; border-bottom:1px solid var(--line); min-height:70px; padding:12px clamp(18px,3.3vw,52px); display:flex; align-items:center; justify-content:space-between; gap:16px; }
.topline small { color:var(--muted); }
.content { max-width:1470px; margin:auto; padding:32px clamp(16px,3.3vw,52px) 54px; }
.page-heading { margin-bottom:23px; }
.page-heading h1 { font-size:clamp(1.85rem,3.6vw,3rem); letter-spacing:-.055em; margin-bottom:6px; }
.metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.metric { background:white; border:1px solid var(--line); border-radius:11px; padding:15px; min-width:0; }
.metric span { font-size:.89rem; font-weight:660; display:block; white-space:normal; }
.metric strong { font-size:1.85rem; display:block; margin-top:6px; letter-spacing:-.06em; }
.metric:first-child { color:white; background:#183a60; border-color:#183a60; }
.panel { background:white; border:1px solid var(--line); border-radius:12px; padding:20px; margin-top:16px; }
.panel h2 { font-size:1.21rem; letter-spacing:-.025em; margin-bottom:6px; }
.panel .subtitle { font-size:.92rem; }
.filters { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); align-items:end; gap:12px; margin:16px 0; }
.filters .field { margin:0; }
.progress-summary { display:flex; justify-content:space-between; gap:10px; margin:12px 0 8px; color:#42566d; font-size:.9rem; }
progress { width:100%; height:12px; display:block; border:0; border-radius:8px; overflow:hidden; background:#e2eaf4; color:#1e5dae; }
progress::-webkit-progress-bar { background:#e2eaf4; }
progress::-webkit-progress-value { background:#1e5dae; }
progress::-moz-progress-bar { background:#1e5dae; }
.table-scroll { overflow:auto; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.91rem; }
th { background:#edf3fa; color:#3c5370; font-size:.86rem; font-weight:700; }
th,td { padding:12px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
td small { color:var(--muted); }
td:last-child,th:last-child { white-space:nowrap; }
tr:last-child td { border-bottom:0; }
.name-button { color:#164c8e; background:none; border:0; text-align:left; padding:3px 0; font-weight:700; }
.name-button:hover { text-decoration:underline; }
.badge { display:inline-block; padding:5px 8px; border-radius:6px; font-weight:650; font-size:.83rem; white-space:nowrap; }
.pending { color:#4c5d70; background:#eaf0f6; }
.contacted { color:#184d89; background:#e0efff; }
.interested { color:#08624c; background:#dcf3e9; }
.not-interested { color:#853734; background:#fbe9e6; }
.empty { color:var(--muted); padding:18px 0; }
dialog { padding:0; width:min(calc(100% - 28px),570px); max-height:calc(100% - 28px); border:1px solid #b6c8db; border-radius:14px; color:var(--ink); box-shadow:0 20px 80px #0d203746; }
dialog::backdrop { background:#0d20379c; }
.dialog-head { display:flex; align-items:center; justify-content:space-between; gap:16px; border-bottom:1px solid var(--line); padding:17px 20px; }
.dialog-head h2 { font-size:1.3rem; }
.dialog-body { padding:20px; }
.lead-meta { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:0 0 17px; }
.lead-meta small { display:block; color:var(--muted); margin-bottom:3px; }
.actions { display:flex; gap:9px; flex-wrap:wrap; margin:14px 0 21px; }
.history { padding:0; margin:11px 0 0; list-style:none; }
.history li { border-top:1px solid var(--line); padding:10px 0; display:flex; gap:10px; justify-content:space-between; flex-wrap:wrap; }
.history small { color:var(--muted); }
.draft { white-space:pre-wrap; overflow-wrap:anywhere; font:inherit; line-height:1.5; color:var(--ink); background:#f0f5fb; border:1px solid var(--line); padding:14px; border-radius:8px; }
@media (max-width:900px) { .dashboard { grid-template-columns:175px minmax(0,1fr); } .metrics { grid-template-columns:repeat(auto-fit,minmax(100px,1fr)); } }
@media (max-width:680px) {
  .auth,.dashboard { display:block; }
  .brand-side { padding:24px 23px; gap:23px; }
  .brand-side .hero h1 { max-width:none; font-size:2.7rem; }
  .brand-side .hero p { margin-top:10px; }
  .auth-main { padding:28px 20px 44px; }
  .sidebar { gap:13px; padding:13px 16px; }
  .sidebar nav { display:flex; flex-wrap:wrap; }
  .sidebar .preview-label { display:none; }
  .topline { min-height:61px; }
  .content { padding-top:22px; }
  .panel { padding:14px; }
  .metric { padding:11px; }
  .metric strong { font-size:1.5rem; }
}
.pagination { display:flex; align-items:center; justify-content:center; gap:12px; padding-top:14px; font-size:.86rem; color:var(--muted); }
textarea { width:100%; resize:vertical; border:1px solid #aebdd0; border-radius:8px; padding:10px; font:inherit; color:var(--ink); }
textarea:focus-visible { outline:3px solid #4a8ade; outline-offset:3px; }
.startup { max-width:40rem; margin:12vh auto; padding:24px; }
.startup p { margin-top:10px; color:var(--muted); }
.startup-actions { margin:10px 0 0; }
.startup-actions a { display:inline-flex; align-items:center; text-decoration:none; }
.startup-actions a:focus-visible { outline:3px solid #4a8ade; outline-offset:3px; }
