:root {
  --navy: #0a2a4a;
  --navy-deep: #061c33;
  --blue: #007ab3;
  --blue-soft: #e8f4fb;
  --silver: #c5d4e0;
  --page: #f4f7fb;
  --text: #1c2b3a;
  --muted: #5b6b7c;
  --danger: #c0392b;
  --radius: 16px;
}

html {
  font-size: 15px;
  height: 100%;
}
body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--page);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.public-main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); }

.public-header {
  background: #fff;
  border-bottom: 1px solid #e4ebf2;
  box-shadow: 0 8px 24px rgba(10, 42, 74, 0.04);
}
.public-header .navbar-brand img { height: 46px; width: auto; }
.public-header .nav-link {
  color: var(--navy) !important;
  font-weight: 600;
  padding: 0.55rem 0.9rem !important;
}
.public-header .nav-link.active,
.public-header .nav-link:hover { color: var(--blue) !important; }

.btn-primary {
  --bs-btn-bg: var(--blue);
  --bs-btn-border-color: var(--blue);
  --bs-btn-hover-bg: #006494;
  --bs-btn-hover-border-color: #006494;
  --bs-btn-active-bg: #0a2a4a;
  --bs-btn-active-border-color: #0a2a4a;
  border-radius: 10px;
  font-weight: 600;
}
.btn-navy {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
}
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-outline-navy {
  border: 1px solid var(--navy);
  color: var(--navy);
  border-radius: 10px;
  font-weight: 600;
}
.btn-outline-navy:hover { background: var(--navy); color: #fff; }

.hero-panel {
  background: linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, #0d4a73 100%);
  color: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  margin: 1.5rem 0 2rem;
}
.hero-panel h1 { font-weight: 700; letter-spacing: -0.02em; }
.hero-panel p { color: #cfe4f3; max-width: 640px; }

.choice-card {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: 20px;
  padding: 1.75rem;
  height: 100%;
  box-shadow: 0 12px 30px rgba(10, 42, 74, 0.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.choice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(10, 42, 74, 0.1);
}
.choice-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.form-shell { max-width: 980px; margin: 0 auto 3rem; }
.form-section {
  background: #fff;
  border: 1px solid #e6eef5;
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem 1.2rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 10px 28px rgba(10, 42, 74, 0.04);
}
.form-section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--blue-soft);
}
.form-label { font-weight: 600; color: var(--navy); }
.form-control, .form-select {
  border-radius: 10px;
  border-color: #d5e0ea;
  padding: .62rem .8rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 .2rem rgba(0, 122, 179, .15);
}
.required::after { content: " *"; color: var(--danger); }
.date-tr { background-color: #fff; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--blue);
  border-color: var(--blue);
}
.flatpickr-months .flatpickr-month { color: var(--navy); }

.page-footer {
  background: #fff;
  border-top: 1px solid #e4ebf2;
  color: var(--muted);
  padding: 1.25rem 0;
  margin-top: auto;
  flex-shrink: 0;
}

.admin-shell { min-height: 100vh; display: flex; background: var(--page); }
.admin-sidebar {
  width: 260px;
  background: linear-gradient(180deg, var(--navy-deep), var(--navy));
  color: #fff;
  padding: 1.4rem 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.admin-sidebar img { height: 42px; filter: brightness(0) invert(1); }
.admin-sidebar .brand-wrap {
  background: rgba(255,255,255,.08);
  border-radius: 12px;
  padding: .7rem .8rem;
  margin-bottom: 1.4rem;
}
.admin-nav .nav-link {
  color: #c9d7e4;
  border-radius: 10px;
  padding: .65rem .8rem;
  margin-bottom: .25rem;
  font-weight: 600;
}
.admin-nav .nav-link:hover,
.admin-nav .nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #e4ebf2;
  padding: .9rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-card {
  background: #fff;
  border-radius: 18px;
  padding: 1.3rem 1.4rem;
  border: 1px solid #e6eef5;
  box-shadow: 0 10px 24px rgba(10, 42, 74, 0.05);
}
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.table thead th {
  background: #f0f6fb;
  color: var(--navy);
  font-weight: 700;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.table-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e6eef5;
  overflow: hidden;
}
.detail-grid dt { color: var(--muted); font-weight: 600; font-size: .82rem; }
.detail-grid dd { font-weight: 600; color: var(--navy); margin-bottom: .9rem; }
.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 2rem 0;
}
.login-card {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 22px;
  padding: 2rem;
  box-shadow: 0 20px 50px rgba(10, 42, 74, .1);
}
.preview-img {
  max-width: 100%;
  max-height: 280px;
  border-radius: 12px;
  border: 1px solid #e6eef5;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 991px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
}
