/* Ecotis Comenzi — mobile first */
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
       background:#f2f4f7; color:#1a2733; font-size:16px; }
main { max-width: 900px; margin: 0 auto; padding: 12px; }

.topbar { background:#0b5e3b; color:#fff; display:flex; flex-direction:column; gap:9px;
          padding:10px 12px; position:sticky; top:0; z-index:50; }
.topbar-sus { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.topbar .brand { font-weight:800; letter-spacing:1px; font-size:20px; }
.userbox { font-size:13px; color:#bfe3d2; white-space:nowrap; }
.userbox a { color:#fff; margin-left:10px; font-weight:600; text-decoration:underline; }

/* butoane mari de acțiune: Comandă (verde) + Ofertă (portocaliu) */
.nav-actiuni { display:flex; gap:10px; }
.nav-btn { flex:1; display:flex; align-items:center; justify-content:center; gap:7px;
           padding:13px 10px; border-radius:12px; font-weight:800; font-size:16px;
           text-decoration:none; color:#fff; box-shadow:0 2px 5px rgba(0,0,0,.18);
           border:2px solid transparent; }
.nav-plus { font-size:20px; line-height:1; font-weight:800; }
.nav-comanda { background:#15a34a; }
.nav-comanda:active { background:#118040; transform:translateY(1px); }
.nav-oferta  { background:#e6881c; }
.nav-oferta:active  { background:#c9740f; transform:translateY(1px); }
.nav-btn.on { border-color:#fff; box-shadow:0 0 0 2px rgba(255,255,255,.35), 0 2px 5px rgba(0,0,0,.18); }

/* file secundare: Documente / Clienți / Produse / Utilizatori */
.nav-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.nav-tab { color:#eaf5ef; text-decoration:none; padding:9px 14px; border-radius:9px;
           font-weight:600; font-size:14px; background:rgba(255,255,255,.10); }
.nav-tab.on { background:#fff; color:#0b5e3b; }
.nav-tab:active { background:rgba(255,255,255,.22); }

.badge { background:#e53935; color:#fff; border-radius:10px; padding:1px 7px; font-size:12px; }

/* pe ecrane late, butoanele de acțiune nu se mai întind pe tot rândul */
@media (min-width:640px){
  .nav-actiuni { justify-content:flex-start; }
  .nav-btn { flex:0 0 auto; min-width:150px; }
}

h1 { font-size:20px; margin:10px 0; }
h2 { font-size:16px; margin:14px 0 6px; }

.card { background:#fff; border-radius:12px; padding:14px; margin-bottom:12px;
        box-shadow:0 1px 3px rgba(0,0,0,.08); }

label { display:block; font-size:13px; font-weight:600; color:#4a5a68; margin:10px 0 4px; }
input, select, textarea { width:100%; padding:11px 12px; border:1px solid #c8d2dc; border-radius:8px;
        font-size:16px; background:#fff; }
input:focus, select:focus, textarea:focus { outline:2px solid #0b5e3b33; border-color:#0b5e3b; }
.oblig::after { content:" *"; color:#e53935; }

.btn { display:inline-block; background:#0b5e3b; color:#fff; border:0; border-radius:10px;
       padding:12px 18px; font-size:16px; font-weight:700; cursor:pointer; text-decoration:none; text-align:center; }
.btn:active { background:#094d30; }
.btn.sec { background:#e8eef4; color:#1a2733; }
.btn.rosu { background:#c62828; }
.btn.mic { padding:7px 12px; font-size:14px; border-radius:8px; }
.btn.wa { background:#25d366; }
.btn-block { display:block; width:100%; margin-top:10px; }

table { width:100%; border-collapse:collapse; background:#fff; }
th, td { text-align:left; padding:9px 8px; border-bottom:1px solid #e6ebf0; font-size:14px; vertical-align:middle; }
th { background:#f0f3f6; font-size:12px; text-transform:uppercase; color:#5a6a78; }
td.num, th.num { text-align:right; white-space:nowrap; }
.tabel-scroll { overflow-x:auto; }

.status { display:inline-block; padding:3px 10px; border-radius:12px; font-size:12px; font-weight:700; white-space:nowrap; }
.st-nelivrata { background:#fff3cd; color:#8a6d00; }
.st-livrata   { background:#d7f5e2; color:#0b5e3b; }
.st-neplatita { background:#fde2e1; color:#b3261e; }
.st-partial   { background:#ffe8cc; color:#a05a00; }
.st-platita   { background:#d7f5e2; color:#0b5e3b; }
.st-custodie  { background:#e3e8ff; color:#3746a0; }

tr.alerta td { background:#fdecea; }
.alerta-banner { background:#c62828; color:#fff; border-radius:10px; padding:10px 14px;
                 margin-bottom:12px; font-weight:600; }
.alerta-banner a { color:#fff; }

.bara-noi { position:fixed; left:0; right:0; bottom:0; z-index:60; cursor:pointer;
            background:#0b5e3b; color:#fff; text-align:center; font-weight:700;
            padding:14px; box-shadow:0 -2px 10px rgba(0,0,0,.2); }
.bara-noi:active { background:#094d30; }

/* puncte de lucru / livrare */
.puncte { display:flex; gap:6px; flex-wrap:wrap; margin-top:4px; }
.punct-btn { display:inline-flex; align-items:center; gap:6px; border:1px solid #c8d2dc; background:#fff;
             color:#1a2733; border-radius:20px; padding:8px 14px; font-size:14px; font-weight:600; cursor:pointer; }
.punct-btn.on { background:#0b5e3b; color:#fff; border-color:#0b5e3b; }
.punct-btn.punct-add { border-style:dashed; color:#0b5e3b; }
.punct-del { font-size:11px; opacity:.6; padding:0 2px; }
.punct-del:hover { opacity:1; color:#ffd5d5; }

.segment { display:flex; gap:0; background:#e8eef4; border-radius:10px; padding:4px; }
.segment .seg { flex:1; border:0; background:none; padding:11px 8px; border-radius:8px;
                font-size:15px; font-weight:700; color:#5a6a78; cursor:pointer; }
.segment .seg.on { background:#0b5e3b; color:#fff; box-shadow:0 1px 3px rgba(0,0,0,.15); }

.sugestii { position:relative; }
.sugestii-lista { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #c8d2dc;
        border-radius:0 0 10px 10px; z-index:40; max-height:260px; overflow-y:auto;
        box-shadow:0 6px 14px rgba(0,0,0,.15); }
.sugestii-lista div { padding:10px 12px; border-bottom:1px solid #eef2f5; cursor:pointer; }
.sugestii-lista div:active, .sugestii-lista div:hover { background:#eef7f2; }
.sugestii-lista small { color:#71828f; }

.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
@media (max-width:520px){ .grid2 { grid-template-columns:1fr; } }
.total-mare { font-size:22px; font-weight:800; text-align:right; }
.muted { color:#71828f; font-size:13px; }
.eroare { background:#fde2e1; color:#b3261e; border-radius:8px; padding:10px 12px; margin:10px 0; }
.succes { background:#d7f5e2; color:#0b5e3b; border-radius:8px; padding:10px 12px; margin:10px 0; }

.item-rand { display:grid; grid-template-columns: 1fr 74px 92px 90px 34px; gap:6px; align-items:center;
             padding:6px 0; border-bottom:1px solid #eef2f5; }
.item-rand input { padding:8px; font-size:15px; }
.item-rand .sterge { background:none; border:0; color:#c62828; font-size:20px; cursor:pointer; }
.item-prod { display:flex; align-items:center; gap:8px; min-width:0; }
.item-prod > span { min-width:0; }
.item-poza { width:38px; height:38px; object-fit:contain; border-radius:6px; background:#fff;
             border:1px solid #eef2f5; flex-shrink:0; }
.item-cap { font-size:11px; text-transform:uppercase; color:#5a6a78; font-weight:700; }
@media (max-width:520px){
  .item-rand { grid-template-columns: 1fr 56px 72px 66px 26px; }
  .item-poza { width:32px; height:32px; }
}

/* Galerie produse cu poze */
.galerie { display:grid; grid-template-columns:repeat(auto-fill, minmax(104px,1fr)); gap:8px; margin-top:8px; }
.prod-card { position:relative; border:1px solid #dce3ea; border-radius:10px; padding:8px 6px 6px;
             text-align:center; cursor:pointer; background:#fff; transition:border-color .1s, box-shadow .1s;
             user-select:none; }
.prod-card:active { transform:scale(.97); }
.prod-card.in-cos { border-color:#0b5e3b; box-shadow:0 0 0 2px #0b5e3b33; background:#f4faf6; }
.prod-poza { width:100%; height:74px; object-fit:contain; }
.prod-poza.fara-poza { display:flex; align-items:center; justify-content:center; color:#aeb8c2; font-size:12px;
                       background:#f5f7f9; border-radius:6px; }
.prod-nume { font-size:12px; font-weight:600; line-height:1.2; margin-top:5px; color:#1a2733;
             display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:29px; }
.prod-pret { font-size:12px; color:#0b5e3b; font-weight:700; margin-top:3px; }
.prod-pachet { font-size:10.5px; color:#71828f; margin-top:2px; line-height:1.2; }
.prod-plus { position:absolute; top:4px; right:4px; width:24px; height:24px; border-radius:50%;
             background:#0b5e3b; color:#fff; font-size:18px; line-height:24px; font-weight:700; }
.prod-bifa { position:absolute; top:4px; right:4px; min-width:24px; height:24px; border-radius:12px;
             background:#0b5e3b; color:#fff; font-size:13px; line-height:24px; font-weight:700; padding:0 6px; }
.prod-neg { position:absolute; top:4px; left:4px; background:#a05a00; color:#fff; font-size:10px;
            font-weight:700; padding:2px 6px; border-radius:8px; }

/* Oferta / print */
.oferta-doc { background:#fff; padding:24px; border-radius:12px; }
.oferta-cap { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
              border-bottom:3px solid #0b5e3b; padding-bottom:12px; margin-bottom:16px; }
.oferta-cap .logo { font-size:26px; font-weight:900; color:#0b5e3b; letter-spacing:2px; }
@media print {
  .no-print { display:none !important; }
  body { background:#fff; }
  main { max-width:none; padding:0; }
  .oferta-doc { box-shadow:none; border-radius:0; padding:0; }
}
