@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

/* ================================
   MILAD KE-7 MTsN 3 LUMAJANG
   Design Tokens — Islami & Premium
================================ */
:root {
  /* Brand Colors — MTsN Green + MILAD Gold */
  --green-900: #1B5E20;
  --green-800: #2E7D32;
  --green-700: #388E3C;
  --green-600: #43A047;
  --green-100: #E8F5E9;
  --green-50:  #F1F8E9;

  --gold-700:  #B8860B;
  --gold-500:  #C5971A;
  --gold-400:  #D4AC0D;
  --gold-300:  #F0C040;
  --gold-100:  #FFF8DC;

  --navy-900:  #0D1B2A;
  --navy-800:  #1A2744;
  --navy-700:  #1E3A5F;

  --primary:        var(--green-800);
  --primary-hover:  var(--green-900);
  --primary-light:  var(--green-100);
  --primary-subtle: #C8E6C9;

  --secondary:       var(--gold-500);
  --secondary-hover: var(--gold-700);
  --secondary-light: var(--gold-100);

  --accent:  #1565C0;
  --error:   #C62828;
  --error-light: #FFEBEE;

  --bg-page:     #F5F7F0;
  --bg-card:     #FFFFFF;
  --bg-card-alt: #F0F4EC;

  --text-primary:   #1A2A1A;
  --text-secondary: #4A6741;
  --text-muted:     #8BA888;

  --border:       #D4E2D0;
  --border-focus: var(--green-700);

  --shadow-xs: 0 1px 2px rgba(27,94,32,0.05);
  --shadow-sm: 0 2px 4px rgba(27,94,32,0.08), 0 1px 2px rgba(27,94,32,0.04);
  --shadow-md: 0 6px 16px rgba(27,94,32,0.10), 0 2px 4px rgba(27,94,32,0.06);
  --shadow-lg: 0 12px 28px rgba(27,94,32,0.12), 0 4px 8px rgba(27,94,32,0.06);
  --shadow-gold: 0 4px 20px rgba(197,151,26,0.25);

  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   22px;
  --radius-full: 9999px;

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

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================
   NAVBAR — Gaya Sesuai Referensi Pengguna
================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 58px;
  z-index: 100;
  background: #5d7946;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logos {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Logo MTsN 3 — bulat tajam */
.brand-logo-mtsn {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #FFFFFF;
  padding: 2px;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

/* Logo MILAD / SPECTRA — persis di samping logo MTsN dengan background transparan */
.brand-logo-milad {
  height: 40px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.navbar-brand:hover .brand-logo-mtsn,
.navbar-brand:hover .brand-logo-milad {
  transform: scale(1.04);
}

/* Menu Navigasi — Rounded Capsule Style sesuai gambar referensi */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
}

.nav-menu a, .nav-menu button {
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  color: #FFFFFF;
  padding: 0.35rem 0.75rem;
  border-radius: 50px;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.nav-menu a:hover, .nav-menu button:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.15);
}

/* State Home / Tab Aktif — Pill outline putih tebal halus */
.nav-menu .active, .nav-menu a.active, .nav-menu button.active {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.85) !important;
  font-weight: 600 !important;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ================================
   BUTTONS
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #FFFFFF;
  border-color: var(--green-800);
  box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-800), var(--navy-800));
  box-shadow: 0 4px 16px rgba(46,125,50,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-700));
  color: #FFFFFF;
  border-color: var(--gold-700);
  box-shadow: var(--shadow-gold);
}
.btn-secondary:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  box-shadow: 0 6px 20px rgba(197,151,26,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: #FFFFFF;
  color: var(--green-800);
  border-color: var(--border);
}
.btn-outline:hover {
  background: var(--green-100);
  border-color: var(--green-600);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF;
  border: none;
  font-weight: 500;
  font-size: 0.88rem;
  padding: 0.4rem 0.6rem;
  transition: all 0.2s ease;
}
.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: #FFFFFF;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.btn-danger {
  background: #EF4444;
  color: #FFFFFF;
  border-color: #DC2626;
}
.btn-danger:hover {
  background: #DC2626;
  border-color: #B91C1C;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.btn-outline-danger {
  background: #FFFFFF;
  color: #DC2626;
  border-color: #FCA5A5;
}
.btn-outline-danger:hover {
  background: #FEF2F2;
  border-color: #EF4444;
  color: #B91C1C;
}

