/* Platform theme — sits on Bootstrap 5.3 (the frontend stack the architecture names)
   and gives every page one institutional visual language.

   Principle: the chrome is calm and neutral so the eight semaforizare colours are the
   loudest thing on any screen. Brand colour appears on primary actions and the mark,
   nowhere else. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* ă â î ș ț live here — without this subset Romanian text falls back mid-word. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  --pl-antet: #15212d;          /* header ink */
  --pl-antet-2: #1e2d3b;
  --pl-antet-text: #e7edf3;
  --pl-antet-muted: #9fb0c1;
  --pl-brand: #1f4e79;          /* primary actions */
  --pl-brand-hover: #173d60;
  --pl-brand-soft: #e8f0f8;
  --pl-auriu: #c29a4e;          /* the mark only */

  --pl-fundal: #f3f5f8;
  --pl-suprafata: #ffffff;
  --pl-bordura: #e2e7ee;
  --pl-bordura-2: #cfd7e1;
  --pl-text: #17212b;
  --pl-text-2: #4c5d6e;         /* AA on white and on --pl-fundal */
  --pl-succes: #1f7a45;
  --pl-atentie: #9a5b00;
  --pl-pericol: #b3261e;

  --pl-raza: 12px;
  --pl-raza-mica: 8px;
  --pl-umbra: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --pl-umbra-mare: 0 12px 32px -12px rgba(16, 24, 40, 0.25);

  --pl-inaltime-antet: 3.75rem; /* map pages size themselves from this */

  /* Bootstrap, re-pointed at the theme. */
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-font-size: 0.9375rem;
  --bs-body-color: var(--pl-text);
  --bs-body-bg: var(--pl-fundal);
  --bs-border-color: var(--pl-bordura);
  --bs-link-color: var(--pl-brand);
  --bs-link-color-rgb: 31, 78, 121;
  --bs-link-hover-color: var(--pl-brand-hover);
  --bs-border-radius: var(--pl-raza-mica);
  --bs-primary: var(--pl-brand);
  --bs-primary-rgb: 31, 78, 121;
}

body {
  font-feature-settings: "cv11", "ss01";   /* Inter's clearer 1/l and single-storey a */
  -webkit-font-smoothing: antialiased;
  background: var(--pl-fundal);
}

a { text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #2f7ae5;
  outline-offset: 2px;
}
.tabular { font-variant-numeric: tabular-nums; }

.btn-primary {
  --bs-btn-bg: var(--pl-brand);
  --bs-btn-border-color: var(--pl-brand);
  --bs-btn-hover-bg: var(--pl-brand-hover);
  --bs-btn-hover-border-color: var(--pl-brand-hover);
  --bs-btn-active-bg: var(--pl-brand-hover);
  --bs-btn-active-border-color: var(--pl-brand-hover);
  --bs-btn-disabled-bg: var(--pl-brand);
  --bs-btn-disabled-border-color: var(--pl-brand);
}
.btn-outline-primary {
  --bs-btn-color: var(--pl-brand);
  --bs-btn-border-color: var(--pl-bordura-2);
  --bs-btn-hover-bg: var(--pl-brand-soft);
  --bs-btn-hover-color: var(--pl-brand-hover);
  --bs-btn-hover-border-color: var(--pl-brand);
  --bs-btn-active-bg: var(--pl-brand-soft);
  --bs-btn-active-color: var(--pl-brand-hover);
}
.btn { font-weight: 550; border-radius: var(--pl-raza-mica); }

/* ---------------------------------------------------------------------------------
   Skip link
   --------------------------------------------------------------------------------- */
.salt {
  position: absolute; left: -999px; top: 0; z-index: 1100;
  background: #fff; color: var(--pl-antet); padding: 0.45rem 0.9rem; border-radius: var(--pl-raza-mica);
}
.salt:focus { left: 0.75rem; top: 0.75rem; }

