:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --text: #16202b;
  --muted: #64748b;
  --line: #e2e6ec;
  --accent: #1f4e8c;
  --accent-text: #ffffff;
  --ok: #1a7f4b; --ok-bg: #e4f5ea;
  --warn: #9a5b00; --warn-bg: #fff2d6;
  --danger: #b42318; --danger-bg: #fde8e6;
  --info: #175cd3; --info-bg: #e3edfb;
  --neutral-bg: #eceff3;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419; --surface: #171d25; --surface-2: #1d2530; --text: #e6ebf1; --muted: #93a0b1; --line: #2a3340;
    --accent: #5b9cf0; --accent-text: #0b1220;
    --ok: #4ade80; --ok-bg: #11301f; --warn: #fbbf24; --warn-bg: #3a2a08; --danger: #f87171; --danger-bg: #3b1514;
    --info: #7fb3ff; --info-bg: #142542; --neutral-bg: #242d38;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.45rem; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1rem; margin: 0 0 .75rem; font-weight: 650; }
h3 { font-size: .9rem; margin: 1.25rem 0 .5rem; font-weight: 650; }
p { margin: .4rem 0; }
code { background: var(--neutral-bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.small { font-size: .82rem; }
.muted { color: var(--muted); }
.danger-text { color: var(--danger); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

/* Layout */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 230px; flex: 0 0 230px; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: .95rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-text); font-weight: 800; font-size: .85rem; letter-spacing: .02em; }
.brand.big { font-size: 1.1rem; margin-bottom: 1rem; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: .92rem; }
.sidebar nav a:hover { background: var(--surface-2); text-decoration: none; }
.sidebar nav a.active { background: var(--info-bg); color: var(--accent); font-weight: 600; }
.sidebar nav .ico { width: 20px; text-align: center; opacity: .8; }
.sidebar nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 12px; }
.content { flex: 1; padding: 26px 32px 60px; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }

/* Cards & grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card.table-wrap { padding: 0; overflow-x: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-2, .grid-main { grid-template-columns: 1fr; } }
.grid-2 > *, .grid-main > *, .grid-3 > *, .col { min-width: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); }
.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat-n { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-l { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.stat.warn .stat-n { color: var(--warn); } .stat.info .stat-n { color: var(--info); } .stat.ok .stat-n { color: var(--ok); }

/* Key facts */
.keyfacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kf { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kf.danger { border-left-color: var(--danger); } .kf.warn { border-left-color: var(--warn); } .kf.ok { border-left-color: var(--ok); }
.kf-l { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kf-v { font-size: 1.15rem; font-weight: 700; margin: 2px 0; }
.kf-v.small-v { font-size: .95rem; }
.kf-s { font-size: .8rem; color: var(--muted); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td, .table.compact th { padding: 7px 8px; }
.table tr.unread td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.table.criteria { margin: 8px 0 12px; }

/* Badges, pills, tags */
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--neutral-bg); color: var(--muted); }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.danger { background: var(--danger-bg); color: var(--danger); }
.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--neutral-bg); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.info { background: var(--info-bg); color: var(--info); } .pill.muted { color: var(--muted); }
.tag { display: inline-block; font-size: .7rem; padding: 1px 6px; border-radius: 4px; background: var(--neutral-bg); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tag.warn { background: var(--warn-bg); color: var(--warn); } .tag.danger { background: var(--danger-bg); color: var(--danger); } .tag.info { background: var(--info-bg); color: var(--info); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--info); margin-left: 4px; vertical-align: middle; }

/* Alerts */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .9rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok); } .alert.danger { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: var(--info-bg); color: var(--info); } .alert.warn { background: var(--warn-bg); color: var(--warn); }