.btn-sm   { padding: 0.38rem 0.85rem; font-size: 0.8rem; }
.btn-lg   { padding: 0.85rem 1.8rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl   { padding: 1rem 2.2rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ================================
   CARDS
================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }

.card-header-clean {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.card-header-clean h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ================================
   FORMS
================================ */
.form-group { margin-bottom: 1.1rem; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.form-control {
  width: 100%;
  padding: 0.7rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(56,142,60,0.15);
}
.form-control::placeholder { color: var(--text-muted); }

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.2rem;
  -webkit-appearance: none;
  appearance: none;
}

/* File Upload */
.file-upload { position: relative; display: block; width: 100%; }
.file-upload input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  text-align: center;
  background: var(--bg-card-alt);
  transition: var(--transition);
}
.file-upload:hover .file-upload-area {
  border-color: var(--green-600);
  background: var(--green-100);
}
.file-preview { margin-top: 0.75rem; display: none; }
.file-preview img { max-height: 180px; border-radius: var(--radius-md); border: 1px solid var(--border); }
.file-preview.visible { display: block; }

/* ================================
   BADGES
================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.badge-verified  { background: #E8F5E9; color: #2E7D32; border: 1px solid #A5D6A7; }
.badge-pending   { background: #FFF8E1; color: #F57F17; border: 1px solid #FFE082; }
.badge-paid      { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }
.badge-rejected  { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.badge-perorangan{ background: #F0F4EC; color: #4A6741; border: 1px solid #C8E6C9; }
.badge-beregu    { background: var(--gold-100); color: var(--gold-700); border: 1px solid var(--gold-300); }
.badge-milad     { background: linear-gradient(135deg, var(--gold-300), var(--gold-100)); color: var(--green-900); border: none; padding: 0.3rem 0.8rem; }

/* ================================
   HERO SECTION — MILAD PREMIUM (GREEN & WHITE GRADIENT)
================================ */
/* hero-milad DIHAPUS — digantikan slider fullwidth */
.hero-milad { display: none !important; }

.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }


.hero-milad-logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  animation: fadeInDown 0.7s ease both;
}

/* Efek cahaya latar (glow bulat) */
.hero-milad-glow {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    rgba(240, 192, 64, 0.55) 0%,
    rgba(197, 151, 26, 0.3) 35%,
    transparent 70%
  );
  animation: glow-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

/* Sinar cahaya berputar */
.hero-milad-rays {
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(240, 192, 64, 0.18) 20deg,
    transparent 40deg,
    transparent 60deg,
    rgba(240, 192, 64, 0.14) 80deg,
    transparent 100deg,
    transparent 120deg,
    rgba(240, 192, 64, 0.18) 140deg,
    transparent 160deg,
    transparent 180deg,
    rgba(240, 192, 64, 0.14) 200deg,
    transparent 220deg,
    transparent 240deg,
    rgba(240, 192, 64, 0.18) 260deg,
    transparent 280deg,
    transparent 300deg,
    rgba(240, 192, 64, 0.14) 320deg,
    transparent 340deg,
    transparent 360deg
  );
  animation: rays-spin 8s linear infinite;
  pointer-events: none;
}

/* Logo utama */
.hero-milad-logo-big {
  position: relative;
  z-index: 2;
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter:
    drop-shadow(0 0 20px rgba(240, 192, 64, 0.7))
    drop-shadow(0 0 50px rgba(197, 151, 26, 0.4))
    drop-shadow(0 8px 24px rgba(0, 0, 0, 0.5));
  animation: logo-float 3.5s ease-in-out infinite;
  transition: transform 0.3s ease;
}

.hero-milad-logo-big:hover {
  transform: scale(1.08);
}

/* Animasi */
@keyframes glow-pulse {
  0%, 100% {
    opacity: 0.8;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.12);
  }
}

@keyframes rays-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes logo-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.2rem;
  background: rgba(197,151,26,0.12);
  border: 1.5px solid rgba(197,151,26,0.5);
  border-radius: var(--radius-full);
  color: var(--gold-700);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  animation: fadeInDown 0.6s ease 0.1s both;
}

.hero-milad h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--green-900);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  animation: fadeInUp 0.7s ease 0.15s both;
}

.hero-milad h1 .highlight {
  color: var(--gold-700);
  display: block;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  animation: fadeInUp 0.7s ease 0.25s both;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.35s both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(46,125,50,0.12);
  animation: fadeInUp 0.7s ease 0.45s both;
}

.hero-stat {
  text-align: center;
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--gold-700);
  line-height: 1;
}

.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* ================================
   COMPETITION CARDS — IMAGE STYLE
================================ */
.competitions-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green-700);
  background: var(--green-100);
  border: 1px solid var(--primary-subtle);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  margin-top: 0.4rem;
}

.comp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.comp-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.comp-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-subtle);
}

.comp-img-wrap {
  position: relative;
  height: 170px;
  overflow: hidden;
  background: var(--green-100);
}

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

.comp-card:hover .comp-img-wrap img {
  transform: scale(1.06);
}

.comp-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(27,94,32,0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.03em;
}

.comp-body {
  padding: 1.2rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.comp-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-700);
  margin-bottom: 0.3rem;
}

.comp-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.comp-sub {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
  margin-bottom: 0.8rem;
}

.comp-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 0.85rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.comp-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.comp-price-box {
  display: flex;
  flex-direction: column;
}

.comp-price-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.1;
  margin-bottom: 2px;
}

.comp-price-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--green-700);
  line-height: 1.2;
}

.comp-cta {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 0.48rem 0.85rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.comp-cta:hover {
  background: linear-gradient(135deg, var(--green-800), var(--navy-800));
  box-shadow: 0 4px 12px rgba(46,125,50,0.35);
  transform: translateY(-1px);
}

/* Filter Buttons */
#filterButtons {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--border);
  background: #FFFFFF;
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.02em;
}

