/* Xhovémont ERP — dark fintech theme (colors sampled from xhovemont.com) */
:root {
  --bg: #070b14;
  --surface: #0b111d;
  --surface-2: #0f1726;
  --line: #1f2937;
  --line-soft: #161e2c;
  --fg: #e8ecf4;
  --muted: #94a3b8;
  --teal: #2dd4bf;
  --blue: #4a93fa;
  --grad: linear-gradient(135deg, #2dd4bf 0%, #4a93fa 100%);
  --ok: #2dd4bf;
  --warn: #f5b942;
  --bad: #f87171;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--fg); min-height: 100vh;
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 480px at 8% -6%, rgba(45, 212, 191, .10), transparent 60%),
    radial-gradient(900px 520px at 96% -8%, rgba(74, 147, 250, .13), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 40px; padding: 0 32px; height: 68px;
  background: rgba(7, 11, 20, .82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none !important; }
.brand .logo {
  font-weight: 800; font-size: 19px; letter-spacing: .16em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand .crm { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; }
.top nav { display: flex; gap: 6px; }
.top nav a {
  color: var(--muted); font-weight: 500; padding: 8px 14px; border-radius: 10px; position: relative;
}
.top nav a:hover { color: var(--fg); text-decoration: none; background: rgba(255, 255, 255, .03); }
.top nav a.active { color: var(--fg); }
.top nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 2px; border-radius: 2px; background: var(--grad);
}

main { max-width: 1280px; margin: 0 auto; padding: 36px 32px 80px; }

/* ---------- typography ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); margin-bottom: 6px; }
h1 { font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin: 0 0 10px; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 34px 0 14px; }
h3 { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; }
.muted { color: var(--muted); font-size: 13px; }
.lead { max-width: 760px; margin: 0 0 22px; }
small { font-size: 12px; }
p { margin: 8px 0; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: 12px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
ul.plain li:last-child { border: 0; }
.notes { white-space: pre-wrap; color: #cbd5e1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }

/* ---------- layout helpers ---------- */
.bar { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.bar h2 { margin: 0; }
.actions { display: flex; gap: 10px; align-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 960px) { .two { grid-template-columns: 1fr; } main { padding: 24px 16px 60px; } .top { padding: 0 16px; gap: 16px; overflow-x: auto; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 22px 20px; margin-bottom: 18px; }
.panel > h2:first-child, .panel > .bar:first-child h2 { margin-top: 16px; }
.panel > .bar:first-child { margin-top: 0; align-items: center; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.facts span { background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 13px; color: #cbd5e1; }
dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 6px 0; }
dt { color: var(--muted); font-size: 13px; } dd { margin: 0; }
.skill-line { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-soft); }
.skill-line:last-of-type { border: 0; }

/* ---------- buttons ---------- */
.btn {
  white-space: nowrap; display: inline-block; cursor: pointer; font: inherit; font-weight: 600; color: #04121a;
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent; background: var(--grad);
  box-shadow: 0 6px 22px -8px rgba(45, 212, 191, .55); transition: transform .12s, box-shadow .12s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(74, 147, 250, .6); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(248, 113, 113, .35); box-shadow: none; }
.btn.danger:hover { background: rgba(248, 113, 113, .08); }
.btn.small { padding: 5px 12px; font-size: 13px; border-radius: 8px; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
th { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table tr:hover td { background: rgba(255, 255, 255, .012); }
.num { text-align: right; white-space: nowrap; }
.mini { border: 0; background: transparent; margin-top: 6px; border-radius: 0; }
.mini td { padding: 2px 10px 2px 0; border: 0; font-size: 12.5px; background: transparent !important; }
.catalog input { margin: 0; padding: 6px 10px; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions form { display: inline; }

/* ---------- tags & badges ---------- */
.tag {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12px; line-height: 20px;
  background: var(--surface-2); border: 1px solid var(--line); color: #cbd5e1; margin: 1px 2px 1px 0;
}
.tag b { color: var(--teal); font-weight: 700; }
.tag.cert { border-color: rgba(74, 147, 250, .5); color: #9cc2ff; }
.tag.lang { border-color: rgba(45, 212, 191, .35); color: #8eeadd; }
.tag.nice { opacity: .7; border-style: dashed; }
.tag.ok { border-color: rgba(45, 212, 191, .45); color: var(--ok); background: rgba(45, 212, 191, .07); }
.tag.warn { border-color: rgba(245, 185, 66, .45); color: var(--warn); background: rgba(245, 185, 66, .07); }
.tag.bad { border-color: rgba(248, 113, 113, .45); color: var(--bad); background: rgba(248, 113, 113, .07); }
.tag.active { border-color: rgba(45, 212, 191, .45); color: var(--ok); }
.tag.placed { border-color: rgba(74, 147, 250, .5); color: #9cc2ff; }
.tag.inactive { color: var(--muted); }
.tag.nda.draft { color: var(--muted); }
.tag.nda.sent { border-color: rgba(245, 185, 66, .45); color: var(--warn); }
.tag.nda.signed { border-color: rgba(45, 212, 191, .45); color: var(--ok); }
.tag.nda.expired { border-color: rgba(248, 113, 113, .45); color: var(--bad); }
.score { display: inline-block; min-width: 38px; text-align: center; padding: 2px 9px; border-radius: 8px; font-weight: 800; color: #04121a; }
.score.hi { background: var(--grad); }
.score.mid { background: var(--warn); }
.score.lo { background: var(--bad); }
.count { display: inline-block; min-width: 22px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; margin-left: 4px; }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 18px; height: 6px; border-radius: 3px; background: var(--line); }
.pips i.on { background: var(--grad); }
details.why summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-top: 4px; }
details.why summary:hover { color: var(--teal); }
.alert { background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .4); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }

/* ---------- dashboard cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 2px; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .7; }
.card b { font-size: 34px; font-weight: 800; letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card b small { font-size: 18px; color: var(--muted); -webkit-text-fill-color: var(--muted); }
.card span { color: var(--muted); font-size: 13px; }

/* ---------- forms ---------- */
.form label, .form .field { display: block; margin: 12px 0; font-size: 12.5px; font-weight: 500; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 9px 12px; margin-top: 5px; font: inherit; font-size: 14px; color: var(--fg);
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(45, 212, 191, .15); }
input::placeholder, textarea::placeholder { color: #566179; }
textarea { resize: vertical; }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 18px; }
.filters { display: flex; gap: 10px; margin: 10px 0 18px; }
.filters input { flex: 1; margin: 0; } .filters select { width: auto; margin: 0; } .filters .btn { padding: 8px 18px; }
.inline, .inline-form { display: flex; gap: 8px; align-items: center; }
.inline.wrap { flex-wrap: wrap; }
.inline input, .inline select, .inline-form select { width: auto; margin: 0; }
.inline input[name=notes] { min-width: 150px; }
.form.inline { margin-top: 12px; }
.add-row { margin: 0 0 16px; } .add-row input { flex: 1; }
.stage-select { font-weight: 600; border-color: rgba(45, 212, 191, .4); }
.filter { width: 240px; margin: 0; padding: 6px 12px; font-size: 13px; }
.nda-field { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; font-size: 12px !important; }
select.nda.draft { color: var(--muted); } select.nda.sent { color: var(--warn); border-color: rgba(245, 185, 66, .5); }
select.nda.signed { color: var(--ok); border-color: rgba(45, 212, 191, .5); } select.nda.expired { color: var(--bad); border-color: rgba(248, 113, 113, .5); }

/* ---------- pickers (skills / certs / languages) ---------- */
.pick-group h3 { margin: 18px 0 6px; color: var(--teal); letter-spacing: .1em; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 20px; }
.pick-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; border: 1px solid transparent; min-height: 44px; }
.pick-row:hover { background: rgba(255, 255, 255, .02); }
.pick-row.active { background: rgba(45, 212, 191, .06); border-color: rgba(45, 212, 191, .25); }
.pick-row select, .pick-row input[type=date] { width: auto; margin: 0; padding: 5px 10px; font-size: 13px; }
.pick-row .pair { display: flex; gap: 6px; }
.check { display: flex !important; align-items: center; gap: 10px; margin: 0 !important; font-size: 14px !important; color: var(--fg) !important; flex: 1; }
#skill-picker { columns: 2 380px; column-gap: 28px; }
#skill-picker .pick-group { break-inside: avoid; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { color: var(--muted); padding: 10px 16px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.active { color: var(--fg); border-image: var(--grad) 1; border-bottom-width: 2px; }

/* ---------- kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 160px; }
.col h3 { margin: 4px 6px 12px; display: flex; align-items: center; justify-content: space-between; }
.kcard { display: flex; flex-direction: column; gap: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; color: var(--fg); transition: border-color .12s, transform .12s; }
.kcard:hover { text-decoration: none; border-color: var(--teal); transform: translateY(-1px); }
.kcard b { font-weight: 600; line-height: 1.3; }
.kcard .meta { font-size: 12px; color: var(--teal); }

.nowrap { white-space: nowrap; }

/* ---------- V3: avatars, photo upload, cropper ---------- */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; overflow: hidden; border-radius: 14px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--teal); font-weight: 700; vertical-align: middle; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.avatar.md { width: 44px; height: 44px; font-size: 15px; }
.avatar.lg { width: 96px; height: 96px; font-size: 30px; border-radius: 18px; }
.avatar.xl { width: 128px; height: 128px; font-size: 40px; border-radius: 20px; }
.name-cell { display: flex; align-items: center; gap: 12px; }
.photo-up { display: flex; gap: 20px; align-items: center; margin: 14px 0 6px; }
.photo-up .btn { margin-right: 6px; }
.photo-up label.btn { margin: 0; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(3, 6, 12, .78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 24px 22px; width: min(400px, 100%); }
.crop-view { position: relative; width: 320px; max-width: 100%; margin: 12px auto; border-radius: 14px; overflow: hidden; touch-action: none; }
.crop-view canvas { display: block; width: 100%; height: auto; cursor: grab; background: #fff; }
.crop-view canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; pointer-events: none; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--teal); }
#crop-zoom { padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: var(--teal); }
.actions.end { justify-content: flex-end; margin-top: 12px; }

/* ---------- date input ---------- */
.date-wrap { position: relative; display: block; }
.date-wrap input[data-date] { padding-right: 38px; }
.date-wrap input.invalid { border-color: var(--bad); }
.date-wrap .date-native { position: absolute; right: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; padding: 0; margin: 0; border: 0; }
.date-wrap .cal { position: absolute; right: 4px; top: 5px; bottom: 1px; width: 32px; background: none; border: 0; color: var(--muted); cursor: pointer; border-radius: 8px; }
.date-wrap .cal:hover { color: var(--teal); }
.pick-row .date-wrap { width: 150px; } .pick-row .date-wrap input { margin: 0; }

/* ---------- phone with country dropdown ---------- */
.phone { position: relative; display: flex; gap: 8px; margin-top: 5px; }
.phone > input[name=phone] { margin: 0; flex: 1; min-width: 0; }
.cc-btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; height: 40px; font: inherit; font-size: 14px; color: var(--fg); cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; }
.cc-btn:hover { border-color: var(--teal); }
.cc-btn .caret { color: var(--muted); font-size: 11px; }
img.flag { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); flex: none; }
.cc-menu { position: absolute; z-index: 30; top: 46px; left: 0; width: 320px; max-width: 90vw; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 18px 50px -12px rgba(0, 0, 0, .8); padding: 8px; }
.cc-menu[hidden] { display: none; }
.cc-menu .cc-search { margin: 0 0 6px; }
.cc-menu ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.cc-menu li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.cc-menu li:hover, .cc-menu li.sel { background: rgba(45, 212, 191, .09); }
.cc-menu li .n { flex: 1; } .cc-menu li .d { color: var(--muted); font-size: 13px; }

/* ---------- address / map ---------- */
.addr-grid { grid-template-columns: repeat(6, 1fr); }
.addr-grid label { grid-column: span 2; } .addr-grid label.span2 { grid-column: span 4; }
.addr-grid label:nth-child(2), .addr-grid label:nth-child(3) { grid-column: span 1; }
@media (max-width: 720px) { .addr-grid { grid-template-columns: 1fr 1fr; } .addr-grid label, .addr-grid label.span2 { grid-column: span 2; } }
.map-frame { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.map-frame[hidden] { display: none; }
.map-frame iframe { display: block; width: 100%; height: 320px; border: 0; filter: grayscale(.2) contrast(.95); }

/* ---------- talent header, tabs counters ---------- */
.talent-head { display: flex; gap: 22px; align-items: center; }
.talent-head h1 { margin-bottom: 6px; }
.tabs a .count { margin-left: 6px; }
.panel-note { font-size: 13px; color: var(--muted); }

/* ---------- timeline (history) ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 4px 0 18px 18px; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--teal); }
.timeline li.system::before { border-color: var(--muted); }
.timeline li.call::before { border-color: var(--blue); }
.timeline .when { font-size: 12px; color: var(--muted); }
.timeline .subj { font-weight: 600; }
.timeline .ev-notes { white-space: pre-wrap; color: #cbd5e1; margin: 4px 0 0; }
.timeline .del { float: right; }
.timeline .del button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.timeline .del button:hover { color: var(--bad); }
.tag.kind-call { border-color: rgba(74, 147, 250, .5); color: #9cc2ff; }
.tag.kind-email { border-color: rgba(45, 212, 191, .4); color: #8eeadd; }
.tag.kind-system { color: var(--muted); border-style: dashed; }

/* ---------- NDA cards ---------- */
.nda-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 16px; margin-bottom: 14px; }
.nda-card > summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: center; padding: 12px 0 8px; flex-wrap: wrap; }
.nda-card > summary::-webkit-details-marker { display: none; }
.nda-card .ref { font-weight: 600; flex: 1; min-width: 200px; }
.grid.dates { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.form .photo-up label.btn { display: inline-block; width: auto; margin: 0 6px 0 0; color: var(--fg); font-size: 13px; font-weight: 600; }
.cc-menu { left: auto; right: 0; }
.name-cell > .nm { min-width: 140px; }

/* standardised square thumbnails */
.avatar { aspect-ratio: 1 / 1; flex: none; }
.avatar.sm { width: 44px; height: 44px; border-radius: 10px; }
.avatar.logo { background: #fff; color: #0b111d; }
.avatar.logo img { object-fit: contain; }
.file-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 10px; font-size: 13px; }
.file-line form { display: inline; }
.form .file-line label.btn { display: inline-block; width: auto; margin: 0; color: var(--fg); font-size: 13px; }
.meta-line { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===================== V4 · ERP ===================== */
.brand .crm { margin-left: 8px; }
.gear { margin-left: auto; color: var(--muted); font-size: 18px; padding: 4px 8px; }
.gear:hover { color: var(--teal); text-decoration: none; }
header.top nav a { letter-spacing: .04em; }
.sec-title { display: flex; align-items: baseline; gap: 12px; margin: 34px 0 4px; }
.sec-title h2 { margin: 0; }
.sec-title .muted { font-size: 13px; }
.sec-note { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.cards.six { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card.hot::before { background: linear-gradient(135deg, #f5b942, #f87171); }
.card.neg b { background: none; -webkit-text-fill-color: var(--bad); color: var(--bad); }
.card.pos b { background: none; -webkit-text-fill-color: var(--ok); color: var(--ok); }
.card small.sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card form.inline { display: flex; gap: 6px; margin-top: 6px; }
.card form.inline input { width: 100%; padding: 6px 8px; font-size: 14px; }
.card form.inline button { padding: 4px 10px; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.nowrap, .nowrap { white-space: nowrap; }
.tag.st-active { border-color: rgba(45,212,191,.45); color: var(--ok); background: rgba(45,212,191,.07); }
.tag.st-upcoming { border-color: rgba(74,147,250,.5); color: #9cc2ff; }
.tag.st-sent, .tag.st-in_review { border-color: rgba(245,185,66,.45); color: var(--warn); }
.tag.st-expired, .tag.st-terminated { border-color: rgba(248,113,113,.4); color: var(--bad); }
.tag.st-draft { color: var(--muted); border-style: dashed; }
.tag.inv-draft { color: var(--muted); border-style: dashed; }
.tag.inv-sent { border-color: rgba(245,185,66,.45); color: var(--warn); }
.tag.inv-paid { border-color: rgba(45,212,191,.45); color: var(--ok); }
.tag.inv-overdue, .tag.inv-cancelled { border-color: rgba(248,113,113,.45); color: var(--bad); }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 20px; }
.summary-strip .cell { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.summary-strip .cell b { display: block; font-size: 22px; letter-spacing: -.02em; }
.summary-strip .cell span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.summary-strip .cell.ok { border-color: rgba(45,212,191,.4); }
.summary-strip .cell.bad { border-color: rgba(248,113,113,.45); }
.summary-strip .cell.warn { border-color: rgba(245,185,66,.45); }
.doc-cell { display: inline-flex; gap: 6px; align-items: center; }
.tree-row td:first-child { white-space: nowrap; }
.indent-1 { padding-left: 26px !important; }
.indent-2 { padding-left: 52px !important; }
.branch { color: var(--muted); margin-right: 6px; }
.org-1 { padding-left: 28px !important; } .org-2 { padding-left: 56px !important; } .org-3 { padding-left: 84px !important; }
.intimacy { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.intimacy.warm { color: var(--warn); border-color: rgba(245,185,66,.45); }
.intimacy.close, .intimacy.champion { color: var(--ok); border-color: rgba(45,212,191,.45); }
.intimacy.cold { color: #9cc2ff; border-color: rgba(74,147,250,.4); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 6px 0 16px; }
.filters label { margin: 0; min-width: 140px; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 14px; max-height: 220px; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 10px; }
.checklist label { display: flex; gap: 8px; align-items: center; margin: 0; font-weight: 400; }
.checklist label input { width: auto; }
.risk-list { margin: 0; padding-left: 18px; }
.risk-list li.high { color: var(--bad); } .risk-list li.medium { color: var(--warn); } .risk-list li.low { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 220px; padding: 10px 6px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.bars .m { flex: 1 0 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 11px; color: var(--muted); }
.bars .pair { display: flex; align-items: flex-end; gap: 2px; height: 100%; width: 100%; justify-content: center; }
.bars .rev, .bars .cost { width: 45%; min-height: 2px; border-radius: 4px 4px 0 0; }
.bars .rev { background: var(--grad); } .bars .cost { background: #334155; }
.bars .m.cur .lbl { color: var(--teal); font-weight: 700; }
.bars-labels { display: flex; gap: 6px; padding: 4px 6px; overflow: hidden; }
.bars-labels span { flex: 1 0 34px; text-align: center; font-size: 11px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--grad); }
.legend i.c { background: #334155; }
.progress { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; min-width: 80px; }
.progress i { display: block; height: 100%; background: var(--grad); }
.mission-tot td { font-weight: 700; border-top: 1px solid var(--line); }
.alert { padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(245,185,66,.45); background: rgba(245,185,66,.07); color: var(--warn); margin: 10px 0; }
.alert.bad { border-color: rgba(248,113,113,.45); background: rgba(248,113,113,.07); color: var(--bad); }
.alert.ok { border-color: rgba(45,212,191,.45); background: rgba(45,212,191,.07); color: var(--ok); }
.tabs a.on-tab { color: var(--fg); }
.inv-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .two, .inv-meta { grid-template-columns: 1fr; } }
.cards.seven { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cards.seven .card b { font-size: 28px; }
[hidden] { display: none !important; }
.fc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 10px 0 12px; }
.fc-col h3 { margin: 0 0 8px; }
dl.fc { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin: 8px 0 14px; align-items: center; }
dl.fc dt { color: var(--muted); } dl.fc dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
dl.fc .strong { color: var(--fg); font-weight: 700; border-top: 1px solid var(--line-soft); padding-top: 8px; }
dl.fc small { color: var(--muted); font-weight: 400; margin-left: 6px; }
dl.fc input { width: 130px; text-align: right; }
.neg-t { color: var(--bad); } .pos-t { color: var(--ok); }
@media (max-width: 900px) { .fc-grid { grid-template-columns: 1fr; } }

/* ===================== V5 · Accounting ===================== */
.acc-name { display: block; font-size: 11px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.editor td { padding: 4px 6px; vertical-align: top; } table.editor input, table.editor select { margin: 0; }
table.ledger td.num, table.ledger th.num { width: 120px; }
tr.total td { font-weight: 700; border-top: 1px solid var(--line); }
tr.sub td { font-weight: 600; background: rgba(255,255,255,.02); }
tr.grp td { color: var(--teal); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; padding-top: 16px; }
.rtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rtabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 13px; }
.rtabs a.active, .rtabs a:hover { color: var(--fg); border-color: var(--teal); text-decoration: none; }
.tag.dr { color: #9cc2ff; } .tag.cr { color: #8eeadd; }
.sugg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 2px 0; }
td form.inline-form { display: inline-flex; }
.vat-box { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 14px; margin-bottom: 16px; }
.vat-result { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 10px; }

/* LinkedIn import */
.li-import .li-row { display: flex; align-items: center; gap: 12px; }
.li-result { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(45, 212, 191, .25); background: rgba(45, 212, 191, .05); border-radius: 10px; }
.li-result p { margin: 4px 0; }
.li-result summary { cursor: pointer; margin: 6px 0; }
.li-skills { margin: 6px 0 0; padding-left: 18px; columns: 2; font-size: 13px; }

/* skillsets */
.set-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.chip { background: transparent; color: var(--text, #e6edf3); border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; cursor: pointer; font: inherit; font-size: 13px; }
.chip .count { margin-left: 6px; opacity: .7; font-size: 12px; }
.chip.on { background: rgba(45, 212, 191, .12); border-color: rgba(45, 212, 191, .5); color: #5eead4; }
.set-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.set-bar a.chip { text-decoration: none; }
.set-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.set-edit input { width: auto; margin: 0; }
.row-actions { white-space: nowrap; }
.row-actions select { width: auto; margin: 0 6px 0 0; padding: 5px 8px; font-size: 13px; display: inline-block; }
.row-actions form, .row-actions .btn { display: inline-block; }

/* auth & admin */
.auth-body { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 24px; }
.auth-brand { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.auth-form label { display: block; margin-bottom: 12px; }
.auth-form .btn { width: 100%; margin-top: 6px; }
.auth-alt { margin-top: 10px; }
.usermenu { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 13px; }
.usermenu a { color: var(--muted, #9aa7b8); text-decoration: none; }
.usermenu a:hover { color: #5eead4; }
.usermenu form { margin: 0; }
.linkbtn { background: none; border: none; color: var(--muted, #9aa7b8); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { color: #f87171; }
code.secret { font-size: 18px; letter-spacing: 2px; padding: 6px 10px; background: rgba(255,255,255,.05); border-radius: 8px; user-select: all; }
.alert.ok { background: rgba(45, 212, 191, .1); border-color: rgba(45, 212, 191, .4); color: #99f6e4; }
.row-actions .inline-form { display: inline-block; margin: 2px 4px 2px 0; }
.usermenu .gear { margin-left: 0; }

/* owners & record tracking */
.avatar.xs { width: 24px; height: 24px; border-radius: 50%; font-size: 10px; }
.uchip { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.rec-meta { display: flex; flex-wrap: wrap; gap: 14px 36px; margin: 14px 0 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 13.5px; }
.rec-meta > div { display: flex; align-items: center; gap: 8px; }
.rec-meta .k { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; margin-right: 4px; }
.changelog { margin: 0 0 16px; font-size: 13.5px; }
.changelog summary { cursor: pointer; color: var(--muted); padding: 4px 2px; }
.chg { border-left: 2px solid var(--line); padding: 4px 0 4px 14px; margin: 8px 0; }
.chg ul { margin: 4px 0 0; padding-left: 18px; }
.chg .old { color: var(--muted); text-decoration: line-through; }
.chg .new { color: #99f6e4; }
img.avatar.xs { object-fit: cover; display: inline-block; }

/* ---------- Break-even point ---------- */
.be-supplier { display: flex; align-items: center; gap: 10px; }
.be-table tr.be-off td { opacity: .5; }
.be-table tr.be-off td.row-actions { opacity: 1; }
.be-table tr.be-total td { border-top: 2px solid var(--line); background: rgba(255,255,255,.02); }
.be-share { display: inline-block; width: 46px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); vertical-align: middle; overflow: hidden; margin-right: 4px; }
.be-share i { display: block; height: 100%; background: var(--grad); }
.be-preview { color: var(--muted); margin: 4px 0 14px; min-height: 1.4em; }
.be-preview b { color: var(--fg); }
[data-be-custom][hidden] { display: none; }
.be-days .inline-row { display: flex; align-items: flex-end; gap: 12px; }
.be-days .inline-row label { max-width: 220px; }

.table-scroll { overflow-x: auto; margin-bottom: 18px; }
.table-scroll table { margin-bottom: 0; }

.cards.be-cards { margin-bottom: 26px; }
