/* Harta Documentelor AGN
   Aceeasi identitate vizuala ca Agenda Zilnica: portocaliu AGN pe alb,
   text intunecat, fara podoabe. */

:root {
  --portocaliu: #ff6600;
  --portocaliu-inchis: #d95400;
  --text: #1c1c1c;
  --text-sters: #6b6b6b;
  --linie: #e0e0e0;
  --fundal: #ffffff;
  --fundal-slab: #f7f7f5;
  --verde: #1f7a45;
  --galben: #a06a00;
  --rosu: #b3261e;
  --albastru: #1a4f8a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--fundal);
}

/* ---------------------------------------------------------------- bara de sus */

.bara {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 10px 24px;
  border-bottom: 2px solid var(--portocaliu);
  background: var(--fundal);
}

.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.marca span { font-weight: 700; font-size: 16px; }

.meniu { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.meniu a {
  padding: 6px 11px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.meniu a:hover { background: var(--fundal-slab); }
.meniu a.activ { background: var(--portocaliu); color: #fff; font-weight: 600; }

.pastila {
  display: inline-block;
  min-width: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--rosu);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.cont { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.cont .nume { color: var(--text-sters); }
.cont .departament { font-weight: 600; }
.comutator { display: flex; align-items: center; gap: 6px; }
.comutator label { color: var(--text-sters); }
.comutator select { padding: 4px 6px; }

/* -------------------------------------------------------------------- structura */

.continut { max-width: 1180px; margin: 0 auto; padding: 24px; }

.subsol {
  max-width: 1180px;
  margin: 40px auto 0;
  padding: 14px 24px 28px;
  border-top: 1px solid var(--linie);
  color: var(--text-sters);
  font-size: 12px;
}

h1 { font-size: 26px; margin: 0 0 6px; }
h2 { font-size: 19px; margin: 28px 0 8px; }
h3 { font-size: 16px; margin: 20px 0 6px; }

section { margin-bottom: 28px; }

.explicatie { color: var(--text-sters); margin: 0 0 16px; max-width: 70ch; }
.marunt { font-size: 13px; color: var(--text-sters); }
.gol { color: var(--text-sters); font-style: italic; padding: 12px 0; }

.carte {
  border: 1px solid var(--linie);
  border-radius: 6px;
  padding: 18px;
  margin-bottom: 20px;
  background: var(--fundal);
}

.lamurire {
  border-left: 3px solid var(--portocaliu);
  padding: 2px 0 2px 16px;
  margin-top: 32px;
  color: var(--text-sters);
  max-width: 70ch;
}
.lamurire h3 { margin-top: 0; color: var(--text); }

/* ---------------------------------------------------------------------- mesaje */

.eroare, .succes, .atentionare, .anunt {
  padding: 10px 14px;
  border-radius: 5px;
  margin: 0 0 16px;
}
.eroare { background: #fdecea; color: var(--rosu); border: 1px solid #f5c6c2; }
.eroare li { margin-left: 8px; }
ul.eroare { padding: 10px 14px 10px 30px; }
.succes { background: #e8f5ee; color: var(--verde); border: 1px solid #b9dfc9; }
.atentionare { background: #fff6e0; color: var(--galben); border: 1px solid #f0dca8; }
.anunt { background: #fff2e8; border: 1px solid #ffcba8; }
.anunt a { color: var(--portocaliu-inchis); font-weight: 600; }

/* -------------------------------------------------------------------- formulare */

label { display: block; margin-bottom: 12px; font-size: 13px; color: var(--text-sters); }
input[type="text"], input[type="email"], input[type="password"], select, textarea {
  display: block;
  width: 100%;
  margin-top: 3px;
  padding: 7px 9px;
  border: 1px solid #c4c4c4;
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--portocaliu);
  outline-offset: -1px;
  border-color: var(--portocaliu);
}

.grila { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 16px; }
.grila .lat { grid-column: 1 / -1; }

.linie { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.linie label { flex: 1; min-width: 160px; }
.linie.mic { margin-top: 6px; }
.linie.mic select { min-width: 130px; }

details.extern { margin: 6px 0 18px; }
details.extern summary { cursor: pointer; font-size: 13px; color: var(--text-sters); padding: 6px 0; }

button {
  padding: 8px 16px;
  border: 0;
  border-radius: 4px;
  background: var(--portocaliu);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { background: var(--portocaliu-inchis); }
button.da { background: var(--verde); }
button.poate { background: var(--albastru); }
button.nu { background: var(--rosu); }
button.legatura {
  background: none;
  color: var(--albastru);
  padding: 2px 0;
  font-weight: 400;
  font-size: 13px;
  text-decoration: underline;
}
button.legatura:hover { background: none; color: var(--portocaliu-inchis); }

/* -------------------------------------------------------------------- pagina de intrare */

.intrare {
  max-width: 380px;
  margin: 60px auto;
  padding: 30px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  text-align: center;
}
.intrare h1 { font-size: 22px; margin: 14px 0 4px; }
.intrare label { text-align: left; }
.intrare button { width: 100%; margin-top: 6px; }

/* --------------------------------------------------------------------- carduri */

.carduri { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.card {
  display: block;
  padding: 18px;
  border: 1px solid var(--linie);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  background: var(--fundal);
}
.card:hover { border-color: var(--portocaliu); }
.card.aprins { border-color: var(--portocaliu); background: #fff8f3; }
.card h2 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0 0 10px; font-size: 13px; color: var(--text-sters); }
.card .cifra { font-size: 13px; font-weight: 700; color: var(--portocaliu-inchis); }

/* ----------------------------------------------------------------------- cifre */

.cifre { display: flex; gap: 22px; flex-wrap: wrap; margin: 16px 0 24px; }
.cifre div { font-size: 13px; color: var(--text-sters); }
.cifre span { display: block; font-size: 24px; font-weight: 700; color: var(--text); }
.cifre .verde span { color: var(--verde); }
.cifre .galben span { color: var(--galben); }
.cifre .rosu span { color: var(--rosu); }

h2 .cifra {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: var(--text-sters);
  border-radius: 9px;
  padding: 1px 8px;
  vertical-align: middle;
}

/* ---------------------------------------------------------------------- tabele */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-sters); }
tbody tr:hover { background: var(--fundal-slab); }
tr.inactiv { opacity: .5; }
td.cod { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: nowrap; }
td.atentie, .atentie { color: var(--rosu); font-weight: 600; }
td.termen { font-weight: 600; }

.tabel-lat { overflow-x: auto; }

.matrice td, .matrice th { text-align: center; border: 1px solid var(--linie); }
.matrice th:first-child { text-align: left; white-space: nowrap; font-size: 12px; }
.matrice .colt { font-size: 11px; color: var(--text-sters); }
.matrice td.goala { color: #ccc; }
.matrice td.plina a { text-decoration: none; color: var(--text); }
.matrice td.plina strong { color: var(--verde); }
.matrice td.plina em { color: var(--galben); font-style: normal; font-size: 12px; }
.matrice td.proprie { background: var(--fundal-slab); }

/* --------------------------------------------------------------------- etichete */

.eticheta {
  display: inline-block;
  padding: 1px 7px;
  margin: 0 3px 3px 0;
  border-radius: 3px;
  background: var(--fundal-slab);
  border: 1px solid var(--linie);
  font-size: 12px;
  white-space: nowrap;
}
.eticheta.esential { background: #fff2e8; border-color: #ffcba8; color: var(--portocaliu-inchis); }
.eticheta.util { background: var(--fundal-slab); color: var(--text-sters); }
.eticheta.revizuit { background: #fff6e0; border-color: #f0dca8; color: var(--galben); }

.stare {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}
.stare.propusa { background: #fff6e0; color: var(--galben); }
.stare.confirmata { background: #e8f5ee; color: var(--verde); }
.stare.validata { background: var(--verde); color: #fff; }
.stare.refuzata { background: #fdecea; color: var(--rosu); }
.stare.in_negociere { background: #e8effa; color: var(--albastru); }

.lista-inline { display: flex; flex-wrap: wrap; gap: 2px; }

.tiparire {
  font-size: 13px;
  color: var(--text-sters);
  padding: 8px 12px;
  background: var(--fundal-slab);
  border-radius: 5px;
  display: inline-block;
}
.tiparire a { color: var(--portocaliu-inchis); font-weight: 600; }

/* -------------------------------------------------------------------- sugestii */

.sugestii { list-style: none; padding: 0; margin: 8px 0 0; max-height: 340px; overflow-y: auto; }
.sugestii li { margin-bottom: 3px; }
button.sugestie {
  display: block;
  width: 100%;
  text-align: left;
  padding: 6px 10px;
  background: var(--fundal-slab);
  border: 1px solid var(--linie);
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
}
button.sugestie:hover { background: #fff2e8; border-color: var(--portocaliu); }

/* --------------------------------------------------------------------- cereri */

.cerere {
  border: 1px solid var(--linie);
  border-left: 3px solid var(--portocaliu);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 14px;
}
.cerere header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cerere h2 { margin: 0; font-size: 17px; }
.raspuns { margin-top: 12px; }
.raspuns .butoane { display: flex; gap: 8px; flex-wrap: wrap; }

.detalii { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0 0; }
.detalii div { font-size: 14px; }
.detalii dt { font-size: 12px; color: var(--text-sters); text-transform: uppercase; letter-spacing: .03em; }
.detalii dd { margin: 1px 0 0; }

/* -------------------------------------------------------------------- istoric */

.istoric { list-style: none; padding: 0; }
.istoric li { padding: 10px 0; border-bottom: 1px solid var(--linie); }
.istoric p { margin: 4px 0; }
.istoric time { font-size: 12px; color: var(--text-sters); }
.actiune {
  display: inline-block;
  padding: 0 7px;
  border-radius: 3px;
  font-size: 12px;
  background: var(--fundal-slab);
}
.actiune.confirm { background: #e8f5ee; color: var(--verde); }
.actiune.refuz { background: #fdecea; color: var(--rosu); }
.actiune.negociez { background: #e8effa; color: var(--albastru); }
.actiune.validez { background: var(--verde); color: #fff; }

/* ------------------------------------------------------------------- administrare */

.parola-noua {
  border: 2px solid var(--portocaliu);
  border-radius: 6px;
  padding: 16px 18px;
  margin-bottom: 20px;
  background: #fff8f3;
}
.parola-noua h2 { margin-top: 0; }
code { font-family: ui-monospace, Menlo, Consolas, monospace; background: var(--fundal-slab); padding: 1px 5px; border-radius: 3px; }
code.mare { font-size: 20px; letter-spacing: .08em; padding: 4px 10px; }

/* -------------------------------------------------------------------- ecran mic */

@media (max-width: 720px) {
  .bara { padding: 10px 14px; }
  .continut { padding: 16px 14px; }
  .meniu { order: 3; width: 100%; }
  .cifre { gap: 16px; }
}