.filter-btn:hover {
  border-color: var(--green-600);
  color: var(--green-800);
  background: var(--green-100);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(46,125,50,0.3);
}

/* ================================
   TABLES
================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

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

.custom-table th {
  background: var(--bg-card-alt);
  padding: 0.75rem 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
}

.custom-table td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
  font-size: 0.84rem;
  line-height: 1.4;
}

.custom-table tr:hover td { background: #F8FAF7; }

/* Admin Single-Line Modern Elements */
.reg-number-badge {
  display: inline-block;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0F172A !important; /* Hitam pekat kontras tinggi */
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
}

.admin-cell-title {
  font-weight: 600;
  color: #1E293B;
  font-size: 0.84rem;
  letter-spacing: -0.01em;
}

.admin-action-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.btn-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.btn-action-view {
  background: #FFFFFF;
  color: #2563EB;
  border-color: #BFDBFE;
}
.btn-action-view:hover {
  background: #EFF6FF;
  border-color: #3B82F6;
}

.btn-action-verify {
  background: #059669;
  color: #FFFFFF;
  border-color: #047857;
}
.btn-action-verify:hover {
  background: #047857;
  box-shadow: 0 2px 6px rgba(5,150,105,0.3);
}

.btn-action-delete {
  background: #FFFFFF;
  color: #DC2626;
  border-color: #FECACA;
  padding: 0.28rem 0.45rem;
}
.btn-action-delete:hover {
  background: #FEF2F2;
  border-color: #EF4444;
}

/* ================================
   PAYMENT & CERTIFICATE
================================ */
.payment-amount-box {
  background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  border: 2px solid var(--primary-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 1.25rem 0;
}
.payment-amount-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.payment-amount-value {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-900);
  margin: 0.35rem 0;
}
.unique-code-badge {
  display: inline-block;
  background: var(--gold-100);
  border: 1px solid var(--gold-300);
  color: var(--gold-700);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
}

.qris-wrapper {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  margin: 1.25rem 0;
  box-shadow: var(--shadow-xs);
}

.payment-steps { margin: 1.5rem 0; }
.payment-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.payment-step:last-child { border-bottom: none; }
.payment-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-900));
  color: #FFFFFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700;
  flex-shrink: 0;
}
.payment-step-text { font-size: 0.88rem; color: var(--text-secondary); }

/* Certificate Card */
.cert-card {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.cert-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--green-800), var(--gold-500), var(--green-800));
}
.cert-header {
  text-align: center;
  border-bottom: 2px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}
