/* ===================================
   REDESIGNED LOGIN PAGE - BLACK & YELLOW THEME
   Modern split-screen with hero graphic
   Dark theme with yellow accents
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-yellow: #FFD700;
    --primary-hover: #FFC700;
    --text-white: #FFFFFF;
    --text-gray: #A0A0A0;
    --text-light: #707070;
    --black: #000000;
    --bg-dark: #0A0A0A;
    --bg-darker: #050505;
    --border-color: #333333;
    --input-bg: #1A1A1A;
    --success: #10B981;
    --error: #EF4444;
    --shadow-sm: 0 1px 2px 0 rgba(255, 215, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(255, 215, 0, 0.15);
    --shadow-lg: 0 10px 15px -3px rgba(255, 215, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(255, 215, 0, 0.25);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-white);
    background: var(--black);
    overflow: hidden;
}

/* ===================================
   MAIN WRAPPER
   =================================== */

.login-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ===================================
   LEFT SIDE - HERO GRAPHIC
   =================================== */

.login-hero {
    flex: 0 0 55%;
    position: relative;
    /* Gradient fallback */
    background: linear-gradient(135deg, #2A2A2A 0%, #1A1A1A 100%);
    /* Your custom hero image - save your image as 'login-hero.png' in the images folder */
    background-image: url('../images/login-hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Gray overlay for better text readability (subtle) */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(20, 20, 20, 0.6) 0%,
        rgba(10, 10, 10, 0.7) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.hero-content {
    text-align: center;
    color: var(--text-white);
    max-width: 600px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo {
    width: 240px;
    height: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
    animation: fadeIn 1s ease-out;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ===================================
   RIGHT SIDE - LOGIN FORM (BLACK THEME)
   =================================== */

.login-form-container {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    padding: 2rem;
    overflow-y: auto;
}

.login-form-wrapper {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

.login-header {
    margin-bottom: 2rem;
    text-align: center;
}

.login-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* ===================================
   FORM ELEMENTS
   =================================== */

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--input-bg);
    color: var(--text-white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.15);
}

.form-group input::placeholder {
    color: var(--text-light);
}

/* ===================================
   FORM OPTIONS
   =================================== */

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 5;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.remember-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    cursor: pointer;
    accent-color: var(--primary-yellow);
}

.remember-checkbox .label-text {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.forgot-link {
    font-size: 0.875rem;
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
    z-index: 10;
    cursor: pointer;
}

.forgot-link:hover {
    color: var(--primary-hover);
}

/* ===================================
   LOGIN BUTTON (YELLOW)
   =================================== */

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--primary-yellow);
    color: var(--black);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: var(--shadow-md);
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
    transform: translateX(4px);
}

/* ===================================
   FOOTER
   =================================== */

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--text-gray);
}

.signup-link {
    color: var(--primary-yellow);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: var(--primary-hover);
}

/* ===================================
   ERROR MESSAGE
   =================================== */

.error-message {
    padding: 1rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    border-radius: 10px;
    color: var(--error);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message.hidden {
    display: none;
}

.success-message {
    padding: 1rem;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    border-radius: 10px;
    color: var(--success);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.success-message.hidden {
    display: none;
}

/* ===================================
   ANIMATIONS
   =================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .login-hero {
        flex: 0 0 45%;
    }

    .login-form-container {
        flex: 0 0 55%;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .login-wrapper {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-hero {
        flex: 0 0 auto;
        min-height: 30vh;
    }

    .login-form-container {
        flex: 1;
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .hero-overlay {
        padding: 2rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-logo {
        width: 160px;
        margin-bottom: 1rem;
    }

    .login-header {
        margin-bottom: 1.5rem;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .login-footer {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .login-hero {
        min-height: 25vh;
    }

    .hero-overlay {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-logo {
        width: 140px;
        margin-bottom: 0.75rem;
    }

    .login-form-container {
        padding: 1.5rem 1rem;
    }

    .login-form-wrapper {
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 1.25rem;
    }

    .login-subtitle {
        font-size: 0.875rem;
    }

    .form-group input {
        padding: 0.75rem;
    }

    .btn-login {
        padding: 0.875rem;
    }
}

/* ===================================
   PASSKEY AUTHENTICATION
   =================================== */

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider-text {
    color: var(--text-gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-passkey {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-white);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-passkey:hover {
    border-color: var(--primary-yellow);
    background: rgba(255, 215, 0, 0.05);
    color: var(--primary-yellow);
}

.btn-passkey:hover .passkey-icon {
    color: var(--primary-yellow);
}

.btn-passkey:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.passkey-icon {
    width: 24px;
    height: 24px;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

/* Passkey button responsive */
@media (max-width: 480px) {
    .btn-passkey {
        padding: 0.875rem;
        font-size: 0.9rem;
    }
}
