/* ==========================================================================
   ASK Cable Vision - Premium Admin Login Experience
   ========================================================================== */

:root {
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.45);
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.4);
    
    --bg-base: #0a0f1d;
    --bg-card: rgba(15, 23, 42, 0.78);
    --bg-input: rgba(15, 23, 42, 0.6);
    --bg-input-focus: rgba(30, 41, 59, 0.85);
    
    --border-card: rgba(255, 255, 255, 0.1);
    --border-card-hover: rgba(99, 102, 241, 0.35);
    --border-input: rgba(148, 163, 184, 0.22);
    --border-input-focus: #6366f1;
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dim: #475569;
    
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-border: rgba(239, 68, 68, 0.3);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.12);
    
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 60px rgba(79, 70, 229, 0.14);
    --shadow-btn: 0 10px 25px -5px rgba(79, 70, 229, 0.5), 0 0 20px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme Mode override support */
body.theme-light {
    --bg-base: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-input: rgba(248, 250, 252, 0.9);
    --bg-input-focus: #ffffff;
    --border-card: rgba(226, 232, 240, 0.9);
    --border-card-hover: rgba(99, 102, 241, 0.45);
    --border-input: rgba(203, 213, 225, 0.9);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --shadow-card: 0 25px 50px -12px rgba(15, 23, 42, 0.12), 0 0 45px rgba(99, 102, 241, 0.1);
}

/* Reset & Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    padding: 1.5rem 1rem;
    transition: background-color 0.4s ease;
}

/* ==========================================================================
   Ambient Background Effects
   ========================================================================== */
.ambient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Glowing Aurora Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.45;
    transition: opacity 0.5s ease;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.orb-1 {
    width: 520px;
    height: 520px;
    top: -120px;
    left: -120px;
    background: radial-gradient(circle, #4f46e5 0%, #7c3aed 70%, transparent 100%);
    animation-delay: 0s;
}

.orb-2 {
    width: 480px;
    height: 480px;
    bottom: -100px;
    right: -100px;
    background: radial-gradient(circle, #06b6d4 0%, #3b82f6 70%, transparent 100%);
    animation-delay: -5s;
    opacity: 0.35;
}

.orb-3 {
    width: 360px;
    height: 360px;
    top: 40%;
    right: 25%;
    background: radial-gradient(circle, #ec4899 0%, #8b5cf6 70%, transparent 100%);
    animation-delay: -10s;
    opacity: 0.2;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, 35px) scale(1.08);
    }
    100% {
        transform: translate(-30px, 20px) scale(0.95);
    }
}

/* Subtle Network Grid Overlay */
.network-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

body.theme-light .network-grid {
    background-image: 
        linear-gradient(to right, rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
}

/* ==========================================================================
   Top Utility Bar (Language Selector & Theme Toggle)
   ========================================================================== */
.login-top-bar {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    animation: fadeInDown 0.6s ease-out;
}

/* Language Pill Switcher */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-full);
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.theme-light .lang-switcher {
    background: rgba(255, 255, 255, 0.85);
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.lang-pill:hover {
    color: var(--text-primary);
    text-decoration: none;
}

.lang-pill.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}

.lang-flag {
    width: 16px;
    height: 16px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Theme Toggle Button */
.theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

body.theme-light .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.85);
}

.theme-toggle-btn:hover {
    color: var(--text-primary);
    transform: rotate(25deg);
    border-color: var(--primary-light);
}

/* ==========================================================================
   Main Login Card
   ========================================================================== */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 2.25rem 2rem;
    transition: var(--transition);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-card:hover {
    border-color: var(--border-card-hover);
}

/* Card Header & Brand Identity */
.brand-header {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-lg);
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 10px 25px -4px rgba(79, 70, 229, 0.5);
    margin-bottom: 1.15rem;
}

.brand-icon-container i {
    font-size: 2rem;
}

/* Radar Pulse Animation around satellite icon */
.radar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid var(--primary-light);
    border-radius: calc(var(--radius-lg) + 5px);
    opacity: 0;
    animation: radarPulse 3s infinite ease-out;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

.brand-title {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.35rem;
}

body.theme-light .brand-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--success-bg);
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ==========================================================================
   Alert Messages
   ========================================================================== */
.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    line-height: 1.4;
    animation: shakeAlert 0.4s ease-in-out;
}

.login-alert-error {
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    color: #fca5a5;
}

body.theme-light .login-alert-error {
    color: #b91c1c;
}

.login-alert-icon {
    font-size: 1.15rem;
    color: var(--danger);
    flex-shrink: 0;
    margin-top: 1px;
}

@keyframes shakeAlert {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ==========================================================================
   Form Controls
   ========================================================================== */
.login-form-group {
    margin-bottom: 1.35rem;
}

.login-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-left {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

.login-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    transition: var(--transition);
    outline: none;
}

.login-input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.login-input:hover {
    border-color: rgba(99, 102, 241, 0.4);
}

.login-input:focus {
    background: var(--bg-input-focus);
    border-color: var(--border-input-focus);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.login-input:focus + .input-icon-left,
.input-wrapper:focus-within .input-icon-left {
    color: var(--primary-light);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* Submit Action Button */
.login-submit-btn {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-md);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: var(--transition);
    margin-top: 1.75rem;
    position: relative;
    overflow: hidden;
}

.login-submit-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.login-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(79, 70, 229, 0.65), 0 0 25px rgba(99, 102, 241, 0.4);
}

.login-submit-btn:hover::after {
    left: 100%;
}

.login-submit-btn:active {
    transform: translateY(0);
}

.login-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Card Footer Security Note */
.card-security-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-card);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.card-security-footer i {
    color: var(--success);
}

/* ==========================================================================
   Page Footer
   ========================================================================== */
.login-page-footer {
    position: relative;
    z-index: 10;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
    animation: fadeIn 0.9s ease-out;
}

.login-page-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.login-page-footer a:hover {
    color: var(--primary-light);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================================================
   Responsive Media Queries
   ========================================================================== */
@media (max-width: 480px) {
    body {
        padding: 1rem 0.75rem;
    }
    
    .login-card {
        padding: 1.75rem 1.25rem;
        border-radius: var(--radius-lg);
    }
    
    .brand-icon-container {
        width: 60px;
        height: 60px;
    }
    
    .brand-icon-container i {
        font-size: 1.65rem;
    }
    
    .brand-title {
        font-size: 1.4rem;
    }
}
