@font-face { font-family: "Inter"; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin.woff2) format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 400 800; font-display: swap; src: url(fonts/outfit-latin.woff2) format("woff2"); }

:root {
  --orange: #F16334; --orange-deep: #D94F22; --orange-text: #C9461B;
  --dark: #26272C; --dark-2: #303137; --dark-3: #3A3B42; --dark-line: rgba(255,255,255,.08);
  --ink: #1A1A1A; --ink-2: #5B5E66; --gray: #F5F6F7; --line: #E7E7E7; --white: #fff;
  --good: #1F9D55; --mid: #E08A1E; --low: #C9461B;
  --head: Outfit, "Century Gothic", system-ui, sans-serif; --body: Inter, system-ui, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--gray); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
code { font-family: ui-monospace, Consolas, monospace; background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--dark); color: var(--white); padding: 22px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-end; align-self: flex-start; margin: 0 10px 26px; line-height: 1; }
.brand-name { font-family: var(--head); font-size: 19px; letter-spacing: .14em; text-transform: uppercase; }
.brand-by { font-family: var(--head); font-size: 11.5px; margin-top: 5px; letter-spacing: .08em; color: rgba(255,255,255,.75); }
.brand-by span { border: 1.5px solid var(--orange); color: var(--orange); font-weight: 700; padding: 1px 4px; margin-left: 2px; }
.brand.dark .brand-name { color: var(--ink); } .brand.dark .brand-by { color: var(--ink-2); }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; color: rgba(255,255,255,.78); font-size: 14.5px; font-weight: 500; }
.side nav a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.side nav a:hover { background: var(--dark-2); color: var(--white); }
.side nav a.on { background: var(--dark-3); color: var(--white); box-shadow: inset 3px 0 0 var(--orange); }
.side nav a.on svg { color: var(--orange); opacity: 1; }
.side nav em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 8px; }
.nav-h { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.4); margin: 18px 12px 6px; }
.logout { margin-top: auto; padding: 16px 12px 0; }
.logout button { background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; font-size: 13.5px; }
.logout button:hover { color: var(--orange); }
.main { padding: 30px 36px 60px; max-width: 1180px; width: 100%; }
.main.wide { max-width: 1400px; }
.menu { display: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .25s; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .main { padding: 18px 16px 50px; }
  .menu { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); margin-bottom: 14px; cursor: pointer; font-size: 18px; }
}

