:root {
    --bg-dark: #0a0a0f;
    --bg-card: rgba(20, 20, 30, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --secondary: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
    pointer-events: none;
}

.glow-orb {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.3;
}

.glow-orb.top-left {
    top: -200px;
    left: -200px;
    background: var(--primary);
    animation: float 10s ease-in-out infinite alternate;
}

.glow-orb.bottom-right {
    bottom: -200px;
    right: -200px;
    background: var(--secondary);
    animation: float 12s ease-in-out infinite alternate-reverse;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, #a78bfa 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glass-effect {
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.logo-icon {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    padding: 150px 0 80px;
    display: flex;
    align-items: center;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 5rem;
}

.hero-image {
    width: 100%;
    max-width: 1000px;
    padding: 10px;
    border-radius: 20px;
    transform: perspective(1000px) rotateX(5deg);
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: perspective(1000px) rotateX(0deg);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(139, 92, 246, 0.5);
}

.icon-wrapper {
    width: 50px;
    height: 50px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
}

/* Showcase Sections */
.showcase-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.showcase-container.reverse {
    flex-direction: row-reverse;
}

.showcase-content {
    flex: 1;
    min-width: 0;
}

.showcase-image {
    flex: 1.2;
    min-width: 0;
}

.showcase-image .glass-panel {
    padding: 8px;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.showcase-container.reverse .showcase-image .glass-panel {
    transform: perspective(1000px) rotateY(5deg);
}

.showcase-image .glass-panel:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.showcase-image img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.showcase-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.feature-list li i {
    color: var(--primary);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--text-main);
}

.copyright {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations Classes */
.observe-slide-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.observe-slide-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.observe-slide-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Responsive */
@media (max-width: 992px) {
    .showcase-container, .showcase-container.reverse {
        flex-direction: column;
        text-align: center;
    }
    .feature-list {
        display: inline-block;
        text-align: left;
    }
    .hero h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .footer-container {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
        text-align: center;
    }
}

/* CSS Terminal */
.css-terminal {
    background: #0d1117;
    border-radius: 12px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
}

.terminal-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.terminal-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.dot.close { background: #ff5f56; }
.dot.minimize { background: #ffbd2e; }
.dot.maximize { background: #27c93f; }

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #8b949e;
    font-size: 0.85rem;
}

.terminal-body {
    padding: 20px;
    color: #c9d1d9;
}

.term-line {
    margin-bottom: 8px;
    line-height: 1.5;
}

.term-prompt {
    color: #7ee787;
    margin-right: 8px;
    font-weight: 600;
}

.term-line.output {
    color: #8b949e;
}

.cursor-blink {
    animation: blink 1s step-end infinite;
    color: #c9d1d9;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.showcase-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.showcase-stacked .showcase-content,
.showcase-stacked .showcase-image {
    flex: none;
    width: 100%;
}

.feature-list.horizontal-list {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Auth Page Styles */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.back-link {
    position: absolute;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.back-link:hover { color: var(--text-main); }

.auth-panel {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 20px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo {
    color: var(--primary);
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}
.auth-header h2 { margin-bottom: 0.5rem; }
.auth-header p { color: var(--text-muted); font-size: 0.9rem; }

.auth-form { margin-bottom: 1.5rem; }

.input-group { margin-bottom: 1.25rem; }
.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon-wrapper svg {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}
.input-icon-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-main);
    transition: border-color 0.3s, background 0.3s;
}
.input-icon-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
}
.forgot-password {
    color: var(--primary);
    text-decoration: none;
}
.forgot-password:hover { text-decoration: underline; }

.btn-full { width: 100%; }

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}
.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}
.auth-divider span {
    background: #0f1115; /* Match bg or glass panel roughly */
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.social-login {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}
.btn-icon {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.btn-icon svg {
    width: 18px;
    height: 18px;
}

.auth-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.auth-footer a { color: var(--primary); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

/* Dashboard Styles */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    z-index: 10;
    position: relative;
}

.sidebar {
    width: 260px;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.sidebar-header { margin-bottom: 2rem; }

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 2rem;
}
.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.user-info h4 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.plan-badge {
    font-size: 0.7rem;
    background: rgba(39, 201, 63, 0.1);
    color: #27c93f;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 0.5rem; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
}
.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}
.nav-item i { width: 18px; height: 18px; }

.main-content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.header-actions { display: flex; gap: 1rem; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; border-radius: 6px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3.5rem;
}

.widget-card { padding: 1.5rem; }
.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.widget-header h3 { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.text-primary { color: var(--primary); }

.widget-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.widget-sub { font-size: 1rem; color: var(--text-muted); font-weight: 400; }

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
}

.dashboard-row {
    display: flex;
    gap: 1.5rem;
}
.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.data-table th { color: var(--text-muted); font-weight: 500; font-size: 0.85rem; }
.data-table code {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: #a5d6ff;
}

.status-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.status-badge.active { background: rgba(39, 201, 63, 0.1); color: #27c93f; }

.activity-list { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.activity-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.activity-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    padding: 8px;
    color: var(--primary);
}
.activity-details p { font-size: 0.9rem; margin-bottom: 0.2rem; }
.activity-details span { font-size: 0.75rem; color: var(--text-muted); }


/* Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0;
}

input[type="checkbox"]:hover {
    border-color: var(--primary);
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}


/* Utilities */
.mt-4 { margin-top: 1.5rem; }


/* =========================================================================
   Admin Panel
   ========================================================================= */
.admin-badge {
    font-size: 0.65rem;
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-block { margin-bottom: 2rem; }

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.toolbar .toolbar-left { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.toolbar h3 { font-size: 1.1rem; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.table-wrapper { width: 100%; overflow-x: auto; }
.data-table td .muted { color: var(--text-muted); font-size: 0.8rem; }
.data-table tr:last-child td { border-bottom: none; }

.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Status badges */
.status-badge.pending { background: rgba(255, 189, 46, 0.12); color: #ffbd2e; }
.status-badge.error { background: rgba(244, 63, 94, 0.12); color: #f43f5e; }
.status-badge.inactive { background: rgba(148, 163, 184, 0.12); color: var(--text-muted); }
.status-badge.openai { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.status-badge.dust { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }

/* Buttons - small / danger / ghost */
.btn-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
    border: 1px solid rgba(244, 63, 94, 0.3);
}
.btn-danger:hover { background: rgba(244, 63, 94, 0.2); }
.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.btn-ghost:hover { color: var(--text-main); border-color: rgba(255,255,255,0.25); }
.btn-xs { padding: 0.35rem 0.7rem; font-size: 0.78rem; border-radius: 6px; }

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label { font-size: 0.8rem; color: var(--text-muted); }
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s, background 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}
.form-field.checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}
.form-field.checkbox-field label { color: var(--text-main); font-size: 0.9rem; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}
.modal-overlay.open { display: flex; }
.modal {
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    border-radius: 16px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.modal-header h3 { font-size: 1.2rem; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
}
.modal-close:hover { color: var(--text-main); }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Tabs */
.tab-bar { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.tab-btn.active { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border-color: rgba(139, 92, 246, 0.3); }

/* Bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 180px;
    padding-top: 1rem;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; min-width: 0; }
.bar {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}
.bar-label { font-size: 0.65rem; color: var(--text-muted); white-space: nowrap; }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.9rem 1.25rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(150%);
    transition: transform 0.3s ease;
    z-index: 2000;
    font-size: 0.9rem;
}
.toast.show { transform: translateY(0); }
.toast.error { border-color: rgba(244, 63, 94, 0.4); }
.toast.success { border-color: rgba(39, 201, 63, 0.4); }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state i { width: 36px; height: 36px; margin-bottom: 0.75rem; opacity: 0.6; }

.loading-row { text-align: center; color: var(--text-muted); padding: 2rem; }

.code-pill {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #a5d6ff;
}

/* Mobile Navigation CSS */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
}
.menu-toggle i {
    width: 24px;
    height: 24px;
}

.mobile-only {
    display: none;
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Base style for tilt-cards */
.tilt-card {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    transform-style: preserve-3d;
    will-change: transform;
}

@media (max-width: 992px) {
    /* Flatten 3D images on mobile/tablet for legibility and touch stability */
    .showcase-image .glass-panel,
    .showcase-container.reverse .showcase-image .glass-panel,
    .hero-image,
    .tilt-card {
        transform: none !important;
        transition: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
        width: 100%;
        padding: 0 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
        z-index: 99;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    .nav-links li a {
        display: block;
        padding: 0.75rem;
        font-size: 1.15rem;
        color: var(--text-main);
    }

    /* Dashboard layout mobile/tablet enhancements */
    .dashboard-layout { 
        flex-direction: column; 
    }
    .sidebar { 
        width: 100%; 
        flex-direction: column; 
        align-items: stretch; 
        gap: 1.25rem; 
        padding: 1.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    .sidebar-header {
        margin-bottom: 0.5rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .user-profile { 
        margin-bottom: 0; 
        padding: 0.75rem 1rem;
    }
    .sidebar-nav { 
        flex-direction: row; 
        flex-wrap: wrap; 
        gap: 0.5rem;
    }
    .sidebar-nav .nav-item {
        flex: 1 1 calc(50% - 0.5rem);
        justify-content: center;
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    .sidebar-footer {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    .sidebar-footer .nav-item {
        flex: 1;
        justify-content: center;
        padding: 0.65rem;
        font-size: 0.9rem;
    }
    .main-content { 
        padding: 1.25rem; 
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1.25rem;
    }
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }
    .header-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .css-terminal {
        font-size: 0.8rem;
    }
    .terminal-body {
        padding: 12px;
    }
    .back-link {
        position: static;
        margin-bottom: 1.5rem;
        align-self: flex-start;
    }
}
