/* Modern Authentication Pages */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: rgb(207, 0, 0);
    --primary-blue: #2e348e;
    --dark-bg: #1a1a1a;
    --light-gray: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    position: relative;
    overflow: hidden;
}

/* Animated Background Pattern */
.auth-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 2px, transparent 2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: moveGrid 20s linear infinite;
    z-index: 0;
}

@keyframes moveGrid {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

.auth-wrapper {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1100px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

/* Left Side - Branding */
.auth-branding {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-red));
    padding: 60px 50px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.auth-branding::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    bottom: -50px;
    left: -50px;
}

.brand-logo-auth {
    margin-bottom: 30px;
    z-index: 1;
}

.brand-logo-auth img {
    height: 80px;
    /* filter: brightness(0) invert(1); */
}

.brand-content {
    z-index: 1;
}

.brand-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-description {
    font-size: 16px;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 350px;
}

.brand-features {
    margin-top: 40px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.feature-icon i {
    font-size: 20px;
}

.feature-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 3px;
}

.feature-text p {
    font-size: 13px;
    opacity: 0.9;
}

/* Right Side - Form */
.auth-form-container {
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.form-header h2 {
    font-size: 32px;
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-weight: 700;
}

.form-header p {
    color: var(--text-light);
    font-size: 15px;
}

/* Messages */
.message-box {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

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

.message-box.error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.message-box.success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

/* Form Controls */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.form-group input {
    width: 100%;
    padding: 14px 20px;
    padding-left: 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(46, 52, 142, 0.1);
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 18px;
    pointer-events: none;
}

.toggle-password {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.3s;
}

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

.toggle-password img {
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.toggle-password:hover img {
    opacity: 1;
}

.form-group.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

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

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

.remember-me label {
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

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

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

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-red), #ff4444);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(207, 0, 0, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(207, 0, 0, 0.4);
}

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

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 30px 0;
    color: var(--text-light);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e0e0e0;
}

.divider span {
    padding: 0 15px;
}

.alt-action {
    text-align: center;
    color: var(--text-light);
    font-size: 15px;
}

.alt-action a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 700;
    margin-left: 5px;
    transition: color 0.3s;
}

.alt-action a:hover {
    color: var(--primary-red);
}

.copyright {
    text-align: center;
    margin-top: 40px;
    color: var(--text-light);
    font-size: 13px;
}

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

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 500px;
    }

    .auth-branding {
        display: none;
    }

    .auth-form-container {
        padding: 40px 30px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 20px 15px;
    }

    .auth-form-container {
        padding: 30px 25px;
    }

    .form-header h2 {
        font-size: 26px;
    }

    .form-group.grid-2 {
        grid-template-columns: 1fr;
    }
}