:root {
  --albastru: #1f4e78;
  --albastru-inchis: #163a5a;
  --albastru-deschis: #e8f0f8;
  --verde: #1e7a3c;
  --verde-fundal: #e3f4e8;
  --rosu: #b42318;
  --rosu-fundal: #fdecea;
  --galben-fundal: #fff6d6;
  --galben: #8a6100;
  --gri: #5b6470;
  --gri-deschis: #f3f5f8;
  --linie: #d5dbe3;
  --text: #1b2430;
  --fundal: #f6f8fb;
  --alb: #fff;
  --raza: 10px;
  --umbra: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: var(--text); background: var(--fundal); }
a { color: var(--albastru); }
h1 { font-size: 1.6rem; margin: 0 0 .8rem; }
h2 { font-size: 1.25rem; margin: 1.4rem 0 .7rem; }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; }
.ascuns { display: none !important; }
.incarcare { color: var(--gri); padding: 2rem; text-align: center; }
.mic { font-size: .88rem; color: var(--gri); }

/* bara de sus */
.bara { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .55rem 1.2rem; background: var(--albastru); color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.sigla { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.1rem; white-space: nowrap; }
.meniu { display: flex; gap: .25rem; flex: 1; overflow-x: auto; }
.meniu a { color: #dfe9f4; text-decoration: none; padding: .5rem .9rem; border-radius: 8px; font-weight: 600; white-space: nowrap; }
.meniu a:hover { background: rgba(255,255,255,.12); color: #fff; }
.meniu a.activ { background: #fff; color: var(--albastru); }
.cont { display: flex; align-items: center; gap: .6rem; }
.nume-utilizator { color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
body:not(.admin) .doar-admin { display: none !important; }

.continut { max-width: 1280px; margin: 0 auto; padding: 1.3rem 1.2rem 4rem; }

/* butoane */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .65rem 1.3rem; font: inherit; font-weight: 600; border-radius: var(--raza); border: 2px solid var(--albastru); background: var(--albastru); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover:not(:disabled) { background: var(--albastru-inchis); border-color: var(--albastru-inchis); }
.btn:disabled { background: #b8c3cf; border-color: #b8c3cf; color: #f4f6f8; cursor: not-allowed; }
.btn-secundar { background: #fff; color: var(--albastru); }
.btn-secundar:hover:not(:disabled) { background: var(--albastru-deschis); color: var(--albastru); }
.bara .btn-secundar { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-pericol { background: var(--rosu); border-color: var(--rosu); }
.btn-pericol:hover:not(:disabled) { background: #8f1c13; border-color: #8f1c13; }
.btn-verde { background: var(--verde); border-color: var(--verde); }
.btn-verde:hover:not(:disabled) { background: #155c2c; border-color: #155c2c; }
.btn-mic { min-height: 36px; padding: .3rem .8rem; font-size: .92rem; }
.btn-mare { min-height: 76px; font-size: 1.35rem; padding: 1rem 2rem; border-radius: 14px; }
.butoane { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }
.butoane.dreapta { justify-content: flex-end; }

/* carduri */
.card { background: var(--alb); border: 1px solid var(--linie); border-radius: 14px; padding: 1.2rem 1.3rem; box-shadow: var(--umbra); margin-bottom: 1.2rem; }
.grila { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.titlu-pagina { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.titlu-pagina h1 { margin: 0; }
.stat { font-size: 2rem; font-weight: 700; color: var(--albastru); }

/* mesaje */
.mesaj { border-radius: var(--raza); padding: .85rem 1rem; margin: .7rem 0; border: 1px solid; }
.mesaj-eroare { background: var(--rosu-fundal); border-color: #f3b8b2; color: var(--rosu); font-weight: 600; }
.mesaj-ok { background: var(--verde-fundal); border-color: #a8dbb7; color: var(--verde); }
.mesaj-info { background: var(--albastru-deschis); border-color: #bcd0e6; color: var(--albastru-inchis); }
.mesaj-atentie { background: var(--galben-fundal); border-color: #f1d98a; color: var(--galben); }
.mesaj a { color: inherit; font-weight: 700; }

/* formulare */
.camp { margin-bottom: 1.15rem; }
.camp > label, .eticheta { display: block; font-weight: 700; margin-bottom: .35rem; }
.camp .ajutor { font-size: .88rem; color: var(--gri); margin-top: .25rem; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 50px; padding: .6rem .8rem; font: inherit; color: var(--text); background: #fff; border: 2px solid #b9c3cf; border-radius: var(--raza);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--albastru); box-shadow: 0 0 0 3px rgba(31,78,120,.18); }
input:disabled, select:disabled, textarea:disabled { background: var(--gri-deschis); color: var(--gri); }
.camp.invalid input, .camp.invalid select, .camp.invalid textarea { border-color: var(--rosu); background: #fffafa; }
.camp .eroare { color: var(--rosu); font-weight: 600; font-size: .95rem; margin-top: .3rem; }
.camp.valid input, .camp.valid select { border-color: #7fbf94; }
.na { display: inline-flex; align-items: center; gap: .5rem; margin-top: .45rem; font-size: .95rem; cursor: pointer; user-select: none; }
.na input { width: 22px; height: 22px; }
.cu-sufix { display: flex; align-items: stretch; }
.cu-sufix input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cu-sufix span { display: flex; align-items: center; padding: 0 .8rem; background: var(--gri-deschis); border: 2px solid #b9c3cf; border-left: 0; border-radius: 0 var(--raza) var(--raza) 0; color: var(--gri); }
.doua { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.calculat { padding: .75rem .9rem; border-radius: var(--raza); background: var(--albastru-deschis); border: 2px dashed #9fb8d3; font-size: 1.3rem; font-weight: 700; }
.calculat small { display: block; font-size: .85rem; font-weight: 400; color: var(--gri); }
.qr input { font-family: Consolas, "Courier New", monospace; font-size: 1.25rem; letter-spacing: .04em; }
.qr-stare { margin-top: .4rem; font-weight: 600; }
.qr-ok { color: var(--verde); }
.qr-dublat { background: var(--rosu-fundal); border: 2px solid var(--rosu); color: var(--rosu); padding: .8rem 1rem; border-radius: var(--raza); margin-top: .5rem; font-weight: 700; }

/* formular în etape */
.etape { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; padding: 0; list-style: none; }
.etape li { flex: 1 1 110px; display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border-radius: var(--raza); background: #e9edf2; color: var(--gri); font-weight: 600; font-size: .95rem; }
.etape li .nr { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: #fff; color: var(--gri); font-weight: 700; flex: none; }
.etape li.facuta { background: var(--verde-fundal); color: var(--verde); cursor: pointer; }
.etape li.facuta .nr { background: var(--verde); color: #fff; }
.etape li.curenta { background: var(--albastru); color: #fff; }
.etape li.curenta .nr { color: var(--albastru); }
.lipsa { margin: .8rem 0 0; color: var(--rosu); font-weight: 600; }
.navigare-etape { display: flex; justify-content: space-between; gap: .8rem; margin-top: 1.2rem; flex-wrap: wrap; }
.navigare-etape .btn { min-width: 170px; }
.stoc-info { border-radius: var(--raza); padding: .8rem 1rem; margin: .4rem 0 1rem; font-weight: 600; }
.stoc-info.ok { background: var(--verde-fundal); color: var(--verde); }
.stoc-info.rau { background: var(--rosu-fundal); color: var(--rosu); border: 2px solid var(--rosu); }

/* rezumat / detalii */
.detalii { display: grid; grid-template-columns: minmax(170px, 34%) 1fr; border-top: 1px solid var(--linie); }
.detalii > div { padding: .55rem .2rem; border-bottom: 1px solid var(--linie); }
.detalii > div:nth-child(odd) { color: var(--gri); font-weight: 600; padding-right: 1rem; }
.detalii .gol { color: var(--rosu); font-style: italic; }
.detalii .na-val { color: var(--gri); font-style: italic; }
.taburi { display: flex; gap: .3rem; border-bottom: 2px solid var(--linie); margin-bottom: 1rem; }
.taburi button { font: inherit; font-weight: 700; padding: .7rem 1.2rem; border: 0; background: none; color: var(--gri); border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer; }
.taburi button.activ { color: var(--albastru); border-bottom-color: var(--albastru); }

/* tabele */
.tabel-cutie { overflow: auto; border: 1px solid var(--linie); border-radius: 12px; background: #fff; max-height: 70vh; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
td { max-width: 340px; }
th, td { padding: .55rem .65rem; border-bottom: 1px solid #e6eaf0; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; background: #eef2f7; z-index: 1; font-size: .82rem; text-transform: uppercase; letter-spacing: .02em; color: #3a4654; white-space: nowrap; }
th.sortabil { cursor: pointer; }
th.sortabil:hover { background: #e2e8f0; }
tbody tr.clic { cursor: pointer; }
tbody tr.clic:hover { background: #f4f8fc; }
td.num, th.num { text-align: right; white-space: nowrap; }
tr.anulata td { color: #8a929c; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
tr.stoc-mic td { background: var(--rosu-fundal); }
tr.stoc-mic td.ramas { color: var(--rosu); font-weight: 800; }
.eticheta-stare { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #e9edf2; color: #3a4654; white-space: nowrap; text-decoration: none !important; }
.eticheta-stare.galben { background: #ffeb9c; color: #6b4b00; }
.eticheta-stare.verde { background: #c6efce; color: #0c5a23; }
.eticheta-stare.rosu { background: #ffc7ce; color: #8a0f1b; }
.eticheta-stare.gri { background: #d9d9d9; color: #444; }
.eticheta-stare.albastru { background: #bdd7ee; color: #123d66; }
.eticheta-stare.violet { background: #e4d7f5; color: #4b2a7a; }
/* v3: câte un câmp QR pe bucată */
.qr-sloturi { display: grid; gap: .45rem; }
.qr-slot { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: .1rem .5rem; align-items: center; }
.qr-slot .qr-nr { font-weight: 700; color: var(--albastru); text-align: right; }
.qr-slot .qr-st { grid-column: 2; font-size: .9rem; min-height: 0; }
.qr-slot.in-plus input { border-color: var(--rosu); }
.qr-bun { color: var(--verde); font-weight: 700; }
.qr-rau { color: var(--rosu); font-weight: 700; }
.qr-atent { color: var(--galben); font-weight: 700; }
.calculat.info { font-size: 1.05rem; font-weight: 600; background: #f4f7fb; }
.calculat small, .calculat.info small { display: block; font-weight: 400; font-size: .85rem; margin-top: .2rem; }
.semn-incomplet { display: inline-block; margin-left: .3rem; padding: 0 .4rem; border-radius: 6px; background: var(--galben-fundal); color: var(--galben); font-size: .75rem; font-weight: 700; }

/* filtre */
.filtre { display: grid; gap: .7rem; grid-template-columns: 2fr repeat(5, minmax(120px, 1fr)); align-items: end; }
.filtre .camp { margin: 0; }
.filtre label { font-size: .85rem; }
.paginare { display: flex; align-items: center; gap: .6rem; justify-content: flex-end; margin-top: .7rem; flex-wrap: wrap; }
.tipuri { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.tipuri button { font: inherit; font-weight: 700; padding: .6rem 1.2rem; border-radius: 999px; border: 2px solid var(--albastru); background: #fff; color: var(--albastru); cursor: pointer; min-height: 44px; }
.tipuri button.activ { background: var(--albastru); color: #fff; }

/* login */
.login { max-width: 420px; margin: 7vh auto 0; }
.login h1 { text-align: center; }
.login .pin { letter-spacing: .5em; font-size: 1.5rem; text-align: center; }

/* acasă */
.alerta-stoc { display: flex; justify-content: space-between; gap: .6rem; padding: .55rem .2rem; border-bottom: 1px solid var(--linie); }
.alerta-stoc b { color: var(--rosu); }
.alegere-tip { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* modal + toast */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; }
.modal-cutie { background: #fff; border-radius: 16px; padding: 1.4rem; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%); background: #1b2430; color: #fff; padding: .85rem 1.3rem; border-radius: 12px; font-weight: 600; transition: transform .25s ease, opacity .25s ease; opacity: 0; pointer-events: none; z-index: 60; max-width: 92vw; }
.toast.vizibil { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }
.toast.eroare { background: var(--rosu); }

/* raport import */
.raport table { font-size: .88rem; }
.raport details { margin: .5rem 0; }
.raport summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }

@media (max-width: 900px) {
  .filtre { grid-template-columns: 1fr 1fr; }
  .filtre .camp:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .bara { flex-wrap: wrap; padding: .5rem .8rem; gap: .4rem; }
  .meniu { order: 3; flex-basis: 100%; }
  .cont { margin-left: auto; }
  .continut { padding: 1rem .8rem 4rem; }
  .detalii { grid-template-columns: 1fr; }
  .detalii > div:nth-child(odd) { border-bottom: 0; padding-bottom: 0; }
  .alegere-tip, .doua { grid-template-columns: 1fr; }
  .navigare-etape .btn { flex: 1; min-width: 0; }
  .etape li .txt { display: none; }
  .etape li { flex: 1 1 0; justify-content: center; }
  .btn-mare { width: 100%; }
}

/* ---------- v2 ---------- */
.sigla { display: flex; align-items: center; gap: .55rem; }
.sigla img { height: 34px; background: #fff; border-radius: 8px; padding: 2px 6px; }
body.lat .continut { max-width: none; }
.sub-btn { display: block; font-size: .8rem; font-weight: 400; opacity: .85; }
.btn-mare { flex-direction: column; }
.alegere-3 { grid-template-columns: repeat(3, 1fr); }
.chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--albastru-deschis); border: 1px solid #bcd0e6; border-radius: 999px; padding: .3rem .4rem .3rem .8rem; margin: 0 .35rem .35rem 0; font-size: .92rem; }
.chip button { border: 0; background: #fff; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--rosu); }
.acc-alese { margin-bottom: .5rem; }
.acc-rapide { display: flex; flex-wrap: wrap; gap: .4rem; margin: .3rem 0 .6rem; }
.pastila { font: inherit; font-size: .9rem; padding: .45rem .8rem; border-radius: 999px; border: 2px solid #b9c3cf; background: #fff; cursor: pointer; min-height: 40px; }
.pastila small { color: var(--gri); font-weight: 400; }
.pastila.activ { background: var(--albastru); border-color: var(--albastru); color: #fff; }
.pastila.activ small { color: #dfe9f4; }
.acc-rez { border: 1px solid var(--linie); border-radius: var(--raza); margin-top: .4rem; max-height: 320px; overflow: auto; }
.acc-rez:empty { display: none; }
.acc-rand { display: flex; justify-content: space-between; gap: .6rem; align-items: center; padding: .5rem .7rem; border-bottom: 1px solid #eef1f5; }
.galerie { display: flex; flex-wrap: wrap; gap: .5rem; }
.galerie img { width: 110px; height: 110px; object-fit: cover; border-radius: 10px; border: 1px solid var(--linie); }
.zile { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem; }
.zile button { flex: 0 0 auto; min-width: 96px; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem .6rem; border-radius: 12px; border: 2px solid var(--linie); background: #fff; font: inherit; cursor: pointer; }
.zile button b { font-size: 1.3rem; color: var(--albastru); }
.zile button.activ { border-color: var(--albastru); background: var(--albastru-deschis); }
.oprire { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1.2rem; border-bottom: 1px solid #eef1f5; }
.nr-oprire { flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.progres { position: relative; height: 12px; background: #e9edf2; border-radius: 999px; overflow: hidden; display: flex; }
.progres.mare { height: 18px; }
.progres > div { height: 100%; background: var(--verde); }
.progres > .progres-curs { background: #f1c75b; }
.grafic { overflow-x: auto; }
.grafic svg { display: block; }
.bare { display: grid; gap: .35rem; }
.bara-rand { display: grid; grid-template-columns: minmax(110px, 34%) 1fr auto; gap: .6rem; align-items: center; font-size: .9rem; padding: .15rem 0; }
.bara-et { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bara-fund { background: #eef2f7; border-radius: 4px; height: 16px; }
.bara-val { background: #2a78d6; height: 100%; border-radius: 0 4px 4px 0; }
.bara-nr { text-align: right; white-space: nowrap; font-weight: 600; }
.tt { position: fixed; z-index: 70; background: #1b2430; color: #fff; padding: .45rem .7rem; border-radius: 8px; font-size: .85rem; pointer-events: none; display: none; max-width: 240px; }
.tiles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile .stat { font-size: 1.6rem; }
.doua-col { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.confirmare { max-width: 640px; margin: 0 auto; }
.logo-prev { background: var(--gri-deschis); border-radius: 12px; padding: 1rem; text-align: center; margin-bottom: 1rem; }
.logo-prev img { max-height: 120px; max-width: 100%; }
label.btn { cursor: pointer; }
@media (max-width: 640px) {
  .sigla span { display: none; }
  .alegere-3 { grid-template-columns: 1fr; }
  .doua-col { grid-template-columns: 1fr; }
  .bara-rand { grid-template-columns: 1fr auto; }
  .bara-fund { grid-column: 1 / -1; order: 3; }
}
/* v3: rapoarte – fiecare raport cu culoarea lui, comparații, antet la tipărire */
.sectiune { border-top: 5px solid var(--sect, var(--albastru)); }
.sectiune > h2 { color: #1b2430; display: flex; align-items: center; gap: .5rem; }
.sectiune > h2::before { content: ""; width: .8rem; height: .8rem; border-radius: 3px; background: var(--sect, var(--albastru)); flex: none; }
.delta { font-weight: 700; font-size: .85rem; white-space: nowrap; color: #5b6573; }
.delta.sus { color: var(--verde); }
.delta.jos { color: var(--rosu); }
.cmp-rez { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem; margin-bottom: .6rem; }
.cmp-rez .stat { font-size: 1.5rem; }
.legenda { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: .9rem; margin: .4rem 0; }
.legenda i { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; margin-right: .35rem; vertical-align: -2px; }
.formula { background: #f6f8fb; border-radius: var(--raza); padding: .8rem 1rem; margin-top: .6rem; font-size: .92rem; }
.formula ol { margin: .4rem 0 .5rem 1.2rem; padding: 0; }
.formula li { margin: .2rem 0; }
.antet-print { display: none; }
.linii-cadru select, .linii-cadru input { min-height: 40px; }
@media print {
  @page { size: A4; margin: 12mm 10mm; }
  .bara, .filtre, .btn, #toast, .taburi, .cmp-bara select, .cmp-bara label, #tt { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 11pt; }
  main, #app { padding: 0 !important; max-width: none !important; }
  .card { box-shadow: none; break-inside: avoid; border: 1px solid #d5dbe3; }
  .sectiune { border-top-width: 5px; }
  .antet-print { display: flex; align-items: center; gap: 1rem; border-bottom: 3px solid var(--albastru); padding-bottom: .6rem; margin-bottom: 1rem; }
  .antet-print img { height: 56px; }
  .antet-print b { font-size: 15pt; color: var(--albastru); }
  .titlu-pagina h1 { display: none; }
  /* la tipărire se văd toate datele: fără derulare, fără tăieri */
  .tabel-cutie, .tabel-print, .grafic { max-height: none !important; overflow: visible !important; }
  .grafic svg { min-width: 0 !important; max-width: 100% !important; height: auto; max-height: 250px; }
  .doua-col, .grila.doua-col { grid-template-columns: 1fr !important; }
  .tiles { grid-template-columns: repeat(5, 1fr) !important; }
  table { font-size: 9pt; }
  thead { display: table-header-group; }
  tr { break-inside: avoid; }
  .bara-et { white-space: normal; }
  a { color: inherit; text-decoration: none; }
}
@media (max-width: 1500px) and (min-width: 641px) {
  .sigla span { display: none; }
  .meniu a { padding: .5rem .6rem; font-size: .95rem; }
  .nume-utilizator { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
}

.zi-traseu { padding: .45rem 1.2rem; background: var(--albastru-deschis); color: var(--albastru-inchis); font-weight: 700; font-size: .92rem; border-top: 1px solid var(--linie); }
.zile button.azi { outline: 2px solid var(--verde); outline-offset: -2px; }

.link-btn { background: none; border: 0; padding: 0; color: var(--rosu); text-decoration: underline; cursor: pointer; font: inherit; font-size: .92rem; }
.vies-stare { margin-top: .45rem; padding: .55rem .75rem; border-radius: var(--raza); background: #f4f7fb; font-size: .95rem; }
.vies-ok { background: var(--verde-fundal); color: #0c5a23; }
.vies-rau { background: var(--rosu-fundal); color: var(--rosu); font-weight: 600; border: 2px solid var(--rosu); }
.vies-atent { background: var(--galben-fundal); color: var(--galben); }
.insigna { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; margin-left: .35rem; border-radius: 999px; background: #e34948; color: #fff; font-size: .75rem; line-height: 1.3rem; text-align: center; font-weight: 800; vertical-align: 1px; }
.meniu a.activ .insigna { background: var(--rosu); color: #fff; }
/* v4: poze WhatsApp */
.wa-lista { display: grid; gap: .8rem; }
.wa-card { padding: .9rem 1rem; }
.wa-sus { display: flex; gap: .9rem; align-items: flex-start; }
.wa-poza { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; background: #eef2f7; flex: none; display: block; }
.wa-text { display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.wa-info { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.wa-msg { font-style: italic; }
.wa-actiuni { margin-top: .6rem; align-items: center; }
.wa-mini { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.pasi { margin: .3rem 0 .6rem 1.2rem; padding: 0; }
.pasi li { margin: .3rem 0; }
code { background: #eef2f7; padding: .15rem .4rem; border-radius: 4px; word-break: break-all; }
.cascada { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.cascada select { flex: 1 1 220px; }
.cascada-sageata { font-size: 1.4rem; color: var(--albastru); font-weight: 700; }
.partener-card { margin-top: .6rem; padding: .7rem .9rem; border-radius: var(--raza); background: var(--albastru-deschis); }
.sugestii-cutie { position: relative; }
.sugestii { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid #c9d3df; border-radius: var(--raza); box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 380px; overflow: auto; }
.sugestie { display: block; padding: .55rem .8rem; border-bottom: 1px solid #eef2f7; color: inherit; text-decoration: none; }
.sugestie:hover, .sugestie:focus { background: var(--albastru-deschis); }
.sugestie-tot { padding: .5rem .8rem; }
tr.intarziata td:first-child { box-shadow: inset 4px 0 0 #e34948; }

/* pondere intern / extern */
.pond-rand { display: grid; grid-template-columns: 130px 1fr 190px; gap: .8rem; align-items: center; margin: .45rem 0; }
.pond-et { font-weight: 600; }
.pond-bara { display: flex; height: 28px; border-radius: 6px; overflow: hidden; background: var(--fundal-2, #eef1f5); }
.pond-bara > div { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .85rem; font-weight: 600; min-width: 2px; }
.pond-nr { line-height: 1.3; }
@media (max-width: 700px) { .pond-rand { grid-template-columns: 1fr; gap: .2rem; } }

.banda-versiune { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 60; background: #1f4e79; color: #fff; padding: .7rem 1rem; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; max-width: calc(100% - 32px); }
.banda-versiune .btn { background: #fff; color: #1f4e79; padding: .35rem .8rem; }
.banda-versiune .mic { color: #dce6f0; }

.ctc-fisa { background: var(--fundal-2, #f3f6fa); border-radius: 8px; padding: .6rem .8rem; margin: .4rem 0 .8rem; font-size: .92rem; display: grid; gap: .15rem; word-break: break-word; }

.drepturi { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .2rem .9rem; }
.drepturi label.na { margin: .15rem 0; }
.drepturi .drept-stoc { color: #6b4b00; }

.vede-cutie { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .4rem 1.4rem; background: #f6f8fb; border-radius: 8px; padding: .6rem .8rem; }
.vede-cutie label.na { display: inline-flex; margin: .15rem 1rem .15rem 0; }

/* tabel cu linii, ca în Excel: chenar pe fiecare celulă, rânduri alternative, capul fix la derulare */
.tabel-cutie.lista-comenzi { max-height: calc(100vh - 150px); }
table.tabel-linii { border-collapse: separate; border-spacing: 0; }
table.tabel-linii th, table.tabel-linii td { border-right: 1px solid #d5dbe3; border-bottom: 1px solid #d5dbe3; }
table.tabel-linii tr > :last-child { border-right: 0; }
table.tabel-linii thead { position: sticky; top: 0; z-index: 3; }
table.tabel-linii thead th { position: static; background: #e6ecf3; border-bottom: 1px solid #c3ccd8; }
table.tabel-linii thead tr.rand-filtre th { background: #f1f4f8; padding: .3rem .35rem; border-bottom: 2px solid #b8c3d1; text-transform: none; letter-spacing: 0; font-weight: 400; }
table.tabel-linii tbody tr:nth-child(even) { background: #f5f8fb; }
table.tabel-linii tbody tr.clic:hover { background: #e8f1fb; }
table.tabel-linii tbody tr.fara-stoc td:first-child { box-shadow: inset 4px 0 0 #e8a33a; }
table.tabel-linii tbody tr.intarziata td:first-child { box-shadow: inset 4px 0 0 #e34948; }
.filtru-col { width: 100%; min-width: 84px; min-height: 32px !important; padding: .2rem .4rem !important; font-size: .85rem !important; border: 1px solid #c9d2dd; border-radius: 6px; background: #fff; }
.filtru-col.activ { border-color: var(--albastru, #1f4e79); }
.filtru-x { border: 0; background: #1f4e79; color: #fff; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-weight: 700; }
.rand-rezultat { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: space-between; margin: .4rem 0; }
.rand-rezultat p { margin: 0; }
.eticheta-stare.mica { font-size: .7rem; padding: .05rem .4rem; margin-top: .2rem; }

/* hartă și traseu livrări */
.harta-cutie { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1rem; margin-top: 1rem; align-items: start; }
.harta { height: 72vh; min-height: 420px; border-radius: 12px; border: 1px solid var(--linie); background: #e9eef3; z-index: 0; }
.harta-panou { max-height: 72vh; overflow: auto; display: grid; gap: .8rem; }
.traseu-card { background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: .8rem 1rem; }
.traseu-cap { display: flex; align-items: center; gap: .4rem; }
.buline { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
ol.opriri-harta { margin: 0 0 .6rem; padding-left: 1.4rem; }
ol.opriri-harta li { padding: .35rem 0; border-bottom: 1px solid #edf0f4; }
ol.opriri-harta li > * { vertical-align: top; }
ol.opriri-harta li { display: list-item; }
ol.opriri-harta li > div:first-child { display: inline-block; width: calc(100% - 44px); }
.sus-jos { display: inline-flex; flex-direction: column; float: right; }
.sus-jos .link-btn { font-size: .8rem; line-height: 1; padding: .1rem .3rem; color: var(--albastru, #1f4e79); }
.sus-jos .link-btn[disabled] { opacity: .25; cursor: default; }
.pin { width: 28px; height: 28px; border-radius: 50%; color: #fff; font: 700 13px/28px Arial, sans-serif; text-align: center; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.pin-start { border-radius: 6px; font-size: 16px; }
.pin-aprox { border: 3px dashed #f59e0b; }
.pin-inc { width: 22px; height: 22px; font: 700 13px/22px Arial, sans-serif; border-radius: 4px; }
@media (max-width: 900px) { .harta-cutie { grid-template-columns: 1fr; } .harta { height: 55vh; } .harta-panou { max-height: none; } }
@media print { .harta-cutie { display: block; } }
#hSchimbaPlecare { color: var(--albastru, #1f4e79); }

/* ---- pagina șoferului (telefon) ---- */
.sofer-pagina { max-width: 760px; margin: 0 auto; }
.sofer-sapt { display: flex; align-items: center; gap: .6rem; }
.sofer-sumar { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .9rem 0; text-align: center; }
.sofer-sumar div { background: var(--fundal, #f4f6f9); border-radius: 10px; padding: .55rem .3rem; }
.sofer-sumar b { display: block; font-size: 1.25rem; }
.sofer-sumar span { font-size: .85rem; color: var(--text-slab, #5b6b7d); }
.sofer-oprire { padding: 1rem; }
.sofer-oprire.gata { opacity: .65; }
.sofer-cap { display: flex; gap: .7rem; align-items: center; }
.sofer-nume { font-weight: 700; font-size: 1.15rem; }
.sofer-adresa { margin: .6rem 0 .3rem; font-size: 1.05rem; }
.sofer-produs { margin: .3rem 0; }
.sofer-obs { margin: .4rem 0; padding: .45rem .6rem; background: #fff8e6; border-radius: 8px; font-size: .95rem; }
.sofer-bani { margin: .5rem 0; padding: .5rem .7rem; border-radius: 8px; font-size: 1.05rem; }
.sofer-bani.de-incasat { background: var(--galben-fundal, #fff4d6); color: #7a4a00; }
.sofer-bani.achitat { background: #e7f6ec; color: #1d6b36; }
.sofer-butoane { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .6rem; }
.sofer-butoane .btn { flex: 1 1 auto; min-height: 48px; }
@media (max-width: 520px) { .sofer-butoane .btn { flex: 1 1 45%; } }

/* intrare: filele „Cod / e-mail” și „Cod QR” (8.0) */
.file-login { display: flex; gap: .3rem; margin: 0 0 1rem; border-bottom: 2px solid #e3e7ee; }
.file-login button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; padding: .55rem .4rem; font: inherit; font-weight: 700; color: #5b6675; cursor: pointer; }
.file-login button.activ { color: var(--albastru); border-bottom-color: var(--albastru); }
/* 9.0.0-e2a: dreptul bifat / debifat față de tipul de cont (rol) */
.drepturi .drept-exceptie { font-weight: 700; text-decoration: underline dotted; }
