:root {
  --navy: #062b5f;
  --blue: #0b5fad;
  --orange: #f7861c;
  --bg: #f3f6fb;
  --card: #fff;
  --ink: #1b2430;
  --muted: #5b6676;
  --line: #d9e1ec;
  --ok: #157f3b;
  --warn: #b45309;
  --bad: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--bg); }
.topbar { background: var(--navy); color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; }
.stripe { height: 5px; background: var(--orange); }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { background: linear-gradient(135deg, var(--blue), var(--navy)); border: 2px solid var(--orange); border-radius: 8px; padding: 6px 8px; font-weight: 900; font-style: italic; color: var(--orange); line-height: 1; font-size: 14px; text-align: center; }
.logo span { display: block; color: #fff; font-size: 13px; }
.brand-name { font-weight: 800; font-size: 18px; }
.brand-name small { font-weight: 500; opacity: .85; font-size: 13px; margin-left: 4px; }
.motto { color: var(--orange); font-size: 13px; font-weight: 600; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav button { background: transparent; color: #fff; border: 1px solid transparent; padding: 7px 11px; border-radius: 6px; cursor: pointer; font-size: 14px; }
nav button:hover { border-color: rgba(255,255,255,.35); }
nav button.active { background: var(--orange); color: var(--navy); font-weight: 700; }
main { max-width: 1240px; margin: 0 auto; padding: 20px; min-height: 70vh; }
footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
h1 { color: var(--navy); font-size: 22px; margin: 4px 0 14px; }
h2 { color: var(--navy); font-size: 17px; margin: 0 0 10px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.grid { display: grid; gap: 12px; }
.grid.tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.tile { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 10px; padding: 12px 14px; }
.tile.orange { border-left-color: var(--orange); }
.tile.navy { border-left-color: var(--navy); }
.tile .n { font-size: 28px; font-weight: 800; color: var(--navy); }
.tile .l { color: var(--muted); font-size: 13px; }
label { display: block; font-size: 13px; color: var(--muted); margin: 8px 0 3px; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; color: var(--ink); }
textarea { min-height: 120px; resize: vertical; }
textarea.body { min-height: 340px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.row > * { flex: 1 1 160px; }
.row > .shrink { flex: 0 0 auto; }
button.btn, a.btn { display: inline-block; background: var(--blue); color: #fff; border: 0; border-radius: 6px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.btn:hover, a.btn:hover { filter: brightness(1.1); }
button.btn.orange, a.btn.orange { background: var(--orange); color: var(--navy); }
button.btn.ok { background: var(--ok); }
button.btn.bad { background: var(--bad); }
button.btn.ghost, a.btn.ghost { background: transparent; color: var(--blue); border: 1px solid var(--blue); }
button.btn:disabled { opacity: .45; cursor: not-allowed; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr.click { cursor: pointer; }
tr.click:hover { background: #eef4fb; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e7eef8; color: var(--navy); white-space: nowrap; }
.pill.qualified, .pill.approved, .pill.sent, .pill.WON { background: #dcf3e4; color: var(--ok); }
.pill.unverified, .pill.pending_review, .pill.pending { background: #fff1de; color: var(--warn); }
.pill.disqualified, .pill.rejected, .pill.suppressed, .pill.LOST, .pill.overdue { background: #fde4e1; color: var(--bad); }
.muted { color: var(--muted); font-size: 13px; }
.evidence { background: #f7f9fc; border: 1px dashed var(--line); border-radius: 6px; padding: 8px; font-size: 13px; color: var(--muted); word-break: break-word; }
.notice { border-left: 5px solid var(--orange); background: #fff8ef; padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px; }
.notice.bad { border-left-color: var(--bad); background: #fff1f0; }
.issues { color: var(--bad); font-size: 13px; margin: 6px 0; }
.kanban { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.col { background: #e9eff7; border-radius: 10px; padding: 10px; }
.col h3 { margin: 0 0 8px; font-size: 13px; color: var(--navy); display: flex; justify-content: space-between; }
.opp { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; font-size: 13px; }
.opp input, .opp select { padding: 5px 7px; font-size: 13px; }
.bar { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; }
.bar .lbl { width: 170px; color: var(--muted); }
.bar .track { flex: 1; background: #e9eff7; border-radius: 4px; height: 16px; overflow: hidden; }
.bar .fill { background: var(--blue); height: 100%; }
.bar .num { width: 110px; text-align: right; }
.login { max-width: 380px; margin: 60px auto; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.err { background: var(--bad); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.tabs button.active { background: var(--navy); color: #fff; border-color: var(--navy); }
a { color: var(--blue); }
@media (max-width: 640px) { main { padding: 12px; } .bar .lbl { width: 110px; } }
