html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Sidebar helpers */
.sidebar-sticky {
  position: sticky;
  top: 0;
}
.nav .nav-link {
  color: #333;
}
.nav .nav-link.active, .nav .nav-link:hover {
  background-color: #e9ecef;
}

/* Admin-like theme tweaks */
body {
  background-color: #f5f7fb;
}
.app-header {
    background: #084a3f; /* primary */
    color: #fff;
}
.card {
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 1px rgba(0,0,0,0.02);
}
.filter-card .form-label {
  font-weight: 600;
  font-size: 0.85rem;
}
.metrics .card-title {
  font-size: 0.9rem;
  color: #6b7280;
}
.metrics .card-text {
  font-size: 1.25rem;
}

/* Collapsible sidebar on desktop */
.sidebar {
  background: linear-gradient(180deg, #0d6efd 0%, #5aa0ff 100%);
  min-height: 100vh;
  flex: 0 0 240px; /* fixed width on desktop */
}
.sidebar .nav .nav-link {
  padding: 10px 14px;
  white-space: nowrap;          /* prevent wrapping in normal state */
  color: #eaf2ff;
}
.sidebar .nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.sidebar .nav .nav-link.active {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-weight: 600;
}
.sidebar.collapsed { flex: 0 0 60px; width: 60px !important; }
.sidebar.collapsed .nav .nav-link { text-align: center; padding-left: 0; padding-right: 0; overflow: hidden; white-space: nowrap; }
.sidebar.collapsed .nav { visibility: hidden; }
.sidebar.collapsed:hover .nav { visibility: visible; } /* still usable if expanded */
.sidebar.collapsed .nav .nav-link::after { display: none; }
.sidebar + .col { flex: 1 1 auto; }

/* Smooth transition */
.sidebar { transition: width .2s ease, flex-basis .2s ease; }
.sidebar.collapsed { transition: width .2s ease, flex-basis .2s ease; }