:root {
  --pc-blue: #0c447c;       /* blu istituzionale */
  --pc-blue-700: #0a3a68;
  --pc-accent: #d85a30;     /* arancione protezione civile, usato con parsimonia */
}

body { background: #f4f5f7; }

/* Navbar */
.app-navbar { background: var(--pc-blue); }
.app-navbar .navbar-brand { font-weight: 500; }

/* Primario in tinta istituzionale */
.btn-primary { --bs-btn-bg: var(--pc-blue); --bs-btn-border-color: var(--pc-blue); --bs-btn-hover-bg: var(--pc-blue-700); --bs-btn-hover-border-color: var(--pc-blue-700); }
a { color: var(--pc-blue); }

/* Layout corpo: sidebar + contenuto */
.app-body { display: flex; min-height: calc(100vh - 56px); }
.app-sidebar { width: 230px; background: #fff; border-right: 1px solid #e6e7ea; padding: .75rem 0; }
.app-sidebar .nav-link { color: #44464a; border-radius: 0; padding: .55rem 1.1rem; display: flex; align-items: center; gap: .6rem; }
.app-sidebar .nav-link:hover { background: #f0f2f5; }
.app-sidebar .nav-link.active { color: var(--pc-blue); background: #eaf1f9; box-shadow: inset 3px 0 0 var(--pc-accent); font-weight: 500; }
.app-main { flex: 1; padding: 1.5rem; max-width: 100%; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { background: #fff; border-radius: 14px; padding: 2rem; width: 100%; max-width: 380px; box-shadow: 0 6px 24px rgba(12,68,124,.12); }
.brand-badge { width: 56px; height: 56px; border-radius: 14px; background: var(--pc-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }

/* Tabella */
.table > :not(caption) > * > * { padding: .55rem .6rem; }

@media (max-width: 768px) {
  .app-body { flex-direction: column; }
  .app-sidebar { width: 100%; display: flex; overflow-x: auto; }
  .app-sidebar .nav { flex-direction: row !important; flex-wrap: nowrap; }
}

/* Dashboard */
.dash-icon {
  width: 56px; height: 56px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 68, 124, 0.1); color: #0c447c; font-size: 1.6rem; flex: 0 0 auto;
}
.card a:hover .dash-icon { background: rgba(12, 68, 124, 0.18); }

/* Sidebar: intestazione gruppo */
.nav-section {
  display: block; padding: .5rem .75rem .15rem; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .03em; color: rgba(255,255,255,.55);
}
.app-sidebar .nav .nav .nav-link { font-size: .95rem; padding-top: .3rem; padding-bottom: .3rem; }
