/* Reset di base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f8f9fa; /* grigio chiaro Bootstrap */
  color: #212529;
  line-height: 1.5;
}

/* Layout */
.layout {
  display: flex;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 2rem;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d6efd; /* blu Bootstrap */
  color: #fff;
  padding: 0.75rem 1.25rem;
}

.topbar .brand {
  font-weight: bold;
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
}

.topnav a {
  color: #fff;
  margin-right: 1rem;
  text-decoration: none;
}

.topnav a:hover {
  text-decoration: underline;
}

.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-right .notif {
  margin-right: 1rem;
  color: #fff;
  text-decoration: none;
}

.badge {
  background: #dc3545; /* rosso Bootstrap */
  color: #fff;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75em;
}

/* Sidebar */
.sidebar {
  width: 220px;
  background: #343a40; /* grigio scuro Bootstrap */
  color: #fff;
  padding-top: 1rem;
}

.sidebar .menu {
  list-style: none;
  padding: 0;
}

.sidebar .menu li {
  margin-bottom: 0.5rem;
}

.sidebar .menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #adb5bd;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s, color 0.3s;
}

.sidebar .menu a:hover,
.sidebar .menu .active a {
  background: #0d6efd;
  color: #fff;
}

/* Card */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.25em;
}

/* Tabelle */
.table {
  width: 100%;
  margin-top: 1rem;
}

.table th, .table td {
  text-align: center;
  vertical-align: middle;
}

.table th {
  background: #e9ecef;
  font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: #f8f9fa;
}

/* Bottoni */
.btn {
  font-size: 0.9em;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.btn:hover {
  opacity: 0.9;
}

.btn-danger {
  background: #dc3545;
  border: none;
}

.btn-danger:hover {
  background: #bb2d3b;
}

.btn-outline {
  background: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
}

.btn-outline:hover {
  background: #6c757d;
  color: #fff;
}

/* Pulsanti stato */
.stato-btn {
  min-width: 120px;
  font-weight: 500;
  transition: all 0.3s ease;
}
.stato-btn.btn-outline-secondary:hover {
  background-color: #dee2e6;
}
.stato-btn.btn-warning:hover {
  background-color: #ffc107;
  opacity: 0.9;
}
.stato-btn.btn-success:hover {
  background-color: #198754;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: #343a40;
  color: #fff;
  text-align: center;
  padding: 0.75rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

/* Messaggi */
.success {
  color: #198754;
  margin-bottom: 0.75rem;
}

.info {
  color: #0d6efd;
  margin-bottom: 0.75rem;
}

.highlight {
  background: #fff3cd;
  padding: 0.5rem;
  border-radius: 4px;
}

/* Widgets */
.widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.widget {
  flex: 1 1 250px;
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.widget h2 {
  font-size: 1.1em;
  margin-bottom: 0.5rem;
}

.widget .value {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 1rem;
  color: #0d6efd;
}

/* Azioni rapide */
.quick-actions {
  list-style: none;
  padding: 0;
}

.quick-actions li {
  margin: 0.5rem 0;
}

.quick-actions a {
  text-decoration: none;
  color: #0d6efd;
  font-weight: 500;
}

.quick-actions a:hover {
  text-decoration: underline;
}

.sidebar .nav-link.active {
  background-color: #0d6efd; /* blu Bootstrap */
  border-radius: 4px;
  color: #fff !important;
}
.sidebar .nav-link:hover {
  background-color: #0d6efd;
  color: #fff !important;
}

.sidebar {
  min-height: 100vh; /* Sidebar a tutta altezza */
}
main.content {
  background-color: #f8f9fa;
}
