/* ============================================================
   1. RESET & VARIABEL TEMA PLN
   ============================================================ */
:root {
    --pln-blue-start: #00529b;
    --pln-blue-mid:   #0088cc;
    --pln-blue-end:   #00a4e4;
    
    --pln-yellow-start: #e59800;
    --pln-yellow-mid:   #f4b400;
    --pln-yellow-end:   #ffd000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Hilangkan kedipan kotak abu-abu di layar HP */
}

/* ============================================================
   2. BODY & TATA LETAK RESPONSIF (MOBILE + DESKTOP)
   ============================================================ */
.role-selection-body {
    /* 100dvh menyesuaikan dengan dinamis saat URL bar di HP naik-turun */
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
    background-color: #0c1c24; /* Fallback jika background gambar belum terbaca */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background Kantor UP3 Serpong (Blur & Fade Clean) */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/Kantor UP3 Serpong.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(10px) brightness(0.60);
    transform: scale(1.08); /* Mencegah pinggiran kabur putih */
    z-index: 1;
}

/* Pembungkus Konten Utama */
.main-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================================================
   3. KARTU GLASSMORPHISM
   ============================================================ */
.role-card {
    width: 100%;
    max-width: 420px; /* Ukuran pas di desktop menyerupai aplikasi mobile */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 28px;
    padding: 36px 28px 24px 28px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 22px;
}

/* ============================================================
   4. LOGO & TEKS
   ============================================================ */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.pln-logo {
    max-height: 70px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.3));
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.bolt-icon {
    font-size: 1.4rem;
}

.pln-brand {
    color: #ffd000;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 1px;
}



