/* SHUBH PHP RUNNER - Main Stylesheet */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-tertiary: #18181f;
    --bg-glass: rgba(17, 17, 24, 0.72);
    --bg-glass-hover: rgba(24, 24, 32, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(99, 102, 241, 0.4);
    --text-primary: #f4f4f5;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.35);
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    --gradient-1: #6366f1;
    --gradient-2: #8b5cf6;
    --gradient-3: #ec4899;
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --navbar-height: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--accent-glow);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* AOS hides elements before its script initialises them. Keep pages usable if
   the CDN script is unavailable or blocked. */
[data-aos]:not(.aos-init) {
    opacity: 1 !important;
    transform: none !important;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.15), transparent),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(139, 92, 246, 0.12), transparent),
        radial-gradient(ellipse 50% 50% at 50% 80%, rgba(236, 72, 153, 0.08), transparent),
        var(--bg-primary);
    z-index: -3;
    animation: gradientShift 20s ease infinite;
}

.bg-noise {
    position: fixed;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: -2;
    pointer-events: none;
}

.aurora-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
}

.blob-1 { width: 500px; height: 500px; background: var(--gradient-1); top: -10%; left: -5%; animation: blobFloat 25s ease-in-out infinite; }
.blob-2 { width: 400px; height: 400px; background: var(--gradient-2); top: 50%; right: -10%; animation: blobFloat 30s ease-in-out infinite reverse; }
.blob-3 { width: 350px; height: 350px; background: var(--gradient-3); bottom: -5%; left: 30%; animation: blobFloat 22s ease-in-out infinite 5s; }

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08), transparent 70%);
    pointer-events: none;
    z-index: -1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover .cursor-glow { opacity: 1; }

.floating-particles {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat linear infinite;
}

/* Layout */
.app-wrapper { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.main-content.full-width { margin-left: 0; }

.page-content {
    flex: 1;
    padding: 24px 32px;
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
}

/* Glass Card */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    z-index: 100;
    border-radius: 0;
    border-left: none;
    border-top: none;
    border-bottom: none;
    transition: transform var(--transition), width var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logo-text { font-weight: 700; font-size: 18px; letter-spacing: -0.5px; }
.logo-text .accent { color: var(--accent); }

.sidebar-toggle, .mobile-menu-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
}

.sidebar-toggle:hover, .mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section { margin-bottom: 24px; }

.nav-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}

.nav-item i { width: 20px; text-align: center; font-size: 15px; }

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-hover);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.sidebar-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.sidebar-status.active { background: rgba(34, 197, 94, 0.1); color: var(--success); }
.sidebar-status.pending { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99;
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: var(--navbar-height);
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
}

.navbar-left, .navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 16px 10px 40px;
    color: var(--text-primary);
    font-size: 14px;
    width: 280px;
    transition: var(--transition);
    outline: none;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    width: 320px;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: var(--shadow-lg);
    z-index: 200;
}

.search-results.active { display: block; }

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-result-item:hover { background: rgba(255, 255, 255, 0.05); }
.search-result-item:last-child { border-bottom: none; }

.icon-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 16px;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }

.profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.profile-btn:hover { background: rgba(255, 255, 255, 0.05); }

.avatar, .avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
}

.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-name { font-size: 14px; font-weight: 500; }

.dropdown { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    padding: 8px;
    display: none;
    z-index: 200;
}

.dropdown-menu.active { display: block; animation: fadeInDown 0.2s ease; }

.dropdown-header {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 4px;
}

.dropdown-header strong { display: block; font-size: 14px; }
.dropdown-header small { color: var(--text-muted); font-size: 12px; }

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-primary); }
.dropdown-menu hr { border: none; border-top: 1px solid var(--border-color); margin: 4px 0; }

/* Footer */
.app-footer {
    padding: 16px 32px;
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links { display: flex; gap: 20px; }
.footer-links span { display: flex; align-items: center; gap: 6px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    color: white;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-run {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-run:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(34, 197, 94, 0.4); }
.btn-run:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--error); color: white; }
.btn-warning { background: var(--warning); color: white; }

.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; background: none; border: none; color: var(--text-secondary); cursor: pointer; border-radius: var(--radius-sm); }
.btn-icon:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 8px; }

.form-input, .input-wrapper input, .input-wrapper select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.form-input:focus, .input-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i:first-child {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 14px;
    z-index: 1;
}

.input-wrapper input { padding-left: 42px; }

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.checkbox-label input { display: none; }

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.checkbox-label input:checked + .checkmark {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
}

.select-sm {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    color: var(--text-primary);
    font-size: 12px;
    outline: none;
}

.link { color: var(--accent); text-decoration: none; font-size: 14px; }
.link:hover { color: var(--accent-hover); }

/* Auth Pages */
.auth-page .page-content { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 40px); }

.auth-container { width: 100%; max-width: 440px; padding: 20px; }

.auth-card { padding: 40px; }

.auth-header { text-align: center; margin-bottom: 32px; }

