/* Aspect inspirat din Pluriva: bara verde, meniu arbore in stanga, grile dense */
:root {
  --verde: #8dc21f; --verde-inchis: #5f8f0e; --albastru: #1f4e8c; --activ: #6cc4f2;
  --gri: #f2f3f5; --gri2: #e6e9ed; --linie: #d5d9de; --text: #222; --text2: #666;
  --rosu: #c00000; --portocaliu: #fce4d6; --verde-deschis: #e2efda; --albastru-deschis: #ddebf7;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13px/1.35 Tahoma, Arial, sans-serif; color: var(--text); background: #fff; }
a { color: var(--albastru); text-decoration: none; }
a:hover { text-decoration: underline; }

/* bara de sus */
.top { display: flex; align-items: center; height: 48px; border-bottom: 1px solid var(--linie); background: #fff;
       position: sticky; top: 0; z-index: 10; }
.top .burger { width: 48px; text-align: center; font-size: 26px; cursor: pointer; user-select: none; }
.top .cauta { width: 165px; height: 30px; border: 1px solid #ccc; padding: 0 8px; font-size: 13px; margin-right: 12px; }
.top .scut { width: 30px; height: 30px; margin-right: 14px; }
.top .firma { flex: 1; background: var(--verde); height: 36px; display: flex; align-items: center; padding: 0 10px;
              font-weight: bold; font-size: 15px; border-radius: 2px; min-width: 0; white-space: nowrap; overflow: hidden; }
.top .firma .sep { border-left: 1px solid #333; margin: 0 8px; height: 18px; }
.top .icoane { display: flex; gap: 14px; padding: 0 14px; font-size: 20px; color: #2a8fd6; }
.top .user { border: 1px solid #ccc; height: 36px; display: flex; align-items: center; padding: 0 10px;
             font-weight: bold; margin-right: 10px; position: relative; cursor: pointer; white-space: nowrap; }
.top .user .meniu-user { display: none; position: absolute; right: 0; top: 35px; background: #fff; border: 1px solid #ccc;
                         min-width: 160px; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.top .user:hover .meniu-user, .top .user:focus-within .meniu-user { display: block; }
.top .user .meniu-user a { display: block; padding: 8px 12px; font-weight: normal; color: var(--text); }

/* structura */
.cadru { display: flex; min-height: calc(100vh - 48px); }
.stanga { width: 200px; flex-shrink: 0; border-right: 1px solid var(--linie); background: #fff; padding: 8px 0;
          display: flex; flex-direction: column; }
.stanga .n1 { font-weight: bold; font-size: 14px; padding: 7px 8px; color: #222; display: block; }
/* meniu acordeon: titlurile .n1 deschid/inchid sectiunea lor (o singura sectiune deschisa) */
.stanga .n1.acord { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between;
                    border-top: 1px solid #eef0f2; }
.stanga .n1.acord:first-child { border-top: 0; }
.stanga .n1.acord:hover { background: #f2f8fc; }
.stanga .n1.acord::after { content: "\25B8"; font-size: 11px; color: #888; transition: transform .15s; margin-right: 4px; }
.stanga .n1.acord.deschis::after { transform: rotate(90deg); }
.stanga .acord-corp { overflow: hidden; display: none; padding-bottom: 4px; }
.stanga .acord-corp.deschis { display: block; }
.stanga .n2 { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 28px; font-weight: bold; color: #222; font-size: 13.5px; }
.stanga .n2 .ic { width: 20px; text-align: center; }
/* submeniuri acordeon (04.11.2026) */
.stanga .n2.acord2 { cursor: pointer; user-select: none; border-radius: 4px; }
.stanga .n2.acord2:hover { background: #f2f8fc; }
.stanga .n2.acord2::after { content: "\25B8"; font-size: 10px; color: #999; margin-left: auto; margin-right: 6px; transition: transform .15s; }
.stanga .n2.acord2.deschis::after { transform: rotate(90deg); }
.stanga .acord2-corp { display: none; }
.stanga .acord2-corp.deschis { display: block; }
.stanga .n3 { display: block; padding: 5px 8px 5px 48px; color: #222; position: relative; margin: 1px 6px 1px 0; }
.stanga .n3::before { content: "•"; position: absolute; left: 38px; color: #777; }
.stanga .n3.activ { background: var(--activ); color: #111; }
.stanga .n3:hover { background: #e3f3fc; text-decoration: none; }
.stanga .n3.activ:hover { background: var(--activ); }
.stanga .logo { margin-top: auto; padding: 12px 10px 6px; font-size: 20px; color: #555; }
.stanga .logo b { color: var(--verde-inchis); }
.stanga .logo small { display: block; font-size: 9px; letter-spacing: .6px; color: #666; }
.continut { flex: 1; min-width: 0; padding: 0 8px 30px; background: #fff; }
.dreapta { width: 56px; flex-shrink: 0; border-left: 1px solid var(--linie); padding-top: 6px; display: flex; justify-content: center; }
.calendar { width: 42px; border: 1px solid #bbb; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.2); height: 48px; }
.calendar .l { background: #c9302c; color: #fff; font-size: 11px; font-weight: bold; padding: 2px 0; }
.calendar .z { font-size: 17px; font-weight: bold; padding: 3px 0; }

.pesmet { color: #333; font-size: 12px; padding: 10px 2px 4px; }
h1 { font-size: 15px; margin: 8px 2px 8px; }

/* bara de instrumente si filtre */
.instr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--gri); border: 1px solid var(--gri2);
         padding: 6px; }
.btn { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid #c7ccd1;
       background: #fff; color: #222; font: bold 12.5px Tahoma, Arial, sans-serif; cursor: pointer; border-radius: 2px;
       white-space: nowrap; }
.btn:hover { background: #f4f9ff; text-decoration: none; }
.btn.verde { background: var(--verde); border-color: var(--verde-inchis); }
.btn.verde:hover { background: #9dd12e; }
.btn.albastru { background: #2a8fd6; border-color: #1c6ea8; color: #fff; }
.btn.rosu { color: var(--rosu); }
.btn.mic { height: 24px; padding: 0 7px; font-size: 11.5px; font-weight: normal; }
.btn[disabled] { opacity: .5; cursor: default; }
.filtre { background: var(--gri); border: 1px solid var(--gri2); border-top: 0; padding: 8px 10px;
          display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; }
.filtre label { display: inline-flex; align-items: center; gap: 8px; }
input[type=text], input[type=number], input[type=password], input[type=email], select, textarea {
  font: 13px Tahoma, Arial, sans-serif; height: 26px; border: 1px solid #aeb4ba; padding: 0 6px; background: #fff; }
textarea { height: auto; padding: 5px 6px; }
input.cant { width: 70px; text-align: right; }

/* grila */
.info-grila { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; color: #444; font-size: 12px; flex-wrap: wrap; gap: 6px; }
/* capul tabelului ramane sus la derulare (27.10, Sorin): grila se deruleaza in interiorul ei, cel mult cat ecranul
   sub bara de sus; th are deja position: sticky; top: 0 fata de .grila-wrap. Bara de derulare orizontala
   ramane astfel mereu vizibila la tabelele late. */
.grila-wrap { overflow: auto; max-height: calc(100vh - 60px); border: 1px solid var(--linie); }
table.grila { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.grila th { text-align: left; font-weight: bold; padding: 7px 6px; border-bottom: 1px solid #bfc5cb; background: #fff;
            vertical-align: bottom; white-space: nowrap; position: sticky; top: 0; z-index: 2;
            box-shadow: 0 1px 0 #bfc5cb; }
.grila th.nr, .grila td.nr { text-align: right; }
.grila td { padding: 6px 6px; border-bottom: 1px solid #edf0f2; vertical-align: top; }
.grila tbody tr:nth-child(even) td { background: #eef0f3; }
.grila tr.grup td { background: #c9dccb !important; font-weight: bold; font-size: 13px; padding: 7px 6px; }
.grila tr.total td { background: #e8f0e9 !important; font-weight: bold; }
.grila td.portocaliu { background: var(--portocaliu) !important; }
.grila td.verde { background: var(--verde-deschis) !important; }
.grila td.albastru { background: var(--albastru-deschis) !important; }
.grila td.produs { min-width: 260px; max-width: 460px; }
.grila td.comenzi { max-width: 170px; color: #555; font-size: 11.5px; }
.grila .gri { color: #888; }
.grila tr.fara td { color: #999; }
.grila tfoot td { font-weight: bold; background: #f7f7f7; border-top: 1px solid #bfc5cb; }

/* etichete / mesaje */
.eticheta { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: bold; white-space: nowrap; }
.e-ciorna { background: #fff3cd; color: #7a5b00; border: 1px solid #f0d97a; }
.e-trimisa { background: #d6eafc; color: #0d4d8c; border: 1px solid #9cc7ef; }
.e-receptionata { background: #d8f0d0; color: #276315; border: 1px solid #a3d693; }
.e-anulata { background: #eee; color: #777; border: 1px solid #ccc; text-decoration: line-through; }
.e-ok { background: #d8f0d0; color: #276315; }
.e-eroare { background: #f8d7da; color: #8a1c24; }
.e-in_curs { background: #d6eafc; color: #0d4d8c; }
.mesaj { margin: 8px 0; padding: 8px 12px; background: #eaf6e1; border: 1px solid #b9dd9f; }
.alerta { margin: 8px 0; padding: 9px 12px; background: #fdecea; border: 1px solid #f1a9a0; color: var(--rosu); font-weight: bold; }
.antet-rulare { padding: 8px 4px 2px; }
.antet-rulare .t { font-weight: bold; font-size: 14px; }
.antet-rulare .s { color: #595959; font-size: 11.5px; font-style: italic; margin-top: 3px; }
.antet-rulare .s.rosu { color: var(--rosu); font-style: normal; font-weight: bold; font-size: 12.5px; }

.kpi { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--linie); margin: 8px 0; }
.kpi div { flex: 1; min-width: 120px; padding: 7px 12px; border-right: 1px solid var(--linie); }
.kpi div:last-child { border-right: 0; }
.kpi b { display: block; font-size: 17px; }
.kpi span { color: var(--text2); font-size: 11.5px; }

.tabs { display: flex; gap: 2px; margin-top: 8px; border-bottom: 1px solid #bfc5cb; }
.tabs a { padding: 6px 14px; border: 1px solid #c7ccd1; border-bottom: 0; background: var(--gri); color: #333; font-weight: bold; font-size: 12.5px; }
.tabs a.activ { background: #fff; position: relative; top: 1px; }

.jurnal { background: #1e1e1e; color: #d8d8d8; font: 12px Consolas, monospace; padding: 10px; white-space: pre-wrap;
          max-height: 360px; overflow: auto; margin: 8px 0; }
.card { border: 1px solid var(--linie); padding: 10px 12px; margin: 8px 0; background: #fff; }
.card h3 { margin: 0 0 8px; font-size: 13.5px; }
.form-rand { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }
.pe-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #9cc7ef; border-top-color: #0d4d8c;
           border-radius: 50%; animation: rot 1s linear infinite; vertical-align: -2px; }
@keyframes rot { to { transform: rotate(360deg); } }

/* login */
.login-pag { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gri); }
.login { background: #fff; border: 1px solid var(--linie); width: 340px; }
.login .cap { background: var(--verde); padding: 12px 16px; font-weight: bold; font-size: 15px; }
.login form { padding: 16px; display: grid; gap: 10px; }
.login input { height: 32px; width: 100%; }

@media (max-width: 900px) {
  .stanga { position: fixed; left: -220px; top: 48px; bottom: 0; z-index: 20; transition: left .2s; }
  body.meniu-deschis .stanga { left: 0; box-shadow: 2px 0 8px rgba(0,0,0,.2); }
  .dreapta, .top .cauta, .top .icoane { display: none; }
  .pe-2 { grid-template-columns: 1fr; }
}
@media print {
  .top, .stanga, .dreapta, .instr, .filtre, .tabs, .nu-print { display: none !important; }
}
