/* ============================================================
   GLASSMORPHISM CSS - Auth System v1.0
   Glass effects, blur cards, glow animations
   ============================================================ */

/* ─── Public Page Background ─────────────────────────────────────────────────── */
.auth-bg {
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animated radial gradient orbs */
.auth-bg::before {
    content: '';
    position: fixed;
    top: -20%;
    left: -10%;
    width: 70%;
    height: 70%;
    background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.25) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.auth-bg::after {
    content: '';
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(0, 153, 255, 0.15) 0%, transparent 70%);
    animation: float 10s ease-in-out infinite reverse;
    pointer-events: none;
}

/* Particle dots in background */
.bg-particles {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.bg-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 153, 255, 0.15);
    animation: float var(--duration, 8s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

/* ─── Glass Card ─────────────────────────────────────────────────────────────── */
.glass-card {
    background: rgba(15, 0, 0, 0.65);
    border: 1px solid rgba(0, 153, 255, 0.18);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 153, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 50%,
        rgba(0, 153, 255, 0.02) 100%
    );
    pointer-events: none;
}

.glass-card:hover {
    border-color: rgba(0, 153, 255, 0.3);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 153, 255, 0.1),
        0 0 60px rgba(0, 153, 255, 0.08);
}

/* ─── Auth Container ─────────────────────────────────────────────────────────── */
.auth-container {
    width: 100%;
    max-width: 480px;
    padding: var(--space-lg);
    position: relative;
    z-index: 1;
}

.auth-card {
    padding: var(--space-3xl) var(--space-2xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.auth-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-xl);
    background: var(--gradient-primary);
    box-shadow: var(--shadow-red-lg);
    margin-bottom: var(--space-md);
    animation: glow 3s ease-in-out infinite;
}

.auth-logo-icon i { font-size: 2rem; color: #fff; }

.auth-logo h1 {
    font-size: var(--text-2xl);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.auth-logo p { font-size: var(--text-sm); color: var(--text-muted); margin: 0; }

/* ─── Auth Tabs ──────────────────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: var(--space-2xl);
    border: 1px solid rgba(0, 153, 255, 0.1);
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    background: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    text-align: center;
}

.auth-tab.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-red);
}

/* ─── Auth Forms ─────────────────────────────────────────────────────────────── */
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeIn 0.3s ease; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 153, 255, 0.15);
}

.auth-footer-links {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

/* ─── Password Strength ──────────────────────────────────────────────────────── */
.password-strength {
    margin-top: var(--space-sm);
}

.strength-bar {
    height: 4px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}

.strength-fill.weak   { background: var(--error);   width: 20%; }
.strength-fill.fair   { background: var(--warning);  width: 50%; }
.strength-fill.good   { background: #22c55e;         width: 75%; }
.strength-fill.strong { background: #10b981;         width: 100%; }

.strength-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.strength-label.weak   { color: var(--error); }
.strength-label.fair   { color: var(--warning); }
.strength-label.good   { color: #22c55e; }
.strength-label.strong { color: #10b981; }

/* ─── Glass Panel (User Dashboard) ──────────────────────────────────────────── */
.glass-panel {
    background: rgba(15, 0, 0, 0.5);
    border: 1px solid rgba(0, 153, 255, 0.12);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.glass-panel:hover {
    border-color: rgba(0, 153, 255, 0.22);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 30px rgba(0, 153, 255, 0.06);
}

/* ─── Glow Elements ──────────────────────────────────────────────────────────── */
.glow-red {
    box-shadow: 0 0 20px rgba(0, 153, 255, 0.4);
}

.glow-text {
    text-shadow: 0 0 20px rgba(0, 153, 255, 0.5);
    color: var(--crimson);
}

.glow-border {
    border-color: rgba(0, 153, 255, 0.5) !important;
    box-shadow: 0 0 15px rgba(0, 153, 255, 0.2) !important;
}

/* ─── Skeleton Loader ────────────────────────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, rgba(0,153,255,0.04) 25%, rgba(0,153,255,0.08) 50%, rgba(0,153,255,0.04) 75%);
    background-size: 1000px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text  { height: 14px; margin-bottom: 8px; border-radius: var(--radius-full); }
.skeleton-title { height: 24px; width: 60%; margin-bottom: 12px; border-radius: var(--radius-full); }
.skeleton-avatar{ width: 40px; height: 40px; border-radius: 50%; }
.skeleton-card  { height: 120px; border-radius: var(--radius-lg); }

/* ─── Notification Badge Pulse ───────────────────────────────────────────────── */
.pulse-ring {
    position: relative;
    display: inline-block;
}

.pulse-ring::before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--crimson);
    animation: pulse-ring 2s ease infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; box-shadow: 0 0 0 0 rgba(0,153,255,0.6); }
    70%{ transform: scale(1);   opacity: 0.7; box-shadow: 0 0 0 10px rgba(0,153,255,0); }
    100%{ transform: scale(0.8); opacity: 1; box-shadow: 0 0 0 0 rgba(0,153,255,0); }
}

/* ─── Intro / Hero Glass Section ─────────────────────────────────────────────── */
.hero-glass {
    background: linear-gradient(135deg, rgba(139,0,0,0.15) 0%, rgba(0,153,255,0.05) 100%);
    border: 1px solid rgba(0,153,255,0.2);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(8px);
    padding: var(--space-3xl) var(--space-2xl);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,153,255,0.6), transparent);
}

/* ─── Glass Notification Popup ───────────────────────────────────────────────── */
.glass-notification {
    background: rgba(15, 0, 0, 0.85);
    border: 1px solid rgba(0, 153, 255, 0.25);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    animation: slideInRight 0.3s ease;
}

/* ─── Page Transition Overlay ────────────────────────────────────────────────── */
.page-transition {
    position: fixed;
    inset: 0;
    background: var(--gradient-primary);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.in  { transform: scaleX(1); }
.page-transition.out { transform: scaleX(0); transform-origin: right; }

/* ─── Status Banner ──────────────────────────────────────────────────────────── */
.status-banner {
    background: rgba(0,153,255,0.1);
    border: 1px solid rgba(0,153,255,0.25);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
}

.status-banner i { color: var(--crimson); }

/* Maintenance banner */
.maintenance-banner {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    color: #f59e0b;
}

.maintenance-banner i { color: #f59e0b; }
