/* =========================================================
   DGT Auth — Login / Register Dark App Experience
   Loaded only on Identity auth pages.
   ========================================================= */

.auth-logo-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-logo {
    width: min(280px, 80vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.25));
}

@media (min-width: 768px) {
    .auth-logo {
        width: 320px;
    }
}
/* ===== AUTH PAGE ===== */

.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at top, #2c1e14, #0f0f0f);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

/* ===== LOGO ===== */

.auth-logo img {
    width: 180px;
    max-width: 60%;
    margin-bottom: 20px;
}

/* ===== CARD ===== */

.auth-card {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

/* ===== TITLE ===== */

.auth-title {
    color: #ffffff;
    margin-bottom: 20px;
}

/* ===== INPUTS ===== */

.auth-card .form-control {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #fff;
    height: 48px;
}

    .auth-card .form-control::placeholder {
        color: #aaa;
    }

/* ===== BUTTON ===== */

.auth-btn {
    background: linear-gradient(135deg, #c69c6d, #8b6a3f);
    border: none;
    color: #fff;
    height: 48px;
    border-radius: 8px;
    font-weight: 600;
}

    .auth-btn:hover {
        background: linear-gradient(135deg, #d6ad7a, #9c7b4f);
    }

/* ===== LINKS ===== */

.auth-links a {
    color: #c69c6d;
    font-size: 14px;
}

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

/* ===== MOBILE TUNING ===== */

@media (max-width: 480px) {
    .auth-card {
        padding: 20px;
    }

    .auth-logo img {
        width: 140px;
    }
}

/* ===== AUTH PAGE OVERRIDE (CRITICAL FIX) ===== */

body:has(.auth-page) {
    background: #0f0f0f !important;
}

    body:has(.auth-page) main {
        padding: 0 !important;
    }

    body:has(.auth-page) .container,
    body:has(.auth-page) .container-fluid {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

.auth-page {
    min-height: calc(100vh - 70px); /* account for navbar */
    margin: 0;
}

.auth-logo img {
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.6)) drop-shadow(0 0 25px rgba(198,156,109,0.15));
}

/* ===== TRUE APP AUTH MODE ===== */

.auth-body {
    margin-bottom: 0;
    background: #0e0c0a;
    overflow-x: hidden;
}

    .auth-body main {
        padding: 0 !important;
    }

    .auth-body .container,
    .auth-body .container-fluid {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .auth-body .footer {
        display: none;
    }

.auth-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
}

    .auth-page::before {
        content: "";
        position: absolute;
        inset: -20%;
        z-index: -2;
        background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.18), transparent 26%), radial-gradient(circle at 20% 80%, rgba(198, 156, 109, 0.12), transparent 28%), linear-gradient(180deg, #22170f 0%, #0e0c0a 65%, #050403 100%);
        animation: authGlow 12s ease-in-out infinite alternate;
    }

    .auth-page::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.035) 45%, transparent 60%);
        transform: translateX(-100%);
        animation: authSweep 9s ease-in-out infinite;
    }

@keyframes authGlow {
    0% {
        transform: scale(1) translateY(0);
        opacity: 0.85;
    }

    100% {
        transform: scale(1.08) translateY(-18px);
        opacity: 1;
    }
}

@keyframes authSweep {
    0%, 35% {
        transform: translateX(-100%);
    }

    70%, 100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-page::before,
    .auth-page::after {
        animation: none;
    }
}

/* ===== AUTH TEXT FIX (READABILITY) ===== */

.auth-card {
    color: #e8e6e3;
}

/* Subtitle */
.auth-subtitle {
    color: #b8b2a8 !important;
    font-size: 0.95rem;
}

/* Labels + helper text */
.auth-card label,
.auth-card .form-check-label {
    color: #d6d1c8 !important;
}

/* Remember me */
.auth-check {
    color: #d6d1c8 !important;
}

/* Validation text */
.auth-card .text-danger {
    color: #ff8a80 !important;
}

/* Links */
.auth-links a {
    color: #d4af37 !important;
    font-weight: 500;
}

    .auth-links a:hover {
        color: #f1cc6a !important;
    }

/* Inputs (improve contrast) */
.auth-input {
    background: #2a2a2a !important;
    color: #ffffff !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
}

    /* Placeholder text */
    .auth-input::placeholder {
        color: #9a948a !important;
    }

    .auth-input:focus {
        border-color: #d4af37 !important;
        box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.2) !important;
    }

.auth-btn:active {
    transform: scale(0.98);
}

.auth-card {
    backdrop-filter: blur(10px);
}

/* ===== SCOPED FOOTER THEMES =====
   Keep normal admin screens light.
   Use dark footer only on auth and library/dark experience screens.
*/

body.auth-body .footer,
body.theme-library .footer {
    background: #0e0c0a !important;
    color: #b8b2a8 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.2) !important;
    font-size: 0.85rem;
}

    body.auth-body .footer a,
    body.theme-library .footer a {
        color: #d4af37 !important;
    }

        body.auth-body .footer a:hover,
        body.theme-library .footer a:hover {
            color: #f1cc6a !important;
        }

/* Admin/data screens keep the warm light footer */
body:not(.auth-body):not(.theme-library) .footer {
    background: #fffaf0 !important;
    color: #6b7280 !important;
    border-top: 1px solid var(--dgt-border) !important;
}
/* =========================================
   AUTH FINAL OVERRIDES (MOBILE POLISH)
   ========================================= */

/* Logo positioning + size (centered between top + form) */
.auth-logo-wrap {
    margin-bottom: 24px;
}

.auth-logo img {
    width: 90%;
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Better vertical centering */
.auth-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Form spacing */
.auth-card {
    margin-top: 0;
}

    /* Fix floating label overlap issue */
    .auth-card .form-floating {
        margin-bottom: 14px;
    }

        .auth-card .form-floating > .form-control {
            height: 48px;
            padding: 1rem 0.9rem 0.35rem;
        }

        .auth-card .form-floating > label {
            padding: 0.8rem 0.9rem;
        }

/* Button spacing */
.auth-btn {
    margin-bottom: 16px;
}

/* Login link spacing (your specific request) */
.auth-links {
    margin-top: 8px;
}
