/**
 * Authentication / Access Page Styles
 *
 * Shared styles for client sign-in/sign-up, forgot-password, and admin login.
 * These pages have a branded dark-gradient aesthetic that stays consistent
 * regardless of the selected theme.
 */

/* Theme-aware icon toggles */
.dark-hidden,
.light-hidden {
    display: inline-block;
}
html[data-theme="dark"] .dark-hidden,
html[data-theme="light"] .light-hidden {
    display: none;
}
@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .dark-hidden { display: none; }
    html[data-theme="system"] .light-hidden { display: inline-block; }
}
@media (prefers-color-scheme: light) {
    html[data-theme="system"] .dark-hidden { display: inline-block; }
    html[data-theme="system"] .light-hidden { display: none; }
}

/* Base typography reset for auth pages */
.auth-page,
.auth-page * {
    font-family: var(--font-sans);
}

/* Fade-in entrance */
.anim-fade-in {
    animation: fadeIn 0.35s ease-out;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Slide-up entrance */
.anim-slide-up {
    animation: slideUp 0.4s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Client auth: brand gradient background */
.brand-bg {
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 40%, #0f172a 100%);
    position: relative;
}
.brand-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(99, 102, 241, 0.06) 0%, transparent 50%);
}

/* Decorative blurred orb */
.glass-dot {
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.15);
    filter: blur(40px);
}

/* Frosted trust badge */
.trust-badge {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Admin login: darker, more saturated gradient background */
.admin-bg {
    background: linear-gradient(160deg, #0a0f1a 0%, #0f172a 35%, #1a1f3a 70%, #0f172a 100%);
    position: relative;
}
.admin-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.8) 0%, transparent 70%);
}
.admin-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

/* Admin login card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.glow-ring {
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.08), 0 0 120px rgba(59, 130, 246, 0.04);
}

/* Dark input fields used on admin login */
.input-dark {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}
.input-dark:focus {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 0.8);
}

/* Mobile auth layout helpers */
@media (max-width: 1023px) {
    .mobile-scroll {
        min-height: 100dvh;
        height: auto;
        overflow-y: auto;
    }
}

@media (max-width: 640px) {
    .admin-bg {
        min-height: 100dvh;
        height: auto;
    }
}
