/* BadgePrint World Edition — CSS principale */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   VARIABILI
   ============================================================ */
:root {
  --blu:          #1a56db;
  --blu-scuro:    #1035a0;
  --blu-chiaro:   #3b82f6;
  --blu-hover:    #1446c2;
  --bianco:       #ffffff;
  --grigio-chiar: #f1f3f8;
  --grigio-med:   #dde1ea;
  --grigio-scuro: #6b7280;
  --testo:        #111827;
  --testo-soft:   #374151;
  --sfondo-app:   #eef0f7;
  --pericolo:     #dc2626;
  --successo:     #16a34a;
  --avviso:       #d97706;
  --info-bg:      #eff6ff;
  --nav-h:        62px;
  --radius:       9px;
  --radius-lg:    14px;
  --radius-xl:    20px;
  --shadow-xs:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow:       0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md:    0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.06);
  --shadow-lg:    0 10px 40px rgba(0,0,0,.13), 0 4px 12px rgba(0,0,0,.08);
  --transition:   .18s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  color: var(--testo);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LAYOUT AUTH
   ============================================================ */
body.layout-auth {
  background: linear-gradient(145deg, #071e5e 0%, #1a3fa8 50%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 4rem 1rem 2rem;
}

.auth-topbar {
  position: fixed;
  top: 0; right: 0;
  display: flex;
  align-items: center;
  padding: .75rem 1.25rem;
  z-index: 20;
}

.auth-container {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Brand above card */
.auth-brand {
  text-align: center;
  color: #fff;
}
.auth-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px; height: 64px;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: var(--radius-lg);
  font-size: 1.8rem;
  margin-bottom: .7rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.auth-brand-name {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
  display: block;
}
.auth-brand-sub {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  margin-top: .25rem;
  letter-spacing: .01em;
}

/* Auth card */
.auth-card {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2.25rem 2.5rem;
  width: 100%;
  border: 1px solid rgba(255,255,255,.9);
}
.auth-card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--testo);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Footer link below card */
.auth-footer {
  text-align: center;
  font-size: .84rem;
  color: rgba(255,255,255,.65);
}
.auth-footer a {
  color: rgba(255,255,255,.9);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* Links inside card */
.auth-link {
  text-align: center;
  margin-top: 1.25rem;
  font-size: .84rem;
  color: var(--grigio-scuro);
}
.auth-link a { color: var(--blu); font-weight: 600; text-decoration: none; }
.auth-link a:hover { text-decoration: underline; }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher {
  display: flex;
  gap: .25rem;
  align-items: center;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .26rem .58rem;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  line-height: 1;
}
body.layout-auth .lang-btn {
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.25);
}
body.layout-auth .lang-btn:hover,
body.layout-auth .lang-btn.attiva {
  background: rgba(255,255,255,.18);
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
body.layout-app .lang-btn {
  color: rgba(255,255,255,.7);
  border-color: rgba(255,255,255,.2);
}
body.layout-app .lang-btn:hover,
body.layout-app .lang-btn.attiva {
  background: rgba(255,255,255,.16);
  color: #fff;
  border-color: rgba(255,255,255,.5);
}

/* ============================================================
   LAYOUT APP
   ============================================================ */
body.layout-app {
  background: var(--sfondo-app);
  padding-top: var(--nav-h);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ----- Navbar ----- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: linear-gradient(90deg, #1035a0 0%, #1a56db 100%);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: .6rem;
  box-shadow: 0 2px 12px rgba(16,53,160,.35);
  z-index: 100;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: .5rem;
}
.navbar-brand-icon {
  width: 32px; height: 32px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  line-height: 1;
}
.navbar-brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .05rem;
  flex: 1;
}
.navbar-nav a, .nav-btn {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  padding: .4rem .8rem;
  border-radius: var(--radius);
  font-size: .85rem;
  font-weight: 500;
  border: none;
  background: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
  letter-spacing: -.005em;
}
.navbar-nav a:hover, .nav-btn:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
}

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border: 1px solid var(--grigio-med);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-width: 185px;
  z-index: 200;
  padding: .4rem 0;
  overflow: hidden;
}
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: .5rem 1.1rem;
  color: var(--testo-soft);
  font-size: .85rem;
  text-decoration: none;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown-menu a:hover {
  background: var(--info-bg);
  color: var(--blu);
}

