/* VARIABEL LOKAL (Mengambil nilai dari tema Index/Style utama) */
:root {
    /* Palet Warna Utama: Solid Dark Professional (Sama dengan index.html) */
    --auth-bg: #0f172a;       /* Slate 900 - Background Halaman */
    --auth-panel: #1e293b;    /* Slate 800 - Background Panel Kartu */
    --auth-input: #020617;    /* Slate 950 - Background Input */
    
    --auth-accent: #14b8a6;   /* Teal 500 - Aksen Utama */
    --auth-accent-hover: #0d9488; /* Teal 600 - Hover */
    --auth-accent-light: #64FFDA; /* Teal Terang */
    
    --auth-text: #f8fafc;     /* Slate 50 - Teks Utama */
    --auth-muted: #94a3b8;    /* Slate 400 - Teks Muted */
    --auth-border: rgba(255, 255, 255, 0.08); /* Garis Batas Halus */
    
    --danger: #ef4444;
    --success: #10b981;
}

/* Reset & Font */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; }

/* Layout Halaman */
.auth-page-container {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--auth-bg);
    padding-top: 80px; /* Kompensasi Header agar pas di tengah */
    overflow: hidden;
    /* Pattern Background */
    background-image: 
        linear-gradient(var(--auth-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--auth-border) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* --- HEADER / NAVBAR (Sama seperti tampilan utama) --- */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 80px; /* Tinggi sama dengan index.html */
    background: rgba(11, 17, 32, 0.85); /* Sedikit transparan gelap */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--auth-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    z-index: 50;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    color: var(--auth-accent);
    /* Sedikit efek glow halus agar sama dengan index */
    filter: drop-shadow(0 0 5px rgba(20, 184, 166, 0.4));
}

.header h1 a {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.header-action {
    display: flex;
    align-items: center;
}

.nav-btn-home {
    background: transparent;
    color: var(--auth-muted);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--auth-border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn-home:hover {
    border-color: var(--auth-accent);
    color: var(--auth-accent);
    background: rgba(20, 184, 166, 0.05);
}

/* Kontainer Kartu Utama */
.container {
    background-color: var(--auth-panel);
    border-radius: 16px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    width: 850px; 
    max-width: 90%;
    min-height: 550px;
    border: 1px solid var(--auth-border);
}

/* --- AREA FORM --- */
.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
    left: 0;
    width: 50%;
    z-index: 2;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--auth-panel);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

/* Wrapper Form Internal */
.form-wrapper {
    width: 100%;
    max-width: 320px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.inner-form {
    width: 100%;
    background-color: var(--auth-panel);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Judul */
.form-title {
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--auth-text);
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.reset-desc { color: var(--auth-muted); font-size: 14px; margin-bottom: 20px; }

/* --- INPUT FIELDS --- */
.input-group {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
}

.input-group i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--auth-accent);
    font-size: 16px;
    pointer-events: none;
    z-index: 10;
}

.input-group input,
.input-group select {
    background-color: var(--auth-input);
    border: 1px solid var(--auth-border);
    padding: 12px 16px 12px 48px; /* Ruang ikon */
    width: 100%;
    border-radius: 8px;
    color: var(--auth-text);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
    height: 48px;
}

.input-group input::placeholder { color: var(--auth-muted); opacity: 0.6; }

.input-group input:focus,
.input-group select:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 1px var(--auth-accent);
}

.input-group select {
    appearance: none;
    cursor: pointer;
}
.input-group select option { background-color: var(--auth-panel); color: var(--auth-text); }

/* --- TOMBOL --- */
.submit-btn {
    background-color: var(--auth-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.submit-btn:hover { background-color: var(--auth-accent-hover); transform: translateY(-2px); }

.btn-outline {
    background: transparent;
    border: 1px solid var(--auth-border);
    color: var(--auth-muted);
    margin-top: 10px;
}
.btn-outline:hover {
    border-color: var(--auth-text);
    color: var(--auth-text);
    background: rgba(255,255,255,0.05);
    transform: none;
}

/* --- LINK & PESAN --- */
.forgot-password {
    color: var(--auth-muted);
    font-size: 13px;
    text-decoration: none;
    margin: 5px 0 24px 0;
    align-self: flex-end;
    transition: color 0.2s;
}
.forgot-password:hover { color: var(--auth-accent-light); }

.success-message, .error-message {
    display: none;
    font-size: 13px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    width: 100%;
    text-align: center;
    font-weight: 600;
}
.success-message { background: rgba(16, 185, 129, 0.1); border: 1px solid var(--success); color: var(--success); }
.error-message { background: rgba(239, 68, 68, 0.1); border: 1px solid var(--danger); color: var(--danger); }

/* --- OVERLAY (Panel Geser) --- */
.overlay-container {
    position: absolute; top: 0; left: 50%; width: 50%; height: 100%; overflow: hidden;
    transition: transform 0.6s ease-in-out; z-index: 100;
}
.overlay {
    background: linear-gradient(135deg, var(--auth-accent-hover) 0%, var(--auth-accent) 100%);
    color: #fff;
    position: relative; left: -100%; height: 100%; width: 200%;
    transform: translateX(0); transition: transform 0.6s ease-in-out;
}

.overlay-panel {
    position: absolute; display: flex; align-items: center; justify-content: center;
    flex-direction: column; padding: 0 40px; text-align: center;
    top: 0; height: 100%; width: 50%; transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}
.overlay-panel h2 { margin-bottom: 15px; font-size: 2rem; font-weight: 800; color: #fff; }
.overlay-panel p { font-size: 14px; line-height: 1.6; margin-bottom: 30px; color: rgba(255,255,255,0.9); }

.switch-btn {
    background-color: transparent; 
    border: 2px solid #fff; 
    color: #fff;
    border-radius: 50px; font-size: 12px; font-weight: 700; padding: 12px 40px;
    letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
    transition: all 0.3s ease;
}
.switch-btn:hover { background-color: #fff; color: var(--auth-accent); transform: scale(1.05); }

/* --- ANIMASI GESER --- */
.overlay-left { transform: translateX(-20%); }
.overlay-right { right: 0; transform: translateX(0); }

/* Logika Aktif */
.container.right-panel-active .sign-in-container { transform: translateX(100%); }
.container.right-panel-active .sign-up-container { transform: translateX(100%); opacity: 1; z-index: 5; animation: show 0.6s; }
.container.right-panel-active .overlay-container { transform: translateX(-100%); }
.container.right-panel-active .overlay { transform: translateX(50%); }
.container.right-panel-active .overlay-left { transform: translateX(0); }
.container.right-panel-active .overlay-right { transform: translateX(20%); }

@keyframes show { 0%, 49.99% { opacity: 0; z-index: 1; } 50%, 100% { opacity: 1; z-index: 5; } }

@media (max-width: 768px) {
    .auth-page-container { padding: 20px; height: auto; align-items: flex-start; overflow-y: auto; }
    .container { width: 100%; max-width: 450px; min-height: 650px; }
    .form-container { width: 100%; height: auto; position: relative; top: auto; left: auto; padding: 30px; }
    .overlay-container { display: none; }
    .sign-in-container { transform: none !important; opacity: 1; z-index: 5; display: flex; }
    .sign-up-container { display: none; }
}