/**
 * File: assets/css/formulir-pendaftaran.css
 * Deskripsi: Apple White Frosted Glass Luxury Edition (Fixed Input Selectors & Hidden Utility)
 * Standar: macOS Frosted Glass UI, JetBrains Mono, Zero Scrollbars, Diffuse Lighting
 * Status: VERSION 3.2.0 - PRODUCTION MASTER STABLE (INPUT GLITCH FIXED)
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@600;700;800&family=Instrument+Serif:italic@0,400;1,400&display=swap');

:root {
    --bg-page: #f5f7fa;
    --glass-card-bg: rgba(255, 255, 255, 0.88);
    --glass-card-border: rgba(255, 255, 255, 0.95);
    --glass-input-bg: rgba(255, 255, 255, 0.94);
    --glass-input-border: rgba(0, 0, 0, 0.08);
    --text-obsidian: #1d1d1f;
    --text-charcoal: #333336;
    --text-muted: #86868b;
    --apple-blue: #0071E3;
    --apple-blue-hover: #0077ED;
    --apple-green: #34C759;
    --apple-red: #FF3B30;
    --apple-gold: #D97706;
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft-elevation: 0 20px 50px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-hover-elevation: 0 25px 60px rgba(0, 113, 227, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-glow-blue: 0 8px 24px rgba(0, 113, 227, 0.22);
}

* {
    box-sizing: border-box;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
::-webkit-scrollbar {
    display: none !important;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-page);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(0, 113, 227, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 90%, rgba(52, 199, 89, 0.06) 0%, transparent 40%),
        linear-gradient(180deg, rgba(245, 247, 250, 0.85) 0%, rgba(238, 242, 246, 0.92) 100%),
        url('../foto-pesantren.png');
    background-attachment: fixed;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--text-charcoal);
    margin: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: 'JetBrains Mono', monospace !important;
}

.section-title {
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 2;
}
.section-title span {
    font-size: 11px;
    font-weight: 800;
    color: var(--apple-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 6px;
}
.section-title h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-obsidian);
    margin: 0;
}

/* =========================================================
   SHOWCASE CARDS: BENTO GRID
   ========================================================= */
.unit-section {
    padding: 15px 4%;
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.unit-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 16px;
    max-width: 1300px;
    margin: 0 auto 30px auto;
    padding: 10px 10px 20px 10px;
    overflow: visible;
}

.unit-card {
    flex: 0 1 calc(16.666% - 16px);
    min-width: 175px;
    max-width: 210px;
    background: var(--glass-card-bg);
    backdrop-filter: blur(30px) saturate(190%);
    -webkit-backdrop-filter: blur(30px) saturate(190%);
    border-radius: var(--radius-lg);
    padding: 22px 14px;
    text-align: center;
    border: 1px solid var(--glass-card-border);
    box-shadow: var(--shadow-soft-elevation);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover-elevation);
    border-color: rgba(0, 113, 227, 0.25);
}

.unit-logo-box {
    height: 52px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}
