/* ============================================================
   pv_app.css — Stiluri Aplicație Procese Verbale de Recepție
   ElectroLight.ro / Proenerg
   ============================================================ */

/* ── Reset + variabile ─────────────────────────────────────── */
:root {
  --c-bg:        #0f1117;
  --c-surface:   #1a1d27;
  --c-surface2:  #232637;
  --c-border:    #2e3347;
  --c-text:      #e2e8f0;
  --c-text-muted:#8892aa;
  --c-primary:   #6366f1;
  --c-primary-h: #818cf8;
  --c-success:   #10b981;
  --c-warning:   #f59e0b;
  --c-danger:    #ef4444;
  --c-info:      #3b82f6;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,0,0,.35);
  --font:        'DM Sans', system-ui, sans-serif;
  --font-mono:   'DM Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Layout ────────────────────────────────────────────────── */
.pv-app   { display: flex; flex-direction: column; min-height: 100vh; }
.pv-main  { flex: 1; padding: 24px; max-width: 1400px; margin: 0 auto; width: 100%; }

/* ── Navbar ────────────────────────────────────────────────── */
.pv-nav {
  background: var(--c-surface); border-bottom: 1px solid var(--c-border);
  height: 56px; position: sticky; top: 0; z-index: 100;
}
.pv-nav__inner {
  display: flex; align-items: center; gap: 24px;
  max-width: 1400px; margin: 0 auto; width: 100%;
  padding: 0 24px; height: 100%;
}
.pv-nav__brand {
  font-family: 'Syne', var(--font); font-weight: 700; font-size: 18px;
  color: var(--c-text-muted); white-space: nowrap;
}
.pv-nav__links { display: flex; gap: 4px; flex: 1; }
.pv-nav__link {
  background: none; border: none; color: var(--c-text-muted);
  padding: 6px 14px; border-radius: var(--radius); cursor: pointer;
  font-size: 13px; font-family: var(--font); transition: all .15s;
}
.pv-nav__link:hover           { background: var(--c-surface2); color: var(--c-text); }
.pv-nav__link--active         { background: var(--c-primary)22; color: var(--c-primary); font-weight: 500; }
.pv-nav__user { display: flex; align-items: center; gap: 12px; color: var(--c-text-muted); font-size: 13px; margin-left: auto; }

/* ── Page header ───────────────────────────────────────────── */
.pv-page { display: flex; flex-direction: column; gap: 12px; }
.pv-page__header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 16px; border-bottom: 1px solid var(--c-border);
}
.pv-page__header-left  { display: flex; align-items: center; gap: 12px; }
.pv-page__header-right { display: flex; align-items: center; gap: 8px; }
.pv-page__header h2 { font-size: 22px; font-weight: 700; }
.pv-legend { display: flex; align-items: center; gap: 8px; }
.pv-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.pv-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ── Butoane ────────────────────────────────────────────────── */
.pv-btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: none; border-radius: var(--radius); cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  padding: 7px 16px; transition: all .15s; white-space: nowrap;
}
.pv-btn:disabled { opacity: .5; cursor: not-allowed; }
.pv-btn--primary  { background: var(--c-primary);  color: #fff; }
.pv-btn--primary:hover:not(:disabled)  { background: var(--c-primary-h); }
.pv-btn--secondary{ background: var(--c-surface2); color: var(--c-text); border: 1px solid var(--c-border); }
.pv-btn--secondary:hover:not(:disabled){ background: var(--c-border); }
.pv-btn--ghost    { background: transparent; color: var(--c-text-muted); }
.pv-btn--ghost:hover:not(:disabled)    { background: var(--c-surface2); color: var(--c-text); }
.pv-btn--danger   { background: var(--c-danger)44; color: var(--c-danger); border: 1px solid var(--c-danger)88; font-weight: 600; }
.pv-btn--danger:hover:not(:disabled)   { background: var(--c-danger)66; }
.pv-btn--success  { background: var(--c-success)44; color: var(--c-success); border: 1px solid var(--c-success)88; font-weight: 600; }
.pv-btn--success:hover:not(:disabled)  { background: var(--c-success)66; }
.pv-btn--sm  { padding: 4px 10px; font-size: 12px; }
.pv-btn--xs  { padding: 2px 6px;  font-size: 11px; }
.pv-btn--lg  { padding: 10px 24px; font-size: 14px; }
.pv-btn--full{ width: 100%; }
.pv-btn--icon{ padding: 4px 8px; }

/* ── Inputs ─────────────────────────────────────────────────── */
.pv-input, .pv-select, .pv-textarea {
  background: var(--c-surface2); border: 1px solid var(--c-border);
  border-radius: var(--radius); color: var(--c-text);
  font-family: var(--font); font-size: 13px;
  padding: 7px 10px; width: 100%; transition: border-color .15s;
}
.pv-input:focus, .pv-select:focus, .pv-textarea:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 2px var(--c-primary)22;
}
.pv-textarea { resize: vertical; min-height: 72px; }
.pv-select   { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238892aa' d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; padding-right: 28px; }
.pv-input--warning { border-color: var(--c-warning)66; }
.pv-input--info    { border-color: var(--c-info)66; }
.pv-input--error   { border-color: var(--c-danger) !important; background: var(--c-danger)11; }
.pv-input--sku     { max-width: 100px; font-family: var(--font-mono); font-size: 12px; }
.pv-input--qty     { max-width: 80px; text-align: right; }
.pv-input--denumire{ min-width: 200px; }
.pv-select--um     { max-width: 70px; font-size: 12px; }

/* ── Field + label ──────────────────────────────────────────── */
.pv-field            { display: flex; flex-direction: column; gap: 4px; }
.pv-label            { font-size: 12px; color: var(--c-text-muted); font-weight: 500; }
.pv-field--error .pv-input,
.pv-field--error .pv-select { border-color: var(--c-danger); }
.pv-field__error     { font-size: 11px; color: var(--c-danger); }

/* ── Input combo (select + text) ───────────────────────────── */
.pv-input-combo { display: flex; gap: 6px; }
.pv-input-combo .pv-select { max-width: 220px; }
.pv-furnizor-ac-item:hover { background: var(--c-primary-subtle, rgba(59,130,246,.08)); }
.pv-furnizor-ac-item:last-child { border-bottom: none !important; }

/* ── Cards ──────────────────────────────────────────────────── */
.pv-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 20px;
}
.pv-card__title  { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--c-text); }
.pv-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pv-card__header .pv-card__title { margin-bottom: 0; }

/* ── Grids ──────────────────────────────────────────────────── */
.pv-grid     { display: grid; gap: 16px; }
.pv-grid--2  { grid-template-columns: repeat(2, 1fr); }
.pv-grid--3  { grid-template-columns: repeat(3, 1fr); }
.pv-grid--4  { grid-template-columns: repeat(4, 1fr); }

/* ── Tabel general ──────────────────────────────────────────── */
.pv-table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--c-border); background: var(--c-surface); }
.pv-table { width: 100%; border-collapse: collapse; }
.pv-table th {
  background: var(--c-surface2); padding: 10px 12px; text-align: left;
  font-size: 12px; font-weight: 700;
  letter-spacing: .04em; color: var(--c-text-muted); border-bottom: 2px solid var(--c-border);
  white-space: nowrap;
}
.pv-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); vertical-align: middle; font-size: 13px; }
.pv-table tbody tr:last-child td { border-bottom: none; }
.pv-table tbody tr:hover { background: var(--c-surface2)66; }
.pv-td-center { text-align: center; }
.pv-td-right  { text-align: right; font-family: var(--font-mono); }

