:root {
  --brand-dark: #1f6b3a;
  --brand: #2e8b4f;
  --brand-light: #eaf6ee;
}

body {
  background: #f4f6f8;
}

.app-navbar {
  background: linear-gradient(90deg, var(--brand-dark), var(--brand));
}

.app-wrapper {
  display: flex;
  align-items: flex-start;
  min-height: calc(100vh - 56px);
}

.app-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid #e2e6ea;
  min-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  overflow-y: auto;
}

.app-sidebar .nav-section {
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9aa5b1;
  padding: 0.9rem 0.9rem 0.25rem;
  letter-spacing: 0.05em;
}

.app-sidebar .nav-link {
  color: #33404d;
  padding: 0.45rem 0.9rem;
  border-radius: 0.375rem;
  font-size: 0.92rem;
}

.app-sidebar .nav-link i {
  width: 1.3rem;
  display: inline-block;
  text-align: center;
  color: #6c7a89;
}

.app-sidebar .nav-link:hover {
  background: var(--brand-light);
}

.app-sidebar .nav-link.active {
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.app-sidebar .nav-link.active i {
  color: #fff;
}

.app-content {
  flex: 1;
  min-width: 0;
}

.kpi-card {
  border: none;
  border-radius: 0.6rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.kpi-card .kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.kpi-card .kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8894a1;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.card-table {
  border: none;
  border-radius: 0.6rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

table.table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6c7a89;
  border-bottom-width: 1px;
}

.alert-tile {
  border-left: 4px solid var(--brand);
  background: #fff;
  border-radius: 0.4rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 0.5rem;
}

.alert-tile.severity-CRITICAL { border-left-color: #dc3545; }
.alert-tile.severity-WARNING  { border-left-color: #fd7e14; }
.alert-tile.severity-INFO     { border-left-color: #0dcaf0; }

@media (max-width: 991.98px) {
  .app-sidebar {
    position: fixed;
    left: -260px;
    top: 56px;
    height: calc(100vh - 56px);
    z-index: 1030;
    transition: left 0.2s ease;
  }
  .app-sidebar.show {
    left: 0;
  }
}

@media print {
  .app-sidebar, .app-navbar, .no-print { display: none !important; }
  .app-content { width: 100% !important; }
}
