:root {
    /* Brand Colors */
    --primary: #4f46e5;       /* Indigo 600 */
    --primary-hover: #4338ca;
    --primary-subtle: #e0e7ff;
    
    /* Neutral / Surface Colors */
    --bg-app: #f8fafc;
    --bg-paper: #ffffff;
    --bg-sidebar-glass: rgba(15, 23, 42, 0.75);
    --bg-surface-glass: rgba(255, 255, 255, 0.65);
    
    /* Text Colors */
    --text-main: #111827;     /* Gray 900 */
    --text-muted: #64748b;    /* Slate 500 */
    --text-sidebar: #94a3b8;
    --text-sidebar-hover: #ffffff;

    /* Borders & Shadows */
    --border: rgba(226, 232, 240, 0.8);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: #6366f1;
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --shadow-paper: 0 25px 50px -12px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --header-height: 64px;
    --container-width: 1200px;
}

* { box-sizing: border-box; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.5); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.8); }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- BACKGROUNDS LOGIC --- */
/* Dashboard (Default) Background: Dark Radial */
body:not(.landing-page):not(.auth-page) {
    background: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
                radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
                radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-color: #0f172a; 
    height: 100vh;
    overflow: hidden; 
}

/* Landing Page Background: White/Light */
body.landing-page {
    background: #ffffff;
    overflow-y: auto !important;
    height: auto !important;
}

/* Auth Page Background: Light Radial */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #e0e7ff, #f3f4f6 50%, #dbeafe 100%);
    padding: 1.5rem;
}

/* =========================================
   1. LANDING PAGE STYLES
   ========================================= */

.landing-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-container .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

.nav-actions { display: flex; gap: 1rem; align-items: center; }

/* Hero Section */
.hero-section {
    padding: 8rem 1.5rem 6rem 1.5rem;
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content { max-width: 600px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--primary-subtle);
    color: var(--primary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.badge-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; }

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #9333ea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.hero-cta { display: flex; gap: 1rem; }

/* Hero Preview Window */
.hero-preview { position: relative; z-index: 1; }

.preview-window {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15);
    border: 1px solid var(--border);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease;
}
.preview-window:hover { transform: none; }

