/* assets/Login.css (FINAL CLEAN VERSION) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }

:root {
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --primary: #007bff; /* Biru Utama */
    --primary-hover: #0056b3; /* Biru Gelap */
    --accent-tech: #00f2ff; /* Cyan */
    --text-main: #e0e0e0;
    --text-muted: #8b9bb4;
    --border-color: rgba(255, 255, 255, 0.1);
    --input-bg: rgba(255, 255, 255, 0.05);
}

body {
    background-color: var(--bg-dark);
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ==========================================
   SPLIT LAYOUT CONTAINER
   ========================================== */
.split-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* ==========================================
   BAGIAN KIRI: TEMA TECH / XZZ
   ========================================== */
.split-left {
    flex: 1.3;
    position: relative;
    background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    align-items: center; 
    padding: 40px;
    overflow: hidden;
}

/* Garis Grid Background */
.split-left::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    z-index: 0;
}

/* --- BRAND LOGO --- */
.brand-logo-top {
    /* Hapus position absolute jika tidak sengaja ke apply */
    position: relative; 
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    width: 100%; /* Lebar penuh biar rapi */
    justify-content: center; /* Rata tengah */
}

.logo-text {
    font-family: 'JetBrains Mono', monospace; 
    font-size: 16px; 
    font-weight: 400;
    color: #fff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.version-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    color: #fff;
    border: 1px solid rgba(0, 242, 255, 0.3);
    font-weight: 400;
}

/* --- KONTEN TENGAH (SHOWCASE) --- */
.product-showcase {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Lingkaran Gambar Produk */
.product-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 2px solid var(--primary); /* Biru */
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.3); /* Biru Glow */
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    animation: pulse 3s infinite;
}

.product-circle img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Orbit Animation */
.product-circle::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px dashed rgba(0, 242, 255, 0.3);
    border-radius: 50%;
    animation: rotateOrbit 10s linear infinite;
}

@keyframes rotateOrbit { 100% { transform: rotate(360deg); } }
@keyframes pulse { 
    0%, 100% { box-shadow: 0 0 30px rgba(0, 123, 255, 0.2); } 
    50% { box-shadow: 0 0 50px rgba(0, 123, 255, 0.4); }
}

