/* Console Sagires (app.sagires.it): stesso sistema visivo di Gare e Interventi */

@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");
}

:root {
  --navy-900: #14263d;
  --navy-800: #1b3455;
  --navy-700: #24466d;
  --arancio-600: #e0863a;
  --arancio-500: #f39c4a;
  --arancio-400: #f5ad63;
  --arancio-100: #fdecd8;
  --fondo: #f5f3ec;
  --superficie: #ffffff;
  --superficie-2: #faf8f2;
  --bordo: #e7e2d3;
  --bordo-forte: #d9d2bd;
  --testo: #23293a;
  --testo-2: #6b6558;
  --testo-3: #9c9686;
  --su-navy: #eef1f6;
  --su-navy-tenue: #b7c4d6;
  --pericolo: #bf5136;
  --ombra-xs: 0 1px 2px rgba(20, 38, 61, 0.05);
  --ombra-sm: 0 2px 6px rgba(20, 38, 61, 0.06);
  --ombra-md: 0 8px 24px rgba(20, 38, 61, 0.1);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fondo);
  color: var(--testo);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: var(--arancio-100); color: var(--navy-900); }
a { color: var(--navy-700); }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- pulsanti, campi, avvisi ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: var(--r-md);
  font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 10px 16px; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.65; cursor: default; }
.btn-primario { background: var(--arancio-500); color: var(--navy-900); }
.btn-primario:not(:disabled):hover { background: var(--arancio-600); }
.btn-pieno { width: 100%; padding: 11px; }

label { display: block; font-size: 12.5px; font-weight: 600; color: var(--testo-2); margin-bottom: 6px; }
input {
  width: 100%;
  border: 1px solid var(--bordo-forte); border-radius: var(--r-sm);
  padding: 10px 13px; margin-bottom: 18px;
  font: inherit; font-size: 14px; color: var(--testo); background: var(--superficie);
  outline: none; transition: border-color 0.12s, box-shadow 0.12s;
}
input:focus { border-color: var(--arancio-500); box-shadow: 0 0 0 3px var(--arancio-100); }

.avviso {
  border-radius: var(--r-sm); padding: 11px 14px; margin-bottom: 18px;
  font-size: 13.5px; background: #fbeae5; color: #8a3622; border: 1px solid #eec4b6;
}
.avviso-info { background: #e6eef9; color: var(--navy-800); border-color: #c9d8ee; }

/* ---------- accesso ---------- */
.accesso { min-height: 100vh; display: flex; }
.accesso-brand {
  flex: 1;
  background: radial-gradient(circle at 15% 15%, var(--navy-700), var(--navy-900) 72%);
  display: flex; align-items: center;
  padding: 64px; color: var(--su-navy);
  position: relative; overflow: hidden;
}
.accesso-brand::before {
  content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(243, 156, 74, 0.16), transparent 70%);
  bottom: -180px; right: -160px;
}
.accesso-brand__contenuto { position: relative; max-width: 440px; }
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--arancio-400);
}
.accesso-brand__titolo { font-size: 32px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 34px; }
.punti { list-style: none; display: flex; flex-direction: column; gap: 20px; }
.punti li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: var(--su-navy-tenue); }
.punti strong { display: block; color: var(--su-navy); font-size: 15px; font-weight: 650; margin-bottom: 1px; }
.punti__icona {
  flex: none; width: 36px; height: 36px; border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.09); color: var(--arancio-400);
  display: inline-flex; align-items: center; justify-content: center;
}
.punti__icona svg { width: 18px; height: 18px; }

.accesso-modulo { width: 500px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; padding: 40px; }
.scheda-accesso {
  width: 100%; max-width: 380px;
  background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--r-lg);
  box-shadow: var(--ombra-md); padding: 36px 34px 32px;
}
.logo-esteso { display: block; width: 210px; max-width: 100%; height: auto; margin-bottom: 26px; }
.scheda-accesso h1 { font-size: 19px; font-weight: 700; color: var(--navy-800); margin-bottom: 4px; }
.sottotitolo { font-size: 13px; color: var(--testo-3); margin-bottom: 26px; }
.nota-accesso { font-size: 12px; color: var(--testo-3); text-align: center; margin-top: 20px; }

@media (max-width: 900px) {
  .accesso-brand { display: none; }
  .accesso-modulo { width: 100%; padding: 24px 16px; }
}

/* ---------- barra in alto ---------- */
.barra {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy-900);
  height: 56px; padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), var(--ombra-sm);
}
.barra__marchio { display: flex; align-items: center; gap: 10px; min-width: 0; }
.barra__logo { width: 26px; height: 26px; display: block; }
.barra__titolo { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--su-navy); white-space: nowrap; }
.barra__titolo span { color: var(--arancio-400); font-weight: 500; }
.barra__utente { display: flex; align-items: center; gap: 8px; }
.barra__nome { display: flex; flex-direction: column; line-height: 1.2; }
#nome-utente { font-size: 13px; color: var(--su-navy); white-space: nowrap; }
#ruolo-utente { font-size: 11px; color: var(--su-navy-tenue); white-space: nowrap; }
.avatar {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--arancio-500); color: var(--navy-900);
  font-size: 11.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.btn-icona {
  width: 32px; height: 32px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--su-navy-tenue); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.btn-icona svg { width: 17px; height: 17px; }
.btn-icona:hover { background: rgba(255, 255, 255, 0.1); color: var(--arancio-400); }

/* ---------- pagina e riquadri delle app ---------- */
.pagina { max-width: 1100px; margin: 0 auto; padding: 36px 32px 64px; }
.pagina__titolo { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--navy-900); }
.pagina__sottotitolo { color: var(--testo-2); font-size: 14px; margin: 4px 0 28px; }

.sezione { margin-bottom: 30px; }
.sezione__titolo {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--testo-3); margin-bottom: 12px;
}
.griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.riquadro {
  position: relative;
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--superficie); border: 1px solid var(--bordo); border-radius: var(--r-lg);
  box-shadow: var(--ombra-xs);
  padding: 18px 18px 18px 20px;
  color: inherit; text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.riquadro:hover { box-shadow: var(--ombra-md); transform: translateY(-2px); border-color: var(--bordo-forte); }
.riquadro:focus-visible { outline: 3px solid var(--arancio-400); outline-offset: 2px; }
.riquadro__icona {
  flex: none; width: 44px; height: 44px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-900); color: var(--arancio-400);
}
.riquadro__icona svg { width: 22px; height: 22px; }
.riquadro--esterno .riquadro__icona { background: var(--superficie-2); color: var(--navy-700); border: 1px solid var(--bordo); }
.riquadro__nome, .riquadro__descrizione, .riquadro__indirizzo { display: block; }
.riquadro__nome { font-size: 15.5px; font-weight: 700; color: var(--navy-800); }
.riquadro__descrizione { font-size: 13px; color: var(--testo-2); margin-top: 2px; }
.riquadro__indirizzo { font-size: 11.5px; color: var(--testo-3); margin-top: 6px; font-family: ui-monospace, Consolas, monospace; }
.riquadro__freccia { position: absolute; top: 16px; right: 16px; width: 16px; height: 16px; color: var(--testo-3); }
.riquadro:hover .riquadro__freccia { color: var(--arancio-600); }

@media (max-width: 640px) {
  .barra { padding: 0 16px; }
  .barra__nome, .barra__titolo span { display: none; }
  .pagina { padding: 24px 16px 48px; }
  .griglia { grid-template-columns: 1fr; }
}
