/* TJ Barat Competition System - Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette - Dark Premium */
  --bg-main: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-glass: rgba(17, 24, 39, 0.75);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(99, 102, 241, 0.3);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #6366f1;
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);

  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(6, 182, 212, 0.1) 0%, transparent 40%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-cyan);
}

/* ---------------- Layout & Navbar ---------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  transition: var(--transition);
}

.nav-container {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.brand-badge {
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.925rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-link.active {
  color: var(--accent-cyan);
  border-bottom: 2px solid var(--accent-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Demo Role Switcher in Top Bar */
.role-switcher-dropdown {
  position: relative;
}

.btn-demo-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-demo-switch:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

.demo-menu {
  position: absolute;
  top: 120%;
  right: 0;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 1001;
}

.demo-menu.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.demo-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

.demo-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.demo-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
  font-weight: 600;
}

/* User Avatar & Dropdown */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}

.avatar-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}

.role-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-super_admin { background: rgba(244, 63, 94, 0.2); color: #fda4af; border: 1px solid rgba(244, 63, 94, 0.4); }
.role-panitia { background: rgba(245, 158, 11, 0.2); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.4); }
.role-juri { background: rgba(168, 85, 247, 0.2); color: #e9d5ff; border: 1px solid rgba(168, 85, 247, 0.4); }
.role-peserta { background: rgba(16, 185, 129, 0.2); color: #a7f3d0; border: 1px solid rgba(16, 185, 129, 0.4); }
.role-public { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.4); }

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* Flash Messages */
.flash-container {
  margin-bottom: 1.5rem;
}

.alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  font-size: 0.925rem;
  font-weight: 500;
  animation: slideDown 0.3s ease-out;
}

