:root {
  --fundal: #f6f7f9;
  --card: #ffffff;
  --text: #14181f;
  --text-slab: #5c6672;
  --linie: #e3e7ec;
  --accent: #1f5fa9;
  --accent-slab: #eaf1fa;
  --ok: #1a7f52;
  --ok-fundal: #e8f5ee;
  --atentie: #9a6207;
  --atentie-fundal: #fdf3e2;
  --problema: #a32d2d;
  --problema-fundal: #fceceb;
  --radius: 10px;
  --umbra: 0 1px 2px rgba(20, 24, 31, .06), 0 1px 8px rgba(20, 24, 31, .04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--fundal);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* --- antet --- */
header.sus {
  background: var(--card);
  border-bottom: 1px solid var(--linie);
  position: sticky; top: 0; z-index: 20;
}
header.sus .container { display: flex; align-items: center; gap: 22px; height: 58px; }
.marca { font-weight: 650; font-size: 15px; color: var(--text); letter-spacing: -.01em; }
.marca span { color: var(--accent); }
nav.meniu { display: flex; gap: 18px; margin-left: auto; align-items: center; }
nav.meniu a { color: var(--text-slab); font-size: 14px; }
nav.meniu a.activ { color: var(--text); font-weight: 550; }
nav.meniu form { display: inline; }

main { padding: 28px 0 60px; }

h1 { font-size: 24px; font-weight: 640; letter-spacing: -.02em; margin-bottom: 4px; }
h2 { font-size: 17px; font-weight: 600; margin: 30px 0 12px; letter-spacing: -.01em; }
h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
p.sub { color: var(--text-slab); font-size: 14px; margin-bottom: 18px; }

/* --- carduri --- */
.card {
  background: var(--card);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--umbra);
}
.grila { display: grid; gap: 14px; }
.grila-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grila-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.cifra-eticheta { font-size: 12px; color: var(--text-slab); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; }
.cifra { font-size: 27px; font-weight: 650; letter-spacing: -.02em; margin-top: 5px;
  font-variant-numeric: tabular-nums; }
.cifra small { font-size: 15px; font-weight: 500; color: var(--text-slab); }
.cifra-nota { font-size: 13px; color: var(--text-slab); margin-top: 3px; }
.cifra.ok { color: var(--ok); }
.cifra.problema { color: var(--problema); }
.cifra.atentie { color: var(--atentie); }

/* --- verdict --- */
.verdict { border-left: 4px solid var(--accent); margin-bottom: 22px; }
.verdict.ok { border-left-color: var(--ok); }
.verdict.problema { border-left-color: var(--problema); }
.verdict h1 { margin-bottom: 2px; }
.verdict .detaliu { color: var(--text-slab); font-size: 14px; }

/* --- alerte --- */
.alerta { display: flex; gap: 12px; padding: 12px 15px; border-radius: 8px;
  border: 1px solid; margin-bottom: 9px; font-size: 14px; align-items: flex-start; }
.alerta .semn { font-weight: 700; line-height: 1.4; flex-shrink: 0; }
.alerta strong { display: block; margin-bottom: 1px; }
.alerta.ok { background: var(--ok-fundal); border-color: #b9dfc9; color: #14603e; }
.alerta.atentie { background: var(--atentie-fundal); border-color: #f0d5a4; color: #7d4f06; }
.alerta.problema { background: var(--problema-fundal); border-color: #f0bcbc; color: #8c2626; }

/* --- tabele --- */
.tabel-container { background: var(--card); border: 1px solid var(--linie);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--umbra); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: #fafbfc; text-align: left; padding: 10px 14px; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: .05em; color: var(--text-slab);
  font-weight: 650; border-bottom: 1px solid var(--linie); white-space: nowrap; }
td { padding: 11px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: #fafbfc; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.puternic { font-weight: 620; }
.mic { font-size: 12.5px; color: var(--text-slab); }
.cod { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px;
  color: var(--text-slab); background: #f2f4f7; padding: 1px 6px; border-radius: 4px; }

/* --- butoane --- */
.buton, button.buton, input[type=submit].buton {
  display: inline-block; padding: 8px 16px; border-radius: 7px; font-size: 14px;
  font-weight: 550; border: 1px solid var(--linie); background: var(--card);
  color: var(--text); cursor: pointer; font-family: inherit; line-height: 1.4;
}
.buton:hover { background: #f2f4f7; text-decoration: none; }
.buton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.buton.principal:hover { background: #1a5192; }
.buton.pericol { color: var(--problema); border-color: #f0bcbc; }
.buton.pericol:hover { background: var(--problema-fundal); }
.buton.mic-buton { padding: 5px 11px; font-size: 13px; }
.actiuni { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* --- formulare --- */
label { display: block; font-size: 13px; font-weight: 560; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--linie); border-radius: 7px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-slab);
}
.camp { margin-bottom: 14px; }
.camp .ajutor { font-size: 12.5px; color: var(--text-slab); margin-top: 4px; }
.randuri { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.bifa { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.bifa input { width: auto; margin-top: 3px; }

/* --- intrare --- */
.ecran-intrare { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px; }
.caseta-intrare { width: 100%; max-width: 390px; }
.caseta-intrare .card { padding: 28px; }
.caseta-intrare h1 { font-size: 20px; margin-bottom: 3px; }

/* --- notificari --- */
.notificare { padding: 10px 15px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
  border: 1px solid; }
.notificare.info { background: var(--accent-slab); border-color: #c3d8ef; color: #17457a; }
.notificare.rea { background: var(--problema-fundal); border-color: #f0bcbc; color: #8c2626; }

/* --- grafic --- */
.grafic { background: var(--card); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--umbra); }
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-slab);
  margin-bottom: 12px; }
.legenda i { width: 10px; height: 10px; border-radius: 2px; display: inline-block;
  margin-right: 5px; vertical-align: -1px; }

/* --- detalii pliabile --- */
details.pliant { border-top: 1px solid var(--linie); }
details.pliant summary { cursor: pointer; padding: 9px 0; font-size: 13px;
  color: var(--accent); list-style: none; }
details.pliant summary::-webkit-details-marker { display: none; }
details.pliant summary::before { content: "▸ "; }
details.pliant[open] summary::before { content: "▾ "; }

.eticheta-buget { font-size: 12px; color: var(--text-slab); }
.gol { text-align: center; padding: 42px 20px; color: var(--text-slab); }
.gol p { margin-bottom: 14px; }

.rand-intre { display: flex; justify-content: space-between; align-items: baseline;
  gap: 14px; flex-wrap: wrap; }
.separator { height: 1px; background: var(--linie); margin: 26px 0; }

@media (max-width: 640px) {
  header.sus .container { height: auto; padding: 10px 16px; flex-wrap: wrap; gap: 12px; }
  nav.meniu { margin-left: 0; width: 100%; gap: 14px; }
  .cifra { font-size: 23px; }
  table { font-size: 13px; }
  th, td { padding: 9px 10px; }
}
