/* ============================================
   PENTAS PAI 2026 - CUSTOM STYLES
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Amiri:wght@400;700&display=swap');

:root {
  --emerald-50: #ecfdf5;
  --emerald-900: #064e3b;
  --gold-400: #d4af37;
  --gold-500: #b8941f;
  --bg-dark: #0f172a;
  --card-bg: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(71, 85, 105, 0.5);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-dark);
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

.font-amiri { font-family: 'Amiri', serif; }

/* Glassmorphism Cards */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* Gold Gradient Button */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: #064e3b;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}
.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212,175,55,0.35);
}
.btn-gold:disabled { opacity: 0.6; cursor: not-allowed; }

/* Smooth Scroll & Animations */
* { scroll-behavior: smooth; }
.animate-fade-in { animation: fadeIn 0.4s ease-out forwards; }
.animate-slide-up { animation: slideUp 0.5s ease-out forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Modern Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  transition: background 0.2s;
}
*:hover::-webkit-scrollbar-thumb { background: rgba(16, 185, 129, 0.7); }
* { scrollbar-width: thin; scrollbar-color: rgba(16, 185, 129, 0.4) transparent; }

/* Form Inputs */
.input-field {
  background: #334155;
  border: 2px solid #475569;
  color: #f1f5f9;
  transition: all 0.2s;
}
.input-field:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  outline: none;
}
.input-field::placeholder { color: #94a3b8; }

/* Toast Notifications */
#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  background: #1e293b; border-left: 4px solid; padding: 0.75rem 1rem;
  border-radius: 0.5rem; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex; align-items: center; gap: 0.75rem; min-width: 280px;
  animation: slideInRight 0.3s ease forwards;
}
.toast-success { border-color: #10b981; color: #6ee7b7; }
.toast-error { border-color: #ef4444; color: #fca5a5; }
.toast-warning { border-color: #f59e0b; color: #fcd34d; }
.toast-info { border-color: #3b82f6; color: #93c5fd; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* Perbaikan padding modal verifikasi */
#verifyModalBody .glass {
    padding: 1rem;
}

#verifyModalBody .grid {
    gap: 0.75rem;
}

/* Tombol aksi responsif */
@media (max-width: 640px) {
    #verifyModal .flex-wrap {
        flex-direction: column;
    }
    #verifyModal textarea {
        width: 100%;
    }
    #verifyModal .flex-wrap .flex-wrap {
        justify-content: center;
    }
}

/* Scrollbar modern untuk seluruh halaman admin */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 10px;
    transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Untuk area modal agar scrollbar lebih halus */
#verifyModalBody::-webkit-scrollbar {
    width: 6px;
}
#verifyModalBody::-webkit-scrollbar-track {
    background: #0f172a;
}
#verifyModalBody::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 6px;
}

/* ============================================================
   SPRINT 2 - PENDAMPING / KARTU STYLES
   ============================================================ */

/* ── Card States ── */

.card-locked {
    position: relative;
    overflow: hidden;
}
.card-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(1px);
    pointer-events: none;
}
.card-locked .lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(100, 116, 139, 0.85);
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    pointer-events: none;
}

/* ── Badges ── */

.draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.draft-badge::before {
    content: '⏳';
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.verified-badge::before {
    content: '✓';
}

.pending-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.pending-badge::before {
    content: '◷';
}

.rejected-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.rejected-badge::before {
    content: '✗';
}

/* ── OTP Input ── */

.otp-input {
    width: 3rem;
    height: 3rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    background: #334155;
    border: 2px solid #475569;
    color: #f1f5f9;
    border-radius: 0.75rem;
    transition: all 0.2s;
    caret-color: #10b981;
}
.otp-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
    outline: none;
}
.otp-input.filled {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* ── Step Indicator ── */

.step-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.step-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
    transition: all 0.2s;
}
.step-item.active {
    color: #10b981;
    font-weight: 600;
}
.step-item.done {
    color: #6ee7b7;
}
.step-circle {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid #475569;
    background: #334155;
    color: #94a3b8;
    transition: all 0.2s;
}
.step-item.active .step-circle {
    border-color: #10b981;
    background: #10b981;
    color: white;
}
.step-item.done .step-circle {
    border-color: #10b981;
    background: transparent;
    color: #10b981;
}
.step-divider {
    flex: 1;
    height: 2px;
    background: #334155;
}

/* ── Lomba Card States ── */

.lomba-card {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(71, 85, 105, 0.5);
}
.lomba-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.lomba-card.belum_daftar {
    border-color: rgba(71, 85, 105, 0.5);
}
.lomba-card.draft {
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}
.lomba-card.terkunci {
    border-color: rgba(100, 116, 139, 0.5);
}
.lomba-card.terverifikasi {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.15);
}
.lomba-card.ditolak {
    border-color: rgba(239, 68, 68, 0.4);
    opacity: 0.85;
}
.lomba-card.ditolak:hover {
    opacity: 1;
}

/* ── Gender Badge ── */

.gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
}
.gender-badge.mix    { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.3); }
.gender-badge.putra  { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.gender-badge.putri  { background: rgba(236, 72, 153, 0.15); color: #f9a8d4; border: 1px solid rgba(236, 72, 153, 0.3); }

/* ── Responsive Cards Grid ── */

.lomba-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
@media (max-width: 640px) {
    .lomba-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }
}