/* Modern Login Page Styles - Enhanced UI/UX */

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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --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);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* Font Families */
@font-face {
    font-family: Gilroy-Bold;
    src: url("../fonts/Gilroy-Bold.ttf");
}
@font-face {
    font-family: Gilroy-Heavy;
    src: url("../fonts/Gilroy-Heavy.ttf");
}
@font-face {
    font-family: Gilroy-Regular;
    src: url("../fonts/Gilroy-Regular.ttf");
}
@font-face {
    font-family: Gilroy-Medium;
    src: url("../fonts/Gilroy-Medium.ttf");
}
@font-face {
    font-family: Gilroy-SemiBold;
    src: url("../fonts/Gilroy-SemiBold.ttf");
}

.gil-reg {
    font-family: Gilroy-Regular, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.gil-med {
    font-family: Gilroy-Medium, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* .gil-heavy {
    font-family: Gilroy-Heavy, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
} */
.gil-semi-bold {
    font-family: Gilroy-SemiBold, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    font-family: Gilroy-Regular, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Loading Animation */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader::before {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Layout */
.main-login-container {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* Left Side - Image Section */
.login-image-section {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

.background-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--radius-xl);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.8) 0%,
        rgba(79, 70, 229, 0.8) 50%,
        rgba(139, 69, 19, 0.6) 100%);
    border-radius: var(--radius-xl);
    z-index: 1;
}

.image-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 500px;
    padding: 2rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.logo-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-text {
    margin-bottom: 3rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.125rem;
    opacity: 0.9;
    line-height: 1.7;
}

.feature-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Right Side - Form Section */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
}

.form-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mobile-logo {
    display: none;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mobile-logo-img {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Alert Messages */
.alert-message {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    animation: slideIn 0.3s ease-out;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-icon {
    color: var(--error-color);
    flex-shrink: 0;
}

.alert-text {
    color: var(--error-color);
    font-size: 0.875rem;
}

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

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

.input-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    z-index: 1;
}

.form-input {
    width: 100%;
    height: 3rem;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.input-wrapper.focused .input-icon {
    color: var(--border-focus);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* Form Options */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    cursor: pointer;
}

.checkbox:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark {
    display: none;
}

.checkbox-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.forgot-password {
    font-size: 0.875rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* Login Button */
.login-button {
    width: 100%;
    height: 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.login-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-button.loading {
    color: transparent;
}

.button-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.signup-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.signup-link:hover {
    color: var(--primary-dark);
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .brand-name {
        font-size: 2rem;
    }

    .feature-highlights {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .feature-item {
        flex: 1;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .main-login-container {
        flex-direction: column;
    }

    .login-image-section {
        height: 40vh;
        min-height: 300px;
        padding: 1rem;
    }

    .image-content {
        padding: 1rem;
    }

    .brand-logo {
        margin-bottom: 1.5rem;
    }

    .brand-name {
        font-size: 1.5rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .feature-highlights {
        flex-direction: row;
        gap: 1rem;
    }

    .feature-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

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

    .login-form-section {
        padding: 1.5rem;
    }

    .form-container {
        padding: 1rem;
    }

    .mobile-logo {
        display: flex;
    }

    .login-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .login-image-section {
        height: 35vh;
        min-height: 250px;
        padding: 0.75rem;
    }

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

    .feature-item {
        padding: 0.5rem;
    }

    .form-container {
        padding: 0.5rem;
    }

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

    .form-options {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

@media (max-width: 320px) {
    .login-image-section {
        height: 30vh;
        min-height: 200px;
    }

    .brand-name {
        font-size: 1.25rem;
    }

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

    .feature-highlights {
        display: none;
    }
}