/* ── Tabel linii produse ────────────────────────────────────── */
.pv-linii-table-wrap { overflow-x: auto; margin: 0 -4px; }
.pv-linii-table th, .pv-linii-table td { padding: 6px 8px; }
.pv-sku-cell  { display: flex; align-items: center; gap: 4px; }

/* ── Dashboard stats ────────────────────────────────────────── */
.pv-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pv-stat-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); padding: 20px 24px;
}
.pv-stat-card__value { font-size: 36px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.pv-stat-card__label { font-size: 13px; color: var(--c-text-muted); }
.pv-dashboard-actions { display: flex; justify-content: center; }

/* ── Filtre ─────────────────────────────────────────────────── */
.pv-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pv-filters .pv-input  { max-width: 360px; }
.pv-filters .pv-select { max-width: 200px; }
.pv-filters__date { display: flex; flex-direction: column; gap: 4px; }
.pv-filters__date .pv-label { font-size: 11px; margin-bottom: 0; }
.pv-filters__date .pv-input { max-width: 160px; }

/* ── Status pill filters ──────────────────────────────────────── */
.pv-status-pills {
  display: flex; flex-direction: column; gap: 6px;
}
.pv-status-pills__label {
  font-size: 11px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--c-text-muted);
}
.pv-status-pills__row {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pv-status-pill-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
  border: 1.5px solid; cursor: pointer; transition: background .15s, color .15s;
  background: transparent; line-height: 1.4;
}
.pv-status-pill-btn:hover { opacity: .85; }
.pv-status-pill-btn--active {
  color: #fff !important;
}
.pv-status-pill-btn__dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: currentColor;
}

/* ── Badges + pills ─────────────────────────────────────────── */
.pv-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 100px; font-size: 11px; font-weight: 600;
}
.pv-badge--red   { background: var(--c-danger)22;  color: var(--c-danger); }
.pv-badge--green { background: var(--c-success)22; color: var(--c-success); }
.pv-badge--blue { background: #3b82f622; color: #3b82f6; }

.pv-status-pill {
  display: inline-block; padding: 3px 10px;
  border-radius: 100px; font-size: 11px; font-weight: 600;
}
.pv-sku-badge {
  display: inline-block; padding: 1px 6px;
  background: var(--c-primary)22; color: var(--c-primary);
  border-radius: 4px; font-size: 11px; font-family: var(--font-mono);
}

/* ── Acțiuni ────────────────────────────────────────────────── */
.pv-actions { display: flex; gap: 4px; flex-wrap: wrap; }

/* ── Alerts ─────────────────────────────────────────────────── */
.pv-alert {
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 4px;
}
.pv-alert--error { background: var(--c-danger)22;  color: var(--c-danger);  border: 1px solid var(--c-danger)44; }
.pv-alert--sm    { padding: 8px 12px; font-size: 12px; }

/* ── Empty state ────────────────────────────────────────────── */
.pv-empty { text-align: center; padding: 60px; color: var(--c-text-muted); }

/* ── Banner limită afișare ───────────────────────────────────── */
.pv-limit-notice {
  font-size: 13px;
  color: var(--c-text-muted);
  padding: 2px 2px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Paginare ────────────────────────────────────────────────── */
.pv-pagination-info {
  font-size: 13px;
  color: var(--c-text-muted);
  padding: 4px 2px 8px;
}
.pv-paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 0 8px;
  flex-wrap: wrap;
}
.pv-paginator__pages {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.pv-paginator__ellipsis {
  padding: 0 4px;
  color: var(--c-text-muted);
  font-size: 14px;
  line-height: 32px;
}

/* ── Text utils ─────────────────────────────────────────────── */
.pv-text--danger { color: var(--c-danger); font-weight: 600; }
.pv-text--info   { color: var(--c-info);   font-weight: 600; }

/* ── Modal ──────────────────────────────────────────────────── */
.pv-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.pv-modal {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius-lg); width: 480px; max-width: 95vw;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0;
}
.pv-modal--sm { width: 360px; }
.pv-modal__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--c-border);
}
.pv-modal__header h3 { font-size: 16px; font-weight: 600; }
.pv-modal__body   { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.pv-modal__footer {
  padding: 14px 20px; border-top: 1px solid var(--c-border);
  display: flex; gap: 8px; justify-content: flex-end;
}

/* ── Spinner ────────────────────────────────────────────────── */
.pv-spinner { display: flex; align-items: center; justify-content: center; padding: 40px; }
.pv-spinner--full { min-height: 100vh; }
.pv-spinner__ring {
  width: 40px; height: 40px;
  border: 3px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: pv-spin .7s linear infinite;
}
@keyframes pv-spin { to { transform: rotate(360deg); } }

/* ── Toast ──────────────────────────────────────────────────── */
.pv-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--c-surface2); border: 1px solid var(--c-border);
  padding: 12px 20px; border-radius: var(--radius);
  font-size: 13px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); transition: all .25s;
}
.pv-toast--show { opacity: 1; transform: translateY(0); }
.pv-toast--error { border-color: var(--c-danger)66; color: var(--c-danger); }
.pv-toast--info  { border-color: var(--c-info)66;   color: var(--c-info); }

/* ── Form footer ────────────────────────────────────────────── */
.pv-form-footer {
  display: flex; justify-content: flex-end; gap: 12px;
  padding-top: 8px;
}

/* ── Login ──────────────────────────────────────────────────── */
/* ── Login — Blueprint A ────────────────────────────────────── */
.pv-login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); position: relative; overflow: hidden;
}
.pv-login__box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-left: 3px solid var(--c-primary);
  border-radius: var(--radius-lg); padding: 36px; width: 364px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px;
  position: relative; z-index: 1;
}
.pv-login__eyebrow {
  font-size: 10px; letter-spacing: 3px; font-weight: 700; text-transform: uppercase;
  color: #1d6ef5;
}
.pv-login__title {
  font-size: 26px; font-weight: 800; line-height: 1.1;
  color: var(--c-text); margin: 0;
}
.pv-login__tagline {
  font-size: 12px; color: var(--c-text-muted); margin-top: 6px; letter-spacing: .2px;
}
.pv-login__chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.09);
  border: 1px solid rgba(99,102,241,.22);
  border-radius: 20px; padding: 5px 12px;
  font-size: 11px; color: var(--c-primary-h);
}
[data-theme="light"] .pv-login__chip {
  background: rgba(0,113,227,.08);
  border-color: rgba(0,113,227,.2);
  color: var(--c-primary);
}
.pv-login__div { border-top: 1px solid var(--c-border); }
.pv-login__box form { display: flex; flex-direction: column; gap: 14px; }

