/* Portale JOB — stile comune. Marchio: Unbounded, viola 2685 C, giallo fluo 809 C, grigio rifrangente 877 C. */
@font-face { font-family: "Unbounded"; font-weight: 300; font-display: swap; src: url("/static/fonts/Unbounded_300Light.ttf") format("truetype"); }
@font-face { font-family: "Unbounded"; font-weight: 400; font-display: swap; src: url("/static/fonts/Unbounded_400Regular.ttf") format("truetype"); }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap; src: url("/static/fonts/Unbounded_600SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Unbounded"; font-weight: 900; font-display: swap; src: url("/static/fonts/Unbounded_900Black.ttf") format("truetype"); }

:root {
  --viola: #330072;
  --viola-90: #47188a;
  --viola-chiaro: #efe9f7;
  --giallo: #E1F618;
  --grigio-job: #C8C7C0;
  --nero: #000;
  --bianco: #fff;
  --sfondo: #f6f5f9;
  --testo: #1c1430;
  --tenue: #625b73;
  --bordo: #e2deea;
  --rosso: #b3261e;
  --rosso-chiaro: #fdecea;
  --ombra: 0 1px 2px rgba(51, 0, 114, .06), 0 4px 18px rgba(51, 0, 114, .06);
  --raggio: 12px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sfondo); color: var(--testo);
  font: 300 14px/1.55 "Unbounded", system-ui, sans-serif;
}
h1, h2, h3 { font-weight: 900; color: var(--viola); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(20px, 4vw, 28px); }
h2 { font-size: 17px; }
h3 { font-size: 14px; }
b, strong { font-weight: 600; }
a { color: var(--viola); }
small, .tenue { color: var(--tenue); }

/* ---- testata */
.testata { background: var(--bianco); border-bottom: 4px solid var(--viola); position: sticky; top: 0; z-index: 20; }
.testata::after { content: ""; display: block; height: 3px; background: var(--giallo); }
.testata-dentro { max-width: 1180px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.testata .marchio img { height: 40px; display: block; }
.testata nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.testata nav a { text-decoration: none; color: var(--testo); font-weight: 400; font-size: 12.5px; padding: 8px 12px; border-radius: 999px; }
.testata nav a:hover { background: var(--viola-chiaro); }
.testata nav a.attivo { background: var(--viola); color: var(--bianco); }
.utente { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--tenue); white-space: nowrap; }
.utente a { font-size: 12px; }
.menu-mobile { display: none; }

main { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
.intestazione { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.intestazione p { margin: 6px 0 0; color: var(--tenue); }

/* ---- controlli */
button, .bottone, input, select, textarea { font: inherit; }
button, .bottone {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid var(--viola); background: var(--bianco); color: var(--viola);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 12.5px; cursor: pointer; text-decoration: none;
  transition: background .12s, color .12s;
}
button:hover, .bottone:hover { background: var(--viola-chiaro); }
button.primario, .bottone.primario { background: var(--viola); color: var(--bianco); }
button.primario:hover, .bottone.primario:hover { background: var(--viola-90); }
button.evidenza { background: var(--giallo); border-color: var(--giallo); color: var(--viola); }
button.pericolo { border-color: var(--rosso); color: var(--rosso); }
button.pericolo:hover { background: var(--rosso-chiaro); }
button.piccolo { padding: 5px 11px; font-size: 11.5px; }
button.link { border: none; background: none; padding: 4px 6px; color: var(--viola); text-decoration: underline; font-weight: 400; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 3px solid var(--giallo); outline-offset: 2px; }
button:focus-visible, a:focus-visible { box-shadow: 0 0 0 5px var(--viola); }

input[type=text], input[type=password], input[type=search], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--bordo); border-radius: 10px; background: var(--bianco);
  color: var(--testo); font-size: 14px; font-weight: 300;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--viola); box-shadow: 0 0 0 3px var(--viola-chiaro); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 12px; font-weight: 400; color: var(--tenue); }
label > input, label > select, label > textarea { margin-top: 5px; }
.campi { display: grid; gap: 14px; }
.campi.due { grid-template-columns: 1fr 1fr; }
.casella { display: flex; align-items: center; gap: 8px; color: var(--testo); }

/* ---- riquadri */
.riquadro { background: var(--bianco); border: 1px solid var(--bordo); border-radius: var(--raggio); box-shadow: var(--ombra); }
.riquadro.spazio { padding: 20px 22px; }
.errore { color: var(--rosso); background: var(--rosso-chiaro); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.successo { color: var(--viola); background: var(--viola-chiaro); border-left: 4px solid var(--giallo); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.vuoto { text-align: center; color: var(--tenue); padding: 30px 10px; }

/* ---- etichette di stato */
.stato { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 11px; font-size: 11px;
  font-weight: 600; border: 1.5px solid transparent; white-space: nowrap; cursor: pointer; background: none; }
.stato::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.stato.da_fare { color: var(--tenue); border-color: var(--bordo); background: var(--bianco); }
.stato.da_fare::before { border: 1.5px solid var(--tenue); }
.stato.in_corso { color: var(--viola); background: var(--giallo); border-color: var(--giallo); }
.stato.in_corso::before { background: var(--viola); }
.stato.fatto { color: var(--bianco); background: var(--viola); border-color: var(--viola); }
.stato.fatto::before { background: var(--giallo); }

/* ---- finestra di dialogo */
dialog { border: none; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(28, 20, 48, .3); color: var(--testo); }
dialog::backdrop { background: rgba(28, 20, 48, .45); }
dialog form, .dialogo { padding: 22px 24px; }
dialog h2 { margin-bottom: 16px; }
.azioni { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.azioni .sinistra { margin-right: auto; }

/* ---- schede del portale */
.sezioni { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.sezione { display: block; text-decoration: none; color: var(--testo); padding: 20px 22px; position: relative; overflow: hidden; }
.sezione::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--viola); }
.sezione:hover { border-color: var(--viola); }
.sezione:hover::before { background: var(--giallo); }
.sezione h2 { margin-bottom: 8px; }
.sezione p { margin: 0; color: var(--tenue); font-size: 12.5px; }

.numeri { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.numero { padding: 14px 16px; text-align: left; border: 1px solid var(--bordo); background: var(--bianco); border-radius: var(--raggio);
  color: var(--testo); display: block; font-weight: 300; box-shadow: var(--ombra); text-decoration: none; cursor: pointer; }
.numero:hover { border-color: var(--viola); }
.numero b { display: block; font-size: 26px; font-weight: 900; color: var(--viola); line-height: 1.1; }
.numero span { font-size: 11.5px; color: var(--tenue); }
.numero.scadute b { color: var(--rosso); }
.numero.attivo { border-color: var(--viola); box-shadow: 0 0 0 2px var(--viola); }

@media (max-width: 760px) {
  .testata-dentro { padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
  .testata .marchio img { height: 32px; }
  .testata { position: static; }
  .testata nav { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 4px 2px; }
  .testata nav a { white-space: nowrap; padding: 7px 11px; font-size: 12px; }
  .utente { margin-left: auto; }
  .utente .nome { display: none; }
  main { padding: 18px 14px 80px; }
  .campi.due { grid-template-columns: 1fr; }
  .numeri { grid-template-columns: repeat(2, 1fr); }
  dialog form, .dialogo { padding: 18px 16px; }
}
