/* ═══════════════════════════════════════════════
   IDFB - Indonesia Cycling Event Platform
   Main Stylesheet
═══════════════════════════════════════════════ */

:root {
  --primary:      #1a3a5c;
  --primary-dark: #0f2540;
  --accent:       #f97316;
  --accent-dark:  #ea6a00;
  --success:      #22c55e;
  --danger:       #ef4444;
  --warning:      #f59e0b;
  --light-bg:     #f8fafc;
  --card-bg:      #ffffff;
  --border:       #e2e8f0;
  --text:         #1e293b;
  --text-muted:   #64748b;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);
  --transition:   all 0.25s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--light-bg);
  line-height: 1.6;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-family: 'Poppins', sans-serif; font-weight: 700; }

/* ═══════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════ */
#mainNav {
  background: var(--primary);
  padding: 12px 0;
  transition: var(--transition);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

#mainNav.scrolled {
  background: var(--primary-dark);
  padding: 8px 0;
}

.brand-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}

.brand-icon svg { width: 18px; height: 18px; color: white; }
.brand-icon.small { width: 28px; height: 28px; }

.brand-text {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: white;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  padding: 6px 14px !important;
  border-radius: 8px;
  transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: white !important;
  background: rgba(255,255,255,0.12);
}

.avatar-xs {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
}
.avatar-xs svg { width: 14px; height: 14px; }

.small-icon { width: 14px !important; height: 14px !important; }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  min-height: 92vh;
  background: linear-gradient(135deg, var(--primary) 0%, #0a2038 60%, #0f172a 100%);
  position: relative;
  display: flex; align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="40" fill="rgba(249,115,22,0.06)"/><circle cx="80" cy="80" r="60" fill="rgba(249,115,22,0.04)"/></svg>') center/cover;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(249,115,22,0.15);
  border: 1px solid rgba(249,115,22,0.3);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1.2rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: white;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero h1 span { color: var(--accent); }

.hero p { color: rgba(255,255,255,0.75); font-size: 1.1rem; max-width: 520px; }

.hero-stats {
  display: flex; gap: 2rem;
  margin-top: 2.5rem;
}

.hero-stat strong {
  display: block;
  font-size: 1.6rem; font-weight: 800;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.hero-stat span { font-size: 0.82rem; color: rgba(255,255,255,0.6); }

.hero-visual {
  position: relative;
  display: flex; justify-content: center; align-items: center;
}

.hero-circle {
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(249,115,22,0.15), rgba(249,115,22,0.03));
  border: 1px solid rgba(249,115,22,0.2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.hero-icon-big svg {
  width: 180px; height: 180px;
  color: rgba(249,115,22,0.5);
  stroke-width: 0.8;
}

.hero-float-card {
  position: absolute;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 18px;
  color: white;
}

.hero-float-card.card1 { top: 30px; left: -20px; }
.hero-float-card.card2 { bottom: 60px; right: -10px; }
.hero-float-card .fc-num { font-size: 1.3rem; font-weight: 700; color: var(--accent); }
.hero-float-card .fc-label { font-size: 0.75rem; opacity: 0.7; }

.scroll-down {
  position: absolute; bottom: 30px; left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  animation: bounce 2s infinite;
  cursor: pointer;
}
.scroll-down svg { width: 24px; height: 24px; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ═══════════════════════════════════════════════
   SECTION STYLES
═══════════════════════════════════════════════ */
section { padding: 80px 0; }

.section-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(249,115,22,0.1);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 0.8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text);
  margin-bottom: 0.5rem;
}

.section-subtitle { color: var(--text-muted); font-size: 1rem; max-width: 500px; }

/* ═══════════════════════════════════════════════
   EVENT CARDS
═══════════════════════════════════════════════ */
.event-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border);
  height: 100%;
}

.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(249,115,22,0.3);
}

.event-card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.event-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.event-card:hover .event-card-img img { transform: scale(1.05); }

.event-card-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase;
}