/* buton login — albastru cu hover negru/gri închis */
.pv-btn--login {
  background: #1d6ef5; color: #fff;
  border: none; border-radius: var(--radius);
  padding: 13px 16px; font-size: 14px; font-weight: 700;
  letter-spacing: .4px; cursor: pointer; transition: background .18s; width: 100%;
}
/* dark (default): albastru mai inchis - contrast vizibil pe fond dark */
.pv-btn--login:hover:not(:disabled) { background: #1558c0; }
/* light: negru/gri inchis - contrast puternic pe fond alb */
[data-theme="light"] .pv-btn--login:hover:not(:disabled) { background: #111827; }
.pv-btn--login:disabled { opacity: .55; cursor: not-allowed; }

/* ─────────────────────────────────────────────────────────────
   DOCUMENT PV (vizualizare tipăribilă)
───────────────────────────────────────────────────────────── */
.pv-document {
  background: white; color: #111;
  padding: 32px 40px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow); max-width: 900px; margin: 0 auto;
  font-family: Arial, sans-serif;
}
.pv-doc__title {
  text-align: center; margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid #ccc;
}
.pv-doc__title h1 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.pv-doc__title p  { font-size: 13px; color: #555; }

.pv-doc__meta        { margin-bottom: 16px; }
.pv-doc__meta-row    { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; font-size: 13px; }
.pv-doc__meta-row span   { color: #555; }
.pv-doc__meta-row strong { border-bottom: 1px solid #999; min-width: 120px; display: inline-block; padding-bottom: 1px; }

.pv-doc__table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 12px; }
.pv-doc__table th {
  border: 1px solid #555; padding: 6px 8px; text-align: center;
  background: #f5f5f5; font-weight: 600; font-size: 11px; vertical-align: middle;
}
.pv-doc__table td {
  border: 1px solid #999; padding: 6px 8px; vertical-align: top; min-height: 28px;
}
.pv-doc__table td:nth-child(1) { min-width: 180px; }
.pv-doc__row--neconf td { background: #fff8f8; }
.pv-doc__row--empty td  { height: 28px; }
.pv-doc__table .pv-text--danger { color: #c00; }
.pv-doc__table .pv-text--info   { color: #06c; }

.pv-doc__propuneri       { margin: 16px 0; font-size: 13px; }
.pv-doc__propuneri-text  { border-bottom: 1px solid #999; min-height: 32px; padding: 4px 0; }

.pv-doc__semnaturi {
  display: flex; justify-content: space-between; margin: 24px 0 16px;
  gap: 24px; font-size: 12px;
}
.pv-doc__semnat-group { flex: 1; }
.pv-doc__semnat-group > p { margin-bottom: 12px; font-size: 12px; }
.pv-doc__semnat-row { display: flex; gap: 24px; }
.pv-doc__semnat     { flex: 1; }
.pv-doc__semnat-line { border-bottom: 1px solid #555; height: 36px; margin-bottom: 4px; }
.pv-doc__semnat span { font-size: 11px; color: #555; }

.pv-doc__footer {
  display: flex; justify-content: space-between; padding-top: 12px;
  border-top: 1px solid #ccc; font-size: 11px; color: #888;
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .pv-nav, .pv-page__header, .pv-form-footer, .pv-filters,
  .pv-btn, .pv-actions, .pv-no-print { display: none !important; }
  body, .pv-app, .pv-main { background: white !important; }
  .pv-document { box-shadow: none; padding: 0; border-radius: 0; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .pv-grid--3, .pv-grid--4 { grid-template-columns: 1fr 1fr; }
  .pv-grid--2               { grid-template-columns: 1fr; }
  .pv-stats-grid            { grid-template-columns: 1fr 1fr; }
  .pv-main                  { padding: 16px; }
  .pv-filters               { flex-direction: column; }
  .pv-filters .pv-input, .pv-filters .pv-select,
  .pv-filters__date .pv-input { max-width: 100%; }
  .pv-input-combo           { flex-direction: column; }
  .pv-input-combo .pv-select{ max-width: 100%; }
}

@media (max-width: 480px) {
  .pv-stats-grid            { grid-template-columns: 1fr; }
  .pv-grid--3, .pv-grid--4  { grid-template-columns: 1fr; }
}

/* ============================================================
   MODIFICĂRI v2.0 — Flux Merceolog
   ============================================================ */

/* ── Role badge în navbar ──────────────────────────────────── */
.pv-nav__role-badge {
  font-size: 10px;
  font-family: 'DM Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: none;
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
  font-weight: 400;
}

/* ── Stat card clickable ───────────────────────────────────── */
.pv-stat-card--clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pv-stat-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

/* ── Badge yellow ──────────────────────────────────────────── */
.pv-badge--yellow {
  background: #fef3c722;
  color: #d97706;
  border: 1px solid #fde68a;
}

/* ── Bulk merceolog selector ───────────────────────────────── */
.pv-card__header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pv-bulk-merceolog {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 8px;
  padding: 4px 10px 4px 12px;
}
.pv-bulk-merceolog__label {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  white-space: nowrap;
}
.pv-select--sm { font-size: 13px; padding: 4px 8px; min-width: 160px; }
.pv-select--merceolog { min-width: 130px; font-size: 12px; }

/* ── Coloana merceolog în tabel PV View ────────────────────── */
.pv-merceolog-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}
.pv-badge--sm {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  display: inline-block;
  width: fit-content;
}

/* ── Pagina Merceolog ──────────────────────────────────────── */
.pv-merceolog-card {
  margin-bottom: 0;
}
.pv-merceolog-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
}
.pv-merceolog-card__header h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pv-merceolog-card__meta {
  font-size: 12px;
  color: var(--c-text2);
}
.pv-merceolog-card__stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  justify-content: flex-end;
}
.pv-merceolog-card__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.pv-badge--vezi-pv {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: var(--c-text);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 12px;
  white-space: nowrap;
}
.pv-badge--vezi-pv:hover {
  background: var(--c-surface2, rgba(0,0,0,0.05));
}

/* ── Linii merceolog ───────────────────────────────────────── */
.pv-merceolog-linii {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pv-merceolog-linie {
  position: relative;
  border: 1px solid var(--ticket-color, var(--c-border));
  border-left: 4px solid var(--ticket-color, var(--c-border));
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--c-surface);
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
  transition: box-shadow .2s, transform .15s;
}
.pv-merceolog-linie:hover {
  box-shadow: 0 5px 24px rgba(0,0,0,.35);
  transform: translateY(-1px);
}
/* Status color variants */
.pv-merceolog-linie--creat    { --ticket-color: #ef4444; }
.pv-merceolog-linie--trimis   { --ticket-color: #f97316; }
.pv-merceolog-linie--in-curs  { --ticket-color: #3b82f6; }
.pv-merceolog-linie--rezolvat { --ticket-color: #10b981; }
.pv-merceolog-linie--anulat   { --ticket-color: #374151; opacity: .65; }
.pv-merceolog-linie--completata { --ticket-color: #10b981; }
.pv-merceolog-linie__produs { margin-bottom: 0; } /* compat */
.pv-merceolog-linie__denumire {
  display: flex; align-items: center; gap: 8px; font-size: 14px;
}
.pv-merceolog-linie__cantitati {
  display: flex; gap: 20px; font-size: 12px; color: var(--c-text-muted);
}
/* ── Ticket HEAD ── */
.pv-merceolog-linie__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: var(--c-surface2);
  border-bottom: 1px solid var(--c-border);
}
.pv-merceolog-linie__head-left {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0;
}
.pv-merceolog-linie__head-right {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.pv-merceolog-linie__num {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.pv-merceolog-linie__name {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ── QTY ROW ── */
.pv-merceolog-linie__qty-row {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 16px;
  background: color-mix(in srgb, var(--ticket-color, var(--c-border)) 5%, var(--c-surface));
  border-bottom: 1px solid var(--c-border);
  font-size: 12px; color: var(--c-text-muted);
}
.pv-merceolog-linie__qty-item { display: flex; align-items: center; gap: 4px; }
.pv-merceolog-linie__qty-val  { color: var(--c-text); font-weight: 600; font-family: var(--font-mono); }
.pv-merceolog-linie__qty-diff { margin-left: auto; font-size: 12px; font-weight: 600; }
.pv-merceolog-linie__qty-diff + .pv-merceolog-linie__qty-diff { margin-left: 8px; }
.pv-merceolog-linie__qty-diff--neg { color: var(--c-danger); }
.pv-merceolog-linie__qty-diff--pos { color: var(--c-success); }
.pv-merceolog-linie__fields {
  padding: 14px 16px;
}
.pv-merceolog-linie__status-row {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.pv-merceolog-linie__footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  border-top: 1px solid color-mix(in srgb, var(--ticket-color, var(--c-border)) 30%, transparent);
  background: color-mix(in srgb, var(--ticket-color, var(--c-surface2)) 8%, var(--c-surface));
}
.pv-merceolog-linie__footer--atribuire {
  gap: 8px; flex-wrap: wrap; justify-content: flex-start;
}

/* Buton adaugă comentariu — integrat în tema ticketului */
.pv-merceolog-linie__footer .pv-btn--primary {
  background: transparent;
  color: color-mix(in srgb, var(--ticket-color, var(--c-primary)) 85%, var(--c-text));
  border: 1px solid color-mix(in srgb, var(--ticket-color, var(--c-primary)) 40%, transparent);
}
.pv-merceolog-linie__footer .pv-btn--primary:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ticket-color, var(--c-primary)) 10%, var(--c-surface));
}

/* Separator "sau" între butoanele de atribuire */
.pv-merceolog-atrib-sep {
  padding: 0 6px;
  color: var(--c-text-muted);
  font-size: 13px;
}

/* Reatribuire în header card — lângă "Vezi PV" */
.pv-header-reattr {
  display: flex;
  align-items: center;
}
.pv-header-reattr__row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Card neatribuit — bordura evidențiată */
.pv-merceolog-card--neatribuita {
  border-left: 4px solid #f59e0b !important;
}

/* Linie neatribuită */
.pv-merceolog-linie--neatribuita {
  --ticket-color: #f59e0b;
}
.pv-merceolog-linie--neatribuita .pv-merceolog-linie__head {
  background: color-mix(in srgb, #f59e0b 8%, var(--c-surface2));
}

/* Titluri de secțiune între grupe */
.pv-merceolog-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 8px;
  flex-wrap: wrap;
}
.pv-merceolog-section-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-text);
}
.pv-merceolog-section-title--neatribuite h3 {
  color: #b45309;
}
.pv-merceolog-section-subtitle {
  width: 100%;
  margin: 0;
  font-size: 12px;
  color: var(--c-text-muted, #94a3b8);
}

/* Rând dropdown reatribuire */
.pv-merceolog-reattr {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pv-merceolog-reattr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pv-merceolog-reattr__toggle {
  font-size: 12px;
  opacity: 0.7;
}
.pv-merceolog-reattr__toggle:hover { opacity: 1; }

/* ── Varianta C: rând compact + panou expandabil ────────────── */

/* Rândul compact (mereu vizibil) */
.pv-linie-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  cursor: pointer;
  background: var(--c-surface2);
  border-bottom: 1px solid transparent;
  transition: background .15s;
  user-select: none;
  min-height: 44px;
}
.pv-linie-compact:hover {
  background: color-mix(in srgb, var(--ticket-color, var(--c-border)) 6%, var(--c-surface2));
}
.pv-linie-compact--open {
  border-bottom: 1px solid var(--c-border);
}

/* Zona stângă: num + sku + denumire + badges */
.pv-linie-compact__left {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
}
.pv-linie-compact__name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
/* Punct indicator „dirty" (modificări nesalvate) */
.pv-linie-compact__dirty {
  color: #f59e0b;
  font-size: 14px;
  flex-shrink: 0;
  line-height: 1;
}

/* Zona centrală: cantități */
.pv-linie-compact__qty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}
.pv-linie-compact__qty-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.pv-linie-compact__qty-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
}
.pv-linie-compact__qty-val {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--c-text);
}
.pv-linie-compact__qty-sep {
  opacity: 0.35;
}
.pv-linie-compact__diff {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
}
.pv-linie-compact__diff--neg {
  background: rgba(239, 68, 68, .12);
  color: var(--c-danger);
}
.pv-linie-compact__diff--pos {
  background: rgba(16, 185, 129, .12);
  color: var(--c-success);
}
.pv-linie-compact__img-count {
  font-size: 11px;
  color: var(--c-text-muted);
  opacity: 0.8;
}

/* Zona dreaptă: status pill + toggle */
.pv-linie-compact__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pv-linie-compact__toggle {
  font-size: 10px;
  color: var(--c-text-muted);
  opacity: 0.7;
  transition: opacity .15s, transform .15s;
  line-height: 1;
}
.pv-linie-compact:hover .pv-linie-compact__toggle { opacity: 1; }

/* Panoul expandabil */
.pv-linie-panel {
  padding: 14px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Row imagini în panou */
.pv-linie-panel__imgs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
/* Body principal: 2 coloane — câmpuri | comentarii */
.pv-linie-panel__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .pv-linie-panel__body {
    grid-template-columns: 1fr;
  }
}
.pv-linie-panel__fields {
  /* câmpuri stânga */
}
.pv-linie-panel__comentarii {
  /* comentarii dreapta */
}
/* Footer panou */
.pv-linie-panel__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--ticket-color, var(--c-border)) 25%, transparent);
}
.pv-linie-panel__footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-linie-panel__comentarii .pv-comentarii {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

/* Light/dark overrides pentru compact row */
[data-theme="light"] .pv-linie-compact {
  background: #f8fafc;
}
[data-theme="light"] .pv-linie-compact:hover {
  background: color-mix(in srgb, var(--ticket-color, #e2e8f0) 8%, #f1f5f9);
}
[data-theme="light"] .pv-linie-compact__diff--neg {
  background: rgba(220, 38, 38, .10);
  color: #dc2626;
}
[data-theme="light"] .pv-linie-compact__diff--pos {
  background: rgba(5, 150, 105, .10);
  color: #059669;
}

/* Badge orange pentru neatribuite */
.pv-badge--orange {
  background: rgba(245,158,11,0.15);
  color: #b45309;
}

/* Select mic */
.pv-select--sm {
  font-size: 13px;
  padding: 4px 8px;
  height: 32px;
}

[data-theme="light"] .pv-merceolog-linie--neatribuita {
  background: rgba(245, 158, 11, 0.06);
}
[data-theme="dark"] .pv-merceolog-card--neatribuita {
  border-left-color: #f59e0b !important;
}
[data-theme="dark"] .pv-merceolog-section-title--neatribuite h3 {
  color: #fbbf24;
}

/* ── Empty state cu icon ───────────────────────────────────── */
.pv-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--c-success);
}
.pv-empty__icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
  color: var(--c-success);
}

/* ── Text muted ────────────────────────────────────────────── */
.pv-text--muted { color: var(--text-muted, #94a3b8); font-size: 12px; }

/* Merceolog text input în tabelul de linii */
.pv-input--merceolog { min-width: 120px; }

/* ── Receptioner selector în header Produse receptionate ────── */
.pv-card__header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.pv-receptioner-select {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-receptioner-select .pv-label {
  margin-bottom: 0;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
}
.pv-select--inline {
  min-width: 200px;
  font-size: 13px;
  padding-right: 28px;
}

/* Scoate săgețile spinner din câmpurile numerice cantitate */
.pv-input--qty::-webkit-outer-spin-button,
.pv-input--qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pv-input--qty {
  -moz-appearance: textfield;
  text-align: right;
}

/* Coloane receptioner/merceolog în lista PV */
.pv-td-user {
  font-size: 12px;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* Alert info mic în formulare */
.pv-alert--info.pv-alert--sm {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.25);
  color: #93c5fd;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 4px;
}

/* Badge gri pentru utilizatori fără login */
.pv-badge--gray {
  background: rgba(148,163,184,0.15);
  color: #94a3b8;
  border: 1px solid rgba(148,163,184,0.2);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
}

/* ── Secțiune administrare ─────────────────────────────────── */
.pv-admin-section {
  border: 1px solid rgba(239, 68, 68, 0.2);
  margin-top: 24px;
}
.pv-admin-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0;
}
.pv-admin-row--danger .pv-admin-row__info strong {
  color: #ef4444;
}
.pv-admin-row__info {
  flex: 1;
}
.pv-admin-row__info strong {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--text-primary, #f1f5f9);
}
.pv-admin-row__info p {
  font-size: 12px;
  color: var(--text-muted, #94a3b8);
  margin: 0;
}
.pv-admin-row__action {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pv-input--nr {
  width: 90px;
  text-align: center;
}
.pv-admin-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.07);
  margin: 12px 0;
}
.pv-admin-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-admin-confirm__text {
  font-size: 12px;
  color: #ef4444;
}

/* ── Light theme (Apple-inspired) ──────────────────────────── */
[data-theme="light"] {
  --c-bg:        #f5f5f7;
  --c-surface:   #ffffff;
  --c-surface2:  #f0f0f2;
  --c-border:    #d2d2d7;
  --c-text:      #1d1d1f;
  --c-text-muted:#6e6e73;
  --c-primary:   #0071e3;
  --c-primary-h: #0077ed;
  --c-success:   #28cd41;
  --c-warning:   #ff9f0a;
  --c-danger:    #ff3b30;
  --c-info:      #007aff;
  --shadow:      0 2px 20px rgba(0,0,0,.10);
}

[data-theme="light"] body {
  background: var(--c-bg);
  color: var(--c-text);
}

[data-theme="light"] .pv-nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
}

[data-theme="light"] .pv-nav__brand { color: #1d1d1f; }

[data-theme="light"] .pv-nav__help-btn {
  background: rgba(26, 86, 219, 0.08);
  border-color: rgba(26, 86, 219, 0.30);
  color: #1a56db;
}
[data-theme="light"] .pv-nav__help-btn:hover {
  background: rgba(26, 86, 219, 0.15);
  border-color: rgba(26, 86, 219, 0.50);
}

[data-theme="light"] .pv-table th {
  background: #e8e8ed;
  color: #3a3a3c;
  border-bottom-color: #c7c7cc;
}

[data-theme="light"] .pv-table tbody tr:hover {
  background: rgba(0,0,0,0.03);
}

[data-theme="light"] .pv-stat-card--clickable:hover {
  box-shadow: 0 4px 16px rgba(0,113,227,0.12);
}

[data-theme="light"] .pv-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%236e6e73' d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
}

[data-theme="light"] .pv-modal-overlay {
  background: rgba(0,0,0,0.35);
}

[data-theme="light"] .pv-toast {
  background: #ffffff;
  border-color: var(--c-border);
  color: var(--c-text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

[data-theme="light"] .pv-btn--secondary {
  background: #ffffff;
  color: var(--c-text);
  border: 1px solid var(--c-border);
}

[data-theme="light"] .pv-btn--secondary:hover:not(:disabled) {
  background: #f0f0f2;
}

[data-theme="light"] .pv-btn--ghost {
  color: #6e6e73;
}

[data-theme="light"] .pv-btn--ghost:hover:not(:disabled) {
  background: rgba(0,0,0,0.06);
  color: #1d1d1f;
}

[data-theme="light"] .pv-btn--danger {
  background: rgba(255,59,48,0.08);
  color: #ff3b30;
  border-color: rgba(255,59,48,0.25);
}

[data-theme="light"] .pv-btn--success {
  background: rgba(40,205,65,0.1);
  color: #1a8f2d;
  border-color: rgba(40,205,65,0.3);
}

[data-theme="light"] .pv-badge--red   { background: rgba(255,59,48,0.1);  color: #ff3b30; }
[data-theme="light"] .pv-badge--green { background: rgba(40,205,65,0.12); color: #1a8f2d; }
[data-theme="light"] .pv-badge--gray  { background: rgba(110,110,115,0.1); color: #6e6e73; border-color: rgba(110,110,115,0.15); }

[data-theme="light"] .pv-sku-badge {
  background: rgba(0,113,227,0.1);
  color: #0071e3;
}

[data-theme="light"] .pv-merceolog-linie {
  box-shadow: 0 1px 6px rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.05);
}
[data-theme="light"] .pv-merceolog-linie:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.13);
}
[data-theme="light"] .pv-merceolog-linie__qty-diff--neg { color: #dc2626; }
[data-theme="light"] .pv-merceolog-linie__qty-diff--pos { color: #059669; }
[data-theme="light"] .pv-merceolog-linie--creat    { --ticket-color: #dc2626; }
[data-theme="light"] .pv-merceolog-linie--trimis   { --ticket-color: #d97706; }
[data-theme="light"] .pv-merceolog-linie--in-curs  { --ticket-color: #2563eb; }
[data-theme="light"] .pv-merceolog-linie--rezolvat { --ticket-color: #059669; }
[data-theme="light"] .pv-merceolog-linie--completata { --ticket-color: #059669; }
[data-theme="light"] .pv-merceolog-linie--neatribuita { --ticket-color: #d97706; }



[data-theme="light"] .pv-admin-section {
  border-color: rgba(255,59,48,0.2);
}

[data-theme="light"] .pv-admin-divider {
  border-top-color: #d2d2d7;
}

[data-theme="light"] .pv-alert--error {
  background: rgba(255,59,48,0.08);
  color: #cc1a11;
  border-color: rgba(255,59,48,0.25);
}

[data-theme="light"] .pv-alert--info.pv-alert--sm {
  background: rgba(0,122,255,0.08);
  border-color: rgba(0,122,255,0.2);
  color: #0055b3;
}

[data-theme="light"] .pv-input--warning { border-color: rgba(255,159,10,0.5); }
[data-theme="light"] .pv-input--info    { border-color: rgba(0,122,255,0.4); }

[data-theme="light"] .pv-stat-card__value { color: inherit; }

/* Theme toggle button */
.pv-theme-toggle {
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--c-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .15s;
  font-family: var(--font);
  white-space: nowrap;
}
.pv-theme-toggle:hover {
  background: var(--c-surface2);
  color: var(--c-text);
}

/* Nume persoană afișat în linia de semnătură */
.pv-doc__semnat-name {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
  font-size: 11px;
  color: #333;
  font-style: italic;
}

/* ── Buton Salvează / Actualizează merceolog ───────────────── */
.pv-btn--save-merceolog {
  background: var(--c-surface);
  color: var(--ticket-color, #16a34a);
  border: 1.5px solid var(--ticket-color, #16a34a);
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  display: inline-flex; align-items: center; gap: 6px;
}
.pv-btn--save-merceolog:hover:not(:disabled) {
  background: color-mix(in srgb, var(--ticket-color, #16a34a) 12%, var(--c-surface));
}
.pv-btn--save-merceolog:disabled {
  opacity: 0.5;
}

/* ── Merceolog popup ─────────────────────────────────────────── */
.pv-img-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  font-weight: 500;
  user-select: none;
  transition: opacity .15s;
}
.pv-img-badge:hover { opacity: 0.75; }
[data-theme="light"] .pv-img-badge {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}

.pv-merceolog-link { 
  cursor: pointer;
  color: var(--c-info);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
.pv-merceolog-link:hover { opacity: 0.8; }

.pv-merceolog-popup {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  min-width: 520px;
  max-width: 700px;
  overflow: hidden;
}
.pv-img-popup {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18);
  min-width: unset !important;
  max-width: unset !important;
  width: fit-content !important;
  overflow: hidden;
  padding: 8px;
}
.pv-merceolog-popup__header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface2);
}
.pv-merceolog-popup__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pv-merceolog-popup__table th {
  padding: 7px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-muted);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface2);
}
.pv-merceolog-popup__table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--c-border);
}
.pv-merceolog-popup__table tr:last-child td { border-bottom: none; }

/* ── Imagini per linie ─────────────────────────────── */
.pv-img-cell {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  min-width: 80px;
}

.pv-img-thumb {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.pv-img-thumb__img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  cursor: zoom-in;
  display: block;
}

.pv-img-thumb__del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-danger);
  color: #fff;
  border: none;
  font-size: 8px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transition: opacity .15s;
}

.pv-img-thumb:hover .pv-img-thumb__del {
  opacity: 1;
}

.pv-img-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1.5px dashed var(--c-border);
  background: transparent;
  color: var(--c-text-muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}

.pv-img-add-btn:hover:not(:disabled) {
  border-color: var(--c-info);
  color: var(--c-info);
}

.pv-img-add-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* ── Imagini în PvView ─────────────────────────────── */
.pv-img-view {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pv-img-view__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  cursor: zoom-in;
}

/* ══════════════════════════════════════════════════════
   HELP MODAL — buton navbar + overlay + iframe
   ══════════════════════════════════════════════════════ */

/* Buton Ajutor în navbar */
.pv-nav__help-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 7px;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
  margin-right: 4px;
}
.pv-nav__help-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(255, 255, 255, 0.50);
}

/* Overlay de fundal */
.pv-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pv-overlay-in .18s ease;
}
@keyframes pv-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fereastra modală */
.pv-help-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1060px;
  height: 88vh;
  max-height: 860px;
  overflow: hidden;
  animation: pv-modal-in .2s cubic-bezier(.34, 1.4, .64, 1);
}
@keyframes pv-modal-in {
  from { opacity: 0; transform: scale(.96) translateY(12px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

/* Header modal */
.pv-help-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 14px 14px 0 0;
  flex-shrink: 0;
}
.pv-help-modal__title {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #1e3a5f;
  letter-spacing: .2px;
}
.pv-help-modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-help-modal__close {
  font-size: 13px;
}

/* iframe care afișează ghidul */
.pv-help-modal__iframe {
  flex: 1;
  border: none;
  width: 100%;
  min-height: 0;
  background: #f9fafb;
  border-radius: 0 0 14px 14px;
}

/* Dark mode */
[data-theme="dark"] .pv-help-modal {
  background: #1e293b;
}
[data-theme="dark"] .pv-help-modal__header {
  background: #0f172a;
  border-color: #334155;
}
[data-theme="dark"] .pv-help-modal__title {
  color: #bfdbfe;
}

/* Responsive — pe ecrane mici, modal fullscreen */
@media (max-width: 640px) {
  .pv-help-overlay { padding: 0; }
  .pv-help-modal {
    border-radius: 0;
    height: 100vh;
    max-height: 100vh;
    max-width: 100%;
  }
}

/* ============================================================
   MERCEOLOG ISTORIC — pagina lista completa produse
   ============================================================ */

/* Bara filtre */
.pv-istoric-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}
.pv-istoric-filters__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.pv-istoric-filters__search {
  flex: 1;
  min-width: 200px;
}
.pv-istoric-filters__row .pv-select {
  flex: 1;
  min-width: 160px;
}
.pv-istoric-filters__date-label {
  font-size: 13px;
  color: var(--c-text2);
  white-space: nowrap;
}
.pv-istoric-filters__date-input {
  width: 148px;
  flex-shrink: 0;
}

/* Card container */
.pv-istoric-card {
  padding: 0;
  overflow: hidden;
}
.pv-istoric-count {
  padding: 10px 18px;
  font-size: 13px;
  color: var(--c-text2);
  border-bottom: 1px solid var(--c-border);
}

/* Coloane specifice tabel istoric */
.pv-istoric-denumire {
  max-width: 200px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  font-size: 13px;
}
.pv-istoric-furnizor {
  max-width: 160px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  font-size: 13px;
}
.pv-istoric-propuneri {
  max-width: 200px;
}
.pv-istoric-propuneri span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  cursor: default;
}

/* Link clickabil în tabel */
.pv-link {
  color: var(--c-primary);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
.pv-link:hover {
  text-decoration: underline;
}

/* Input mic pentru date */
.pv-input--sm {
  padding: 5px 8px;
  font-size: 13px;
  height: 34px;
}


/* ── Modal Comentarii ─────────────────────────────────────── */
.pv-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pv-modal-box {
  background: var(--c-card, #fff);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.22);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
}
.pv-modal-box__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
  gap: 12px;
}
.pv-modal-box__header strong {
  font-size: 14px;
  font-weight: 600;
}
.pv-modal-box__body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--c-text);
  max-height: 60vh;
  overflow-y: auto;
}

/* Text trunchiat clickabil */
.pv-istoric-propuneri__text {
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  color: var(--c-primary);
  white-space: nowrap;
}
.pv-istoric-propuneri__text:hover {
  text-decoration: underline;
}

/* ── Banner trimis furnizor ────────────────────────────────── */
.pv-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.pv-banner--trimis {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #c2410c;
}
.pv-banner--sm {
  padding: 6px 12px;
  font-size: 13px;
  margin-bottom: 0;
}
.pv-banner__by { font-weight: 400; color: #9a3412; }
[data-theme="dark"] .pv-banner--trimis {
  background: rgba(249,115,22,0.1);
  border-color: rgba(249,115,22,0.3);
  color: #fb923c;
}
[data-theme="dark"] .pv-banner__by { color: #fdba74; }

/* ── Raport Produs — fișă ──────────────────────────────────── */
.pv-raport-fisa {
  margin-bottom: 16px;
}
.pv-raport-fisa__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 0;
}
.pv-raport-fisa__denumire {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-text);
}
.pv-raport-fisa__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px 24px;
}
.pv-raport-fisa__field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pv-raport-fisa__field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.pv-raport-fisa__field span {
  font-size: 14px;
  color: var(--c-text);
}
.pv-raport-fisa__field--full {
  grid-column: 1 / -1;
}

/* ── Raport Produs — timeline ──────────────────────────────── */
.pv-raport-timeline-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pv-raport-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-border);
  position: relative;
}
.pv-raport-item:last-child { border-bottom: none; }
.pv-raport-item--status { background: transparent; }
.pv-raport-timeline {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  flex-shrink: 0;
  padding-top: 4px;
}
.pv-raport-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-border);
  border: 2px solid var(--c-surface);
  flex-shrink: 0;
}
.pv-raport-content { flex: 1; min-width: 0; }
.pv-raport-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.pv-raport-camp {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}
.pv-raport-ts {
  font-size: 12px;
  color: var(--c-text-muted);
}
.pv-raport-user {
  font-size: 12px;
  color: var(--c-primary);
  margin-left: auto;
}
.pv-raport-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pv-raport-val {
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 4px;
}
.pv-raport-val--veche {
  background: rgba(239,68,68,.1);
  color: #ef4444;
  text-decoration: line-through;
}
.pv-raport-val--noua {
  background: rgba(16,185,129,.1);
  color: #10b981;
}
.pv-raport-arrow { color: var(--c-text-muted); font-size: 12px; }
.pv-raport-status-change {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv-raport-obs {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* ── Buton Raport produs ───────────────────────────────────── */
.pv-raport-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
  font-family: var(--font);
}
.pv-raport-link:hover {
  background: var(--c-surface2);
  color: var(--c-text);
}

/* ── Raport Produs inline (modal) ──────────────────────────── */
.pv-raport-inline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Context PV ─────────────────────────────────────────────── */
.pv-raport-pv-ctx {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pv-raport-pv-ctx__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px 16px;
}
.pv-raport-pv-ctx__field {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pv-raport-pv-ctx__field label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}
.pv-raport-pv-ctx__field span {
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

/* Rândul "PV trimis" */
.pv-raport-pv-ctx__trimis {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--c-border);
  font-size: 13px;
  color: var(--c-text);
}
.pv-raport-pv-ctx__badge {
  display: inline-flex;
  align-items: center;
  background: rgba(249,115,22,.12);
  color: #f97316;
  border: 1px solid rgba(249,115,22,.25);
  border-radius: 20px;
  padding: 1px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
.pv-raport-pv-ctx__sep {
  color: var(--c-text-muted);
  font-size: 11px;
}

/* ── Eveniment "PV trimis" în timeline ─────────────────────── */
.pv-raport-item--pv-trimis {
  background: rgba(249,115,22,.04);
  border-radius: 6px;
  padding-left: 8px;
  padding-right: 8px;
}
.pv-raport-pv-trimis-detail {
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 2px;
}

/* ── Status email livrat / eroare ──────────────────────────── */
.pv-raport-email-ok {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16,185,129,.1);
  padding: 1px 7px;
  border-radius: 20px;
  white-space: nowrap;
}
.pv-raport-email-err {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239,68,68,.1);
  padding: 1px 7px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── Timeline title în inline ───────────────────────────────── */
.pv-raport-inline__timeline {
  border-top: 1px solid var(--c-border);
  padding-top: 12px;
}
.pv-raport-inline__tl-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-muted);
}

