:root {
  --ink: #17212b;
  --muted: #6b7785;
  --subtle: #94a0ad;
  --line: #e6ebf0;
  --surface: #ffffff;
  --canvas: #f4f7fb;
  --navy: #15253d;
  --blue: #3d6df2;
  --blue-soft: #edf2ff;
  --green: #0f9f76;
  --green-soft: #e9f8f2;
  --amber: #bd7611;
  --amber-soft: #fff5df;
  --red: #c23d4b;
  --shadow: 0 10px 30px rgba(30, 48, 76, .07);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--canvas); color: var(--ink); line-height: 1.5; }
a { color: var(--blue); }
.topbar { min-height: 70px; background: var(--navy); color: #fff; padding: 0 max(24px, calc((100vw - 1240px) / 2)); display: flex; justify-content: space-between; align-items: center; gap: 24px; box-shadow: 0 4px 18px rgba(15, 29, 50, .16); }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 750; letter-spacing: -.02em; font-size: 1.08rem; }
.brand-mark { width: 38px; height: 31px; display: grid; place-items: center; background: linear-gradient(135deg, #6b8cff, #38c6a1); color: #fff; border-radius: 9px; font-size: .68rem; letter-spacing: -.04em; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.topbar nav a { color: #c9d4e5; text-decoration: none; padding: 9px 11px; border-radius: 8px; font-size: .86rem; transition: background .15s, color .15s; }
.topbar nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.topbar .account { color: #8fa2bb; font-size: .78rem; padding-left: 8px; white-space: nowrap; }
.container { max-width: 1240px; margin: 0 auto; padding: 32px 24px 54px; }
h1 { margin: 0; font-size: clamp(1.55rem, 2.4vw, 2.05rem); letter-spacing: -.045em; line-height: 1.1; }
h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.02em; }
h3 { margin: 0; font-size: .95rem; }
p { color: var(--muted); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.eyebrow { color: var(--blue); text-transform: uppercase; font-size: .7rem; font-weight: 800; letter-spacing: .13em; margin: 0 0 7px; }
.page-subtitle { margin: 8px 0 0; color: var(--muted); font-size: .92rem; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.card { background: var(--surface); border-radius: 14px; padding: 21px; margin-bottom: 17px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { position: relative; overflow: hidden; min-height: 128px; padding: 19px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.kpi::after { content: ""; position: absolute; right: -28px; top: -35px; width: 100px; height: 100px; border-radius: 50%; background: var(--blue-soft); }
.kpi-label { position: relative; z-index: 1; color: var(--muted); font-size: .78rem; font-weight: 650; }
.kpi-value { position: relative; z-index: 1; margin-top: 12px; font-size: 1.9rem; letter-spacing: -.055em; font-weight: 760; }
.kpi-note { position: relative; z-index: 1; color: var(--muted); font-size: .75rem; margin-top: 3px; }
.kpi.green::after { background: var(--green-soft); }.kpi.amber::after { background: var(--amber-soft); }.kpi.blue::after { background: var(--blue-soft); }
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--subtle); font-size: .7rem; text-transform: uppercase; letter-spacing: .075em; font-weight: 750; white-space: nowrap; }
td { font-size: .86rem; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fafcff; }
.table-wrap { overflow-x: auto; }
a.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); color: white; border: 0; padding: 9px 14px; border-radius: 8px; text-decoration: none; cursor: pointer; font: inherit; font-size: .83rem; font-weight: 700; box-shadow: 0 4px 10px rgba(61,109,242,.18); transition: transform .15s, box-shadow .15s, background .15s; }
a.btn:hover, button.btn:hover { background: #315bd1; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(61,109,242,.24); }
a.btn.secondary, button.btn.secondary { color: var(--ink); background: #f0f3f7; box-shadow: none; }
a.btn.small, button.btn.small { padding: 6px 9px; font-size: .74rem; box-shadow: none; }
input, textarea, select { width: 100%; padding: 10px 11px; margin: 5px 0 14px; border: 1px solid #d7dee7; border-radius: 8px; background: #fff; color: var(--ink); font: inherit; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
label { display: block; font-size: .78rem; color: var(--muted); font-weight: 650; }
.checkbox { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--ink); }.checkbox input { width: auto; margin: 0; }
.flash { padding: 11px 14px; border-radius: 9px; margin-bottom: 16px; font-size: .86rem; border: 1px solid transparent; }.flash.error { background: #fff0f1; color: var(--red); border-color: #ffd5d9; }.flash.success { background: var(--green-soft); color: #087653; border-color: #c8efdf; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 750; white-space: nowrap; }.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }.status.active, .status.due { color: #087653; background: var(--green-soft); }.status.idle { color: var(--muted); background: #f0f3f6; }.status.warn { color: var(--amber); background: var(--amber-soft); }
.progress { height: 7px; min-width: 100px; background: #edf1f5; border-radius: 9px; overflow: hidden; margin-top: 7px; }.progress-bar { height: 100%; background: linear-gradient(90deg, var(--blue), #58b9ed); border-radius: inherit; }
.metric-stack { min-width: 130px; }.metric-line { display: flex; justify-content: space-between; gap: 10px; font-size: .77rem; color: var(--muted); }.metric-line strong { color: var(--ink); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }.form-actions { display: flex; gap: 9px; align-items: center; margin-top: 6px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }.muted { color: var(--muted); font-size: .82rem; }.overdue { color: var(--red); font-weight: 700; }.searchbar { display: flex; gap: 9px; margin-bottom: 17px; }.searchbar input { max-width: 340px; margin: 0; }
.lead-upload-note { padding: 13px 15px; background: #f7f9fc; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: .82rem; margin-bottom: 19px; }
.login-shell { min-height: calc(100vh - 86px); display: grid; place-items: center; }.login-card { width: min(420px, 100%); padding: 34px; }.login-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-weight: 800; font-size: 1.15rem; }.login-card h1 { font-size: 1.7rem; }.login-card .btn { width: 100%; margin-top: 6px; }
@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); }.topbar { padding: 15px 20px; align-items: flex-start; }.topbar nav { justify-content: flex-end; }.topbar .account { display: none; } }
@media (max-width: 620px) { .container { padding: 24px 14px 42px; }.topbar { display: block; }.topbar nav { justify-content: flex-start; margin-top: 12px; margin-left: -8px; }.topbar nav a { padding: 7px 8px; }.page-head { display: block; }.page-actions { margin-top: 16px; }.kpi-grid { gap: 9px; }.kpi { min-height: 105px; padding: 14px; }.kpi-value { font-size: 1.5rem; }.card { padding: 15px; }.form-grid { grid-template-columns: 1fr; } th, td { padding: 10px 9px; } }
