@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* ── Color System ── */
    --bg-base: #090a0f;
    --bg-surface: rgba(18, 20, 29, 0.75);
    --bg-surface-hover: rgba(30, 35, 50, 0.85);
    --bg-elevated: rgba(24, 28, 42, 0.9);
    --bg-input: rgba(10, 12, 18, 0.6);

    /* Accents & Highlights */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(56, 189, 248, 0.35);
    
    --accent-primary: #38bdf8;
    --accent-primary-glow: rgba(56, 189, 248, 0.2);
    --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8);
    --accent-gradient-secondary: linear-gradient(135deg, #ec4899, #8b5cf6);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-tertiary: #475569;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Sizing & Layout */
    --sidebar-w: 300px;
    --drawer-w: 340px;
    --header-h: 58px;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --radius-pill: 9999px;

    /* Transitions & Shadows */
    --transition-fast: 0.15s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --shadow-neon: 0 0 20px rgba(56, 189, 248, 0.25);
}

/* ══════════════════════════════════════════════════════════════════
   Resets & Basics
   ══════════════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    -webkit-font-smoothing: antialiased;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.05), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.05), transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.03), transparent 50%);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-primary); }

.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* ══════════════════════════════════════════════════════════════════
   Layout Shell
   ══════════════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}

.glass-panel.right {
    border-right: none;
    border-left: 1px solid var(--border-subtle);
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
}

.drawer {
    width: var(--drawer-w);
    flex-shrink: 0;
}

.panel-collapsed.left {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    position: absolute;
    height: 100%;
}

.panel-collapsed.right {
    transform: translateX(var(--drawer-w));
    position: absolute;
    right: 0;
    height: 100%;
}

/* ══════════════════════════════════════════════════════════════════
   Sidebar Content
   ══════════════════════════════════════════════════════════════════ */
.sidebar-header {
    height: var(--header-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.brand-icon {
    width: 30px;
    height: 30px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--accent-primary-glow);
}

.brand-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-primary);
    border-radius: var(--radius-pill);
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Search Box */
.search-container {
    padding: 12px 14px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.search-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-glow);
    background: rgba(0, 0, 0, 0.5);
}

.search-input-wrapper i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    width: 15px; height: 15px;
}

.search-input-wrapper input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.search-input-wrapper .search-kbd {
    position: absolute;
    right: 10px;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    padding: 2px 5px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

/* Sidebar Dropzone */
.sidebar-dropzone {
    margin: 0 14px 12px;
    padding: 12px;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sidebar-dropzone:hover, .sidebar-dropzone.dragover {
    border-color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px var(--accent-primary-glow);
}

.sidebar-dropzone i {
    color: var(--accent-primary);
    width: 20px;
    height: 20px;
}

.sidebar-dropzone span {
    font-size: 0.76rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Section Dividers & Tabs */
.sidebar-section-title {
    padding: 10px 16px 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-count {
    padding: 1px 6px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
}

/* Projects & Apps Lists */
.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
}

.sidebar-projects-list, .nav-menu {
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-item, .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.project-item:hover, .nav-item:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-subtle);
}

.project-item.active, .nav-item.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
}

.project-item-thumb {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
    background: #000;
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.project-item-emoji {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.project-item-info, .nav-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.project-item-title, .nav-item-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-item-type, .nav-item-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.nav-item-icon {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    object-fit: contain;
}

.nav-pin-btn {
    opacity: 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.nav-item:hover .nav-pin-btn {
    opacity: 1;
}

.nav-pin-btn.pinned {
    opacity: 1;
    color: #fbbf24;
}

.sidebar-empty-state {
    padding: 16px 14px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.4;
}

/* User Profile Footer */
.user-profile {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.user-profile img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--border-strong);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-info .name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info .role {
    font-size: 0.68rem;
    color: var(--accent-primary);
}

/* ══════════════════════════════════════════════════════════════════
   Central Main Workspace
   ══════════════════════════════════════════════════════════════════ */
.workspace {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Top Toolbar */
.toolbar {
    height: var(--header-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    z-index: 15;
    gap: 12px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* App Mode Navigation Tabs */
.app-nav-tabs {
    display: flex;
    background: var(--bg-input);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 3px;
}

.app-nav-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.app-nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.app-nav-tab.active {
    background: var(--accent-primary);
    color: #000;
    box-shadow: 0 2px 8px var(--accent-primary-glow);
}

.app-nav-tab i {
    width: 14px;
    height: 14px;
}

/* Toolbar Buttons */
.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-surface-hover);
    border-color: var(--border-strong);
}

.btn-icon.active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
}

.btn-icon i {
    width: 16px;
    height: 16px;
}

/* Central Stage Container */
.stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    background: var(--bg-base);
}

/* Stage Grid Overlay */
.stage-grid {
    position: absolute;
    inset: 0;
    background-size: 24px 24px;
    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);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-smooth);
    z-index: 1;
}

.stage-grid.active {
    opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 1: WORKSPACE FILE & DESIGN INSPECTOR
   ══════════════════════════════════════════════════════════════════ */
.view-container {
    width: 100%;
    height: 100%;
    display: flex;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}

.inspector-layout {
    display: flex;
    width: 100%;
    height: 100%;
}

.inspector-stage-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 24px;
    overflow: auto;
}

.inspector-canvas-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-md);
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    border: 1px solid var(--border-strong);
    overflow: hidden;
    background: #000;
}

.inspector-canvas {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    cursor: crosshair;
}

/* Floating Eyedropper Badge */
.eyedropper-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-subtle);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    color: var(--text-primary);
    pointer-events: none;
    z-index: 10;
}