/* ── Durata rezolvare badge ─────────────────────────────────── */
.pv-raport-durata {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 400;
  padding: 2px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.pv-raport-durata--ok {
  background: rgba(16,185,129,.12);
  color: #10b981;
}
.pv-raport-durata--curs {
  background: rgba(245,158,11,.12);
  color: #d97706;
}

/* ── Imagini în inline raport ───────────────────────────────── */
.pv-raport-imagini {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pv-raport-imagini__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--c-text-muted);
}

/* ── Modal Raport Produs (mare, scrollabil) ────────────────── */
.pv-modal--raport {
  width: 1100px;
  max-width: 95vw;
  height: calc(100vh - 70px);
  max-height: calc(100vh - 70px);
  display: flex;
  flex-direction: column;
}
.pv-modal__body--scroll {
  overflow-y: auto;
  flex: 1;
  padding: 20px 24px;
}

/* ── Pagina Utilizatori ────────────────────────────────────── */
.pv-tr--inactive td { opacity: 0.5; }
.pv-tr--inactive td strong { text-decoration: line-through; }

.pv-checkbox {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--c-primary);
}

.pv-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  flex-wrap: wrap;
}
.pv-bulk-toolbar__count {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  margin-right: 4px;
}

/* ── Comentarii interne per linie (editare merceolog) ──────── */
.pv-comentarii {
  margin-top: 16px;
  border-top: 1px solid var(--c-border);
  padding-top: 14px;
}
.pv-comentarii__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: .5px;
  margin-bottom: 10px;
}
.pv-comentarii__lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.pv-comentarii__item {
  background: var(--c-surface2);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.pv-comentarii__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pv-comentarii__autor {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
}
.pv-comentarii__data {
  font-size: 11px;
  color: var(--c-text-muted);
}
.pv-comentarii__text {
  font-size: 13px;
  color: var(--c-text);
  white-space: pre-wrap;
  line-height: 1.5;
}
.pv-comentarii__loading,
.pv-comentarii__empty {
  font-size: 13px;
  color: var(--c-text-muted);
  margin-bottom: 10px;
}
.pv-comentarii__form { margin-top: 8px; }
.pv-comentarii__item--motiv {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.35);
}
.pv-comentarii__motiv-label {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  margin-bottom: 3px;
  letter-spacing: 0.2px;
}