.auth-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.auth-logo.success { background: linear-gradient(135deg, var(--success), #16a34a); }
.auth-logo.error { background: linear-gradient(135deg, var(--error), #dc2626); }

.auth-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-secondary); }

/* Dashboard / Runner */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title h1, .page-header h1 {
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title p, .page-header p { color: var(--text-secondary); margin-top: 4px; }

.runner-layout {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    height: calc(100vh - var(--navbar-height) - 180px);
    min-height: 500px;
}

.editor-panel, .output-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-left, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-toolbar h3 {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.monaco-container { flex: 1; min-height: 200px; }

.output-meta {
    display: flex;
    gap: 16px;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.meta-item {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item i { font-size: 10px; }
.meta-item .fa-circle { color: var(--success); font-size: 8px; }

.output-terminal {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.7;
}

.output-terminal pre { white-space: pre-wrap; word-break: break-word; margin: 0; }
.output-placeholder { color: var(--text-muted); font-style: italic; }

/* Status Badges */
.status-badge, .role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success, .status-success { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.status-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-error, .status-fatal, .status-blocked { background: rgba(239, 68, 68, 0.15); color: var(--error); }
.status-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.role-owner { background: rgba(236, 72, 153, 0.15); color: var(--gradient-3); }
.role-admin { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.role-approved { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.role-pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.role-blocked { background: rgba(239, 68, 68, 0.15); color: var(--error); }

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-top: 16px;
    font-size: 14px;
}

.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); color: var(--warning); }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: var(--info); }
.alert-success { background: rgba(34, 197, 94, 0.1); border: 1px solid rgba(34, 197, 94, 0.2); color: var(--success); }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-icon.users { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.stat-icon.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.stat-icon.executions { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.stat-icon.today { background: rgba(59, 130, 246, 0.15); color: var(--info); }

.stat-info strong { display: block; font-size: 28px; font-weight: 700; }
.stat-info span { font-size: 13px; color: var(--text-muted); }

/* Tables */
.table-container { overflow-x: auto; padding: 0; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 14px 20px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.user-cell { display: flex; align-items: center; gap: 10px; }
.action-buttons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Profile */
.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.profile-card { padding: 32px; text-align: center; }

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin: 0 auto 16px;
    overflow: hidden;
}

.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; }
.profile-email { color: var(--text-muted); margin: 8px 0 12px; }

.profile-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.stat-item { text-align: center; }
.stat-item strong { display: block; font-size: 20px; }
.stat-item span { font-size: 12px; color: var(--text-muted); }

.settings-card { padding: 24px; margin-bottom: 16px; }
.settings-card h3 { font-size: 16px; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

/* Snippets */
.snippets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.snippet-card { padding: 20px; }
.snippet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.snippet-header h3 { font-size: 16px; }
.snippet-actions { display: flex; gap: 4px; }

.snippet-preview {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    max-height: 120px;
    overflow: hidden;
    color: var(--text-secondary);
}

.snippet-footer { margin-top: 12px; font-size: 12px; color: var(--text-muted); }

/* History */
.history-item { padding: 20px; margin-bottom: 12px; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.history-time { font-size: 12px; color: var(--text-muted); }
.history-code { background: rgba(0,0,0,0.3); padding: 12px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 12px; margin-bottom: 12px; overflow: hidden; }
.history-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); }
.history-output summary { cursor: pointer; font-size: 13px; color: var(--accent); margin-top: 8px; }
.history-output pre { margin-top: 8px; background: rgba(0,0,0,0.3); padding: 12px; border-radius: var(--radius-sm); font-size: 12px; }

/* Admin */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.admin-card { padding: 24px; }
.admin-card h3 { font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

.health-list, .user-list-mini, .activity-list { display: flex; flex-direction: column; gap: 8px; }

.health-item, .user-row, .activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.health-ok { color: var(--success); }
.activity-action { font-weight: 500; }
.activity-time { color: var(--text-muted); font-size: 12px; }
.action-tag { background: rgba(99, 102, 241, 0.15); color: var(--accent); padding: 2px 8px; border-radius: 4px; font-size: 12px; }

.filter-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

.tab {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.tab:hover { background: rgba(255,255,255,0.05); }
.tab.active { background: rgba(99, 102, 241, 0.15); color: var(--accent); border-color: rgba(99, 102, 241, 0.3); }

/* Pending Page */
.pending-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
}

.pending-card { padding: 48px; text-align: center; max-width: 520px; width: 100%; }

.pending-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--warning);
}

.pending-steps {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.step { text-align: center; opacity: 0.4; transition: var(--transition); }
.step.completed, .step.active { opacity: 1; }

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 14px;
}

.step.completed .step-icon { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.step.active .step-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.step span { font-size: 12px; color: var(--text-muted); }

.pending-note { color: var(--text-secondary); font-size: 14px; margin: 16px 0; }
.pending-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    grid-column: 1 / -1;
}

.empty-state i { font-size: 48px; color: var(--text-muted); margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); margin-bottom: 20px; }

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--error); }
code, .code-preview { font-family: var(--font-mono); font-size: 12px; background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; }

.file-upload-btn { cursor: pointer; }

/* Loader */
.loader-screen {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
    animation: dismissLoader 0s 5s forwards;
}

.loader-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-content { text-align: center; }

.loader-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
}

.loader-logo i { color: var(--accent); font-size: 32px; }

.loader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.loader-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--gradient-1), var(--gradient-2));
    border-radius: 3px;
    animation: loaderProgress 1.5s ease forwards;
}

.loader-text { color: var(--text-muted); font-size: 13px; }

@keyframes dismissLoader {
    to {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .runner-layout { height: auto; min-height: 600px; }
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
    .main-content { margin-left: 0; }
    .mobile-menu-btn { display: block; }
    .page-content { padding: 16px; }
    .search-box input { width: 200px; }
    .search-box input:focus { width: 220px; }
    .profile-name { display: none; }
    .dashboard-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .footer-content { flex-direction: column; gap: 8px; text-align: center; }
    .pending-steps { gap: 12px; }
}

@media (max-width: 480px) {
    .auth-card { padding: 24px; }
    .toolbar-left, .toolbar-right { width: 100%; }
    .form-row-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