.cert-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green-800);
  letter-spacing: 0.05em;
}
.cert-detail {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.cert-detail .key { color: var(--text-secondary); }
.cert-detail .val { font-weight: 700; color: var(--text-primary); text-align: right; }

/* Member Card in Form */
.member-form {
  background: var(--green-50);
  border: 1px solid var(--primary-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.member-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

/* Alerts */
.alert {
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}
.alert-info    { background: var(--primary-light); border: 1px solid var(--primary-subtle); color: #1B5E20; }
.alert-success { background: #E8F5E9; border: 1px solid #A5D6A7; color: #1B5E20; }
.alert-warning { background: var(--gold-100); border: 1px solid var(--gold-300); color: var(--gold-700); }
.alert-error   { background: var(--error-light); border: 1px solid #EF9A9A; color: #B71C1C; }

/* Toast */
.toast-container {
  position: fixed;
  top: 1.5rem; right: 1.5rem;
  z-index: 500;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.2rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.875rem; font-weight: 600; color: var(--text-primary);
  min-width: 280px;
}
.toast-success { border-left: 4px solid var(--green-700); }
.toast-error   { border-left: 4px solid var(--error); }
.toast-info    { border-left: 4px solid var(--accent); }

/* Loader */
.page-loader {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, var(--green-900), var(--navy-800));
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 1rem;
}
.page-loader.hidden {
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.loader-logos {
  display: flex; align-items: center; gap: 1.5rem;
  animation: pulse-glow 1.5s ease-in-out infinite;
}
.loader-logos img { width: 60px; height: 60px; object-fit: contain; }
.loader-milad-icon { width: 70px !important; height: 70px !important; filter: drop-shadow(0 0 12px rgba(240,192,64,0.6)); }
.loader-text {
  color: rgba(255,255,255,0.8); font-size: 0.88rem; font-weight: 600;
  letter-spacing: 0.05em;
}

.loading {
  display: inline-block;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(56,142,60,0.2);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

/* ================================
   FOOTER
================================ */
.site-footer {
  background: linear-gradient(180deg, rgba(27, 94, 32, 0.92) 0%, rgba(13, 27, 42, 0.96) 100%);
  color: rgba(255,255,255,0.8);
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer .footer-logos {
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.site-footer .footer-logos img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}
.site-footer p { font-size: 0.88rem; line-height: 1.8; margin: 0; }
.site-footer strong { color: var(--gold-300); font-size: 1rem; }

/* ================================
   ANIMATIONS
================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(197,151,26,0.4)); }
  50%       { filter: drop-shadow(0 0 20px rgba(197,151,26,0.8)); }
}

/* ================================
   LAYOUT UTILITIES
================================ */
.page         { display: none; }
.page.active  { display: block; }
.container    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section      { padding: 4rem 0; }
.pt-nav       { padding-top: 84px; }

.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.flex-1       { flex: 1; }
.flex-wrap    { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.w-100        { width: 100%; }
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--green-700); }
.text-warning { color: var(--gold-500); }
.text-error   { color: var(--error); }
.fw-bold { font-weight: 700; } .fw-800 { font-weight: 800; }
.fs-sm { font-size: 0.82rem; } .fs-lg { font-size: 1.1rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 0.4rem; }
.mb-2 { margin-bottom: 0.85rem; } .mb-3 { margin-bottom: 1.3rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.4rem; } .mt-2 { margin-top: 0.85rem; }
.mt-3 { margin-top: 1.3rem; } .mt-4 { margin-top: 2rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.p-2  { padding: 0.75rem; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ================================
   BATCH & MULTI-REGISTRATION STYLES
   ================================ */
.batch-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  background: #E65100;
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0 6px;
  border-radius: 999px;
  margin-left: 0.4rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.25);
  line-height: 1;
}

.btn-cart-action {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
  color: #FFFFFF !important;
  border: 1px solid #B45309 !important;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.35) !important;
  font-weight: 700;
  padding: 0.6rem 1.15rem;
}

.btn-cart-action:hover {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%) !important;
  box-shadow: 0 5px 15px rgba(217, 119, 6, 0.45) !important;
  transform: translateY(-1px);
}

.btn-cart-action svg {
  stroke: #FFFFFF;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.cart-pill-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: #FFFFFF;
  color: #B45309;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  line-height: 1;
}

.cart-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  transition: all 0.2s ease;
}

.cart-card:hover {
  border-color: var(--green-600);
  box-shadow: 0 6px 18px rgba(46,125,50,0.08);
}

.cart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green-900);
}

.cart-card-fee {
  font-weight: 800;
  color: var(--green-700);
  font-size: 1.05rem;
}

.member-grid-item {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.badge-sublomba {
  background: #e8f5e9;
  color: #1b5e20;
  border: 1px solid #c8e6c9;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.invoice-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.invoice-summary-table th {
  background: var(--green-50);
  color: var(--green-900);
  font-weight: 700;
  text-align: left;
  padding: 0.75rem;
  border-bottom: 2px solid var(--border);
}

.invoice-summary-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.batch-card-summary {
  background: linear-gradient(135deg, #f0fdf4, #e8f5e9);
  border: 1.5px solid var(--green-600);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ================================
   SLIDE BANNER JENIS LOMBA
=============================== */
/* ================================
   SLIDE BANNER — FULLWIDTH STYLE
   (Sesuai Gambar Referensi)
=============================== */
.banner-slider-section {
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 2;
  margin-top: 60px; /* tinggi navbar */
}

.banner-slider-container {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background: #1a3a50;
}

.banner-slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.banner-slide {
  min-width: 100%;
  position: relative;
  height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  user-select: none;
}

/* Gambar background — tampak bersih penuh di sisi kanan tanpa tertutup gelap */
.banner-slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(1.0) saturate(1.05);
  transform: scale(1.0);
  transition: transform 6s ease;
}

.banner-slide.active .banner-slide-bg {
  transform: scale(1.04);
}

/* Overlay gradien: hanya tipis/gelap di area teks & logo kiri agar tetap terbaca, benar-benar bening/transparan dari sebelah kanan teks ke ujung kanan */
.banner-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(10, 30, 50, 0.92) 0%,
    rgba(10, 30, 50, 0.80) 25%,
    rgba(10, 30, 50, 0.40) 38%,
    transparent 46%,
    transparent 100%
  );
  pointer-events: none;
}

/* Konten slide: logo milad + teks di kiri */
.banner-slide-content {
  display: none; /* Konten dipindah ke banner-fixed-overlay */
}

/* FIXED OVERLAY — Logo & teks tidak ikut slide, tersusun rapi dari atas ke bawah */
.banner-fixed-overlay {
  position: absolute;
  top: 1.5rem;
  left: 3rem;
  bottom: 1.5rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 520px;
  pointer-events: auto;
  gap: 0.65rem;
}

/* Logo Milad / SPECTRA besar — transparan elegan di atas banner */
.banner-fixed-logo {
  width: 340px;
  max-width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.4));
  flex-shrink: 0;
  margin-bottom: 0.2rem;
}

/* Judul fixed — kuning/gold bold */
.banner-fixed-title {
  font-size: clamp(1.4rem, 2.5vw, 1.95rem);
  font-weight: 800;
  line-height: 1.25;
  color: #F5C518;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

/* Deskripsi fixed */
.banner-fixed-desc {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.92);
  line-height: 1.6;
  margin: 0;
  max-width: 440px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.banner-fixed-desc strong {
  color: #FFFFFF;
  font-weight: 700;
}

.banner-fixed-desc em {
  font-style: italic;
  color: rgba(255,255,255,0.8);
}

/* Legacy: sembunyikan elemen lama yang ada di dalam slide */
.banner-slide-logo { display: none; }
.banner-slide-title { display: none; }
.banner-slide-desc { display: none; }

/* Tombol aksi di dalam slide */
.banner-slide-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.banner-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  background: #C5971A;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.banner-btn-primary:hover {
  background: #B8860B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(197,151,26,0.5);
}

.banner-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.3rem;
  background: rgba(255,255,255,0.12);
  color: #FFFFFF;
  border: 1.5px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.banner-btn-outline:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.9);
}

