/* Base typography */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  margin-bottom: 60px;
  color: #212529;
  background: #f5f6fa;
}

/* Focus states */
.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;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  letter-spacing: -0.3px;
}

.navbar-dark .nav-link { font-weight: 500; }

/* Page headings */
h2 {
  font-weight: 700;
  font-size: 1.5rem;
  color: #1a1a2e;
}

h2 .bi {
  color: #4361ee;
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  border-radius: 0.75rem;
}

.card-header {
  background: #fff;
  font-weight: 600;
  border-bottom: 1px solid #eee;
}

/* Dashboard summary cards */
.dashboard-summary-card .card-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
}

.dashboard-summary-card .display-6 {
  font-size: clamp(1.5rem, 5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 0;
}

/* Mobile cards */
.dashboard-mobile-card {
  border-radius: 0.75rem;
}

.dashboard-stat-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-stat-item {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  padding: 0.75rem;
}

.dashboard-stat-label {
  color: #6c757d;
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.dashboard-stat-value {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Tables */
.table { font-size: 0.9rem; }
.table thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: #6c757d;
  border-bottom-width: 2px;
}

/* Status badges */
.badge { font-weight: 600; }

/* Weekly tracker */
.week-nav .btn {
  min-width: 2.5rem;
}

.war-col-header {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.75rem;
  max-height: 120px;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .war-col-header {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    max-height: none;
  }
}

/* Responsive */
@media (max-width: 767.98px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .dashboard-summary-card .card-body {
    padding: 1rem 0.75rem;
  }

  h2 { font-size: 1.25rem; }
}
