/* ============ Design system (ERP) ============ */
* { box-sizing: border-box; }
:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e6e9ef;
  --line-2: #eef1f5;
  --accent: #2f5bea;
  --accent-2: #2447c7;
  --accent-soft: #eef3ff;
  --ok: #0f7e4e;
  --ok-soft: #e7f7ef;
  --warn: #dc2626;
  --warn-soft: #fef2f2;
  --amber: #b45309;
  --amber-soft: #fff7ed;
  --radius: 10px;
  --radius-sm: 7px;
  --sh-sm: 0 1px 2px rgba(15,23,42,.05);
  --sh: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.03);
  --sh-md: 0 6px 20px rgba(15,23,42,.10);
  --sh-lg: 0 16px 48px rgba(15,23,42,.16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
}
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
h1,h2,h3 { letter-spacing: -.01em; }

button { cursor: pointer; border: 1px solid var(--line); background: #fff; padding: 7px 13px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; color: var(--ink-2); transition: background .12s, border-color .12s, box-shadow .12s; font-family: var(--font); }
button:hover { background: #f6f8fb; border-color: #d5dae4; }
button:active { transform: translateY(.5px); }
input, select { padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 13.5px; background: #fff; color: var(--ink); font-family: var(--font); transition: border-color .12s, box-shadow .12s; }
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.err { color: var(--warn); font-size: 13px; min-height: 16px; }
.muted { color: var(--muted); font-size: 13px; }

/* ============ Login ============ */
.login-wrap { display: flex; min-height: 100vh; align-items: center; justify-content: center; background: radial-gradient(1200px 500px at 50% -10%, #eaeefb 0%, var(--bg) 60%); }
.login-box { background: var(--panel); padding: 34px 32px; border-radius: 16px; box-shadow: var(--sh-lg); display: flex; flex-direction: column; gap: 12px; width: 340px; border: 1px solid var(--line); }
.login-box h1 { font-size: 15px; margin: 0 0 10px; color: var(--muted); font-weight: 600; text-align: center; letter-spacing: .02em; }
.login-logo { width: 150px; align-self: center; margin-bottom: 4px; }
.login-box button { background: var(--accent); color: #fff; border: none; padding: 11px; font-weight: 600; font-size: 14px; }
.login-box button:hover { background: var(--accent-2); }

/* ============ Layout ============ */
#app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; flex: none; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-logo { padding: 16px 16px 12px; display: flex; align-items: center; }
.side-logo img { height: 18px; opacity: .92; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 10px; }
.nav-group { margin-bottom: 14px; }
.nav-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #94a0b3; padding: 6px 10px 4px; font-weight: 700; }
.side-nav .tab { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: transparent; padding: 8px 11px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink-2); margin-top: 1px; position: relative; }
.side-nav .tab:hover { background: #f4f6fa; }
.side-nav .tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.side-nav .tab.active::before { content: ""; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.badge { background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 10.5px; font-weight: 600; margin-left: auto; min-width: 18px; text-align: center; }
.side-nav .tab.active .badge { background: var(--accent); }
.side-foot { border-top: 1px solid var(--line); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.me { font-size: 12px; color: var(--muted); font-weight: 500; }
.side-foot button { padding: 6px 11px; font-size: 12.5px; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--line); padding: 13px 22px; position: sticky; top: 0; z-index: 5; }
.page-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.topbar .right { display: flex; gap: 8px; align-items: center; }
.store-switch { font-weight: 600; color: var(--accent); border-color: #cdd9ff; background: var(--accent-soft); padding: 7px 10px; max-width: 220px; }
.store-pill { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: #f3e8ff; color: #7c3aed; font-weight: 600; vertical-align: middle; }
.toolbar .store-switch { margin-right: 4px; }

main { padding: 22px; max-width: 1220px; width: 100%; margin: 0 auto; }
.view h2 { font-size: 13px; margin: 24px 0 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }

/* ============ Cards / KPI ============ */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--sh-sm); position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: .0; }
.card:hover { box-shadow: var(--sh); }
.card .num { font-size: 23px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.card .lbl { color: var(--muted); font-size: 12px; margin-top: 2px; }
.card.warn .num { color: var(--warn); }
.card.ok .num { color: var(--ok); }
.card.warn::before { background: var(--warn); opacity: 1; }
.card.ok::before { background: var(--ok); opacity: 1; }

/* ============ Toolbar ============ */
.toolbar { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; }
.toolbar #search, .toolbar #lsearch, .toolbar #dsearch { flex: 1; max-width: 440px; }

/* ============ Rows / tables ============ */
.row, .liv-row, .disp-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; margin-bottom: 7px; display: grid; gap: 12px; align-items: center; box-shadow: var(--sh-sm); transition: box-shadow .12s, border-color .12s; }
.row { grid-template-columns: 96px 1fr 155px 150px 130px; }
.row:hover, .liv-row:hover, .disp-row:hover { box-shadow: var(--sh); border-color: #dbe0ea; }
.row.head, .liv-row.head { background: transparent; border: none; box-shadow: none; padding: 2px 15px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 0; font-weight: 600; }
.row .nr, .liv-row .nr, .disp-row .nr { font-weight: 700; letter-spacing: -.01em; }
.row .models { font-size: 13.5px; }
.row .models .it { display: block; margin-bottom: 2px; }
.row .models .stofa { color: var(--muted); }
.side { display: inline-block; font-size: 10.5px; padding: 1px 7px; border-radius: 5px; background: var(--accent-soft); color: var(--accent); margin-left: 6px; font-weight: 600; }
.side.dreapta { background: var(--amber-soft); color: var(--amber); }
.scad { font-size: 13px; }
.scad.late { color: var(--warn); font-weight: 600; }
.actions-cell { text-align: right; display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.actions-cell button { font-size: 12.5px; }

/* Button variants */
.btn-give, #modal-ok, #edit-ok, #liv-ok, .user-form button, .login-box button { background: var(--accent); color: #fff; border: none; }
.btn-give:hover, #modal-ok:hover, #edit-ok:hover, #liv-ok:hover { background: var(--accent-2); }
.btn-fin, .btn-liv { background: var(--ok); color: #fff; border: none; }
.btn-fin:hover, .btn-liv:hover { background: #0e7a4b; }
.btn-edit, .btn-print { padding: 6px 9px; line-height: 1; }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 48px 20px; background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ============ Modal ============ */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.45); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; z-index: 20; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-box { background: #fff; border-radius: 14px; padding: 24px; width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 40px); overflow-y: auto; display: flex; flex-direction: column; gap: 7px; box-shadow: var(--sh-lg); animation: pop .14s ease; }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: .6; } }
.modal-box h3 { margin: 0 0 6px; font-size: 17px; }
.modal-box label { font-size: 11.5px; color: var(--muted); margin-top: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.modal-actions .ghost { background: #fff; }

/* ============ Dashboard chart ============ */
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 8px; box-shadow: var(--sh-sm); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.bar { width: 66%; max-width: 26px; background: linear-gradient(180deg, #4f74f0, var(--accent)); border-radius: 5px 5px 0 0; transition: height .25s ease; }
.bar.zero { background: var(--line); }
.bar-val { font-size: 11px; color: var(--ink); font-weight: 700; }
.bar-lbl { font-size: 10px; color: var(--muted); white-space: nowrap; transform: rotate(-45deg); transform-origin: center; margin-top: 6px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.top-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 16px; box-shadow: var(--sh-sm); }
.top-list .ln { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.top-list .ln:last-child { border-bottom: none; }
.top-list .cnt { color: var(--accent); font-weight: 700; }

/* ============ Utilizatori ============ */
.users-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin-top: 8px; }
.user-form { display: flex; flex-direction: column; gap: 4px; max-width: 340px; background: var(--panel); border: 1px solid var(--line); padding: 18px; border-radius: var(--radius); box-shadow: var(--sh-sm); }
.user-form label { font-size: 11.5px; color: var(--muted); margin-top: 8px; font-weight: 600; }
.user-form button { margin-top: 14px; padding: 10px; }
.user-row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 15px; margin-bottom: 8px; box-shadow: var(--sh-sm); }
.user-row .u-name { font-weight: 600; }
.user-row .u-meta { color: var(--muted); font-size: 13px; }
.user-row.inactive { opacity: .5; }
.user-row .spacer { margin-left: auto; }
.role-pill { font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.role-pill.admin { background: var(--amber-soft); color: var(--amber); }

/* ============ Istoric ============ */
.hist { margin-top: 10px; border-top: 1px solid var(--line-2); padding-top: 8px; }
.hist summary { cursor: pointer; font-size: 13px; color: var(--accent); font-weight: 500; }
.hist .h-ln { font-size: 12px; color: var(--muted); padding: 4px 0; border-bottom: 1px solid var(--line-2); }

/* ============ Livrari / Comenzi ============ */
.subtabs { display: inline-flex; gap: 2px; background: var(--line-2); padding: 3px; border-radius: 9px; }
.subtab { background: transparent; color: var(--muted); border: none; padding: 6px 14px; border-radius: 7px; font-weight: 600; font-size: 13px; }
.subtab:hover { background: #fff; }
.subtab.active { background: #fff; color: var(--accent); box-shadow: var(--sh-sm); }
.liv-row { grid-template-columns: 120px 1fr 210px 160px; }
.liv-row .prod { font-size: 13px; color: var(--ink-2); }
.liv-row .sums { font-size: 13px; }
.liv-row .dif { font-weight: 700; color: var(--warn); }
.liv-row .paid-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.liv-info { background: var(--accent-soft); border: 1px solid #dbe4ff; border-radius: 9px; padding: 11px 13px; font-size: 13px; margin-bottom: 6px; }
.liv-info .big { font-size: 18px; font-weight: 700; color: var(--warn); }
.cod-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.invoices { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inv-badge { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); border: 1px solid #bce7d3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; }
.inv-badge.final { background: var(--accent-soft); color: var(--accent); border-color: #cdd9ff; }
.btn-inv { font-size: 11px; padding: 3px 9px; border: 1px solid var(--accent); color: var(--accent); background: #fff; border-radius: 6px; font-weight: 600; }
.btn-inv:hover { background: var(--accent-soft); }
.btn-inv:disabled { opacity: .5; cursor: not-allowed; border-color: var(--line); color: var(--muted); }

/* metoda expediere */
.method-pick { display: inline-flex; gap: 4px; margin-right: 6px; align-items: center; }
.btn-m { font-size: 11px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.btn-m:hover { background: #f4f6fa; }
.btn-m.own { border-color: #cdd9ff; color: var(--accent); }
.method-badge { font-size: 11px; padding: 3px 9px; border-radius: 6px; margin-right: 6px; cursor: pointer; border: 1px solid; font-weight: 600; }
.method-badge.cur { background: var(--amber-soft); color: var(--amber); border-color: #fed7aa; }
.method-badge.noi { background: var(--accent-soft); color: var(--accent); border-color: #cdd9ff; }
.zone-tag { font-size: 10px; padding: 1px 7px; border-radius: 5px; font-weight: 600; }
.zone-tag.in { background: var(--accent-soft); color: var(--accent); }
.zone-tag.out { background: var(--line-2); color: var(--muted); }
.paid-cont { font-size: 11px; padding: 2px 8px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); cursor: pointer; font-weight: 600; }
.btn-paid { font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px dashed var(--line); background: #fff; color: var(--muted); }
.btn-paid:hover { border-color: var(--ok); color: var(--ok); }

/* dispecerat zone */
.zone { margin-bottom: 20px; }
.zone-head { font-size: 13.5px; padding: 9px 14px; background: var(--accent-soft); border: 1px solid #dbe4ff; border-radius: 9px; margin-bottom: 7px; font-weight: 600; }
.zone-head .dif { color: var(--warn); font-weight: 700; }
.disp-row { grid-template-columns: 120px 1fr 130px auto; }

/* ============ Toast ============ */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 10px; z-index: 30; font-size: 13.5px; font-weight: 500; box-shadow: var(--sh-md); }
.toast.err { background: var(--warn); }

/* inventar */
.inv-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 15px; margin-bottom: 7px; display: grid; grid-template-columns: 1fr 160px 100px 90px 1fr; gap: 12px; align-items: center; box-shadow: var(--sh-sm); }
.inv-row.head { background: transparent; border: none; box-shadow: none; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 2px 15px; }
.ean-inp { width: 100%; font-family: ui-monospace, monospace; }
.colete-inp { width: 70px; text-align: center; font-weight: 700; }
.stoc-loc { font-size: 12px; background: var(--line-2); padding: 3px 8px; border-radius: 6px; margin: 0 4px 4px 0; display: inline-flex; align-items: center; gap: 4px; }
.stoc-inp { width: 54px; padding: 3px 5px; text-align: center; font-weight: 700; }
/* stocul care NU e liber: promis unei comenzi (rezervat) sau blocat in carantina */
.tag-rez { font-size: 10px; font-weight: 700; background: #fef3c7; color: #92400e; padding: 1px 5px; border-radius: 4px; }
.tag-blk { font-size: 10px; font-weight: 700; background: #fee2e2; color: #991b1b; padding: 1px 5px; border-radius: 4px; }
.mod-checks { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.mchk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.mchk input { width: auto; }

/* go live */
.golive-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--muted); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--sh); margin-bottom: 8px; }
.golive-card.live { border-left-color: var(--ok); background: var(--ok-soft); }
.golive-title { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.golive-btn { background: var(--ink); color: #fff; border: none; padding: 14px 24px; border-radius: 10px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.golive-btn.on { background: var(--ok); }
.map-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; margin-bottom: 6px; max-width: 520px; }
.map-row select { min-width: 220px; }

/* transferuri */
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 9px 16px; font-weight: 600; margin-bottom: 12px; }
.tb-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--sh-sm); margin-bottom: 16px; max-width: 640px; }
.tb-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tb-row label { font-size: 12px; color: var(--muted); font-weight: 600; }
.tb-res { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 4px; cursor: pointer; }
.tb-res:hover { background: var(--accent-soft); }
.tb-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.tb-line span { flex: 1; }
.transf-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; margin-bottom: 7px; display: grid; grid-template-columns: 150px 1fr 90px auto; gap: 12px; align-items: center; box-shadow: var(--sh-sm); }
.transf-row.transit { border-left: 4px solid var(--amber); }

/* materii prime */
.mat-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 15px; margin-bottom: 7px; display: grid; grid-template-columns: 1fr 160px 90px 120px; gap: 12px; align-items: center; box-shadow: var(--sh-sm); }
.mat-row.head { background: transparent; border: none; box-shadow: none; font-size: 11px; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 2px 15px; }
.mat-row.low { border-left: 4px solid var(--warn); }
.mat-row .actions-cell button { font-weight: 700; min-width: 34px; }

/* retetare */
.fp-row { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; margin-bottom: 6px; cursor: pointer; box-shadow: var(--sh-sm); }
.fp-row:hover { border-color: var(--accent); }
.fp-row.sel { background: var(--accent-soft); border-color: var(--accent); }
.rec-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.rec-line span:first-child { flex: 1; }
.rec-add { display: flex; gap: 8px; margin-top: 12px; }
.rec-add select { flex: 1; }

/* showroom vanzare */
.showroom-flow { display: grid; grid-template-columns: minmax(0, 1.35fr) 390px; gap: 16px; align-items: start; }
.showroom-search, .showroom-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh-sm); }
.showroom-search { padding: 12px; min-height: 360px; }
.showroom-panel { padding: 14px; position: sticky; top: 64px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2, .sh-cart-head h2 { margin: 0; }
.sh-modebar { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 3px; margin-bottom: 10px; }
.sh-mode { border: none; background: transparent; min-height: 38px; font-weight: 700; color: var(--muted); }
.sh-mode:hover { background: #fff; }
.sh-mode.active { background: #fff; color: var(--accent-2); box-shadow: var(--sh-sm); }
.sh-explain { border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent-2); border-radius: 8px; padding: 9px 10px; font-size: 12.5px; line-height: 1.35; margin-bottom: 12px; }
.sh-cart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.sh-total { text-align: right; font-variant-numeric: tabular-nums; }
.sh-total span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.sh-total b { font-size: 18px; }
.sh-res { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 11px 12px; margin-bottom: 7px; box-shadow: var(--sh-sm); }
.sh-res:hover { border-color: #d3dbe8; box-shadow: var(--sh); }
.sh-res button { background: var(--accent); color: #fff; border: none; white-space: nowrap; }
.sh-res button:disabled { opacity: .4; }
.sh-title { font-weight: 700; color: var(--ink); }
.sh-meta { display: flex; flex-wrap: wrap; gap: 5px 8px; margin-top: 4px; }
.sh-stock { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--slate-ink); font-size: 11.5px; font-weight: 650; }
.sh-stock.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.sh-stock.warn { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.sh-stock.bad { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.sh-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.sh-cart-line { display: grid; grid-template-columns: minmax(0, 1fr) 58px 92px 32px; gap: 7px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.sh-cart-title { min-width: 0; font-weight: 650; }
.sh-cart-title span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 500; margin-top: 2px; }
.sh-cart-line input { width: 100%; min-width: 0; text-align: right; font-variant-numeric: tabular-nums; }
.sh-cart-line .ghost { width: 32px; min-height: 32px; padding: 0; }
.sh-action-panel { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 12px; }
.sh-action-panel h3 { margin: 0 0 9px; font-size: 14px; }
.sh-client-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 0; }
.sh-client-grid label:last-child { grid-column: 1 / -1; }
.sh-main-action { width: 100%; margin-top: 12px; padding: 12px 14px; font-size: 14.5px; font-weight: 800; }
.sh-main-action:disabled { opacity: .45; cursor: not-allowed; }
.sh-last { margin-top: 12px; border: 1px solid var(--ok-line); background: var(--ok-soft); color: var(--ok); border-radius: 8px; padding: 10px 11px; font-size: 13px; }
.sh-last .sh-last-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.sh-last button, .sh-last a { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 6px 10px; border: 1px solid var(--ok-line); border-radius: 7px; background: #fff; color: var(--ok); text-decoration: none; font-weight: 700; font-size: 12.5px; }

/* eticheta mediu de test */
.env-ribbon { position: fixed; top: 0; left: 0; right: 0; height: 26px; line-height: 26px; text-align: center; background: repeating-linear-gradient(45deg, #b45309, #b45309 12px, #92400e 12px, #92400e 24px); color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; z-index: 100; }
body.has-ribbon .sidebar, body.has-ribbon .topbar { top: 26px; }
body.has-ribbon .sidebar { height: calc(100vh - 26px); }
body.has-ribbon #app { padding-top: 26px; }

/* ============ Meniu mobil (hamburger + drawer) ============ */
/* Pe desktop sunt ascunse; pe mobil sidebar-ul devine un sertar care aluneca peste continut. */
.nav-toggle, .nav-close { display: none; }
.nav-toggle { flex-direction: column; justify-content: center; gap: 4px; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); margin-right: 12px; flex: none; }
.nav-toggle span { display: block; width: 17px; height: 2px; border-radius: 2px; background: var(--ink-2); transition: transform .2s, opacity .2s; }
.nav-close { border: none; background: transparent; font-size: 18px; color: var(--muted); width: 34px; height: 34px; border-radius: var(--radius-sm); margin-left: auto; }
.nav-close:hover { background: #f4f6fa; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(2px); z-index: 40; opacity: 0; transition: opacity .22s ease; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .two-col, .users-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav-close { display: flex; }
  /* sidebar = sertar off-canvas */
  .sidebar { position: fixed; top: 0; left: 0; height: 100dvh; width: 280px; max-width: 84vw; z-index: 50;
    transform: translateX(-100%); transition: transform .26s cubic-bezier(.4,0,.2,1); box-shadow: var(--sh-lg); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .nav-overlay { display: block; opacity: 1; }
  body.nav-open { overflow: hidden; }
  body.has-ribbon .sidebar { height: 100dvh; }
  /* tinte tactile mai mari in meniu */
  .side-nav .tab, .side-nav .tab[href] { padding: 11px 12px; font-size: 14.5px; }
  .nav-title { font-size: 11px; padding: 8px 12px 5px; }
  .topbar { padding: 10px 14px; }
  main { padding: 16px 14px; }
  .toolbar { flex-wrap: wrap; }
  .toolbar #search, .toolbar #lsearch, .toolbar #dsearch { max-width: none; width: 100%; }
  /* randuri: cad pe o coloana, actiunile jos, tinte mai mari */
  .row, .liv-row, .disp-row { grid-template-columns: 1fr !important; gap: 7px; padding: 13px 14px; }
  .actions-cell { justify-content: flex-start; }
  .actions-cell button, .btn-primary, .btn-give, .btn-liv, .btn-fin { padding: 9px 14px; font-size: 13.5px; }
  .store-switch { max-width: 150px; }
  .modal-box { padding: 20px 18px; }
  .showroom-flow { grid-template-columns: 1fr; }
  .showroom-panel { position: static; }
  .showroom-search { min-height: 0; }
  .sh-cart-line { grid-template-columns: 1fr 64px 96px 36px; }
}
@media (max-width: 480px) {
  .topbar .right #btn-export, .topbar .right #btn-sync { padding: 8px 10px; font-size: 0; }
  .topbar .right #btn-export::after { content: "⬇"; font-size: 14px; }
  .topbar .right #btn-sync::after { content: "↻"; font-size: 14px; }
  .page-title { font-size: 14.5px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .sh-res { grid-template-columns: 1fr; }
  .sh-res button { width: 100%; }
  .sh-client-grid { grid-template-columns: 1fr; }
  .sh-client-grid label:last-child { grid-column: auto; }
  .sh-cart-line { grid-template-columns: 1fr 52px 82px 32px; gap: 5px; }
}
.backorder-tag { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.loc-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--line); }
.loc-checks .loc-lbl { font-size: 12px; color: var(--ink-2); font-weight: 600; }
/* ===== Faza 2: Recepție / PO / bin-uri ===== */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.card-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--sh-sm); margin-bottom: 12px; }
.card-box h3 { margin: 0 0 4px; font-size: 15px; }
.card-box h4 { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.form-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.form-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.po-row { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 15px; margin-bottom: 7px; display: flex; align-items: center; gap: 12px; box-shadow: var(--sh-sm); cursor: pointer; transition: box-shadow .12s, border-color .12s; }
.po-row:hover { box-shadow: var(--sh); border-color: #dbe0ea; }
.po-prog { font-weight: 700; font-size: 13px; }
.po-badge { font-size: 10.5px; padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.po-badge.s-open { background: var(--accent-soft); color: var(--accent); }
.po-badge.s-partial { background: var(--amber-soft); color: var(--amber); }
.po-badge.s-received { background: var(--ok-soft); color: var(--ok); }
.po-badge.s-draft { background: #f1f5f9; color: var(--muted); }
.po-badge.s-closed { background: #ede9fe; color: #6d28d9; }
.po-badge.s-cancelled { background: var(--warn-soft); color: var(--warn); }
.po-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.po-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line); }
.po-table td { padding: 7px 8px; border-bottom: 1px solid var(--line-2); }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 6px; box-shadow: var(--sh-sm); }
.pick-row.inactive { opacity: .5; }
.btn-primary { background: var(--accent); color: #fff; border: none; padding: 9px 15px; border-radius: var(--radius-sm); font-weight: 600; }
.btn-primary:hover { background: var(--accent-2); }
button.danger { color: var(--warn); border-color: #f3c9c9; }
.warn-text { color: var(--warn); font-weight: 600; }
.ok-text { color: var(--ok); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.chip a { cursor: pointer; margin-left: 4px; opacity: .7; }
.chip a:hover { opacity: 1; }
.unmapped-tag { font-size: 10px; padding: 1px 7px; border-radius: 999px; background: #fef2f2; color: #b91c1c; font-weight: 700; border: 1px solid #fecaca; }

/* ecranul de bin-uri: codul + CE E IN EL (intrebarea de zi cu zi din depozit) */
.bin-card { border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; }
.bin-card.inactive { opacity: .55; }
.bin-cont { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 4px 2px 2px; }
.bin-item { font-size: 12px; background: var(--line-2); padding: 2px 7px; border-radius: 5px; }
.tag-bin { font-size: 11px; font-weight: 700; background: #dbeafe; color: #1e40af; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }

/* produs care nu poate fi scanat la impachetare: fara cod de bare sau cu text de SKU in camp */
.ean-bad { border: 2px solid #f59e0b !important; background: #fffbeb; }
.warn-pill { margin-left: 8px; font-size: 12px; font-weight: 700; background: #fef3c7; color: #92400e;
  border: 1px solid #fbbf24; padding: 3px 9px; border-radius: 999px; cursor: pointer; }

/* metoda de expediere, in ecranul de trimitere la pick */
.m-pill { font-size: 10px; font-weight: 700; background: var(--line-2); color: #475569; padding: 1px 6px; border-radius: 4px; }
.m-pill.curier { background: #dbeafe; color: #1e40af; }
.m-pill.noi { background: #dcfce7; color: #166534; }

/* registrul de miscari: fiecare bucata care intra sau iese */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; background: var(--line-2); padding: 7px 8px; font-weight: 700; position: sticky; top: 0; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:hover td { background: var(--line-2); }
.tbl .neg { color: #b91c1c; }   /* a iesit din gestiune */
.tbl .poz { color: #15803d; }   /* a intrat */
.tag-ok { font-size: 10px; font-weight: 700; background: #dcfce7; color: #166534; padding: 1px 6px; border-radius: 4px; }

/* avertisment operational: ceva ce trebuie reparat in date, nu in aplicatie */
.warn-box { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 10px 14px; border-radius: 6px; font-size: 13px; }

/* comanda data unui picker anume (fara asta e libera pentru oricine) */
.tag-asg { font-size: 10px; font-weight: 700; background: #ede9fe; color: #5b21b6; padding: 1px 6px; border-radius: 4px; }

/* Istoric produs: viata lui in depozit, dintr-un click din lista de produse */
.modal-wide { max-width: 980px; width: 94vw; }
.ist-btn { font-size: 11px; padding: 2px 8px; margin-left: 8px; border-radius: 5px; cursor: pointer;
  background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; font-weight: 600; }
.ist-btn:hover { background: #e0e7ff; }
.ist-cap { font-size: 12.5px; color: #475569; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 7px; padding: 9px 11px; margin-bottom: 11px; line-height: 1.65; }
#ist-body { max-height: 62vh; overflow-y: auto; }
#ist-body .tbl td { vertical-align: top; font-size: 12.5px; }

/* PLANUL DEPOZITULUI — harta la scara: rafturile se trag cu mouse-ul, codurile se genereaza singure */
#plan-wrap { overflow: auto; background: #fbfcfe; border: 1px solid #e2e8f0; border-radius: 10px; padding: 4px; }
#plan-svg { display: block; }
#plan-svg .hall { fill: #fff; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 5 3; }
#plan-svg .rl { stroke: #cbd5e1; stroke-width: 1; }
#plan-svg .dim { fill: #64748b; font-size: 11px; text-anchor: middle; font-weight: 600; }
#plan-svg .rk { cursor: grab; }
#plan-svg .rk.drag { cursor: grabbing; opacity: .85; }
#plan-svg .rk-box { fill: #dbeafe; stroke: #2563eb; stroke-width: 1.5; }
#plan-svg .rk-box.plin { fill: #bbf7d0; stroke: #16a34a; }
#plan-svg .rk:hover .rk-box { fill: #bfdbfe; }
#plan-svg .rk-lbl { fill: #1e3a8a; font-size: 13px; font-weight: 800; text-anchor: middle; pointer-events: none; }
#plan-info { margin-top: 9px; font-size: 12.5px; }
.rk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 6px; }
.rk-grid label { display: flex; flex-direction: column; font-size: 12px; color: #475569; gap: 3px; }
.rk-grid input, .rk-grid select { padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; }

/* Detaliul comenzii: ca pagina din Shopify + ce stie doar depozitul */
.nr-link { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.nr-link:hover { color: #2563eb; }
.det-head { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; font-size: 12.5px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 9px; }
.det-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.tagp { font-size: 11px; font-weight: 600; background: #e0e7ff; color: #3730a3; border-radius: 5px; padding: 2px 8px; }
.det-box { font-size: 12.5px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 9px 11px; margin-bottom: 9px; }
.det-tbl { font-size: 12.5px; } .det-tbl td.r, .det-tbl th.r { text-align: right; }
.det-tbl td.c, .det-tbl th.c { text-align: center; }
.det-tbl tbody tr:last-child td { border-top: 2px solid #94a3b8; font-size: 14px; }

/* Maparea gestiune -> locatie Shopify, per magazin (id-urile de locatie sunt ale magazinului lor) */
.map-grp { border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px 10px; margin-bottom: 9px; background: #fbfcfe; }
.map-grp .map-row + .map-row { border-top: 1px dashed #e2e8f0; }

/* Starea din depozit pe comanda: ce e in cutie si asteapta curierul vs ce n-a inceput nimeni */
.pack-tag { font-size: 11px; font-weight: 700; border-radius: 5px; padding: 2px 7px; white-space: nowrap; }
.pack-tag.gata { background: #dcfce7; color: #15803d; }
.pack-tag.lucru { background: #fef3c7; color: #92400e; }
.pack-tag.trimisa { background: #e0e7ff; color: #3730a3; font-weight: 600; }

.inv-badge.auto { background: #eef2ff; color: #6366f1; font-style: italic; }

/* ============================================================
   POLISH VIZUAL — rafinare peste sistemul existent (18 iul 2026)
   ============================================================ */

/* Accesibilitate + finisaj: inel de focus vizibil doar la tastatura */
:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); border-radius: var(--radius-sm); }
button, .tab, a { -webkit-tap-highlight-color: transparent; }

/* Butoanele "apasa" cand le apesi — feedback tactil */
button:active { transform: translateY(.5px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Scrollbar discret (WebKit) */
* { scrollbar-width: thin; scrollbar-color: #cbd3e0 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #cbd3e0; border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #aeb8c9; background-clip: content-box; }

/* ---- Sidebar: brand + grupuri mai aerisite ---- */
.side-logo { padding: 15px 16px 10px; gap: 9px; border-bottom: 1px solid var(--line-2); }
.side-logo img { height: 20px; }
.side-nav { padding: 10px 10px 4px; }
.nav-group { margin-bottom: 4px; padding-bottom: 8px; }
.nav-group:not(:last-child) { border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.nav-title { color: #9aa6b8; }
.side-nav .tab { transition: background .13s, color .13s; }
.side-nav .tab.active { box-shadow: inset 0 0 0 1px #dce4fb; }
.side-nav .tab.active::before { top: 7px; bottom: 7px; }
.side-nav a.tab { color: var(--accent); font-weight: 600; }
.side-foot { background: linear-gradient(0deg, #fafbfd, #fff); }

/* ---- Topbar: mai curat, titlu mai prezent ---- */
.topbar { padding-top: 12px; padding-bottom: 12px; }
.page-title { letter-spacing: -.015em; }
.topbar .right button { background: #fff; border-color: var(--line); }
.topbar .right button:hover { border-color: #cdd6e6; background: #fafbfd; }

/* ---- Carduri KPI: numar mai mare, hover cu ridicare ---- */
.card { transition: box-shadow .15s, transform .15s, border-color .15s; }
.card:hover { transform: translateY(-1px); border-color: #dbe2ee; box-shadow: var(--sh-md); }
.card::before { transition: opacity .15s; }
.card:hover::before { opacity: .5; }
.card .num { font-size: 25px; }

/* ---- Butoane primare: umbra subtila ca sa "iasa" ---- */
.btn-primary, .btn-give, #modal-ok, #edit-ok, #liv-ok, .login-box button,
.btn-fin, .btn-liv, #adj-ok, #rk-ok, #ask-ok, #det-close {
  box-shadow: 0 1px 2px rgba(47,91,234,.18); }
.btn-fin, .btn-liv { box-shadow: 0 1px 2px rgba(18,146,91,.18); }
.ghost { color: var(--ink-2); }
.ghost:hover { background: #f4f6fa; border-color: #cdd6e6; }

/* ---- Randuri/liste: hover mai viu, colturi mai fine ---- */
.row, .liv-row, .disp-row, .po-row, .user-row, .pick-row, .card-box { border-radius: var(--radius); }
.row:hover, .liv-row:hover, .disp-row:hover, .po-row:hover { transform: translateY(-1px); }
.row, .liv-row, .disp-row, .po-row { transition: box-shadow .13s, border-color .13s, transform .13s; }

/* ---- Tabele generice: zebra + antet lipicios in containere derulabile ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 700; background: #fbfcfe; }
.tbl tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.tbl tbody tr:hover { background: #fafbfe; }

/* ---- Titluri de sectiune mai clare ---- */
.view h2 { color: #7a8698; }

/* ---- Modale: titlu mai puternic, camp de input mai inalt ---- */
.modal-box h3 { font-size: 18px; letter-spacing: -.01em; }
.modal-box { border: 1px solid var(--line); }

/* ---- Toast ---- */
.toast { border-radius: 10px; box-shadow: var(--sh-md); }

/* ---- Login: putin mai cald ---- */
.login-box { border-radius: 18px; }
.login-box button { box-shadow: 0 2px 8px rgba(47,91,234,.22); }

/* ---- Badge de mediu (ribbon) ---- */
.env-ribbon { font-weight: 700; letter-spacing: .06em; }

/* topbar: titlul hugheste stanga, actiunile la dreapta (curat si cu hamburger prezent) */
.topbar .page-title { margin-right: auto; }

/* Badge fara continut (0 elemente) nu mai apare ca punct — se ascunde de tot */
.badge:empty { display: none; }
/* Pe mobil, titlul din topbar nu se rupe pe 2 randuri */
@media (max-width: 820px) { .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* =====================================================================
   STRAT ENTERPRISE — WMS production-grade (18 iul 2026)
   Peste sistemul existent: rafineaza tokenii, shell-ul si componentele
   partajate, ca toate ecranele sa mosteneasca acelasi limbaj vizual.
   Clasele existente raman — sunt doar rafinate.
   ===================================================================== */

:root {
  /* neutre mai adanci, mai putin "flat" */
  --bg: #f1f3f7;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --muted-2: #9aa3b2;
  --line: #e3e7ee;
  --line-2: #eef1f6;
  --accent: #2f5bea;
  --accent-2: #2447c7;
  --accent-soft: #eaf0ff;
  --accent-line: #cdd9ff;
  /* sistem de status functional (fundal / text / contur) */
  --ok: #0f7d4d;  --ok-soft: #e6f6ee;  --ok-line: #b6e2ca;
  --warn: #b91c1c; --warn-soft: #fdecec; --warn-line: #f4c4c4;
  --amber: #a3620a; --amber-soft: #fdf1e0; --amber-line: #f2d7ac;
  --info: #3730a3; --info-soft: #ecebfb; --info-line: #cfccf3;
  --slate-soft: #eef1f6; --slate-ink: #475569;
  --radius: 9px; --radius-sm: 7px; --radius-lg: 13px;
  --sh-sm: 0 1px 2px rgba(17,24,39,.05);
  --sh: 0 1px 2px rgba(17,24,39,.06), 0 2px 5px rgba(17,24,39,.04);
  --sh-md: 0 4px 14px rgba(17,24,39,.09);
  --sh-lg: 0 18px 50px rgba(17,24,39,.18);
  --h-ctrl: 34px;                       /* inaltime standard input/buton */
}
body { font-size: 13.5px; color: var(--ink); }
code, .mono, .ean-inp { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---- Bara de progres globala (legata de fiecare cerere in app.js) ---- */
.topprog { position: sticky; top: 0; height: 2px; z-index: 8; background: transparent; overflow: hidden; }
.topprog::after { content: ""; position: absolute; inset: 0; width: 34%; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); transform: translateX(-120%); }
.topprog.on::after { animation: prog 1.05s ease-in-out infinite; }
@keyframes prog { 0% { transform: translateX(-120%); } 100% { transform: translateX(360%); } }

/* ---- Butoane: ierarhie clara ---- */
button { font-weight: 550; }
/* inaltime standard DOAR pe butoanele de actiune, nu pe pill-urile mici din randuri dense */
.btn-primary, .btn-soft, .ghost, .btn-give, .btn-fin, .btn-liv, .btn-danger,
.topbar .right button, .toolbar button, .modal-actions button { min-height: var(--h-ctrl); }
.btn-primary, .btn-give, #modal-ok, #edit-ok, #liv-ok, #adj-ok, #rk-ok, #ask-ok, .login-box button, .user-form button {
  background: var(--accent); color: #fff; border: 1px solid var(--accent); box-shadow: var(--sh-sm); }
.btn-primary:hover, .btn-give:hover, #modal-ok:hover, #edit-ok:hover, #liv-ok:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-soft { background: var(--panel-2); border-color: var(--line); color: var(--ink-2); }
.btn-soft:hover { background: #eef2f8; border-color: #d3dbe8; }
.btn-fin, .btn-liv { background: var(--ok); border-color: var(--ok); color: #fff; box-shadow: var(--sh-sm); }
.btn-fin:hover, .btn-liv:hover { background: #0c6b42; }
.btn-danger { background: var(--warn); border-color: var(--warn); color: #fff; }
.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.ghost:hover { background: var(--panel-2); border-color: #d3dbe8; }

/* ---- Inputuri: inaltime consecventa ---- */
input, select, textarea { min-height: var(--h-ctrl); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
label { color: var(--muted); }

/* ---- Sidebar: mai dens, mai enterprise ---- */
.sidebar { width: 226px; background: linear-gradient(180deg, #fff, #fcfdff); }
.side-logo { border-bottom: 1px solid var(--line-2); padding: 14px 16px 11px; }
.nav-title { color: var(--muted-2); font-size: 10px; letter-spacing: .08em; }
.side-nav .tab { font-size: 13px; padding: 7px 10px; border-radius: 7px; color: var(--ink-2); }
.side-nav .tab:hover { background: var(--panel-2); }
.side-nav .tab.active { background: var(--accent-soft); color: var(--accent-2); font-weight: 650; box-shadow: none; }
.side-nav .tab.active::before { left: -10px; width: 3px; background: var(--accent); }
.nav-group:not(:last-child) { border-bottom: 1px solid var(--line-2); }
.side-foot { background: var(--panel-2); }

/* ---- Topbar: context + user chip ---- */
.topbar { padding: 9px 20px; background: rgba(255,255,255,.9); }
.page-title { font-size: 15.5px; font-weight: 700; color: var(--ink); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.user-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-nm { font-size: 12.5px; font-weight: 650; color: var(--ink); }
.user-rl { font-size: 10.5px; color: var(--muted); }
.store-switch { height: var(--h-ctrl); }

/* ---- Sistem de STATUS unificat (o singura gramatica vizuala) ---- */
.st { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; letter-spacing: .01em; white-space: nowrap; line-height: 1.5; border: 1px solid transparent; }
.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.st-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.st-info { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }
.st-wait { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.st-err { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.st-neutral { background: var(--slate-soft); color: var(--slate-ink); border-color: var(--line); }
/* mapez pill-urile existente pe aceeasi gramatica */
.backorder-tag { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn-line); }
.unmapped-tag { background: var(--slate-soft); color: var(--slate-ink); }
.pack-tag { border: 1px solid transparent; }
.pack-tag.gata { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.pack-tag.lucru { background: var(--amber-soft); color: var(--amber); border-color: var(--amber-line); }
.pack-tag.trimisa { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-line); }
.po-badge.s-open { background: var(--accent-soft); color: var(--accent-2); }
.po-badge.s-partial { background: var(--amber-soft); color: var(--amber); }
.po-badge.s-received { background: var(--ok-soft); color: var(--ok); }
.po-badge.s-cancelled { background: var(--warn-soft); color: var(--warn); }

/* ---- Carduri KPI: mai sobre, dense ---- */
.cards { gap: 10px; }
.card { padding: 12px 14px; border-radius: var(--radius); }
.card .num { font-size: 22px; }
.card .lbl { font-size: 11.5px; text-transform: none; letter-spacing: 0; }
.card:hover { transform: none; box-shadow: var(--sh); border-color: #d7deea; }

/* ---- Randuri/liste: dense, usor de scanat, zebra la hover ---- */
.row, .liv-row, .disp-row, .inv-row, .mat-row, .transf-row {
  padding: 10px 14px; border-radius: var(--radius); box-shadow: none; border-color: var(--line); }
.row:hover, .liv-row:hover, .disp-row:hover, .inv-row:hover, .mat-row:hover, .transf-row:hover {
  transform: none; border-color: #d3dbe8; box-shadow: var(--sh); background: #fff; }
.row.head, .liv-row.head, .inv-row.head, .mat-row.head { color: var(--muted); letter-spacing: .05em; }
.nr, .liv-row .nr, .disp-row .nr { color: var(--ink); }
.nr-link { text-decoration: none; border-bottom: 1px dashed var(--muted-2); }
.nr-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---- Tabele generice ---- */
.tbl thead th { position: sticky; top: 0; background: var(--panel-2); z-index: 1; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl td.r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Toolbar / filtre ---- */
.toolbar { gap: 10px; margin: 16px 0 12px; }
.toolbar input, .toolbar select { height: var(--h-ctrl); }

/* ---- Subtabs (tab-uri de filtrare) ---- */
.subtabs { background: var(--panel-2); border: 1px solid var(--line); padding: 3px; border-radius: 9px; }
.subtab.active { color: var(--accent-2); }

/* ---- Empty state: icona + text + (actiune) ---- */
.empty { padding: 40px 22px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--panel);
  color: var(--muted); font-size: 13.5px; }
.empty::before { content: "📭"; display: block; font-size: 30px; margin-bottom: 8px; opacity: .8; }

/* ---- Skeleton loading (pentru unde vrem placeholder inainte de date) ---- */
.skel { position: relative; overflow: hidden; background: var(--line-2); border-radius: 6px; height: 12px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-row { height: 56px; border-radius: var(--radius); margin-bottom: 7px; }

/* ---- Toast: iconita + intrare/iesire ---- */
.toast { display: flex; align-items: center; gap: 9px; bottom: 24px; padding: 11px 16px 11px 13px; border-radius: 11px;
  background: var(--ink); box-shadow: var(--sh-lg); opacity: 0; transform: translate(-50%, 10px); pointer-events: none;
  transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { background: #0f2a1e; }
.toast.err { background: #3a0f10; }
.toast-ic { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; flex: none; }
.toast.ok .toast-ic { background: var(--ok); color: #fff; }
.toast.err .toast-ic { background: var(--warn); color: #fff; }

/* ---- Dropdown / meniu (reutilizabil) ---- */
.menu { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--sh-md);
  padding: 5px; min-width: 180px; z-index: 25; }
.menu button { display: flex; width: 100%; text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 7px; }
.menu button:hover { background: var(--panel-2); }

/* ---- Paginare ---- */
.pager { display: flex; gap: 4px; align-items: center; justify-content: center; margin: 16px 0 4px; }
.pager button { min-width: 34px; height: var(--h-ctrl); padding: 0 10px; }
.pager button.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager .info { color: var(--muted); font-size: 12.5px; margin: 0 8px; }

/* ---- Sectiuni ---- */
.view h2 { font-size: 11.5px; color: var(--muted); margin: 22px 0 9px; }
main { padding: 20px 22px; }

/* ---- Densitate confortabila pe tableta (warehouse floor) ---- */
@media (min-width: 821px) and (max-width: 1200px) {
  .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* ---- Topbar pe mobil/tableta: user chip doar avatar, mai putin inghesuit ---- */
@media (max-width: 820px) {
  .user-meta { display: none; }
  .user-chip { padding: 3px; gap: 0; border-radius: 50%; }
  .topbar .right { gap: 6px; }
  .store-switch { max-width: 132px; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card .num { font-size: 20px; }
}

/* ---- Sidebar: iconite aliniate + link de lansare (ecran extern) ---- */
.nav-ic { display: inline-block; width: 16px; text-align: center; margin-right: 4px; font-size: 12px; filter: grayscale(.15); }
.side-nav a.tab.tab-launch { color: var(--muted); font-weight: 550; margin-top: 3px; }
.side-nav a.tab.tab-launch:hover { color: var(--accent); background: var(--accent-soft); }
.tab-launch .ext { margin-left: auto; opacity: .6; font-size: 12px; }

/* =====================================================================
   Avatar (poza sau initiale) + meniul de cont + fix mobil Produse&stoc
   ===================================================================== */

/* ---- Avatar reutilizabil ---- */
.av { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden;
  background: var(--accent); color: #fff; font-weight: 700; flex: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-ini { background: linear-gradient(135deg, #3a67ee, #2447c7); }
/* avatarul din topbar: cand are poza, imaginea umple cercul */
.user-av { overflow: hidden; padding: 0; }
.user-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-av.lg { width: 40px; height: 40px; font-size: 15px; }

/* ---- Chip-ul de cont (buton) + sageata ---- */
.user-wrap { position: relative; }
.user-chip { cursor: pointer; }
.user-chip .chev { color: var(--muted); font-size: 10px; margin-left: 1px; transition: transform .18s; }
.user-chip.open .chev { transform: rotate(180deg); }

/* ---- Meniul de cont (dropdown) ---- */
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 268px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--sh-lg); padding: 6px; z-index: 30; animation: pop .13s ease; }
.um-head { display: flex; align-items: center; gap: 11px; padding: 9px 10px 11px; }
.um-id { display: flex; flex-direction: column; min-width: 0; }
.um-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.um-sub { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.um-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted-2); font-weight: 700; padding: 6px 10px 3px; }
.um-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: none; background: transparent;
  padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 550; min-height: 0; }
.um-item:hover { background: var(--panel-2); }
.um-item .badge { margin-left: auto; }
.um-item.danger { color: var(--warn); }
.um-item.danger:hover { background: var(--warn-soft); }
.um-sep { height: 1px; background: var(--line-2); margin: 5px 4px; }
@media (max-width: 820px) { .user-menu { position: fixed; right: 10px; top: 58px; width: min(280px, calc(100vw - 20px)); } }

/* ---- Fix mobil: Produse & stoc, Materii prime, Transferuri (grid dens -> stivuit + etichete) ---- */
.m-lbl { display: none; }
@media (max-width: 820px) {
  .inv-row, .mat-row, .transf-row { grid-template-columns: 1fr !important; gap: 8px; padding: 12px 14px; }
  .inv-row.head, .mat-row.head { display: none; }
  .m-lbl { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
  .inv-row .ean-inp, .inv-row .colete-inp { width: 100%; text-align: left; }
  .stoc-cell { display: flex; flex-wrap: wrap; gap: 6px; }
  .stoc-cell .m-lbl { flex-basis: 100%; }
  .stoc-loc { margin: 0; }
  .inv-row .actions-cell, .ist-btn { flex-wrap: wrap; }
}

/* =====================================================================
   Dashboard operational configurabil
   ===================================================================== */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.dash-hi { font-size: 17px; font-weight: 700; color: var(--ink); }
.kpi-card { text-align: left; cursor: pointer; border: 1px solid var(--line); transition: box-shadow .14s, border-color .14s, transform .1s; }
.kpi-card:hover { border-color: var(--accent-line); box-shadow: var(--sh-md); background: #fff; }
.kpi-card:active { transform: translateY(1px); }
.kpi-card .num { font-size: 26px; }
.kpi-card.warn .num { color: var(--warn); } .kpi-card.warn::before { background: var(--warn); opacity: 1; }
.kpi-card.ok .num { color: var(--ok); } .kpi-card.ok::before { background: var(--ok); opacity: 1; }
.dash-config { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--sh); }
.dash-config-h { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.dash-config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 14px; }
.dash-wchk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; padding: 4px 0; }
.dash-wchk input { width: auto; min-height: 0; }
.dash-config-foot { margin-top: 14px; display: flex; justify-content: flex-end; }
@media (max-width: 820px) { .dash-config-grid { grid-template-columns: 1fr 1fr; } .dash-hi { font-size: 15px; } }

/* ---- Profilul meu ---- */
.prof-grid { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; max-width: 820px; }
.prof-card { text-align: center; }
.prof-av-wrap { display: flex; justify-content: center; margin-bottom: 12px; }
.prof-av-wrap .av { box-shadow: var(--sh); }
.prof-name { font-size: 18px; font-weight: 700; color: var(--ink); }
.prof-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.prof-photo-btns { display: flex; gap: 8px; justify-content: center; margin: 14px 0 6px; }
.prof-mods { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); text-align: left; }
.prof-mods-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); font-weight: 700; margin-bottom: 7px; }
.prof-mod { display: inline-block; font-size: 11.5px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid var(--accent-line); border-radius: 6px; padding: 2px 9px; margin: 0 4px 5px 0; font-weight: 600; }
.prof-pw h3 { margin: 0 0 4px; font-size: 15px; }
.prof-l { display: block; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.prof-l input { display: block; width: 100%; margin-top: 4px; }
.prof-pw-foot { margin-top: 6px; }
@media (max-width: 820px) { .prof-grid { grid-template-columns: 1fr; } }

/* ---- Module blocate (în curând) ---- */
.nav-group.locked .tab { opacity: .5; cursor: not-allowed; }
.nav-group.locked .tab:hover { background: transparent; color: var(--ink-2); }
.soon { font-size: 9.5px; font-weight: 800; letter-spacing: .02em; color: var(--amber); background: var(--amber-soft);
  border: 1px solid var(--amber-line); border-radius: 5px; padding: 1px 5px; margin-left: 6px; text-transform: none; vertical-align: middle; }

/* ---- Showroom POS: bara de moduri, stoc pe locatii, rezumat comanda ---- */
.sh-modebar { display: inline-flex; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); padding: 3px; border-radius: 10px; margin-bottom: 10px; }
.sh-mode { border: none; background: transparent; color: var(--muted); font-weight: 650; font-size: 13px; padding: 8px 16px; border-radius: 8px; min-height: 0; }
.sh-mode:hover { background: #fff; }
.sh-mode.active { background: #fff; color: var(--accent-2); box-shadow: var(--sh-sm); }
.sh-explain { font-size: 12.5px; color: var(--ink-2); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 8px; padding: 9px 11px; margin-bottom: 12px; line-height: 1.5; }
.sh-stk { font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 5px; margin-right: 5px; }
.sh-stk.ok { background: var(--ok-soft); color: var(--ok); }
.sh-stk.zero { background: var(--slate-soft); color: var(--muted); }
.sh-cart-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.sh-total { font-size: 13px; } .sh-total b { font-size: 16px; margin-left: 8px; }
.sh-last { margin-top: 14px; background: var(--ok-soft); border: 1px solid var(--ok-line); border-radius: 10px; padding: 13px 15px; }
.sh-last-h { font-weight: 700; color: var(--ok); margin-bottom: 6px; }
.sh-last-row { font-size: 14px; margin-bottom: 10px; }
.sh-last-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Primire transfer cu diferențe ---- */
.trecv-lines { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.trecv-line { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line, #e5e7eb); border-radius: 8px; }
.trecv-line .trecv-name { flex: 1; font-weight: 600; }
.trecv-line input { padding: 4px 6px; border: 1px solid var(--line, #d1d5db); border-radius: 6px; }
.trecv-diff { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; border-radius: 8px; padding: 8px 10px; font-size: 13px; font-weight: 600; }

/* ---- Asistent AI (chat) ---- */
.ai-wrap { display: flex; flex-direction: column; height: calc(100vh - 130px); max-width: 900px; }
.ai-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 10px; }
.ai-title { margin: 0 0 2px; font-size: 20px; }
.ai-sub { margin: 0; color: var(--muted); font-size: 13px; max-width: 640px; }
.ai-usage { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ai-chip { font-size: 12.5px; padding: 6px 12px; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 999px; cursor: pointer; color: var(--text, #111); }
.ai-chip:hover { background: var(--accent-soft, #eff4ff); border-color: var(--accent, #2f6bff); color: var(--accent, #2f6bff); }
.ai-log { flex: 1; overflow-y: auto; padding: 12px; background: var(--bg-soft, #f7f8fa); border: 1px solid var(--line, #e5e7eb); border-radius: 12px; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { display: flex; }
.ai-msg.ai-user { justify-content: flex-end; }
.ai-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.ai-user .ai-bubble { background: var(--accent, #2f6bff); color: #fff; border-bottom-right-radius: 4px; }
.ai-bot .ai-bubble { background: var(--card, #fff); border: 1px solid var(--line, #e5e7eb); color: var(--text, #111); border-bottom-left-radius: 4px; }
.ai-msg.ai-err .ai-bubble { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted, #9aa1ab); animation: ai-b 1s infinite; }
.ai-dots i:nth-child(2) { animation-delay: .2s; }
.ai-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ai-b { 0%,60%,100% { opacity: .3; } 30% { opacity: 1; } }
.ai-bar { display: flex; gap: 8px; margin-top: 10px; }
.ai-bar input { flex: 1; padding: 11px 14px; border: 1px solid var(--line, #d1d5db); border-radius: 10px; font-size: 14px; }
.ai-bar input:focus { outline: none; border-color: var(--accent, #2f6bff); }
.ai-disclaimer { margin: 8px 2px 0; font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) { .ai-bubble { max-width: 88%; } .ai-wrap { height: calc(100vh - 110px); } }

/* ---- Print bulk fise productie ---- */
.bulk-bar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.bulk-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.row-sel { cursor: pointer; vertical-align: middle; }
#bulk-print:disabled { opacity: .5; cursor: default; }

/* ---- Rețetare (liste de debitare) ---- */
.ret-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
.ret-list { display: flex; flex-direction: column; gap: 4px; max-height: calc(100vh - 190px); overflow-y: auto; }
.ret-gh { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 10px 2px 4px; font-weight: 700; }
.ret-item { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; padding: 8px 11px; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 8px; cursor: pointer; }
.ret-item:hover { border-color: var(--accent, #2f6bff); }
.ret-item.active { border-color: var(--accent, #2f6bff); background: var(--accent-soft, #eff4ff); }
.ret-m { font-weight: 600; font-size: 14px; }
.ret-meta { font-size: 11.5px; color: var(--muted); }
.ret-detail { border: 1px solid var(--line, #e5e7eb); border-radius: 12px; padding: 18px; min-height: 200px; }
.ret-d-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line, #eef0f3); padding-bottom: 12px; }
.ret-d-head h3 { margin: 0 0 2px; }
.ret-secs { column-count: 2; column-gap: 22px; }
.ret-sec { break-inside: avoid; margin-bottom: 12px; }
.ret-sec-h { font-weight: 700; color: var(--accent, #2563eb); background: var(--accent-soft, #eef2ff); padding: 3px 8px; border-radius: 5px; font-size: 12.5px; margin-bottom: 3px; }
.ret-ln { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; padding: 2px 6px; border-bottom: 1px solid var(--line, #f1f3f5); }
.ret-ln b { white-space: nowrap; }
@media (max-width: 720px) { .ret-grid { grid-template-columns: 1fr; } .ret-secs { column-count: 1; } }

/* ---- Filtru de dată reutilizabil ---- */
.date-filter { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.date-filter .df-preset { font-size: 12px; padding: 4px 9px; border: 1px solid var(--line, #e5e7eb); background: var(--card, #fff); border-radius: 6px; cursor: pointer; color: var(--text, #111); }
.date-filter .df-preset:hover { border-color: var(--accent, #2f6bff); }
.date-filter .df-preset.active { background: var(--accent, #2f6bff); color: #fff; border-color: var(--accent, #2f6bff); }
.date-filter input[type="date"] { font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line, #d1d5db); border-radius: 6px; }
.date-filter .df-sep { color: var(--muted); }
.date-filter .df-clear { padding: 3px 8px; font-size: 12px; }

/* ---- Flotă: asignare transport în dispecerat ---- */
.disp-row .transport { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.disp-row .transport select { font-size: 12.5px; padding: 3px 6px; border: 1px solid var(--line, #d1d5db); border-radius: 6px; max-width: 130px; }
.disp-row .transport select.has-veh { border-color: #12925b; background: #e7f7ef; color: #0b6b42; font-weight: 600; }
.disp-row .transport input[type="date"] { font-size: 12px; padding: 3px 5px; border: 1px solid var(--line, #d1d5db); border-radius: 6px; }
.disp-row .transport .dif { margin-left: 4px; }
.date-filter .df-lbl { font-size: 11.5px; color: var(--muted); }

/* ---- Setare magazin producție ---- */
.prod-config { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--accent-soft, #eff4ff); border: 1px solid var(--line, #dbe4ff); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13px; }
.prod-config:empty { display: none; }
.prod-config .pc-lbl { font-weight: 600; }
.prod-config select { padding: 4px 8px; border: 1px solid var(--line, #c7d2fe); border-radius: 6px; font-weight: 600; }

/* ---- Bulk pick + picker select ---- */
#pick-bulk-bar { align-items: center; gap: 12px; }
#pick-bulk-bar select { padding: 4px 8px; border: 1px solid var(--line, #d1d5db); border-radius: 6px; }
.pk-sel { vertical-align: middle; cursor: pointer; }

/* ---- Consum materie primă (editor în rețeta de debitare) + Mapare produse ---- */
.btn { padding: 7px 13px; border-radius: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; }
.btn:hover { filter: brightness(1.06); }
.btn-ic { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.btn-ic:hover { background: var(--warn-soft); color: var(--warn); }
.ret-consum { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.consum-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.consum-rows { display: flex; flex-direction: column; gap: 6px; }
.consum-row { display: grid; grid-template-columns: 1fr 110px 44px 28px; align-items: center; gap: 8px; }
.consum-row .cs-mat { height: var(--h-ctrl); border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: #fff; }
.consum-row .cs-qty { height: var(--h-ctrl); border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; text-align: right; }
.consum-row .cs-unit { font-size: 12px; }
.consum-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.map-tbl { width: 100%; }
.map-tbl .map-sel { width: 100%; max-width: 360px; height: var(--h-ctrl); border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: #fff; }
.map-tbl tr.row-warn td { background: var(--warn-soft); }
.map-tbl tr.row-warn .map-sel { border-color: var(--warn-line); }

/* ---- Avertisment amplasare raft + linii pe rândul de pick + detalii comandă ---- */
.raft-warn { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
.pick-card { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--panel); }
.pick-card > .pick-row { border: none; margin: 0; }
.pick-linii { border-top: 1px dashed var(--line); padding: 7px 12px 9px; display: flex; flex-direction: column; gap: 4px; }
.pick-linie { font-size: 12.5px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tag-raft { background: var(--ok-soft); border: 1px solid var(--ok-line); color: var(--ok); border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; }
.btn-det { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); background: #fff; font-weight: 600; cursor: pointer; }
.btn-det:hover { background: var(--accent-soft); border-color: var(--accent); }
.dd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.dd-sect { margin: 12px 0 0; }
.dd-sect h4 { margin: 0 0 6px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.dd-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px dotted var(--line); font-size: 13px; }
.dd-k { color: var(--muted); } .dd-v { font-weight: 600; text-align: right; }
.dd-note { background: var(--slate-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; white-space: pre-wrap; font-size: 12.5px; margin: 0; font-family: inherit; }
.dd-tl { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow: auto; }
.dd-tl-i { font-size: 12.5px; border-left: 2px solid var(--line); padding-left: 9px; }
.dd-com { display: flex; flex-direction: column; gap: 8px; }
.dd-com-i { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; }
.dd-com-h { display: flex; gap: 8px; align-items: baseline; margin-bottom: 2px; }
.dd-add { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.dd-add textarea { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px; font: inherit; font-size: 13px; resize: vertical; }
.dd-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---- Greutate (din Shopify): pe comandă și pe mașină ---- */
.tag-kg { background: var(--info-soft); border: 1px solid var(--info-line); color: var(--info); border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.veh-load { display: inline-block; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; padding: 3px 10px; margin-right: 6px; font-size: 12.5px; }
#dp-load-bar { gap: 8px; flex-wrap: wrap; }

/* input de cantitate editabil direct în dialogul de corecție de stoc */
.adj-target { width: 88px; font-size: 17px; font-weight: 700; text-align: center; padding: 4px 6px;
  border: 2px solid var(--accent); border-radius: 8px; background: #fff; }
.adj-target:focus { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- Showroom: segmente persoană/firmă, ridicare/livrare ---- */
.sh-seg { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 8px; }
.sh-seg-b { border: none; background: #fff; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); }
.sh-seg-b + .sh-seg-b { border-left: 1px solid var(--line); }
.sh-seg-b.active { background: var(--accent); color: #fff; }
.mchk-inline { display: flex; align-items: center; gap: 6px; font-size: 13px; align-self: end; }
.sv-required input { border-color: var(--accent); }
.sv-required::after { content: 'adresa e obligatorie la livrare'; font-size: 11.5px; color: var(--accent); grid-column: 1/-1; }

/* ---- Stofa pe articolul din producție: swatch + nume ---- */
.stofa-row { display: inline-flex; align-items: center; gap: 6px; }
.stofa-sw { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; border: 1px solid var(--line);
  cursor: zoom-in; vertical-align: middle; background: var(--line-2); }
.stofa-sw:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
/* lista de stofe din Materii prime */
.mat-sw { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid var(--line); cursor: zoom-in; }

/* ---- Redesign Comenzi: 5 coloane (checkbox · comandă · produse · bani · acțiuni) ---- */
.liv-row.lv5 { grid-template-columns: 26px 200px 1fr 150px 200px; }
.lv-check { display: flex; align-items: center; justify-content: center; }
.lv-check input, .lv-sel { width: 16px; height: 16px; cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chips > span { font-size: 10.5px; }
.act-btns { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.btn-act { font-size: 11.5px; padding: 4px 9px; border-radius: 7px; border: 1px solid var(--line); background: #fff;
  font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); line-height: 1.2; }
.btn-act:hover { border-color: var(--accent); background: var(--accent-soft); }
.bulk-bar-lv { position: sticky; top: 0; z-index: 5; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 7px 12px; gap: 12px; box-shadow: var(--sh-sm); }
.det-flux { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .liv-row.lv5 { grid-template-columns: 26px 1fr !important; }
  .liv-row.lv5 .prod, .liv-row.lv5 .sums, .liv-row.lv5 .actions-cell { grid-column: 2; }
  .liv-row.lv5.head { display: none; }
}
.veh-off td { opacity: .5; }
.veh-load a { text-decoration: none; margin-left: 3px; }
.btn-act.awb { border-color: var(--accent); color: var(--accent); }
.btn-act.awb:hover { background: var(--accent); color: #fff; }

/* ================================================================
   UI REFRESH 2.0 — strat de rafinare vizuală (CSS-only).
   Nu schimbă nicio clasă/id de care se leagă JS-ul — doar cum arată.
   ================================================================ */
:root {
  --bg: #f3f5f9;
  --ink: #0b1220;
  --accent: #2b54e0;
  --accent-2: #1e40c9;
  --accent-soft: #e9efff;
  --accent-line: #c4d3ff;
  --radius: 12px;
  --radius-lg: 16px;
  --sh-sm: 0 1px 2px rgba(11,18,32,.05);
  --sh: 0 1px 2px rgba(11,18,32,.05), 0 4px 12px rgba(11,18,32,.05);
  --sh-md: 0 4px 10px rgba(11,18,32,.07), 0 12px 32px rgba(11,18,32,.09);
  --sh-lg: 0 8px 24px rgba(11,18,32,.12), 0 24px 64px rgba(11,18,32,.16);
  --ring: 0 0 0 3px rgba(43,84,224,.18);
}
body { font-size: 13.5px; }

/* —— numerele stau frumos in coloana peste tot (bani, stocuri, cantitati) —— */
.sums, .card .num, .tbl td, .dif, .stoc-inp, .adj-target, .veh-load, .dd-v { font-variant-numeric: tabular-nums; }

/* —— MENIUL: aer, ierarhie, stare activa clara —— */
.sidebar { width: 240px; background: #fbfcfe; }
.side-logo { padding: 18px 18px 10px; }
.side-nav { padding: 6px 12px 14px; }
.nav-group { margin-bottom: 6px; padding-bottom: 8px; }
.nav-group + .nav-group { border-top: 1px solid var(--line-2); padding-top: 8px; }
.nav-title { font-size: 10px; letter-spacing: .09em; color: #8a96ab; padding: 8px 10px 5px; }
.side-nav .tab { padding: 7.5px 10px; font-size: 13px; border-radius: 9px; transition: background .12s, color .12s; }
.side-nav .tab .nav-ic { opacity: .85; }
.side-nav .tab:hover { background: #eef1f7; }
.side-nav .tab.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 2px 8px rgba(43,84,224,.28); }
.side-nav .tab.active::before { display: none; }
.side-nav .tab.active .badge { background: rgba(255,255,255,.25); }
.badge { font-size: 10px; padding: 1px 6.5px; }
.side-foot { border-top: 1px solid var(--line-2); background: #fbfcfe; }
.soon { font-size: 9.5px; }

/* —— TOPBAR: fix, curat, controale aliniate —— */
.topbar { backdrop-filter: blur(8px); background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); }
.page-title { font-weight: 700; letter-spacing: -.015em; }
.topbar .btn-soft, .topbar select, .store-switch { height: 34px; }

/* —— UN SINGUR LIMBAJ DE BUTOANE ——
   primare (actiunea principala) / secundare (btn-soft, btn-act, btn-m, btn-inv, btn-det) / ghost */
button, .btn-act, .btn-soft, .btn-inv, .btn-det, .btn-m { border-radius: 9px; font-weight: 600; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-primary, .btn-give, .btn-fin, .btn-liv, #modal-ok, #edit-ok, #liv-ok, .login-box button {
  border: none; border-radius: 9px; font-weight: 650; letter-spacing: .01em;
  box-shadow: 0 1px 2px rgba(11,18,32,.12), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary, #modal-ok, #edit-ok, #liv-ok, .login-box button { background: linear-gradient(180deg, #3a63f0, var(--accent)); color: #fff; }
.btn-primary:hover, #modal-ok:hover, #edit-ok:hover, #liv-ok:hover { background: linear-gradient(180deg, var(--accent), var(--accent-2)); }
.btn-fin, .btn-liv { background: linear-gradient(180deg, #17a468, var(--ok)); color: #fff; }
.btn-fin:hover, .btn-liv:hover { background: linear-gradient(180deg, var(--ok), #0d7a4c); }
.btn-act, .btn-soft, .btn-det, .btn-m, .btn-inv { background: #fff; border: 1px solid #d9dfea; color: var(--ink-2); }
.btn-act:hover, .btn-soft:hover, .btn-det:hover, .btn-m:hover, .btn-inv:hover:not(:disabled) {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.act-btns { gap: 6px; }
.act-btns .btn-act, .act-btns .btn-liv { height: 30px; padding: 0 11px; font-size: 12px; display: inline-flex; align-items: center; }

/* —— KPI cards: numere mari, eticheta discreta, accent pe muchie —— */
.cards .card { border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.cards .card.ok { border-top-color: var(--ok); }
.cards .card.warn { border-top-color: var(--warn); }
.card .num { font-weight: 750; letter-spacing: -.02em; }
.card .lbl { text-transform: uppercase; font-size: 10px; letter-spacing: .07em; color: var(--muted); font-weight: 650; }

/* —— randurile de comenzi: ierarhie clara —— */
.liv-row.lv5 { padding: 13px 16px; gap: 14px; border-radius: var(--radius); }
.liv-row.lv5:hover { border-color: #c9d4ea; }
.liv-row .nr { font-size: 14.5px; }
.chips { margin-top: 5px; }
.chips > span { display: inline-flex; align-items: center; height: 19px; border-radius: 6px; padding: 0 7px; font-weight: 600; }
.liv-row .prod { line-height: 1.45; }
.liv-row .sums { line-height: 1.55; }
.liv-row.head { font-size: 10px; letter-spacing: .08em; }

/* —— tabele —— */
.tbl thead th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid var(--line); }
.tbl tbody tr:hover { background: #f7f9fd; }

/* —— toolbar & filtre: aceeasi inaltime, segmente curate —— */
.toolbar input, .toolbar select, .toolbar .btn-soft, .toolbar button { height: 34px; }
.toolbar input[type="date"] { height: 34px; }
.subtabs { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.subtab { border: none; border-radius: 0; height: 32px; font-weight: 600; }
.subtab + .subtab { border-left: 1px solid var(--line-2); }
.subtab.active { background: var(--accent); color: #fff; }
.date-filter { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 2px; }
.date-filter .df-preset { border: none; height: 28px; border-radius: 7px; font-weight: 600; font-size: 12px; }
.date-filter .df-preset.active { background: var(--accent); color: #fff; }
.date-filter input[type="date"] { border: none; height: 28px; }

/* —— modale: adancime + separare de fundal —— */
#modal .modal-card, #edit-modal .modal-card, #ist-modal .modal-card, #adj-modal .modal-card, #det-modal .modal-card, #liv-modal .modal-card,
.modal-card, .modal-box { border-radius: var(--radius-lg); box-shadow: var(--sh-lg); }
.modal, .modal-wrap, #ist-modal, #det-modal, #adj-modal { backdrop-filter: blur(3px); }

/* —— bara de bulk: plutitoare, vizibila —— */
.bulk-bar-lv { border-radius: 11px; border-color: #d3ddf2; background: linear-gradient(180deg, #fdfeff, #f6f9ff); }

/* —— scrollbar discret —— */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd4e3; border-radius: 8px; border: 2.5px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #aab7cd; }
::-webkit-scrollbar-track { background: transparent; }
/* corectii de consistenta pe stratul 2.0 */
.modal-box { border-radius: var(--radius-lg); box-shadow: var(--sh-lg); }
.modal { background: rgba(11,18,32,.5); backdrop-filter: blur(4px); }
.date-filter button { height: 28px; }
.toolbar .date-filter { padding: 2px 4px; }
/* chips de categorii la materii prime */
.cat-chip { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cat-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cat-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---- Toolbar Comenzi pe UN singur rand ---- */
#view-comenzi .toolbar:not(.bulk-bar-lv) { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.subtab { white-space: nowrap; padding: 0 13px; }
#lsearch { flex: 1 1 280px; min-width: 210px; }
.date-filter { flex: none; flex-wrap: nowrap; white-space: nowrap; display: inline-flex; align-items: center; }
.date-filter input[type="date"] { width: 118px; font-size: 12px; }
.date-filter .df-preset { padding: 0 9px; }
#lcount { white-space: nowrap; }
@media (max-width: 1000px) {
  #view-comenzi .toolbar:not(.bulk-bar-lv) { flex-wrap: wrap; overflow: visible; }
}
/* cautarea din Comenzi: randul ei, full-width, prietenoasa */
#lsearch { width: 100%; max-width: none; height: 38px; font-size: 13.5px; border-radius: 10px; }

/* ---- Fereastra comenzii: centrul de comanda ---- */
.det-cmd { display: flex; flex-direction: column; gap: 9px; background: linear-gradient(180deg,#fbfcff,#f5f8fe); border-color: #d8e0f2; }
.det-cmd-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.det-cmd-l { width: 74px; flex: none; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.det-cmd .invoices { display: inline-flex; gap: 6px; align-items: center; }
/* randul din lista: actiunile nu se mai frang, aceeasi pozitie mereu */
.liv-row.lv5 { grid-template-columns: 26px 205px 1fr 150px 215px; }
.act-btns { flex-wrap: nowrap; justify-content: flex-end; }
.liv-row .actions-cell { text-align: right; }
.awb-chip { cursor: pointer; }
.awb-chip:hover { box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---- Showroom: scanare obligatorie la vânzare ---- */
.sh-scan-bar { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
#sh-scan { flex: 1; height: 40px; font-size: 14px; border-radius: 10px; border: 2px solid var(--accent); background: var(--accent-soft); }
#sh-scan:focus { background: #fff; box-shadow: var(--ring); }
.scan-pill { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--warn-soft);
  color: var(--warn); border: 1px solid var(--warn-line, #fecaca); white-space: nowrap; }
.scan-pill.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line, #bbf7d0); }
.tb-line.nescanat { background: #fffaf5; }
.ok-txt { color: var(--ok); font-weight: 600; font-size: 13px; }

/* ---- Detecție anomalii ---- */
.an-row { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 7px; }
.an-row.sev-critical { border-left: 4px solid var(--warn); }
.an-row.sev-warn { border-left: 4px solid var(--amber); }
.an-row.sev-info { border-left: 4px solid var(--info, #2563eb); }
.an-row.rezolvata { opacity: .65; }
.an-sev { font-size: 15px; line-height: 1.4; }
.an-body { flex: 1; } .an-title { margin-bottom: 2px; }
.an-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; margin-right: 4px; }
.an-ai { background: linear-gradient(180deg,#f6f9ff,#eef3ff); border: 1px solid var(--accent-line); border-radius: var(--radius);
  padding: 12px 15px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.55; }
.tag-click { cursor: pointer; }
.tag-click:hover { box-shadow: 0 0 0 2px var(--accent-soft); }