/* ── Comentarii/Propuneri în Raport Produs ────────────────── */
.pv-comentarii-raport {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.pv-comentarii-raport__item {
  background: var(--c-surface2);
  border-left: 3px solid var(--c-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 6px 10px;
}
.pv-comentarii-raport__item--verde {
  border-left-color: var(--c-success);
}

/* ── Motiv modificare + comentariu în timeline ────────────── */
.pv-raport-item--motiv {
  background: rgba(245, 158, 11, 0.04);
}
.pv-raport-item--comentariu {
  background: rgba(99, 102, 241, 0.04);
}
.pv-raport-motiv-text {
  font-size: 13px;
  color: var(--c-text);
  background: rgba(245, 158, 11, 0.10);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 5px 10px;
  margin-top: 6px;
}
.pv-raport-comentariu-text {
  font-size: 13px;
  color: var(--c-text);
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid #6366f1;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 5px 10px;
  margin-top: 6px;
}

/* ── SKU Picker Dropdown ──────────────────────────────────── */
.pv-sku-picker {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  min-width: 380px;
  max-width: 520px;
  overflow: hidden;
}
.pv-sku-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-text-muted);
  background: var(--c-surface2);
  border-bottom: 1px solid var(--c-border);
  gap: 8px;
}
.pv-sku-picker__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-muted);
  font-size: 13px;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.pv-sku-picker__close:hover { color: var(--c-danger); }
