:root {
  --bg: #0b0b0d;
  --card: #111116;
  --text: #f5f5f5;
  --muted: #b3b3b3;
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.12);
  --radius: 14px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.65);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

body {
  background: radial-gradient(circle at top, #181824 0, #050509 55%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

/* --- SHELL --- */

.shell {
  width: 100%;
  max-width: 1080px;
  background: linear-gradient(145deg, #050509 0, #101018 40%, #050509 100%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 28px 26px 26px;
  position: relative;
  overflow: hidden;
}

.shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 0 0, rgba(212, 175, 55, 0.12), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(255, 255, 255, 0.06), transparent 55%);
  opacity: 0.9;
  pointer-events: none;
}

.shell-inner {
  position: relative;
  z-index: 1;
}

/* --- HEADER --- */

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0, #ffffff 0, #f5e6b8 18%, #b88a1f 40%, #1a1204 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b0b0d;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text span:first-child {
  font-size: 13px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-text span:last-child {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* --- NAV --- */

nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px 14px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(5, 5, 9, 0.7);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease-out;
}

.pill span.dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.18);
}

.pill.primary {
  border-color: rgba(212, 175, 55, 0.7);
  background: linear-gradient(135deg, #1a1405 0, #2b2109 40%, #0b0802 100%);
  color: #f9f3df;
}

.pill:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.9);
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}

/* --- HERO --- */

main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
}

@media (max-width: 820px) {
  main {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hero {
  padding: 18px 18px 20px;
  border-radius: var(--radius);
  background: radial-gradient(circle at 0 0, rgba(212, 175, 55, 0.16), transparent 60%),
    #09090f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.hero-tag span.badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero h1 span {
  color: var(--accent);
}

.hero-sub {
  font-size: 14px;
  color: var(--muted);
  max-width: 420px;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--muted);
}

.hero-meta span strong {
  color: var(--accent);
  font-weight: 600;
}

.hero-glow {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0, #ffffff 0, #f5e6b8 18%, #b88a1f 40%, #1a1204 100%);
  opacity: 0.16;
  filter: blur(1px);
}

/* --- PANEL --- */

.panel {
  padding: 16px 16px 14px;
  border-radius: var(--radius);
  background: #07070b;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .panel-grid {
    grid-template-columns: 1fr;
  }
}

.card-link {
  border-radius: 12px;
  padding: 10px 11px;
  background: linear-gradient(135deg, #0b0b11 0, #050507 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.16s ease-out;
  position: relative;
  overflow: hidden;
}

.card-link:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.7);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7);
}

.card-title {
  font-size: 13px;
  font-weight: 600;
}

.card-title span {
  color: var(--accent);
}

.card-sub {
  font-size: 11px;
  color: var(--muted);
}

.card-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-top: 2px;
}

/* --- FOOTER --- */

footer {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}

footer span strong {
  color: var(--accent);
  font-weight: 600;
}
/* LOGIN PAGE */

.shell.small {
  max-width: 480px;
}

header.centered {
  justify-content: center;
}

.login-area {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-title {
  text-align: center;
  font-size: 22px;
}

.login-title span {
  color: var(--accent);
}

.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.login-label {
  font-size: 13px;
  color: var(--muted);
}

.login-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f0f14;
  color: var(--text);
  font-size: 14px;
}

.login-btn {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(212,175,55,0.7);
  background: linear-gradient(135deg, #1a1405 0, #2b2109 40%, #0b0802 100%);
  color: #f9f3df;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.4);
}

.login-error {
  display: none;
  color: #ff6b6b;
  font-size: 13px;
  text-align: center;
  margin-top: 6px;
}
/* AREA MAESTRI */

.hero .badge {
  color: var(--accent);
}

.hero-actions .pill {
  margin-bottom: 6px;
}

.panel .card-link {
  min-height: 110px;
}
/* REGISTRO ASSENZE */

.lux-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.lux-table th {
  color: var(--accent);
  text-align: left;
  padding: 12px;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.lux-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* POPUP */

.popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
}

.popup-box {
  background: #0f0f14;
  padding: 24px;
  border-radius: 18px;
  width: 90%;
  max-width: 420px;
  border: 1px solid rgba(255,255,255,0.08);
}

.popup-title {
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--accent);
}

.close {
  text-align: center;
  margin-top: 10px;
}

.close a {
  color: var(--accent);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
}
/* GIUSTIFICAZIONI */

.successo-msg {
  display: none;
  margin-top: 14px;
  text-align: center;
  color: var(--accent);
  font-size: 14px;
}
/* CORSI */

.panel-grid .card-link {
  min-height: 120px;
}
/* BACHECA */

.panel-grid .card-link {
  min-height: 120px;
}