/* ==========================================================================
   Shared Authentication Styles
   Login / Register / OTP / Password Reset
   ========================================================================== */

@import url('colors.css');

:root {
    --auth-gradient-start: var(--color-primary);
    --auth-gradient-end: var(--button-primary-hover);
    --auth-card-bg: var(--card-background, #ffffff);
    --auth-card-shadow: rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Base Layout
   ========================================================================== */

body {
    font-family: inherit;
    /* Hero image background with subtle dark overlay for contrast */
    background-color: var(--page-background);
    background-image: linear-gradient(rgba(0,0,0,0.28), rgba(0,0,0,0.28)), url('../../img/hero.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
}

/* ==========================================================================
   Authentication Container
   ========================================================================== */

.login-container {
    display: flex;
    background: var(--auth-card-bg);
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--auth-card-shadow);
    max-width: 900px;
    width: 100%;
    overflow: hidden;
}

/* ==========================================================================
   Branding Section
   ========================================================================== */

.branding-section {
    background: linear-gradient(
        135deg,
        var(--auth-gradient-start) 0%,
        var(--auth-gradient-end) 100%
    );
    color: var(--color-card);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    width: 40%;
}

.brand-logo {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.brand-logo img {
    max-width: 68px;
    max-height: 68px;
    border-radius: 50%;
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.brand-description {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.95;
    text-align: center;
}

/* ==========================================================================
   Form Section
   ========================================================================== */

.form-section {
    padding: 60px 40px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

/* ==========================================================================
   Form Labels
   ========================================================================== */

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ==========================================================================
   Form Inputs
   ========================================================================== */

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--form-border);
    border-radius: 8px;
    font-size: 16px;
    background: var(--form-background);
    color: var(--form-text);
}

input:focus {
    outline: none;
    border-color: var(--button-primary);
}

/* ==========================================================================
   Remember / Forgot Section
   ========================================================================== */

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(
        135deg,
        var(--button-primary) 0%,
        var(--button-primary-hover) 100%
    );
    color: var(--color-card);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================================================
   Signup Link
   ========================================================================== */

.signup-link {
    text-align: center;
    margin-top: 18px;
    font-size: 14px;
    color: var(--text-secondary);
}

.signup-link a {
    color: var(--button-primary);
    font-weight: 600;
    text-decoration: none;
}

/* ==========================================================================
   Status Messages
   ========================================================================== */

.error-banner {
    background: #fdecea;
    color: #842029;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .branding-section {
        width: 100%;
        padding: 40px 20px;
    }

    .form-section {
        width: 100%;
        padding: 40px 20px;
    }
}

/* ==========================================================================
   OTP Helpers
   ========================================================================== */

.otp-input-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.otp-input {
    width: 44px;
    height: 56px;
    border-radius: 8px;
    border: 2px solid var(--form-border);
    text-align: center;
    font-size: 20px;
}

