/* Auth redesign — centered card over dark gradient background.
   Uses Dashcore CSS variables where possible, but auth pages stay dark by default. */
.form-floating > label {
    background: transparent !important;
}
span.text-up,
a.text-up {
    display: inline-block;
}

.text-up::first-letter {
    text-transform: uppercase;
}

[data-bs-theme="dark"] .form-control:focus {
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.08);
}
[data-bs-theme="light"]
.dropdown-item.active, .dropdown-item:active {
    background-color: #dddddd !important;
}

[data-bs-theme="dark"]
.form-floating > label {
    background: transparent !important;
    color: #bfbfbf !important;
}

.form-floating > label::after {
    background: transparent !important;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    background: #0b0c10;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(85, 51, 255, 0.25), transparent 60%);
    animation: auth-glow 12s ease-in-out infinite alternate;
}

@keyframes auth-glow {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.auth-aurora {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.auth-aurora .aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    will-change: transform;
    animation: aurora-float 20s ease-in-out infinite alternate;
}

.auth-aurora .aurora-blob:nth-child(1) {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(85, 51, 255, 0.95), transparent 70%);
    top: -160px;
    right: -120px;
    animation-duration: 22s;
}

.auth-aurora .aurora-blob:nth-child(2) {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.85), transparent 70%);
    bottom: -100px;
    left: -120px;
    animation-duration: 26s;
    animation-delay: -5s;
}

.auth-aurora .aurora-blob:nth-child(3) {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(0, 178, 134, 0.5), transparent 70%);
    top: 40%;
    left: 35%;
    animation-duration: 18s;
    animation-delay: -10s;
}

@media (max-width: 767.98px) {
    .auth-aurora .aurora-blob {
        filter: blur(45px);
        opacity: 0.35;
    }
    .auth-aurora .aurora-blob:nth-child(1) { width: 350px; height: 350px; }
    .auth-aurora .aurora-blob:nth-child(2) { width: 300px; height: 300px; }
    .auth-aurora .aurora-blob:nth-child(3) { width: 250px; height: 250px; }
}

.auth-bg-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.16;
    background-image: radial-gradient(rgba(165, 180, 252, 0.35) 1px, transparent 1px);
    background-size: 30px 30px;
}

.auth-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
}

.auth-container-wide {
    max-width: 90%;
}