.badge-published { background: rgba(34,197,94,0.9); color: white; }
.badge-closed    { background: rgba(239,68,68,0.9); color: white; }
.badge-draft     { background: rgba(100,116,139,0.9); color: white; }
.badge-completed { background: rgba(99,102,241,0.9); color: white; }

.event-card-date {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--primary);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  text-align: center;
  line-height: 1.2;
}
.event-card-date .day { font-size: 1.3rem; font-weight: 700; font-family: 'Poppins', sans-serif; }
.event-card-date .month { font-size: 0.7rem; text-transform: uppercase; opacity: 0.8; }

.event-card-body { padding: 20px; }
.event-card-body h5 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.event-card-body h5 a { color: var(--text); text-decoration: none; }
.event-card-body h5 a:hover { color: var(--accent); }

.event-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.event-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 0.8rem; color: var(--text-muted);
}
.event-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }

.event-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}

.event-price { font-weight: 700; color: var(--accent); font-size: 0.95rem; }
.event-price small { display: block; font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

/* ═══════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════ */
.btn-primary {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dark) !important; border-color: var(--accent-dark) !important; }

.btn-outline-primary {
  color: var(--accent) !important;
  border-color: var(--accent) !important;
}
.btn-outline-primary:hover {
  background: var(--accent) !important;
  color: white !important;
}

.btn-idfb {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  transition: var(--transition);
}
.btn-idfb:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════
   HOW IT WORKS
═══════════════════════════════════════════════ */
.steps-section { background: var(--primary); }
.steps-section .section-title { color: white; }
.steps-section .section-subtitle { color: rgba(255,255,255,0.65); }

.step-card {
  text-align: center;
  padding: 30px 20px;
  position: relative;
}

.step-number {
  width: 60px; height: 60px;
  background: rgba(249,115,22,0.15);
  border: 2px solid rgba(249,115,22,0.4);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem; font-weight: 800;
  color: var(--accent);
  font-family: 'Poppins', sans-serif;
}

.step-icon {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.step-icon svg { width: 28px; height: 28px; color: var(--accent); }

.step-card h5 { color: white; font-size: 1rem; margin-bottom: 8px; }
.step-card p  { color: rgba(255,255,255,0.6); font-size: 0.875rem; margin: 0; }

.step-arrow {
  position: absolute;
  right: -20px; top: 50%;
  transform: translateY(-50%);
  color: rgba(249,115,22,0.4);
}
.step-arrow svg { width: 24px; height: 24px; }

/* ═══════════════════════════════════════════════
   STATS
═══════════════════════════════════════════════ */
.stats-section { background: var(--light-bg); }

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 56px; height: 56px;
  background: rgba(249,115,22,0.1);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}
.stat-icon svg { width: 26px; height: 26px; color: var(--accent); }

.stat-num {
  font-size: 2.2rem; font-weight: 800;
  color: var(--primary);
  font-family: 'Poppins', sans-serif;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════
   FORM STYLES
═══════════════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary) 0%, #0a2038 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.form-control, .form-select {
  border-radius: 10px;
  border: 1.5px solid var(--border);
  padding: 10px 14px;
  font-size: 0.925rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

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

.input-group .form-control { border-radius: 10px !important; }
.input-group .btn { border-radius: 0 10px 10px 0 !important; }

.password-toggle { cursor: pointer; border-left: none !important; }

/* ═══════════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════════ */
.dashboard-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: sticky; top: 80px;
}

.dash-nav .nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 500; font-size: 0.9rem;
  transition: var(--transition);
}

.dash-nav .nav-link:hover { background: var(--light-bg); color: var(--text); }
.dash-nav .nav-link.active { background: rgba(249,115,22,0.1); color: var(--accent); }
.dash-nav .nav-link svg { width: 16px; height: 16px; }

