/* --- Shared Layout Styles (Login, Register, Password Reset) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
    /* Ensures both panels stretch to equal height */
    font-family: var(--font-family-base);
}

/* Left Panel */
.login-panel {
    width: 40%;
    padding: var(--space-9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--color-white);
    flex-shrink: 0;
    /* Prevents the left panel from shrinking */
}


.login-content {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    /* Centers the form column within the panel on wide screens, instead of
       hugging the left padding and leaving a lopsided gap on the right. */
}

.branding {
    margin-bottom: var(--space-7);
    /* Slightly reduced for register due to more fields */
    text-align: center;
}

.brand-logo-img {
    max-width: 340px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Disabled state for the login/register button */
.btn-login:disabled {
    background-color: var(--color-neutral-400) !important;
    color: var(--color-neutral-600) !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-5);
    color: var(--color-black);
}

.login-form {
    margin-top: var(--space-5);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-neutral-600);
    font-size: var(--font-size-base);
}

.password-label-wrapper {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: var(--space-2);
}

.forgot-password-link {
    color: var(--color-blue-500);
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
}

.forgot-password-link:hover {
    text-decoration: underline;
}

.form-input {
    width: 100%;
    padding: var(--space-3) 0;
    border: none;
    border-bottom: var(--border-width) solid var(--color-neutral-300);
    border-radius: 0;
    font-size: var(--font-size-md);
    background-color: transparent;
    transition: border-color var(--transition-base);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--color-primary);
    box-shadow: none;
}

.form-input::placeholder {
    color: var(--color-neutral-600);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: var(--space-3);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    color: var(--color-neutral-500);
    transition: color var(--transition-base);
}

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

.toggle-password:focus-visible {
    box-shadow: var(--shadow-focus);
}

.btn-login {
    width: 100%;
    padding: var(--space-4);
    background-color: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: background-color var(--transition-base);
    margin-top: var(--space-3);
}

.btn-login:hover:not(:disabled) {
    background-color: var(--color-blue-500);
}

.btn-login:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.register-link {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--color-neutral-200);
    text-align: center;
    color: var(--color-neutral-500);
}

.register-btn {
    color: var(--color-blue-500);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    margin-left: var(--space-1);
}

.register-btn:hover {
    text-decoration: underline;
}

.image-panel {
    width: 60%;
    overflow: hidden;
    position: relative;
}

.office-image {
    width: 100%;
    height: 100%;
    /* Changed from 100vh to 100% */
    min-height: 100vh;
    /* Ensures it's at least viewport height */
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 968px) {
    .image-panel {
        display: none;
    }

    .login-panel {
        width: 100%;
        padding: var(--space-8) var(--space-6);
    }
}

/* Terms and Conditions Checkbox */
.form-check {
    margin-top: var(--space-5);
    margin-bottom: var(--space-5);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.form-check-input:focus-visible {
    outline: none;
    box-shadow: var(--shadow-focus);
}

.form-check-label {
    color: var(--color-neutral-600);
    font-size: var(--font-size-base);
    cursor: pointer;
    line-height: 1.4;
}

.form-check-label .privacy-text + .privacy-text {
    margin-top: var(--space-3);
}

.form-check-label a {
    color: var(--color-blue-500);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Password requirements checklist, live-updated as the user types */
.password-requirements {
    list-style: none;
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
}

.password-requirements li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: 2px;
    color: var(--color-neutral-500);
}

.password-requirements li::before {
    content: "\2013";
    position: absolute;
    left: 0;
}

.password-requirements li.met {
    color: var(--color-success);
}

.password-requirements li.met::before {
    content: "\2713";
}

/* Confirm-password mismatch message, shown/hidden via JS */
.field-error {
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-danger);
}