.window-header {
    background: #f1f5f9;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.dots { display: flex; gap: 6px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #cbd5e1; }
.dots span:nth-child(1) { background: #ef4444; }
.dots span:nth-child(2) { background: #eab308; }
.dots span:nth-child(3) { background: #22c55e; }

.address-bar {
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    flex: 1;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.window-content { display: flex; height: 300px; background: white; }
.fake-sidebar { width: 60px; border-right: 1px solid #f1f5f9; background: #f8fafc; }
.fake-editor { flex: 1; padding: 20px; position: relative; }
.fake-line { height: 10px; background: #e2e8f0; border-radius: 4px; margin-bottom: 10px; }
.width-80 { width: 80%; }
.width-60 { width: 60%; }
.width-90 { width: 90%; }
.width-70 { width: 70%; }

.floating-badge {
    position: absolute; bottom: 20px; right: 20px;
    background: #10b981; color: white; padding: 8px 16px;
    border-radius: 20px; font-size: 0.85rem; font-weight: 600;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    display: flex; align-items: center; gap: 6px;
    animation: float 3s ease-in-out infinite;
}

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

/* Landing Features & Footer */
.trusted-section {
    text-align: center; padding: 2rem 1.5rem;
    background: #f8fafc; border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.trusted-section p { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 1.5rem; letter-spacing: 0.05em; }

.logos-grid { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; opacity: 0.6; }
.logo-item { font-size: 1.5rem; font-weight: 600; color: #475569; display: flex; align-items: center; gap: 8px; }

.features-section { max-width: var(--container-width); margin: 0 auto; padding: 6rem 1.5rem; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; margin: 0 0 1rem 0; color: var(--text-main); }
.section-header p { font-size: 1.2rem; color: var(--text-muted); }

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

.feature-card {
    background: white; padding: 2rem; border-radius: 16px;
    border: 1px solid var(--border); transition: transform 0.2s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--primary-subtle); }

.icon-box {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 1.5rem;
}
.icon-box.blue { background: #e0e7ff; color: #4f46e5; }
.icon-box.green { background: #dcfce7; color: #16a34a; }
.icon-box.purple { background: #f3e8ff; color: #9333ea; }
.icon-box.orange { background: #ffedd5; color: #ea580c; }

.feature-card h3 { margin: 0 0 0.75rem 0; font-size: 1.25rem; }
.feature-card p { margin: 0; color: var(--text-muted); line-height: 1.6; }

.cta-section { background: var(--primary); color: white; text-align: center; padding: 6rem 1.5rem; }
.cta-section h2 { font-size: 2.5rem; font-weight: 800; margin: 0 0 1rem 0; }
.cta-section p { font-size: 1.25rem; margin-bottom: 2rem; opacity: 0.9; }

.btn-white {
    background: white; color: var(--primary); padding: 1rem 2rem;
    font-size: 1.1rem; border-radius: 8px; font-weight: 700;
    text-decoration: none; display: inline-block; transition: transform 0.2s;
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

.main-footer { background: #1e293b; color: #94a3b8; padding: 3rem 1.5rem; text-align: center; }
.footer-bottom { max-width: var(--container-width); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.social-icons a { color: #94a3b8; margin-left: 1.5rem; font-size: 1.2rem; transition: color 0.2s; }
.social-icons a:hover { color: white; }


/* =========================================
   2. AUTH / LOGIN PAGE STYLES
   ========================================= */

.auth-wrapper {
    width: 100%; max-width: 440px; display: flex; flex-direction: column;
    align-items: center; gap: 1.5rem; margin: auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); padding: 2.5rem; border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid rgba(255,255,255,0.8);
    width: 100%; animation: dashboardEntry 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.auth-header-logo { text-align: center; margin-bottom: 2rem; }
.logo-container { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { height: 42px; width: auto; border-radius: 8px; }
.brand-name { font-size: 1.5rem; font-weight: 800; color: var(--text-main); letter-spacing: -0.02em; }

.auth-tabs-container { background: rgba(0,0,0,0.04); padding: 4px; border-radius: 12px; margin-bottom: 2rem; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.auth-tab {
    background: transparent; border: none; padding: 10px; font-size: 0.95rem;
    font-weight: 600; color: var(--text-muted); border-radius: 8px;
    cursor: pointer; transition: all 0.2s;
}
.auth-tab.active { background: white; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.form-intro { text-align: center; margin-bottom: 1.5rem; }
.form-intro h2 { margin: 0 0 0.5rem 0; font-size: 1.5rem; font-weight: 700; }
.form-intro p { margin: 0; color: var(--text-muted); }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }
.label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.link-sm { font-size: 0.85rem; color: var(--primary); text-decoration: none; font-weight: 500; }

.input-wrapper { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9ca3af; }
.input-control {
    width: 100%; padding: 12px 16px; border: 1px solid #e2e8f0; border-radius: 10px;
    font-size: 0.95rem; transition: all 0.2s; background: rgba(255,255,255,0.9);
}
.input-control.with-icon { padding-left: 42px; }
.input-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-subtle); background: white; }

.btn-full { width: 100%; padding: 12px; border-radius: 10px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 16px; font-weight: 600; text-decoration: none; }
.btn-ghost:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

.auth-divider { text-align: center; margin: 1.5rem 0; position: relative; }
.auth-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: #e2e8f0; }
.auth-divider span { background: white; padding: 0 10px; font-size: 0.75rem; color: #94a3b8; font-weight: 600; position: relative; z-index: 1; }

.social-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; font-size: 0.9rem; color: var(--text-muted); }
.auth-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.copyright-text { text-align: center; color: #94a3b8; font-size: 0.8rem; margin-top: 1rem; }
.demo-badge { background: #fef3c7; color: #d97706; padding: 10px; border-radius: 8px; font-size: 0.85rem; text-align: center; margin-top: 1rem; border: 1px solid #fde68a; }

.error-banner {
    background: #fef2f2; border: 1px solid #fee2e2; color: #ef4444;
    padding: 12px; border-radius: 8px; margin-bottom: 1.5rem;
    display: flex; align-items: center; gap: 8px; font-size: 0.9rem;
}


/* =========================================
   3. DASHBOARD STYLES
   ========================================= */

.app-layout {
    display: flex; height: 100vh; width: 100vw;
    background: rgba(248, 250, 252, 0.85); 
    backdrop-filter: blur(60px); overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px; background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    color: var(--text-sidebar); display: flex; flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.05); flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 50;
}

.sidebar-header {
    height: var(--header-height); display: flex; align-items: center;
    justify-content: space-between; padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: #ffffff; color: var(--text-main);
}

.brand-item { display: flex; align-items: center; gap: 12px; }
.sidebar-logo { height: 36px; width: auto; border-radius: 4px; }

.sidebar-nav { flex: 1; padding: 2rem 1rem; overflow-y: auto; }
.nav-section { margin-bottom: 2rem; }
.nav-label {
    text-transform: uppercase; font-size: 0.7rem; font-weight: 800;
    letter-spacing: 0.1em; color: #475569; margin-bottom: 0.8rem; padding-left: 1rem;
}

.nav-item {
    display: flex; align-items: center; width: 100%; padding: 0.75rem 1rem;
    background: transparent; border: 1px solid transparent; color: var(--text-sidebar);
    cursor: pointer; border-radius: 10px; font-size: 0.9rem; font-weight: 500;
    transition: all 0.25s ease; text-align: left; gap: 12px; margin-bottom: 4px;
    position: relative; overflow: hidden;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-sidebar-hover); padding-left: 1.25rem; }
.nav-item.active {
    background: rgba(79, 70, 229, 0.15); color: #818cf8;
    border: 1px solid rgba(79, 70, 229, 0.3); font-weight: 600;
}
.nav-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    height: 50%; width: 3px; background: #818cf8; border-radius: 0 4px 4px 0;
    box-shadow: 0 0 8px #818cf8;
}

.user-profile-section {
    padding: 1rem; margin: 1rem; border-radius: 12px;
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    display: flex; align-items: center; gap: 12px; transition: background 0.2s;
}
.user-profile-section:hover { background: rgba(255,255,255,0.06); }
.user-avatar {
    width: 36px; height: 36px; background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white; border-radius: 8px; display: flex; align-items: center;
    justify-content: center; font-weight: 700; font-size: 0.95rem;
}
.user-info { flex: 1; overflow: hidden; }
.user-name { color: white; font-weight: 600; font-size: 0.9rem; }
.user-plan { font-size: 0.75rem; color: #94a3b8; }
.logout-btn { background: transparent; border: none; color: #64748b; cursor: pointer; padding: 6px; transition: color 0.2s; }
.logout-btn:hover { color: #ef4444; }

/* Main Content Area */
.main-content {
    flex: 1; display: flex; flex-direction: column; background: transparent; 
    position: relative; overflow: hidden; height: 100vh;
}

/* Top Bar */
.top-bar {
    height: var(--header-height); background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem; flex-shrink: 0; z-index: 40;
}
.top-bar-left, .top-bar-right { display: flex; align-items: center; gap: 1rem; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.crumb-muted { color: var(--text-muted); }
.crumb-sep { color: var(--border); }
.crumb-active { color: var(--text-main); font-weight: 600; background: rgba(0,0,0,0.04); padding: 4px 10px; border-radius: 6px; }

/* Shared Buttons (Used in both Dashboard & Landing) */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap; border: 1px solid transparent; text-decoration: none;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4); }
.btn-outline { background: rgba(255,255,255,0.8); border-color: var(--border); color: var(--text-main); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: white; border-color: #cbd5e1; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-block { width: 100%; }
.btn-lg { padding: 0.85rem 1rem; font-size: 1rem; }
.icon-btn { background: transparent; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: 8px; border-radius: 50%; transition: all 0.2s; }
.icon-btn:hover { background: rgba(0,0,0,0.05); color: var(--text-main); }

/* Workspace Grid */
.workspace { display: flex; flex: 1; overflow: hidden; position: relative; }

/* Config Panel */
.config-panel {
    width: 340px; background: rgba(255,255,255,0.6); 
    border-right: 1px solid var(--border); display: flex; flex-direction: column;
    flex-shrink: 0; z-index: 40; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.config-scroll-area { flex: 1; overflow-y: auto; padding: 2rem 1.5rem; }
.config-section { margin-bottom: 2.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.04); }
.config-section:last-child { border-bottom: none; }
.config-heading {
    font-size: 0.75rem; text-transform: uppercase; color: var(--primary);
    font-weight: 800; letter-spacing: 0.05em; margin: 0 0 1.25rem 0;
    display: flex; align-items: center; gap: 8px;
}
.label-sm { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 0.5rem; }

/* Modern Inputs */
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 0.8rem 1rem; border: 1px solid rgba(200, 200, 200, 0.5);
    border-radius: 8px; font-size: 0.9rem; font-family: inherit; color: var(--text-main);
    background: rgba(255, 255, 255, 0.8); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}
.form-input:hover, .form-select:hover, .form-textarea:hover { background: white; border-color: #94a3b8; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary); background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15); transform: translateY(-1px);
}
.form-textarea { min-height: 140px; resize: vertical; line-height: 1.6; }

.select-wrapper { position: relative; }
.form-select { appearance: none; padding-right: 2.5rem; cursor: pointer; }
.select-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; font-size: 0.75rem; color: var(--text-muted); }

.form-group { margin-bottom: 1.25rem; }
.form-group.disabled { opacity: 0.5; pointer-events: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.config-footer { padding: 1.5rem; border-top: 1px solid var(--border); background: rgba(255,255,255,0.8); backdrop-filter: blur(5px); }

/* Editor Area */
.editor-area { flex: 1; display: flex; flex-direction: column; background: transparent; position: relative; overflow: hidden; }
.editor-toolbar {
    height: 56px; background: rgba(255, 255, 255, 0.6); border-bottom: 1px solid rgba(0,0,0,0.03);
    display: flex; align-items: center; padding: 0 1rem; gap: 0.5rem; justify-content: center; z-index: 10;
}
.toolbar-group { display: flex; gap: 0.5rem; background: white; padding: 4px; border-radius: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.tool-btn {
    background: transparent; border: none; color: #4b5563; padding: 6px 12px;
    border-radius: 6px; font-size: 0.85rem; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.tool-btn:hover { background: #f3f4f6; color: var(--text-main); }
.tool-btn.primary-text { color: var(--primary); font-weight: 700; background: white; box-shadow: var(--shadow-sm); border: 1px solid rgba(79, 70, 229, 0.2); }
.tool-btn.primary-text:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); color: var(--primary-hover); }

.paper-container { flex: 1; overflow-y: auto; padding: 3rem; display: flex; justify-content: center; }
.paper {
    width: 100%; max-width: 820px; background: var(--bg-paper); min-height: 1000px;
    box-shadow: var(--shadow-paper); padding: 5rem 6rem; margin-bottom: 4rem;
    border-radius: 4px; position: relative; transition: transform 0.3s ease;
}
.paper-content {
    width: 100%; height: 100%; border: none; resize: none; outline: none;
    font-family: 'Georgia', serif; font-size: 1.15rem; line-height: 1.8;
    color: #1f2937; background: transparent;
}

/* Other Views (History/Templates) */
.view-container { padding: 3rem 4rem; overflow-y: auto; height: 100%; flex: 1; }
.view-header { margin-bottom: 3rem; max-width: 800px; animation: dashboardEntry 0.6s ease-out; }
.view-header h2 { font-size: 2.2rem; margin: 0 0 0.5rem 0; font-weight: 800; letter-spacing: -0.02em; background: -webkit-linear-gradient(0deg, #1e293b, #475569); -webkit-background-clip: text; -webkit-text-fill-color: transparent;}
.view-header p { color: var(--text-muted); font-size: 1.1rem; }

.grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; padding-bottom: 4rem; }
.list-layout { display: flex; flex-direction: column; gap: 1.25rem; max-width: 900px; }

.draft-card { 
    background: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.6);
    backdrop-filter: blur(10px); border-radius: 16px; padding: 1.5rem;
    cursor: pointer; transition: all 0.3s ease; box-shadow: var(--shadow-sm);
}
.draft-card:hover { transform: translateY(-5px) scale(1.01); box-shadow: 0 15px 30px rgba(0,0,0,0.08); border-color: var(--primary-subtle); background: white; }

/* Utilities */
.hidden { display: none !important; }
.mobile-only { display: none !important; }
.desktop-only { display: inline-block !important; }

/* Toast */
.toast {
    position: fixed; bottom: 30px; right: 30px;
    background: rgba(15, 23, 42, 0.9); backdrop-filter: blur(12px);
    color: white; padding: 14px 28px; border-radius: 12px;
    font-size: 0.95rem; font-weight: 500;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 100; opacity: 0; transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; border: 1px solid rgba(255,255,255,0.1);
}

/* Animations */
@keyframes dashboardEntry {
    0% { opacity: 0; transform: scale(0.96) translateY(15px); filter: blur(8px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); box-shadow: 0 0 50px rgba(0,0,0,0.5); }
    .sidebar.open { transform: translateX(0); }
    .mobile-only { display: inline-flex !important; }
    .desktop-only { display: none !important; }
    .paper { padding: 4rem 3rem; }
    
    .mobile-close-btn { background: transparent; border: none; font-size: 1.2rem; color: #64748b; cursor: pointer; }
    
    /* Landing Responsive */
    .nav-links { display: none; }
    .hero-section { grid-template-columns: 1fr; text-align: center; padding-top: 6rem; gap: 2rem; }
    .hero-content { margin: 0 auto; }
    .hero-preview { display: none; }
    .hero-title { font-size: 2.5rem; }
    .hero-cta { justify-content: center; flex-direction: column; }
    .footer-bottom { flex-direction: column; gap: 1rem; }
}

@media (max-width: 768px) {
    .workspace { position: relative; }
    .config-panel {
        position: absolute; top: 0; left: 0; bottom: 0; width: 100%;
        transform: translateX(-100%); z-index: 60; border-right: none;
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px);
    }
    .config-panel.mobile-visible { transform: translateX(0); }
    .panel-header-mobile { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: white; }
    .paper-container { padding: 1rem; }
    .paper { padding: 2.5rem 1.5rem; min-height: 80vh; width: 100%; border-radius: 8px; }
    .top-bar { padding: 0 1rem; }
    .view-container { padding: 2rem 1.5rem; }
}