:root { --fundal: #f1f5f9; --card: #fff; --text: #1f2937; --slab: #6b7280; --linie: #e2e8f0; --albastru: #1d4ed8; --albastru-d: #dbeafe;
        --verde: #15803d; --verde-d: #dcfce7; --rosu: #b91c1c; --rosu-d: #fee2e2; --galben: #854d0e; --galben-d: #fef9c3; --sidebar: #0f172a; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--fundal); }
a { color: var(--albastru); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h1 small, h2 small { font-size: 13px; font-weight: 400; color: var(--slab); margin-left: 8px; }
h2 { font-size: 16px; margin: 0 0 10px; }
.slab { color: var(--slab); }
.mic { font-size: 12px; }
.sus { display: flex; align-items: center; gap: 28px; background: var(--sidebar); color: #fff; padding: 10px 28px; }
.sus a { color: #cbd5e1; }
.sus .marca { color: #fff; font-weight: 700; font-size: 16px; }
.sus .marca small { font-weight: 400; color: #94a3b8; margin-left: 6px; }
.sus nav { display: flex; gap: 18px; flex: 1; }
.sus .cine { display: flex; gap: 14px; align-items: center; color: #cbd5e1; }
.sus .legatura { color: #93c5fd; }
main { padding: 22px 28px 40px; max-width: 1700px; margin: 0 auto; }
main.centru { display: flex; flex-direction: column; align-items: center; padding-top: 7vh; }
.card { background: var(--card); border: 1px solid var(--linie); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card.ingust { width: 400px; max-width: 100%; }
.antet { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 14px; }
.rand { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
label { display: block; font-size: 12px; color: var(--slab); margin: 12px 0 0; }
label.inline { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
input, select { font: inherit; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: var(--text); }
label > input, label > select { display: block; width: 100%; margin-top: 4px; }
label.inline > input { width: auto; margin: 0; }
input[type=search] { width: 360px; max-width: 100%; }
input.cod { font-size: 24px; letter-spacing: 6px; text-align: center; }
button, .buton { font: inherit; padding: 8px 14px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: var(--text); cursor: pointer; display: inline-block; }
button:hover, .buton:hover { background: #f8fafc; text-decoration: none; }
button.principal { background: var(--albastru); border-color: var(--albastru); color: #fff; font-weight: 600; }
button.principal:hover { background: #1e40af; }
button.lat { width: 100%; margin-top: 16px; padding: 10px; }
button.legatura { border: 0; background: none; padding: 0; color: var(--albastru); margin-top: 12px; }
.sus button.legatura { margin: 0; }
.mesaj { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.mesaj.eroare { background: var(--rosu-d); border-color: #fca5a5; color: var(--rosu); font-weight: 600; }
.mesaj.ok { background: var(--verde-d); border-color: #86efac; color: var(--verde); }
main.centru .mesaj { width: 400px; max-width: 100%; }
.pasi { padding-left: 18px; color: var(--text); font-size: 13px; }
.pasi li { margin-bottom: 4px; }
.qr-cutie { text-align: center; margin: 10px 0; }
.qr { width: 220px; height: 220px; }
code { font: 13px Consolas, monospace; letter-spacing: 1px; }
table.lista { border-collapse: collapse; width: 100%; font-size: 13px; }
table.lista th { background: #f8fafc; color: var(--slab); font-weight: 600; text-align: center; padding: 7px 9px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; }
table.lista td { padding: 6px 9px; border-bottom: 1px solid #f1f5f9; text-align: center; white-space: nowrap; }
table.lista td:first-child, table.lista th:first-child, .stanga { text-align: left !important; }
table.lista td.stanga { white-space: normal; }
.dreapta-t { text-align: right !important; font-variant-numeric: tabular-nums; }
table.lista tbody tr:hover { background: #f8fafc; }
table.cifre-tabel td { text-align: right; font-variant-numeric: tabular-nums; }
table.cifre-tabel th { border-left: 1px solid var(--linie); }
tr.clasa td, tr.total td, tr.sold td { font-weight: 700; background: #f8fafc; }
tr.total td { border-top: 2px solid #94a3b8; }
tr.analitic td { color: #475569; }
tr.analitic td:first-child { padding-left: 22px; }
tr.zi td { background: #f8fafc; font-weight: 600; text-align: left; }
tr.ciorna td { color: var(--galben); }
.derulare { overflow: auto; max-height: calc(100vh - 290px); border: 1px solid var(--linie); border-radius: 8px; }
.libera { color: var(--verde); }
.ocupata { color: var(--rosu); font-weight: 600; }
.eticheta { font-size: 11px; background: var(--galben-d); color: var(--galben); padding: 1px 6px; border-radius: 4px; }
.luna { display: flex; align-items: center; gap: 10px; }
.luna b { min-width: 130px; text-align: center; }
nav.file { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 16px; }
nav.file a { padding: 9px 14px; color: var(--slab); border-bottom: 2px solid transparent; }
nav.file a.activ { color: var(--albastru); border-bottom-color: var(--albastru); font-weight: 600; }
nav.file a.dreapta { margin-left: auto; color: var(--rosu); }
.cifre { display: flex; gap: 14px; margin-bottom: 12px; }
.cifre div { background: var(--albastru-d); border-radius: 8px; padding: 10px 16px; min-width: 170px; }
.cifre div.atentie { background: var(--galben-d); }
.cifre b { display: block; font-size: 22px; }
.cifre span { color: var(--slab); font-size: 12px; }
.ok-text { color: var(--verde); font-weight: 600; }
.atentie-text { color: var(--galben); font-weight: 600; }
.mesaj.atentie { background: var(--galben-d); border-color: #fde047; color: var(--galben); }
.mesaj.info { background: var(--albastru-d); border-color: #93c5fd; color: var(--albastru); }
.mesaj ul { margin: 6px 0; padding-left: 20px; font-weight: 400; }
a.buton.principal { background: var(--albastru); border-color: var(--albastru); color: #fff; font-weight: 600; }
.filtre { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 7px; overflow: hidden; }
.filtre a { padding: 7px 11px; color: var(--slab); border-right: 1px solid #e2e8f0; }
.filtre a:last-child { border-right: 0; }
.filtre a.activ { background: var(--albastru-d); color: var(--albastru); font-weight: 600; }
tr[data-href] { cursor: pointer; }
tr.stornata td, tr.stornata a { color: #9ca3af; }
tr.storno td, tr.storno a { color: var(--rosu); }
tr.ciorna a { color: var(--galben); }
.rand-camp { display: flex; gap: 14px; margin: 6px 0 14px; }
.rand-camp label { margin: 0; }
.rand-camp label.lat, td.lat { flex: 1; width: 100%; }
table.editare td { padding: 3px 4px; border: 0; vertical-align: top; text-align: left; white-space: normal; }
table.editare input { width: 100%; padding: 6px 8px; }
table.editare th { white-space: nowrap; }
table.editare td:nth-child(-n+2) input { min-width: 96px; }
table.editare td:nth-child(3) input { min-width: 108px; }
table.editare td.lat input { min-width: 180px; }
form#nota { overflow-x: auto; }
table.editare input.suma { text-align: right; font-variant-numeric: tabular-nums; }
table.editare input[readonly], .rand-camp input[readonly] { background: #f8fafc; color: #475569; }
table.editare tbody tr:hover { background: none; }
.indiciu { font-size: 11px; color: var(--slab); min-height: 14px; padding: 1px 2px; }
.indiciu.rau { color: var(--rosu); font-weight: 600; }
.rand.jos { justify-content: flex-start; margin-top: 12px; }
.rand.stanga-rand { justify-content: flex-start; }
.spatiu { flex: 1; }
button.pericol { color: var(--rosu); border-color: #fca5a5; }
/* aceleași culori ca aplicația de pe calculator (tema.py) */
:root { --sidebar: #1e2a3e; --sidebar-hover: #2a3a55; --sidebar-activ: #2563eb; --sidebar-text: #dce4f0; --sidebar-grup: #a3b1c8;
        --fundal: #f3f5f9; --linie: #e3e7ee; --albastru: #2563eb; --albastru-d: #eff6ff; --galben: #b45309; --galben-d: #fef3c7; }
main.cu-meniu { display: flex; align-items: flex-start; gap: 0; padding: 0; max-width: none; }
.meniu { width: 250px; flex: none; background: var(--sidebar); color: var(--sidebar-text); min-height: calc(100vh - 44px); padding: 10px 0 30px;
         position: sticky; top: 0; max-height: 100vh; overflow-y: auto; font-size: 13px; }
.meniu a.element { display: block; padding: 6px 18px 6px 26px; color: var(--sidebar-text); }
.meniu > a.element { padding-left: 18px; font-weight: 600; margin-bottom: 6px; }
.meniu a.element:hover { background: var(--sidebar-hover); text-decoration: none; }
.meniu a.element.activ { background: var(--sidebar-activ); color: #fff; }
.meniu a.element.gri { color: #64748b; }
.meniu a.element.nefacut:not(.activ) { color: #8696b0; }
.meniu a.element.nefacut::after { content: " ·"; }
.meniu summary { padding: 8px 18px; color: var(--sidebar-grup); font-size: 11px; font-weight: 700; letter-spacing: .6px; cursor: pointer; list-style: none; }
.meniu summary::before { content: "▸ "; }
.meniu details[open] > summary::before { content: "▾ "; }
.meniu summary::-webkit-details-marker { display: none; }
.meniu details.inactiv summary { color: #64748b; }
.continut { flex: 1; min-width: 0; padding: 20px 26px 40px; }
.antet, .sus, nav.file { flex-wrap: wrap; }
@media (max-width: 900px) {
  main.cu-meniu { display: block; }
  .meniu { width: auto; min-height: 0; position: static; max-height: 38vh; padding: 6px 0; }
  .continut { padding: 14px 12px 30px; }
}
.rand h2 { margin: 0; }
.rand { margin-bottom: 10px; }
@media (max-width: 900px) {
  main { padding: 14px 12px 30px; }
  .sus { padding: 8px 12px; gap: 12px; }
  .card { padding: 14px 12px; }
  nav.file a { padding: 7px 9px; }
  .rand-camp { flex-wrap: wrap; }
  .derulare { max-height: none; }
  input[type=search] { width: 100%; }
}
[hidden] { display: none !important; }
/* facturi: doar conturile și suma cu text albastru, pe același fundal (Marius, 16.11.2026) */
.c-ciorna, .c-validata { color: #1d4ed8; }
.c-nesigur { color: #c2410c; font-weight: 600; }
.c-fara { color: #9ca3af; }
table.facturi tr.credit td:not(.nota-col):not(.obs), table.facturi tr.credit a { color: var(--rosu); }
table.facturi tr.validata td:not(.nota-col):not(.obs) { color: var(--verde); }
table.facturi th.nota-col { color: #1d4ed8; }
table.facturi td.obs { white-space: normal; min-width: 220px; font-size: 12px; }
tr.linie-nota td { background: #f8fafc; }
.legenda { color: var(--slab); font-size: 12px; }
.legenda b { margin-left: 10px; }
.total-jos { text-align: right; font-weight: 700; margin: 10px 4px 0; }
.buton.mic { padding: 2px 8px; font-size: 12px; margin-left: 6px; }
button.desface { margin: 0; }
input.scurt { width: 320px; max-width: 100%; }
label.bifa { color: var(--text); font-size: 13px; margin-top: 10px; }
label.bifa input { width: auto; }
.comutator { margin-bottom: 10px; }
/* casă și note din extras: aceleași culori ca pe calculator */
tr.validata-rand td, tr.ex-validata td { color: var(--verde); }
tr.lipsa td, tr.ex-verificat td { background: #fef3c7; }
tr.ex-probabil td { background: #fffbeb; }
tr.ex-depasire td { background: #fecaca; color: #991b1b; }
tr.ex-avans td { background: #e0f2fe; color: #075985; }
tr.rau td { color: var(--rosu); font-weight: 600; }
.derulare.scurt { max-height: 42vh; }
td.lat-text { white-space: normal !important; min-width: 220px; }
.sold-extras { font-weight: 600; margin: 4px 0; }
.rosu { color: var(--rosu) !important; }
input[type=file] { padding: 5px; }

/* asistentul de închidere a lunii */
.luni { display: flex; flex-wrap: wrap; gap: 6px; }
.luni a { display: block; width: 104px; padding: 9px 6px; text-align: center; background: #f1f5f9; border-radius: 6px; color: var(--text); border: 1px solid transparent; }
.luni a:hover { text-decoration: none; border-color: #cbd5e1; }
.luni a b { display: block; font-weight: 400; }
.luni a span { font-size: 12px; color: var(--slab); }
.luni a.inchisa { background: #dcfce7; }
.luni a.ciorne { background: #fef3c7; }
.luni a.lucru { border-color: #1f2937; }
.luni a.lucru:not(.inchisa) { background: #dbeafe; }
.luni a.lucru b { font-weight: 700; }
.pasi-inchidere { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 4px 30px; margin: 12px 0; }
.pasi-inchidere span { display: inline-block; min-width: 220px; }
.st-gri { color: #9ca3af; } .st-galben { color: var(--galben); } .st-verde { color: var(--verde); }
.plafon-ok { color: var(--verde); font-weight: 600; margin: 4px 0; }
.plafon-avertizare { color: var(--galben); font-weight: 600; margin: 4px 0; }
.plafon-blocant { color: var(--rosu); font-weight: 600; margin: 4px 0; }
button.gri-text { color: #9ca3af; }
label.lat-camp input { min-width: 280px; }
/* panoul principal */
.panou-cifre div { flex: 1; min-width: 150px; }
.panou-cifre b small { font-size: 12px; font-weight: 400; color: var(--slab); }
.panou-cifre .rosu-c { background: #fee2e2; } .panou-cifre .mov-c { background: #ede9fe; } .panou-cifre .verde-c { background: #dcfce7; }
.filtru-buton { display: inline-block; padding: 4px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; color: var(--text); font-weight: 600; font-size: 13px; }
.filtru-buton:hover { text-decoration: none; background: #f8fafc; }
.filtru-buton.activ { background: var(--albastru); border-color: var(--albastru); color: #fff; }
.doua-coloane { display: grid; grid-template-columns: 3fr 1fr; gap: 16px; align-items: start; }
.doua-coloane .card { margin-bottom: 16px; }
tr.port-sel td { background: #dbeafe; }
tr.blocant td, tr.firma-blocant td, tr.firma-blocant a { color: var(--rosu); }
tr.firma-anaf td { color: #1565c0; }
.decl-rand { margin: 2px 0; }
@media (max-width: 900px) { .doua-coloane { grid-template-columns: 1fr; } }
.rapide { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; margin-right: 16px; }
