﻿/* ============================================
   TOYOTA QUOTING PORTAL - LOGIN PAGE
   Professional Authentication Interface
   ============================================ */

:root {
    --toyota-red: #eb0a1e;
    --toyota-red-dark: #c8102e;
    --toyota-grey-dark: #1a1a1a;
    --toyota-grey: #666666;
    --toyota-grey-light: #999999;
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}
.image
{
    height: 7rem;
}
/* Decorative background elements */
.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 120%;
    background: radial-gradient(circle, rgba(235, 10, 30, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

    .login-page::after {
        content: '';
        position: absolute;
        bottom: -30%;
        left: -10%;
        width: 50%;
        height: 100%;
        background: radial-gradient(circle, rgba(235, 10, 30, 0.03) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

/* ============================================
   SPLIT LAYOUT - LEFT BRANDING / RIGHT FORM
   ============================================ */
.login-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-radius: 1.5rem;
    overflow: hidden;
    background: white;
    position: relative;
    z-index: 1;
}

/* ============================================
   LEFT SIDE - BRANDING PANEL
   ============================================ */
.login-branding {
    flex: 1;
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

    /* Animated background pattern */
    .login-branding::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: repeating-linear-gradient( 45deg, transparent, transparent 60px, rgba(255, 255, 255, 0.03) 60px, rgba(255, 255, 255, 0.03) 120px );
        animation: slide 20s linear infinite;
    }

@keyframes slide {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, 60px);
    }
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-logo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

    .branding-logo i {
        font-size: 3.5rem;
        color: white;
    }

.branding-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: white;
}

.branding-subtitle {
    font-size: 1.125rem;
    font-weight: 400;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 3rem;
    color: white;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

    .feature-item:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: translateX(8px);
    }

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .feature-icon i {
        font-size: 1.5rem;
    }

.feature-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: white;
}

.feature-text p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.9;
    color: white;
}

/* ============================================
   RIGHT SIDE - FORM PANEL
   ============================================ */
.login-form-panel {
    flex: 1;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.form-header {
    margin-bottom: 3rem;
}

    .form-header h1 {
        font-size: 2rem;
        font-weight: 800;
        color: var(--toyota-grey-dark);
        margin: 0 0 0.5rem 0;
        letter-spacing: -0.02em;
    }

    .form-header p {
        font-size: 1rem;
        color: var(--toyota-grey);
        margin: 0;
    }

/* ============================================
   ALERT STYLING
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid #f87171;
    color: #991b1b;
}

    .alert-danger i {
        font-size: 1.25rem;
        color: #dc2626;
    }

/* ============================================
   FORM GROUPS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

    .form-group label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 600;
        color: var(--toyota-grey-dark);
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

        .form-group label i {
            font-size: 1rem;
            color: var(--toyota-red);
        }

.form-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--toyota-grey-dark);
    transition: all 0.2s ease;
    background: white;
}

    .form-input:focus {
        outline: none;
        border-color: var(--toyota-red);
        box-shadow: 0 0 0 4px rgba(235, 10, 30, 0.1);
    }

    .form-input::placeholder {
        color: #9ca3af;
    }

/* Validation messages */
.validation-message {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.375rem;
    display: block;
    font-weight: 500;
}

/* ============================================
   CHECKBOX STYLING
   ============================================ */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.form-check-input {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .form-check-input:checked {
        background-color: var(--toyota-red);
        border-color: var(--toyota-red);
    }

    .form-check-input:focus {
        outline: none;
        box-shadow: 0 0 0 4px rgba(235, 10, 30, 0.1);
    }

.form-check-label {
    font-size: 0.875rem;
    color: var(--toyota-grey);
    cursor: pointer;
    user-select: none;
}

/* ============================================
   LINKS
   ============================================ */
.form-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.link-primary {
    color: var(--toyota-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

    .link-primary:hover {
        color: var(--toyota-red-dark);
        gap: 0.625rem;
    }

    .link-primary i {
        font-size: 0.75rem;
    }

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.btn-login {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--toyota-red) 0%, var(--toyota-red-dark) 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(235, 10, 30, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 2rem 0 1.5rem 0;
}

    .btn-login:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(235, 10, 30, 0.4);
    }

    .btn-login:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    .btn-login i {
        font-size: 1.125rem;
    }

/* ============================================
   FOOTER / REGISTER LINK
   ============================================ */
.form-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

    .form-footer p {
        color: var(--toyota-grey);
        font-size: 0.875rem;
        margin: 0;
    }

    .form-footer a {
        color: var(--toyota-red);
        text-decoration: none;
        font-weight: 700;
        transition: color 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        margin-left: 0.25rem;
    }

        .form-footer a:hover {
            color: var(--toyota-red-dark);
        }

        .form-footer a i {
            font-size: 0.875rem;
        }

/* ============================================
   EXTERNAL LOGIN SECTION
   ============================================ */
.external-login-section {
    margin-top: 2rem;
    text-align: center;
}

    .external-login-section h3 {
        color: var(--toyota-grey);
        font-size: 0.8125rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 1rem;
    }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .login-container {
        margin: 1.5rem;
    }

    .login-branding,
    .login-form-panel {
        padding: 3rem;
    }
}

@media (max-width: 768px) {
    .login-page::before,
    .login-page::after {
        display: none;
    }

    .login-container {
        flex-direction: column;
        margin: 0;
        border-radius: 0;
    }

    .login-branding {
        padding: 3rem 2rem;
        min-height: auto;
    }

    .branding-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }

        .branding-logo i {
            font-size: 2.5rem;
        }

    .branding-title {
        font-size: 1.75rem;
    }

    .branding-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .branding-features {
        display: none;
    }

    .login-form-panel {
        padding: 2rem;
    }

    .form-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-branding {
        padding: 2rem 1.5rem;
    }

    .login-form-panel {
        padding: 1.5rem;
    }

    .btn-login {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.btn-login:focus-visible,
.form-input:focus-visible,
.form-check-input:focus-visible {
    outline: 3px solid var(--toyota-red);
    outline-offset: 2px;
}

.link-primary:focus-visible {
    outline: 2px solid var(--toyota-red);
    outline-offset: 2px;
    border-radius: 0.25rem;
}

/* ============================================
   LOADING STATE
   ============================================ */
.btn-login.loading {
    position: relative;
    color: transparent;
}

    .btn-login.loading::after {
        content: '';
        position: absolute;
        width: 1.25rem;
        height: 1.25rem;
        top: 50%;
        left: 50%;
        margin-left: -0.625rem;
        margin-top: -0.625rem;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.6s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
