/* Fața publică — das Layout aller Seiten, die kein Dashboard sind:
 * /inscriere (beide Schritte, Fehlerzustaende, Bestaetigung) und /login.
 *
 * Abgeleitet aus der Vorlage in design-ref/public/index.html: links ein graues
 * Panel mit dem Siegel, rechts die weisse Flaeche mit dem Verlauf oben, der
 * Inhalt direkt darauf — kein Karten-Kasten. Werte (Breiten, Farben, Verlauf,
 * Breakpoint) stammen aus der Vorlage, damit diese Seiten und die
 * Programm-Startseite als ein Auftritt lesen.
 *
 * Das Dashboard hat sein eigenes Stylesheet (style.css) und bleibt schlicht.
 */

:root {
  --panel: #dcdcdc;
  --verlauf: #d5e8f0;
  --text: #333;
  --text-weich: #444;
  --text-slab: #666;
  --link: #2b7bb9;
  /* Markenblau statt des helleren Tons der Vorlage: weisse Schrift auf
     #4a9aca kommt auf 3,10:1 und reisst damit die WCAG-AA-Schwelle von 4,5:1.
     #2567ad liegt bei 5,80:1, #1d5189 bei 8,11:1 — dieselbe Farbfamilie,
     lesbar auch auf einem schlechten Bildschirm in einer Primaerie. */
  --buton: #2567ad;
  --buton-hover: #1d5189;
  --caseta: #f4f8fb;
  --caseta-linie: #b0cfe0;
  --linie: #d5dde5;
  --fokus: #2567ad;

  --ok: #1c6b3c;
  --nu: #9b2226;
  --mid: #8a6100;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
               Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

/* Testband bleibt die oberste Zeile, ueber beiden Spalten. */
.banda-test {
  background: var(--mid); color: #fff; text-align: center;
  padding: .5rem 1rem; font-size: 13px; letter-spacing: .02em;
}

/* --- Zwei Spalten -------------------------------------------------------- */

.wrapper { flex: 1; display: flex; }

.left-panel {
  width: 30%;
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.logo-container { text-align: center; }
.logo-container img { width: 140px; height: 140px; margin-bottom: 1rem; }
.logo-container h2 { font-size: 1.7rem; font-weight: 600; color: var(--text); }

.right-panel {
  width: 70%;
  background: #fff;
  background-image: linear-gradient(to bottom, var(--verlauf) 0px, #ffffff 50px);
  display: flex;
  flex-direction: column;
}

.right-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 3.5rem;
}

/* Mittig, solange Platz ist; wird der Inhalt hoeher als die Flaeche, loesen
   die automatischen Abstaende zu 0 auf und die Seite waechst nach unten. */
.continut { margin: auto 0; width: 100%; max-width: 34rem; }

.footer { padding: 1rem 3.5rem; font-size: 13px; color: #999; }
.footer a { color: var(--link); }
.footer .sep { margin: 0 .35rem; color: #ccc; }

/* --- Text ---------------------------------------------------------------- */

h1 { font-size: 1.75rem; font-weight: normal; color: var(--text); margin-bottom: 1.25rem; }
.continut h2 { font-size: 1.1rem; font-weight: 600; margin: 1.5rem 0 .5rem; }

p { font-size: 14px; line-height: 1.6; color: var(--text-weich); margin-bottom: .6rem; }
.intro:last-of-type { margin-bottom: 1.25rem; }

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

/* Der Reset oben nimmt Listen ihren Einzug; ohne padding-left staenden die
   Ziffern ausserhalb der Flaeche. */
ol.urmeaza { margin: .4rem 0 1.25rem; padding-left: 1.3rem; }
ol.urmeaza li { margin: .3rem 0; line-height: 1.6; color: var(--text-weich); }

.pas-indicator {
  display: inline-block;
  margin-bottom: .8rem;
  padding: .2rem .7rem;
  background: var(--caseta);
  border: 1px solid var(--caseta-linie);
  border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--link);
}

/* Hinweis, der zu einem einzelnen Feld gehoert */
.nota-camp { font-size: 13px; color: var(--text-slab); margin: -.4rem 0 1.25rem; }

/* --- Kaesten ------------------------------------------------------------- */

.info-box, .anaf-nota, .nota-gdpr, .declaratie {
  background: var(--caseta);
  border-left: 3px solid var(--caseta-linie);
  padding: .85rem 1rem;
}
.info-box p, .anaf-nota, .nota-gdpr { font-size: 13px; line-height: 1.55; color: #555; }
.anaf-nota { margin-bottom: 1.25rem; }
.nota-gdpr { margin-top: 1.25rem; }

/* Erklaerung der Împuternicire — abgesetzt, damit sie nicht als Beiwerk
   zwischen den Feldern untergeht. */
.declaratie {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-bottom: 1.25rem;
  font-size: 14px; line-height: 1.5; color: var(--text);
}
.declaratie input[type=checkbox] {
  width: 1.15rem; height: 1.15rem; margin-top: .1rem; flex: none;
  accent-color: var(--buton);
}

/* --- Formulare ----------------------------------------------------------- */

fieldset {
  border: 1px solid var(--linie); border-radius: 4px;
  margin-bottom: 1.25rem; padding: .4rem 1.1rem 1rem;
}
legend {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--text-slab); padding: 0 .35rem;
}

label { display: block; margin: .8rem 0; font-size: 13px; color: var(--text-slab); }

input[type=text], input[type=email], input[type=password], input:not([type]),
select, textarea {
  display: block; width: 100%; margin-top: .25rem;
  padding: .55rem .6rem;
  border: 1px solid var(--linie); border-radius: 4px;
  /* 16px, weil iOS beim Fokus in kleinere Felder hineinzoomt. */
  font: inherit; font-size: 16px; color: var(--text);
  background: #fff;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--fokus); outline-offset: 1px; border-color: var(--fokus);
}
input[readonly] { background: #f2f5f8; color: var(--text-slab); }

button {
  font: inherit; font-size: 14px; font-weight: 600;
  min-height: 44px; padding: .6rem 1.6rem;
  border: none; border-radius: 4px;
  background: var(--buton); color: #fff; cursor: pointer;
}
button:hover { background: var(--buton-hover); }
button:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }

/* Hinweis am Freitextfeld der Funktion — nur sichtbar ohne JavaScript; das
   Skript entfernt ihn und blendet das Feld bedarfsweise aus. */
.hinweis-fara-js { font-size: 13px; color: var(--text-slab); margin: -.5rem 0 .8rem; }

/* Honeypot: fuer Menschen unsichtbar, fuer Automaten ein normales Feld.
   Kein display:none — manche Ausfuellhilfen ueberspringen solche Felder. */
.capcana {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* --- Meldungen ----------------------------------------------------------- */

.flash {
  padding: .7rem .9rem; margin-bottom: 1.25rem;
  border-left: 3px solid var(--ok); background: #e8f3ec;
  font-size: 14px; line-height: 1.5;
}
.flash.eroare { border-left-color: var(--nu); background: #fbeaea; }
.flash.atentie { border-left-color: var(--mid); background: #fdf3dc; }

/* --- Schmale Fenster (Breakpoint der Vorlage) ---------------------------- */

@media (max-width: 768px) {
  .wrapper { flex-direction: column; }

  /* Aus dem Panel wird ein schmaler Kopfbereich: Siegel klein, Titel daneben. */
  .left-panel { width: 100%; padding: 1rem 1.5rem; justify-content: flex-start; }
  .logo-container { display: flex; align-items: center; gap: .9rem; text-align: left; }
  .logo-container img { width: 48px; height: 48px; margin-bottom: 0; }
  .logo-container h2 { font-size: 1.15rem; }

  .right-panel { width: 100%; background-image: none; }
  .right-content { padding: 1.75rem 1.5rem; }
  .continut { margin: 0; max-width: none; }
  .footer { padding: 1rem 1.5rem; }

  button { width: 100%; }
}

/* Dokumentenseite einer Institution — /d/<token> */
.info-box.descarcare h2, .info-box.asistenta h2 {
  font-size: 16px; margin: 0 0 .4rem;
}
a.descarca {
  display: inline-block; padding: .55rem 1.1rem; border-radius: 4px;
  background: var(--buton); color: #fff; text-decoration: none; font-weight: 500;
}
a.descarca:hover { background: var(--buton-hover); }
a.descarca:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; }

.slot {
  border: 1px solid #e2e2e2; border-left: 4px solid #d8d8d8;
  border-radius: 4px; padding: .75rem 1rem; margin: 0 0 .9rem;
}
.slot-incarcat { border-left-color: #2567ad; }
.slot-validat  { border-left-color: #2e7d4f; background: #f6faf7; }
.slot-respins  { border-left-color: #b3261e; background: #fdf7f7; }
.slot h3 { font-size: 15px; margin: 0 0 .35rem; font-weight: 600; }
.slot .fisier { font-size: 13px; margin: .2rem 0 .5rem; color: #555; }
.slot .motiv-respins {
  font-size: 13px; margin: .3rem 0 .6rem; padding: .4rem .6rem;
  background: #fbe6e6; border-left: 3px solid #b3261e; color: #333;
}
.slot input[type=file] { display: block; margin: .4rem 0 .6rem; font-size: 14px; }
.slot form { margin: 0; }
.slot button { padding: .45rem 1rem; font-size: 14px; }

.badge {
  display: inline-block; padding: .1em .55em; border-radius: 999px;
  font-size: 12px; font-weight: 500; border: 1px solid #ddd; background: #f4f4f4;
  vertical-align: middle; white-space: nowrap;
}
.doc-lipseste { color: #777; }
.doc-incarcat { background: #e6eef5; border-color: #a8c0d4; color: #2567ad; }
.doc-validat  { background: #e3f2e8; border-color: #a8ceb8; color: #2e7d4f; }
.doc-respins  { background: #fbe6e6; border-color: #e0a8a8; color: #b3261e; }
.doc-sters    { color: #777; text-decoration: line-through; }

.termen-depasit { color: #b3261e; font-weight: 500; }
.flash.ok { border-left: 4px solid #2e7d4f; background: #e3f2e8; padding: .5rem .8rem; margin: 0 0 1rem; }

/* Endzustand: alle Dokumente validiert. Bewusst schlicht — hier gibt es
   nichts mehr zu tun, also auch keinen Knopf, der etwas anderes suggeriert. */
.info-box.toate-validate {
  border-left: 4px solid #2e7d4f; background: #f6faf7;
}
.info-box.toate-validate p { margin: 0; font-size: 14px; color: #2e5c42; font-weight: 500; }

/* Colectare date tehnice — Übersicht der fünf Abschnitte */
a.sectiune {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid #e2e2e2; border-left: 4px solid #d8d8d8; border-radius: 4px;
  padding: .7rem 1rem; margin: 0 0 .7rem;
}
a.sectiune:hover { border-color: #2567ad; background: #fafcfe; }
a.sectiune.s-in_lucru { border-left-color: #2567ad; }
a.sectiune.s-complet  { border-left-color: #2e7d4f; background: #f6faf7; }
a.sectiune .titlu { font-weight: 600; font-size: 15px; margin-right: .4rem; }
a.sectiune .titlu em { font-weight: 400; font-style: normal; color: #777; font-size: 13px; }
a.sectiune .descriere { display: block; font-size: 13px; color: #666; margin-top: .25rem; }

.col-neinceput { color: #777; }
.col-in_lucru  { background: #e6eef5; border-color: #a8c0d4; color: #2567ad; }
.col-complet   { background: #e3f2e8; border-color: #a8ceb8; color: #2e7d4f; }

.info-box.colectare h2, .info-box.finalizare h2 { font-size: 16px; margin: 0 0 .4rem; }
.info-box.finalizare { border-left: 4px solid #2567ad; }

/* Wizard-Schritte in Tab 1 */
nav.pasi-wizard { display: flex; gap: .4rem; margin: 0 0 1rem; flex-wrap: wrap; }
nav.pasi-wizard a {
  flex: 1 1 auto; text-align: center; padding: .4rem .6rem; font-size: 13px;
  border: 1px solid #e2e2e2; border-radius: 4px; text-decoration: none; color: #555;
  background: #fafafa;
}
nav.pasi-wizard a.activ { background: #2567ad; border-color: #2567ad; color: #fff; font-weight: 500; }
nav.pasi-wizard a.gol:not(.activ) { color: #999; }

.grup-persoana { border-top: 1px solid #eee; padding-top: .6rem; }
label.check.vacant { font-size: 14px; font-weight: 500; color: #333; margin: .6rem 0 0; }
fieldset.audiente .zile { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin: .3rem 0 .6rem; }
fieldset.audiente .zile label { margin: 0; }

/* Dynamische Zeilen */
.rand {
  border: 1px solid #eee; border-radius: 4px; padding: .5rem .8rem; margin: 0 0 .6rem;
  background: #fcfcfc;
}
.rand label { margin: .3rem 0; }
.email-compus { display: flex; align-items: stretch; margin-top: .15rem; }
.email-compus input { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-top: 0; }
.email-compus .sufix {
  display: flex; align-items: center; padding: 0 .6rem; font-size: 13px; color: #555;
  background: #f0f2f5; border: 1px solid #d8d8d8; border-left: none;
  border-radius: 0 3px 3px 0; white-space: nowrap;
}

.actiuni-formular { display: flex; gap: .6rem; flex-wrap: wrap; margin: 1rem 0; }
button.secundar { background: #fff; color: #2567ad; border: 1px solid #2567ad; }
button.secundar:hover { background: #eef4fa; }

.colectare-subsol {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid #eee; flex-wrap: wrap;
}
.colectare-subsol p { margin: 0; font-size: 14px; }
.colectare-subsol form { margin: 0; }

@media (max-width: 640px) {
  .actiuni-formular button { width: 100%; }
  nav.pasi-wizard a { flex-basis: 100%; }
  .colectare-subsol { flex-direction: column; align-items: stretch; }
}

/* Upload-Plätze: der Hinweis lief unter den Knopf. Formular und Notiz
   bekommen eigene Zeilen, der Knopf steht nicht mehr auf dem Text. */
.slot form {
  margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.slot form input[type=file] { flex: 1 1 14rem; margin: 0; min-width: 0; }
.slot form button { flex: 0 0 auto; margin: 0; }
.slot .nota-camp { margin: .5rem 0 0; }
.slot p:last-child { margin-bottom: 0; }

/* Freitext zu „Altul" — ohne Skript sichtbar, mit Skript eingeblendet */
.camp-alta { margin: 0; }
.camp-alta .fara-js { display: block; margin-top: .1rem; color: #777; font-size: 12px; }

label.check.gol-explicit {
  margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed #ddd;
  font-size: 13px; color: #444;
}

/* Assistenz als aufklappbarer Block */
details.asistenta { padding: .6rem 1rem; }
details.asistenta summary {
  cursor: pointer; font-weight: 600; font-size: 15px; color: #2567ad;
}
details.asistenta summary::marker { color: #999; }
details.asistenta p { margin: .5rem 0; }
details.asistenta button { margin-top: .4rem; }

/* Nota de informare auf /arhivamail — aufklappbar unter der Pflicht-Checkbox,
   damit der volle Wortlaut erreichbar ist, ohne das Formular zu überdecken. */
details.nota-informare { margin: -.6rem 0 1.25rem; }
details.nota-informare summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--link);
}
details.nota-informare p {
  margin-top: .5rem; font-size: 13px; line-height: 1.55; color: #555;
}

/* Etappen-Portal auf der Seite der Institution */
details.etapa {
  border: 1px solid #e2e2e2; border-left: 4px solid #d8d8d8; border-radius: 4px;
  padding: .7rem 1rem; margin: 0 0 .9rem; background: #fff;
}
details.etapa > summary {
  cursor: pointer; font-weight: 600; font-size: 15px; list-style-position: outside;
}
details.etapa > summary .nr {
  display: inline-block; font-size: 12px; font-weight: 500; color: #666;
  background: #f0f2f5; border-radius: 3px; padding: .05em .45em; margin-right: .4rem;
}
details.etapa > summary .rezumat { display: block; font-weight: 400; font-size: 13px; margin-top: .2rem; }

details.etapa.e-deschis { border-left-color: #2567ad; }
details.etapa.e-gata    { border-left-color: #2e7d4f; background: #f6faf7; }
details.etapa.e-gata > summary { color: #2e5c42; }
details.etapa.e-gata > summary .rezumat { color: #2e7d4f; }
details.etapa.e-blocat { border-left-color: #ddd; background: #fafafa; color: #8a8a8a; }
details.etapa.e-blocat > summary { color: #8a8a8a; cursor: default; }
details.etapa.e-blocat > summary .nr { color: #999; }
details.etapa h3 { font-size: 14px; margin: .6rem 0 .3rem; }
