html {
  font-size: 15px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

:root {
  --app-bg: #f4f7fb;
  --app-surface: rgba(255, 255, 255, 0.86);
  --app-surface-solid: #ffffff;
  --app-primary: #123b6b;
  --app-primary-soft: #1f5da8;
  --app-accent: #1f8a70;
  --app-warning: #f59e0b;
  --app-danger: #c2410c;
  --app-text: #12324a;
  --app-muted: #64748b;
  --app-border: rgba(18, 59, 107, 0.12);
  --app-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

html {
  position: relative;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(31, 93, 168, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(31, 138, 112, 0.14), transparent 24%),
    linear-gradient(180deg, #eef3f9 0%, #f8fbff 100%);
}

body {
  min-height: 100vh;
  color: var(--app-text);
  background: transparent;
  margin-bottom: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-navbar {
  background: linear-gradient(135deg, #0f2747 0%, #163d6d 52%, #1f5da8 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.app-navbar .navbar-brand,
.app-navbar .nav-link,
.app-navbar .navbar-text,
.app-navbar .btn-link.nav-link {
  color: rgba(255, 255, 255, 0.92) !important;
}

.app-navbar .nav-link:hover,
.app-navbar .btn-link.nav-link:hover,
.app-navbar .navbar-brand:hover {
  color: #ffffff !important;
}

.app-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.app-brand-mark svg,
.menu-icon svg,
.stat-icon svg,
.page-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.app-nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.55rem 0.9rem !important;
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.app-nav-link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.14);
}

.app-nav-link.active {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.app-page {
  padding: 1.5rem 0 2.5rem;
}

.app-page-header {
  background: linear-gradient(135deg, rgba(18, 59, 107, 0.97), rgba(31, 93, 168, 0.94));
  color: #fff;
  border-radius: 1.5rem;
  padding: 1.5rem 1.75rem;
  box-shadow: var(--app-shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.app-page-header .page-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.78);
}

.app-page-header .page-title {
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-page-header .page-subtitle {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.82);
}

.app-panel,
.card,
.table,
.table-responsive {
  border-color: var(--app-border);
}

.app-panel,
.card {
  background: var(--app-surface);
  backdrop-filter: blur(12px);
  border-radius: 1.25rem;
  box-shadow: var(--app-shadow);
}

.app-panel .card-header,
.card .card-header {
  background: rgba(18, 59, 107, 0.04);
  border-bottom: 1px solid var(--app-border);
  font-weight: 600;
}

.app-stat-card {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 1.25rem;
}

.app-stat-card::after {
  content: "";
  position: absolute;
  inset: auto -15% -35% auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.stat-label {
  color: var(--app-muted);
  font-size: 0.86rem;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.85rem;
  color: #fff;
}

.stat-icon.primary { background: linear-gradient(135deg, #1f5da8, #123b6b); }
.stat-icon.success { background: linear-gradient(135deg, #1f8a70, #12624e); }
.stat-icon.warning { background: linear-gradient(135deg, #f59e0b, #c2410c); }
.stat-icon.indigo { background: linear-gradient(135deg, #475569, #1e293b); }

.filter-bar {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--app-border);
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: var(--app-shadow);
}

.table thead th {
  border-bottom-width: 1px;
  color: var(--app-primary);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(31, 93, 168, 0.025);
}

.btn {
  border-radius: 0.9rem;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #1f5da8, #123b6b);
  border-color: #123b6b;
  box-shadow: 0 8px 18px rgba(18, 59, 107, 0.18);
}

.btn-outline-primary {
  color: #123b6b;
  border-color: rgba(18, 59, 107, 0.24);
}

.btn-outline-primary:hover {
  background: #123b6b;
  border-color: #123b6b;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-shell {
  margin-top: auto;
  background: rgba(15, 23, 42, 0.92);
  color: rgba(255, 255, 255, 0.78);
  padding: 1rem 0;
}

.footer-shell .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.text-muted {
  color: var(--app-muted) !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .form-select:focus {
  box-shadow: 0 0 0 0.15rem rgba(31, 93, 168, 0.15), 0 0 0 0.28rem rgba(31, 93, 168, 0.20);
}

.form-control,
.form-select {
  border-radius: 0.9rem;
  border-color: rgba(18, 59, 107, 0.18);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 767.98px) {
  .app-page-header {
    padding: 1.25rem;
  }

  .footer-shell .container {
    flex-direction: column;
    text-align: center;
  }
}