/* =========================================================
   leadVocal design tokens
   ========================================================= */
:root{
  --navy-950:#0d1f30;
  --navy-900:#12283d;
  --navy-800:#1b3a5c;
  --navy-700:#264d73;
  --slate-100:#f5f7f9;
  --slate-200:#e9edf1;
  --slate-300:#dbe1e8;
  --slate-500:#7c8ba0;
  --slate-700:#3d4a5c;
  --ink:#1a2432;
  --gold:#d9a441;
  --gold-dark:#b8842c;
  --teal:#2e8b8b;
  --red:#c0432f;
  --green:#3a8a5c;
  --white:#ffffff;

  --font-display:'Space Grotesk', 'Inter', sans-serif;
  --font-body:'Inter', sans-serif;

  --radius:10px;
  --shadow-sm: 0 1px 2px rgba(13,31,48,.06), 0 1px 1px rgba(13,31,48,.04);
  --shadow-md: 0 8px 24px rgba(13,31,48,.10);
}

*,*::before,*::after{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--slate-100);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{ font-family:var(--font-display); margin:0; font-weight:600; }
p{margin:0;}
button{font-family:inherit;}
a{color:var(--navy-800);}

/* ---------------- Login ---------------- */
.login-screen{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  background:
    radial-gradient(circle at 20% 20%, rgba(217,164,65,.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(46,139,139,.15), transparent 45%),
    var(--navy-950);
  padding:24px;
}
.login-card{
  width:100%; max-width:420px; background:var(--white); border-radius:16px;
  padding:36px 32px; box-shadow:var(--shadow-md);
}
.login-brand{ display:flex; gap:14px; align-items:flex-start; margin-bottom:28px; }
.login-mark{
  width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,var(--navy-800),var(--navy-950));
  color:var(--gold); font-family:var(--font-display); font-weight:700; font-size:18px;
  display:flex; align-items:center; justify-content:center; flex:none;
}
.login-brand h1{font-size:22px;color:var(--navy-950);}
.login-brand p{font-size:13px;color:var(--slate-500); margin-top:4px; line-height:1.4;}
#loginForm{display:flex; flex-direction:column; gap:16px;}
#loginForm label{ font-size:13px; font-weight:600; color:var(--slate-700); display:flex; flex-direction:column; gap:6px;}
#loginForm input{
  font-size:14px; padding:10px 12px; border-radius:8px; border:1px solid var(--slate-300);
  font-family:inherit; background:var(--slate-100);
}
#loginForm input:focus{ outline:2px solid var(--gold); outline-offset:1px; background:var(--white); }
.login-hint{ margin-top:18px; font-size:12px; color:var(--slate-500); line-height:1.5;}
.login-hint code{ background:var(--slate-200); padding:1px 5px; border-radius:4px; }
.form-error{ background:#fdecea; color:var(--red); font-size:13px; padding:8px 10px; border-radius:6px; }

/* ---------------- App shell ---------------- */
.app-shell{ display:flex; min-height:100vh; }
.sidebar{
  width:232px; flex:none; background:var(--navy-950); color:var(--slate-200);
  display:flex; flex-direction:column; position:sticky; top:0; height:100vh;
}
.sidebar-brand{ display:flex; align-items:center; gap:10px; padding:20px 18px 16px; }
.sidebar-brand .mark{
  width:30px;height:30px;border-radius:8px;background:var(--gold);color:var(--navy-950);
  font-family:var(--font-display); font-weight:700; display:flex;align-items:center;justify-content:center;font-size:14px;
}
.sidebar-brand .wordmark{ font-family:var(--font-display); font-weight:700; font-size:17px; color:var(--white); }
.sidebar-nav{ flex:1; overflow-y:auto; padding:6px 10px; display:flex; flex-direction:column; gap:2px; }
.nav-item{
  display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px;
  color:var(--slate-300); font-size:13.5px; font-weight:500; cursor:pointer; border:none; background:none;
  width:100%; text-align:left;
}
.nav-item:hover{ background:rgba(255,255,255,.06); color:var(--white); }
.nav-item.active{ background:var(--gold); color:var(--navy-950); font-weight:600; }
.nav-item .ic{ width:18px; text-align:center; font-size:14px; }
.sidebar-footer{ padding:14px; border-top:1px solid rgba(255,255,255,.08); }
.user-chip{ display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.avatar{
  width:34px;height:34px;border-radius:50%;background:var(--navy-700);color:var(--white);
  display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;flex:none;
}
.user-meta{ overflow:hidden; }
.user-name{ font-size:13px; font-weight:600; color:var(--white); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.user-role{ font-size:11px; color:var(--slate-500); }

.main-col{ flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar{
  height:64px; flex:none; background:var(--white); border-bottom:1px solid var(--slate-200);
  display:flex; align-items:center; justify-content:space-between; padding:0 28px; position:sticky; top:0; z-index:5;
}
.topbar-actions{ display:flex; gap:10px; align-items:center; }
.icon-btn{ position:relative; background:none; border:1px solid var(--slate-200); border-radius:8px; width:36px;height:36px; cursor:pointer; font-size:15px;}
.badge-dot{ position:absolute; top:4px; right:6px; width:8px;height:8px;border-radius:50%;background:var(--red); }
.page-body{ padding:24px 28px 60px; flex:1; }

/* ---------------- Buttons ---------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  padding:9px 16px; border-radius:8px; font-size:13.5px; font-weight:600; border:1px solid transparent;
  cursor:pointer; transition:filter .1s ease; white-space:nowrap;
}
.btn:active{ filter:brightness(.94); }
.btn-primary{ background:var(--navy-900); color:var(--white); }
.btn-primary:hover{ background:var(--navy-800); }
.btn-gold{ background:var(--gold); color:var(--navy-950); }
.btn-gold:hover{ background:var(--gold-dark); }
.btn-ghost{ background:transparent; color:var(--slate-700); border-color:var(--slate-300); }
.btn-ghost:hover{ background:var(--slate-200); }
.btn-danger{ background:#fdecea; color:var(--red); }
.btn-danger:hover{ background:#f9d9d5; }
.btn-sm{ padding:6px 10px; font-size:12.5px; }
.btn-block{ width:100%; }
.btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* ---------------- Layout helpers ---------------- */
.toolbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.toolbar-left{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.search-input, .select-input, .text-input{
  font-size:13.5px; padding:8px 10px; border-radius:8px; border:1px solid var(--slate-300); background:var(--white); font-family:inherit;
}
.search-input{ min-width:220px; }

.card{ background:var(--white); border-radius:var(--radius); box-shadow:var(--shadow-sm); border:1px solid var(--slate-200); }
.card-pad{ padding:20px; }
.grid{ display:grid; gap:18px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:1100px){ .grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width:680px){ .grid-4,.grid-3,.grid-2{grid-template-columns:1fr;} }

.stat-card{ padding:18px 20px; }
.stat-label{ font-size:12px; color:var(--slate-500); font-weight:600; text-transform:uppercase; letter-spacing:.04em;}
.stat-value{ font-family:var(--font-display); font-size:28px; margin-top:6px; color:var(--navy-950); }
.section-title{ font-size:15px; margin:28px 0 14px; color:var(--navy-950); }
.section-title:first-child{ margin-top:0; }

/* ---------------- Tables ---------------- */
table.data-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.data-table thead th{
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--slate-500);
  padding:10px 14px; border-bottom:1px solid var(--slate-200); background:var(--slate-100); font-weight:600;
}
.data-table tbody td{ padding:11px 14px; border-bottom:1px solid var(--slate-200); vertical-align:middle; }
.data-table tbody tr:hover{ background:var(--slate-100); }
.data-table tbody tr:last-child td{ border-bottom:none; }
.row-link{ cursor:pointer; color:var(--navy-800); font-weight:600; }
.row-link:hover{ text-decoration:underline; }
.table-actions{ display:flex; gap:6px; }
.empty-state{ text-align:center; padding:50px 20px; color:var(--slate-500); }

/* ---------------- Badges ---------------- */
.badge{ display:inline-flex; align-items:center; padding:3px 9px; border-radius:999px; font-size:11.5px; font-weight:600; }
.badge-gray{ background:var(--slate-200); color:var(--slate-700); }
.badge-blue{ background:#e3edf7; color:var(--navy-800); }
.badge-gold{ background:#fbf0da; color:var(--gold-dark); }
.badge-green{ background:#e3f2e8; color:var(--green); }
.badge-red{ background:#fbe6e2; color:var(--red); }
.badge-teal{ background:#e2f1f1; color:var(--teal); }

/* ---------------- Forms ---------------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; }
.form-grid.single{ grid-template-columns:1fr; }
.field{ display:flex; flex-direction:column; gap:5px; }
.field.span-2{ grid-column:span 2; }
.field label{ font-size:12.5px; font-weight:600; color:var(--slate-700); }
.field input, .field select, .field textarea{
  font-family:inherit; font-size:13.5px; padding:9px 11px; border-radius:8px; border:1px solid var(--slate-300); background:var(--slate-100);
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:2px solid var(--gold); outline-offset:1px; background:var(--white); }
.field textarea{ resize:vertical; min-height:70px; }
.field-hint{ font-size:11.5px; color:var(--slate-500); }
.checkbox-row{ display:flex; align-items:center; gap:8px; font-size:13px; }

/* ---------------- Modal ---------------- */
.modal-root{ position:fixed; inset:0; z-index:50; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(13,31,48,.55); }
.modal-panel{
  position:relative; max-width:640px; width:calc(100% - 40px); margin:5vh auto; background:var(--white);
  border-radius:14px; box-shadow:var(--shadow-md); max-height:90vh; overflow-y:auto;
}
.modal-header{ display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--slate-200); }
.modal-header h3{ font-size:17px; }
.modal-close{ background:none;border:none;font-size:20px;cursor:pointer;color:var(--slate-500); line-height:1;}
.modal-body{ padding:22px 24px; }
.modal-footer{ display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--slate-200); }
.modal-panel.wide{ max-width:920px; }

/* ---------------- Tabs ---------------- */
.tab-bar{ display:flex; gap:4px; border-bottom:1px solid var(--slate-200); margin-bottom:18px; }
.tab-btn{ background:none;border:none;padding:10px 14px;font-size:13px;font-weight:600;color:var(--slate-500);cursor:pointer;border-bottom:2px solid transparent; }
.tab-btn.active{ color:var(--navy-900); border-color:var(--gold); }

/* ---------------- Kanban ---------------- */
.kanban{ display:flex; gap:14px; overflow-x:auto; padding-bottom:10px; }
.kanban-col{ background:var(--slate-100); border-radius:12px; min-width:250px; flex:none; padding:12px; border:1px solid var(--slate-200); }
.kanban-col h4{ font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; color:var(--slate-700); display:flex; justify-content:space-between; margin-bottom:10px;}
.kanban-col .col-total{ font-weight:500; color:var(--slate-500); }
.kanban-card{
  background:var(--white); border-radius:9px; padding:11px 12px; margin-bottom:9px; box-shadow:var(--shadow-sm);
  cursor:grab; border:1px solid var(--slate-200); font-size:13px;
}
.kanban-card:active{ cursor:grabbing; }
.kanban-card .kc-title{ font-weight:600; margin-bottom:4px; }
.kanban-card .kc-meta{ font-size:11.5px; color:var(--slate-500); display:flex; justify-content:space-between; }
.kanban-col.drop-hover{ outline:2px dashed var(--gold); outline-offset:-4px; }

/* ---------------- Calendar ---------------- */
.calendar-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:6px; }
.cal-cell{ background:var(--white); border:1px solid var(--slate-200); border-radius:8px; min-height:88px; padding:6px; font-size:11.5px; }
.cal-cell .cal-date{ font-weight:600; color:var(--slate-500); margin-bottom:4px; }
.cal-item{ background:var(--slate-100); border-radius:5px; padding:2px 5px; margin-bottom:3px; }
.cal-item.overdue{ background:#fbe6e2; color:var(--red); }

/* ---------------- Notif tray ---------------- */
.notif-tray{
  position:fixed; top:64px; right:28px; width:340px; max-height:70vh; overflow-y:auto;
  background:var(--white); border-radius:12px; box-shadow:var(--shadow-md); border:1px solid var(--slate-200); z-index:40;
}
.notif-tray-header{ display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--slate-200); }
.notif-item{ padding:12px 16px; border-bottom:1px solid var(--slate-200); font-size:13px; }
.notif-item.unread{ background:#fbf7ec; }
.notif-time{ font-size:11px; color:var(--slate-500); margin-top:3px; }

/* ---------------- Toast ---------------- */
.toast-root{ position:fixed; bottom:20px; right:20px; display:flex; flex-direction:column; gap:8px; z-index:100; }
.toast{ background:var(--navy-950); color:var(--white); padding:11px 16px; border-radius:8px; font-size:13px; box-shadow:var(--shadow-md); }
.toast.error{ background:var(--red); }
.toast.success{ background:var(--green); }

/* ---------------- Misc ---------------- */
.muted{ color:var(--slate-500); }
.timeline{ display:flex; flex-direction:column; gap:0; }
.timeline-item{ display:flex; gap:12px; padding:10px 0; border-bottom:1px solid var(--slate-200); font-size:13px; }
.timeline-dot{ width:8px;height:8px;border-radius:50%;background:var(--gold); margin-top:6px; flex:none; }
.timeline-meta{ font-size:11.5px; color:var(--slate-500); margin-top:2px; }
.pill-filter{ display:flex; gap:6px; flex-wrap:wrap; }
.pill{ padding:6px 12px; border-radius:999px; border:1px solid var(--slate-300); font-size:12.5px; font-weight:600; cursor:pointer; background:var(--white); color:var(--slate-700); }
.pill.active{ background:var(--navy-950); color:var(--white); border-color:var(--navy-950); }
.chart-box{ position:relative; height:260px; }
.two-col{ display:grid; grid-template-columns:1.3fr .7fr; gap:18px; }
@media (max-width:900px){ .two-col{grid-template-columns:1fr;} }
.file-drop{ border:2px dashed var(--slate-300); border-radius:10px; padding:24px; text-align:center; color:var(--slate-500); font-size:13px; cursor:pointer; }
.file-drop:hover{ border-color:var(--gold); color:var(--navy-800); }
.progress-bar{ height:8px; background:var(--slate-200); border-radius:4px; overflow:hidden; }
.progress-bar > div{ height:100%; background:var(--gold); }
