:root {
  --bw-teal: #36b6a8;
  --bw-blue: #1c3f63;
  --bw-dark-teal: #155e52;
  --bw-grey: #6b7280;
  --bw-bg: #f4f8f8;
  --bw-gradient: linear-gradient(135deg, var(--bw-teal) 0%, var(--bw-blue) 100%);
}

body {
  background-color: var(--bw-bg);
  padding-bottom: 76px; /* space for mobile bottom nav */
}

.navbar-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-brand-wrap img {
  height: 36px;
  width: 36px;
}

.bw-navbar {
  background: var(--bw-gradient);
  /* Above page furniture that comes later in the document - the home page's
     sticky header sits at 1030, and without this its backdrop swallowed the
     open dropdowns. */
  position: relative;
  z-index: 1040;
}

.bw-navbar .navbar-brand,
.bw-navbar .nav-link {
  color: #ffffff !important;
}

.bw-navbar .nav-link.active {
  font-weight: 700;
  text-decoration: underline;
}

/* Icon and label share a baseline instead of each item sitting at its own
   height, which is what makes a row of mixed icon/text links look ragged. */
.bw-navbar .navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 8px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.bw-navbar .navbar-nav .nav-link:hover,
.bw-navbar .navbar-nav .nav-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

@media (min-width: 768px) {
  .bw-navbar .navbar-nav {
    align-items: center;
  }
  /* Smaller only once the menu is a horizontal row - the collapsed mobile
     menu keeps full-size text for touch. */
  .bw-navbar .navbar-nav .nav-link {
    font-size: 0.8125rem;
    padding: 0.4rem 0.55rem;
    white-space: nowrap;
  }
  .bw-navbar .navbar-brand-wrap span {
    font-size: 1rem;
  }
  /* Let the main menu wrap onto a second line rather than push the account
     menu (and its Logout) off the right edge. */
  .bw-navbar .navbar-nav.me-auto {
    flex-wrap: wrap;
  }
  .bw-navbar .bw-account-nav {
    flex-shrink: 0;
  }
  .bw-navbar form.d-flex input[type="search"] {
    min-width: 130px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bw-navbar .navbar-nav .nav-link {
    transition: none;
  }
  .bw-navbar .navbar-nav .nav-link:hover,
  .bw-navbar .navbar-nav .nav-link:focus-visible {
    transform: none;
  }
}

.bw-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(28, 63, 99, 0.08);
}

.bw-stat-card {
  border-radius: 14px;
  color: #fff;
  background: var(--bw-gradient);
}

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

.btn-bw-primary {
  background: var(--bw-gradient);
  border: none;
  color: #fff;
}

.btn-bw-primary:hover {
  opacity: 0.92;
  color: #fff;
}

.text-bw-teal {
  color: var(--bw-dark-teal) !important;
}

.badge-paid {
  background-color: #1f9d55;
}

.badge-partial {
  background-color: #d97706;
}

.badge-unpaid {
  background-color: #dc2626;
}

/* Mobile bottom navigation */
.bw-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  z-index: 1030;
}

.bw-bottom-nav a {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.1rem;
  font-size: 0.65rem;
  color: var(--bw-grey);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-bottom-nav a.active {
  color: var(--bw-dark-teal);
  font-weight: 700;
}

.bw-bottom-nav i {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 2px;
}

@media (min-width: 768px) {
  .bw-bottom-nav {
    display: none;
  }
  body {
    padding-bottom: 0;
  }
}

.attendance-row.absent {
  background-color: #fef2f2;
}

.attendance-row.present {
  background-color: #f0fdf4;
}

.login-card {
  max-width: 380px;
  margin: 6vh auto;
}

.login-logo {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 1rem;
}

.table-responsive-cards .card {
  border-radius: 12px;
}

@media print {
  .no-print,
  .bw-navbar,
  .bw-bottom-nav {
    display: none !important;
  }
  body {
    padding-bottom: 0;
    background: #fff;
  }
}