/* Tombol navigasi panah */
.banner-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
  z-index: 5;
  backdrop-filter: blur(4px);
  font-weight: bold;
}

.banner-nav-btn:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.7);
}

.banner-prev { left: 0.75rem; }
.banner-next { right: 0.75rem; }

/* Dot indicator di bawah slider */
.banner-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
  z-index: 5;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.banner-dot.active {
  width: 10px;
  background: #FFFFFF;
  box-shadow: 0 0 6px rgba(255,255,255,0.7);
}

/* Halaman lain kategori (tidak dipakai di slider baru) */
.banner-badge-category { display: none; }
.banner-slide-meta { display: none; }
.banner-meta-pill { display: none; }

/* ================================
   HOME MONITORING: CHART & TABLE
=============================== */
.home-monitoring-section {
  padding: 0.5rem 0 3rem;
}

.home-chart-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.06);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

/* ================================
   REKAPITULASI PESERTA — REDESIGN
   (Background putih, jelas terpisah dari banner)
=============================== */
.rekapitulasi-section {
  background: #FFFFFF;
  padding: 1.1rem 1.75rem 1.25rem;
  border-top: 4px solid #1976D2;
  border-bottom: 1px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  position: relative;
  z-index: 5;
}

.rekapitulasi-section::before { display: none; }

/* Header row */
.rekapitulasi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto 0.85rem;
  padding: 0 0.5rem;
}

.rekapitulasi-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rekap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.7rem;
  background: #E3F2FD;
  border: 1px solid #90CAF9;
  border-radius: 999px;
  color: #1565C0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: rekap-pulse 2s ease-in-out infinite;
}

@keyframes rekap-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.rekapitulasi-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1A2F4A;
  margin: 0;
}

.rekap-refresh-btn {
  background: #F5F7FA;
  border: 1px solid #D0D7E0;
  color: #555;
  padding: 0.3rem 0.85rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rekap-refresh-btn:hover {
  background: #E3F2FD;
  border-color: #90CAF9;
  color: #1565C0;
}

/* GRID kartu statistik — RATA TENGAH */
.rekap-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 1350px;
  margin: 0 auto;
  padding: 0.2rem 0;
}

/* Kartu per cabang */
.rekap-card {
  flex: 0 1 auto;
  min-width: 80px;
  background: #FFFFFF;
  border: 1.5px solid #E4E9F0;
  border-radius: 10px;
  padding: 0.55rem 0.65rem 0.65rem;
  text-align: center;
  cursor: default;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.rekap-card::before { display: none; }

.rekap-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 10px 10px 0 0;
}

.rekap-card:hover {
  border-color: #90CAF9;
  box-shadow: 0 6px 18px rgba(25,118,210,0.16);
  transform: translateY(-3px);
}

.rekap-card-label {
  font-size: 0.70rem;
  font-weight: 600;
  color: #6B7A8D;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.rekap-card-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.rekap-loading {
  color: #999;
  font-size: 0.82rem;
  padding: 0.5rem;
  font-style: italic;
}

.chart-bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1rem;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.chart-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-bar-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-bar-val {
  color: var(--green-800);
  font-weight: 800;
  font-size: 0.95rem;
}

.chart-track {
  height: 20px;
  background: #EEF3EB;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}

.chart-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #2E7D32, #4CAF50);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
}

.chart-fill.zero {
  background: transparent;
}

.chart-fill-text {
  font-size: 0.72rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.home-table-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(46, 125, 50, 0.06);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}

.home-participant-table th {
  background: #4CAF50 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  font-size: 0.84rem !important;
  padding: 0.85rem 1rem !important;
  border-bottom: none !important;
  text-transform: none;
  letter-spacing: 0;
}

.home-participant-table td {
  padding: 0.75rem 1rem !important;
  vertical-align: middle;
  border-bottom: 1px solid #E8F5E9;
  font-size: 0.88rem;
}

.home-participant-table tr:nth-child(even) td {
  background-color: #F1F8F1;
}

.home-participant-table tr:hover td {
  background-color: #E8F5E9 !important;
}

/* Tombol DAFTAR PESERTA TERDAFTAR */
.btn-daftar-peserta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  background: #4CAF50;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.btn-daftar-peserta:hover {
  background: #388E3C;
  transform: translateY(-1px);
}

.gender-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.82rem;
}

.gender-badge.L {
  background: #E3F2FD;
  color: #1565C0;
  border: 1.5px solid #90CAF9;
}

.gender-badge.P {
  background: #FCE4EC;
  color: #C2185B;
  border: 1.5px solid #F48FB1;
}

/* ================================
   AUTH SEKOLAH: MODERN & PROFESSIONAL
================================ */
.auth-portal-wrapper {
  max-width: 540px;
  margin: 1.5rem auto 3.5rem;
}

