/*
 * Intelligence Mandati — stile di base (guscio e pagina di accesso).
 * Solo tema chiaro. Titoli Georgia, sottotitoli Questrial, testo Roboto.
 * Le parti nuove (dashboard, chat) hanno i loro file: web/dashboard.css, web/chat.css.
 */

@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/roboto-400-latin-ext.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; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/roboto-400-latin.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; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/roboto-500-latin-ext.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; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/roboto-500-latin.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; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/roboto-700-latin-ext.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; }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/roboto-700-latin.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; }

/* Questrial (SIL Open Font License), da Google Fonts, servito da qui: nessuna richiesta a Google. */
@font-face { font-family: "Questrial"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/questrial-400-latin-ext.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Questrial"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/questrial-400-latin.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; }

:root {
  color-scheme: light;
  --int-blu: #0076be;
  --int-blu-scuro: #005a91;
  --int-inchiostro: #1d2733;
  --int-testo: #33404d;
  --int-tenue: #5f6b78;
  --int-bordo: #d9e0e7;
  --int-fondo: #f5f7f9;
  --int-carta: #ffffff;
  --int-errore: #b42318;
  --int-errore-fondo: #fdecea;
  --int-raggio: 10px;
  --int-font-titoli: Georgia, "Times New Roman", serif;
  --int-font-sottotitoli: "Questrial", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --int-font-testo: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--int-fondo);
  color: var(--int-testo);
  font: 400 16px/1.5 var(--int-font-testo);
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--int-font-titoli); color: var(--int-inchiostro); font-weight: 400; line-height: 1.25; margin: 0 0 .4em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
.int-sottotitolo { font-family: var(--int-font-sottotitoli); color: var(--int-tenue); font-size: 1rem; margin: 0 0 1rem; }
a { color: var(--int-blu); }
a:hover { color: var(--int-blu-scuro); }
img, svg, video { max-width: 100%; }
:focus-visible { outline: 3px solid rgba(0, 118, 190, .45); outline-offset: 2px; }
.int-nascosto { display: none !important; }
.int-solo-lettori { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Bottoni */
.int-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px; padding: .55em 1.1em;
  border: 1px solid var(--int-blu); border-radius: var(--int-raggio);
  background: var(--int-blu); color: #fff;
  font: 500 1rem/1.2 var(--int-font-testo); cursor: pointer; text-decoration: none;
}
.int-btn:hover { background: var(--int-blu-scuro); border-color: var(--int-blu-scuro); color: #fff; }
.int-btn[disabled] { opacity: .55; cursor: default; }
.int-btn--secondario { background: var(--int-carta); color: var(--int-blu); }
.int-btn--secondario:hover { background: #eaf4fb; color: var(--int-blu-scuro); }

.int-avviso { border-radius: var(--int-raggio); padding: .75em 1em; margin: 1em 0; }
.int-avviso--errore { background: var(--int-errore-fondo); color: var(--int-errore); }
.int-avviso--info { background: #eaf4fb; color: var(--int-inchiostro); }

/* Pagina di accesso */
.int-accesso { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.int-accesso__scheda {
  width: 100%; max-width: 440px; background: var(--int-carta);
  border: 1px solid var(--int-bordo); border-radius: 14px; padding: 28px 24px;
}
.int-accesso__marchio { font-family: var(--int-font-sottotitoli); letter-spacing: .08em; text-transform: uppercase; color: var(--int-blu); font-size: .8rem; margin-bottom: .6rem; }
.int-accesso .int-btn { width: 100%; margin-top: .5rem; }
.int-accesso__nota { font-size: .875rem; color: var(--int-tenue); margin-top: 1.2rem; }

/* Guscio dell'app */
.int-testata {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--int-carta); border-bottom: 1px solid var(--int-bordo);
}
.int-testata__titolo { margin: 0; font-size: 1.25rem; }
.int-testata__utente { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--int-tenue); min-width: 0; }
.int-testata__utente span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.int-testata .int-btn { min-height: 36px; padding: .35em .8em; font-size: .9rem; }

.int-guscio {
  display: grid; gap: 16px; padding: 16px;
  max-width: 1400px; margin: 0 auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "filtri" "riepilogo" "matrice" "elenco" "chat";
}
@media (min-width: 1100px) {
  .int-guscio {
    grid-template-columns: minmax(0, 1fr) 380px;
    grid-template-areas: "filtri chat" "riepilogo chat" "matrice chat" "elenco chat";
    align-items: start;
  }
  #chat { position: sticky; top: 72px; }
}
.int-guscio > section { min-width: 0; }
#filters { grid-area: filtri; }
#tiles   { grid-area: riepilogo; }
#matrix  { grid-area: matrice; }
#list    { grid-area: elenco; }
#chat    { grid-area: chat; }
.int-zona {
  background: var(--int-carta); border: 1px solid var(--int-bordo); border-radius: 12px; padding: 14px 16px;
}
.int-zona:empty { display: none; }

.int-piede { padding: 16px; text-align: center; font-size: .8rem; color: var(--int-tenue); }
.int-testata__sotto { margin: 0; font-size: .9rem; }
#chat-input {
  width: 100%; min-height: 4.5em; resize: vertical; padding: .6em .75em;
  border: 1px solid var(--int-bordo); border-radius: var(--int-raggio);
  font: 400 1rem/1.45 var(--int-font-testo); color: var(--int-inchiostro); background: var(--int-carta);
}