.alert-success { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.4); color: #6ee7b7; }
.alert-danger { background: rgba(244, 63, 94, 0.15); border: 1px solid rgba(244, 63, 94, 0.4); color: #fda4af; }
.alert-warning { background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.4); color: #fde68a; }
.alert-info { background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.4); color: #a5f3fc; }

.alert-close {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ---------------- Hero & Page Headers ---------------- */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  margin-bottom: 2.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff 30%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.15rem;
  max-width: 650px;
  margin-bottom: 2rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 1.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* ---------------- Cards & Surfaces ---------------- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ---------------- Stat Cards Grid ---------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.icon-blue { background: rgba(59, 130, 246, 0.18); color: #60a5fa; }
.icon-purple { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
.icon-emerald { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.icon-amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
.icon-rose { background: rgba(244, 63, 94, 0.18); color: #fb7185; }
.icon-cyan { background: rgba(6, 182, 212, 0.18); color: #22d3ee; }

.stat-value {
  font-size: 1.85rem;
  font-weight: 800;
  font-family: var(--font-heading);
  line-height: 1.1;
  color: #fff;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.2rem;
}

/* ---------------- Grid Layouts ---------------- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ---------------- Competitions Cards ---------------- */
.comp-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.comp-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-lg);
}

.comp-card-banner {
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.comp-badge-cat {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.comp-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.comp-name {
  font-size: 1.25rem;
  font-weight: 700;
}

.comp-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.comp-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ---------------- Tables ---------------- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
  text-align: left;
}

.table-custom th {
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0.9rem 1.2rem;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-color);
}

.table-custom td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.table-custom tr:last-child td {
  border-bottom: none;
}

.table-custom tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.status-ongoing { background: rgba(6, 182, 212, 0.15); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.status-scheduled { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; border: 1px solid rgba(99, 102, 241, 0.3); }
.status-finished, .status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.status-pending, .status-registration { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.status-cancelled, .status-rejected, .status-disqualified { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

.live-dot {
  width: 8px;
  height: 8px;
  background-color: #22d3ee;
  border-radius: 50%;
  box-shadow: 0 0 8px #22d3ee;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ---------------- Buttons & Forms ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-color);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-success { background: var(--accent-emerald); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--accent-rose); color: #fff; }
.btn-danger:hover { background: #e11d48; }

.btn-warning { background: var(--accent-amber); color: #000; }
.btn-warning:hover { background: #d97706; }

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}

/* Form Controls */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.95rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.925rem;
  font-family: var(--font-body);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-5-5h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.25rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

/* ---------------- Filter Toolbar ---------------- */
.filter-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ---------------- Modals ---------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 1.5rem;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ---------------- Enhanced Dashboard Styles ---------------- */
.dashboard-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(6, 182, 212, 0.1) 50%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45), 0 0 30px rgba(99, 102, 241, 0.15);
  backdrop-filter: blur(20px);
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.module-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.module-hub-card {
  position: relative;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  text-decoration: none;
  overflow: hidden;
}

.module-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--module-accent, var(--primary)), transparent);
  opacity: 0.7;
  transition: var(--transition);
}

.module-hub-card:hover {
  transform: translateY(-4px);
  border-color: var(--module-accent, var(--primary-glow));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 20px var(--module-glow, rgba(99, 102, 241, 0.2));
}

.module-hub-card:hover::before {
  opacity: 1;
  height: 4px;
}

.module-hub-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--module-icon-bg, rgba(99, 102, 241, 0.15));
  color: var(--module-accent, var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.05);
}

.quick-action-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  transition: var(--transition);
}

.quick-btn-pill:hover {
  background: rgba(99, 102, 241, 0.25);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.chart-container-box {
  position: relative;
  height: 250px;
  width: 100%;
}

.timeline-item-dash {
  display: flex;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  align-items: center;
  transition: var(--transition);
}

.timeline-item-dash:hover {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
}

/* ---------------- Animations ---------------- */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 2rem; }
  .hero-section { padding: 2rem 1.5rem; }
  .module-hub-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------- Professional Print Stylesheet ---------------- */
/* Mencetak HANYA bagian peringkat/dokumen resmi tanpa navbar, sidebar & tombol */
@media print {
  @page {
    size: A4 portrait;
    margin: 1.5cm 1.2cm;
  }

  *, *::before, *::after {
    background: transparent !important;
    color: #000000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.4 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Sembunyikan seluruh elemen navigasi, sidebar, tombol, filter, & flash */
  .navbar,
  .admin-sidebar,
  .page-header .btn,
  .page-header select,
  .page-header a,
  .quick-action-bar,
  .role-switcher-dropdown,
  .btn,
  .btn-demo-switch,
  .flash-container,
  .sidebar-nav-group,
  .nav-actions,
  .alert,
  .badge-filter,
  .no-print {
    display: none !important;
    visibility: hidden !important;
  }

  .admin-layout-wrapper {
    display: block !important;
    min-height: auto !important;
    width: 100% !important;
  }

  .admin-content-area {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }

  /* Tampilan Kartu & Dokumen Cetak */
  .card, .card-glass, .printable-doc {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 1.5rem 0 !important;
    backdrop-filter: none !important;
  }

  .page-header {
    border-bottom: 2px solid #000000 !important;
    padding-bottom: 0.75rem !important;
    margin-bottom: 1.25rem !important;
  }

  .page-title {
    font-size: 16pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
  }

  .page-desc {
    font-size: 10pt !important;
    color: #333333 !important;
  }

  /* Format Tabel Cetak Bersih & Rapi */
  .table-responsive {
    overflow: visible !important;
    width: 100% !important;
  }

  .table-custom {
    width: 100% !important;
    border-collapse: collapse !important;
    border: 1.5px solid #000000 !important;
    margin-top: 0.75rem !important;
  }

  .table-custom th {
    background-color: #f1f5f9 !important;
    color: #000000 !important;
    font-weight: 800 !important;
    border: 1px solid #000000 !important;
    padding: 6pt 8pt !important;
    font-size: 10pt !important;
    text-transform: uppercase !important;
  }

  .table-custom td {
    border: 1px solid #000000 !important;
    padding: 6pt 8pt !important;
    font-size: 10pt !important;
    color: #000000 !important;
  }

  .table-custom tr {
    page-break-inside: avoid !important;
  }

  /* Badge Ranking Cetak */
  .leaderboard-rank {
    border: 1.5px solid #000000 !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-weight: 800 !important;
    box-shadow: none !important;
    width: 26px !important;
    height: 26px !important;
    font-size: 10pt !important;
  }

  .status-badge {
    border: 1px solid #000000 !important;
    background: transparent !important;
    color: #000000 !important;
    padding: 2px 6px !important;
    font-size: 9pt !important;
    font-weight: 700 !important;
  }

  /* Header Kop & Footer Tanda Tangan Cetak */
  .print-only {
    display: block !important;
    visibility: visible !important;
  }

  .print-kop-header {
    display: block !important;
    text-align: center;
    border-bottom: 2.5px solid #000000;
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .print-kop-header h2 {
    font-size: 14pt !important;
    font-weight: 800 !important;
    color: #000000 !important;
    margin: 0 !important;
    text-transform: uppercase;
  }

  .print-kop-header h1 {
    font-size: 16pt !important;
    font-weight: 900 !important;
    color: #000000 !important;
    margin: 3pt 0 !important;
    text-transform: uppercase;
  }

  .print-kop-header p {
    font-size: 9pt !important;
    color: #333333 !important;
    margin: 0 !important;
  }

  .print-signature-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
    text-align: center;
    page-break-inside: avoid;
  }

  .print-signature-box {
    font-size: 10pt;
  }

  .print-signature-space {
    height: 2cm;
  }

  .print-signature-name {
    font-weight: 800;
    text-decoration: underline;
  }
}

.print-only {
  display: none;
}

/* Rank & Score Utility Classes */
.rank-score-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}
.rank-score-1 {
  color: var(--accent-amber) !important;
}
.rank-score-2 {
  color: #cbd5e1 !important;
}
.rank-score-3 {
  color: #d97706 !important;
}

.rank-card-box {
  background: rgba(15, 23, 42, 0.7);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
}
.rank-card-border-1 {
  border-color: rgba(245, 158, 11, 0.4) !important;
}
.rank-card-border-2 {
  border-color: rgba(148, 163, 184, 0.4) !important;
}
.rank-card-border-3 {
  border-color: rgba(217, 119, 6, 0.4) !important;
}

.row-champion {
  background: rgba(245, 158, 11, 0.08) !important;
}


