/**
 * Login Page Styles - Split Screen Design
 * Form on left, Image on right
 */

/* ==================== BASE RESET ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #1e293b;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==================== LAYOUT ==================== */
.login-container {
    display: grid;
    grid-template-columns: 45% 55%;
    height: 100vh;
    overflow: hidden;
}

/* ==================== LEFT PANEL - FORM (REDESIGN) ==================== */
.login-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #ffffff;
    position: relative;
    z-index: 10;
    overflow-y: auto;
    width: 100%;
}

.form-wrapper {
    width: 100%;
    max-width: 380px;
    /* Lebar standar yang nyaman */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center semua content */
    gap: 1.5rem;
    /* Jarak KONSISTEN antar elemen utama */
}

/* ==================== 1. LOGO SECTION (NEW) ==================== */
.simple-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    /* Tidak perlu margin bottom karena parent pakai gap */
}

.simple-logo-container img {
    width: 350px !important;
    /* REQUESTED: 350px (Desktop) */
    height: auto !important;
    object-fit: contain;
    display: block;
    max-height: none;
    /* Lepas limit tinggi */
}

.default-logo {
    width: 64px;
    height: 64px;
    color: #2563EB;
}

/* ==================== 2. WELCOME SECTION (NEW) ==================== */
.welcome-section {
    text-align: center;
    width: 100%;
    margin-bottom: 0.5rem;
    /* Sedikit jarak tambahan ke form */
}

.welcome-title {
    font-size: 1.75rem;
    /* Ukuran font modern */
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
}

/* ==================== 3. LOGIN FORM (NEW) ==================== */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    /* Jarak antar input */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Jarak label ke input */
    width: 100%;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: #0f172a;
    background: #f8fafc;
    /* Sedikit grey biar modern */
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

/* MOBILE RESPONSIVE TWEAKS */
@media (max-width: 1024px) {
    .simple-logo-container img {
        width: 250px !important;
        /* Mobile request: 250px */
    }

    .form-wrapper {
        gap: 1.25rem;
        /* Rapatkan gap di mobile */
    }
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:hover {
    border-color: #d1d5db;
}

.form-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper .form-input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.toggle-password:hover {
    color: #2563EB;
    background: #EFF6FF;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

.hidden {
    display: none !important;
}

/* ==================== ERROR MESSAGE ==================== */
.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 10px;
    color: #DC2626;
    font-size: 0.875rem;
    font-weight: 500;
}

.error-message svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ==================== LOGIN BUTTON ==================== */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.5rem;
}

.btn-login:hover {
    background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    width: 22px;
    height: 22px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ==================== FOOTER ==================== */
.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.footer-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563EB;
    margin-bottom: 1rem;
}

.security-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #6b7280;
    font-size: 0.75rem;
}

.security-item svg {
    width: 16px;
    height: 16px;
    color: #10B981;
}

.security-item span {
    font-weight: 500;
}

/* ==================== RIGHT PANEL - IMAGE ==================== */
.login-image-panel {
    position: relative;
    overflow: hidden;
}

.panel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.panel-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 35%;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.75) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 2rem 2.5rem;
}

.panel-content {
    color: #ffffff;
    max-width: 100%;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.panel-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .login-container {
        grid-template-columns: 1fr;
        background: url('/images/login-side.png') center/cover no-repeat;
        padding: 2rem;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .login-container::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
    }

    .login-image-panel {
        display: none;
    }

    .login-form-panel {
        min-height: auto;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 24px;
        padding: 2.5rem 2rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        max-width: 400px;
        width: 100%;
        position: relative;
        z-index: 1;
    }

    /* Old logo fix removed - replaced by .simple-logo-container rules */

    .form-wrapper {
        max-width: 100%;
    }

    .login-logo {
        justify-content: center;
        margin-bottom: 1.5rem;
    }

    .welcome-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }

    .login-form-panel {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-subtitle {
        font-size: 0.875rem;
    }

    .form-input {
        padding: 0.8rem;
    }

    .btn-login {
        padding: 0.85rem 1.25rem;
    }

    .login-footer {
        margin-top: 1rem;
    }
}

/* ==================== ANIMATIONS ==================== */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}