/* Layout generale */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background-color: #f5f6fa;
  color: #1f2933;
}

.app-wrapper {
  min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
  width: 250px;
  background: linear-gradient(180deg, #004b9b 0%, #002d61 100%);
  color: #ffffff;
}

.sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-logo {
  width: 70px;
  height: auto;
}

.sidebar-title {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.sidebar-link {
  color: rgba(255, 255, 255, 0.85);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.sidebar-link.active {
  background-color: #ffffff;
  color: #004b9b;
  font-weight: 600;
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.85rem;
}

/* Topbar */
.app-topbar {
  height: 70px;
  background-color: #ffffff;
  border-bottom: 1px solid #e1e4ea;
}

.app-page-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Contenuto e footer */
.app-content {
  flex: 1 0 auto;
}

.app-footer {
  background-color: #ffffff;
  border-top: 1px solid #e1e4ea;
}

/* KPI Card */
.kpi-card {
  border: none;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.kpi-card .card-body {
  padding: 1.1rem 1.2rem;
}

.kpi-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.35rem;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
}

.kpi-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6b7280;
  margin-left: 0.15rem;
}

.kpi-icon {
  position: absolute;
  right: 1.2rem;
  bottom: 0.9rem;
  font-size: 2rem;
  opacity: 0.15;
}

/* Login */
.login-body {
  background: radial-gradient(
    circle at top,
    #ffffff 0,
    #f0f4ff 40%,
    #e2e8ff 100%
  );
  min-height: 100vh;
}

.login-wrapper {
  min-height: 100vh;
}

.login-card {
  background-color: #ffffff;
  border-radius: 1.2rem;
  padding: 2rem 2.5rem;
  max-width: 380px;
  width: 100%;
}

.login-logo {
  width: 80px;
  height: auto;
}

/* Tabelle */
.table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
}

.table td {
  font-size: 0.9rem;
}

/* Responsività */
@media (max-width: 991.98px) {
  .app-sidebar {
    display: none; /* per semplicità, versione desktop-oriented */
  }

  .app-main {
    margin-left: 0;
  }
}
