/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e5bb8;
    --dark-blue: #164a99;
    --light-blue: #2563eb;
    --accent-blue: #3b82f6;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --bg-gray: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gray);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login Container */
.login-container {
    display: flex;
    min-height: 100vh;
    background: var(--white);
}

/* Left Panel - Branding */
.left-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.pattern-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.brand-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 500px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    animation: fadeInDown 0.6s ease-out;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: var(--white);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.logo-letter {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-blue);
}

.brand-name {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: 2px;
}

.panel-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    animation: fadeInDown 0.6s ease-out 0.1s backwards;
}

.panel-subtitle {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 48px;
    animation: fadeInDown 0.6s ease-out 0.2s backwards;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 60px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: fadeInLeft 0.6s ease-out backwards;
}

.feature-item:nth-child(1) { animation-delay: 0.3s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.5s; }

.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: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item span {
    font-size: 16px;
    font-weight: 500;
}

.powered-by {
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.powered-by p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.powered-by h3 {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Right Panel - Login Form */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--white);
}

.login-form-container {
    width: 100%;
    max-width: 460px;
    animation: fadeInRight 0.6s ease-out;
}

.form-header {
    margin-bottom: 40px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 16px;
    color: var(--text-gray);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    pointer-events: none;
    transition: color 0.3s ease;
}

.form-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 15px;
    color: var(--text-dark);
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
}

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

.form-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(30, 91, 184, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-blue);
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-blue);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -8px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.checkbox-label {
    font-size: 14px;
    color: var(--text-gray);
}

.forgot-password {
    font-size: 14px;
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--dark-blue);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    margin-top: 8px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

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

.btn-submit:hover svg {
    transform: translateX(4px);
}

/* Back to Website */
.back-to-website {
    margin-top: 32px;
    text-align: center;
}

.back-to-website a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-to-website a:hover {
    color: var(--primary-blue);
}

.back-to-website svg {
    transition: transform 0.3s ease;
}

.back-to-website a:hover svg {
    transform: translateX(-4px);
}

/* Demo Credentials */
.demo-credentials {
    margin-top: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 12px;
    border-left: 4px solid var(--warning);
}

.demo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 12px;
}

.demo-credentials p {
    font-size: 13px;
    color: #78350f;
    margin-bottom: 4px;
}

.demo-credentials p:last-child {
    margin-bottom: 0;
}

.demo-credentials strong {
    font-weight: 600;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
    }
    
    .left-panel {
        padding: 40px;
        min-height: 400px;
    }
    
    .panel-title {
        font-size: 28px;
    }
    
    .brand-name {
        font-size: 36px;
    }
    
    .features {
        margin-bottom: 40px;
    }
    
    .right-panel {
        padding: 40px;
    }
}

@media (max-width: 640px) {
    .left-panel {
        padding: 32px 24px;
    }
    
    .right-panel {
        padding: 32px 24px;
    }
    
    .logo-section {
        margin-bottom: 32px;
    }
    
    .logo-icon {
        width: 56px;
        height: 56px;
    }
    
    .logo-letter {
        font-size: 28px;
    }
    
    .brand-name {
        font-size: 32px;
    }
    
    .panel-title {
        font-size: 24px;
    }
    
    .panel-subtitle {
        font-size: 14px;
        margin-bottom: 32px;
    }
    
    .welcome-title {
        font-size: 28px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Loading State */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* Focus Visible */
*:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible {
    outline: none;
}
