/* ==========================================================================
   KOPANSA LOGIN UI v2 - Minimalist Futuristic Blue Glass
   ========================================================================== */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-hover: #1d4ed8;
    --accent: #06b6d4;
    --bg-dark: #071529;
    --bg-mid: #0f2d5c;
    --bg-light: #1d4ed8;
    --card-bg: rgba(10, 25, 50, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, 0.7);
    --radius: 16px; /* Lebih tegas & modern dibanding 24px */
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-mid) 60%, var(--bg-light));
    position: relative;
}

/* Grid Background - Lebih Ringan */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Ambient Glow - Dibuat Lebih Lembut */
body::after, .bg-blob {
    content: "";
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.6;
}

body::after {
    width: 500px;
    height: 500px;
    left: -100px;
    top: -100px;
    background: rgba(37, 99, 235, 0.2);
}

.bg-blob {
    width: 400px;
    height: 400px;
    right: -100px;
    bottom: -100px;
    background: rgba(6, 182, 212, 0.15);
}

/* ==========================================================================
   LAYOUT & CARD (Lebih Kompak)
   ========================================================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    position: relative;
    z-index: 10;
}

.login-card {
    width: 100%;
    max-width: 350px; /* Dipersempit agar lebih compact */
    padding: 24px;
    border-radius: var(--radius);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

/* Glass Highlight */
.login-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* ==========================================================================
   COMPONENTS (Header & Typography)
   ========================================================================== */
.logo-box {
    text-align: center;
    margin-bottom: 16px;
    animation: fadeUp 0.6s ease;
}

.logo {
    width: 64px; /* Diperkecil dari 88px */
    height: 64px;
    margin: auto;
    object-fit: contain;
    padding: 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

.title {
    margin-top: 12px;
    font-size: 24px; /* Diturunkan dari 38px agar proporsional */
    font-weight: 700;
    letter-spacing: -0.5px;
    text-align: center;
    padding: 0 20px;
}

.subtitle {
    margin-top: 4px;
    margin-bottom: 16px;
    text-align: center;
    color: var(--text-soft);
    font-size: 13px;
}

.divider {
    width: 40px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

/* Alert Messages */
.alert {
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12px;
    backdrop-filter: blur(5px);
}
.alert-success { background: rgba(16, 185, 129, 0.15); color: #a7f3d0; }
.alert-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

/* ==========================================================================
   FORM ELEMENTS (Lebih Slim & Clean)
   ========================================================================== */
.smart-form {
    animation: fadeUp 0.8s ease;
}

.form-group {
    margin-bottom: 14px;
}

.smart-form .label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
}



.smart-form .input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    transition: color 0.3s;
}

.smart-form .input input {
    width: 100%;
    height: 44px; /* Lebih slim dibanding 56px */
    padding: 0 40px 0 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13px;
    transition: all 0.3s;
}

.smart-form .input input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.smart-form .input input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.smart-form .input input:focus + i {
    color: var(--primary-light);
}

/* ==========================================================================
   PERBAIKAN POSISI IKON MATA (MASUK KE DALAM INPUT)
   ========================================================================== */

/* Memastikan container input menjadi patokan koordinat ikon */
.smart-form .input {
    position: relative !important;
    display: block;
    width: 100%;
}

/* Memaksa ikon mata masuk ke dalam kotak di sebelah kanan */
.toggle-password {
    position: absolute !important;
    right: 12px !important; /* Jarak dari dinding dalam kanan input */
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.toggle-password:hover {
    color: #ffffff;
}

/* Memastikan teks yang diketik tidak menabrak ikon mata */
.smart-form .input input {
    padding-right: 44px !important; 
}

/* Checkbox & Forgot Password Row */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 18px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-soft);
    cursor: pointer;
    padding-left: 13px;
}

.checkbox input {
    accent-color: var(--primary);
    cursor: pointer;
}

.note a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 12px;
}

.note a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   BUTTON & FOOTER
   ========================================================================== */
.btn-login {
    width: 100%;
    height: 42px; /* Lebih ringkas */
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

.btn-login:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

/* ==========================================================================
   ANIMATIONS & RESPONSIVE
   ========================================================================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    .login-card {
        padding: 20px;
    }
    .title {
        font-size: 22px;
    }
}

/* ==========================================================================
   PERBAIKAN TATA LETAK FORM (RATA KIRI)
   ========================================================================== */

/* Pastikan section form membungkus input dengan rapi */
.smart-form section {
    margin-bottom: 16px !important;
    text-align: left; /* Memaksa semua elemen di dalam section rata kiri */
}

/* Mengubah Label Username & Password Menjadi Rata Kiri */
.smart-form .label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: left; /* Rata kiri */
    padding-left: 4px; /* Sedikit offset agar sejajar dengan lengkungan input */
}

/* Memperbaiki baris Checkbox & Lupa Password */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    margin-bottom: 20px;
    width: 100%;
}

/* Memperbaiki Posisi Tombol Mata (Toggle Password) */
.smart-form .input {
    position: relative;
    display: block;
}

.toggle-password {
    position: absolute;
    right: 16px; /* Menjaga jarak dari tepi kanan input */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    color: #ffffff;
}

/* Memastikan padding kanan input pas agar teks tidak menabrak ikon mata */
.smart-form .input input {
    padding: 0 44px 0 42px; /* Dityesuaikan kembali */
}