.product-title {
    font-family: 'JetBrains Mono', monospace; 
    font-size: 15px;
    font-weight: 400;
    color: #fff;
    line-height: 1.4;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.product-tagline {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* --- FOOTER KIRI (DEVICE SUPPORT) --- */
.tech-footer {
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px; 
}
.tech-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.tech-item i {
    color: var(--primary); /* Biru */
}

/* ==========================================
   BAGIAN KANAN: FORM
   ========================================== */
.split-right > [data-tauri-drag-region] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px; /* Tinggi area drag */
    z-index: 1;   /* Di bawah tombol close */
    /* pointer-events: auto; penting untuk Tauri drag */
}


.split-right {
    flex: 1;
    background-color: var(--bg-dark);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    overflow-y: auto;
    border-left: 1px solid #222;
}

.drag-region-right {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px; 
    z-index: 1;   /* <--- INI PENTING: RENDAH */
}

.window-controls {
    position: absolute;
    top: -5px;      /* Atur posisi */
    right: 5px;
    z-index: 999;  /* <--- INI PENTING: TINGGI */
}
.close-btn {
    background: transparent; border: none;
    color: rgba(255, 255, 255, 0.3); font-size: 18px;
    width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer; transition: 0.2s;
}
.close-btn:hover { background: rgba(255, 77, 77, 0.2); color: #ff4d4d; }

.auth-form-wrapper {
    width: 100%; max-width: 350px;
    animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* TABS */
.tabs-modern { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.tabs-modern .tab { color: var(--text-muted); font-weight: 600; font-size: 14px; cursor: pointer; transition: color 0.3s; }
.tabs-modern .tab:hover { color: #fff; }
.tabs-modern .tab.active { color: #fff; }

/* FORM */
.form-section { display: none; }
.form-section.active { display: block; }
h2 { text-align: left; margin-bottom: 5px; color: #fff; font-size: 24px; font-weight: 700; }

/* INPUT */
.input-group { margin-bottom: 15px; position: relative; }
.input-group input {
    width: 100%; padding: 14px 15px 14px 45px;
    background: var(--input-bg); border: 1px solid var(--border-color);
    border-radius: 8px; color: #fff; outline: none;
    font-family: 'JetBrains Mono', monospace; font-size: 13px;
    transition: 0.3s;
}
.input-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; transition: 0.3s; }

/* --- WARNA INPUT FOCUS: BIRU --- */
.input-group input:focus { 
    border-color: var(--primary); 
    background: rgba(0, 0, 0, 0.8); 
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); 
}
.input-group input:focus + .input-icon { color: var(--primary); }
.input-group input::placeholder { color: rgba(255, 255, 255, 0.3); font-family: 'Inter', sans-serif; }

/* BUTTONS - SEMUA TOMBOL JADI BIRU */
button {
    width: 100%; padding: 14px;
    background: var(--primary); border: none; border-radius: 8px;
    color: white; font-size: 13px; font-weight: 700; letter-spacing: 0.5px;
    text-transform: uppercase; cursor: pointer; margin-top: 10px;
    transition: 0.3s; box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3); 
}

button:hover { 
    background: var(--primary-hover); 
    transform: translateY(-2px); 
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}
button:active { transform: translateY(0); }

/* DIVIDER */
.divider { display: flex; align-items: center; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color); }
.divider span { padding: 0 10px; color: var(--text-muted); font-size: 12px; }

/* SOCIAL */
.social-login { display: flex; justify-content: center; gap: 15px; margin-top: 10px; }
.social-btn {
    width: 50px; height: 40px; padding: 0; border-radius: 8px;
    border: 1px solid var(--border-color); background: transparent;
    color: #fff; display: flex; align-items: center; justify-content: center;
    box-shadow: none; cursor: pointer; transition: 0.3s;
}
.social-btn:hover { background: rgba(255,255,255,0.05); border-color: #fff; transform: none; }

/* REMEMBER ME */
.remember-group { display: flex; align-items: center; justify-content: flex-start; margin-bottom: 20px; gap: 10px; color: var(--text-muted); font-size: 12px; cursor: pointer; user-select: none; }
.remember-group input[type="checkbox"] { appearance: none; -webkit-appearance: none; width: 16px; height: 16px; background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 4px; cursor: pointer; position: relative; transition: all 0.3s ease; flex-shrink: 0; }
.remember-group input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.remember-group input[type="checkbox"]:checked::after { content: '\f00c'; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #fff; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 9px; }

/* MSG BOX */
.msg-box { text-align: center; margin-top: 15px; font-size: 12px; min-height: 20px; font-weight: 500; color: #e0e0e0; }
.error { color: #ff6b6b; } .success { color: #2ed573; }

.forgot-btn { color: var(--text-muted); font-size: 12px; font-weight: 500; cursor: pointer; transition: 0.3s; user-select: none; display: inline-block; }
.forgot-btn:hover { color: #fff; }

/* RESET OVERLAY */
#reset-overlay {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px);
    z-index: 999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    display: none;
}

.disabled-mode {
    opacity: 0.2;
    pointer-events: none;
    filter: blur(2px);
    transition: all 0.3s ease;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .split-left { display: none; }
    .split-right { flex: 1; }
}


/* ==========================================
   AUTH DEVICE MODAL - STYLE MIRIP FORGOT PASSWORD
   ========================================== */
#auth-device-modal {
    /* Jadikan absolute agar sejajar dengan split-right */
    position: absolute; 
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    
    /* Sama persis dengan reset overlay */
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(10px);
    
    z-index: 998; 
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Card di dalamnya dibuat transparan agar menyatu dengan overlay */
.modal-auth-card {
    width: 100%;
    max-width: 350px; /* Samakan lebar dengan form login */
    background: transparent; /* Hilangkan kotak hitam */
    border: none; /* Hilangkan border */
    padding: 0; /* Atur padding di dalam konten saja */
    box-shadow: none;
}


/* ==========================================
   PERPENDEK TINGGI ELEMEN DI MODAL AUTH DEVICE
   ========================================== */

/* 1. Perpendek Tinggi Input di dalam Modal ini */
#auth-device-modal .input-group input {
    padding: 10px 15px 10px 45px; /* Dari 14px jadi 10px (lebih tipis) */
}

/* 2. Perpendek Tinggi Tombol di dalam Modal ini */
#auth-device-modal button {
    padding: 10px; /* Dari 14px jadi 10px */
    margin-top: 5px; /* Kurangi jarak atas tombol */
}

/* 3. Perpendek Jarak antar Elemen */
#auth-device-modal .input-group {
    margin-bottom: 10px; /* Dari 15px jadi 10px */
}

/* 4. Perkecil sedikit font label */
#auth-device-modal label {
    margin-bottom: 5px !important;
}


/* ==========================================
   PERPENDEK TINGGI ELEMEN DI RESET PASSWORD
   ========================================== */

/* 1. Perpendek Tinggi Input di Reset Password */
#reset-overlay .input-group input {
    padding: 10px 15px 10px 45px; /* Dari 14px jadi 10px */
}

/* 2. Perpendek Tinggi Tombol di Reset Password */
#reset-overlay button {
    padding: 10px; /* Dari 14px jadi 10px */
    margin-top: 5px;
}

/* 3. Perpendek Jarak antar Elemen */
#reset-overlay .input-group {
    margin-bottom: 10px; /* Rapatkan jarak */
}

/* 4. Samakan ukuran judul (Opsional) */
#reset-overlay h2 {
    margin-bottom: 10px;
    font-size: 18px; /* Samakan dengan modal auth device */
}