.stat-mini {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-mini .num { font-size: 1.8rem; font-weight: 800; font-family: 'Poppins', sans-serif; }

/* ═══════════════════════════════════════════════
   REGISTRATION BADGE
═══════════════════════════════════════════════ */
.reg-status {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem; font-weight: 600;
}
.reg-pending   { background: #fff7ed; color: #c2410c; }
.reg-confirmed { background: #f0fdf4; color: #15803d; }
.reg-cancelled { background: #fef2f2; color: #dc2626; }
.pay-pending   { background: #fefce8; color: #a16207; }
.pay-paid      { background: #f0fdf4; color: #15803d; }
.pay-rejected  { background: #fef2f2; color: #dc2626; }

/* ═══════════════════════════════════════════════
   EVENT DETAIL
═══════════════════════════════════════════════ */
.event-hero {
  background: var(--primary);
  padding: 60px 0 0;
  position: relative;
  overflow: hidden;
}

.event-hero-img {
  width: 100%; max-height: 440px;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.category-card {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover, .category-card.selected {
  border-color: var(--accent);
  background: rgba(249,115,22,0.04);
}

.category-card.full { opacity: 0.6; cursor: not-allowed; }

.quota-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.quota-fill { height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.5s ease; }

/* ═══════════════════════════════════════════════
   ADMIN
═══════════════════════════════════════════════ */
.admin-sidebar {
  min-height: 100vh;
  background: var(--primary);
  width: 250px;
  position: fixed; left: 0; top: 0;
  padding: 0 0 40px;
  overflow-y: auto;
  z-index: 999;
}

.admin-sidebar .brand { padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar .nav-link {
  color: rgba(255,255,255,0.7) !important;
  padding: 10px 24px !important;
  display: flex; align-items: center; gap: 10px;
  font-size: 0.9rem; font-weight: 500;
  transition: var(--transition);
  border-radius: 0;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  color: white !important;
  background: rgba(255,255,255,0.1);
  border-left: 3px solid var(--accent);
  padding-left: 21px !important;
}
.admin-sidebar .nav-section {
  padding: 20px 24px 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.35);
  font-weight: 600;
}

.admin-content { margin-left: 250px; padding: 28px; min-height: 100vh; }
.admin-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  margin-left: 250px;
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.table th { font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); }
.table td { font-size: 0.9rem; vertical-align: middle; }

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer { background: #0c1e35; }
.footer-top { padding: 60px 0 40px; }
.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-heading { color: rgba(255,255,255,0.9); font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.text-muted-footer { color: rgba(255,255,255,0.45) !important; font-size: 0.875rem; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; display: flex; align-items: center; }
.footer-links a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.875rem; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); }
.footer-links svg { flex-shrink: 0; color: rgba(255,255,255,0.35); }

.social-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: var(--transition);
}
.social-icon:hover { background: var(--accent); color: white; }
.social-icon svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════ */
.alert-flash { animation: slideDown 0.3s ease; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════
   PAGE HERO (inner pages)
═══════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0a2038 100%);
  padding: 50px 0;
  color: white;
}

.page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); color: white; margin-bottom: 8px; }
.breadcrumb-item { font-size: 0.85rem; }
.breadcrumb-item a { color: rgba(255,255,255,0.6); }
.breadcrumb-item.active { color: rgba(255,255,255,0.85); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.35); }

/* ═══════════════════════════════════════════════
   UTILITY
═══════════════════════════════════════════════ */
.card { border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-header { background: white; border-bottom: 1px solid var(--border); font-weight: 600; }

.badge-earlybird {
  background: rgba(249,115,22,0.12);
  color: var(--accent);
  border: 1px solid rgba(249,115,22,0.25);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.72rem; font-weight: 600;
}

.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; display: none;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 991px) {
  .admin-sidebar { width: 100%; min-height: auto; position: relative; }
  .admin-content, .admin-topbar { margin-left: 0; }
  .hero { min-height: auto; padding: 80px 0 60px; }
  .hero-visual { display: none; }
  .hero-stats { flex-wrap: wrap; gap: 1rem; }
}

@media (max-width: 767px) {
  section { padding: 50px 0; }
  .auth-card { padding: 28px 20px; }
  .event-card-img { height: 160px; }
}
