.auth-page [x-cloak],
[x-cloak] {
    display: none !important;
}

.auth-page-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 3vw, 3rem);
    /* background-image: url('../images/bg8.png'); */
    /* background: linear-gradient(135deg, #173B9C 0%, #2563EB 52%, #60A5FA 100%); */
background: linear-gradient(135deg, #173B9C 0%, #007cf5 60%, #3399ff 100%);    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

.auth-page-grid {
    width: 100%;
    max-width: 85rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.52);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.auth-carousel-card {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 1200 / 1250;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 0;
    border: 0;
    background: #2563eb;
    box-shadow: none;
}

.auth-form-card {
    width: 100%;
    max-width: none;
    max-height: 100%;
    overflow-y: auto;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: clamp(1.75rem, 3vw, 3rem) clamp(1.5rem, 3vw, 2.5rem);
}

.auth-page-carousel-track {
    display: flex;
    width: 100%;
    min-width: 0;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1);
    will-change: transform;
}

.auth-page-carousel-slide {
    flex: 0 0 100%;
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.auth-page-carousel-image-background {
    display: none !important;
}

.auth-page-carousel-image-foreground {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block;
}

.auth-page-carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 40, 100, 0.72) 0%, transparent 45%);
    pointer-events: none;
}

.auth-page-left {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100%;
    padding: 0 !important;
    background: #2563eb !important;
    overflow: hidden !important;
}

.auth-page-right {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.auth-page-left > .tw-pointer-events-none {
    display: none !important;
}

@media (min-width: 1024px) {
    .auth-page-grid {
        grid-template-columns: minmax(0, 48rem) minmax(22rem, 1fr);
        height: min(50rem, calc(100vh - 6rem));
        min-height: 3rem;
    }

    .auth-form-card > form {
        width: 100%;
        max-width: 30rem;
        margin-left: auto;
        margin-right: auto;
    }

    .auth-form-card > .auth-footer {
        max-width: 30rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .auth-page-shell {
        align-items: center;
    }

    .auth-page-grid {
        max-width: 40rem;
    }

    .auth-page-left {
        display: none !important;
    }

    .auth-form-card {
        max-height: none;
    }
}

@media (max-width: 767px) {
    .auth-page-shell {
        align-items: center;
        padding: 1rem;
    }

    .auth-page-left {
        display: none !important;
    }

    .auth-page-grid {
        border-radius: 1.5rem;
    }

    .auth-form-card {
        max-height: none;
        padding: 1.5rem;
    }
}

.auth-page-carousel-dot {
    height: 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    width: 6px;
    transition: background 0.3s ease, width 0.3s ease;
}

.auth-page-carousel-dot.active {
    background: #ffffff;
    width: 22px;
}

.auth-footer {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: #475569;
}

.auth-footer a {
    color: #475569 !important;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease;
}

.auth-footer a:hover,
.auth-footer a:focus {
    color: #1e293b !important;
    text-decoration: none;
}

.auth-footer-separator {
    color: #cbd5e1;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-form-input {
    display: block;
    width: 100%;
    height: 2.75rem;
    padding: 0 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #1e293b;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auth-form-input::placeholder {
    color: #94a3b8;
}

.auth-form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px #dbeafe;
}

.auth-form-input:disabled,
.auth-form-input:read-only {
    color: #64748b;
    background: #f1f5f9;
}

.auth-form-input.is-invalid {
    border-color: #ef4444;
}

.auth-password-field {
    position: relative;
}

.auth-password-input {
    padding-right: 2.75rem;
}

.auth-password-toggle {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.15s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus,
.auth-password-toggle.is-visible {
    color: #2563eb;
}

.auth-password-toggle:focus {
    outline: none;
}

.auth-password-toggle:focus-visible {
    border-radius: 9999px;
    box-shadow: 0 0 0 2px #dbeafe;
}

.auth-password-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.auth-invalid-feedback {
    margin-top: 0.375rem;
    color: #dc2626;
    font-size: 0.75rem;
}

.auth-primary-btn,
.auth-secondary-btn,
.auth-success-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 2.75rem;
    border: 0;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.auth-primary-btn:active,
.auth-secondary-btn:active,
.auth-success-btn:active {
    transform: scale(0.98);
}

.auth-primary-btn {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.auth-primary-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
}

.auth-secondary-btn {
    background: #f1f5f9;
    color: #475569;
}

.auth-secondary-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.auth-success-btn {
    background: #16a34a;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(22, 163, 74, 0.18);
}

.auth-success-btn:hover {
    background: #15803d;
    color: #ffffff;
}

.auth-inline-btn {
    border: 0;
    background: transparent;
    color: #2563eb;
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.auth-inline-btn:hover {
    color: #1d4ed8;
}

.auth-notice {
    border: 1px solid;
    border-radius: 0.75rem;
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
}

.auth-notice-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8;
}

.auth-notice-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.auth-notice-danger {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.auth-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
}

.auth-step-dot.active,
.auth-step-dot.done {
    background: #2563eb;
    color: #ffffff;
}

.auth-step-line {
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-step-line.done {
    background: #93c5fd;
}

.reg-method-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    width: 100%;
    height: 2.75rem;
    border-radius: 0.75rem;
    border: 1.5px solid;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s;
    background: transparent;
    text-decoration: none;
}

.reg-method-btn:active {
    transform: scale(0.98);
}

.reg-btn-email {
    border-color: #16a34a;
    color: #16a34a;
}

.reg-btn-email:hover {
    background: #16a34a;
    color: #fff;
}

.reg-btn-google {
    border-color: #4285F4;
    color: #4285F4;
}

.reg-btn-google:hover {
    background: #4285F4;
    color: #fff;
}

.reg-btn-facebook {
    border-color: #1877F2;
    color: #1877F2;
}

.reg-btn-facebook:hover {
    background: #1877F2;
    color: #fff;
}

.reg-spinner {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: reg-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes reg-spin {
    to {
        transform: rotate(360deg);
    }
}
