:root {
    --primary: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f9fafb;
    --gray: #6b7280;
    --white: #ffffff;
    --shadow-1: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-2: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.auth-page {
    background: var(--light);
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    height: 100vh;
}

.auth-form-section {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--white);
    overflow-y: auto;
}

.auth-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.auth-header {
    margin-bottom: 2rem;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    font-size: 0.9375rem;
    color: var(--gray);
}

.alert-container {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    animation: slideDown 0.3s ease;
}

.alert-error {
    background: #fee;
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: #efe;
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-warning {
    background: #ffeaa7;
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert i {
    font-size: 1.25rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group label i {
    font-size: 1rem;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    transition: all 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control:invalid {
    border-color: var(--danger);
}

.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    width: 100%;
    padding-right: 2.5rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray);
    font-size: 1.25rem;
    padding: 0.5rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    color: var(--primary);
}

.form-options {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--gray);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-block {
    width: 100%;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray);
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d1d5db;
}

.divider span {
    padding: 0 0.75rem;
    font-size: 0.875rem;
}

.auth-brand-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 420px;
}

.brand-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="dots" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="2" fill="white" opacity="0.05"/></pattern></defs><rect width="1200" height="600" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

.brand-text {
    position: relative;
    z-index: 3;
}

.brand-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.brand-text p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

.brand-feature i {
    font-size: 1.25rem;
    color: var(--success);
}

/* Responsive */
@media (max-width: 1024px) {
    .auth-brand-section {
        display: none;
    }

    .auth-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .auth-form-section {
        padding: 1.5rem 1rem;
    }

    .auth-form-wrapper {
        max-width: 100%;
    }

    .auth-logo h1 {
        font-size: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.25rem;
    }

    .auth-header p {
        font-size: 0.9375rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .password-input input {
        padding-right: 2.5rem;
    }

    .toggle-password {
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-page {
        background: var(--white);
    }

    .auth-form-section {
        padding: 1rem;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-logo h1 {
        font-size: 1.25rem;
    }

    .auth-header h2 {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
    }

    .auth-header p {
        font-size: 0.8125rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }

    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 1rem;
    }

    .password-input input {
        padding-right: 2.75rem;
    }

    .toggle-password {
        right: 0.5rem;
        font-size: 1.125rem;
    }

    .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .checkbox-label {
        font-size: 0.875rem;
    }

    .alert {
        padding: 0.875rem;
        font-size: 0.875rem;
    }

    .alert i {
        font-size: 1.125rem;
    }
}
