/* ==========================================================================
   Login Page Styles - Modern Split-Screen Design
   ========================================================================== */

/* CSS Custom Properties */
:root {
    /* Primary Colors */
    --primary-teal: #26567d;
    --primary-teal-dark: #1d4463;
    --primary-teal-light: #3a7ab0;
    --primary-teal-lighter: #6ba3d4;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Functional */
    --error-red: #EF4444;
    --error-red-light: #FEE2E2;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-3xl: 40px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 300ms ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--gray-800);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Main Container
   ========================================================================== */

.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ==========================================================================
   Left Panel - Branding
   ========================================================================== */

.login-branding {
    display: flex;
    flex-direction: column;
    width: 0;
    min-width: 0;
    opacity: 0;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--primary-teal-dark) 50%, #163347 100%);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
    border-top-right-radius: var(--radius-3xl);
    border-bottom-right-radius: var(--radius-3xl);
    transition: width var(--transition-slow), opacity var(--transition-slow), padding var(--transition-slow);
}

/* Decorative Background Elements */
.branding-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.decoration-circle-1 {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -100px;
}

.decoration-circle-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -80px;
}

.decoration-circle-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    left: 10%;
    background: rgba(255, 255, 255, 0.03);
}

.decoration-circle-4 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 20%;
    background: rgba(255, 255, 255, 0.04);
}

/* Logo */
.branding-logo {
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease 0.1s, transform 0.4s ease 0.1s;
}

@media (min-width: 768px) {
    .branding-logo {
        opacity: 1;
        transform: translateY(0);
    }
}

.branding-logo img {
    height: 40px !important;
    width: auto !important;
    max-width: 160px !important;
    object-fit: contain;
    background: var(--white);
    padding: 8px 12px;
    border-radius: var(--radius-md);
}

/* Content */
.branding-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 500px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.4s ease 0.15s, transform 0.4s ease 0.15s;
}

@media (min-width: 768px) {
    .branding-content {
        opacity: 1;
        transform: translateX(0);
    }
}

.branding-heading {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 20px;
}

.branding-heading .accent {
    color: var(--primary-teal-lighter);
}

.branding-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 400px;
}

/* Illustration */
.branding-illustration {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease 0.25s, transform 0.4s ease 0.25s;
}

@media (min-width: 768px) {
    .branding-illustration {
        opacity: 1;
        transform: translateY(0);
    }
}

.illustration-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

/* ==========================================================================
   Right Panel - Login Form
   ========================================================================== */

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 24px;
    background-color: var(--gray-50);
    transition: width var(--transition-slow), padding var(--transition-slow);
}

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

/* Mobile Logo */
.mobile-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 32px;
    height: auto;
    max-height: 100px;
    opacity: 1;
    transform: scale(1);
    overflow: hidden;
    transition: opacity var(--transition-slow),
                transform var(--transition-slow),
                max-height var(--transition-slow),
                margin-bottom var(--transition-slow);
}

.mobile-logo img {
    height: 48px !important;
    width: auto !important;
    max-width: 180px !important;
    object-fit: contain;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Form Group */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--gray-800);
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-input:hover {
    border-color: var(--gray-400);
}

.form-input:focus {
    border-color: var(--primary-teal);
    box-shadow: 0 0 0 3px rgba(38, 86, 125, 0.15);
}

.form-input.is-invalid {
    border-color: var(--error-red);
    background-color: var(--error-red-light);
}

.form-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-teal);
}

/* Error Message */
.error-message {
    font-size: 0.8125rem;
    color: var(--error-red);
    margin-top: 4px;
}

/* Copy Credentials Button */
.btn-copy-credentials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--primary-teal);
    background-color: rgba(38, 86, 125, 0.1);
    border: 1px dashed var(--primary-teal);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.btn-copy-credentials:hover {
    background-color: rgba(38, 86, 125, 0.15);
}

.btn-copy-credentials:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 86, 125, 0.15);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background-color: var(--primary-teal);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.btn-login:hover {
    background-color: var(--primary-teal-dark);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 86, 125, 0.3);
}

/* Form Footer */
.form-footer {
    margin-top: 48px;
    text-align: center;
}

.form-footer p {
    font-size: 0.8125rem;
    color: var(--gray-400);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet - 768px and up */
@media (min-width: 768px) {
    .login-container {
        flex-direction: row;
        height: 100vh;
    }

    .login-branding {
        width: 50%;
        min-width: 50%;
        opacity: 1;
        padding: 40px;
    }

    .login-form-panel {
        width: 50%;
        padding: 40px;
    }

    .mobile-logo {
        opacity: 0;
        transform: scale(0.8);
        max-height: 0;
        margin-bottom: 0;
    }

    .form-header {
        text-align: left;
    }

    .branding-heading {
        font-size: 2.5rem;
    }
}

/* Desktop - 1024px and up */
@media (min-width: 1024px) {
    .login-branding {
        width: 60%;
        padding: 48px;
    }

    .login-form-panel {
        width: 40%;
        padding: 48px;
    }

    .branding-heading {
        font-size: 3rem;
    }

    .branding-logo img {
        height: 56px;
    }

    .login-form-wrapper {
        max-width: 420px;
    }
}

/* Large Desktop - 1440px and up */
@media (min-width: 1440px) {
    .login-branding {
        padding: 64px;
    }

    .branding-heading {
        font-size: 3.5rem;
    }

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

    .login-form-wrapper {
        max-width: 440px;
    }

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

/* Small Mobile - 375px and below */
@media (max-width: 375px) {
    .login-form-panel {
        padding: 32px 20px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-input {
        padding: 10px 14px;
    }

    .btn-login {
        padding: 12px 20px;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

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

.login-form-wrapper {
    animation: fadeIn 0.4s ease-out;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus visible for keyboard navigation */
.form-input:focus-visible,
.btn-login:focus-visible,
.btn-copy-credentials:focus-visible,
.password-toggle:focus-visible {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-input {
        border-width: 2px;
    }

    .btn-login {
        border: 2px solid var(--white);
    }
}
