/* ── Irim — stile globale ────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color: #222;
  background: #eef1f5;
}

/* ── navbar 20px ────────────────────────────────────────────────────────── */

nav.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 20px;
  line-height: 20px;
  background: #1b3a6b;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  z-index: 100;
}
nav.top a {
  color: #fff;
  text-decoration: none;
  padding: 0 8px;
  height: 20px;
  display: inline-block;
  opacity: .85;
}
nav.top a:hover { opacity: 1; background: #274c83; }
nav.top a.active { opacity: 1; background: #274c83; font-weight: bold; }
nav.top .brand {
  font-weight: bold;
  letter-spacing: .5px;
  padding: 0 10px 0 2px;
  border-right: 1px solid #38598f;
  margin-right: 4px;
}
nav.top .spacer { flex: 1; }
nav.top .user {
  opacity: .75;
  padding-right: 6px;
  border-right: 1px solid #38598f;
  margin-right: 2px;
}
nav.top a.logout { color: #ffd1d1; }

main { padding: 30px 0 40px; }
main.fullscreen {
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* home con mappa Leaflet a tutto schermo (sotto la navbar) */
main.home-map {
  padding: 0;
  position: fixed;
  top: 20px; left: 0; right: 0; bottom: 0;
}
main.home-map #mappa {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}
main.home-map .vuota {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,.94);
  border-radius: 10px;
  padding: 18px 26px;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
  color: #445;
  font-size: 14px;
  z-index: 500;
}
main.home-map .vuota a {
  color: #1e88e5;
  text-decoration: none;
  margin-left: 8px;
  font-weight: bold;
}

/* ── card pagina ────────────────────────────────────────────────────────── */

.wrap {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,.10);
  padding: 22px 28px;
}
.wrap h1 { color: #1b3a6b; font-size: 21px; margin: 0 0 4px; }
.wrap .sub { color: #667; margin: 0 0 18px; }

/* ── form ───────────────────────────────────────────────────────────────── */

label.nome { font-weight: bold; }
input[type=text] {
  width: 100%;
  padding: 9px;
  font-size: 15px;
  border: 1px solid #aab;
  border-radius: 6px;
  margin: 4px 0 16px;
}

.slot { margin-bottom: 14px; }
.slot .slabel { font-weight: bold; margin-bottom: 4px; }
.b {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 9px;
  font-weight: bold;
  vertical-align: middle;
}
.b.req { background: #ffe0e0; color: #c00; }
.b.opt { background: #e3e8ef; color: #557; }

.drop {
  border: 2px dashed #9bb;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  color: #789;
  cursor: pointer;
  background: #fafcff;
  transition: .15s;
}
.drop.over { border-color: #1e88e5; background: #e8f2fd; color: #1e88e5; }
.drop small { color: #9aa; }
.drop .files { margin-top: 6px; font-size: 12px; color: #2a7; font-weight: bold; }

.go {
  margin-top: 8px;
  background: #1e88e5;
  color: #fff;
  border: 0;
  padding: 12px 26px;
  font-size: 16px;
  border-radius: 7px;
  cursor: pointer;
}
.go:hover { background: #1565c0; }
.nota { font-size: 12px; color: #889; margin-top: 14px; }

/* ── esito ──────────────────────────────────────────────────────────────── */

.ok { color: #157a2e; font-size: 16px; }
.ko { color: #c00; font-size: 16px; }
table.ris { border-collapse: collapse; margin: 10px 0; }
table.ris td { border: 1px solid #bbc; padding: 5px 12px; }
ul.log {
  font-size: 13px;
  color: #556;
  background: #f6f8fb;
  border-radius: 6px;
  padding: 10px 26px;
}
a.apri {
  display: inline-block;
  margin-top: 10px;
  background: #2e7d32;
  color: #fff;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 7px;
  font-size: 15px;
}
a.back {
  display: inline-block;
  margin-top: 14px;
  color: #1e88e5;
  text-decoration: none;
}
a.back:hover { text-decoration: underline; }

/* ── lista comuni ───────────────────────────────────────────────────────── */

table.lst { width: 100%; border-collapse: collapse; font-size: 14px; }
table.lst th {
  text-align: left;
  background: #eef2f7;
  color: #445;
  padding: 8px 10px;
  border-bottom: 2px solid #d3dae3;
  font-weight: 600;
}
table.lst td { padding: 8px 10px; border-bottom: 1px solid #eaeef3; }
table.lst tr:hover td { background: #f7faff; }
table.lst a { color: #1e88e5; text-decoration: none; }
table.lst a:hover { text-decoration: underline; }
.vuoto { color: #889; font-style: italic; }
.nodata { color: #a99; font-style: italic; font-size: 12px; }

/* ── login (pagina standalone) ──────────────────────────────────────────── */

body.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1b3a6b 0%, #274c83 45%, #2e7d8a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  width: 100%;
  max-width: 420px;
  padding: 36px 34px;
}
.login-card .logo { text-align: center; margin-bottom: 20px; }
.login-card .badge {
  display: inline-block;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1e88e5, #2e7d8a);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  line-height: 54px;
  letter-spacing: .5px;
  box-shadow: 0 6px 16px rgba(30,136,229,.35);
}
.login-card h1 {
  color: #1b3a6b;
  font-size: 22px;
  margin: 0 0 4px;
  text-align: center;
}
.login-card .sub {
  color: #677;
  text-align: center;
  margin: 0 0 22px;
  font-size: 13px;
}
.login-card label {
  display: block;
  font-size: 12px;
  color: #556;
  margin-bottom: 6px;
  letter-spacing: .4px;
}
.login-card input[type=email] {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid #cbd3df;
  border-radius: 8px;
  outline: none;
  transition: .15s;
}
.login-card input[type=email]:focus {
  border-color: #1e88e5;
  box-shadow: 0 0 0 3px rgba(30,136,229,.18);
}
.login-card button {
  margin-top: 14px;
  width: 100%;
  background: #1e88e5;
  color: #fff;
  border: 0;
  padding: 12px;
  font-size: 15px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: .3px;
}
.login-card button:hover { background: #1565c0; }
.login-card .msg, .login-card .err {
  margin: 14px 0 0;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 4px;
}
.login-card .msg {
  background: #e8f4ec;
  color: #15602b;
  border-left: 3px solid #2e7d32;
}
.login-card .err {
  background: #fde8e8;
  color: #8a1a1a;
  border-left: 3px solid #c00;
}
.login-card .foot {
  margin-top: 22px;
  font-size: 11px;
  color: #889;
  text-align: center;
}
.login-card .foot b { color: #557; }