/* Navbar right area */
.navbar-right {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
  flex-shrink: 0;
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.navbar-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  border: 2px solid rgba(255,255,255,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.navbar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 2px;
  border-radius: 50%;
}
.navbar-name {
  font-weight: 500;
  font-size: .84rem;
  color: rgba(255,255,255,.88);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.badge-admin-nav {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.88);
  padding: .12rem .45rem;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  flex-shrink: 0;
}

/* ============================================================
   MAIN CONTENT & FOOTER
   ============================================================ */
.main-content {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.75rem;
  flex: 1;
  width: 100%;
}

.site-footer {
  background: #0d1f5c;
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: .9rem 1.5rem;
  font-size: .78rem;
  letter-spacing: .01em;
}
.site-footer a { color: rgba(255,255,255,.6); }
.site-footer a:hover { color: rgba(255,255,255,.85); }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .87rem;
  border-left: 4px solid transparent;
  display: flex;
  align-items: center;
  gap: .65rem;
  box-shadow: var(--shadow-xs);
}
.flash-msg { flex: 1; line-height: 1.45; }
.flash-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  line-height: 1;
  opacity: .4;
  padding: .1rem .25rem;
  color: inherit;
  border-radius: 4px;
  transition: opacity var(--transition), background var(--transition);
}
.flash-close:hover { opacity: 1; background: rgba(0,0,0,.07); }

