:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --card-bg: rgba(255, 255, 255, 0.9);
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: 250px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-right: 1px solid rgba(0,0,0,0.05);
  z-index: 1000;
  padding: 1.5rem 1rem;
  box-shadow: 4px 0 24px rgba(0,0,0,0.02);
}

.sidebar-section-label {
  letter-spacing: 1px;
}

/* Hover state for sidebar nav links (previously referenced in markup but
   never defined, so links had no hover feedback) */
.nav-link.hover-bg-light:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.main-content {
  margin-left: 250px;
  min-height: 100vh;
  padding-bottom: 2rem;
}

/* Header */
.top-header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  height: 70px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Cards */
.glass-card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  padding: 1.5rem;
  height: 100%;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1e293b;
}

.kpi-title {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

/* Oversized decorative icon behind the "Total Armada" KPI card */
.icon-decor {
  font-size: 5rem;
  right: -10px;
  top: -10px;
}

.table-custom th {
  background-color: #f8fafc;
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-bottom-width: 1px;
}

.table-custom td {
  vertical-align: middle;
  color: #475569;
  font-size: 0.875rem;
}

.badge-custom {
  padding: 0.35em 0.65em;
  font-weight: 500;
  border-radius: 50rem;
}

/* ---------------------------------------------------------------
   Layout / sizing utilities
   Consolidates one-off inline styles that were scattered across
   index.php (icon boxes, avatar, search box, chart heights, etc.)
   so sizing lives in one place and is reusable.
------------------------------------------------------------------ */
.brand-icon { width: 32px; height: 32px; }
.icon-btn { width: 40px; height: 40px; }
.avatar-circle { width: 40px; height: 40px; }
.search-box { width: 250px; }
.filter-select { width: auto; }

.text-2xs { font-size: 0.7rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }

.chart-h-sm { height: 200px; }
.chart-h-md { height: 280px; }
.chart-h-lg { height: 300px; }
.chart-h-xl { height: 220px; min-height: 220px; }

/* Status distribution (doughnut legend) and gangguan legend dots */
.status-dot,
.legend-dot {
  display: inline-block;
  border-radius: 50%;
}
.status-dot { width: 10px; height: 10px; margin-right: 5px; }
.legend-dot { width: 12px; height: 12px; margin-right: 10px; }

.status-label { color: #64748b; letter-spacing: 0.5px; }
.status-value { color: #334155; }
.status-sublabel { color: #94a3b8; }
.legend-label { color: #475569; }
.legend-value { color: #1e293b; }

/* Mobile sidebar backdrop, shown when the sidebar is toggled open */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 999;
}
.sidebar-backdrop.show {
  display: block;
}

/* Visible keyboard focus state (accessibility) */
.nav-link:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  .sidebar.show {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}