.auth-card-modern {
  background: #FFFFFF;
  border-radius: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: all 0.3s ease;
}

.auth-card-header {
  padding: 2.2rem 2.2rem 1.25rem;
  text-align: center;
  background: linear-gradient(180deg, #F8FAFC 0%, #FFFFFF 100%);
  border-bottom: 1px solid #F1F5F9;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-radius: 999px;
  color: var(--green-800);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.85rem;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 0.45rem;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: #64748B;
  line-height: 1.55;
  margin: 0 0 1.25rem;
}

/* Segmented Control Switcher */
.auth-tab-switch {
  display: flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem 0.75rem;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748B;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #0F172A;
}

.auth-tab-btn.active {
  background: #FFFFFF;
  color: var(--green-900);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.auth-card-body {
  padding: 1.8rem 2.2rem 2.2rem;
}

.auth-pane {
  animation: fadeIn 0.25s ease-in-out;
}

/* Form input styling with subtle icons */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 12px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.7;
}

.input-with-icon .form-control {
  padding-left: 2.5rem;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #94A3B8;
  padding: 0;
  transition: opacity 0.2s;
}

.password-toggle-btn:hover {
  opacity: 0.8;
}

.auth-switch-footer {
  text-align: center;
  padding-top: 1rem;
  margin-top: 0.5rem;
  border-top: 1px dashed #E2E8F0;
}

.auth-link-highlight {
  color: var(--green-800);
  font-weight: 700;
  text-decoration: none;
  margin-left: 0.25rem;
  transition: color 0.15s;
}

.auth-link-highlight:hover {
  color: var(--green-600);
  text-decoration: underline;
}

/* ================================
   TIMELINE / JADWAL PENDAFTARAN
================================ */
.registration-timeline-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.timeline-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.timeline-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.timeline-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.4;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: relative;
  padding-left: 0.25rem;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 15px;
  bottom: 15px;
  width: 2px;
  background: #CBD5E1;
  z-index: 1;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  position: relative;
  z-index: 2;
}

.timeline-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #94A3B8;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.timeline-step.active .timeline-dot {
  background: var(--green-700);
  border-color: var(--green-900);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.2);
}

.timeline-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.step-badge.badge-now {
  align-self: flex-start;
  background: #DCFCE7;
  color: #15803D;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.15rem;
  letter-spacing: 0.02em;
}

.step-name {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 700;
}

.step-date {
  font-size: 0.78rem;
  color: #64748B;
  font-weight: 500;
}

/* ================================
   GALERI DOKUMENTASI LOMBA
================================ */
.gallery-filter-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.gallery-filter-btn {
  padding: 0.45rem 1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gallery-filter-btn:hover {
  background: var(--green-100);
  border-color: var(--green-600);
  color: var(--green-900);
}

.gallery-filter-btn.active {
  background: var(--green-800);
  border-color: var(--green-900);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(46,125,50,0.3);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.gallery-card {
  background: #FFFFFF;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

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

.gallery-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #E2E8F0;
}

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

.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.06);
}

.gallery-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(13, 27, 42, 0.8);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.gallery-caption {
  padding: 1.1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gallery-caption h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.gallery-caption p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ================================
   HORIZONTAL TIMELINE — BERANDA
================================ */
.home-timeline-section {
  padding: 1.5rem 0 0.5rem;
  background: transparent;
}

.home-timeline-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  padding: 1.5rem 1.75rem;
}

.timeline-banner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #EEF2F6;
}

.timeline-badge-icon {
  font-size: 2rem;
  line-height: 1;
}

.timeline-banner-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.timeline-banner-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.timeline-status-pill {
  background: #DCFCE7;
  color: #15803D;
  border: 1px solid #BBF7D0;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.horizontal-timeline-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
}

.h-step {
  display: flex;
  flex-direction: column;
  position: relative;
}

.h-step-node {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  position: relative;
}

.h-step-node::after {
  content: '';
  flex: 1;
  height: 3px;
  background: #E2E8F0;
  margin-left: 0.6rem;
}

.h-step:last-child .h-step-node::after {
  display: none;
}

.h-step-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 2px solid #CBD5E1;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.h-step.active .h-step-num {
  background: var(--green-700);
  border-color: var(--green-900);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.2);
}

.h-step.active .h-step-node::after {
  background: #86EFAC;
}

.h-step-badge {
  display: inline-block;
  align-self: flex-start;
  background: #FEF3C7;
  color: #B45309;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.h-step-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
  line-height: 1.3;
}

