:root {
    --page-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --border-color: #E2E8F0;
    --input-bg: #F1F5F9; /* Filled input background */
    --input-focus-border: #6366F1;
    --error: #E11D48;
    --error-bg: #FFE4E6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--page-bg);
    /* Beautiful subtle mesh gradient for the background */
    background-image:
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(168, 85, 247, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(56, 189, 248, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-container {
    display: flex;
    width: 100%;
    max-width: 1050px;
    min-height: 620px;
    background-color: var(--card-bg);
    border-radius: 1.5rem;
    overflow: hidden;
    /* Soft premium shadow */
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.15), 0 0 20px rgba(15, 23, 42, 0.05);
}

/* Left Side - Form */
.auth-form-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2.5rem;
    background-color: var(--card-bg);
}

.auth-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
}

.auth-header {
    margin-bottom: 2.25rem;
    text-align: left;
}

.auth-title {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.4rem;
    letter-spacing: -0.04em;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.alert {
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-danger {
    background-color: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(225, 29, 72, 0.2);
}

.alert-info {
    background-color: #E0F2FE;
    color: #0284C7;
    border: 1px solid rgba(2, 132, 199, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.password-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.password-header .form-label {
    margin-bottom: 0;
}

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

.forgot-password:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* FILLED INPUT STYLE WITH ICONS */
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #94A3B8;
    transition: color 0.2s ease;
}

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

.form-control {
    width: 100%;
    padding: 0.9rem 1.125rem 0.9rem 2.8rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--input-bg);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.form-control::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.form-control:hover {
    background-color: #E2E8F0;
}

.form-control:focus {
    outline: none;
    background-color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 12px rgba(0, 0, 0, 0.05);
}

.form-control.is-invalid {
    border-color: var(--error);
    background-color: #FFFFFF;
}

.error-message {
    display: block;
    font-size: 0.75rem;
    color: var(--error);
    margin-top: 0.4rem;
    font-weight: 500;
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: 1.25rem;
    margin-bottom: 2rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 1.25rem;
    width: 1.25rem;
    background-color: var(--input-bg);
    border: 1px solid #CBD5E1;
    border-radius: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 0.75rem;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary);
    background-color: #FFFFFF;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
    animation: checkAnim 0.2s forwards;
}

@keyframes checkAnim {
    0% { height: 0; width: 0; opacity: 0; }
    100% { height: 9px; width: 4px; opacity: 1; }
}

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

/* Submit Button */
.btn-primary {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, var(--primary) 0%, #8B5CF6 100%);
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Right Side - Image Background */
.auth-image-section {
    flex: 1.1;
    position: relative;
    overflow: hidden;
    background-color: #03030A;
}

.auth-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
    }

    .auth-image-section {
        display: none;
    }
}