.flash-successo { background: #f0fdf4; color: #166534; border-color: #22c55e; }
.flash-errore   { background: #fef2f2; color: #991b1b; border-color: #ef4444; }
.flash-avviso   { background: #fffbeb; color: #92400e; border-color: #f59e0b; }
.flash-info     { background: #eff6ff; color: #1e40af; border-color: var(--blu-chiaro); }

.auth-container .flash {
  width: 100%;
  border-radius: var(--radius);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.page-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--testo);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff;
  border: 1px solid var(--grigio-med);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .9rem 1.35rem;
  border-bottom: 1px solid var(--grigio-med);
  background: var(--grigio-chiar);
}
.card-title  { font-size: .95rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.card-body   { padding: 1.35rem; }
.card-footer { padding: .8rem 1.35rem; border-top: 1px solid var(--grigio-med); background: var(--grigio-chiar); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--grigio-med);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.5rem;
  text-align: center;
  min-width: 120px;
  flex: 1;
  box-shadow: var(--shadow);
}
.stat-num { display: block; font-size: 2.1rem; font-weight: 800; color: var(--blu); letter-spacing: -.03em; }
.stat-lbl { font-size: .75rem; color: var(--grigio-scuro); letter-spacing: .03em; text-transform: uppercase; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.table th {
  background: linear-gradient(180deg, #1a56db 0%, #1446c2 100%);
  color: #fff;
  padding: .65rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  white-space: nowrap;
  letter-spacing: .02em;
}
.table th:first-child { border-radius: var(--radius) 0 0 0; }
.table th:last-child  { border-radius: 0 var(--radius) 0 0; }
.table td {
  padding: .6rem 1.1rem;
  border-bottom: 1px solid var(--grigio-chiar);
  vertical-align: middle;
  color: var(--testo-soft);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f8f9ff; }
.table.table-sm th, .table.table-sm td { padding: .38rem .8rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group  { margin-bottom: 1.1rem; }
.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-label  {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  margin-bottom: .38rem;
  color: var(--testo);
  letter-spacing: -.005em;
}
.form-input, .form-select {
  width: 100%;
  padding: .58rem .9rem;
  border: 1.5px solid #d1d5db;
  border-radius: var(--radius);
  font-size: .9rem;
  font-family: inherit;
  color: var(--testo);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
.form-input::placeholder { color: #9ca3af; }
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--blu);
  box-shadow: 0 0 0 3.5px rgba(26,86,219,.12);
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
}
.form-hint   { font-size: .78rem; color: var(--grigio-scuro); margin-top: .32rem; line-height: 1.4; }
.required    { color: var(--pericolo); }
.form-section {
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--grigio-scuro);
  margin: 1.6rem 0 .8rem;
  padding-bottom: .45rem;
  border-bottom: 1.5px solid var(--grigio-med);
}
input[type="color"].form-input { padding: .3rem .4rem; height: 42px; cursor: pointer; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .58rem 1.2rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background var(--transition), box-shadow var(--transition), opacity var(--transition), transform var(--transition);
  white-space: nowrap;
  line-height: 1.3;
  letter-spacing: -.005em;
}
.btn:hover   { transform: translateY(-1px); }
.btn:active  { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.btn-primary {
  background: linear-gradient(180deg, #1a56db 0%, #1446c2 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26,86,219,.35);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #1d5fe8 0%, #1446c2 100%);
  box-shadow: 0 4px 12px rgba(26,86,219,.4);
}

.btn-outline {
  background: transparent;
  color: var(--blu);
  border: 1.5px solid var(--blu);
}
.btn-outline:hover {
  background: var(--info-bg);
  box-shadow: 0 2px 6px rgba(26,86,219,.12);
}

.btn-ghost {
  background: transparent;
  color: var(--grigio-scuro);
}
.btn-ghost:hover { background: var(--grigio-med); color: var(--testo); }

.btn-danger {
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(220,38,38,.3);
}
.btn-danger:hover {
  background: linear-gradient(180deg, #f56565 0%, #dc2626 100%);
  box-shadow: 0 4px 10px rgba(220,38,38,.35);
}

.btn-success {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(22,163,74,.3);
}
.btn-success:hover {
  background: linear-gradient(180deg, #34d26f 0%, #16a34a 100%);
  box-shadow: 0 4px 10px rgba(22,163,74,.35);
}

.btn-sm    { padding: .32rem .7rem; font-size: .8rem; }
.btn-lg    { padding: .72rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; margin-top: .5rem; }

.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-list  { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }

/* ============================================================
   STATUS BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  background: var(--grigio-med);
  color: #444;
  letter-spacing: .02em;
}
.badge-info     { background: #eff6ff;  color: #1d4ed8; }
.badge-success  { background: #f0fdf4;  color: #166534; }
.badge-warning  { background: #fffbeb;  color: #92400e; }
.badge-danger   { background: #fef2f2;  color: #991b1b; }
.badge-pending  { background: #fffbeb;  color: #92400e; }
.badge-active   { background: #f0fdf4;  color: #166534; }
.badge-disabled { background: #fef2f2;  color: #991b1b; }

/* ============================================================
   PENDING PAGE
   ============================================================ */
.pending-box {
  text-align: center;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.25rem;
  width: 100%;
}
.pending-box h1 { font-size: 1.45rem; font-weight: 800; margin-bottom: .8rem; letter-spacing: -.02em; }
.pending-box p  { color: var(--grigio-scuro); font-size: .95rem; line-height: 1.7; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--grigio-scuro);
  font-size: .9rem;
}

/* ============================================================
   ITEM LIST
   ============================================================ */
.item-list    { list-style: none; }
.item-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 0;
  border-bottom: 1px solid var(--grigio-chiar);
  gap: .5rem;
}
.item-list li:last-child { border-bottom: none; }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  font-weight: 700;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--grigio-scuro);
  margin: 1.1rem 0 .55rem;
  padding-bottom: .35rem;
  border-bottom: 1.5px solid var(--grigio-med);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted  { color: var(--grigio-scuro); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-1 { margin-top: .5rem; }  .mt-2 { margin-top: 1rem; }  .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; } .gap-1 { gap: .5rem; } .align-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

code {
  background: var(--grigio-chiar);
  padding: .12em .4em;
  border-radius: 4px;
  font-size: .84em;
  font-family: "SF Mono", "Fira Code", monospace;
  border: 1px solid var(--grigio-med);
  color: #c7254e;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .navbar-name  { display: none; }
  .navbar-nav a, .nav-btn { padding: .38rem .6rem; font-size: .82rem; }
}

@media (max-width: 768px) {
  .tpl-layout  { grid-template-columns: 1fr; }
  .form-row    { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 1.3rem; }
  .main-content   { padding: 1.25rem 1rem; }
  .auth-card      { padding: 1.75rem 1.5rem; }
  .stat-grid      { flex-direction: column; }
}

/* ============================================================
   COMPATIBILITÀ CON CLASSI VECCHIE
   ============================================================ */
.auth-box   { max-width: 420px; margin: 3rem auto; background: #fff;
              border: 1px solid var(--grigio-med); border-radius: var(--radius-lg);
              padding: 2rem; box-shadow: var(--shadow); }
.auth-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -.02em; }

.site-header  { display: none; }
.main-nav     { display: none; }
.header-user  { display: none; }
.header-inner { display: none; }

/* ============================================================
   LOGIN — layout 2 colonne
   ============================================================ */
.login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
@media (max-width: 700px) {
  .login-layout { grid-template-columns: 1fr; }
}

.login-info-card {
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-xl);
  padding: 1.85rem 1.65rem;
  color: #fff;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
}
.login-info-icon {
  font-size: 2.4rem;
  margin-bottom: .8rem;
  line-height: 1;
}
.login-info-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: .95rem;
  color: #fff;
  letter-spacing: -.02em;
}
.login-info-card p {
  font-size: .875rem;
  line-height: 1.6;
  color: rgba(255,255,255,.82);
  margin-bottom: .65rem;
}
.login-info-card strong { color: #fff; }
.login-info-contact {
  margin-top: 1rem !important;
  padding-top: .8rem;
  border-top: 1px solid rgba(255,255,255,.18);
}
.login-info-contact a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
  font-size: .84rem;
}
.login-info-contact a:hover { text-decoration: underline; color: #bfdbfe; }

.auth-container { max-width: 920px; }

/* ============================================================
   DASHBOARD — barra statistiche
   ============================================================ */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 600px) { .dash-stats { grid-template-columns: 1fr; } }

.dash-stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.35rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blu);
  display: flex;
  flex-direction: column;
  gap: .25rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.dash-stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.dash-stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--blu);
  line-height: 1;
  letter-spacing: -.04em;
}
.dash-stat-label {
  font-size: .75rem;
  color: var(--grigio-scuro);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

/* ============================================================
   STATS — cards totali piattaforma
   ============================================================ */
.stats-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stats-total-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: box-shadow var(--transition);
}
.stats-total-card:hover { box-shadow: var(--shadow-md); }
.stats-total-num {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--blu);
  line-height: 1;
  display: block;
  letter-spacing: -.04em;
}
.stats-total-label {
  font-size: .74rem;
  color: var(--grigio-scuro);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: .3rem;
  display: block;
  font-weight: 600;
}

/* PDF breakdown mini-bar */
.pdf-bar { display: flex; gap: 3px; flex-wrap: wrap; }
.pdf-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .71rem;
  font-weight: 600;
}

/* ============================================================
   NAVBAR — modalità admin
   ============================================================ */
.navbar.navbar-admin {
  background: linear-gradient(90deg, #5a0a0a 0%, #7f1010 100%);
  box-shadow: 0 2px 12px rgba(90,10,10,.4);
}
.navbar-admin-badge {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 5px;
  font-size: .6rem;
  font-weight: 800;
  padding: 2px 6px;
  letter-spacing: .09em;
  vertical-align: middle;
  margin-left: .35rem;
  line-height: 1.5;
}

/* ============================================================
   OVERLAY CARICAMENTO FILE
   ============================================================ */
#upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,20,60,.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}
#upload-overlay.visibile {
  display: flex;
}
.upload-overlay-box {
  background: #fff;
  border-radius: var(--radius-xl);
  padding: 2.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-lg);
}
.upload-spinner {
  width: 46px;
  height: 46px;
  border: 4px solid var(--grigio-med);
  border-top-color: var(--blu);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
.upload-hourglass {
  font-size: 1.5rem;
  line-height: 1;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
