/* === Variabel Warna === */
:root {
    --primary: #0A1435;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --text-dark: #111827;
    --text-light: #6B7280;
    --border: #D1D5DB;
    --bg-light: #FFFFFF;
    --bg-dark: #1F2937;
    --success: #10B981;
}

/* === Reset Dasar === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.3s ease;
}

/* === Layout Utama === */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

@media (min-width: 768px) {
    .login-wrapper {
        flex-direction: row;
    }
}

/* === Bagian Kiri === */
/* === Bagian Kiri === */
.login-left {
    width: 100%;
    background-color: var(--primary);
    background-image: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSADUPIJE1-rVBso-Vg2j1PmaB7Itsd4_fl9GAgygKOkK_3uIGMUWd20G955y16Iz_tVafdU68F8aJEvH2LhmW2MYZvh01CspqdCJ0kE0Fr_gf0mXVebnTeFLcWvaKeVZiYNvCQG0jLtE3XYmVPswvAcPg6FSttB-tOORdD2KFXIgdSRFOw-X-fEbUs1o/w924-h546/Gemini_Generated_Image_n8rcwhn8rcwhn8rc.png");
    /* ✅ Gambar diperkecil, tidak melebar, tetap proporsional */
    background-size: 85%; /* Tinggi gambar jadi 85% dari kotak, lebar menyesuaikan otomatis */
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0rem;
}

.login-left::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(10, 20, 53, 0.75);
    z-index: 1;
}

@media (min-width: 768px) {
    .login-left {
        width: 50%;
        /* ✅ Tetap diperkecil juga di layar besar */
        background-size: auto 100%;
    }
}

.brand-content {
    text-align: center;
    color: white;
    max-width: 320px;
    position: relative;
    z-index: 2;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-box {
    width: 70px;
    height: auto;
    background: none;
    border-radius: 0;
}

.logo-box img {
    width: 100%;
    height: auto;
    display: block;
}

.brand-content h1 {
    font-size: 36px;
    font-weight: 700;
}

.brand-content p {
    font-size: 16px;
    opacity: 0.8;
    line-height: 1.6;
}

/* === Bagian Kanan === */
.login-right {
    width: 100%;
    background-image: url("../gambar/bg-kanan.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.login-right::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

@media (min-width: 768px) {
    .login-right {
        width: 50%;
    }
}

.form-container {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-light);
    font-size: 16px;
}

/* === Form Input === */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    height: 48px;
    padding: 0 18px;
    border: 1px solid var(--border);
    border-radius: 100px; /* Bentuk bulat penuh sama persis */
    font-size: 15px;
    transition: all 0.3s ease;
    background: transparent;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.password-wrapper {
    position: relative;
    width: 100%; /* Lebar penuh sama dengan kolom di atas */
    display: block;
}

.password-wrapper input {
    width: 100%; /* Pastikan lebar sama persis */
    padding-right: 45px; /* Beri ruang untuk ikon mata di kanan */
}

.toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
    padding: 0;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: var(--text-dark);
}

.toggle-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn svg {
    vertical-align: middle;
    width: 18px;
    height: 18px;
    color: inherit;
}

/* === Pesan Error Bawah Kolom === */
.error-text {
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
    padding-left: 18px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    display: none;
}

.error-text.tampil {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* === Efek Getar Kolom Input === */
@keyframes getarInput {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

.input-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
    animation: getarInput 0.4s ease;
}

/* === Grup Tombol: Kembali + Masuk === */
.tombol-grup {
    display: flex;
    gap: 12px;
    margin-top: 12px;
    width: 100%;
}

/* Tombol Kembali ke Beranda */
.btn-kembali {
    flex: 1;
    padding: 14px 16px;
    background-color: var(--bg-dark);
    color: var(--bg-light);
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-kembali:hover {
    background-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.25);
}

.btn-kembali:active {
    transform: translateY(0);
}

/* Tombol Masuk */
.btn-login {
    flex: 1;
    padding: 14px 16px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0;
}

.btn-login:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-login:active {
    transform: translateY(0);
}

/* === Responsif === */
@media (max-width: 480px) {
    .tombol-grup {
        flex-direction: column-reverse;
    }
}

/* === POPUP NOTIFIKASI PREMIUM === */
.modal-latar {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-latar.tampil {
    opacity: 1;
    visibility: visible;
}

.modal-kotak {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0,0,0,0.18);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-latar.tampil .modal-kotak {
    transform: translateY(0);
}

/* === ANIMASI GETAR PADA POPUP === */
@keyframes getarPop {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
}

.modal-kotak.getar {
    animation: getarPop 0.4s ease;
}

.modal-ikon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
}

.modal-ikon.sukses {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
}

.modal-ikon.gagal {
    background: rgba(239, 68, 68, 0.12);
    color: #EF4444;
}

.modal-ikon.peringatan {
    background: rgba(245, 158, 11, 0.12);
    color: #F59E0B;
}

.modal-judul {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.modal-teks {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.6;
}

.modal-tombol {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-tombol.sukses {
    background: var(--accent);
    color: white;
}

.modal-tombol.sukses:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.modal-tombol.gagal {
    background: var(--bg-dark);
    color: white;
}

.modal-tombol.gagal:hover {
    background: var(--primary);
}

.modal-tombol.peringatan {
    background: #F59E0B;
    color: white;
}

.modal-tombol.peringatan:hover {
    background: #D97706;
}

/* === Notifikasi Lama (Tetap Dipertahankan) === */
.alert-box {
    margin-top: 24px;
    background-color: #1F2937;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    pointer-events: none;
}

.alert-box.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: var(--success);
    border-radius: 50%;
    font-size: 12px;
    margin-right: 8px;
}

.alert-right {
    text-align: right;
    font-size: 12px;
    opacity: 0.8;
}

/* === Animasi === */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.5s ease-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}