/* assets/css/auth.css - Authentication Styles (User & Admin Portals) */

:root {
    --bg-base: #080a12;
    --card-bg: rgba(15, 20, 32, 0.85);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(99, 102, 241, 0.4);
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #8b5cf6;
    --danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 50% 0%, rgba(99, 102, 241, 0.22) 0px, transparent 65%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.14) 0px, transparent 55%),
        radial-gradient(at 0% 100%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 42px 42px, 42px 42px;
    background-position: center top, right bottom, left bottom, 0 0, 0 0;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    width: 100%;
}

/* Ambient Floating Glow Elements */
.auth-bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.65;
    animation: orbFloat 14s ease-in-out infinite alternate;
}

.orb-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 70%);
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.22), transparent 70%);
    bottom: -100px;
    right: 15%;
    animation-delay: -7s;
}

@keyframes orbFloat {
    0% { transform: translate(-50%, 0) scale(1); }
    100% { transform: translate(-45%, 35px) scale(1.08); }
}

.auth-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2.5rem 2.25rem;
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    box-shadow: 
        0 30px 80px -20px rgba(0, 0, 0, 0.85),
        0 0 50px rgba(99, 102, 241, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #ec4899);
}

.brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.brand-logo-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
}

.brand-logo-wrapper::before {
    content: '';
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.6), transparent 70%);
    filter: blur(14px);
    z-index: 0;
}

.brand-logo-img {
    position: relative;
    z-index: 1;
    width: 78px;
    height: 78px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-logo-img:hover {
    transform: scale(1.06) rotate(2deg);
}

.brand-icon {
    position: relative;
    z-index: 1;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.brand-icon.admin-icon {
    border-radius: 18px;
    background: linear-gradient(135deg, #ef4444, #8b5cf6);
    font-size: 1.8rem;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.4);
}

.brand-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.brand-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.22rem 0.7rem;
    border-radius: 30px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.auth-title {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    margin-top: 0.15rem;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 340px;
    margin: 0 auto;
}

/* Auth Perks Trust Row */
.auth-perks-row {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    flex-wrap: wrap;
}

.auth-perk-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.25rem 0.55rem;
    border-radius: 8px;
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 600;
}

.perk-icon {
    font-size: 0.8rem;
}

/* Welcome Gift Banner */
.welcome-gift-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.06));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 0.6rem 0.95rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #fde68a;
    line-height: 1.4;
}

.welcome-gift-banner strong {
    color: #fbbf24;
    font-weight: 800;
}

.gift-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.admin-badge {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Turnstile Box Modern */
.turnstile-wrapper {
    margin: 1.15rem 0 0.85rem 0;
}

.turnstile-box {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0.25rem 0;
    min-height: 65px;
}

.turnstile-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.45rem;
    letter-spacing: 0.02em;
}

.status-banner,
.alert-banner {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: left;
}

.status-banner {
    display: none;
}

.banner-err,
.alert-banner {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-ok {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.btn-google {
    width: 100%;
    background: #ffffff;
    color: #0f172a;
    border: none;
    padding: 0.95rem 1.25rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-google:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

.btn-google:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(1);
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 0.45rem;
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.85rem 1rem;
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
}

.btn-toggle-pwd:hover {
    color: #ffffff;
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    padding: 0.95rem 1.25rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
    margin-top: 0.75rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(99, 102, 241, 0.45);
}

.default-box {
    margin-top: 1.5rem;
    background: rgba(99, 102, 241, 0.07);
    border: 1px dashed rgba(99, 102, 241, 0.35);
    border-radius: 14px;
    padding: 0.9rem 1.1rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    text-align: left;
}

.default-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.default-box-title {
    font-weight: 800;
    color: #818cf8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-quick-fill {
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    color: #c7d2fe;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-quick-fill:hover {
    background: var(--primary);
    color: #ffffff;
}

.default-box code {
    background: rgba(0, 0, 0, 0.35);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: #fbcfe8;
    font-family: monospace;
    font-size: 0.82rem;
}

.security-badge {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-footer-links {
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-wrap: nowrap;
}

.auth-footer-dot {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
}

.auth-terms-note {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.65);
    margin-top: 0.85rem;
    line-height: 1.45;
    text-align: center;
}

.btn-google.ready {
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.45), 0 4px 18px rgba(0, 0, 0, 0.35);
    animation: readyPulse 2.5s infinite;
}

@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.35), 0 4px 18px rgba(0, 0, 0, 0.35);
    }
    50% {
        box-shadow: 0 0 32px rgba(99, 102, 241, 0.65), 0 6px 24px rgba(0, 0, 0, 0.45);
    }
}

.security-info {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #10b981;
    font-weight: 600;
}

.shield-icon {
    color: #10b981;
    font-size: 0.9rem;
}

.admin-link,
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-link:hover,
.back-link:hover {
    color: #ffffff;
}

.back-link-wrapper {
    margin-top: 1.5rem;
    text-align: center;
}

/* ==========================================================================
   MOBILE RESPONSIVE SYSTEM FOR AUTH & LOGIN PORTAL
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 1.25rem 0.75rem;
    }

    .auth-wrapper {
        max-width: 100%;
    }

    .auth-card {
        padding: 1.85rem 1.25rem;
        border-radius: 20px;
    }

    .brand-header {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .brand-logo-img, .brand-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
        border-radius: 14px;
    }

    .auth-title {
        font-size: 1.45rem;
    }

    .auth-subtitle {
        font-size: 0.8rem;
    }

    .auth-perks-row {
        gap: 0.35rem;
    }

    .auth-perk-item {
        font-size: 0.68rem;
        padding: 0.2rem 0.45rem;
    }

    .welcome-gift-banner {
        font-size: 0.76rem;
        padding: 0.55rem 0.75rem;
    }

    .turnstile-box {
        padding: 0.5rem 0.25rem;
        transform: scale(0.95);
        transform-origin: center;
    }

    .btn-google {
        padding: 0.88rem 1rem;
        font-size: 0.92rem;
        border-radius: 12px;
        gap: 0.65rem;
    }

    .auth-footer-links {
        margin-top: 1.35rem;
        padding-top: 1rem;
        font-size: 0.75rem;
        justify-content: center;
        gap: 1rem;
    }
}

/* Floating Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(640px, 92vw);
    background: rgba(15, 23, 42, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0.95rem 1.25rem;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.18);
    z-index: 9999;
    animation: slideUpCookie 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpCookie {
    from {
        transform: translate(-50%, 30px);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.15rem;
}

.cookie-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.cookie-text {
    font-size: 0.82rem;
    color: #cbd5e1;
    line-height: 1.45;
    text-align: left;
    flex-grow: 1;
}

.cookie-actions {
    flex-shrink: 0;
}

.btn-allow-cookies {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #ffffff;
    border: none;
    padding: 0.58rem 1.2rem;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-allow-cookies:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.55);
    filter: brightness(1.08);
}

.btn-allow-cookies:active {
    transform: translateY(0);
}

@media (max-width: 580px) {
    .cookie-banner {
        bottom: 1rem;
        padding: 0.85rem 1rem;
        width: 94vw;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
    }

    .cookie-icon {
        display: none;
    }

    .cookie-text {
        text-align: center;
        font-size: 0.78rem;
    }

    .btn-allow-cookies {
        width: 100%;
        padding: 0.65rem 1rem;
    }
}