/* ---------- page header, buttons, flash ---------- */
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-h h1 { font-family: var(--head); font-weight: 800; font-size: clamp(24px, 3vw, 32px); line-height: 1.15; }
.page-h p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; max-width: 70ch; }
.crumb a { color: var(--orange-text); font-weight: 600; font-size: 13.5px; }
.actions, .month-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 7px; background: var(--orange); color: #fff; border: 0; border-radius: 7px; padding: 10px 16px; font-family: var(--head); font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--orange-deep); }
.btn.ghost { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14.5px; }
.flash.ok { background: #E8F6EE; color: #11663A; }
.flash.err { background: #FDECE7; color: #9A2F0E; }
.flash.warn { background: #FFF4E0; color: #8A5300; }
.card { background: var(--white); border-radius: 12px; border: 1px solid var(--line); padding: 22px; margin-bottom: 22px; }
.card h2 { font-family: var(--head); font-size: 18px; margin-bottom: 14px; }
.card h3 { font-family: var(--head); font-size: 16px; margin: 22px 0 10px; }

/* ---------- dashboard ---------- */
.month-pick input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 18px; }
.mini { background: var(--dark); color: var(--white); border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
.mini span { font-size: 13px; color: rgba(255,255,255,.7); }
.mini b { grid-row: span 2; font-family: var(--head); font-size: 30px; color: var(--orange); }
.mini small { font-size: 12.5px; color: rgba(255,255,255,.6); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .2s, transform .2s; border-top: 4px solid var(--low); }
.kpi:hover { box-shadow: 0 14px 30px -18px rgba(0,0,0,.35); transform: translateY(-2px); }
.kpi.good { border-top-color: var(--good); } .kpi.mid { border-top-color: var(--mid); }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kpi-label { font-family: var(--head); font-weight: 700; font-size: 15.5px; }
.kpi-pct { font-family: var(--head); font-weight: 800; font-size: 15px; padding: 2px 9px; border-radius: 999px; background: #FDECE7; color: var(--low); }
.kpi.good .kpi-pct { background: #E8F6EE; color: var(--good); } .kpi.mid .kpi-pct { background: #FFF4E0; color: #A46100; }
.kpi-value { font-family: var(--head); font-weight: 800; font-size: 32px; line-height: 1.1; }
.kpi-value small { font-size: 16px; font-weight: 600; color: var(--ink-2); }
.bar { height: 8px; border-radius: 99px; background: var(--gray); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--low); }
.kpi.good .bar i { background: var(--good); } .kpi.mid .bar i { background: var(--mid); }
.kpi-exp { font-size: 13px; color: var(--ink-2); }
.kpi-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.kpi-extra { font-size: 12.5px; color: var(--ink-2); }
.kpi-extra b { color: var(--ink); }
.kpi-trend { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex-shrink: 0; }
.kpi-trend span { font-size: 10.5px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.spark { width: 120px; height: 34px; }
.spark rect { fill: #D9DBE0; } .spark rect.cur { fill: var(--orange); }
.feed { list-style: none; display: grid; gap: 8px; font-size: 14px; }
.feed li span { display: inline-block; min-width: 150px; color: var(--ink-2); font-size: 12.5px; }
.feed a { color: var(--orange-text); font-weight: 600; }

/* ---------- lists ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); min-width: 0; }
.filters input { flex: 1 1 220px; }
.clear { font-size: 13.5px; color: var(--orange-text); font-weight: 600; }
.table-card { padding: 0; overflow: hidden; }
.table-meta { padding: 12px 18px; font-size: 13.5px; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 700; padding: 10px 16px; background: #FAFAFB; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #FFF8F5; }
td a { font-weight: 600; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--gray); color: var(--ink-2); white-space: nowrap; }
.p-new, .p-prospect, .p-lead, .p-sourced, .p-planned { background: #EAF1FE; color: #1D4FC4; }
.p-won, .p-active, .p-approved, .p-done, .p-placed, .p-live, .p-qualified { background: #E8F6EE; color: #11663A; }
.p-spam { background: #FDECE7; color: #9A2F0E; }
.p-lost, .p-rejected, .p-cancelled, .p-declined, .p-inactive, .p-closed { background: #F1F1F3; color: #6B6E76; }
.p-negotiation, .p-proposal, .p-onboarding, .p-offer, .p-shortlisted, .p-contacted, .p-demo, .p-interview, .p-screening, .p-discovery { background: #FFF4E0; color: #8A5300; }
.empty { padding: 36px 18px; text-align: center; color: var(--ink-2); }
.empty a { color: var(--orange-text); font-weight: 600; }
.pager { display: flex; justify-content: space-between; padding: 12px 18px; font-size: 14px; }
.pager a { color: var(--orange-text); font-weight: 600; }

/* ---------- forms ---------- */
.form .grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.form.narrow { max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 13.5px; }
.field label i { color: var(--orange); font-style: normal; }
.field input, .field select, .field textarea { padding: 10px 12px; border: 1px solid #D5D7DC; border-radius: 7px; background: var(--white); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus { outline: 2px solid rgba(241,99,52,.35); border-color: var(--orange); }
.field input[readonly] { background: var(--gray); color: var(--ink-2); }
.field small { font-size: 12.5px; color: var(--ink-2); }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--low); }
.field small.err { color: var(--low); font-weight: 600; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.checks label { font-weight: 400; display: flex; gap: 8px; align-items: center; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
.danger { margin-top: -6px; }
.danger button { background: none; border: 0; color: var(--low); font-weight: 600; cursor: pointer; font-size: 13.5px; }
@media (max-width: 700px) { .form .grid { grid-template-columns: 1fr; } }

/* ---------- settings ---------- */
.targets { display: grid; gap: 12px; max-width: 640px; }
.targets label { display: grid; grid-template-columns: 1fr 160px; gap: 14px; align-items: center; }
.targets label span { font-weight: 600; font-size: 14.5px; }
.targets small { display: block; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.targets input, .add-user input, .add-user select, .row-actions select { padding: 8px 10px; border: 1px solid #D5D7DC; border-radius: 7px; background: var(--white); }
.row-actions form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.add-user { display: flex; gap: 8px; flex-wrap: wrap; }
.add-user input { flex: 1 1 200px; }
.add-user select { flex: 1 1 280px; }
tbody tr:has(form) { cursor: default; }

/* ---------- login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; background: var(--dark); padding: 16px; }
.login { width: 100%; max-width: 380px; background: var(--white); border-radius: 14px; padding: 30px 28px; display: grid; gap: 14px; border-top: 5px solid var(--orange); }
.login .brand { margin: 0 0 8px; }
.login h1 { font-family: var(--head); font-size: 24px; }
.login label { display: grid; gap: 6px; font-weight: 600; font-size: 13.5px; }
.login input { padding: 11px 12px; border: 1px solid #D5D7DC; border-radius: 7px; }
.login .btn { justify-content: center; padding: 12px; }
