:root {
  --navy: #1a3a52;
  --blue: #2c5aa0;
  --gold: #d4a574;
  --gold-light: #e8c7a0;
  --green: #27ae60;
  --red: #e74c3c;
  --orange: #e67e22;
  --yellow: #f39c12;
  --light-blue: #3498db;
  --bg: #f8f9fa;
  --white: #ffffff;
  --text: #333333;
  --text-muted: #666666;
  --border: #dddddd;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ── Navbar ── */
.navbar {
  background: var(--navy);
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.navbar-brand img {
  height: 50px;
  width: auto;
}

.navbar-brand-text h1 {
  font-size: 1.2em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--white);
}

.navbar-brand-text strong {
  display: block;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.navbar-brand-text span {
  display: block;
  font-size: 0.6em;
  opacity: 0.7;
  font-weight: 400;
}

.navbar-links {
  display: flex;
  gap: 4px;
}

.navbar-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-links a:hover,
.navbar-links a.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5em;
  cursor: pointer;
  padding: 8px;
}

/* ── Hero ── */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  padding: 120px 20px 30px;
  border-bottom: 4px solid var(--gold);
  background: var(--navy);
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(26, 58, 82, 0.7), rgba(44, 90, 160, 0.7));
  z-index: 1;
}

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

.hero h2 {
  font-size: 2.8em;
  margin-bottom: 12px;
  font-weight: 800;
}

.hero p {
  font-size: 1.2em;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-blue {
  background: var(--blue);
  color: var(--white);
}

.btn-blue:hover {
  background: var(--navy);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85em;
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-success {
  background: var(--green);
  color: var(--white);
}

.btn-success:hover {
  background: #219a52;
}

/* ── Layout ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: hidden;
}

.page-section {
  display: none;
  padding: 40px 0 60px;
  animation: fadeIn 0.3s ease;
}

.page-section.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.section-header {
  color: var(--navy);
  font-size: 1.8em;
  margin-bottom: 30px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

/* ── Dashboard Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  border-top: 3px solid var(--blue);
}

.stat-card h3 {
  color: var(--text-muted);
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .number {
  font-size: 2.5em;
  color: var(--blue);
  font-weight: 700;
}

.stat-card.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

/* ── Cards ── */
.card-grid {
  display: grid;
  gap: 20px;
}

#vobList {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 700px) {
  #vobList {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
  transition: transform 0.2s;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card h3 {
  color: var(--navy);
  margin-bottom: 10px;
  font-size: 1.2em;
}

.card p { color: var(--text-muted); }

.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* ── Badges ── */
.badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8em;
  display: inline-block;
}

.badge-category { background: #f3e5f5; color: #7b1fa2; }
.badge-proposed { background: #e3f2fd; color: #1976d2; }
.badge-in-progress { background: #fff3e0; color: #e65100; }
.badge-passed { background: #e8f5e9; color: #388e3c; }
.badge-failed { background: #ffebee; color: #d32f2f; }
.badge-suggestion { background: #e0f2f1; color: #00695c; }

/* ── Grades ── */
.grade { font-size: 2.2em; font-weight: 800; }
.grade-a { color: var(--green); }
.grade-b { color: var(--light-blue); }
.grade-c { color: var(--yellow); }
.grade-d { color: var(--orange); }
.grade-f { color: var(--red); }

.vet-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 0.55em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

.grade-breakdown {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 15px 0;
}

.grade-box {
  text-align: center;
  padding: 10px 8px;
  border-radius: 6px;
  font-size: 0.85em;
}

.grade-box .letter { font-weight: 700; }
.grade-box .count { font-size: 0.8em; color: var(--text-muted); }

.grade-box-a { background: #e8f5e9; }
.grade-box-b { background: #e3f2fd; }
.grade-box-c { background: #fff3e0; }
.grade-box-d { background: #ffe0b2; }
.grade-box-f { background: #ffebee; }

/* ── Kudos ── */
.kudos-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.kudos-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gold);
  color: var(--navy);
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.2s;
}

.kudos-btn:hover { background: var(--gold-light); transform: scale(1.05); }
.kudos-btn.voted { background: #ddd; color: #999; cursor: default; }

.kudos-count { font-weight: 700; color: var(--blue); font-size: 1.1em; }

/* ── Filter tabs ── */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: #eee;
  color: var(--text);
  border: 2px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: all 0.2s;
}

.filter-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); }
.filter-btn:hover { border-color: var(--blue); }

/* ── Forms ── */
.form-container {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 640px;
  margin: 0 auto;
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9em;
  color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1em;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-row input[type="checkbox"] { width: auto; }
.checkbox-row label { margin-bottom: 0; }

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.form-submit:hover { background: var(--navy); }

/* ── Alerts ── */
.alert {
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: none;
  font-weight: 500;
}

.alert.show { display: block; animation: fadeIn 0.3s ease; }

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border-left: 4px solid #4caf50;
}

.alert-info {
  background: #e3f2fd;
  color: #0d47a1;
  border-left: 4px solid #1976d2;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border-left: 4px solid #d32f2f;
}

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: #aaa;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

/* ── Footer ── */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.7);
  padding: 40px 20px;
  margin-top: 60px;
  text-align: center;
  font-size: 0.9em;
}

.footer a { color: var(--gold); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

.footer-links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 101;
  }

  .navbar-links.open { display: flex; }

  .navbar-links a {
    text-align: left !important;
    line-height: 1.6 !important;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .navbar-links a br { display: none; }

  .navbar-links .btn {
    margin-top: 4px;
    text-align: center !important;
    justify-content: center;
  }

  .navbar-toggle { display: block; }

  .hero h2 { font-size: 1.8em; }
  .hero { padding: 50px 20px; }

  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  .grade-breakdown { grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .grade-box { padding: 8px 4px; }

  .filter-bar { gap: 6px; }
  .filter-btn { padding: 6px 14px; font-size: 0.85em; }

  .form-container { padding: 20px; }

  .section-header { font-size: 1.4em; }

  .card { padding: 16px; overflow: hidden; }

  .kudos-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .kudos-bar .btn-sm {
    padding: 6px 10px;
    font-size: 0.75em !important;
  }

  .card-meta { font-size: 0.85em; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .navbar-brand-text h1 { font-size: 1em; }
}
