/* 
 * DevOpsAI Genius - Deep Space Theme V2 (Premium)
 * Aesthetic: Hyper-Glass, Neon Aurora, Isometric Depth
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* 
     * PALETTE - DEEP COSMOS 
     */
    --bg-void: #030508;
    --bg-nebula: #0a0c14;

    /* Brand Accents */
    --neon-cyan: #00f0ff;
    --neon-purple: #bd00ff;
    --neon-blue: #2d5af8;
    --neon-pink: #f02d7d;

    /* Glassmorphism Layers */
    --glass-surface: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    /* Dimensions */
    --header-height: 80px;
    --container-max: 1400px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    /* Animations */
    --ease-elastic: cubic-bezier(0.4, 0, 0.2, 1);
}

/* BASE RESET */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-void);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(45, 90, 248, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(189, 0, 255, 0.08) 0%, transparent 25%);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* TYPOGRAPHY */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-brand {
    background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* COMPONENTS: BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.3s var(--ease-elastic);
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(45, 90, 248, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(45, 90, 248, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* COMPONENTS: CARDS (Glass) */
.glass-panel {
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* NAVIGATION */
.navbar {
    height: var(--header-height);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(3, 5, 8, 0.7);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: white;
    text-decoration: none;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #000;
}

/* LOGIN PAGE (Standalone) */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.orbital-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 3rem;
    position: relative;
    z-index: 10;
}

/* DASHBOARD (Command Center) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.power-card {
    height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    color: white;
    text-decoration: none;
}

.power-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.power-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.power-card:hover::after {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* INPUTS */
.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: white;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 4px rgba(45, 90, 248, 0.1);
}

.input-label {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ALERTS */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(240, 45, 125, 0.1);
    color: #ff80ab;
    border: 1px solid rgba(240, 45, 125, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* LAYOUT UTILS */
.page-container {
    max-width: var(--container-max);
    margin: 8rem auto 4rem;
    padding: 0 2rem;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

/* UTILITY CLASSES */
.debug-content {
    display: block !important;
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s var(--ease-elastic);
    font-size: 0.9rem;
}

.toast i {
    font-size: 1.1rem;
}

.toast-success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast-success i {
    color: #6ee7b7;
}

.toast-error {
    border-color: rgba(240, 45, 125, 0.3);
}

.toast-error i {
    color: var(--neon-pink);
}

.toast-info {
    border-color: rgba(45, 90, 248, 0.3);
}

.toast-info i {
    color: var(--neon-blue);
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   LOADING SPINNER
   =========================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 5, 8, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ===========================================
   FORM VALIDATION STATES
   =========================================== */
.form-input.is-invalid {
    border-color: var(--neon-pink);
    box-shadow: 0 0 0 3px rgba(240, 45, 125, 0.1);
}

.form-input.is-valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-error {
    color: var(--neon-pink);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-help {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .page-container {
        margin-top: 5rem;
        padding: 0 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .power-card {
        height: auto;
        min-height: 200px;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .form-input {
        padding: 0.85rem;
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}