.unit-logo-box img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.unit-initial {
    width: 48px;
    height: 48px;
    background: rgba(0, 113, 227, 0.08);
    color: var(--apple-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    border: 1px solid rgba(0, 113, 227, 0.15);
}

.unit-card h3 {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-obsidian);
    margin: 0 0 12px 0;
    line-height: 1.45;
    flex-grow: 1;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-detail {
    font-size: 10px;
    font-weight: 800;
    color: var(--apple-blue);
    background: rgba(0, 113, 227, 0.08);
    border: 1px solid rgba(0, 113, 227, 0.15);
    padding: 6px 14px;
    border-radius: 100px;
    text-decoration: none;
    transition: 0.2s;
    text-transform: uppercase;
    display: inline-block;
}
.btn-detail:hover {
    background: var(--apple-blue);
    color: #fff;
}

/* =========================================================
   PORTAL FORM SECTION
   ========================================================= */
.portal-section {
    padding: 20px 4% 80px;
    max-width: 1240px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.portal-grid {
    display: grid;
    grid-template-columns: 1fr 1.45fr;
    gap: 40px;
    align-items: flex-start;
}

/* Panduan Kiri */
.sticky-guide {
    position: sticky;
    top: 30px;
}
.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}
.guide-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    color: var(--apple-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.guide-text h4 {
    margin: 0 0 4px 0;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--text-obsidian);
}
.guide-text p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Card Form Kanan */
.form-card {
    background: var(--glass-card-bg);
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border-radius: var(--radius-xl);
    padding: 34px;
    border: 1px solid var(--glass-card-border);
    box-shadow: var(--shadow-soft-elevation);
}

.tab-nav {
    display: flex;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 100px;
    padding: 4px;
    margin-bottom: 25px;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-weight: 800;
    font-size: 11px;
    border-radius: 100px;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.tab-btn.active {
    background: #ffffff;
    color: var(--apple-blue);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* =========================================================
   FORM INPUTS (UNIVERSAL STYLING - ANTI-GEPENG)
   ========================================================= */
.form-group {
    margin-bottom: 20px;
}

.form-group label,
.grid-mobile-1 label {
    font-weight: 700;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: block;
}

/* Selector universal untuk semua input dalam form-card */
.form-card input[type="text"],
.form-card input[type="tel"],
.form-card input[type="password"],
.form-card select,
.form-group input,
.grid-mobile-1 input {
    width: 100%;
    height: 48px !important;
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--glass-input-border) !important;
    padding: 0 16px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    background: var(--glass-input-bg) !important;
    color: var(--text-obsidian) !important;
    transition: 0.25s ease !important;
    outline: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02) inset !important;
    display: block !important;
}

.form-card input:focus,
.form-group input:focus,
.grid-mobile-1 input:focus,
.select2-container--open .select2-selection--single {
    border-color: var(--apple-blue) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12) !important;
}

/* Select2 Customization */
.select2-container--default .select2-selection--single {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    background: var(--glass-input-bg) !important;
    border: 1px solid var(--glass-input-border) !important;
    border-radius: var(--radius-md) !important;
    padding: 0 16px !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-obsidian) !important;
    line-height: normal !important;
    padding-left: 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    right: 14px !important;
}

.select2-dropdown {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-obsidian) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08) !important;
}
.select2-results__option {
    padding: 10px 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--apple-blue) !important;
    color: #fff !important;
}

/* Button Action */
.btn-action {
    width: 100%;
    background: linear-gradient(180deg, var(--apple-blue-hover) 0%, var(--apple-blue) 100%);
    color: #fff;
    padding: 16px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: 0.25s;
    box-shadow: var(--shadow-glow-blue);
    margin-top: 15px;
    text-transform: uppercase;
}
.btn-action:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 113, 227, 0.3);
}
.btn-action:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Countdown Block */
#countdown-wrapper {
    background: rgba(0, 113, 227, 0.05);
    border: 1px solid rgba(0, 113, 227, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    margin-bottom: 22px;
}
.cd-msg {
    font-size: 11px;
    font-weight: 800;
    color: var(--apple-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 8px;
}
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.cd-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.cd-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-obsidian);
}
.cd-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}
.cd-sep {
    font-size: 18px;
    font-weight: 800;
    color: var(--apple-blue);
    margin-top: -10px;
}

/* Flatpickr Custom Light Luxe */
.flatpickr-calendar {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1) !important;
    color: var(--text-obsidian) !important;
}
.flatpickr-day {
    color: var(--text-charcoal) !important;
}
.flatpickr-day.selected {
    background: var(--apple-blue) !important;
    border-color: var(--apple-blue) !important;
    color: #fff !important;
}

.swipe-hint {
    display: none;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS (DESKTOP / TABLET / MOBILE)
   ========================================================= */
@media (max-width: 1200px) {
    .unit-card {
        flex: 0 1 calc(25% - 16px);
        min-width: 170px;
    }
}

@media (max-width: 1024px) {
    .portal-grid {
        display: flex;
        flex-direction: column;
        gap: 35px;
    }
    .form-card {
        padding: 24px;
    }
    .grid-mobile-1 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .unit-card {
        flex: 0 1 calc(33.333% - 16px);
    }
}

@media (max-width: 640px) {
    .swipe-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        font-size: 11px;
        font-weight: 700;
        color: var(--text-muted);
        margin-top: -10px;
        margin-bottom: 15px;
    }
    .unit-wrapper {
        flex-wrap: nowrap;
        justify-content: flex-start;
        scroll-snap-type: x mandatory;
        overflow-x: auto;
        padding: 10px 15px;
    }
    .unit-card {
        flex: 0 0 78%;
        min-width: auto;
        scroll-snap-align: center;
    }
}