.pv-sku-picker__list {
  max-height: 280px;
  overflow-y: auto;
}
.pv-sku-picker__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--c-border);
  transition: background 0.12s;
}
.pv-sku-picker__item:last-child { border-bottom: none; }
.pv-sku-picker__item:hover { background: var(--c-primary-subtle, rgba(59,130,246,.08)); }
.pv-sku-picker__item-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.pv-sku-picker__sku {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-primary);
  flex-shrink: 0;
}
.pv-sku-picker__name {
  font-size: 13px;
  color: var(--c-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pv-sku-picker__brand {
  font-size: 11px;
  color: var(--c-text-muted);
  flex-shrink: 0;
}
/* Buton 🔍 cu picker activ */
.pv-btn--picker-active {
  background: var(--c-primary-subtle, rgba(59,130,246,.1)) !important;
  color: var(--c-primary) !important;
}

/* ============================================================
   EDITARE UNIVERSALĂ — modal, badge extern, flag merceolog
   ============================================================ */

/* Badge ⚠️ Modificat extern pe linia merceologului */
.pv-badge--extern {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
  background: rgba(245,158,11,.15); color: #f59e0b;
  border: 1px solid rgba(245,158,11,.35);
  animation: pv-pulse-warn 2s ease-in-out infinite;
}
.pv-badge--extern-confirmed {
  background: rgba(16,185,129,.12); color: #10b981;
  border-color: rgba(16,185,129,.3);
  animation: none;
}
@keyframes pv-pulse-warn {
  0%, 100% { opacity: 1; }
  50%       { opacity: .65; }
}

/* Flag banner în cardul merceologului */
.pv-extern-flag {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 10px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--c-warning);
  background: rgba(245,158,11,.08);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pv-extern-flag--confirmed {
  border-left-color: var(--c-success);
  background: rgba(16,185,129,.07);
}
.pv-extern-flag__info { flex: 1; min-width: 0; }
.pv-extern-flag__who {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px; font-weight: 600; color: #f59e0b; margin-bottom: 4px;
}
.pv-extern-flag--confirmed .pv-extern-flag__who { color: var(--c-success); }
.pv-extern-flag__campuri {
  font-size: 12px; color: var(--c-text-muted); margin-bottom: 3px;
}
.pv-extern-flag__motiv {
  font-size: 12px; color: var(--c-text); font-style: italic;
  background: rgba(0,0,0,.15); padding: 4px 8px;
  border-radius: 4px; margin-top: 4px;
}
.pv-extern-flag__confirmed-by {
  font-size: 11px; color: var(--c-success); margin-top: 4px;
  display: flex; align-items: center; gap: 4px;
}
.pv-extern-flag__actions { display: flex; align-items: flex-start; gap: 6px; flex-shrink: 0; }

/* Buton confirmare */
.pv-btn--confirm-extern {
  background: rgba(16,185,129,.12); color: var(--c-success);
  border: 1px solid rgba(16,185,129,.3);
  font-size: 12px; padding: 5px 10px; border-radius: var(--radius);
}
.pv-btn--confirm-extern:hover { background: rgba(16,185,129,.22); }

/* Modal editare universală */
.pv-modal--editare { width: 1100px; max-width: 95vw; height: 90vh; max-height: 90vh; display: flex; flex-direction: column; }
.pv-modal--editare .pv-modal__body { overflow-y: auto; flex: 1; }

.pv-editare-actor {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--c-surface2);
  border-radius: var(--radius); margin-bottom: 16px;
  font-size: 13px; color: var(--c-text-muted);
}
.pv-editare-actor strong { color: var(--c-text); }

.pv-editare-locked-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--c-text-muted);
  background: var(--c-surface2); border-radius: var(--radius);
  padding: 7px 10px; margin-bottom: 14px;
}

