/* ============================================
   Login Page - Stylesheet
   ============================================ */

/* --- CSS Variables (Design Tokens) --- */
:root {
    /* Primary Colors */
    --primary-dark: #1a1a4e;
    --primary-mid: #2d2d8a;
    --primary-light: #4a4aff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1a1a4e 0%, #2d2d8a 50%, #4a4aff 100%);
    --gradient-login-bg: linear-gradient(135deg, #1a1a4e 0%, #2d2d8a 25%, #4a4aff 50%, #2d2d8a 75%, #1a1a4e 100%);
    --gradient-page-bg: linear-gradient(135deg, #F8F9FB 0%, #EEF2FF 50%, #F8F9FB 100%);

    /* Accent Colors */
    --success: #4CAF50;
    --success-hover: #45a049;
    --danger: #e74c3c;
    --danger-hover: #c0392b;
    --blue-accent: #1a73e8;
    --blue-link: #7ecfff;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #F8F9FB;
    --gray-100: #EEF2FF;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 2px 12px rgba(26, 26, 78, 0.06);
    --shadow-md: 0 4px 20px rgba(26, 26, 78, 0.08);
    --shadow-lg: 0 8px 30px rgba(26, 26, 78, 0.12);

    /* Typography */
    --font-family: 'Heebo', Arial, sans-serif;
    --font-heading: 'Lexend', sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --radius-full: 9999px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--gradient-page-bg);
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
}

/* --- Utility Classes --- */
.hidden {
    display: none;
}

/* --- Login Container --- */
.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: radial-gradient(circle at 70% 50%, #1e3a8a 0%, #0a0a25 100%);
}

/* --- Login Header --- */
.login-header {
    background: linear-gradient(135deg, #1a1a4e 0%, #2d2d8a 50%, #4a4aff 100%);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 36px;
    width: auto;
    cursor: pointer;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

.header-tagline {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 400;
    margin: 0;
    font-family: var(--font-heading);
}

.chat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.chat-icon-wrapper:hover {
    transform: scale(1.1);
}

.chat-icon-svg {
    width: 100%;
    height: 100%;
}

/* --- Login Main --- */
.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 8rem;
    gap: 4rem;
    position: relative;
    overflow: hidden;
}

.bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

.chevron-decoration {
    width: 100%;
    height: 100%;
    opacity: 0.2;
}

/* --- Branding Section --- */
.branding-section {
    width: 45%;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.branding-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    font-family: var(--font-heading);
}

.branding-divider,
.branding-hr {
    width: 40px;
    height: 3px;
    background: #4aa8ff;
    margin-bottom: 2rem;
    border: none;
}

.branding-text {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.copyright {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4rem;
}

/* --- Login Form Section --- */
.login-form-section {
    width: 50%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    /* max-width: 400px; */
    background: #142b93;
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}

.password-group {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: #0688b9;
    border: none;
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-input:focus {
    outline: 2px solid rgba(74, 168, 255, 0.5);
    outline-offset: 2px;
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* --- Terms and Conditions --- */
.terms-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 0.875rem;
}

.terms-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #0688b9;
    cursor: pointer;
}

.terms-label {
    color: var(--white);
    font-size: 0.875rem;
    cursor: pointer;
}

.terms-link {
    color: #7ecfff;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.terms-link:hover {
    color: #4aa8ff;
}

/* --- Login Button --- */
.login-btn {
    background: #0688b9;
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    margin: 1rem auto 0;
    width: fit-content;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

.login-btn:hover:not(:disabled) {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

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

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

/* --- Error Message --- */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
}

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

/* --- Loader --- */
.loader {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* --- Login Links --- */
.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.link-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.link-item:hover {
    color: #7ecfff;
    text-decoration: underline;
}

/* --- Login Footer --- */
.login-footer {
    padding: 1rem 4rem;
    display: flex;
    justify-content: flex-end;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8125rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    transition: color 0.2s ease;
    text-decoration: none;
}

.footer-link:hover {
    color: var(--white);
    text-decoration: underline;
}

/* --- Modal Overlay --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

.modal-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-icon {
    margin-bottom: 1.5rem;
}

.modal-icon svg {
    display: inline-block;
}

.modal-title {
    font-family: 'Lexend', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.modal-message {
    font-family: 'Heebo', sans-serif;
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 2.5rem;
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4);
}

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

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .login-main {
        padding: 3rem 4rem;
        gap: 3rem;
    }

    .branding-section {
        width: 48%;
    }

    .login-form-section {
        width: 48%;
    }
}

@media (max-width: 768px) {
    .login-header {
        padding: 0.75rem 1.5rem;
    }

    .header-tagline {
        font-size: 1rem;
    }

    .login-main {
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 2rem;
    }

    .branding-section {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .login-form-section {
        width: 100%;
        padding: 1rem;
    }

    .login-card {
        max-width: 100%;
        padding: 2rem;
    }

    .login-footer {
        padding: 1rem 1.5rem;
        justify-content: center;
    }

    .header-tagline {
        display: none;
    }

    .chat-icon-wrapper {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .login-header {
        padding: 0.5rem 1rem;
    }

    .logo-img {
        height: 28px;
    }

    .login-main {
        padding: 1.5rem 1rem;
    }

    .login-card {
        padding: 1.5rem;
    }

    .branding-title {
        font-size: 1.25rem;
    }

    .branding-text {
        font-size: 0.875rem;
    }

    .login-input {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .login-btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }

    .modal-card {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-title {
        font-size: 1.25rem;
    }

    .modal-message {
        font-size: 0.875rem;
    }
}