.eyedropper-swatch {
    width: 14px;
    height: 14px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255,255,255,0.4);
}

/* Inspector Details Side-Panel */
.inspector-details-panel {
    width: 360px;
    border-left: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 20px;
    gap: 20px;
}

.panel-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-card-title i {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

/* Palette Swatches Cards */
.palette-swatches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
    gap: 8px;
}

.palette-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.palette-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.palette-card.copied {
    border-color: var(--success);
}

.swatch-color-box {
    height: 48px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swatch-copy-hint {
    font-size: 0.65rem;
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.palette-card:hover .swatch-copy-hint {
    opacity: 1;
}

.swatch-details {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.swatch-hex {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-primary);
}

.swatch-role {
    font-size: 0.62rem;
    color: var(--text-muted);
}

/* Code Snippet Box */
.code-token-box {
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #38bdf8;
    position: relative;
    max-height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.code-copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 3px 8px;
    font-size: 0.68rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.code-copy-btn:hover {
    background: var(--accent-primary);
    color: #000;
}

/* Metadata Key-Value List */
.meta-kv-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
}

.meta-kv-key {
    color: var(--text-muted);
}

.meta-kv-val {
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Action Buttons */
.action-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.btn-action.primary {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    font-weight: 700;
}

.btn-action.primary:hover {
    box-shadow: 0 4px 12px var(--accent-primary-glow);
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 2: PRO RESPONSIVE SIMULATOR & PLAYGROUND
   ══════════════════════════════════════════════════════════════════ */
.simulator-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.sim-top-bar {
    padding: 8px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.sim-url-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0 8px;
    height: 34px;
}

.sim-url-wrapper i {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    margin-right: 6px;
}

.sim-url-wrapper input {
    flex: 1;
    font-size: 0.8rem;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.sim-controls-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sim-stage-viewport {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: auto;
    padding: 24px;
}

.sim-frame-wrapper {
    position: relative;
    background: #000;
    transition: width 0.3s ease, height 0.3s ease, transform 0.2s ease;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Device Bezels */
.sim-frame-wrapper.has-bezel.mobile-ios {
    border-radius: 44px;
    border: 10px solid #1e293b;
    box-shadow: 0 0 0 2px #334155, 0 24px 60px rgba(0, 0, 0, 0.8);
}

.sim-frame-wrapper.has-bezel.tablet {
    border-radius: 24px;
    border: 12px solid #1e293b;
    box-shadow: 0 0 0 2px #334155, 0 24px 60px rgba(0, 0, 0, 0.8);
}

.sim-frame-wrapper.has-bezel.laptop {
    border-radius: 14px 14px 0 0;
    border: 10px solid #1e293b;
    border-bottom: 14px solid #334155;
}

.sim-frame-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Live Code Section */
.sim-code-section {
    width: 380px;
    border-left: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    display: none;
    flex-direction: column;
    padding: 16px;
    gap: 12px;
}

.sim-code-section.active {
    display: flex;
}

.sim-code-editor {
    flex: 1;
    width: 100%;
    background: #000;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #a5f3fc;
    line-height: 1.5;
    resize: none;
}

/* Loader */
.frame-loader {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.frame-loader.active {
    display: flex;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 3: DYNAMIC APPS CATALOG
   ══════════════════════════════════════════════════════════════════ */
.catalog-container {
    width: 100%;
    padding: 32px;
    overflow-y: auto;
}

.catalog-hero {
    margin-bottom: 28px;
}

.catalog-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.catalog-hero p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.catalog-app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.catalog-app-card:hover {
    background: var(--bg-surface-hover);
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.catalog-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.catalog-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: contain;
    background: var(--bg-elevated);
    padding: 4px;
    border: 1px solid var(--border-subtle);
}

.catalog-card-tag {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.catalog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.catalog-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
}

.catalog-card-footer {
    display: flex;
    align-items: center;
    color: var(--accent-primary);
    font-size: 0.78rem;
    font-weight: 600;
    padding-top: 8px;
    border-top: 1px solid var(--border-subtle);
}

.catalog-card-action {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ══════════════════════════════════════════════════════════════════
   VIEW 4: DESIGN GENERATOR SUITE & RIGHT DRAWER
   ══════════════════════════════════════════════════════════════════ */
.drawer-header {
    height: var(--header-h);
    padding: 0 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Accordion */
.accordion {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.accordion.open {
    border-color: var(--border-strong);
    background: var(--bg-surface);
}

.accordion-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

.chevron {
    transition: transform var(--transition-fast);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.accordion.open .chevron {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 14px;
    border-top: 1px solid var(--border-subtle);
    display: none;
    flex-direction: column;
    gap: 12px;
}

.accordion.open .accordion-body {
    display: flex;
}

/* Form Controls & Sliders */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-control {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.8rem;
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--accent-primary);
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-secondary);
}

input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

/* WCAG Contrast Score Badges */
.contrast-score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.score-badge {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent-primary);
}

.score-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}

.score-pill.pass {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.score-pill.fail {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.contrast-preview-card {
    padding: 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--border-subtle);
}

/* Glassmorphism Preview Card */
.glass-preview-box {
    height: 90px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    background-image: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
    padding: 12px;
}

.glass-preview-card {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Gradient Preview Box */
.gradient-preview-box {
    height: 70px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

/* Typography Scale Rows */
.typo-scale-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.typo-scale-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.typo-scale-sample {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════════════
   Toast Notifications
   ══════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    font-size: 0.82rem;
    color: var(--text-primary);
    pointer-events: auto;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
}
