:root {
    --bg-body: #f3f4f6;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-success: #10b981;
    --accent-success-hover: #059669;
    --text-light: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-btn: 0 4px 14px 0 rgba(0, 118, 255, 0.2);
    --shadow-btn-success: 0 4px 14px 0 rgba(16, 185, 129, 0.2);
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}

.logo-area {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.step-nav { padding: 24px 12px; display: flex; flex-direction: column; gap: 8px;}
.nav-item {
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    display: flex; align-items: center; gap: 10px;
}
.nav-item i { width: 16px; text-align: center; font-size: 14px;}
.nav-item:hover { background: #f9fafb; color: var(--text-main); }
.nav-item.active {
    background: #eff6ff;
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    background-color: var(--bg-body);
}

.top-header {
    padding: 32px 40px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    z-index: 5;
}
.top-header h1 { font-family: var(--font-heading); font-size: 28px; margin-bottom: 8px; font-weight: 700; color: #111827; }
.top-header p { color: var(--text-muted); font-size: 15px;}

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}
.content-area::-webkit-scrollbar { width: 8px; }
.content-area::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

/* Step Views */
.step-view { display: none; animation: fadeIn 0.4s ease forwards; }
.step-view.active-view { display: block; }
@keyframes fadeIn { from{ opacity: 0; transform: translateY(10px); } to{ opacity: 1; transform: translateY(0); } }

/* Upload Zone */
.upload-zone {
    border: 2px dashed #cbd5e1;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 60px 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}
.upload-zone:hover { border-color: var(--accent-primary); background: #f0fdf4; box-shadow: var(--shadow-md); }
.upload-icon { font-size: 48px; color: #94a3b8; margin-bottom: 20px; transition: color 0.3s ease;}
.upload-zone:hover .upload-icon { color: var(--accent-primary); }
.upload-zone h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: #111827;}
.upload-zone p { color: var(--text-muted); font-size: 14px; margin-bottom: 24px;}
.hidden-input { display: none; }

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary { background: var(--accent-primary); color: var(--text-light); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3); transform: translateY(-1px); }
.btn-success { background: var(--accent-success); color: var(--text-light); box-shadow: var(--shadow-btn-success); }
.btn-success:hover { background: var(--accent-success-hover); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3); transform: translateY(-1px); }
.btn-danger { background: #ef4444; color: var(--text-light); box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.2); }
.btn-danger:hover { background: #dc2626; box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3); transform: translateY(-1px); }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 12px;}

/* Data Form */
.data-preview {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}
.data-preview h3 { font-family: var(--font-heading); font-size: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 12px; color: #111827;}
.data-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px;}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.full-w { grid-column: 1 / -1; margin-bottom: 20px;}
.form-group label { font-size: 13px; color: var(--text-muted); font-weight: 600;}
.sleek-input {
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.3s ease;
    outline: none;
}
.sleek-input:focus { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); background: #ffffff; }
textarea.sleek-input { resize: vertical; }
.rows-3 { min-height: 80px; }
.rows-5 { min-height: 120px; }
.w-100 { width: 100%; }

/* Utils */
.actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
    gap: 16px;
}
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-0 { margin-bottom: 0px !important; }
.flex-grow { flex-grow: 1; }
.d-inline-block { display: inline-block; }

.hidden { display: none !important; }
.text-accent { color: var(--accent-primary); }
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Dashboard Generator Panel */
.generator-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-card);
}
.panel-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px;}
.panel-header i { color: #f59e0b; font-size: 24px;}
.panel-header h3 { font-family: var(--font-heading); font-size: 22px; color: #111827;}
.generator-panel p { color: var(--text-muted); margin-bottom: 20px; font-size: 15px;}

.prompt-box {
    position: relative;
    background: #1f2937;
    border-radius: 8px;
    border: 1px solid #374151;
}
.code-textarea {
    width: 100%;
    min-height: 150px;
    background: transparent;
    border: none;
    color: #a78bfa;
    padding: 16px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    resize: none;
}
.code-textarea.small-h { min-height: 100px; }
.copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex; gap: 6px; align-items: center;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); }

/* Dashboard Themes Grid */
.dashboard-header { display: flex; flex-direction: column; gap: 8px; margin-bottom: 32px;}
.dashboard-header h3 { font-family: var(--font-heading); font-size: 22px;}
.progress-bar-container { background: #e2e8f0; height: 8px; border-radius: 4px; overflow: hidden; width: 100%;}
.progress-bar { background: linear-gradient(90deg, var(--accent-primary), var(--accent-success)); height: 100%; transition: width 0.5s ease;}
#progress-text { font-size: 13px; color: var(--text-muted); font-weight: 500;}

.themes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.theme-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}
.theme-card:hover { border-color: #cbd5e1; transform: translateY(-4px); box-shadow: var(--shadow-card);}
.t-header { display: flex; justify-content: space-between; align-items: flex-start;}
.t-badge { background: #f1f5f9; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #475569; letter-spacing: 0.5px;}
.t-status { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; }
.t-status.in-progress { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.t-status.done { background: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.4); }
.t-title { font-size: 16px; font-weight: 600; line-height: 1.4; color: #1e293b;}
.t-actions { margin-top: auto; display: flex; gap: 8px;}

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 100; opacity: 0; transition: opacity 0.3s;
}
.modal-overlay.show { display: flex; opacity: 1;}
.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 90%; max-width: 650px;
    padding: 32px; position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.1);
    transform: scale(0.95); transition: transform 0.3s;
}
.modal-overlay.show .modal-content { transform: scale(1); }
.close-modal { position: absolute; top: 20px; right: 24px; font-size: 28px; color: var(--text-muted); cursor: pointer; transition: color 0.2s;}
.close-modal:hover { color: #111827; }
.modal-content h2 { margin-bottom: 24px; font-family: var(--font-heading); font-size: 24px; color: #111827;}

.tabs { display: flex; border-bottom: 1px solid var(--border-color); margin-bottom: 24px;}
.tab-btn { background: none; border: none; color: var(--text-muted); padding: 12px 24px; font-size: 14px; font-family: var(--font-body); cursor: pointer; border-bottom: 2px solid transparent; display: flex; gap: 8px; align-items: center;}
.tab-btn.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); font-weight: 600;}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

/* Checkbox */
.custom-checkbox { display: flex; align-items: center; position: relative; padding-left: 32px; cursor: pointer; font-size: 14px; user-select: none; color: var(--text-main); font-weight: 500;}
.custom-checkbox input { position: absolute; opacity: 0; cursor: pointer; height: 0; width: 0;}
.checkmark { position: absolute; top: 0; left: 0; height: 20px; width: 20px; background-color: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 4px; transition: all 0.2s;}
.custom-checkbox:hover input ~ .checkmark { background-color: #e2e8f0;}
.custom-checkbox input:checked ~ .checkmark { background-color: var(--accent-success); border-color: var(--accent-success);}
.checkmark:after { content: ""; position: absolute; display: none;}
.custom-checkbox input:checked ~ .checkmark:after { display: block;}
.custom-checkbox .checkmark:after { left: 6px; top: 2px; width: 5px; height: 10px; border: solid white; border-width: 0 2px 2px 0; transform: rotate(45deg);}

/* Evals blocks */
.eval-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin-top: 16px; box-shadow: var(--shadow-sm);}
.eval-block h4 { margin-bottom: 8px; color: #1e293b;}