/* assets/css/style.css */

:root {
  --navy:   #0a2463;
  --navy2:  #1e3a8a;
  --gold:   #c8aa00;
  --gold2:  #e8c900;
  --cream:  #fffef8;
  --light:  #f0f4ff;
  --dark:   #1a1a2e;
  --text:   #2d3748;
  --muted:  #718096;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
}

/* ── Hero Canvas ──────────────────────────────────────────── */
#hero-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: -1;
  pointer-events: none;
}

.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a8a 60%, #0f172a 100%);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 50px;
  overflow: hidden;
  text-align: center;
}

.hero-section canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; }

.hero-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  padding: 8px;
  backdrop-filter: blur(6px);
  border: 2px solid rgba(200,170,0,0.6);
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 16px rgba(200,170,0,0.4));
}

.hero-title {
  color: #fff;
  font-size: clamp(22px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-title span { color: var(--gold2); }

.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: clamp(13px, 2vw, 16px);
  margin: 0;
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(200,170,0,0.15);
  border: 1px solid rgba(200,170,0,0.4);
  color: var(--gold2);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ── Nav ──────────────────────────────────────────────────── */
.hsd-nav {
  background: rgba(10,36,99,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 20px;
}

.hsd-nav .navbar-brand {
  color: var(--gold2) !important;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hsd-nav .nav-link {
  color: rgba(255,255,255,0.8) !important;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s;
}

.hsd-nav .nav-link:hover,
.hsd-nav .nav-link.active { color: var(--gold2) !important; }

/* ── Cards ────────────────────────────────────────────────── */
.rave-card {
  background: #fff;
  border: 1px solid rgba(10,36,99,0.1);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(10,36,99,0.08);
  padding: 32px;
  transition: box-shadow .25s, transform .25s;
}

.rave-card:hover { box-shadow: 0 8px 32px rgba(10,36,99,0.14); }

.cert-card {
  background: linear-gradient(135deg, #fff 0%, #f8f4e8 100%);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}

.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--gold), var(--navy));
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(200,170,0,0.25);
}

.cert-badge {
  position: absolute;
  top: 16px; right: 16px;
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(10,36,99,0.1);
  outline: none;
}

.form-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 6px;
}

.char-counter {
  font-size: 12px;
  text-align: right;
  color: var(--muted);
  margin-top: 4px;
}

.char-counter.ok   { color: #16a34a; }
.char-counter.warn { color: #d97706; }
.char-counter.bad  { color: #dc2626; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn-hsd {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: 0.3px;
}

.btn-hsd:hover {
  background: linear-gradient(135deg, #0c2d7a, var(--navy));
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10,36,99,0.3);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  color: var(--navy);
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(200,170,0,0.35);
  color: var(--navy);
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: #3c4043;
  border: 1.5px solid #dadce0;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  width: 100%;
  justify-content: center;
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #4285f4;
  box-shadow: 0 2px 8px rgba(66,133,244,0.2);
  color: #3c4043;
}

/* ── Standards grid ───────────────────────────────────────── */
.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.standard-card {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: #fff;
  position: relative;
}

.standard-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.standard-card:has(input:checked),
.standard-card.selected {
  border-color: var(--navy);
  background: var(--light);
  box-shadow: 0 0 0 3px rgba(10,36,99,0.12);
}

.standard-icon { font-size: 26px; margin-bottom: 8px; }
.standard-label { font-weight: 700; font-size: 13px; color: var(--text); }
.standard-desc  { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ── Status badges ────────────────────────────────────────── */
.status-pill {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pending  { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-emailed  { background: #dbeafe; color: #1e40af; }

/* ── Admin table ──────────────────────────────────────────── */
.admin-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.admin-table th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
}
.admin-table th:first-child { border-radius: 8px 0 0 0; }
.admin-table th:last-child  { border-radius: 0 8px 0 0; }
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  vertical-align: middle;
}
.admin-table tr:hover td { background: var(--light); }

/* ── Stat cards ───────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: box-shadow .2s;
}
.stat-card:hover { box-shadow: 0 4px 20px rgba(10,36,99,0.1); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-icon.navy   { background: var(--light); }
.stat-icon.gold   { background: #fef9c3; }
.stat-icon.green  { background: #d1fae5; }
.stat-icon.red    { background: #fee2e2; }
.stat-num  { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1; }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 3px; }

/* ── Login page ───────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy), #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* ── Footer ───────────────────────────────────────────────── */
.hsd-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.6);
  padding: 20px;
  text-align: center;
  font-size: 13px;
  margin-top: 60px;
  border-top: 3px solid var(--gold);
}

.hsd-footer a { color: var(--gold2); text-decoration: none; }

/* ── Alerts ───────────────────────────────────────────────── */
.alert-hsd {
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  border: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .5s ease both; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .rave-card { padding: 20px; }
  .hero-section { min-height: 200px; padding: 30px 16px 36px; }
  .standards-grid { grid-template-columns: repeat(2, 1fr); }
}