/* ---------------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------------- */
.antet {
  position: sticky; top: 0; z-index: 1000;
  height: var(--pl-inaltime-antet);
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0 1.25rem;
  background: linear-gradient(180deg, var(--pl-antet-2), var(--pl-antet));
  color: var(--pl-antet-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04), 0 2px 8px rgba(0, 0, 0, 0.18);
}
.marca {
  display: flex; align-items: center; gap: 0.7rem;
  color: inherit; text-decoration: none; min-width: 0; max-width: 24rem; flex: 0 1 auto;
}
.marca:hover { color: #fff; }
.marca-semn { flex: none; width: 2.1rem; height: 2.1rem; }
.marca-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.marca-titlu {
  font-weight: 650; font-size: 0.9rem; letter-spacing: -0.005em; line-height: 1.2;
  /* Institution names are configuration and can be long: wrap to two lines, never cut. */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.marca-sub { font-size: 0.75rem; color: var(--pl-antet-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.antet .marca-sub { display: none; }

.nav-app { display: flex; align-items: center; gap: 0.15rem; margin-left: auto; flex: none; }
.nav-app a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.75rem; border-radius: var(--pl-raza-mica);
  color: var(--pl-antet-muted); text-decoration: none; font-size: 0.875rem; font-weight: 520;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
.nav-app a:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-app a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.12); }
.nav-app svg { width: 1.05rem; height: 1.05rem; flex: none; }

.utilizator {
  display: flex; align-items: center; gap: 0.6rem;
  padding-left: 1rem; margin-left: 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}
.avatar {
  display: grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: 50%;
  background: #2c4a68; color: #fff; font-size: 0.75rem; font-weight: 650; letter-spacing: 0.02em;
}
.utilizator-text { display: flex; flex-direction: column; line-height: 1.2; }
.utilizator-nume { font-size: 0.8125rem; font-weight: 600; color: #fff; white-space: nowrap; }
.utilizator-rol { font-size: 0.7rem; color: var(--pl-antet-muted); }
.iesire {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--pl-raza-mica);
  color: var(--pl-antet-muted);
}
.iesire:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.iesire svg { width: 1.1rem; height: 1.1rem; }

@media (max-width: 90rem) {
  .utilizator-text { display: none; }
}
@media (max-width: 78rem) {
  .nav-app a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .utilizator-text { display: none; }
  .marca-sub { display: none; }
}

/* ---------------------------------------------------------------------------------
   Page scaffolding
   --------------------------------------------------------------------------------- */
.continut { max-width: 76rem; margin: 0 auto; padding: 2rem 1.5rem 3rem; }
.continut-lat { max-width: none; padding: 0; }

.pagina-antet {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.pagina-antet h1 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.pagina-antet p { margin: 0.25rem 0 0; color: var(--pl-text-2); }
.supratitlu {
  display: block; margin-bottom: 0.35rem;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pl-brand);
}

.sectiune-titlu {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: 2rem 0 0.85rem;
}
.sectiune-titlu h2 { margin: 0; font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.sectiune-titlu a { font-size: 0.85rem; font-weight: 550; text-decoration: none; }

.panou-pl {
  background: var(--pl-suprafata);
  border: 1px solid var(--pl-bordura);
  border-radius: var(--pl-raza);
  box-shadow: var(--pl-umbra);
}
.panou-pl-corp { padding: 1.25rem 1.35rem; }
.panou-pl-titlu { margin: 0 0 1rem; font-size: 0.95rem; font-weight: 650; }

/* ---------------------------------------------------------------------------------
   KPI tiles
   --------------------------------------------------------------------------------- */
.kpi-grila { display: grid; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); gap: 1rem; }
.kpi {
  position: relative;
  padding: 1.15rem 1.25rem 1.1rem;
  background: var(--pl-suprafata);
  border: 1px solid var(--pl-bordura);
  border-radius: var(--pl-raza);
  box-shadow: var(--pl-umbra);
}
.kpi-eticheta { display: flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; font-weight: 560; color: var(--pl-text-2); }
.kpi-eticheta svg { width: 1rem; height: 1rem; color: var(--pl-brand); }
.kpi-valoare { margin-top: 0.4rem; font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-valoare small { font-size: 1rem; font-weight: 600; color: var(--pl-text-2); letter-spacing: 0; }
.kpi-detaliu { margin-top: 0.3rem; font-size: 0.8rem; color: var(--pl-text-2); }
.kpi-progres { height: 6px; margin-top: 0.7rem; border-radius: 999px; background: #e9eef4; overflow: hidden; }
.kpi-progres span { display: block; height: 100%; border-radius: inherit; background: var(--pl-brand); }
a.kpi { color: inherit; text-decoration: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
a.kpi:hover { border-color: var(--pl-bordura-2); box-shadow: var(--pl-umbra-mare); transform: translateY(-1px); }

/* ---------------------------------------------------------------------------------
   Semaforizare: stacked distribution bar + legend
   --------------------------------------------------------------------------------- */
.bara-semafor { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #e9eef4; }
.bara-semafor span { display: block; height: 100%; min-width: 3px; }
.bara-semafor span + span { box-shadow: inset 2px 0 0 #fff; }
.legenda-semafor { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.4rem 1.5rem; margin: 1.1rem 0 0; padding: 0; list-style: none; }
.legenda-semafor li { display: grid; grid-template-columns: 0.8rem 1fr auto; align-items: baseline; gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px dashed var(--pl-bordura); font-size: 0.85rem; }
.legenda-semafor .culoare { width: 0.8rem; height: 0.8rem; border-radius: 3px; border: 1px solid rgba(0, 0, 0, 0.18); align-self: center; }
.legenda-semafor .nume { font-weight: 600; }
.legenda-semafor .descriere { display: block; font-weight: 400; color: var(--pl-text-2); font-size: 0.78rem; }
.legenda-semafor .numar { font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------------
   Module cards
   --------------------------------------------------------------------------------- */
.module-grila { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 62rem) { .module-grila { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .module-grila { grid-template-columns: 1fr; } }
.modul {
  display: flex; flex-direction: column; gap: 0.35rem;
  padding: 1.15rem 1.25rem;
  background: var(--pl-suprafata);
  border: 1px solid var(--pl-bordura);
  border-radius: var(--pl-raza);
  box-shadow: var(--pl-umbra);
  color: inherit; text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.modul:hover { color: inherit; border-color: var(--pl-bordura-2); box-shadow: var(--pl-umbra-mare); transform: translateY(-1px); }
.modul-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; margin-bottom: 0.35rem; border-radius: 10px; background: var(--pl-brand-soft); color: var(--pl-brand); }
.modul-icon svg { width: 1.25rem; height: 1.25rem; }
.modul strong { font-size: 0.95rem; font-weight: 650; }
.modul p { margin: 0; font-size: 0.83rem; color: var(--pl-text-2); }
.modul .sageata { margin-top: auto; padding-top: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--pl-brand); }

/* ---------------------------------------------------------------------------------
   Lists: integrations, activity
   --------------------------------------------------------------------------------- */
.lista-pl { margin: 0; padding: 0; list-style: none; }
.lista-pl li { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-bottom: 1px solid var(--pl-bordura); font-size: 0.86rem; }
.lista-pl li:last-child { border-bottom: 0; padding-bottom: 0; }
.lista-pl li:first-child { padding-top: 0; }
.lista-pl .principal { flex: 1; min-width: 0; }
.lista-pl .secundar { display: block; font-size: 0.78rem; color: var(--pl-text-2); }
.punct { flex: none; width: 0.6rem; height: 0.6rem; border-radius: 50%; }
.punct-ok { background: #22a35a; box-shadow: 0 0 0 3px rgba(34, 163, 90, 0.15); }
.punct-eroare { background: var(--pl-pericol); box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.15); }
.eticheta-stare { font-size: 0.75rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; }
.eticheta-ok { color: var(--pl-succes); background: #e7f5ed; }
.eticheta-eroare { color: var(--pl-pericol); background: #fdecea; }

/* ---------------------------------------------------------------------------------
   Tables (opt-in)
   --------------------------------------------------------------------------------- */
.tabel-pl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.875rem; }
.tabel-pl th {
  padding: 0.65rem 0.85rem; text-align: left;
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.05em; text-transform: uppercase; color: var(--pl-text-2);
  background: #f7f9fb; border-bottom: 1px solid var(--pl-bordura);
}
.tabel-pl td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--pl-bordura); vertical-align: top; }
.tabel-pl tbody tr:last-child td { border-bottom: 0; }
.tabel-pl tbody tr:hover td { background: #fafbfd; }
.tabel-pl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------------------
   Authentication (split screen)
   --------------------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}
.auth-brand {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  padding: 2.5rem 3rem;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(194, 154, 78, 0.16), transparent 55%),
    linear-gradient(160deg, #1b2a38 0%, #12202c 60%, #0e1822 100%);
  color: var(--pl-antet-text);
}
/* A faint surveyed-plot grid — the product's own subject, not decoration for its own sake. */
.auth-brand::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 56px, 28px 56px;
  transform: rotate(-6deg) scale(1.3);
  mask-image: radial-gradient(70% 70% at 70% 60%, #000, transparent);
}
.auth-brand > * { position: relative; }
.auth-brand .marca-titlu { font-size: 1rem; white-space: normal; }
.auth-brand h1 { max-width: 30rem; margin: 0; font-size: 2.1rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; color: #fff; }
.auth-brand .lead { max-width: 30rem; margin: 1rem 0 0; font-size: 1rem; color: #b9c7d4; }
.auth-puncte { display: grid; gap: 0.9rem; max-width: 30rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.auth-puncte li { display: flex; gap: 0.8rem; font-size: 0.9rem; color: #d2dde7; }
.auth-puncte svg { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.1rem; color: var(--pl-auriu); }
.auth-puncte strong { display: block; color: #fff; font-weight: 600; }
.auth-subsol { font-size: 0.78rem; color: #8196a9; }

.auth-formular { display: grid; place-items: center; padding: 2.5rem 1.5rem; background: var(--pl-suprafata); }
.auth-card { width: 100%; max-width: 23rem; }
.auth-card h2 { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-card .intro { margin: 0.4rem 0 1.75rem; color: var(--pl-text-2); font-size: 0.9rem; }
.auth-card label { display: block; margin: 0 0 0.35rem; font-size: 0.83rem; font-weight: 600; }
.auth-card .form-control { padding: 0.65rem 0.8rem; border-color: var(--pl-bordura-2); border-radius: var(--pl-raza-mica); }
.auth-card .form-control:focus { border-color: var(--pl-brand); box-shadow: 0 0 0 4px rgba(31, 78, 121, 0.12); }
.auth-card .camp { margin-bottom: 1.1rem; }
.auth-card .btn { width: 100%; padding: 0.7rem; margin-top: 0.4rem; }
.auth-card .cod-totp { font-size: 1.6rem; letter-spacing: 0.5em; text-align: center; font-variant-numeric: tabular-nums; }
.auth-securitate { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--pl-bordura); font-size: 0.78rem; color: var(--pl-text-2); }
.auth-securitate svg { width: 1rem; height: 1rem; color: var(--pl-succes); flex: none; }
.auth-link-public { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-size: 0.85rem; font-weight: 550; text-decoration: none; }

.alerta-pl { display: flex; gap: 0.6rem; align-items: flex-start; margin-bottom: 1.1rem; padding: 0.7rem 0.85rem; border-radius: var(--pl-raza-mica); font-size: 0.86rem; color: var(--pl-pericol); background: #fdecea; border: 1px solid #f3c1bc; }

@media (max-width: 56rem) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 1.75rem 1.5rem; }
  .auth-brand h1 { font-size: 1.5rem; }
  .auth-puncte, .auth-subsol { display: none; }
}

/* ---------------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------------- */
.subsol-app { max-width: 76rem; margin: 0 auto; padding: 1.25rem 1.5rem 2rem; font-size: 0.78rem; color: var(--pl-text-2); display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--pl-bordura); }