/* Forms */
label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
label.checkbox, .checks-inline label { display: flex; align-items: center; gap: 6px; color: var(--text); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
input[type=checkbox] { width: auto; display: inline; margin: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
input.copy { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; margin-top: 6px; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }
legend { font-size: .8rem; color: var(--muted); padding: 0 4px; }
.checks-inline { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.form-row label.wide { grid-column: 1 / -1; }
.form-row label { margin-bottom: 0; }
.add-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.add-row input { margin: 0; }
form.inline { display: inline; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 8px; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { margin: 0; }
@media (max-width: 900px) { .filters { grid-template-columns: 1fr 1fr; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); border-color: var(--danger-bg); }
.btn.small { padding: 5px 9px; font-size: .8rem; }
.btn.block { width: 100%; justify-content: center; }
button.check, button.x { background: none; border: 0; cursor: pointer; font: inherit; color: var(--text); padding: 0 4px; font-size: 1.1rem; line-height: 1; }
button.x { color: var(--muted); font-size: 1rem; opacity: .5; } button.x:hover { opacity: 1; color: var(--danger); }

/* Facts list */
dl.facts { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
dl.facts dt { color: var(--muted); font-size: .8rem; padding-top: 2px; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
dl.facts.small { font-size: .84rem; grid-template-columns: 130px 1fr; }
@media (max-width: 600px) { dl.facts { grid-template-columns: minmax(0, 1fr); } }

/* Details / lots */
details { border-top: 1px solid var(--line); padding: 8px 0; }
details summary { cursor: pointer; font-weight: 600; font-size: .9rem; list-style: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
details summary::-webkit-details-marker { display: none; }
details summary::before { content: "▸"; color: var(--muted); font-size: .8rem; }
details summary > .sum-t { flex: 1 1 0; min-width: 0; } /* text lung: rămâne lângă săgeată și se rupe pe rânduri (telefon) */
details[open] > summary::before { content: "▾"; }
details p { font-size: .88rem; }
details.lot { border-left: 3px solid transparent; padding-left: 8px; margin-left: -8px; }
details.lot.lot-yes { border-left-color: var(--ok); } details.lot.lot-no { opacity: .65; }
details.lot > summary { display: grid; grid-template-columns: 14px 52px minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; }
details.lot > summary::before { grid-column: 1; }
.lot-no { font-size: .75rem; color: var(--muted); text-transform: uppercase; }
.lot-title { min-width: 0; }
.lot-val { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lot-g { white-space: nowrap; }
@media (max-width: 700px) { details.lot > summary { grid-template-columns: 14px 52px 1fr; } details.lot > summary > :nth-child(n+3) { grid-column: 3; justify-self: start; } }
.lot-body { padding: 10px 0 6px 16px; }

/* Lists */
.bullets { padding-left: 18px; font-size: .9rem; }
ul.docs, ul.timeline, ul.checklist { list-style: none; padding: 0; margin: 0; }
ul.docs li { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
ul.docs li.new { box-shadow: inset 3px 0 0 var(--info); padding-left: 8px; }
ul.timeline li { padding: 8px 0 8px 14px; border-left: 2px solid var(--line); margin-left: 4px; font-size: .88rem; position: relative; }
ul.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
ul.timeline li.new::before { background: var(--info); }
ul.checklist li { display: flex; align-items: flex-start; gap: 6px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
ul.checklist li .item { flex: 1; }
ul.checklist li.done .item { text-decoration: line-through; color: var(--muted); }
.progress { height: 6px; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.progress div { height: 100%; background: var(--ok); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 12px; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; }
.cal-item { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
ul.checks { list-style: none; padding: 0; font-size: .88rem; }
ul.checks li.ok { color: var(--ok); } ul.checks li.bad { color: var(--danger); }

/* Dosar AI */
.pnum { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--neutral-bg); color: var(--muted); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }
.grid-2.inner { margin: 6px 0; }
.conf-summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 0 6px; }
.pill.danger { background: var(--danger-bg); color: var(--danger); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.table.matrix tr.v-danger td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.table.matrix tr.v-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.table.matrix tr.v-info td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.table.matrix tr.v-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.table-wrap { overflow-x: auto; position: relative; } /* position: elementele absolute din tabel (ex. .sr-only) rămân în zona derulată */
pre.log { white-space: pre-wrap; font-size: .75rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 260px; overflow: auto; }
.alert.live { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-lot .lot-body h3 { margin-top: 14px; }
.conf-form { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }

/* Vizibilitate Dosar AI */
.sidebar nav a.nav-ai:not(.active) { background: linear-gradient(90deg, var(--info-bg), transparent); }
.sidebar nav .count.busy { background: var(--info); }
.sidebar nav .count.warn { background: var(--warn); }
.sidebar-foot .version { margin-top: 6px; opacity: .7; }
.ai-setup { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
@media (max-width: 900px) { .ai-setup { grid-template-columns: 1fr; } }
.setup-step { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); font-size: .9rem; min-width: 0; }
.setup-step .btn { margin-top: 6px; }
.setup-step.done .pnum { background: var(--ok-bg); color: var(--ok); }
.setup-step.todo { border-color: var(--warn); }
.setup-step.todo .pnum { background: var(--warn-bg); color: var(--warn); }
.ai-card { border-color: var(--accent); }
.ai-card .btn.block { margin-top: 8px; }
.stat.ai { border-color: var(--accent); }
.card.ai-settings { border-color: var(--accent); }

/* Cronometru AI */
.timer-bar { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 800px) { .timer-bar { grid-template-columns: 1fr; } }
.tstat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.tstat.main { border-left: 4px solid var(--accent); }
.tstat .tl { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tstat .tv { font-size: 1.5rem; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tstat .ts { font-size: .8rem; color: var(--muted); }
.tstat.runs { grid-column: 1 / -1; border-top: 1px solid var(--line); }
.live-timer { font-variant-numeric: tabular-nums; }

/* Feedback */
.fb-card { border-color: var(--accent); }
.fb-form textarea { min-height: 90px; }
.fb-item { border-top: 1px solid var(--line); padding: 10px 0; font-size: .9rem; }
.fb-item .fb-meta { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-item .fb-text { white-space: pre-wrap; margin: 6px 0; }
.fb-item .fb-reply { background: var(--info-bg); color: var(--text); border-radius: 8px; padding: 8px 10px; margin-top: 6px; font-size: .85rem; }
.fb-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 800px) { .fb-pair { grid-template-columns: 1fr; } }
.fb-pair > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.fb-pair h4 { margin: 0 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fb-pair .fb-text { white-space: pre-wrap; }
.stars { display: inline-flex; gap: 2px; }
.stars input { display: none; }
.stars label { font-size: 1.4rem; color: var(--line); cursor: pointer; margin: 0; }
.stars label:hover, .stars label:hover ~ label, .stars input:checked ~ label { color: #f5a524; }
.stars { flex-direction: row-reverse; justify-content: flex-end; }
.rating-view { color: #f5a524; letter-spacing: 1px; }

/* Auth */
.auth-page { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 400px; box-shadow: var(--shadow); }
.auth-card h1 { margin-bottom: 14px; }

/* Responsive */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; flex: none; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .sidebar nav a { padding: 6px 8px; font-size: .82rem; }
  .sidebar nav a span:not(.ico):not(.count) { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; gap: 10px; align-items: center; }
  .content { padding: 16px; }
  .stat-n { font-size: 1.4rem; }
}
/* Feedback – pagina administratorului */
.fb-lang .inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-lang .inline-form label { margin: 0; font-weight: 600; font-size: .88rem; }
.fb-lang .inline-form select { width: auto; margin: 0; }
.fb-admin .fb-meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.fb-admin .fb-meta strong { color: var(--text); font-size: .95rem; }
.fb-admin .fb-tender { margin: 0 0 10px; }
.fb-summary { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 10px 0; font-size: .88rem; }
.fb-summary dt { font-weight: 600; color: var(--muted); }
.fb-summary dd { margin: 0; }
.fb-actions { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.fb-update { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; flex: 1 1 520px; min-width: 0; }
.fb-update label { margin: 0; font-size: .8rem; color: var(--muted); }
.fb-update label.grow { flex: 1 1 280px; min-width: 0; }
.fb-update select, .fb-update textarea { margin: 4px 0 0; }
.fb-update textarea { min-height: 38px; }
.fb-admin ul.bullets ul { margin: 2px 0; }
.fb-older > summary { padding: 8px 0; border-top: 1px solid var(--line); color: var(--accent); }
.fb-item.just-sent { background: var(--ok-bg); border-radius: 8px; padding: 10px 12px; border-top-color: transparent; }

/* ================= v3 ================= */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.warn-text { color: var(--warn); }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
.break { word-break: break-all; }
.self-end { align-self: end; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.linklike:hover { text-decoration: underline; }
.tag.ad { background: #efe7fb; color: #6a3fb5; }
@media (prefers-color-scheme: dark) { .tag.ad { background: #2c2140; color: #c4a7f5; } }
.side { min-width: 0; }

/* Meniu pe grupe, clopoțel, utilizator */
.sidebar nav .nav-group { margin: 12px 10px 2px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.sidebar { overflow-y: auto; }
.sidebar-foot { display: flex; flex-direction: column; gap: 4px; }
.sidebar-foot .bell { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: .88rem; padding: 4px 0; }
.sidebar-foot .bell .count { background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.sidebar-foot .bell:hover { text-decoration: none; }
.sidebar-foot .me { color: var(--text); font-weight: 600; }
@media (max-width: 860px) {
  .sidebar nav .nav-group { display: none; }
  .sidebar-foot { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot .bell .lbl, .sidebar-foot .version { display: none; }
}

/* Numărători inverse */
.live-countdown { font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-countdown.soon { color: var(--danger); font-weight: 700; }
.live-countdown.past { color: var(--muted); }
.catalog-alert { border-left: 4px solid var(--warn); }

/* Comentarii */
details.comments { border-top: 0; padding: 4px 0; margin-top: 4px; }
details.comments > summary { font-weight: 500; font-size: .8rem; color: var(--accent); }
details.comments > summary::before { content: none; }
details.comments[open] > summary { color: var(--muted); }
details.comments .c-body { margin-top: 6px; border-left: 2px solid var(--line); padding-left: 10px; }
details.comments .c-item { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .86rem; }
details.comments .c-meta { font-size: .76rem; color: var(--muted); display: flex; gap: 6px; align-items: center; }
details.comments .c-meta strong { color: var(--text); }
details.comments .c-text { white-space: normal; word-wrap: break-word; margin-top: 2px; }
details.comments .c-form { margin-top: 6px; display: flex; gap: 6px; align-items: flex-end; }
details.comments .c-form textarea { margin: 0; min-height: 38px; font-size: .86rem; }
details.comments.compact .c-form { flex-direction: column; align-items: stretch; }
details.comments.compact .c-form .btn { align-self: flex-start; }
#discutie details.comments > summary { font-size: .9rem; }
ul.c-index { list-style: none; padding: 0; margin: 6px 0 0; }
ul.c-index li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.prod-comments { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; margin: 8px 0; }
.prod-c { border-top: 1px solid var(--line); padding-top: 4px; min-width: 0; }

/* Echipa licitației */
ul.team { list-style: none; padding: 0; margin: 6px 0 10px; }
ul.team li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
ul.team .grow { flex: 1; min-width: 0; }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--info-bg); color: var(--accent); font-weight: 700; font-size: .8rem; }
.pick-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin: 6px 0 8px; background: var(--surface-2); }
label.pick { display: flex; align-items: baseline; gap: 6px; color: var(--text); font-size: .86rem; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
label.pick:last-child { border-bottom: 0; }
label.pick input { flex: 0 0 auto; }
input.pick-filter { margin: 4px 0 0; padding: 6px 9px; font-size: .85rem; }
fieldset.team-pick { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; }
fieldset.team-pick legend { font-size: .82rem; color: var(--muted); padding: 0 4px; }
.add-row.wrap { flex-wrap: wrap; }
.add-row select { margin: 0; width: auto; flex: 1 1 140px; }
.danger-zone { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--danger-bg); }

/* Notificări */
.notif-list { padding: 0; }
.notif-list .notif { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.notif-list .notif:last-child { border-bottom: 0; }
.notif-list .notif:hover { background: var(--surface-2); text-decoration: none; }
.notif-list .notif.unread { background: var(--info-bg); }
.notif-list .notif.unread strong::before { content: "● "; color: var(--info); }
.notif-ico { font-size: 1.2rem; line-height: 1.2; }
.notif-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-body { font-size: .86rem; white-space: pre-line; }
ul.notif-list.compact { list-style: none; margin: 0 0 8px; }
ul.notif-list.compact li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
ul.notif-list.compact li.unread > a { font-weight: 700; }
ul.notif-list.compact li.unread > a::before { content: "● "; color: var(--info); }

/* Autentificare cu cod */
.auth-title { margin: 0 0 10px; font-size: 1.05rem; }
.auth-links { margin-top: 12px; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
input.otp { font-size: 1.6rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; padding: 10px; }

/* Audit */
.audit-filters { grid-template-columns: 1.4fr 1fr 1fr .8fr .8fr auto; }
.audit-details { max-width: 520px; word-wrap: break-word; }
.tag.audit-login, .tag.audit-acces_acordat, .tag.audit-oferta_trimisa, .tag.audit-oferta_deschisa { background: var(--ok-bg); color: var(--ok); }
.tag.audit-login_esuat, .tag.audit-cod_gresit, .tag.audit-acces_refuzat, .tag.audit-licitatie_stearsa, .tag.audit-oferta_eroare, .tag.audit-oferta_ratata, .tag.audit-oferta_redirectionata { background: var(--danger-bg); color: var(--danger); }
.tag.audit-acces_retras, .tag.audit-utilizator_dezactivat, .tag.audit-comentariu_sters, .tag.audit-document_sters { background: var(--warn-bg); color: var(--warn); }
.tag.audit-setari, .tag.audit-regula_ai, .tag.audit-export, .tag.audit-audit_export { background: var(--info-bg); color: var(--info); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; font-size: .88rem; }
@media (max-width: 900px) { .audit-filters { grid-template-columns: 1fr 1fr; } }

/* Firme */
.company-row { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.company-row:last-child { border-bottom: 0; }
.anaf-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 12px; }
.logo-preview { max-height: 60px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; background: #fff; margin: 4px 0; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Căutări automate */
.search-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.search-row:last-child { border-bottom: 0; }
.search-row.active { background: var(--info-bg); margin: 0 -10px; padding: 10px; border-radius: 8px; }
.ai-expand { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 12px; background: var(--info-bg); border-radius: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
label.chip { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .84rem; background: var(--surface); cursor: pointer; }
label.chip input[type=text], label.chip input:not([type]) { margin: 0; }
input.mini { display: inline-block; width: 74px; margin: 0 4px; padding: 3px 6px; }
input.mini-dt { display: inline-block; width: auto; margin: 2px 0 0; padding: 3px 6px; font-size: .82rem; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.type-grid > div { min-width: 0; }
.type-grid label:not(.pick) { margin-top: 8px; }
@media (max-width: 1000px) { .type-grid { grid-template-columns: 1fr; } }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Oportunități */
.opp-table td { font-size: .88rem; }
.opp-table tr.row-catalog td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.match-cell { max-width: 260px; }
.match-cell .tag { text-transform: none; letter-spacing: 0; margin: 0 4px 3px 0; }
.filters .checkbox { margin: 0; white-space: nowrap; }

/* Oferte pe e-mail */
.offer { border-top: 1px solid var(--line); padding: 14px 0; }
.offer:first-of-type { border-top: 0; }
.offer-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.offer-proof { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.track-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin: 8px 0; }
.tstat .tv.small-tv { font-size: 1rem; }
.att-group { display: flex; flex-direction: column; gap: 0; margin-bottom: 8px; }
.send-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 8px 0; }
label.radio-card { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); margin: 0; cursor: pointer; background: var(--surface); }
label.radio-card:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
label.radio-card input[type=radio] { width: auto; margin-top: 3px; }

/* Feedback — versiunea pentru AI + reguli */
.fb-pair > div.fb-ai { background: var(--info-bg); border-color: transparent; }
.fb-ai-title { margin: 0 0 4px; }
pre.fb-md { white-space: pre-wrap; word-wrap: break-word; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: .8rem; max-height: 360px; overflow: auto; }
.fb-rule { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--surface-2); }
.fb-rule textarea { min-height: 44px; }
.fb-summary ol, .fb-summary ul { margin: 0; padding-left: 18px; }
tr.muted td { opacity: .6; }

/* Tipărire */
@media print {
  .sidebar, .page-head .actions, details.comments, .no-print, .fb-card { display: none !important; }
  .content { padding: 0; }
}
.sec-row { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.sec-row h2 { margin-bottom: 4px; }
.sec-row .inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sec-row .inline-form select { width: auto; margin: 0; max-width: 100%; }
.table td.col-main { min-width: 210px; }
.grid-side-main { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2.3fr); gap: 18px; }
.grid-side-main > * { min-width: 0; }
@media (max-width: 1100px) { .grid-side-main { grid-template-columns: 1fr; } }
.ai-expand .btn { white-space: normal; text-align: left; }
label.inline-label { display: inline-flex; align-items: center; gap: 4px; margin: 0; color: var(--text); font-size: .86rem; }
label.inline-label input.mini { margin: 0 2px; }
label.checkbox > span, label.pick > span { min-width: 0; }
label.checkbox input.mini { display: inline-block; }
.form-row.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 700px) { .form-row.two-col { grid-template-columns: 1fr; } }

/* v3.1 — Dosar AI: ce se întâmplă acum, pașii operațiunii */
.tstat .tnow { font-size: .9rem; margin: 6px 0 4px; padding: 7px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.tsteps { margin-top: 8px; }
.tsteps > summary { cursor: pointer; color: var(--muted); }
.steps-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.steps-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 4px; font-size: .86rem; }
.steps-list li > div { grid-column: 2; overflow-wrap: anywhere; }
.steps-list .st-ic { text-align: center; }
.steps-list .st-done .st-ic { color: var(--ok); } .steps-list .st-error .st-ic { color: var(--danger); }
.steps-list .st-running .st-ic { color: var(--info); } .steps-list .st-blocat .st-ic { color: var(--warn); }
.steps-list .st-queued { opacity: .75; }

/* v3.1 — matricea de conformitate: verdicte modificate manual, condiția pentru documente */
.table.matrix tr.manual td:first-child { box-shadow: inset 3px 0 0 var(--ok), inset 6px 0 0 var(--surface), inset 8px 0 0 var(--muted); }
.verdict-cell { min-width: 150px; }
.verdict-cell select, .verdict-cell input { margin-top: 2px; padding: 5px 7px; font-size: .82rem; }
.manual-note { margin-top: 4px; padding: 4px 6px; border-radius: 6px; background: var(--neutral-bg); color: var(--muted); line-height: 1.3; }
textarea.mini-area { min-width: 160px; font-size: .84rem; padding: 5px 7px; }
.alert.gate ul.gate-list { margin: 6px 0 0; padding-left: 18px; }
.alert.gate ul.gate-list a { color: inherit; text-decoration: underline; }
.kf.conf-ok { border-left-color: var(--ok); } .kf.conf-bad { border-left-color: var(--danger); }

/* v3.1 — setări editabile din aplicație */
.cfg-form .form-row { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cfg-form label.wide { grid-column: 1 / -1; }
.field-help { display: block; font-size: .76rem; color: var(--muted); margin-top: 3px; line-height: 1.3; }
details#cfg-securitate, details#cfg-ai { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
details#cfg-securitate > summary, details#cfg-ai > summary { cursor: pointer; color: var(--accent); }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.ok-text { color: var(--ok); }
.trash-table td { vertical-align: top; }
.sidebar nav a .count.neutral { background: var(--neutral-bg); color: var(--muted); }

/* v3.1 — zonă (căutări automate, oportunități) */
.zone-picker { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.zone-body { margin-top: 8px; }
.county-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2px 10px; margin: 4px 0 10px; }
.county-grid label.pick { margin: 0; }
.county-grid label.in-region { color: var(--ok); font-weight: 600; }
.loc { color: var(--muted); }
.filters > * { min-width: 0; }
.filters.flex { display: flex; flex-wrap: wrap; }
.filters.flex > select, .filters.flex > input { flex: 1 1 170px; width: auto; max-width: 100%; }
.filters.flex > .checkbox { flex: 0 1 auto; white-space: normal; }
.sec-row .inline-form { max-width: 100%; }
.sec-row .inline-form select { min-width: 0; flex: 1 1 auto; }
#cron details table { display: block; overflow-x: auto; }

/* v3.2 — datele pentru documente, verdicte în bloc, raportul operațiunii */
.sec-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sec-head h2 { margin-right: auto; }
.dd-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.dd-form h3 { margin: 16px 0 6px; font-size: .95rem; }
.dd-table td:nth-child(1) { width: 26%; }
.dd-table td:nth-child(2) { width: 40%; }
.dd-table textarea.mini-area { width: 100%; min-width: 0; }
.dd-table tr.dd-necunoscut td:first-child { border-left: 3px solid var(--danger); }
.dd-table tr.dd-de_verificat td:first-child { border-left: 3px solid var(--warn); }
.dd-table tr.dd-sigur td:first-child { border-left: 3px solid var(--ok); }
.bulk-lot { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px 2px; margin: 10px 0; min-width: 0; }
.bulk-lot legend { padding: 0 4px; }
.bulk-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px;
  margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 -4px 14px rgba(0,0,0,.06); }
.bulk-bar .grow { flex: 1 1 260px; min-width: 0; }
.bulk-bar select { width: auto; }
.run-report { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); }
.run-report .btn-row.inline { display: inline-flex; margin: 4px 0 0; }
ul.blank-list { margin: 4px 0 0 18px; }

/* v3.2 — operațiuni mari în fundal (pagina de progres, bannerul „platforma lucrează”), bifare în bloc */
.spinner { display: inline-block; width: 28px; height: 28px; flex: 0 0 auto; border: 3px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .9s linear infinite; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s; } }
.task-card { max-width: 860px; }
.task-now { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.task-progress { font-weight: 600; font-size: 1.02rem; overflow-wrap: anywhere; }
.task-steps { margin: 8px 0 12px 20px; padding: 0; max-height: 340px; overflow-y: auto; font-size: .88rem; }
.task-steps li { margin: 2px 0; overflow-wrap: anywhere; }
.task-banner { display: flex; align-items: center; gap: 10px; }
.task-banner > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.pick-wrap .bulk-bar { margin-top: -6px; margin-bottom: 18px; }
.bulk-sep { flex: 0 0 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.table th.chk, .table td.chk { width: 28px; padding-right: 0; text-align: center; }
.cal-head { display: flex; align-items: flex-start; gap: 8px; }
.cal-head input[type=checkbox] { margin-top: 3px; }
@media (max-width: 700px) {
  .bulk-sep { display: none; }
  .bulk-bar .btn { flex: 1 1 auto; }
}

/* v3.2 — dosarul achiziției, furnizori și cereri de ofertă, HR, cereri de acces */
.flex { display: flex; align-items: center; }
.flex.wrap { flex-wrap: wrap; }
.flex.gap, .gap { gap: 8px; }
.stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.stack.small-gap { gap: 6px; }
.card.narrow { max-width: 760px; }
.form-row > .wide, .form-row > details.wide, .form-row > div.wide { grid-column: 1 / -1; }
details.inline-details { display: inline-block; position: relative; vertical-align: middle; }
details.inline-details > summary { list-style: none; cursor: pointer; }
details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details[open] > summary { box-shadow: 0 0 0 2px var(--info-bg); }
details.inline-details[open] > form { position: absolute; right: 0; z-index: 20; min-width: 260px; max-width: min(360px, 86vw); margin-top: 6px; padding: 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.14); white-space: normal; }
.count-pill { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: .72rem; font-weight: 600; text-align: center; color: var(--muted); }
ul.ftree { list-style: none; margin: 0 0 10px; padding: 0; }
ul.ftree li a { display: flex; align-items: center; gap: 6px; padding: 5px 8px 5px calc(8px + var(--depth, 0) * 16px); border-radius: 8px; color: var(--text); font-size: .9rem; }
ul.ftree li a:hover { background: var(--surface-2); text-decoration: none; }
ul.ftree li.active > a { background: var(--info-bg); color: var(--accent); font-weight: 600; }
ul.ftree .grow { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
ul.folder-mini { list-style: none; margin: 0 0 6px; padding: 0; font-size: .88rem; }
ul.folder-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--line); }
ul.folder-mini li:last-child { border-bottom: 0; }
.folder-tools { margin: 4px 0 10px; }
.folder-tools .flex { margin-top: 8px; }
.files-table td:nth-child(2) { overflow-wrap: anywhere; }
details.import-group { border-top: 1px solid var(--line); padding: 8px 0; }
details.import-group > summary { cursor: pointer; }
.pick-list.tall { max-height: 320px; }
.pick-group { margin: 6px 0 2px; font-weight: 600; }
.rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.row-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row-line > input { flex: 1 1 140px; min-width: 0; width: auto; margin: 0; }
.row-line > input.grow { flex: 3 1 220px; }
.row-line .checkbox { margin: 0; white-space: nowrap; }
.sup-pick { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
.sup-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(0, 2fr) minmax(180px, 1.4fr); gap: 10px; align-items: center; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 8px; }
.sup-row.match { border-color: var(--ok); background: var(--ok-bg); }
.sup-row .checkbox { margin: 0; }
.sup-row select { width: 100%; margin: 0; }
.rfq-items input, .rfq-items textarea { width: 100%; min-width: 70px; margin: 0; }
.rfq-items input.mini { width: 64px; min-width: 50px; }
.rfq-items td { vertical-align: top; }
.rfq-items td:nth-child(3) input { min-width: 180px; }
.rfq-items td:last-child textarea { min-width: 220px; }
input.mini-wide { width: 220px; max-width: 100%; display: inline-block; margin: 0; }
pre.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 10px; border-radius: 8px; font-size: .85rem; }
@media (max-width: 760px) {
  .sup-row { grid-template-columns: 1fr; }
  details.inline-details[open] > form { position: static; margin-top: 6px; max-width: none; }
}
.add-row select, .add-row input { min-width: 0; max-width: 100%; }
.add-row.wrap > select { flex: 1 1 220px; }
.cal-item { overflow-wrap: anywhere; }
details.inline-details > summary::before { content: none; }
details.inline-details > summary.btn { display: inline-flex; font-weight: 500; }
.rfq-items td:nth-child(6) input, .rfq-items td:nth-child(7) input { min-width: 70px; }
.rfq-items td:nth-child(8) input { min-width: 80px; }
.rfq-scope .chip { white-space: nowrap; }

/* v3.2.1 — sortare la clic pe capul de tabel; încărcare cu „trageți aici”; documentele specialiștilor */
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable::after { content: "↕"; margin-left: 4px; font-size: .78em; opacity: .35; }
.table th.sortable[aria-sort="ascending"]::after { content: "▲"; opacity: .9; }
.table th.sortable[aria-sort="descending"]::after { content: "▼"; opacity: .9; }
.table th.sortable:hover { color: var(--accent); }
.table th.sortable:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.drop-zone { position: relative; border: 2px dashed var(--line); border-radius: 10px; padding: 16px 14px; margin: 8px 0 10px; text-align: center;
  background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: var(--info-bg); }
.drop-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.drop-zone .drop-hint { pointer-events: none; font-size: .9rem; }
.drop-zone .drop-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: .85rem; text-align: left; pointer-events: none; overflow-wrap: anywhere; }
.drop-zone .drop-list li::before { content: "📎 "; }
.drop-zone.has-files { border-style: solid; border-color: var(--ok); }
fieldset.doc-upload { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 4px; margin: 12px 0; min-width: 0; }
fieldset.doc-upload legend { padding: 0 4px; font-weight: 600; font-size: .92rem; }
form.doc-upload .form-row { margin-bottom: 8px; }
.docs-table td:first-child { overflow-wrap: anywhere; min-width: 200px; }
.doc-ico { margin-right: 2px; }
details.inline-details { border-top: 0; padding: 0; }

/* v3.3 — Status platformă */
.status-nav { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 4px; }
.status-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.status-tiles .stat-n { font-size: 1.45rem; }
.stat-sub { font-size: .95rem; color: var(--muted); font-weight: 600; }
.stat.danger .stat-n { color: var(--danger); }
.info-text { color: var(--info); }
.table tr.row-warn td { background: var(--warn-bg); }
.live-table td { vertical-align: middle; }
ul.status-list > li { padding: 6px 0; border-bottom: 1px solid var(--line); }
ul.status-list > li:last-child { border-bottom: 0; }
ul.recs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
li.rec { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; border-left: 4px solid var(--line); background: var(--surface-2); }
li.rec.danger { border-left-color: var(--danger); background: var(--danger-bg); }
li.rec.warn { border-left-color: var(--warn); background: var(--warn-bg); }
li.rec.info { border-left-color: var(--info); }
li.rec.ok { border-left-color: var(--ok); background: var(--ok-bg); }
.rec-ic { font-size: 1.1rem; line-height: 1.3; }
.hour-bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding: 18px 0 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.hour-bars .hb { flex: 1 0 14px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; position: relative; min-width: 14px; }
.hour-bars .hb-bar { width: 100%; max-width: 26px; border-radius: 4px 4px 0 0; background: var(--neutral-bg); min-height: 0; }
.hour-bars .hb-bar.ok { background: var(--ok); opacity: .75; }
.hour-bars .hb-bar.warn { background: var(--warn); }
.hour-bars .hb-bar.danger { background: var(--danger); }
.hour-bars .hb-peak { font-size: .65rem; min-height: 1em; }
.hour-bars .hb-l { font-size: .65rem; margin-top: 2px; }
.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.action-grid form { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin: 0; }
.action-grid form p { margin: 6px 0 0; }
.ai-new-results { margin-top: 6px; padding: 6px 10px; background: var(--ok-bg); color: var(--ok); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-new-results[hidden] { display: none; }
.status-tiles { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
td.sql-cell code { white-space: normal; overflow-wrap: anywhere; }

/* v3.3 — produse ofertate și prețuri, specificații pe cerințe, oferta financiară */
.btn.tiny { padding: 2px 7px; font-size: .78rem; line-height: 1.4; }
.lot-tags .tag { margin-right: 2px; }
section.lot-sec { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 8px; }
section.lot-sec > .sec-head h3 { margin: 6px auto 6px 0; }
.items-table input { margin: 0; }
.items-table input.num-in { width: 5em; text-align: right; padding: 4px 6px; font-variant-numeric: tabular-nums; }
.items-table input.vat-in { width: 3.6em; }
.items-table input.unit-in { width: 6.5em; padding: 4px 6px; }
.items-table td.item-name { min-width: 240px; }
.items-table .spec-line { margin-top: 3px; }
.items-table tr.main-item td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.items-table td.item-cmds .cmds { display: flex; flex-wrap: wrap; gap: 3px; width: 96px; }
.items-table td.item-cmds .btn { margin: 0; }
.table tfoot tr.totals-row td { border-top: 2px solid var(--line); background: var(--surface-2); }
.note-text { color: var(--muted); font-style: italic; }
details.item-edit { margin: 6px 0; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
details.item-edit > summary { cursor: pointer; }
details.item-edit[open] { background: var(--surface); }
details.item-add { margin: 10px 0; }
details.item-add[open] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
form.item-form label { margin-bottom: 6px; }
details.ai-candidates { margin: 12px 0; }
details.ai-candidates > summary { cursor: pointer; }
/* „Produse propuse de AI”: chenar roșu și antet mare — lista se vede și când e strânsă */
.card.ai-cand-card { border: 2px solid var(--danger); box-shadow: 0 0 0 4px var(--danger-bg); scroll-margin-top: var(--ai-tabs-h, 150px); } /* sub filele Dosarului AI, lipite sus */
.ai-cand-card details.ai-candidates { margin: 0; border-top: 0; padding: 0; }
.ai-cand-card summary.ai-cand-sum::before { color: var(--danger); }
summary.ai-cand-sum { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 14px; border-radius: 8px; background: var(--danger-bg); }
summary.ai-cand-sum::-webkit-details-marker { display: none; }
summary.ai-cand-sum:hover .ai-cand-toggle { text-decoration: underline; }
.ai-cand-title { font-size: 1.2rem; font-weight: 700; color: var(--danger); }
.ai-cand-n { min-width: 30px; padding: 2px 10px; border-radius: 999px; background: var(--danger); color: var(--surface); font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.ai-cand-toggle { margin-left: auto; font-weight: 600; color: var(--danger); white-space: nowrap; }
.ai-cand-hint { flex-basis: 100%; color: var(--muted); }
details.ai-candidates:not([open]) .when-open, details.ai-candidates[open] .when-closed { display: none; }
details.ai-candidates[open] > summary.ai-cand-sum { margin-bottom: 10px; }
.btn.ai-cand-jump { border: 2px solid var(--danger); color: var(--danger); font-weight: 600; }
.spec-table td { vertical-align: top; }
.spec-table textarea.mini-area { width: 100%; min-width: 150px; }
.spec-table input[name$="[doc]"] { min-width: 150px; width: 100%; padding: 5px 7px; font-size: .82rem; }
.spec-table tr.new-req td { background: var(--surface-2); }
.spec-table tr.v-none td:first-child { box-shadow: inset 3px 0 0 var(--line); }
.spec-table tr.v-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); } .spec-table tr.v-danger td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.spec-table tr.v-warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); } .spec-table tr.v-info td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.spec-props { min-width: 180px; max-width: 320px; }
.spec-props .prop { padding: 3px 0; border-bottom: 1px dotted var(--line); overflow-wrap: anywhere; }
.spec-props .prop:last-child { border-bottom: 0; }
.calc-val { padding: 4px 0; }
details.conf-ai { margin: 8px 0; }
details.conf-ai[open] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.lot-loading { display: flex; align-items: center; gap: 8px; padding: 8px 0; }
@media (max-width: 700px) {
  .items-table input.num-in { width: 5.5em; }
  /* tabelul produselor devine o listă de „carduri”: fiecare câmp pe rândul lui, cu eticheta în stânga */
  .items-table thead, .items-table td.row-num { display: none; }
  .items-table, .items-table tbody, .items-table tfoot, .items-table tr, .items-table td { display: block; width: 100%; }
  .items-table tr { padding: 8px 2px; border-bottom: 1px solid var(--line); }
  .items-table tr.main-item { box-shadow: inset 3px 0 0 var(--accent); }
  .items-table td { border: 0; padding: 3px 8px; text-align: left; white-space: normal; }
  .items-table td:empty { display: none; }
  .items-table td[data-label] { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .items-table td[data-label]::before { content: attr(data-label); flex: 0 0 9.5em; color: var(--muted); font-size: .78rem; }
  .items-table td.item-name { min-width: 0; }
  .items-table td.item-cmds .cmds { width: auto; }
  .items-table input.num-in, .items-table input.unit-in { width: 7.5em; }
  .items-table input.vat-in { width: 4em; }
  .items-table tfoot td { text-align: left; }
  .spec-props { max-width: none; }
}

/* v3.4 — valoarea estimată în liste, licitațiile expirate, linkul original, termenii căutărilor */
td.col-val { white-space: nowrap; min-width: 9.5em; }
.val { font-size: 1rem; font-variant-numeric: tabular-nums; }
.val strong { font-weight: 700; }
.val .cur { color: var(--muted); font-size: .8rem; }
.val-src { white-space: normal; max-width: 15em; margin-left: auto; }
.val-off { color: var(--info); white-space: normal; max-width: 15em; margin-left: auto; }
.val-chip { display: inline-block; margin-top: 3px; padding: 1px 8px; border-radius: 999px; background: var(--info-bg); color: var(--text); font-size: .82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.val-inline-m { display: none; }
a.src-link { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: var(--neutral-bg); color: var(--accent); white-space: nowrap; }
a.src-link:hover { text-decoration: none; background: var(--info-bg); }
tr.row-expired td { color: var(--muted); }
tr.row-expired td a, tr.row-expired td strong { color: inherit; }
tr.row-expired td a:first-child strong { color: var(--accent); }
details.expired-box { margin-top: 14px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); }
details.expired-box > summary { cursor: pointer; font-weight: 600; }
details.expired-box .cal-item { opacity: .85; }
@media (max-width: 700px) {
  .val-inline-m { display: block; }
  th.col-val, td.col-val { display: none; }
}
.terms { margin-top: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.term-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 260px; overflow-y: auto; }
.term-chip { display: inline-flex; align-items: center; gap: 2px; padding: 1px 3px 1px 9px; border-radius: 999px; background: var(--info-bg); font-size: .84rem; line-height: 1.6; }
.term-chip button { border: 0; background: none; padding: 0 4px; margin: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 999px; }
.term-chip .term-text { padding: 0; text-align: left; }
.term-chip .term-text:hover { text-decoration: underline; }
.term-chip .term-x { color: var(--danger); font-size: .78rem; }
.term-chip .term-ex { color: var(--warn); font-size: .8rem; }
.term-chip .term-x:hover, .term-chip .term-ex:hover { background: var(--surface); }
.term-n { min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--surface); color: var(--info); font-size: .74rem; text-align: center; font-weight: 600; }
.term-n.zero { color: var(--muted); font-weight: 400; }
input.term-edit { display: inline-block; width: auto; margin: 0; padding: 2px 8px; border-radius: 999px; font-size: .84rem; }
.term-add { display: flex; gap: 6px; margin-top: 8px; }
.term-add input { margin: 0; padding: 5px 9px; font-size: .85rem; }
.term-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.term-tools .muted { margin-right: auto; }
.terms-help { margin: 8px 0 0; }
table.ai-list td.col-main { min-width: 180px; }
table.ai-list td.col-main strong { white-space: nowrap; }
[hidden] { display: none !important; } /* și pentru elementele cu display setat în CSS (ex. textarea) */

/* pagini în lista Oportunități */
.pager-nums { flex-wrap: wrap; gap: 6px; }
.pager-nums .btn { min-width: 36px; justify-content: center; }
.pager-nums .btn.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); cursor: default; }
.list-summary { margin: 4px 0 8px; }
/* butoanele cu text lung nu mai împing pagina în lateral pe telefon (ex. „Confirmă verdicte în bloc …”) */
@media (max-width: 700px) {
  .btn { max-width: 100%; white-space: normal; text-align: left; }
}

/* v3.6 — antet / subsol din imagine, fundal, insignă (pagina firmei) */
.lh-form fieldset.lh-group { margin: 12px 0; padding: 10px 14px 6px; }
.lh-form fieldset.lh-group legend { font-weight: 650; color: var(--text); font-size: .88rem; }
.seg-radio { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.seg-radio label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: var(--surface); cursor: pointer; font-size: .84rem; }
.seg-radio label:has(input:checked) { border-color: var(--accent); background: var(--info-bg); color: var(--accent); font-weight: 600; }
.seg-radio input[type=radio] { width: auto; margin: 0; display: inline; }
img.lh-img-preview { display: block; max-width: 100%; max-height: 90px; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin: 4px 0; }
img.lh-img-preview.bg { max-height: 160px; }
.lh-preview-wrap { margin: 14px 0 10px; display: grid; gap: 6px; justify-items: start; }
.lh-page { position: relative; width: 100%; max-width: 330px; aspect-ratio: 210 / 297; background: #fff; color: #222; border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; padding: 14px 16px 10px; font-size: 7px; line-height: 1.3; }
.lh-page .lh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.lh-page.washout .lh-bg { opacity: .3; filter: saturate(.6); }
.lh-page > *:not(.lh-bg) { position: relative; z-index: 1; }
.lh-head.text { display: flex; align-items: center; gap: 8px; padding-bottom: 4px; }
.lh-head.text.line { border-bottom: 1px solid var(--lh-color, #1f3a5f); }
.lh-head.text.align-center { flex-direction: column; text-align: center; }
.lh-head.text.align-right { flex-direction: row-reverse; justify-content: space-between; }
.lh-head .lh-logo { max-height: 22px; max-width: 70px; object-fit: contain; }
.lh-head .l1 { color: var(--lh-color, #1f3a5f); font-weight: 700; font-size: 8px; }
.lh-head .ln { color: #555; }
.lh-head.img img, .lh-foot img { display: block; width: 100%; max-height: 42px; object-fit: contain; }
.lh-body { flex: 1; padding: 12px 0 6px; display: grid; align-content: start; gap: 5px; }
.lh-body .lh-title { height: 7px; width: 45%; background: #c9d1dc; border-radius: 2px; margin-bottom: 4px; }
.lh-body .lh-line { height: 4px; background: #e3e7ec; border-radius: 2px; }
.lh-foot { text-align: center; color: #666; display: grid; gap: 2px; }
.lh-foot .line { border-top: 1px solid #bbb; padding-top: 2px; }
.lh-badge { position: absolute !important; z-index: 2 !important; color: var(--badge-color, #c00000); font-weight: 800; letter-spacing: .08em; }
.lh-badge.stampila { top: 6px; right: 10px; border: 3px double var(--badge-color, #c00000); padding: 1px 6px; font-size: 8px; background: rgba(255,255,255,.6); }
.lh-badge.diagonal { top: 45%; left: 50%; transform: translate(-50%, -50%) rotate(-45deg); font-size: 26px; opacity: .3; white-space: nowrap; }
.lh-page.has-stamp { padding-top: 26px; } /* ca în document: antetul începe sub ștampilă */
input[type=color] { width: 56px; height: 34px; padding: 2px 3px; cursor: pointer; display: block; }

/* v3.6 — Dosar AI pe secțiuni */
.ai-head h1 { margin-bottom: 2px; }
.ai-sub { margin-top: 4px; }
.ai-live .ai-now { flex: 1 1 320px; min-width: 0; overflow-wrap: anywhere; }
.ai-tabs { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: thin; margin: 0 0 16px; padding: 4px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 6; scroll-snap-type: x proximity; }
.ai-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; color: var(--text); white-space: nowrap; font-size: .85rem; font-weight: 600; flex: 0 0 auto; scroll-snap-align: center; }
.ai-tab:hover { background: var(--surface-2); text-decoration: none; }
.ai-tab.active { background: var(--accent); color: var(--accent-text); }
.ai-tab .t-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 999px; background: var(--neutral-bg); color: var(--muted); font-size: .7rem; font-weight: 700; }
.ai-tab.active .t-n { background: rgba(255, 255, 255, .25); color: inherit; }
.ai-tab .t-b { font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--neutral-bg); color: var(--muted); }
.ai-tab .t-b.ok { background: var(--ok-bg); color: var(--ok); } .ai-tab .t-b.warn { background: var(--warn-bg); color: var(--warn); }
.ai-tab .t-b.danger { background: var(--danger-bg); color: var(--danger); } .ai-tab .t-b.info { background: var(--info-bg); color: var(--info); }
.ai-tab.active .t-b { background: rgba(255, 255, 255, .22); color: inherit; }
.ai-tab .t-short { display: none; }
@media (min-width: 701px) { .ai-tabs { flex-wrap: wrap; overflow-x: visible; } } /* pe ecran lat se văd toate secțiunile (pe 1–2 rânduri) */
.ai-tab-body [id] { scroll-margin-top: var(--ai-tabs-h, 150px); } /* ancorele (#fisier-12, #item-7…) nu ajung sub meniul fixat sus: înălțimea lui o măsoară app.js (2–4 rânduri, pe etape) */
@media (max-width: 700px) { .ai-tab-body [id] { scroll-margin-top: var(--ai-tabs-h, 64px); } }
@media (max-width: 700px) { .ai-tab .t-full { display: none; } .ai-tab .t-short { display: inline; } .ai-tab { padding: 6px 8px; font-size: .82rem; } }
.ai-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.ai-step { display: flex; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); font-size: .88rem; min-width: 0; }
.ai-step .pbody { min-width: 0; }
.ai-step.done { border-left-color: var(--ok); } .ai-step.done .pnum { background: var(--ok-bg); color: var(--ok); }
.ai-step.warn { border-left-color: var(--warn); } .ai-step.warn .pnum { background: var(--warn-bg); color: var(--warn); }
.ai-step.cta { flex-direction: column; justify-content: center; border-color: var(--accent); border-left-color: var(--accent); }
.ai-step-t { font-weight: 650; color: var(--text); display: inline-block; margin-bottom: 2px; }
.ai-step .btn-row { margin: 6px 0 0; }
.compact-card { padding: 14px 18px; }
.compact-card h2 { margin-bottom: 6px; }
.lotbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.lotbar-l { font-size: .8rem; color: var(--muted); font-weight: 600; }
.lot-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.lot-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .84rem; font-weight: 600; }
.lot-chip:hover { text-decoration: none; border-color: var(--accent); }
.lot-chip.yes { border-color: var(--ok); }
.lot-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.lot-chip .lc-s { font-size: .7rem; } .lot-chip .lc-s.ok { color: var(--ok); } .lot-chip .lc-s.warn { color: var(--warn); }
.lot-chip.active .lc-s { color: inherit; }
.lot-pick select { margin: 0; padding: 5px 8px; max-width: min(380px, 100%); }
.lot-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 0 0 12px; }
.lot-head h2 { margin: 0; font-size: 1.05rem; min-width: 0; overflow-wrap: anywhere; }
.seg-btns { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btns .seg { border: 0; border-right: 1px solid var(--line); background: var(--surface); padding: 4px 9px; font: inherit; font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg-btns .seg:last-child { border-right: 0; }
.seg-btns .seg:hover { background: var(--surface-2); color: var(--text); }
.seg-btns .seg.on.da { background: var(--ok-bg); color: var(--ok); }
.seg-btns .seg.on.nu { background: var(--neutral-bg); color: var(--text); }
.seg-btns .seg.on.interes { background: var(--info-bg); color: var(--info); }
.lots-table tr.lot-yes td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.lots-table tr.lot-no td { opacity: .7; }
.lots-table .sel-col { width: 28px; }
.lots-table .lot-t { color: var(--text); }
.lots-bulk { position: static; margin-top: 8px; }
ul.partners { list-style: none; padding: 0; margin: 6px 0 10px; }
ul.partners li { position: relative; padding: 7px 30px 7px 0; border-bottom: 1px solid var(--line); font-size: .88rem; overflow-wrap: anywhere; }
ul.partners li > form.inline { position: absolute; right: 0; top: 5px; } /* „×” (elimină participantul) în dreapta rândului */
.partner-adds { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
details.partner-add { border: 0; padding: 0; }
details.partner-add > summary::before { content: none; }
details.partner-add[open] { flex-basis: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
details.partner-add[open] > summary { margin-bottom: 8px; }
.dd-table td.dd-x { width: 34px; text-align: center; }
/* încrederea, schimbabilă de mână (sigur / de verificat), colorată ca eticheta */
select.inc-select { display: inline-block; width: auto; margin: 0; padding: 2px 6px; border-radius: 999px; font-size: .74rem; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
select.inc-select.inc-sigur { background-color: var(--ok-bg); color: var(--ok); }
select.inc-select.inc-de_verificat { background-color: var(--warn-bg); color: var(--warn); }
select.inc-select option { color: var(--text); background: var(--surface); font-weight: 400; }
td.dd-inc .small { margin-top: 2px; white-space: nowrap; }
.dd-table td.dd-x .x { font-size: .95rem; }
.removed-box { margin-top: 14px; padding: 8px 12px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface-2); }
.removed-box h3 { margin-top: 4px; }
.gate-card.ok { border-left: 4px solid var(--ok); }
.gate-card.warn { border-left: 4px solid var(--warn); }
.gate-card ul.gate-list { margin: 6px 0 4px; padding-left: 18px; font-size: .9rem; }
.facts-row { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .9rem; }
.facts-row > div { min-width: 0; overflow-wrap: anywhere; }
tr.row-muted td { opacity: .6; }
tr.row-current td { background: var(--info-bg); }
tr.row-own td { background: var(--ok-bg); }
.files-table .btn.on-badge { color: var(--danger); border-color: var(--danger); }
ul.compact-list li { padding: 4px 0; }
.comp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 8px; }
.comp-summary .stat-l { line-height: 1.35; }
.comp-k + .comp-k { margin-top: 3px; }
.da-detail-row > td { background: var(--surface-2); }
.da-detail table { margin: 4px 0; }
.btn.tiny.active { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) {
  .seg-btns .seg { padding: 4px 7px; }
  .lots-table td:nth-child(5), .lots-table th:nth-child(5) { display: none; }
}

/* v3.7 — loturile cu mai multe produse distincte (articole) */
.table tr.grp-row td { background: var(--surface-2); padding-top: 9px; padding-bottom: 7px; border-top: 1px solid var(--line); font-size: .86rem; }
.table tr.grp-row:hover td { background: var(--surface-2); }
.tag.art-tag { background: var(--info-bg); color: var(--info); font-weight: 700; }
.articles-box .btn { margin-top: 6px; }
.reextract-note { margin: 6px 0 12px; line-height: 1.5; }
.reextract-note form { margin-left: 4px; }
/* fundamentarea prețurilor */
.fp-budget { margin: 10px 0; }
.fp-src { padding: 4px 0; border-bottom: 1px dashed var(--border); }
.fp-src:last-of-type { border-bottom: 0; }
.fp-src.used { background: var(--ok-bg, #eef8f0); padding-left: 4px; border-radius: 4px; }
.fp-src-cmds { white-space: nowrap; }
.fp-add { margin-top: 6px; }
.fp-add .item-form { margin-top: 6px; }
/* dosarul final */
.final-files { padding-left: 22px; }
.final-files li { margin: 3px 0; }
.seap-text { margin: 8px 0; }
.seap-text textarea { width: 100%; }
.email-preview { white-space: pre-wrap; font-family: inherit; margin: 0; background: var(--surface-2); padding: 8px; border-radius: 6px; }

/* calculul prețurilor ofertei (metoda, completarea, confirmarea) */
.calc-methods { display: grid; gap: 8px; margin: 8px 0 12px; }
.confirm-box .compact-list { margin: 6px 0 8px; }
.calc-tag { font-size: .7rem; padding: 0 5px; }
.fp-costs input { width: 100%; min-width: 7rem; }
.fp-costs td:nth-child(2) { max-width: 26rem; }

/* prețurile pe pași — ① achiziție, ② fundamentare, ③ oferta financiară; întrebarea „cum generez prețurile?” */
.price-step .step-n { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; margin-right: 6px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: .95rem; font-weight: 700; vertical-align: 1px; }
.price-step > .small.muted:first-of-type { margin-top: 0; }
.acq-table tr.src-row td { padding-top: 0; border-top: 0; background: transparent; }
.acq-table tr.src-row .fp-add { margin: 0 0 4px; }
.acq-table tr.src-row summary { color: var(--muted); }
.ask-box { border: 2px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 8px 0 14px; background: var(--info-bg); }
.ask-box > p { margin: 0 0 6px; }
dialog.ask-dialog { max-width: 720px; width: calc(100% - 32px); border: 0; border-radius: 14px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
  background: var(--surface); color: var(--text); }
dialog.ask-dialog::backdrop { background: rgba(15, 23, 42, .45); }
dialog.ask-dialog h3 { margin: 0 0 6px; }
.gen-box { margin: 6px 0 12px; }
.gen-box > summary { list-style: none; display: inline-block; }
.gen-box > summary::-webkit-details-marker { display: none; }
.gen-box > summary::before { content: none; }
.gen-box[open] > form { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.gen-row { max-width: 640px; margin: 4px 0 6px; }
label.radio-card.disabled { opacity: .55; cursor: not-allowed; }
.offer-preview { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.fund-table input.num-in { max-width: 9rem; text-align: right; }

/* fișele tehnice ale produselor — starea în rândul produsului, opțiunile (încarc / link, caută, amân, nu e necesară) */
.ds-line { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.ds-line .ds-cmds { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.ds-box { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; }
.ds-box > p { margin: 0 0 6px; }
.ds-forms { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 6px 0; }
.ds-forms .inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; min-width: 0; }
.ds-forms .inline-form label { margin: 0; font-size: .85rem; min-width: 0; max-width: 100%; }
.ds-forms input[type=url] { min-width: 16rem; max-width: 100%; }
.ds-near { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0; }
.final-ds { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; vertical-align: middle; }
@media (max-width: 700px) { .ds-forms input[type=url] { min-width: 0; width: 100%; } }

/* dosarul final — trecerea peste o problemă cu bifa (decizia echipei) */
.alert.neutral-box { background: var(--surface-2, #f1f5f9); border: 1px solid var(--line); color: var(--text); }
.ovr-check { display: inline-flex; align-items: center; margin: 0 4px 0 0; vertical-align: -2px; cursor: pointer; }
.ovr-check input { width: 16px; height: 16px; margin: 0; }
.ovr-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed currentColor; }
.ovr-form > span { flex: 1 1 100%; }
.ovr-form label { margin: 0; flex: 1 1 18rem; min-width: 0; }
.ovr-form input[name=motiv] { width: 100%; }

/* analiza AI a feedback-ului (doar superadministratori) */
.fb-aicard .sec-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.fb-aicard .sec-head h2 { margin: 0; }
.fb-ai-form { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-top: 8px; }
.fb-ai-form label.wide { flex: 1 1 100%; margin: 0; }
.fb-ai-form textarea { min-height: 44px; }
.fb-ai-live { color: var(--info); }
.fb-ai-auto { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.fb-ai-auto label { margin: 0; }
.fb-ai-pick { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px dashed var(--line); border-radius: 999px; cursor: pointer; color: var(--text); }
.fb-ai-pick input { margin: 0; width: auto; }
.fb-admin .fb-meta a.pill { text-decoration: none; }
.fb-aipanel { margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface-2); border-radius: 8px; min-width: 0; }
.fb-aipanel h4 { margin: 0 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.fb-aipanel .fb-ai-sum { font-weight: 600; margin: 6px 0; }
.fb-sug { border-top: 1px solid var(--line); padding: 8px 0; min-width: 0; }
.fb-sug > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-proscons { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; }
@media (max-width: 640px) { .fb-proscons { grid-template-columns: 1fr; } }
.fb-prompt, .fb-poc { margin: 8px 0; min-width: 0; }
.fb-prompt-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fb-poc-item { margin: 8px 0; min-width: 0; }
.fb-code { max-height: 420px; max-width: 100%; overflow: auto; white-space: pre; font-size: 12px; line-height: 1.4; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 4px 0; }
.fb-code code { background: none; padding: 0; font-size: inherit; }
.fb-preview { display: block; width: 100%; height: 380px; border: 1px solid var(--line); border-radius: 6px; background: #fff; margin-top: 6px; }
.fb-ai-q ul { margin: 4px 0; }
.fb-ai-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.fb-ai-actions .inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 320px; min-width: 0; }
.fb-ai-actions .inline-form input[name=note] { flex: 1 1 200px; min-width: 0; margin: 0; }

/* persoanele care semnează documentele (Firme → Persoane) și cardul „Cine semnează” din Date pentru documente */
.signer-box { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); margin: 6px 0 10px; display: grid; gap: 4px; overflow-wrap: anywhere; }
.signer-box strong { font-size: .98rem; }
#semnatar .partner-adds { align-items: center; }
details.person-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 8px 0; background: var(--surface); }
details.person-item > summary { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; overflow-wrap: anywhere; }
details.person-item[open] > summary { margin-bottom: 8px; }
details.person-item.person-new { border-style: dashed; background: var(--surface-2); }
details.person-item.person-new:not([open]) { border: 0; padding: 0; background: none; }
details.person-item.person-new > summary::before { content: none; }
.person-form .form-row { margin-bottom: 6px; }
.person-form + form.inline { margin-top: 6px; }

/* costurile AI (Panou și pagina „Costuri AI”) — bare pe zile, sumare */
ul.cost-bars { list-style: none; padding: 0; margin: 0; }
ul.cost-bars li a { display: grid; grid-template-columns: 62px minmax(0, 1fr) 92px; gap: 8px; align-items: center; padding: 3px 2px; color: var(--text); font-size: .84rem; border-radius: 6px; }
ul.cost-bars li a:hover { background: var(--surface-2); text-decoration: none; }
ul.cost-bars li.zero a { color: var(--muted); }
.cb-bar { display: block; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.cb-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cb-val { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cb-day { white-space: nowrap; }
.cost-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cost-period select { width: auto; margin: 0; }

/* lucrul în echipă — versiuni, cine mai lucrează acum, combinarea modificărilor */
.vbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 8px; font-size: .82rem; min-height: 1.2em; }
.vbar .vlink { color: var(--muted); white-space: nowrap; }
.vbar .vlink:hover { color: var(--accent); }
.vwho { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.vbadge { display: inline-block; border-radius: 999px; padding: 1px 9px; font-size: .78rem; background: var(--info-bg); color: var(--info); white-space: nowrap; }
.vbadge.edit { background: var(--warn-bg); color: var(--warn); font-weight: 600; }
.vbadge.changed { background: var(--danger-bg); color: var(--danger); white-space: normal; border-radius: 8px; }
.vbadge.changed a { color: inherit; text-decoration: underline; }
.ver-merge { margin-bottom: 10px; }
.ver-merge ul { margin: 6px 0 0; padding-left: 18px; }
.ver-merge li { margin: 4px 0; }
.ver-merge label { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 2px 14px 2px 0; font-weight: normal; white-space: normal; }
.ver-merge input[type=radio] { width: auto; margin: 0; flex: 0 0 auto; }
.ver-merge code { background: var(--surface); padding: 0 4px; border-radius: 4px; }
.vc-label { font-weight: 600; margin-right: 6px; }
.ver-merged { outline: 2px solid var(--ok); outline-offset: 1px; border-radius: 4px; }
.ver-conflict { outline: 2px solid var(--danger); outline-offset: 1px; border-radius: 4px; }
.ver-again { outline: 3px solid var(--warn); outline-offset: 2px; }
.rl-presence .rl-x { border: 0; background: none; color: var(--rlp-muted, var(--muted)); cursor: pointer; margin-left: 8px; padding: 0 2px; }
.rl-presence { position: fixed; right: 16px; bottom: 16px; z-index: 50; max-width: min(560px, calc(100vw - 32px)); background: var(--rlp-bg, var(--surface));
  color: var(--rlp-fg, var(--text)); border: 1px solid var(--rlp-line, var(--line)); border-radius: 12px; padding: 8px 12px; font-size: .85rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12); max-height: 55vh; overflow: auto; }
/* fereastra „cine mai lucrează” — pe licitație, cu secțiunea fiecăruia; mărimea și culoarea din Setări → Lucrul în echipă */
.rl-presence a { color: var(--rlp-link, var(--accent)); }
.rl-presence .muted { color: var(--rlp-muted, var(--muted)); }
.rl-presence.rlp-mic { font-size: .76rem; max-width: min(400px, calc(100vw - 32px)); padding: 6px 10px; }
.rl-presence.rlp-mare { font-size: 1rem; max-width: min(760px, calc(100vw - 32px)); padding: 12px 16px; border-radius: 14px; }
.rlp-head { display: flex; align-items: center; gap: 6px; }
.rlp-head strong { flex: 1 1 auto; }
.rlp-ctl { border: 0; background: none; color: inherit; cursor: pointer; padding: 0 3px; font-size: 1em; line-height: 1; opacity: .8; }
.rlp-ctl:hover { opacity: 1; }
.rlp-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.rlp-list > li { border-top: 1px solid var(--rlp-line, var(--line)); padding-top: 5px; }
.rlp-list > li:first-child { border-top: 0; padding-top: 0; }
.rlp-where { margin: 2px 0 0 18px; line-height: 1.5; }
.rlp-where .vbadge { white-space: normal; }
.rl-presence.rlp-mare .vbadge { font-size: .9rem; }
.cfg-color { display: flex; flex-direction: column; gap: 4px; }
.cfg-color .color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cfg-color input[type=color] { width: 56px; height: 34px; padding: 2px; }
.cfg-color .inline-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; }
.cfg-color .inline-check input { width: auto; }
.rlp-preview { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; background: var(--surface-2); }
.rlp-preview .rl-presence { position: static; max-height: none; margin: 8px 0 0 auto; box-shadow: 0 2px 8px rgba(15, 23, 42, .1); }
.rlp-preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rl-toasts { position: fixed; right: 16px; top: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.rl-toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 10px; padding: 8px 10px; font-size: .88rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .14); }
.rl-toast button { float: right; border: 0; background: none; color: var(--muted); cursor: pointer; margin-left: 8px; }
.ver-list { list-style: none; margin: 0; padding: 0; }
.ver-list > li { border-top: 1px solid var(--line); padding: 10px 0; }
.ver-list > li:first-child { border-top: 0; }
.ver-list > li.cur .ver-head .tag { font-weight: 700; }
.ver-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.ver-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ver-diff td { vertical-align: top; overflow-wrap: anywhere; }
.ver-diff .vd-old { color: var(--danger); }
.ver-diff .vd-new { color: var(--ok); }
.ver-diff tr.vd-add td:first-child { color: var(--ok); }
.ver-diff tr.vd-del td:first-child { color: var(--danger); }
.ver-doc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.ver-upload { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.ver-upload label { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 640px) {
  .rl-presence { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .rl-toasts { left: 12px; right: 12px; top: 12px; max-width: none; }
}

/* fereastra „🔧 Caută soluții”, conformitatea produselor propuse, dosarul final */
.sol-dlg { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28); }
.sol-dlg::backdrop { background: rgba(15, 23, 42, .45); }
.sol-dlg .sol-close { position: sticky; top: 8px; float: right; margin: 8px 10px 0 0; z-index: 2; border: 0; background: var(--surface); color: var(--muted); font-size: 1.1rem; cursor: pointer; border-radius: 8px; padding: 2px 8px; }
.sol-dlg .sol-close:hover { color: var(--text); background: var(--surface-2, var(--surface)); }
.sol-body { padding: 14px 18px 18px; max-height: calc(100vh - 34px); overflow: auto; overflow-wrap: anywhere; }
.sol-title { font-size: 1.08rem; margin: 2px 32px 6px 0; }
.sol-thread { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sol-msg { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.sol-msg p { margin: 4px 0; }
.sol-user { background: var(--info-bg); border-color: transparent; align-self: flex-end; max-width: 92%; }
.sol-sys { border-style: dashed; color: var(--ok); }
.sol-cards { display: grid; gap: 8px; margin: 6px 0; }
.sol-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.sol-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sol-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sol-clar { margin: 6px 0; }
.sol-probs { list-style: none; margin: 4px 0 8px; padding: 0; }
.sol-probs li { margin: 3px 0; }
.sol-probs .checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; }
.sol-probs .checkbox input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.sol-more { margin: 0 0 8px; }
.sol-more > summary { cursor: pointer; color: var(--muted, #666); }
.sol-ask { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 10px; }
.sol-ask textarea { width: 100%; }
.sol-busy { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; padding: 8px 10px; border-radius: 10px; background: var(--info-bg); }
.sol-busy .spinner { width: 18px; height: 18px; border-width: 2px; }
.sol-busy > .small { flex-basis: 100%; }
.sol-new { margin-top: 6px; }
.cand-ok { font-weight: 600; }
.cand-bad { margin: 2px 0; }
.cand-bad .muted { font-size: .92em; }
.cand-note { margin: 6px 0 8px; }
.ovr-form .btn.tiny { margin-left: 6px; }
@media (max-width: 640px) {
  .sol-body { padding: 10px 12px 14px; }
  .sol-user { max-width: 100%; }
  .sol-actions .btn { flex: 1 1 auto; }
}

/* declarațiile de calificare din modelele Word ale firmei (⑧ Documente generate) */
.decl-table td:first-child { min-width: 220px; }
.decl-add { margin-top: 10px; }
.decl-add > summary { display: inline-flex; cursor: pointer; }
.decl-add > summary::before { content: none; }
.decl-add[open] > summary { margin-bottom: 8px; }
.decl-form { display: grid; gap: 8px; }
.decl-for select { max-width: 100%; }
.decl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.decl-list li { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.decl-list .decl-pick { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 0; }
.decl-list .decl-pick input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.decl-rep { margin: 4px 0 0 26px; color: var(--muted); }
.decl-rep .inline-check { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 0 6px; font-weight: normal; }
.decl-rep .inline-check input { width: auto; }
.models-list { margin: 6px 0 10px; padding-left: 20px; }
.models-list li { margin: 3px 0; }
@media (max-width: 640px) {
  /* pe telefon, fiecare declarație e un bloc: titlul, pentru cine, fișierul, butonul */
  .decl-table thead { display: none; }
  .decl-table, .decl-table tbody, .decl-table tr, .decl-table td { display: block; width: auto; }
  .decl-table tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .decl-table td { border: 0; padding: 2px 0; min-width: 0; }
  .decl-table td:first-child { min-width: 0; }
  .decl-table td:nth-child(2)::before { content: "Pentru: "; color: var(--muted); }
  .decl-table td:last-child { padding-top: 6px; }
  .decl-table a { overflow-wrap: anywhere; }
  .decl-rep { margin-left: 0; }
  .decl-rep .inline-check { display: flex; margin: 4px 0 0; }
}

/* ⑦ Date pentru documente — confirmarea în bloc (de verificat / necunoscute → „sigur” sau eliminate) */
details.dd-bulk { border: 0; padding: 0; margin: 0 0 10px; }
details.dd-bulk > summary { display: inline-flex; cursor: pointer; }
details.dd-bulk > summary::before { content: none; }
details.dd-bulk[open] { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
details.dd-bulk[open] > summary { margin-bottom: 8px; }
.dd-bulk-body .checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; margin: 0; }
.dd-bulk-body .checkbox input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.dd-bulk-all { margin-bottom: 6px !important; }
#dd-bulk-list { display: grid; gap: 8px; max-height: 420px; overflow: auto; padding: 2px; }
.dd-bulk-group { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 6px 10px; }
.dd-bulk-items { list-style: none; margin: 4px 0 0; padding: 0 0 0 22px; display: grid; gap: 3px; }
.dd-bulk-items li { overflow-wrap: anywhere; }
.dd-bulk-body .btn-row { margin-top: 10px; }
@media (max-width: 640px) {
  #dd-bulk-list { max-height: none; }
  .dd-bulk-items { padding-left: 4px; }
  .dd-bulk-body .btn-row .btn { flex: 1 1 auto; }
}

/* matricea de conformitate — produsele ca rânduri-părinte (▸ / ▾), cerințele ca rânduri-copil; filtrele din rezumat;
   în editorul de specificații, verdictul colorat ca în matrice */
.conf-summary .conf-prod { font-size: 1.08rem; color: var(--accent); }
button.mfilter { border: 1px solid transparent; font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; line-height: 1.5; }
button.mfilter:hover:not(:disabled) { border-color: currentColor; }
button.mfilter[aria-pressed="true"] { border-color: currentColor; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }
button.mfilter:disabled { opacity: .55; cursor: default; }
.mfilter-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -2px 0 8px; padding: 5px 10px; border-radius: 8px; background: var(--info-bg); color: var(--info); }
.mfilter-note[hidden] { display: none; }
.mx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.mx-tree tr.mx-folded, .mx-tree tr.mf-hide { display: none; }
.mx-tree tr.mx-parent > td { padding: 9px 10px; border-top: 2px solid var(--line); background: var(--surface-2); cursor: pointer; }
.mx-tree tr.mx-parent:first-child > td { border-top: 0; }
.mx-tree tr.mx-parent.mx-ok > td { background: var(--ok-bg); box-shadow: inset 6px 0 0 var(--ok); }
.mx-tree tr.mx-parent.mx-danger > td { background: var(--danger-bg); box-shadow: inset 6px 0 0 var(--danger); }
.mx-tree tr.mx-parent.mx-warn > td { background: var(--warn-bg); box-shadow: inset 6px 0 0 var(--warn); }
.mx-tree tr.mx-parent.mx-info > td { background: var(--info-bg); box-shadow: inset 6px 0 0 var(--info); }
.mx-tree tr.mx-parent:hover > td { filter: brightness(.98); }
.mx-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; position: sticky; left: 8px; max-width: calc(100vw - 80px); }
.mx-toggle { border: 0; background: var(--surface); color: var(--text); border-radius: 6px; width: 26px; height: 26px; font-size: .9rem; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12); flex: 0 0 auto; }
.mx-title { display: flex; flex-direction: column; min-width: 0; flex: 1 1 260px; }
.mx-art { font-size: .8rem; font-weight: 600; color: var(--muted); }
.mx-prod { font-size: 1.15rem; font-weight: 800; color: var(--accent); letter-spacing: .01em; line-height: 1.25; }
.mx-tree tr.mx-danger .mx-prod { color: var(--danger); }
.mx-tree tr.mx-warn .mx-prod { color: var(--warn); }
.mx-tree tr.mx-ok .mx-prod { color: var(--ok); }
.mx-prod.mx-common { font-size: 1rem; color: var(--text) !important; }
.mx-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.mx-stat { font-weight: 700; font-size: .85rem; }
.mx-ok .mx-stat { color: var(--ok); } .mx-danger .mx-stat { color: var(--danger); } .mx-warn .mx-stat { color: var(--warn); } .mx-info .mx-stat { color: var(--info); }
.mx-tree tr.mx-child > td:first-child { position: relative; padding-left: 30px; }
.mx-tree tr.mx-child > td:first-child::before { content: ""; position: absolute; left: 16px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.mx-tree tr.mx-child > td:first-child::after { content: ""; position: absolute; left: 16px; top: 50%; width: 9px; border-top: 2px solid var(--line); }
.mx-tree tr.mx-child:hover > td { background: var(--surface-2); }
/* matricea: cerințele fără valoare în fișa tehnică, completate dintr-un clic din cerință (și anularea) */
.alert.copy-req { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
/* „Completează din cerințe”: secțiunea roșie — deasupra matricei și în editorul de specificații */
.copy-req-red { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; margin: 8px 0 14px; border-radius: 8px;
  border: 2px solid var(--danger); background: var(--danger-bg); color: var(--text); box-shadow: 0 0 0 3px var(--danger-bg); }
.copy-req-red strong { color: var(--danger); font-size: 1.02rem; }
.btn.copy-req-red-btn { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.btn.copy-req-red-btn:hover { filter: brightness(1.08); }
.copy-req-text { flex: 1 1 420px; min-width: 0; }
.copy-req-text .small { margin-top: 4px; }
.copy-req-done form.inline { margin-left: 6px; }
.matrix td .copy-req-btn, .matrix td .copy-req-tag { margin-top: 4px; }
.btn.copy-req-btn { white-space: nowrap; color: var(--danger); border-color: var(--danger); }
.spec-table tr.mx-lite > td { background: var(--info-bg); padding: 8px 10px; }
.spec-table tr.mx-lite .mx-prod { font-size: 1.08rem; }
.vsel { font-weight: 700; border-radius: 999px; padding-left: 10px; }
.vsel.vsel-ok { background-color: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.vsel.vsel-danger { background-color: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.vsel.vsel-warn { background-color: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.vsel.vsel-info { background-color: var(--info-bg); color: var(--info); border-color: var(--info); }
.vsel option { background: var(--surface); color: var(--text); font-weight: 400; }
@media (max-width: 640px) {
  .mx-head { max-width: calc(100vw - 56px); }
  .mx-prod { font-size: 1.05rem; }
}
.mx-counts .pill { background: var(--surface); border: 1px solid currentColor; }

/* echipa licitației — managerul de proiect și asistenții */
.team li.team-manager { background: var(--info-bg); border-radius: 8px; }
.team li.team-asistent .avatar { background: var(--ok-bg); color: var(--ok); }
.team-role-form { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.team-role-form label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; }
.team-role-form select { width: auto; padding: 3px 6px; font-size: .8rem; }
.team-add-role { display: inline-flex; align-items: center; gap: 6px; margin: 6px 8px 6px 0; }
.team-add-role select { width: auto; }
.tag.role-manager { background: #fdf0d5; color: #8a5a00; font-weight: 700; }
.tag.role-asistent { background: var(--ok-bg); color: var(--ok); font-weight: 600; }
.tag.role-membru { background: var(--neutral-bg); color: var(--muted); }
.tag.role-manager, .tag.role-asistent, .tag.role-membru { text-transform: none; letter-spacing: 0; font-size: .74rem; }
@media (prefers-color-scheme: dark) { .tag.role-manager { background: #3a2a08; color: #fbbf24; } }
.tag.audit-echipa_rol { background: var(--info-bg); color: var(--info); }
/* „Licitațiile mele”: filtrul „Rolul meu” */
.role-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 12px; }
.role-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .84rem; }
.role-pill:hover { text-decoration: none; background: var(--surface-2); }
.role-pill.active { background: var(--info-bg); border-color: var(--info); color: var(--accent); font-weight: 600; }
.role-pill.role-manager.active { background: #fdf0d5; border-color: #d9a441; color: #8a5a00; }
.role-pill.role-asistent.active { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
/* Dosar AI: echipa de proiect, în antet */
.proj-team { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: .82rem; }
.proj-team b { font-weight: 600; }
/* Dosar AI — starea lucrului în secțiune (sus): roșu = lucrează, verde = nu lucrează nimic */
.ai-work { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 14px; border-radius: var(--radius); border: 1px solid; font-size: .9rem; }
.ai-work .aw-body { min-width: 0; flex: 1; }
.ai-work .aw-head { font-weight: 700; }
.ai-work .aw-list { margin: 4px 0 0; padding-left: 18px; }
.ai-work .aw-list li { margin: 2px 0; overflow-wrap: anywhere; }
.ai-work .aw-meta, .ai-work .aw-else { color: inherit; opacity: .85; font-size: .85rem; }
.ai-work .aw-q { font-style: italic; }
.ai-work a { color: inherit; text-decoration: underline; }
.ai-work .aw-done a.btn { text-decoration: none; color: var(--text); margin-left: 4px; }
.ai-work-busy { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.ai-work-busy::before { content: ""; flex: 0 0 10px; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--danger); animation: aw-pulse 1.2s ease-in-out infinite; }
.ai-work-idle { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.ai-work-idle::before { content: ""; flex: 0 0 10px; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--ok); }
@keyframes aw-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .ai-work-busy::before { animation: none; } }
@media print { .ai-work { display: none; } }
/* statusul „Matrice verificată” */
.pill.vio { background: #efe7fb; color: #6a3fb5; }
@media (prefers-color-scheme: dark) { .pill.vio { background: #2c2140; color: #c4a7f5; } }
.ai-go-note { margin: -4px 0 12px; }
.ai-go-hint { margin: 6px 0 0; }
/* filtrele verdictelor și în editorul de specificații */
.spec-table tr.mf-hide { display: none; }
.spec-filters { margin: 8px 0; }

/* paginile încap pe lățimea ecranului — fără derulare stânga-dreapta pe laptop / desktop ---------------------------------- */
/* între 861 și 1279 px meniul devine o bară de pictograme (numele apar la trecerea cu mouse-ul), ca tabelele să aibă loc */
.sidebar-foot .ico { display: none; }
@media (min-width: 861px) and (max-width: 1279px) {
  .sidebar { width: 62px; flex: 0 0 62px; padding: 14px 7px; gap: 12px; overflow-x: hidden; }
  .sidebar .brand { justify-content: center; }
  .sidebar .brand > span:not(.brand-mark) { display: none; }
  .sidebar nav a { justify-content: center; padding: 8px 0; gap: 0; position: relative; }
  .sidebar nav a > span:not(.ico):not(.count) { display: none; }
  .sidebar nav .ico { width: auto; font-size: 1.05rem; opacity: .9; }
  .sidebar nav .count { position: absolute; top: 1px; right: 1px; margin: 0; padding: 0 4px; font-size: .6rem; line-height: 1.4; }
  .sidebar nav .nav-group { font-size: 0; height: 1px; margin: 8px 6px 4px; background: var(--line); }
  .sidebar-foot { align-items: center; gap: 8px; padding-top: 10px; }
  .sidebar-foot .lbl { display: none; }
  .sidebar-foot .ico { display: inline; font-size: 1rem; }
  .sidebar-foot .bell { position: relative; padding: 2px 0; }
  .sidebar-foot .bell .count { position: absolute; top: -6px; right: -12px; font-size: .6rem; padding: 0 4px; }
  .sidebar-foot .version { font-size: .62rem; }
  .content { padding: 22px 22px 60px; }
}
/* tabelele: valoarea estimată trece sub titlu când tabelul e îngust (ex. jumătatea de ecran din Panou) */
.table-wrap { container-type: inline-size; }
@container (max-width: 640px) {
  th.col-val, td.col-val { display: none; }
  .val-inline-m { display: block; }
}
/* în celulele „pe un rând” rămâne pe un rând doar valoarea principală; textele mici de sub ea (data, titlul, nota) se rup când e nevoie */
.table td.nowrap .small, .table td.nowrap small, .table td.nowrap div.muted, .table td.nowrap .btn { white-space: normal; }
.table td .pill { white-space: normal; max-width: 100%; }
.table td .seg-btns { flex-wrap: wrap; }
/* adrese, nume de fișiere, e-mailuri, coduri lungi: se rup oriunde, nu lărgesc coloana */
.wrap-any, .table td a[href^="http"], .table td.wrap-any a { overflow-wrap: anywhere; }
.table td input:not([type=checkbox]):not([type=radio]), .table td select, .table td textarea { max-width: 100%; }
/* Dosar AI: stadiul dosarului într-o singură coloană */
.ai-stage { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 10px; align-items: center; min-width: 215px; }
.ai-stage .pill { white-space: nowrap; }
.ai-list td.ai-open .btn { white-space: normal; text-align: center; justify-content: center; }
/* Produse propuse de AI: prețul orientativ și disponibilitatea */
.cand-price { min-width: 7.5em; max-width: 15em; }
.cand-price .cand-amount { white-space: nowrap; font-weight: 600; }
/* editorul de specificații și tabelul produselor ofertate: coloane mai înguste */
.spec-table textarea.mini-area { min-width: 110px; }
.spec-table input[name$="[doc]"] { min-width: 100px; }
.spec-props { min-width: 140px; max-width: 280px; }
.items-table td.item-name { min-width: 180px; }
/* cererile de ofertă către furnizori: câmpurile produselor */
.rfq-items td:nth-child(3) input { min-width: 110px; }
.rfq-items td:last-child textarea { min-width: 130px; }
.table td.cand-cmd .btn { white-space: normal; text-align: center; }
.opp-cmds form.inline, .trash-cmds form.inline { display: inline-block; margin: 2px 0; }
/* pe telefon, tabelele care nu încap devin „carduri” (app.js pune clasa rt-stack și numele coloanelor) */
@media (max-width: 700px) {
  .table.rt-stack > thead { display: none; }
  .table.rt-stack, .table.rt-stack > tbody, .table.rt-stack > tfoot, .table.rt-stack > tbody > tr, .table.rt-stack > tfoot > tr,
  .table.rt-stack > tbody > tr > td, .table.rt-stack > tbody > tr > th, .table.rt-stack > tfoot > tr > td, .table.rt-stack > tfoot > tr > th { display: block; width: auto; }
  .table.rt-stack > tbody > tr, .table.rt-stack > tfoot > tr { padding: 6px 0; border-bottom: 1px solid var(--line); }
  .table.rt-stack > tbody > tr > td, .table.rt-stack > tbody > tr > th, .table.rt-stack > tfoot > tr > td, .table.rt-stack > tfoot > tr > th {
    border: 0; padding: 3px 12px; text-align: left; white-space: normal; min-width: 0 !important; max-width: none; }
  .table.rt-stack td[data-label]:not(:empty)::before, .table.rt-stack th[data-label]:not(:empty)::before {
    content: attr(data-label); display: block; margin-bottom: 1px; font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
  .table.rt-stack td:empty, .table.rt-stack tr[hidden], .table.rt-stack td[hidden], .table.rt-stack tr.mx-folded, .table.rt-stack tr.mf-hide { display: none; }
  .table.rt-stack td.right, .table.rt-stack td.center { text-align: left; }
  .table.rt-stack .val-inline-m { display: none; } /* valoarea are rândul ei în card („Valoare estimată”) */
  .table.rt-stack td .val, .table.rt-stack td .val-src, .table.rt-stack td .val-off { margin-left: 0; max-width: none; }
  .table.rt-stack tr.v-ok { box-shadow: inset 3px 0 0 var(--ok); } .table.rt-stack tr.v-danger { box-shadow: inset 3px 0 0 var(--danger); }
  .table.rt-stack tr.v-warn { box-shadow: inset 3px 0 0 var(--warn); } .table.rt-stack tr.v-info { box-shadow: inset 3px 0 0 var(--info); }
  .table.rt-stack td.chk { width: auto; }
  .table.rt-stack input:not([type=checkbox]):not([type=radio]), .table.rt-stack select, .table.rt-stack textarea { max-width: 100%; }
}
/* ⑦ Date pentru documente — filtrele din rezumat */
.dd-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dd-table tr.mf-hide, .dd-group.mf-hide { display: none; }
/* oferta financiară — toate loturile: produsele câte unul pe rând, valoarea maximă a lotului */
ol.fin-items { margin: 0; padding-left: 1.4em; }
ol.fin-items.one { list-style: none; padding-left: 0; }
ol.fin-items li + li { margin-top: 4px; padding-top: 4px; border-top: 1px dotted var(--line); }
ol.fin-items .fi-name { display: block; color: var(--text); font-weight: 600; }
ol.fin-items .fi-meta { display: block; color: var(--muted); }
ol.fin-items .fi-meta strong { color: var(--text); font-weight: 600; }
.fin-lots td.fin-max { min-width: 9em; }
.fin-lots td.fin-max .small { white-space: normal; }
/* valoarea maximă a lotului, când anunțul nu o dă — o scrie echipa */
.fin-max-edit { margin-top: 4px; }
.fin-max-edit > summary { cursor: pointer; color: var(--accent); list-style: none; }
.fin-max-edit > summary::-webkit-details-marker { display: none; }
.fin-max-form { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; align-items: center; margin-top: 3px; }
.fin-max-form input { width: 7.5em; padding: 3px 6px; margin: 0; font-size: .85rem; text-align: right; }
/* valoarea secretă a unui modul (Setări): câmp parolă, „salvată / necompletată”, „șterge valoarea salvată” */
.cfg-secret { display: flex; flex-direction: column; gap: 4px; font-size: .82rem; }
.cfg-secret > label { margin-bottom: 0; }
.cfg-secret .inline-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: normal; }
.cfg-secret .inline-check input { width: auto; margin-top: 0; }
/* suma care nu se poate citi (marcată înainte de trimitere) și produsele fără preț fundamentat (②) */
input.amount-bad { border-color: var(--danger) !important; background: var(--danger-bg); box-shadow: 0 0 0 2px var(--danger-bg); }
.amount-msg { margin: 8px 0; }
.fund-table tr.row-miss td { background: var(--warn-bg); }
.fund-table tr.row-miss input.num-in { border-color: var(--warn); }
.fund-missing { margin-top: 8px; }
/* modificări scrise și nesalvate (② / ③) */
form.is-unsaved > .btn-row > button[type=submit]:first-child { border-color: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.unsaved-flag { font-weight: 600; }
.unsaved-note { margin: 0 0 10px; }
.unsaved-note .btn { margin-left: 6px; vertical-align: baseline; }
form.unsaved-pulse > .btn-row { border-radius: 8px; animation: rl-unsaved .7s ease-in-out 3; }
@keyframes rl-unsaved { 50% { background: var(--warn-bg); box-shadow: 0 0 0 6px var(--warn-bg); } }
@media (prefers-reduced-motion: reduce) { form.unsaved-pulse > .btn-row { animation: none; background: var(--warn-bg); } }
/* Superadmin → Backup */
.backup-table .bk-actions { text-align: right; white-space: normal; }
.backup-table .bk-actions > form, .backup-table .bk-actions > details { display: inline-block; vertical-align: top; margin: 0 0 4px; }
details.bk-dl { border: 0; padding: 0; text-align: left; }
details.bk-dl > summary { display: inline-flex; font-weight: 500; }
details.bk-dl > summary::before, details.bk-hash > summary::before { content: none; }
.bk-pw { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; margin-top: 6px; white-space: normal; }
.bk-pw label { margin: 0; }
.bk-pw input[type=password] { width: 14em; max-width: 100%; }
details.bk-hash { border: 0; padding: 2px 0 0; }
details.bk-hash > summary { display: inline; font-weight: 400; font-size: inherit; text-decoration: underline dotted; }
details.bk-hash code { display: block; margin: 4px 0; }
.bk-steps li { margin-bottom: 4px; }
.bk-parts { display: inline-flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.bk-pw .bk-parts { justify-content: flex-start; }
.bk-limit { display: block; margin: 0 0 8px; }
.bk-limit input { width: 6em; display: inline-block; }
/* comutatorul de vedere (Licitații: Toate / Ale mele; Adaugă: anunț SEAP / achiziție directă; Utilizatori / Cereri de acces) */
.view-switch { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 3px; margin: 6px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.view-switch a { padding: 5px 12px; border-radius: 7px; color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem; }
.view-switch a:hover { background: var(--neutral-bg); }
.view-switch a.active { background: var(--accent); color: var(--accent-text); }
.view-switch a.active .muted { color: inherit; opacity: .85; }
.add-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.add-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
.add-card:hover { border-color: var(--accent); text-decoration: none; }
.add-ico { font-size: 1.8rem; line-height: 1; }
.add-go { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; }
.view-switch .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .75rem; line-height: 1.5; text-align: center; }
/* Setări pe file */
.set-tabs { position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 4px; }
.tab-panel > .card, .tab-panel > .grid-2, .tab-panel > .grid-main { margin-top: 0; }
/* adresa cu fila (#t-…): filele rămân la vedere, deasupra; sub filele lipite sus (Setări), ancorele nu se ascund (înălțimea — din app.js) */
.tab-panel { scroll-margin-top: var(--tabs-h, 60px); }
.tab-panel [id] { scroll-margin-top: var(--tabs-sticky-h, 0px); }
.tender-tabs { margin-top: 4px; }
.hist-filter { margin: 4px 0 8px; }
.timeline.hist li.hist-acces { opacity: .92; }
@media (max-width: 700px) { .set-tabs { position: static; } .set-tabs a { padding: 6px 8px; } }
/* Dosar AI — secțiunile pe etape (Pregătire ①–④ · Ofertă ⑤–⑥ · Dosar ⑦–⑨), Concurența și Istoricul la capăt */
.ai-tabs.ai-tabs-grouped { flex-wrap: wrap; overflow-x: visible; align-items: stretch; gap: 6px; }
.ai-group { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 2px 6px 2px 2px; border-right: 1px solid var(--line); }
.ai-group:last-child, .ai-group-extra { border-right: 0; }
.ai-group-l { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 0 4px 0 6px; }
.ai-group-extra { margin-left: auto; }
.ai-group-extra .ai-tab:not(.active) { color: var(--muted); font-weight: 500; }
@media (max-width: 700px) {
  /* pe telefon etapele ocupă câteva rânduri: meniul rămâne sus în pagină, nu mai stă lipit peste conținut cât derulați */
  .ai-tabs.ai-tabs-grouped { flex-direction: column; gap: 2px; position: static; }
  .ai-tab-body [id], .card.ai-cand-card { scroll-margin-top: 12px; }
  .ai-group { border-right: 0; border-bottom: 1px solid var(--line); padding: 2px 0 4px; flex-wrap: wrap; }
  .ai-group:last-child { border-bottom: 0; }
  .ai-group-l { flex: 0 0 100%; padding: 2px 4px 0; }
  .ai-group-extra { margin-left: 0; }
  .ai-group-home .ai-tab, .ai-group-extra .ai-tab { flex: 0 0 auto; }
}
/* căutarea în toată platforma — câmpul din dreapta sus (pe fiecare pagină), lista de sub el și pagina rezultatelor ------------- */
:root { --mark: #ffe08a; }
@media (prefers-color-scheme: dark) { :root { --mark: #6b5414; } }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 1px; }
kbd { display: inline-block; min-width: 1.5em; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface-2);
  color: var(--muted); font: 600 .74rem/1.5 ui-monospace, Menlo, Consolas, monospace; text-align: center; }
.topbar { display: flex; justify-content: flex-end; align-items: center; margin: -14px 0 14px; }
.gsearch { position: relative; display: flex; align-items: center; gap: 6px; width: min(460px, 100%); }
.gsearch .gs-box { position: relative; flex: 1 1 auto; min-width: 0; }
.gsearch input[type=search] { margin: 0; padding: 8px 38px 8px 14px; border-radius: 999px; border-color: var(--line); background: var(--surface); box-shadow: var(--shadow); font-size: .92rem; }
.gsearch input[type=search]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--info-bg); }
.gsearch .gs-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.gsearch input:focus + .gs-kbd, .gsearch input:not(:placeholder-shown) + .gs-kbd { display: none; }
.gsearch .gs-btn { border-radius: 999px; padding: 8px 15px; box-shadow: var(--shadow); }
.gsearch.gs-busy .gs-btn > span[aria-hidden] { animation: gs-pulse .8s ease-in-out infinite alternate; }
@keyframes gs-pulse { from { opacity: 1; } to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .gsearch.gs-busy .gs-btn > span[aria-hidden] { animation: none; } }
.gs-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; width: min(580px, calc(100vw - 32px)); max-height: min(72vh, 640px); overflow-y: auto;
  padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); }
.gs-pop-h { display: flex; align-items: center; gap: 6px; margin: 8px 8px 2px; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gs-pop-h:first-child { margin-top: 2px; }
.gs-opt { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); }
.gs-opt:hover, .gs-opt.active { background: var(--info-bg); text-decoration: none; }
.gs-opt-t { display: block; font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.gs-opt-s { display: block; font-size: .8rem; color: var(--text); opacity: .85; overflow-wrap: anywhere; }
.gs-opt-m { display: block; font-size: .74rem; color: var(--muted); overflow-wrap: anywhere; }
.gs-opt.gs-all { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.gs-opt.gs-all .gs-opt-t { color: var(--accent); }
.gs-pop-empty { padding: 10px 12px; color: var(--muted); font-size: .88rem; }
.gs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.gs-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .84rem; font-weight: 600; }
.gs-chip:hover { text-decoration: none; background: var(--surface-2); }
.gs-chip.active { background: var(--info-bg); color: var(--accent); border-color: transparent; }
.gs-chip-docs { border-style: dashed; color: var(--accent); }
.gs-h { display: flex; align-items: center; gap: 8px; }
.gs-group { scroll-margin-top: 12px; }
.gs-list { list-style: none; margin: 0; padding: 0; }
.gs-item { padding: 10px 0; border-top: 1px solid var(--line); }
.gs-item:first-child { border-top: 0; padding-top: 0; }
.gs-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.gs-title { font-weight: 600; overflow-wrap: anywhere; }
.gs-meta { margin-top: 2px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.gs-snip { margin-top: 4px; font-size: .86rem; overflow-wrap: anywhere; }
.gs-snip .gs-field { color: var(--muted); font-weight: 600; }
.gs-more { display: inline-block; margin-top: 8px; font-weight: 600; font-size: .88rem; }
.gs-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.gs-big { display: flex; gap: 8px; max-width: 720px; }
.gs-big input { margin: 0; }
.gs-tips { margin: 12px 0; padding-left: 1.2em; }
.gs-tips li { margin: 4px 0; }
.gs-searched { margin-top: -4px; }
@media (min-width: 861px) and (max-width: 1279px) { .topbar { margin-top: -10px; } }
@media (max-width: 860px) {
  .topbar { margin: -4px 0 12px; }
  .gsearch { width: 100%; }
  .gsearch .gs-kbd { display: none; }
  .gs-pop { width: 100%; }
}
@media (max-width: 480px) { .gsearch .gs-btn-l { display: none; } .gsearch .gs-btn { padding: 8px 12px; } .gs-big { flex-wrap: wrap; } }
@media print { .topbar { display: none; } }

/* ---------- v4: documentații mari și analiza aprofundată (citirea, cerințele procedurii, coerența, punctajul, decizia) ---------- */
.read-box { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; padding: 10px 14px; margin: 10px 0 14px; background: var(--ok-bg); }
.read-box.todo { border-left-color: var(--warn); background: var(--warn-bg); }
.read-box p { margin: 4px 0; }
.role-sel { width: auto; max-width: 230px; font-size: .86em; padding: 2px 4px; margin: 0; }
.role-sel.manual { border-color: var(--info); }
.doc-fisa-row > td { padding-top: 0; border-top: 0; }
.doc-fisa { margin: 0 0 6px 8px; padding: 4px 10px; border-left: 3px solid var(--line); }
.doc-fisa > summary { cursor: pointer; font-size: .9em; }
.doc-fisa h4 { margin: 8px 0 2px; font-size: .88em; }
.fisa-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4px 24px; }
.fisa-cols ul { margin: 0; padding-left: 18px; }
.deep-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; }
.deep-filters label { display: inline-flex; gap: 6px; align-items: center; font-size: .92em; }
.deep-filters select, .deep-filters input[type=search], .deep-filters input[type=text] { width: auto; max-width: 100%; margin: 0; }
.deep-filters input[type=search] { flex: 1 1 200px; min-width: 160px; }
.deep-filters .grow { flex: 1 1 320px; min-width: 220px; }
.chk { display: inline-flex; gap: 6px; align-items: baseline; }
.req-table td { vertical-align: top; }
.req-table td:nth-child(2) { min-width: 300px; }
.req-table input[type=text] { width: 100%; min-width: 150px; }
.st-sel { font-size: .88em; padding: 2px 4px; width: auto; min-width: 122px; margin: 0; }
.st-sel.st-ok { border-color: var(--ok); background: var(--ok-bg); }
.st-sel.st-danger { border-color: var(--danger); background: var(--danger-bg); }
.st-sel.st-info { border-color: var(--info); background: var(--info-bg); }
.coh-item textarea { width: 100%; margin-top: 6px; }
.sel-bar { display: inline-flex; gap: 6px; flex-wrap: wrap; margin: 0; }
/* matricea cerințelor: documentele atașate unei cerințe și experiența similară */
.req-files { list-style: none; margin: 6px 0 0; padding: 0; font-size: .86rem; }
.req-files li { padding: 2px 0; }
.req-files .x { margin-left: 4px; }
.req-att { margin-top: 6px; font-size: .84rem; }
.req-att > summary { cursor: pointer; color: var(--muted); display: inline-block; }
.req-att > summary:hover, .req-att[open] > summary { color: var(--text); }
.req-att.has-files > summary { color: var(--info); font-weight: 600; }
.req-att-add { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-top: 6px; padding: 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--neutral-bg); }
.req-att-add input[type=file] { max-width: 100%; font-size: .84rem; }
.req-exp { margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--info); background: var(--info-bg); border-radius: 0 8px 8px 0; }
.req-exp-ai { margin-bottom: 8px; }
details.req-exp-more:not([open]) { padding: 0; border-left: 0; background: none; }
details.req-exp-more > summary { cursor: pointer; font-size: .84rem; font-weight: 600; color: var(--muted); }
details.req-exp-more[open] > summary { margin-bottom: 6px; color: inherit; }
.req-exp-list { margin: 6px 0 4px; padding-left: 18px; font-size: .88rem; }
.req-exp-list li { margin-bottom: 4px; }
.req-exp-list .btn.small { padding: 1px 8px; font-size: .76rem; }
.req-exp-list .btn.ok { color: var(--ok); border-color: var(--ok); }
.req-exp-form { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; font-size: .84rem; }
.req-exp-form label { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.req-exp-form label.grow { flex: 1 1 260px; }
.req-exp-form input[type=text], .req-exp-form textarea { width: 100%; }
.req-exp-form textarea { min-height: 2.6em; resize: vertical; font: inherit; font-weight: 400; }
.req-exp-form .exp-pick { max-width: 240px; }
.exp-box { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.exp-box h3 { margin: 0; font-size: 1rem; }
.exp-box p { margin: 6px 0 0; }
.coh-item.done { opacity: .62; }
.coh-item h3 { margin: 0; font-size: 1.02em; }
.coh-src { margin: 4px 0; padding-left: 18px; }
.score-bar { height: 14px; border-radius: 7px; background: var(--neutral-bg); overflow: hidden; margin: 6px 0; }
.score-bar > span { display: block; height: 100%; background: var(--accent); }
.score-num { font-size: 1.15em; margin: 4px 0; }
.score-num strong { font-size: 1.5em; }
.score-pts { font-weight: 700; padding: 2px 10px; border-radius: 12px; background: var(--info-bg); white-space: nowrap; }
.score-pts.full { background: var(--ok-bg); }
.score-pts.none { background: var(--neutral-bg); font-weight: 400; }
.score-factor h3 { margin: 0; font-size: 1.02em; }
.score-els { display: grid; gap: 4px; margin: 8px 0; }
.score-els .chk { font-size: .93em; }
.deep-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.deep-steps a { display: block; padding: 8px 10px; border: 1px solid var(--line); border-left: 4px solid var(--warn); border-radius: 8px; text-decoration: none; color: inherit; }
.deep-steps a.done { border-left-color: var(--ok); }
.deep-steps a.go { border-left-color: var(--info); }
.deep-steps a b { display: block; font-size: .95em; }
.deep-steps a span { display: block; font-size: .82em; opacity: .75; }

/* HR: rândurile de calificări / diplome din formularul specialistului nou; codurile CPV */
.qual-rows { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.qual-rows legend { padding: 0 6px; font-weight: 600; }
.qual-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.qual-row label { display: flex; flex-direction: column; gap: 2px; font-size: .84rem; font-weight: 600; flex: 0 1 170px; }
.qual-row label.grow { flex: 1 1 300px; }
.qual-row input, .qual-row select { margin: 0; }
.qual-rows > .btn { margin-top: 8px; }
.spec-cpv-list { margin: 6px 0 10px; padding: 0; list-style: none; }
.spec-cpv-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); }
.spec-cpv-who { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.spec-cpv-who input { width: auto; margin: 0; }
.spec-cpv-list li > div { margin: 2px 0 0 26px; }
.spec-cpv-pos { display: flex; gap: 10px; align-items: center; }
.spec-cpv-pos input { margin: 4px 0 0; flex: 1 1 200px; }
.callout { margin: 8px 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--info); border-radius: 0 10px 10px 0; background: var(--surface); }
.callout p { margin: 0 0 6px; }
.person-sub { margin: 10px 0 4px; font-size: .95rem; }
.firm-admins { margin: -4px 0 12px; }

/* verificările de sub câmpuri (CNP, act de identitate, telefon, e-mail, date) */
.fld-check { display: block; min-height: 0; margin-top: 3px; font-size: .78rem; font-weight: 400; line-height: 1.3; }
.fld-check:empty { display: none; }
.fld-check.ok { color: var(--ok); }
.fld-check.err { color: var(--danger); font-weight: 600; }
.fld-check.warn { color: var(--warn); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--danger); background: var(--danger-bg); }
input.is-warn { border-color: var(--warn); }

/* Tipul documentului scris de echipă: câmpul care se deschide la „Alt document…” și lista cu tipurile ținute minte (assets/app.js) */
.kind-input { min-width: 0; }
.req-att-add .kind-input { flex: 1 1 210px; width: auto; max-width: 340px; margin: 0; font-size: .84rem; }
.req-att-add select[data-kind-select] { width: auto; max-width: 100%; margin: 0; font-size: .84rem; }
.kind-pop { position: fixed; z-index: 200; box-sizing: border-box; max-height: min(46vh, 320px); overflow-y: auto; padding: 5px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(16, 24, 40, .18); font-size: .9rem; text-align: left; }
.kind-pop-h { margin: 5px 9px 3px; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kind-opt { padding: 7px 10px; border-radius: 7px; cursor: pointer; overflow-wrap: anywhere; }
.kind-opt:hover, .kind-opt.active { background: var(--info-bg); }
.kind-opt b { font-weight: 700; }
.kind-pop-f { padding: 7px 10px 5px; color: var(--muted); font-size: .78rem; line-height: 1.35; }
.kind-opt + .kind-pop-f { margin-top: 4px; border-top: 1px solid var(--line); }
.kinds-table td:first-child { overflow-wrap: anywhere; }
.kinds-table details.inline-details > form { text-align: left; white-space: normal; }
/* formularul „✎” deschis pe un rând nu mai este tăiat de marginea tabelului (ultimele rânduri) */
.table-wrap:has(> .docs-table details.inline-details[open]), .table-wrap:has(> .kinds-table details.inline-details[open]) { overflow: visible; }

/* Logo-ul platformei (Setări → General) în locul semnului „RL”: în meniu, pe paginile de autentificare */
.brand-mark.has-logo { width: auto; min-width: 34px; max-width: 110px; height: 34px; padding: 0; background: none; border-radius: 6px; overflow: hidden; flex: 0 0 auto; }
.brand-mark.has-logo img { display: block; width: auto; height: auto; max-width: 110px; max-height: 34px; object-fit: contain; }
.brand-mark.has-logo.solo, .brand-mark.has-logo.solo img { max-width: 196px; }
.brand-mark.has-logo.solo { height: 40px; }
.brand-mark.has-logo.solo img { max-height: 40px; }
.brand.big { flex-wrap: wrap; }
.brand.big .brand-mark.has-logo { height: 56px; max-width: 200px; }
.brand.big .brand-mark.has-logo img { max-height: 56px; max-width: 200px; }
.brand.big .brand-mark.has-logo.solo { height: 72px; max-width: 100%; }
.brand.big .brand-mark.has-logo.solo img { max-height: 72px; max-width: 320px; }
@media (min-width: 861px) and (max-width: 1279px) { /* meniul îngust, cu pictograme */
  .sidebar .brand-mark.has-logo, .sidebar .brand-mark.has-logo.solo { max-width: 44px; height: 34px; }
  .sidebar .brand-mark.has-logo img, .sidebar .brand-mark.has-logo.solo img { max-width: 44px; max-height: 34px; }
}
@media (prefers-color-scheme: dark) { /* pe tema închisă logo-ul stă pe o plăcuță albă, ca să se vadă orice culori ar avea */
  .brand-mark.has-logo { background: #fff; padding: 3px 5px; box-sizing: content-box; }
}
.brand-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 8px 0 12px; }
.brand-swatch { display: grid; place-items: center; width: 150px; height: 76px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.brand-swatch.light { background: #fff; }
.brand-swatch.dark { background: #171d25; }
.brand-swatch.dark img { background: #fff; padding: 3px 5px; border-radius: 6px; }
.brand-swatch img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }

/* „Creează cont” (pagina publică): cardul mai lat, două câmpuri pe rând, câmpul-capcană pentru roboți */
.auth-card.auth-wide { max-width: 520px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .auth-row { grid-template-columns: 1fr; } }
.auth-card textarea { width: 100%; }
.auth-card .fld-check { display: block; }
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Cereri de cont (Utilizatori → Cereri de cont, doar superadministratorii) */
.signup-list { display: grid; gap: 10px; }
.signup-item { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1.3fr) auto; gap: 10px 18px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.signup-item .pill { white-space: nowrap; }
.signup-what { display: grid; gap: 4px; overflow-wrap: anywhere; }
.signup-who { overflow-wrap: anywhere; }
.signup-act { display: grid; gap: 6px; justify-items: start; }
.signup-act .add-row { margin: 0; }
.signup-act details.inline-details > form { text-align: left; min-width: 260px; }
.signup-act select { min-width: 0; max-width: 100%; }
@media (max-width: 900px) {
  .signup-item { grid-template-columns: minmax(0, 1fr); }
  .signup-act, .signup-act .add-row { min-width: 0; max-width: 100%; }
  .signup-act details.inline-details > form { min-width: 0; }
}

/* ---------- v4.4: Grafic · MS Project (exportul pentru Microsoft Project, graficul importat, Gantt) ---------- */
.msp-cards { align-items: start; margin-bottom: 18px; }
@media (max-width: 1100px) { .msp-cards { grid-template-columns: 1fr; } }
.msp-h { margin: 14px 0 4px; }
.msp-h:first-of-type { margin-top: 2px; }
.msp-stats { margin: 6px 0 10px; padding-left: 18px; }
.msp-stats li { margin: 2px 0; }
.msp-tpl-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; margin: 6px 0 4px; }
.msp-tpl-form label { margin: 0; }
.msp-tpl-form input[type=date] { width: auto; }
.msp-import input[type=file] { display: block; margin-top: 4px; max-width: 100%; }
.msp-import .form-row { margin: 10px 0; }
details.msp-how, details.msp-edit, details.msp-table { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 8px; }
details.msp-how > summary, details.msp-edit > summary, details.msp-table > summary { cursor: pointer; font-weight: 600; }
details.msp-how ol { margin: 8px 0 4px; padding-left: 20px; }
details.msp-how li { margin: 3px 0; }
.msp-edit-form { margin-top: 10px; }
.msp-term { display: flex; gap: 6px; }
.msp-term input { width: 90px; flex: 0 0 90px; }
.msp-term select { flex: 1; min-width: 0; }
.msp-list tr.msp-current > td { background: var(--info-bg); }
.msp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px 14px; margin: 10px 0 12px; }
.msp-facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; min-width: 0; }
.msp-facts dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.msp-facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.msp-check { margin-bottom: 8px; }
.msp-check ul { margin: 4px 0 0; padding-left: 18px; }
.msp-table tr.msp-sum > td { font-weight: 650; background: var(--surface-2); }
.msp-table .table-wrap { margin-top: 8px; max-height: 70vh; overflow: auto; }

.gantt { --ppd: 0; --g-left: 640px; --g-w0: 0; --g-year: #9aa6b5; --g-we: rgba(100, 116, 139, .11); margin-top: 12px; }
.gantt-tools { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-bottom: 8px; }
.gantt-tools .g-tool { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.gantt-tools .btn.active { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.gantt-scroll { overflow: auto; max-height: 74vh; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.gantt-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; width: max(100%, calc(var(--g-left) + var(--g-days) * var(--ppd) * 1px)); font-size: .8rem; }
.gantt-table th, .gantt-table td { padding: 0 8px; height: 27px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--surface); text-align: left; }
.gantt-table thead th { position: sticky; top: 0; z-index: 3; height: 40px; background: var(--surface-2); font-size: .74rem; font-weight: 600; color: var(--muted); }
.gantt-table .g-n { width: 300px; position: sticky; left: 0; z-index: 2; border-right: 1px solid var(--line); }
.gantt-table thead .g-n { z-index: 4; }
.gantt-table .g-d { width: 92px; }
.gantt-table .g-s, .gantt-table .g-f { width: 88px; }
.gantt-table .g-p { width: 52px; text-align: right; }
.gantt-table .g-t { position: relative; padding: 0; }
/* banda barelor: 10 px de loc la margini (jaloanele de la capete se văd întregi); liniile lunilor, „azi” și termenul sunt fundalul ei */
.g-lane { position: absolute; top: 0; bottom: 0; left: 10px; right: 10px; background-image: var(--g-grid); background-size: 100% 100%; background-repeat: no-repeat; }
/* la mărire: liniile săptămânilor (de luni) și, pe zile, sfârșiturile de săptămână umbrite */
.gantt.g-z-w .g-lane { background-image: var(--g-grid), linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, calc(7 * var(--ppd) * 1px) 100%; background-position: 0 0, calc(var(--g-w0) * var(--ppd) * 1px) 0; background-repeat: no-repeat, repeat-x; }
.gantt.g-z-d .g-lane { background-image: var(--g-grid), linear-gradient(to right, var(--line) 1px, transparent 1px, transparent 71.4286%, var(--g-we) 71.4286%); }
.gantt-table tbody tr:hover > td { background-color: var(--surface-2); }
.g-name { display: flex; align-items: center; gap: 4px; min-width: 0; padding-left: calc((var(--l) - 1) * 13px); }
.g-tog, .g-tog-sp { flex: 0 0 15px; width: 15px; }
.g-tog { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-size: .8rem; line-height: 1; transition: transform .12s; }
.g-row[data-open="0"] .g-tog { transform: rotate(-90deg); }
.g-id { flex: 0 0 auto; min-width: 1.7em; text-align: right; color: var(--muted); font-size: .7rem; }
.g-txt { overflow: hidden; text-overflow: ellipsis; }
.g-k-s .g-txt { font-weight: 650; }
.g-off .g-txt { text-decoration: line-through; color: var(--muted); }
.g-bar { position: absolute; top: 7px; height: 13px; min-width: 3px; box-sizing: border-box; border: 1px solid var(--accent); border-radius: 3px; background: #a9c3e6; background: color-mix(in srgb, var(--accent) 38%, var(--surface)); }
.g-bar > i { display: block; height: 100%; background: var(--accent); }
.g-bar-s { top: 9px; height: 8px; border: 0; border-radius: 0; background: var(--text); clip-path: polygon(0 0, 100% 0, 100% 100%, calc(100% - 4px) 50%, 4px 50%, 0 100%); }
.g-ms { position: absolute; top: 8px; width: 11px; height: 11px; margin-left: -5.5px; background: var(--text); transform: rotate(45deg); }
.g-done .g-ms { background: var(--ok); }
.g-lbl { position: absolute; top: 6px; margin-left: 11px; font-size: .68rem; color: var(--muted); pointer-events: none; }
.g-lbl.g-lbl-l { margin-left: -11px; transform: translateX(-100%); }
.g-dl { position: absolute; top: 1px; width: 0; height: 0; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--ok); }
.g-dl.late { border-top-color: var(--danger); }
.g-off .g-bar, .g-off .g-ms { opacity: .35; }
.gantt.g-show-crit .g-crit .g-bar:not(.g-bar-s) { border-color: var(--danger); background: #f0b4ae; background: color-mix(in srgb, var(--danger) 36%, var(--surface)); }
.gantt.g-show-crit .g-crit .g-bar:not(.g-bar-s) > i { background: var(--danger); }
.gantt.g-show-crit .g-crit .g-ms { background: var(--danger); }
.g-axis { position: relative; height: 40px; margin: 0 10px; }
.g-years, .g-months { position: absolute; left: 0; right: 0; height: 20px; }
.g-months { top: 20px; }
.g-yr, .g-mo { position: absolute; top: 0; height: 20px; line-height: 20px; text-align: center; overflow: hidden; border-left: 1px solid var(--line); box-sizing: border-box; }
.g-yr { font-weight: 700; color: var(--text); border-left-color: var(--g-year); }
.g-mo b { font-weight: 500; }
.g-mo i, .g-mo u, .g-mo s { display: none; font-style: normal; text-decoration: none; }
.g-mo.mid b, .g-mo.wide b { display: none; }
.g-mo.mid u, .g-mo.wide s { display: inline; }
.g-mo.short b, .g-mo.tiny b, .g-mo.tiny i, .g-yr.tiny { font-size: 0; }
.g-mo.short b { display: none; }
.g-mo.short i { display: inline; }
.g-flag { position: absolute; top: 22px; transform: translateX(-50%); z-index: 1; padding: 0 4px; border-radius: 3px; font-size: .62rem; line-height: 15px; font-weight: 600; color: #fff; }
.g-flag.g-flag-r { transform: translateX(-100%); border-radius: 3px 0 0 3px; }
.g-flag.g-flag-l { transform: none; border-radius: 0 3px 3px 0; }
.g-flag-limit { background: var(--danger); }
.g-flag-today { background: var(--info); }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; }
.g-key { display: inline-flex; align-items: center; gap: 6px; }
.g-demo { position: static !important; display: inline-block; margin: 0 !important; }
.g-bar.g-demo { width: 26px; }
.g-ms.g-demo { margin: 0 3px !important; }
.g-dl.g-demo { margin: 0 !important; }
.g-line { display: inline-block; width: 3px; height: 14px; }
.g-line-limit { background: var(--danger); }
.g-line-today { background: var(--info); }
@media (max-width: 860px) {
  .gantt { --g-left: 216px; }
  .gantt-table .g-n { width: 196px; }
  .gantt-table .g-d, .gantt-table .g-s, .gantt-table .g-f, .gantt-table .g-p { display: none; }
}
/* tipărire: totul desfăcut pe lățimea paginii, capul de tabel repetat pe fiecare pagină, barele colorate */
.gantt-print .gantt-scroll { max-height: none; overflow: visible; }
.gantt-print .gantt-table { width: 100%; font-size: 11px; }
.gantt-print .gantt-table th, .gantt-print .gantt-table td { height: 21px; }
.gantt-print .gantt-table thead th { position: static; height: 36px; }
.gantt-print .gantt-table .g-n { position: static; width: 34%; }
.gantt-print .g-axis { height: 36px; }
.gantt-print .g-years, .gantt-print .g-months { height: 18px; }
.gantt-print .g-months { top: 18px; }
.gantt-print .g-yr, .gantt-print .g-mo { height: 18px; line-height: 18px; }
.gantt-print .g-flag { top: 19px; }
.gantt-print .g-bar { top: 4px; }
.gantt-print .g-bar-s { top: 6px; }
.gantt-print .g-ms { top: 5px; }
.gantt-print .g-lbl { top: 3px; }
@media print {
  .gantt-scroll { max-height: none !important; overflow: visible !important; border: 0; }
  .gantt-table { width: 100% !important; }
  .gantt-table thead { display: table-header-group; }
  .gantt-table thead th, .gantt-table .g-n { position: static !important; }
  .gantt-table tr { break-inside: avoid; }
  .gantt-table tr[hidden] { display: none; }
  .gantt, .gantt * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