.h-step-date {
  font-size: 0.82rem;
  color: var(--green-800);
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.h-step-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

@media (max-width: 900px) {
  .horizontal-timeline-track {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .h-step:nth-child(2) .h-step-node::after {
    display: none;
  }
}

@media (max-width: 540px) {
  .horizontal-timeline-track {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .h-step-node::after {
    display: none !important;
  }
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; height: 56px; }
  .navbar-left { gap: 0.6rem; }
  .nav-menu { display: none; }
  .brand-text .brand-sub { display: none; }
  .comp-grid { grid-template-columns: 1fr; }
  .competitions-section { padding: 2.5rem 1rem; }
  .banner-slider-section { margin-top: 56px; }
  .banner-slide { height: 360px; }
  .banner-slide-content { padding: 1.5rem 1.25rem; max-width: 320px; }
  .banner-slide-logo { width: 110px; height: 110px; }
  .banner-slide-title { font-size: 1.3rem; }
  .banner-nav-btn { width: 32px; height: 32px; font-size: 0.9rem; }
  .rekap-grid { gap: 0; }
}

@media (max-width: 480px) {
  .banner-slide { height: 320px; }
  .banner-slide-logo { width: 80px; height: 80px; }
  .banner-slide-actions { flex-direction: column; }
  .rekap-card { min-width: 75px; padding: 0.5rem 0.6rem; }
  .rekap-card-label { font-size: 0.72rem; }
  .rekap-card-num { font-size: 1.3rem; }
}

/* ================================
   MODAL STYLES (PUBLIC PORTAL)
================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  animation: fadeIn 0.2s ease forwards;
}

.modal-box,
.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.35);
  position: relative;
  animation: slideUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.modal-overlay.hidden {
  display: none !important;
}

@keyframes slideUpModal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Edit & Custom Confirm Enhancements */
.modal-card-premium {
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.modal-header-gradient {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%);
  color: #ffffff;
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header-gradient .btn-close {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.modal-header-gradient .btn-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.member-edit-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-edit-card:focus-within {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.member-field-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.member-field-input {
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  padding: 0.6rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  color: #1e293b;
  width: 100%;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.member-field-input:focus {
  background: #ffffff;
  border-color: #16a34a;
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* Custom Delete Confirm Modal */
.modal-confirm-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fee2e2;
  color: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem auto;
  box-shadow: 0 0 0 8px #fef2f2;
}

/* ============================================================
   PIAGAM / SERTIFIKAT RESMI SPEKTRA MTsN 3 LUMAJANG (LANDSCAPE A4)
   Ukuran standar A4 Landscape: 297mm x 210mm (1122.5px x 793.7px @96dpi)
   ============================================================ */
.certificate-canvas {
  width: 1122px;
  height: 793px;
  min-width: 1122px;
  min-height: 793px;
  max-width: 1122px;
  max-height: 793px;
  background: #FFFFFF;
  position: relative;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 16px;
  box-sizing: border-box;
  font-family: 'Times New Roman', Times, 'Georgia', serif;
  color: #1E293B;
  user-select: none;
  overflow: hidden;
}

.cert-outer-border {
  border: 5px double #C5971A;
  padding: 8px;
  height: 100%;
  box-sizing: border-box;
  background: radial-gradient(circle at center, #FFFEFC 0%, #FDFBF7 100%);
  position: relative;
  transition: all 0.3s ease;
}

.certificate-canvas.has-custom-template .cert-outer-border {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}

.cert-inner-border {
  border: 1.5px solid #1B5E20;
  padding: 14px 28px 12px 28px;
  height: 100%;
  box-sizing: border-box;
  position: relative;
  background: transparent;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.certificate-canvas.has-custom-template .cert-inner-border {
  border: none !important;
  padding: 40px 60px !important;
}

.certificate-canvas.has-custom-template .cert-corner {
  display: none !important;
}

/* Sudut Ornamen Klasik Emas */
.cert-corner {
  position: absolute;
  width: 26px;
  height: 26px;
  border-color: #C5971A;
  border-style: solid;
  pointer-events: none;
}
.cert-corner-tl { top: 4px; left: 4px; border-width: 3px 0 0 3px; }
.cert-corner-tr { top: 4px; right: 4px; border-width: 3px 3px 0 0; }
.cert-corner-bl { bottom: 4px; left: 4px; border-width: 0 0 3px 3px; }
.cert-corner-br { bottom: 4px; right: 4px; border-width: 0 3px 3px 0; }

.cert-body-wrapper {
  position: relative;
  z-index: 2;
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Header Instansi & Logo */
.cert-header-logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 2px;
}

.cert-logo-instansi {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.cert-logo-event {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.cert-header-text {
  flex: 1;
  text-align: center;
}

.cert-kemenag-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1B5E20;
  margin-bottom: 1px;
}

.cert-madrasah-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #334155;
  margin-bottom: 1px;
}

.cert-mtsn-title {
  font-family: 'Times New Roman', serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #0F172A;
  text-transform: uppercase;
  line-height: 1.15;
}

.cert-address-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  color: #64748B;
  margin-top: 1px;
}

.cert-gold-divider {
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #C5971A 20%, #1B5E20 50%, #C5971A 80%, transparent);
  margin: 4px 0 8px 0;
  border-radius: 2px;
}

/* Judul Sertifikat */
.cert-title-section {
  margin-bottom: 2px;
}

.cert-main-title {
  font-family: 'Times New Roman', serif;
  font-size: 2.3rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #1B5E20;
  margin: 0;
  line-height: 1;
  text-shadow: 1px 1px 2px rgba(27,94,32,0.15);
}

.cert-subtitle {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  color: #C5971A;
  text-transform: uppercase;
  margin-top: 3px;
}

.cert-number-text {
  font-family: monospace;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  margin-top: 2px;
}

.cert-awarded-text {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-size: 0.92rem;
  color: #475569;
  margin: 4px 0 2px 0;
}

/* Nama Penerima Sertifikat & NISN & Sekolah */
.cert-recipient-block {
  margin: 2px auto 4px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cert-recipient-name {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 2.05rem;
  font-weight: 900;
  color: #111827;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1px;
  line-height: 1.1;
}

.cert-recipient-nisn-line {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  line-height: 1.1;
}

.cert-underline-gold {
  width: 80%;
  max-width: 760px;
  height: 1.5px;
  background-color: #C5971A;
  margin: 0 auto 6px auto;
}

.cert-middle-content {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.cert-recipient-school {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #1B5E20;
  letter-spacing: 0.02em;
}

.cert-description-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.84rem;
  color: #475569;
  margin: 3px auto 2px auto;
  max-width: 860px;
  line-height: 1.3;
}

.cert-competition-block {
  margin: 0 auto 4px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-event-highlight {
  font-family: 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #1B5E20;
  margin: 1px 0;
  letter-spacing: 0.02em;
}

.cert-event-subhighlight {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748B;
  letter-spacing: 0.03em;
  line-height: 1.25;
  margin-bottom: 0;
}

/* Footer & Tanda Tangan */
.cert-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 24px;
  margin-top: 6px;
}

.cert-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

#certQrCodeContainer {
  padding: 5px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 6px;
  display: inline-block;
  line-height: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.cert-qr-caption {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.65rem;
  color: #64748B;
  max-width: 150px;
  text-align: center;
  line-height: 1.15;
}

.cert-signature-box {
  text-align: center;
  min-width: 250px;
}

.cert-date-text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.82rem;
  color: #334155;
  margin-bottom: 1px;
}

.cert-role-title {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}

.cert-sign-space {
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.cert-stamp-badge {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #1B5E20;
  border: 1.5px dashed #1B5E20;
  padding: 2px 10px;
  border-radius: 4px;
  background: rgba(27, 94, 32, 0.05);
  transform: rotate(-3deg);
}

.cert-signer-name {
  font-family: 'Times New Roman', serif;
  font-size: 1.12rem;
  font-weight: 900;
  color: #0F172A;
  border-bottom: 1px solid #334155;
  display: inline-block;
  padding: 0 8px;
  margin-bottom: 1px;
  line-height: 1.2;
}

.cert-signer-nip {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  color: #64748B;
  margin: 0;
  line-height: 1.2;
}


/* ============================================================
   MODE TEMPLATE KUSTOM (CUSTOM UPLOAD BACKGROUND)
   Ketika admin mengupload desain template sertifikat sendiri:
   1. Sembunyikan semua elemen statis (kop, narasi, bingkai, ttd bawaan)
   2. Hanya tampilkan 5 DATA DINAMIS:
      - Nomor Sertifikat
      - Nama Peserta
      - NISN
      - Asal Sekolah / Madrasah
      - Cabang Lomba
      + QR Code Verifikasi di pojok bawah
   ============================================================ */
.certificate-canvas.has-custom-template {
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  padding: 0 !important;
}

.certificate-canvas.has-custom-template .cert-static-element {
  display: none !important;
}

.certificate-canvas.has-custom-template .cert-outer-border {
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  height: 100%;
}

.certificate-canvas.has-custom-template .cert-inner-border {
  border: none !important;
  background: transparent !important;
  padding: 40px 60px !important;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.certificate-canvas.has-custom-template .cert-body-wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Penyesuaian Posisi 5 Data Dinamis di Template Kustom */
.certificate-canvas.has-custom-template .cert-title-section {
  margin-top: 155px; /* Jarak pas di bawah tulisan Sertifikat/Keikutsertaan bawaan template */
  margin-bottom: 25px;
}

.certificate-canvas.has-custom-template .cert-number-text {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1E293B;
  letter-spacing: 0.05em;
  margin: 0;
}

.certificate-canvas.has-custom-template .cert-recipient-block {
  margin: 0 auto;
  padding: 0 40px;
}

.certificate-canvas.has-custom-template .cert-recipient-name {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 2.85rem;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.certificate-canvas.has-custom-template .cert-recipient-nisn-line {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.certificate-canvas.has-custom-template .cert-recipient-school {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 800;
  color: #1B5E20;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 2px;
}

.certificate-canvas.has-custom-template .cert-competition-block {
  margin: 15px auto 35px auto;
}

.certificate-canvas.has-custom-template .cert-event-highlight {
  font-family: 'Times New Roman', Georgia, serif;
  font-size: 1.9rem;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: 0.03em;
  border-bottom: 2px solid #C5971A;
  display: inline-block;
  padding-bottom: 4px;
}

/* Penempatan QR Code di Template Kustom (tetap ada di pojok kiri bawah) */
.certificate-canvas.has-custom-template .cert-footer-row {
  margin-top: auto;
  margin-bottom: 25px;
  padding: 0 35px;
  display: flex;
  justify-content: flex-start; /* Hanya ada QR di kiri, tanda tangan ada di template gambar */
}

.certificate-canvas.has-custom-template .cert-qr-box {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

