/* Loncin Auth — Login & Register */
.auth-page {
    min-height: calc(100vh - 120px);
    background: var(--brand-bg, #f4f6f8);
    padding: 40px 0 64px;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1040px;
    margin: 0 auto;
    min-height: 620px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Register — balanced width on laptop */
.auth-page-register .container {
    max-width: 1040px;
}

.auth-shell-register {
    max-width: 1040px;
    grid-template-columns: 320px 1fr;
    min-height: auto;
}

.auth-shell-register .auth-brand {
    padding: 36px 32px;
}

.auth-shell-register .auth-form-panel {
    padding: 36px 40px;
}

.auth-register-form .auth-row,
.auth-register-form .auth-checkbox,
.auth-register-form .auth-dealer-section,
.auth-register-form .auth-alert,
.auth-register-form .auth-submit,
.auth-register-form .auth-links {
    width: 100%;
}

.auth-register-form .auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 18px;
}

.auth-dealer-section .auth-row {
    margin-bottom: 18px;
}

.auth-field-full {
    width: 100%;
}

.auth-brand {
    background:
        radial-gradient(ellipse 80% 60% at 100% 0%, rgba(234, 28, 38, 0.22) 0%, transparent 55%),
        linear-gradient(160deg, #111111 0%, #1a1a1a 55%, #2d0508 100%);
    color: #fff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.35;
    pointer-events: none;
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-logo img {
    max-width: 180px;
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-brand h2 {
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 1.2;
    margin: 0 0 14px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

.auth-brand h2 strong {
    font-weight: 700;
    color: #fff;
}

.auth-brand > p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 15px;
    line-height: 1.65;
    margin: 0;
    max-width: 320px;
}

.auth-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

.auth-features i {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(234, 28, 38, 0.15);
    border: 1px solid rgba(234, 28, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ea1c26;
    font-size: 12px;
    flex-shrink: 0;
}

.auth-form-panel {
    background: #fff;
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.auth-form-panel.register-panel {
    justify-content: flex-start;
    max-height: none;
}

.auth-form-header {
    margin-bottom: 32px;
}

.auth-form-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 0 0 8px;
    color: #111;
}

.auth-form-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.auth-form-panel form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.auth-form-panel.register-panel form {
    gap: 0;
}

.auth-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
    align-items: start;
}

.auth-row .auth-field {
    margin-bottom: 0;
}

.auth-field label {
    display: block;
    order: 1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #334155;
    margin: 0 0 8px;
    line-height: 1.3;
}

.auth-field label span {
    color: #ea1c26;
}

.auth-field input,
.auth-form-panel input[type="text"],
.auth-form-panel input[type="email"],
.auth-form-panel input[type="password"],
.auth-form-panel input[type="url"],
.auth-form-panel input[type="tel"],
.auth-form-panel input[type="number"],
.auth-form-panel .form-control {
    order: 2;
    display: block;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px;
    padding: 0 16px !important;
    margin: 0 !important;
    border: 1px solid #eeeeee !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    line-height: 48px !important;
    background: #f8fafc !important;
    color: #111 !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-field input:focus,
.auth-form-panel .form-control:focus {
    border-color: #ea1c26 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(234, 28, 38, 0.1) !important;
}

.auth-field-error {
    order: 3;
    min-height: 18px;
    color: #dc2626;
    font-size: 12px;
    margin: 6px 0 0;
    font-weight: 500;
    line-height: 1.4;
}

.auth-field-error:empty {
    min-height: 0;
    margin: 0;
}

.auth-submit {
    width: 100%;
    padding: 15px 24px;
    background: #ea1c26;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 8px;
    box-shadow: 0 8px 28px rgba(234, 28, 38, 0.35);
    transition: background 0.2s, transform 0.2s, opacity 0.2s;
}

.auth-submit:hover {
    background: #c91820;
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: #ea1c26;
}

.auth-links .auth-switch {
    font-size: 14px;
    color: #64748b;
}

.auth-links .auth-switch a {
    color: #ea1c26;
    font-weight: 700;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    margin: 8px 0 20px;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ea1c26;
    cursor: pointer;
    margin: 0;
}

.auth-checkbox label {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0;
}

.auth-dealer-section {
    margin-top: 0;
    margin-bottom: 18px;
    padding: 24px;
    background: #fafbfc;
    border: 1px dashed #eeeeee;
    border-radius: 16px;
}

.auth-dealer-section .auth-field:last-child {
    margin-bottom: 0;
}

.auth-dealer-section h3 {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #111;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-dealer-section h3::before {
    content: '';
    width: 20px;
    height: 2px;
    background: #ea1c26;
}

.auth-alert {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 20px;
    background: #fef2f2;
    color: #b91c1c;
    border-left: 3px solid #ea1c26;
}

/* Verification state */
.auth-verify {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    padding: 56px 40px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid #eeeeee;
}

.auth-verify-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(234, 28, 38, 0.08);
    border: 1px solid rgba(234, 28, 38, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.auth-verify-icon i {
    font-size: 1.75rem;
    color: #ea1c26;
}

.auth-verify h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #111;
}

.auth-verify p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 8px;
}

.auth-verify .auth-email {
    color: #ea1c26;
    font-weight: 600;
}

@media (max-width: 900px) {
    .auth-shell,
    .auth-shell-register {
        grid-template-columns: 1fr;
        max-width: 520px;
        min-height: 0;
    }

    .auth-page-register .container {
        max-width: 100%;
    }

    .auth-brand {
        padding: 36px 28px;
        gap: 28px;
    }

    .auth-features {
        display: none;
    }

    .auth-form-panel {
        padding: 36px 28px;
    }

    .auth-row,
    .auth-register-form .auth-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 24px 0 40px;
    }

    .auth-brand,
    .auth-form-panel {
        padding: 24px 16px;
    }

    .auth-verify {
        padding: 28px 18px;
    }
}
