/* NexHubCRM — identitate vizuală „Pasul următor” (v1.5.4.2)
   Cerneală #111827 · Albastru #2563EB · Albastru deschis #60A5FA · Fundal brand #F9FAFB, fundal pagini #F0F1F2 (v1.5.4.3) · font DM Sans (local) */
@font-face {
  font-family: "DM Sans"; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url("fonts/dm-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans"; font-style: normal; font-display: swap; font-weight: 100 1000;
  src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --ground: #F0F1F2;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --line: #E5E7EB;
  --line-soft: #F3F4F6;
  --line-strong: #D1D5DB;
  --ink: #111827;
  --muted: #4B5563;
  --rail: #111827;
  --rail-hover: #1F2937;
  --rail-icon: #9CA3AF;
  --accent: #2563EB;
  --accent-ink: #1D4ED8;
  --accent-soft: #EFF6FF;
  --accent-light: #60A5FA;
  --amber-bg: #FFF1DB; --amber-ink: #8A4B00;
  --green-bg: #E2F4EA; --green-ink: #12613D;
  --red-bg: #FDE6E4;   --red-ink: #9A1C12;
  --violet-bg: #EDE7FB; --violet-ink: #5132A8;
  --blue-bg: #EFF6FF;  --blue-ink: #1D4ED8;
  --grey-bg: #F3F4F6;  --grey-ink: #374151;
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--ground); font-size: 15px; line-height: 1.45;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { color: #1E3A8A; }
h1, h2, h3 { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid #60A5FA; outline-offset: 2px; }

/* Cadru */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.rail {
  flex: 0 0 72px; width: 72px; background: var(--rail); display: flex; flex-direction: column;
  align-items: stretch; gap: 6px; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  transition: flex-basis .18s ease, width .18s ease;
}
.rail .logo { width: 40px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.rail .logo svg { width: 30px; height: 30px; transition: transform .15s ease; }
.rail a, .rail .nav-btn, .rail .logo-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px;
  border-radius: 12px; color: var(--rail-icon); background: none; border: 0; cursor: pointer; position: relative;
  font: inherit; font-size: 15px; font-weight: 600; text-align: left; white-space: nowrap;
}
.rail .logo-btn { padding: 0 2px; margin-bottom: 14px; min-height: 48px; }
.rail .logo-btn:hover .logo svg { transform: scale(1.06); }
.rail a svg, .rail .nav-btn svg { flex-shrink: 0; }
.rail a:hover, .rail .nav-btn:hover { background: var(--rail-hover); color: #fff; }
.rail a.on { background: var(--accent); color: #fff; }
.rail .lbl { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail .brand { color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.rail .brand .crm { color: var(--accent-light); font-weight: 500; }
.rail .badge {
  position: absolute; top: 3px; left: 28px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: #F2994A; color: #1A1206; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rail .spacer { flex-grow: 1; }
.rail .me-link { padding: 0 2px; min-height: 52px; margin-top: 4px; }
.rail .me-link.on { background: var(--rail-hover); }
.rail .me {
  width: 40px; height: 40px; border-radius: 99px; background: #DBEAFE; color: #1E3A8A; flex-shrink: 0;
  font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.rail .me-name { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.rail .me-role { display: block; color: var(--rail-icon); font-size: 12.5px; font-weight: 500; }

/* Meniu deschis: apar denumirile */
.nav-open .rail { flex-basis: 232px; width: 232px; }
.nav-open .rail .lbl { display: block; }
.nav-open .rail .badge { position: static; margin-left: auto; }
.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
/* Conținutul ocupă tot ecranul rămas lângă meniu, fie că meniul e restrâns sau deschis */
.content > * { width: 100%; }

/* Antet de pagină */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.page-head .title { flex: 1 1 280px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.back { font-size: 14px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }

/* Butoane și câmpuri */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #D1D5DB; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #1D4ED8; color: #fff; }
.btn.sm { height: 38px; padding: 0 12px; border-radius: 11px; font-size: 14px; }
.btn.danger { color: var(--red-ink); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border: 0; cursor: pointer;
}
.search {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 14px; padding: 0 16px; height: 48px; flex: 1 1 320px; max-width: 460px; color: var(--muted);
}
.search input { border: 0; outline: 0; flex: 1; min-width: 0; font: inherit; color: var(--ink); background: transparent; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 13px; color: var(--red-ink); font-weight: 600; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password],
input[type=search].input, select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 12px; padding: 10px 12px; min-height: 44px; width: 100%;
}
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px #DBEAFE; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters select { width: auto; min-width: 160px; }

/* Carduri */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.card.pad { padding: 22px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { font-size: 18px; font-weight: 700; }
.card-head a { font-size: 14px; font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.row.stretch { align-items: stretch; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* Indicatori */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { padding: 20px; }
.kpi .lbl { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.kpi .ic { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.kpi .val { font-size: 32px; font-weight: 700; margin-top: 10px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 16px; font-weight: 600; color: var(--muted); }
.kpi .sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.kpi.hero { background: var(--accent); border-color: var(--accent); color: #fff; }
.kpi.hero .lbl, .kpi.hero .sub { color: rgba(255,255,255,.92); }

/* Etichete */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill-blue { background: var(--blue-bg); color: var(--blue-ink); }
.pill-amber { background: var(--amber-bg); color: var(--amber-ink); }
.pill-green { background: var(--green-bg); color: var(--green-ink); }
.pill-red { background: var(--red-bg); color: var(--red-ink); }
.pill-violet { background: var(--violet-bg); color: var(--violet-ink); }
.pill-grey { background: var(--grey-bg); color: var(--grey-ink); }

/* Liste de alerte */
.alert-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.alert-item:last-child { border-bottom: 0; }
.alert-item .body { flex: 1; min-width: 0; }
.alert-item .who { font-weight: 700; font-size: 15px; color: var(--ink); }
.alert-item .what { font-size: 14px; color: var(--muted); margin-top: 3px; }
.alert-item .hint { font-size: 13.5px; color: var(--ink); margin-top: 4px; }
.alert-item .actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Grafic */
.bars { display: flex; align-items: flex-end; gap: 18px; height: 240px; padding-top: 8px; border-bottom: 1px solid var(--line-strong); }
.bars .b {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end;
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer; border-radius: 10px 10px 0 0;
}
.bars .b span { font-size: 12.5px; color: var(--muted); min-height: 16px; }
.bars .b div { width: 100%; max-width: 48px; background: #BFDBFE; border-radius: 10px 10px 4px 4px; min-height: 3px; transition: background .15s; }
.bars .b:hover div { background: #93C5FD; }
.bars .b.now span { font-weight: 700; color: var(--ink); }
.bars .b.now div { background: var(--accent); }
.bars.dense { gap: 4px; }
.bars.dense .b div { border-radius: 4px 4px 2px 2px; }
.bar-labels { display: flex; gap: 18px; margin-top: 8px; }
.bar-labels.dense { gap: 4px; }
.bar-labels span { flex: 1; min-width: 0; text-align: center; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: visible; }
.bar-labels span.now { font-weight: 700; color: var(--ink); }
.period-select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.sales-sum .big { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.sales-pick {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; align-items: center;
  margin-top: 10px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); font-size: 14px;
}
.sales-pick a { font-weight: 700; }
a.kpi.link { color: inherit; }
a.kpi.link:hover { border-color: #D1D5DB; box-shadow: 0 2px 0 #D1D5DB; }
a.kpi.link:hover .val { color: var(--accent-ink); }

/* Tabele */
.table-wrap { overflow-x: auto; }
table.data { border-collapse: collapse; width: 100%; }
table.data th {
  font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: left; padding: 12px 16px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { font-size: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.wrap { white-space: normal; min-width: 220px; }
table.data td.r, table.data th.r { text-align: right; }
table.data a.strong { color: var(--ink); font-weight: 600; }
table.data a.strong:hover { color: var(--accent-ink); }
.card > .card-head.in { padding: 20px 22px 0; }
.card > .table-wrap { margin-top: 8px; }

/* Fișa clientului */
.client-head { padding: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.avatar {
  width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 700; font-size: 22px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.client-head .info { flex: 1 1 320px; min-width: 0; }
.client-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.client-head .meta { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); }
.banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 16px;
  background: #FFF4E2; border: 1px solid #F5D7A8; color: #5A3300;
}
.banner.red { background: #FFF6F5; border-color: #F6CFCB; color: #6E160E; }
.banner.green { background: #EFFAF3; border-color: #BFE6CF; color: #0E4A2F; }
.banner .txt { flex: 1 1 300px; }
.stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { padding: 16px; border-radius: 14px; background: var(--surface-2); }
.stat dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat dd { margin: 6px 0 0; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat.good { background: #E9F7EF; } .stat.good dd { color: var(--green-ink); }
.stat.warn dd { color: #A35A00; }
.meter { height: 8px; border-radius: 99px; background: var(--line-soft); margin-top: 6px; }
.meter div { height: 100%; border-radius: 99px; background: var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.timeline li { display: flex; gap: 12px; }
.timeline .dot { width: 10px; height: 10px; border-radius: 99px; background: var(--accent); margin-top: 6px; flex-shrink: 0; }
.timeline .h { font-size: 14px; font-weight: 600; }
.timeline .t { font-size: 14px; color: var(--muted); margin-top: 2px; white-space: pre-line; }
.ticket { padding: 14px; border-radius: 14px; border: 1px solid #F6CFCB; background: #FFF6F5; }
.ticket.done { border-color: var(--line); background: var(--surface-2); }
.ticket + .ticket { margin-top: 10px; }
details.inline-form { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 14px; }
details.inline-form summary { cursor: pointer; font-weight: 700; color: var(--accent-ink); list-style: none; }
details.inline-form summary::-webkit-details-marker { display: none; }
details.inline-form form { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }

/* Comandă nouă */
.lines { display: flex; flex-direction: column; gap: 10px; }
.line {
  display: grid; grid-template-columns: minmax(260px, 2.6fr) 100px minmax(150px, 1.3fr) 150px 44px; gap: 10px; align-items: center;
  padding: 12px; border-radius: 14px; background: var(--surface-2);
}
.line .price { text-align: right; }
.line .price strong { display: block; font-size: 15px; }
.line .price small { color: var(--muted); font-size: 12.5px; }
.line .why { font-size: 12.5px; color: var(--green-ink); font-weight: 600; }
.line .why.none { color: var(--muted); font-weight: 500; }
.line .manual { grid-column: 1 / -1; display: none; gap: 10px; grid-template-columns: 160px 1fr; }
.line.show-manual .manual { display: grid; }
.line-head { display: grid; grid-template-columns: minmax(260px, 2.6fr) 100px minmax(150px, 1.3fr) 150px 44px; gap: 10px; padding: 0 12px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.totals { display: flex; flex-direction: column; gap: 10px; }
.totals .t-row { display: flex; justify-content: space-between; font-size: 15px; }
.totals .t-row.big { font-size: 22px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent-ink); font-weight: 600; cursor: pointer; font-size: 13.5px; }
.sticky { position: sticky; top: 20px; }

/* Mesaje */
.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 12px 16px; border-radius: 14px; background: var(--green-bg); color: var(--green-ink); font-weight: 600; border: 1px solid #BFE6CF; }
.msg.error { background: var(--red-bg); color: var(--red-ink); border-color: #F6CFCB; }

.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Autentificare */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; gap: 0; padding: 24px; }
.auth-brand { display: none; }
@media (min-width: 900px) {
  .auth { padding: 0; align-items: stretch; }
  .auth-brand {
    flex: 0 0 44%; background: var(--ink); color: #fff; display: flex; flex-direction: column;
    justify-content: space-between; padding: 48px 56px;
  }
  .auth .auth-brand .wordmark { color: #fff; font-size: 30px; }
  .auth .auth-brand .wordmark svg { width: 42px; height: 42px; }
  .auth .auth-brand .wordmark .crm { color: var(--accent-light); }
  .auth-claim { margin: 0; font-size: clamp(32px, 3.4vw, 48px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
  .auth-foot { margin: 0; color: #9CA3AF; font-size: 13px; }
  .auth > .card { align-self: center; margin: 24px auto; }
  .auth > .card > .wordmark { display: none; }
}
.auth .card { width: 100%; max-width: 420px; padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.auth .wordmark { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.auth .wordmark svg { width: 36px; height: 36px; flex-shrink: 0; }
.auth .wordmark .crm { color: var(--accent); font-weight: 500; }
.auth .tagline { margin: -6px 0 0; color: var(--muted); font-size: 14px; }

/* Telefon */
@media (max-width: 720px) {
  .rail, .nav-open .rail { flex: 1 1 100%; width: 100%; height: auto; position: static; flex-direction: row; padding: 10px 12px; overflow-x: auto; }
  .rail a, .rail .nav-btn, .rail .logo-btn { width: auto; flex-shrink: 0; }
  .rail .logo-btn { margin: 0 4px 0 0; }
  .nav-open .rail .lbl { display: none; }
  .nav-open .rail .badge { position: absolute; }
  .rail .spacer { display: none; }
  .content { padding: 20px 16px 40px; }
  .line, .line-head { grid-template-columns: 1fr 90px; }
  .line-head { display: none; }
  .line .price { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* Contul meu: conturi bancare */
.banks { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bank-row {
  display: grid; grid-template-columns: minmax(140px, 1fr) minmax(250px, 1.7fr); gap: 10px 12px; align-items: start;
  padding: 14px; border-radius: 14px; background: var(--surface-2);
}
.bank-opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.bank-opts select { width: 104px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bank-row.removing { opacity: .45; }
.bank-row.removing input[type=text] { text-decoration: line-through; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; min-height: 44px; white-space: nowrap; }
.check input { width: 18px; height: 18px; }
.check.del { color: var(--red-ink); }
.bank-ro { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.auth .link-row { font-size: 14px; text-align: center; }
@media (max-width: 720px) { .bank-row { grid-template-columns: 1fr; } }

.date-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.date-filter input { width: auto; }
.rail .brand .ver { display: block; color: var(--rail-icon); font-size: 11.5px; font-weight: 500; }

/* Obiective */
.late { color: var(--red-ink); font-weight: 700; }
.meter.big { height: 12px; margin: 8px 0 16px; }
.goal-pct { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.goal-facts { margin: 0 0 18px; display: flex; flex-direction: column; gap: 10px; }
.goal-facts div { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.goal-facts dt { color: var(--muted); }
.goal-facts dd { margin: 0; font-weight: 700; }

/* Produs: variante */
.variants { display: flex; flex-direction: column; gap: 10px; }
.variant-row {
  display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(110px, 1fr) repeat(3, minmax(90px, 1fr)); gap: 10px; align-items: start;
  padding: 12px; border-radius: 14px; background: var(--surface-2);
}
.variant-row.removing { opacity: .45; }
.variant-opts { grid-column: 1 / -1; display: flex; gap: 20px; }
.form-grid .check.wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .variant-row { grid-template-columns: 1fr 1fr; } }

/* Comandă nouă: căutare produs */
.picker { position: relative; min-width: 0; }
.picker.chosen .js-search { font-weight: 600; border-color: #D1D5DB; }
.picker-list {
  position: absolute; z-index: 20; left: 0; min-width: min(440px, 86vw); top: calc(100% + 4px); margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; max-height: 320px; overflow-y: auto;
  box-shadow: 0 12px 28px rgba(17, 24, 39, .14);
}
.picker-list li { display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.picker-list li[aria-selected="true"], .picker-list li:hover { background: var(--accent-soft); }
.picker-list .p-name { font-weight: 600; font-size: 14px; }
.picker-list .p-meta { font-size: 12.5px; color: var(--muted); }
.picker-list .picker-empty { cursor: default; color: var(--muted); font-size: 14px; }

/* Obiective: istoric note */
.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.note-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note-history .h .pill { margin-left: 6px; padding: 2px 8px; font-size: 12px; }
.row-off td { opacity: .6; }

/* Pagini în dezvoltare */
.soon-notice { padding: 14px 18px; border-radius: 14px; background: var(--amber-bg); color: #5A3300; border: 1px solid #F5D7A8; font-size: 15px; }
.soon-stage { min-height: 420px; display: flex; align-items: center; justify-content: center; }
.soon-icon { color: var(--accent); opacity: .6; display: inline-flex; }
.integration-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.integration { padding: 22px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.integration h2 { font-size: 17px; font-weight: 700; }
.integration p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.int-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }

/* Calendar */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.cal-head h2 { font-size: 20px; font-weight: 700; min-width: 200px; text-align: center; }
.cal-grid { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal-grid th { font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-grid td { height: 84px; vertical-align: top; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-grid td.weekend { background: #F3F4F6; }
.cal-grid td.other { background: none; color: #9CA3AF; }
.cal-grid td.today { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-grid td.today span { display: inline-flex; min-width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 99px; background: var(--accent); color: #fff; }
@media (max-width: 720px) { .cal-grid { border-spacing: 3px; } .cal-grid td { height: 52px; padding: 6px; font-size: 13px; } }

/* Vânzări per agent */
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hb-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; margin-bottom: 6px; }
.hb-head span { color: var(--muted); font-size: 13.5px; }
.hb-track { height: 14px; border-radius: 99px; background: var(--line-soft); }
.hb-track div { height: 100%; border-radius: 99px; background: var(--accent); min-width: 6px; }

/* Canale de vânzare */
.pie-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.pie { width: 180px; height: 180px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pie-hole { width: 100px; height: 100px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pie-hole strong { font-size: 26px; font-weight: 700; line-height: 1; }
.pie-hole small { color: var(--muted); font-size: 12.5px; }
.pie-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; display: flex; flex-direction: column; gap: 12px; }
.pie-legend li { display: grid; grid-template-columns: 14px 1fr auto; column-gap: 10px; align-items: center; }
.pie-legend .sw { width: 14px; height: 14px; border-radius: 4px; }
.pie-legend .lg-name { font-weight: 600; font-size: 14.5px; }
.pie-legend .lg-num { font-weight: 700; font-size: 14px; }
.pie-legend .lg-sub { grid-column: 2 / -1; color: var(--muted); font-size: 12.5px; }

/* v1.5.4.1 · Reducere pe comandă și adresă de livrare */
.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--grey-bg); border-radius: 12px; margin-bottom: 14px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.od-presets { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.od-error { margin: 10px 0 0; color: var(--red-ink); background: var(--red-bg); padding: 8px 12px; border-radius: 10px; font-size: 14px; }
.delivery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.delivery-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .delivery-grid { grid-template-columns: 1fr 1fr; } }
.totals .t-row.sub { font-size: 13px; margin-top: -6px; }
.addr-block { margin: 0; line-height: 1.6; }

/* v1.5.4.3 · Plan / abonament */
.plan-grid { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: flex-start; }
.plan-main { flex: 0 0 240px; display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 14px; background: var(--ink); color: #fff; }
.plan-name { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.plan-name .crm { color: var(--accent-light); font-weight: 500; margin-right: 6px; }
.plan-facts { flex: 1 1 420px; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 24px; }
.plan-facts dt { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.plan-facts dd { margin: 0; }
.plan-note { font-size: 13px; margin: 16px 0 0; }

/* v1.5.4.4 · Comutator TVA și Sumar comandă */
.vat-bar { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin: -8px 0 -6px; font-size: 14px; }
.vat-bar .seg { margin: 0; background: var(--surface); border: 1px solid var(--line); }
.vat-bar .seg input:checked + span { background: var(--ink); color: #fff; box-shadow: none; }
.summary-lines { list-style: none; margin: 0; padding: 0 0 4px; display: flex; flex-direction: column; gap: 10px; border-bottom: 1px solid var(--line); }
.summary-lines li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 14px; }
.summary-lines .s-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.summary-lines .s-meta { color: var(--muted); font-size: 12.5px; }
.summary-lines .s-net { text-align: right; font-weight: 600; }
.summary-lines .s-gross { text-align: right; color: var(--muted); font-size: 12.5px; }
.summary-empty { margin: 0; color: var(--muted); font-size: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.totals .t-row.gross { font-size: 18px; font-weight: 700; }
.totals .t-row.big + .t-row.gross { margin-top: -4px; }
.totals h2 { font-size: 18px; }
[hidden] { display: none !important; }
.line .price .js-unit { white-space: pre-line; }

/* v1.5.4.5 · Administrare echipe și activități */
.av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 99px;
  background: #DBEAFE; color: #1E3A8A; font-weight: 700; letter-spacing: .02em; }
.av-sm { width: 28px; height: 28px; font-size: 11.5px; }
.av-md { width: 36px; height: 36px; font-size: 13px; }
table.data .who { display: flex; align-items: center; gap: 10px; }
.assignee { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.row-actions { display: inline-flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.row-actions form { margin: 0; }
.chip-sm { display: inline-block; padding: 2px 9px; margin: 2px 4px 2px 0; border-radius: 99px; background: var(--grey-bg); color: var(--grey-ink); font-size: 12.5px; font-weight: 600; }
.region-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; }
.region-list > li { border-bottom: 1px solid var(--line-soft); }
.region-list summary { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.region-list summary::-webkit-details-marker { display: none; }
.region-list summary::after { content: "Editează"; color: var(--accent-ink); font-size: 13px; font-weight: 600; margin-left: auto; padding-left: 12px; }
.region-list details[open] summary::after { content: "Închide"; }
.region-list summary > span:first-child { min-width: 0; }
.region-form { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(160px, 1.4fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.region-form.add { margin: 0; }
@media (max-width: 720px) { .region-form { grid-template-columns: 1fr; } }
.region-del { margin: 0 0 12px; }
.danger-link { color: var(--red-ink); }
.matrix th.c, .matrix td.c { text-align: center; }
.matrix .ok { color: var(--green-ink); display: inline-flex; }
.check-grid { display: flex; flex-wrap: wrap; gap: 0 20px; }
.label-like { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.type-seg { margin-bottom: 18px; }
.field.is-off { opacity: .5; }
table.data.compact th, table.data.compact td { padding-left: 10px; padding-right: 10px; }
table.data.compact th:first-child, table.data.compact td:first-child { padding-left: 16px; }

/* v1.5.4.6 · Activitate: editare cu creion și cardul Detalii */
.pen { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; flex-shrink: 0; }
.pen:hover { color: var(--accent-ink); border-color: var(--accent); }
.title-view { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-input { display: none; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-input input { flex: 1 1 360px; font-size: 22px; font-weight: 700; padding: 8px 12px; }
.title-input .err { flex-basis: 100%; }
.title-edit.editing .title-view { display: none; }
.title-edit.editing .title-input { display: flex; }
.type-view { display: flex; align-items: center; gap: 10px; }
.type-pick .type-seg { display: none; margin: 14px 0 0; }
.type-pick.editing .type-view + .type-seg { margin-top: 14px; }
.type-pick:not(:has(.type-view)) .type-seg { margin-top: 0; }
.type-pick.editing .type-seg { display: inline-flex; }
.detail-owner { display: flex; flex-direction: column; gap: 10px; padding-bottom: 16px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.detail-owner .assignee strong { display: block; }
.d-label { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.d-sub { display: block; font-size: 12.5px; }
.detail-owner .field { margin: 0; }

/* v1.5.4.8 · Formular client pe 3 coloane fixe; import clienți */
.form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.three .field:has(#id_owner) { grid-column: 1 / span 1; }
@media (max-width: 860px) { .form-grid.three { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .form-grid.three { grid-template-columns: 1fr; } }
.filters .push-right { margin-left: auto; }
.steps { list-style: none; display: flex; gap: 8px; margin: -6px 0 0; padding: 0; counter-reset: st; flex-wrap: wrap; }
.steps li { counter-increment: st; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.steps li::before { content: counter(st); width: 24px; height: 24px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: var(--grey-bg); font-size: 12.5px; }
.steps li.now { color: var(--ink); border-color: var(--accent); }
.steps li.now::before { background: var(--accent); color: #fff; }
.steps li.done::before { content: "✓"; background: var(--green-bg); color: var(--green-ink); }
.verdict { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.verdict.ok { background: var(--green-bg); color: var(--green-ink); }
.verdict.warn { background: var(--amber-bg); color: var(--amber-ink); }
.verdict.bad { background: var(--red-bg); color: var(--red-ink); }
.err-list { margin: 0; padding-left: 20px; color: var(--red-ink); }
.import-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px 24px; margin: 0 0 14px; }
.import-facts dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.import-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.confirm-box { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--accent); background: var(--accent-soft); }
.confirm-box p { margin: 0 0 12px; font-size: 16px; }
.hint-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* v1.5.4.9 · Ștergere client */
.delete-box { max-width: 720px; }
.delete-box .q { font-size: 17px; margin: 0 0 10px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn.danger-solid { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn.danger-solid:hover { background: #7A150D; }
.btn.danger-solid:disabled { opacity: .45; cursor: not-allowed; }

/* v1.5.5.0 · Securitate: avertizare sesiune, jurnal de audit */
.session-warn { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.session-warn .card { max-width: 420px; width: 100%; box-shadow: 0 20px 40px rgba(17, 24, 39, .25); }
.session-warn h2 { font-size: 19px; margin: 0 0 8px; }
.audit-changes { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.audit-changes li { overflow-wrap: anywhere; }
.audit-changes .k { color: var(--muted); }
.audit-filters { flex-wrap: wrap; }
.audit-filters input[type=date] { max-width: 170px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 16px; }
.immutable-note { display: inline-flex; align-items: center; gap: 8px; color: var(--green-ink); font-weight: 600; font-size: 13.5px; }

/* v1.5.5.2 · Taburi Activități */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: -6px; }
.tabs .tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; font-weight: 700; color: var(--muted);
  border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs .tab:hover { color: var(--ink); }
.tabs .tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--grey-bg); color: var(--grey-ink);
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.tabs .tab.on .tab-count { background: var(--accent-soft); color: var(--accent-ink); }
.impact { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.btn.icon-only { padding: 0 10px; }

/* v1.5.5.3 */
.vat-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; }
.tier-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.tier-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(160px, 1.3fr) auto; gap: 10px; align-items: end; }
.tier-row.removing { opacity: .45; }
@media (max-width: 720px) { .tier-row { grid-template-columns: 1fr; } }
.tier { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; vertical-align: 1px; }
.tier-0 { background: var(--ink); color: #fff; }
.tier-1 { background: #FEF3C7; color: #92400E; }
.tier-2 { background: #E5E7EB; color: #374151; }
.tier-3, .tier-4, .tier-5 { background: var(--accent-soft); color: var(--accent-ink); }
.client-warning { display: flex; gap: 10px; align-items: flex-start; }
.ticket-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; min-width: 96px; }

/* Rapoarte (v1.5.5.4) */
.r-dates { display: inline-flex; align-items: center; gap: 6px; }
.r-dates[hidden] { display: none; }
.r-dates input { width: auto; }
.r-period { margin: 14px 0 0; font-size: 14px; }
.chg { display: inline-block; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 999px; background: var(--line-soft); color: var(--muted); }
.chg.up { background: #DCFCE7; color: #166534; }
.chg.down { background: #FEE2E2; color: #991B1B; }
.rchart { display: flex; align-items: flex-end; gap: 10px; height: 240px; padding-top: 8px; border-bottom: 1px solid var(--line-strong); }
.rchart.dense { gap: 3px; }
.rcol { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; min-width: 0; }
.rbar { width: 100%; max-width: 48px; min-height: 3px; background: #BFDBFE; border-radius: 8px 8px 3px 3px; transition: height .2s, background .15s; }
.rchart.dense .rbar { border-radius: 3px 3px 1px 1px; }
.rcol:hover .rbar { background: #93C5FD; }
.rcol.now .rbar { background: var(--accent); }
.rlabels { display: flex; gap: 10px; margin-top: 8px; }
.rlabels.dense { gap: 3px; }
.rlabels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: visible; }

/* v1.6 · Activități: taburi mari, obiective pe echipă, bifă rapidă */
.act-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.act-tab { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface);
  border: 2px solid var(--line); color: var(--ink); transition: border-color .15s, background .15s; }
.act-tab:hover { border-color: var(--accent); }
.act-tab .act-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--grey-bg); color: var(--muted); flex: none; }
.act-tab .act-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.act-tab .act-txt strong { font-size: 18px; }
.act-tab .act-txt small { color: var(--muted); font-size: 13px; }
.act-tab .act-count { display: flex; flex-direction: column; align-items: flex-end; font-size: 22px; font-weight: 700; line-height: 1.1; }
.act-tab .act-count small { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.act-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .25); }
.act-tab.on .act-ic { background: rgba(255, 255, 255, .18); color: #fff; }
.act-tab.on .act-txt small, .act-tab.on .act-count small { color: rgba(255, 255, 255, .85); }
.team-av { background: var(--accent-soft); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.lbl-plain { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.assign-seg { margin-bottom: 4px; }
.assign-seg span { padding: 7px 12px; font-size: 13.5px; }
table.contrib { margin-top: 10px; }
table.data th.c, table.data td.c { text-align: center; }
.done-check { width: 20px; height: 20px; accent-color: var(--green-ink); cursor: pointer; }
.done-check:disabled { cursor: default; }
dialog.confirm { border: none; border-radius: 18px; padding: 24px; max-width: 440px; width: calc(100% - 32px);
  box-shadow: 0 20px 50px rgba(17, 24, 39, .25); }
dialog.confirm::backdrop { background: rgba(17, 24, 39, .45); }
dialog.confirm h2 { font-size: 19px; margin: 0 0 8px; }
dialog.confirm p { margin: 0 0 18px; color: var(--muted); }
