/* Tema HSL Advisors --------------------------------------------------- */
:root {
  --hsl-scuro: #12263f;
  --hsl-medio: #1d3f66;
  --hsl-accento: #2f7fd1;
  --hsl-fondo: #f4f6f9;
  --hsl-bordo: #e3e7ee;
}

body.app-body {
  background: var(--hsl-fondo);
  color: #1f2937;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

/* --- barra superiore --- */
.app-navbar {
  background: linear-gradient(90deg, var(--hsl-scuro), var(--hsl-medio));
  box-shadow: 0 1px 6px rgba(18, 38, 63, .25);
}
.app-navbar .navbar-brand { color: #fff; }
.app-navbar .navbar-brand:hover { color: #dbe7f5; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: #fff; color: var(--hsl-scuro);
  font-weight: 700; letter-spacing: .5px; font-size: .95rem;
}
.brand-title { font-size: 1rem; font-weight: 600; line-height: 1.1; }
.brand-sub { font-size: .72rem; opacity: .75; font-weight: 400; }
.app-menu { min-width: 18rem; }

/* --- launcher --- */
.app-tile {
  display: block; height: 100%; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--hsl-bordo); border-radius: 14px;
  padding: 1.25rem; transition: transform .12s ease, box-shadow .12s ease;
}
.app-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(18, 38, 63, .12);
  color: inherit;
}
.app-tile .tile-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 12px; font-size: 1.6rem;
  color: #fff; margin-bottom: .85rem;
}
.app-blu    { background: #2f7fd1; }
.app-verde  { background: #2e9e6b; }
.app-viola  { background: #7159c1; }
.app-ambra  { background: #d98324; }
.app-teal   { background: #17879c; }
.app-indaco { background: #4257b2; }
.app-grigio { background: #6b7684; }
.app-rosso  { background: #c0473f; }
.app-tile h2 { font-size: 1.02rem; font-weight: 600; margin-bottom: .35rem; }
.app-tile p { font-size: .84rem; color: #64748b; margin-bottom: 0; }

/* --- superfici --- */
.card { border: 1px solid var(--hsl-bordo); border-radius: 12px; }
.card-header {
  background: #fff; border-bottom: 1px solid var(--hsl-bordo);
  font-weight: 600; font-size: .92rem;
}
.table { font-size: .88rem; }
.table > thead th {
  text-transform: uppercase; font-size: .72rem; letter-spacing: .04em;
  color: #64748b; font-weight: 600; border-bottom-width: 1px;
}
.table-hover > tbody > tr:hover > * { background: #eef4fb; }
.tabella-compatta td, .tabella-compatta th { padding: .45rem .6rem; vertical-align: middle; }

.form-label { font-size: .82rem; font-weight: 600; color: #475569; margin-bottom: .2rem; }
.form-text { font-size: .76rem; }
.badge-stato { font-size: .72rem; font-weight: 600; }

.nav-tabs .nav-link { font-size: .88rem; color: #475569; }
.nav-tabs .nav-link.active { font-weight: 600; color: var(--hsl-medio); }

.anteprima-testo {
  background: #0f172a; color: #e2e8f0; border-radius: 10px;
  padding: 1rem; font-size: .78rem; line-height: 1.45;
  max-height: 32rem; overflow: auto; white-space: pre;
}

.elenco-selezione { max-height: 22rem; overflow-y: auto; }

.app-footer { background: #fff; border-top: 1px solid var(--hsl-bordo); }

.riquadro-stat {
  background: #fff; border: 1px solid var(--hsl-bordo); border-radius: 12px;
  padding: .9rem 1.1rem;
}
.riquadro-stat .valore { font-size: 1.5rem; font-weight: 700; color: var(--hsl-scuro); }
.riquadro-stat .etichetta {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b;
}

@media (max-width: 576px) {
  .table-responsive { font-size: .82rem; }
}