.pv-editare-readonly-section {
  border-top: 1px solid var(--c-border);
  padding-top: 12px; margin-top: 4px; margin-bottom: 12px;
}
.pv-editare-readonly-section .pv-label {
  color: var(--c-text-muted); font-size: 11px;
}
.pv-editare-readonly-section .pv-input {
  opacity: .55; cursor: not-allowed;
}

.pv-motiv-box {
  border: 1px solid rgba(245,158,11,.4);
  border-radius: var(--radius); background: rgba(245,158,11,.07);
  padding: 12px 14px; margin-top: 16px;
}
.pv-motiv-box__label {
  font-size: 12px; font-weight: 600; color: #f59e0b;
  margin-bottom: 6px;
}
.pv-motiv-box__preview {
  font-size: 11px; color: var(--c-text-muted);
  font-style: italic; margin-top: 6px;
}

/* ── Raport produs — intrări externe ── */
.pv-raport-item--extern {
  border-left: 2px solid rgba(245,158,11,.5);
  padding-left: 10px; margin-left: -12px;
}
.pv-raport-item--confirmare {
  border-left: 2px solid rgba(16,185,129,.4);
  padding-left: 10px; margin-left: -12px;
}
.pv-raport-role-pill {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  font-weight: 600; letter-spacing: .3px;
}
.pv-raport-role-pill--rec   { background: rgba(59,130,246,.15);  color: #60a5fa; }
.pv-raport-role-pill--merc  { background: rgba(16,185,129,.15);  color: #34d399; }
.pv-raport-role-pill--admin { background: rgba(239,68,68,.15);   color: #f87171; }
.pv-raport-extern-badge {
  font-size: 10px; padding: 1px 6px; border-radius: 3px;
  background: rgba(245,158,11,.15); color: #f59e0b; font-weight: 600;
}
.pv-raport-history-delete-btn {
  margin-left: auto;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.25);
  color: var(--c-danger, #ef4444);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 5px;
  line-height: 1.6;
  transition: background .15s, border-color .15s;
  flex-shrink: 0;
}
.pv-raport-history-delete-btn:hover  { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.5); }
.pv-raport-history-delete-btn:disabled { opacity: 0.4; cursor: default; }


/* ── Footer ─────────────────────────────────────────────────── */
.pv-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  margin-top: auto;
}
.pv-footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto; width: 100%;
  padding: 14px 24px;
}
.pv-footer__brand {
  display: flex; align-items: center; gap: 10px;
}
.pv-footer__icon {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--c-surface2); border: 1px solid var(--c-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.pv-footer__brand-text { display: flex; flex-direction: column; gap: 1px; }
.pv-footer__app-name   { font-size: 13px; font-weight: 600; color: var(--c-text); }
.pv-footer__sub        { font-size: 11px; color: var(--c-text-muted); }
.pv-footer__right {
  display: flex; align-items: center; gap: 14px;
}
.pv-footer__item { font-size: 12px; color: var(--c-text-muted); }
.pv-footer__item strong { color: var(--c-text); font-weight: 500; }
.pv-footer__divider {
  width: 1px; height: 16px; background: var(--c-border);
}