.greeting-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.question-text {
    font-size: 1.9rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.sub-question-text {
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 400;
    line-height: 1.4;
}

/* ============================================================
   5. TOMBOL GRADIEN DENGAN UX 5 TINGKAT LEBIH CERAH (:active)
   ============================================================ */
.action-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-role {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    border-radius: 18px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: transform 0.12s ease, filter 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

/* A. Tombol Intern (Gradien Biru) */
.btn-intern {
    background: linear-gradient(135deg, var(--pln-blue-start) 0%, var(--pln-blue-mid) 50%, var(--pln-blue-end) 100%);
    color: #ffffff;
}

/* B. Tombol Mentor (Gradien Kuning) */
.btn-mentor {
    background: linear-gradient(135deg, var(--pln-yellow-start) 0%, var(--pln-yellow-mid) 50%, var(--pln-yellow-end) 100%);
    color: #1a1a1a;
}

/* 3. Presensi Intern: Gradien Hijau Emerald (Selaras dengan Tone Tombol Lain) */
.btn-mentor-green {
    background: linear-gradient(135deg, #047857 0%, #10b981 50%, #34d399 100%);
    color: #ffffff;
}

/* Teks Tombol */
.btn-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.btn-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-main-label {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.btn-intern .btn-sub-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.btn-mentor .btn-sub-label {
    font-size: 0.75rem;
    color: rgba(26, 26, 26, 0.8);
    font-weight: 500;
}

/* Efek Hover (Laptop/Desktop) */
@media (hover: hover) {
    .btn-role:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    }
}

/* Efek UX: 5 Tingkat Lebih Cerah Saat Diklik / Disentuh di HP (:active) */
.btn-role:active {
    filter: brightness(1.30); /* Mencerahkan warna gradien */
    transform: scale(0.97);     /* Efek sentuh membal/haptic */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Footer Mini */
.card-footer {
    margin-top: 6px;
}

.card-footer p {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.5px;
}

/* ============================================================
   6. OPTIMASI TAMPILAN PONSEL KECIL (Dibawah 380px)
   ============================================================ */
@media (max-width: 380px) {
    .role-card {
        padding: 26px 18px 18px 18px;
        gap: 18px;
    }
    .question-text {
        font-size: 1.6rem;
    }
    .btn-role {
        padding: 14px 16px;
    }
}

/* ============================================================
   7. FORM LOGIN & INPUT FIELD STYLING
   ============================================================ */
.auth-card {
    max-width: 440px;
    padding: 30px 26px;
    gap: 18px;
}

.back-nav {
    width: 100%;
    text-align: left;
}

.back-link {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #ffd000;
}

.auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.badge-role {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-intern {
    background: rgba(0, 164, 228, 0.25);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.auth-title {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.auth-subtitle {
    color: #cbd5e1;
    font-size: 0.82rem;
    line-height: 1.3;
}

/* Struktur Form */
.auth-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

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

.form-control {
    width: 100%;
    padding: 13px 45px 13px 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    color: #ffffff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* Tombol Mata (Toggle Password) */
.btn-toggle-password {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.75;
    transition: opacity 0.2s, transform 0.1s;
}

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

.btn-toggle-password:active {
    transform: scale(0.9);
}

/* Tautan Lupa Password */
.forgot-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: -4px;
}

.link-forgot {
    color: #38bdf8; /* Biru terang sesuai spek */
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.link-forgot:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* Grup Tombol Submit & Register */
.action-buttons-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.btn-submit {
    width: 100%;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease, background-color 0.12s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    display: block;
}

/* Tombol Masuk (Gradien Biru PLN, 5 tingkat lebih cerah saat diklik) */
.btn-masuk-intern {
    background: linear-gradient(135deg, var(--pln-blue-start) 0%, var(--pln-blue-mid) 50%, var(--pln-blue-end) 100%);
    color: #ffffff;
}

.btn-masuk-intern:active {
    filter: brightness(1.30); /* 5 tingkat lebih cerah */
    transform: scale(0.98);
}

/* Teks Pemisah */
.divider-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    margin: 2px 0;
}

/* Tombol Register: Putih (Saat diklik berubah abu-abu cerah) */
.btn-register-white {
    background-color: #ffffff;
    color: #0f172a;
}

.btn-register-white:hover {
    background-color: #f8fafc;
}

.btn-register-white:active {
    background-color: #e2e8f0 !important; /* Abu-abu cerah saat diklik sesuai spek */
    transform: scale(0.98);
}

/* ============================================================
   8. HALAMAN REGISTER INTERN (1 KOLOM BERGULIR KE BAWAH)
   ============================================================ */
/* Mengaktifkan scroll vertikal yang halus pada halaman register */
.page-scrollable {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
    padding: 30px 0;
    align-items: flex-start; /* Konten mulai dari atas agar nyaman di-scroll */
}

.register-wrapper {
    margin: auto;
    padding: 15px;
}

.register-card {
    max-width: 480px; /* Lebar pas untuk 1 kolom vertikal */
    padding: 32px 24px;
}

.register-title {
    font-size: 1.35rem;
    text-align: center;
    line-height: 1.3;
}

.single-column-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* Placeholder fade abu-abu muda sesuai spesifikasi poin 3 */
.input-fade-example::placeholder {
    color: rgba(226, 232, 240, 0.45) !important;
    font-style: italic;
}

/* Input Tanggal Kalender yang Elegan */
.custom-date-input {
    color-scheme: dark; /* Menyesuaikan kalender popup bawaan browser ke tema gelap */
    cursor: pointer;
}

/* Dropdown Select Divisi */
.select-custom {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffffff' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 15px) center;
}

.select-custom option {
    background-color: #0c1c24;
    color: #ffffff;
}

/* Area Upload Foto */
.file-upload-box {
    position: relative;
    width: 100%;
    min-height: 110px;
    border: 2px dashed rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
}

.file-upload-box:hover {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.12);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.upload-icon {
    font-size: 1.8rem;
}

.upload-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #f1f5f9;
}

.upload-hint {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
}

.photo-preview-img {
    max-height: 140px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    margin: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}