.auth-card {
    background: var(--dc-card-bg, #151621);
    border: 1px solid var(--dc-border-color, rgba(255, 255, 255, 0.08));
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    color: var(--dc-card-color, #fff);
    width: 100%;
}

.auth-card-wide {
    max-width: 100%;
}

.auth-terms-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--dc-body-color, #fff);
}

.auth-terms-content h5,
.auth-terms-content h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.auth-terms-content ul {
    padding-left: 1.25rem;
    margin-bottom: 1rem;
}

.auth-terms-content li {
    margin-bottom: 0.35rem;
}

[data-bs-theme="light"] .auth-terms-content {
    color: #1f2937;
}

.auth-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.auth-card-header .auth-back {
    position: static;
    color: var(--dc-secondary, #869ab8);
    font-size: 0.9rem;
}

.auth-card-header .auth-back:hover {
    color: var(--dc-primary, #6366f1);
}

.auth-card-header .auth-toolbar {
    position: static;
}

.auth-back {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.15s ease;
}

.auth-back:hover {
    color: #fff;
}

.auth-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-toolbar .dropdown-toggle {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.65rem;
    padding: 0.4rem 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.auth-toolbar .dropdown-toggle:hover,
.auth-toolbar .dropdown-toggle:focus,
.auth-toolbar .dropdown-toggle.show {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.auth-toolbar .dropdown-menu {
    background: var(--dc-card-bg, #151621);
    border-color: var(--dc-border-color, rgba(255, 255, 255, 0.1));
    border-radius: 0.75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
    padding: 0.35rem;
    min-width: 8rem;
}

.auth-toolbar .dropdown-item {
    color: var(--dc-body-color, #fff);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-toolbar .dropdown-item:hover,
.auth-toolbar .dropdown-item:focus {
    background: var(--dc-tertiary-bg, rgba(255, 255, 255, 0.06));
    color: var(--dc-primary, #6366f1);
}

[data-bs-theme="light"] .auth-toolbar .dropdown-toggle {
    color: #1f2937;
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .auth-toolbar .dropdown-toggle:hover,
[data-bs-theme="light"] .auth-toolbar .dropdown-toggle:focus,
[data-bs-theme="light"] .auth-toolbar .dropdown-toggle.show {
    color: #5533ff;
    border-color: rgba(85, 51, 255, 0.25);
}

[data-bs-theme="light"] .auth-toolbar .dropdown-menu {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

[data-bs-theme="light"] .auth-toolbar .dropdown-item {
    color: #1f2937;
}

[data-bs-theme="light"] .auth-card-header .auth-back {
    color: #6c757d;
}

[data-bs-theme="light"] .auth-card-header .auth-back:hover {
    color: #5533ff;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 0;
        align-items: stretch;
        overflow: visible;
    }
    .auth-container,
    .auth-container-wide {
        max-width: none;
    }
    .auth-card {
        min-height: 100vh;
        border-radius: 0;
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .auth-card-header {
        margin-bottom: 1rem;
    }
    .auth-toolbar {
        gap: 0.25rem;
    }
    .auth-toolbar .dropdown-toggle {
        padding: 0.35rem;
        border-radius: 0.5rem;
    }
    .auth-back span {
        display: none;
    }
    .auth-title {
        font-size: 1.4rem;
    }
    .auth-logo img {
        height: 34px;
    }
    .auth-logo-text {
        font-size: 1.35rem;
    }
    .auth-terms-content {
        max-height: none;
    }
}

@media (max-width: 767.98px) {
    .auth-aurora,
    .auth-particles {
        display: none;
    }
    .auth-bg-grid {
        opacity: 0.08;
    }
}

[data-bs-theme="light"] .auth-card {
    background: #fff;
    color: #1f2937;
    border-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .auth-logo-text,
[data-bs-theme="light"] .auth-title {
    color: #1f2937;
}

[data-bs-theme="light"] .auth-form .form-floating > .form-control {
    background: #f8f9fa;
    border-color: rgba(0, 0, 0, 0.1);
    color: #1f2937;
}

[data-bs-theme="light"] .auth-form .form-floating > .form-control:focus {
    background: #fff;
    border-color: var(--dc-primary, #6366f1);
}

[data-bs-theme="light"] .auth-form .form-floating > label {
    color: #6c757d;
}

[data-bs-theme="light"] .auth-subtitle,
[data-bs-theme="light"] .auth-terms,
[data-bs-theme="light"] .auth-footer {
    color: #6c757d;
}

@media (max-width: 480px) {
    .auth-page {
        padding: 1rem;
    }
    .auth-card {
        padding: 1.75rem;
        border-radius: 1.25rem;
    }
    .auth-back {
        top: 0.75rem;
        left: 0.75rem;
    }
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.auth-logo img {
    height: 40px;
    width: auto;
}

.auth-logo-text {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
}

.auth-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #fff;
}

.auth-subtitle {
    text-align: center;
    color: var(--dc-secondary, #869ab8);
    margin-bottom: 1.75rem;
    font-size: 0.95rem;
}

.auth-subtitle a {
    color: var(--dc-primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.auth-subtitle a:hover {
    text-decoration: underline;
}

.auth-form .form-floating > .form-control {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 0.85rem;
    min-height: 3.5rem;
    padding-top: 1.25rem;
    padding-bottom: 0.75rem;
}

    .auth-form .form-floating > .form-control:focus {
        border-color: #bfbfbf;
        box-shadow: 0 0 0 0.2rem rgba(85, 51, 255, 0.15);
        background: rgba(255, 255, 255, 0.06);
    }

.auth-form .form-floating > label {
    color: var(--dc-secondary, #869ab8);
    padding: 1rem 0.85rem;
}

.auth-form .form-floating > .form-control:focus ~ label,
.auth-form .form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--dc-primary, #6366f1);
    transform: scale(0.85) translateY(-0.55rem) translateX(0.15rem);
}

.auth-btn {
    width: 100%;
    padding: 0.9rem;
    border-radius: 0.85rem;
    font-weight: 700;
    font-size: 1rem;
    margin-top: 1rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--dc-secondary, #869ab8);
    font-size: 0.8rem;
    margin: 1.25rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--dc-border-color, rgba(255, 255, 255, 0.12));
}

.auth-social .external-auth-container {
    width: 100%;
}

.auth-social .external-auth-container > div {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-social .btn-social {
    width: 100%;
    justify-content: center;
    border-radius: 0.85rem;
    padding: 0.85rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-social .btn-social:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--dc-secondary, #869ab8);
}

.auth-footer a {
    color: var(--dc-primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-terms {
    font-size: 0.8rem;
    color: var(--dc-secondary, #869ab8);
    text-align: center;
    margin-top: 1.5rem;
    line-height: 1.5;
}

.auth-terms a {
    color: var(--dc-primary, #6366f1);
    font-weight: 600;
    text-decoration: none;
}

.auth-terms a:hover {
    text-decoration: underline;
}

.auth-error {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}
