/* ── Fuse-style Admin Theme ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Outlined');

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

:root {
    --bg: #111827;
    --sidebar-bg: #1e293b;
    --surface: #1e293b;
    --surface-raised: #273349;
    --surface-hover: #334155;
    --border: rgba(148, 163, 184, 0.08);
    --border-light: rgba(148, 163, 184, 0.12);
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-hint: #64748b;
    --primary: #818cf8;
    --primary-solid: #6366f1;
    --primary-bg: rgba(99, 102, 241, 0.12);
    --primary-bg-hover: rgba(99, 102, 241, 0.2);
    --accent: #38bdf8;
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.12);
    --error: #f87171;
    --error-bg: rgba(248, 113, 113, 0.12);
    --ai-cell: rgba(99, 102, 241, 0.06);
    --edited-cell: rgba(52, 211, 153, 0.06);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.2);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    --transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: width 0.25s ease, min-width 0.25s ease;
    overflow: hidden;
}

/* Collapsed sidebar - icons only */
.sidebar.collapsed {
    width: 64px;
    min-width: 64px;
}

.sidebar.collapsed .sidebar-brand h1,
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .nav-item span:not(.nav-icon):not(.material-icons-outlined),
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-nav-label,
.sidebar.collapsed .sidebar-footer label,
.sidebar.collapsed .api-key-row,
.sidebar.collapsed .api-status {
    opacity: 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

.sidebar.collapsed .sidebar-brand {
    padding: 18px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar.collapsed .sidebar-nav {
    padding: 16px 8px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 10px;
    gap: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 12px 8px;
}

.sidebar-brand {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand h1 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text);
}

.sidebar-brand span {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-hint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 2px;
    display: block;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-hint);
    padding: 8px 12px 6px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: 2px;
    user-select: none;
}

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-item.done .nav-icon {
    color: var(--success);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
    opacity: 0.7;
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--primary-bg);
    color: var(--primary);
}

/* Sidebar API key section */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.api-key-section label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-hint);
    margin-bottom: 8px;
    display: block;
}

.api-key-row {
    display: flex;
    gap: 6px;
}

.api-key-row input {
    flex: 1;
    font-size: 12px;
    padding: 7px 10px;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.api-status {
    font-size: 11px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.api-status.ok { color: var(--success); }
.api-status.missing { color: var(--warning); }

/* ── Main Content ────────────────────────────────────────── */
.main {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

.sidebar.collapsed ~ .main {
    margin-left: 64px;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    min-height: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.topbar-breadcrumb span { color: var(--text-hint); }

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Page Content ────────────────────────────────────────── */
.page-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* When generate step is active, lock page and let table fill space */
.page-content.spreadsheet-mode {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 16px;
}

/* ── Cards (Fuse Material elevation style) ───────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-flat {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

/* ── Upload Zone ─────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius);
    padding: 64px 48px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.upload-icon .material-icons-outlined {
    font-size: 28px;
    color: var(--primary);
}

.upload-zone h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.upload-zone p {
    font-size: 13px;
    color: var(--text-hint);
    margin-top: 4px;
}

.upload-zone .browse-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
}

/* ── Buttons (Material/Fuse style) ───────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn .material-icons-outlined { font-size: 18px; }

.btn-primary {
    background: var(--primary-solid);
    color: white;
    box-shadow: 0 1px 3px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: var(--text-hint);
}

.btn-flat {
    background: transparent;
    color: var(--text-secondary);
    padding: 0 12px;
}

.btn-flat:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.btn-danger {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }

.btn-success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-icon {
    width: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

.btn-icon.btn-sm { width: 32px; height: 32px; }

/* ── Forms (Material floating style) ─────────────────────── */
.form-field {
    margin-bottom: 16px;
}

.form-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-hint);
    margin-bottom: 6px;
    display: block;
}

input, select, textarea {
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    width: 100%;
    transition: all var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
}

input::placeholder, textarea::placeholder {
    color: var(--text-hint);
}

textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

label {
    font-size: 12px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

/* ── Source Column Tags ──────────────────────────────────── */
.source-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.source-col-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-secondary);
}

.source-col-tag:hover {
    border-color: var(--text-hint);
    color: var(--text);
}

.source-col-tag.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
    color: var(--primary);
}

.source-col-tag input { display: none; }

/* ── Output Column Config ────────────────────────────────── */
.output-column {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    transition: border-color var(--transition);
}

.output-column:hover { border-color: var(--border-light); }

.output-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.output-column-header strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    margin-bottom: 16px;
}

.example-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    margin-bottom: 12px;
    align-items: start;
}

/* ── Marketplace Presets ─────────────────────────────────── */
.preset-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}

.preset-bar-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-hint);
    margin-right: 4px;
}

.preset-chip {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: var(--bg);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.preset-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.preset-chip.active {
    background: var(--primary-solid);
    color: white;
    border-color: var(--primary-solid);
}

/* ── Progress ────────────────────────────────────────────── */
.progress-bar {
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    overflow: hidden;
    margin: 16px 0 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-solid), var(--accent));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ── Compact Toolbar (progress + search + actions) ───────── */
.toolbar-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    gap: 12px;
    flex-shrink: 0;
}

.progress-inline {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.progress-bar-inline {
    width: 120px;
    height: 4px;
    background: var(--bg);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-bar-inline .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-solid), var(--accent));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

/* ── Toolbar ─────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    gap: 12px;
}

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

.toolbar-search {
    position: relative;
}

.toolbar-search .material-icons-outlined {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-hint);
}

.toolbar-search input {
    padding-left: 38px;
    max-width: 280px;
    height: 36px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.toolbar-search input:focus {
    border-color: var(--primary);
    background: var(--bg);
}

/* ── Spreadsheet (Handsontable overrides) ────────────────── */
#spreadsheet {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: var(--shadow);
}

/* Force dark theme on ALL handsontable elements */
.handsontable,
.handsontable table,
.handsontable tbody,
.handsontable thead,
.handsontable tr,
.handsontable th,
.handsontable td,
.handsontable .wtHolder,
.handsontable .wtHider,
.handsontable .ht_master,
.handsontable .ht_master .wtHolder,
.handsontable .ht_clone_top,
.handsontable .ht_clone_left,
.handsontable .ht_clone_top_left_corner {
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
}

.handsontable {
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
}

/* Column headers - source vs output distinction */
.handsontable th {
    background: #1e293b !important;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-color: rgba(148, 163, 184, 0.1) !important;
    padding: 4px 8px !important;
    height: 26px !important;
}

/* AI output column headers - highlighted */
.handsontable th.ai-col-header {
    background: #1e1b4b !important;
    color: #a5b4fc !important;
    border-bottom: 2px solid #6366f1 !important;
}

/* Row headers */
.handsontable th.ht__highlight,
.handsontable .ht_clone_left th {
    background: #1e293b !important;
    color: #64748b !important;
}

/* Source columns - muted, read-only look */
.handsontable td {
    background: #0f172a !important;
    border-color: rgba(148, 163, 184, 0.08) !important;
    color: #cbd5e1 !important;
    padding: 2px 8px !important;
    line-height: 1.2 !important;
    height: 23px !important;
}

.handsontable td.source-col {
    background: #0c1322 !important;
    color: #94a3b8 !important;
}

/* AI output columns - brighter, clearly distinct */
.handsontable td.output-col {
    background: #111936 !important;
    color: #e2e8f0 !important;
    border-left-color: rgba(99, 102, 241, 0.15) !important;
}

/* AI-generated cell - filled by AI */
.handsontable td.ai-generated {
    background: #1a1647 !important;
    color: #e0e7ff !important;
    border-left: 3px solid #6366f1 !important;
}

/* User manually edited */
.handsontable td.user-edited {
    background: #0d2818 !important;
    color: #d1fae5 !important;
    border-left: 3px solid #34d399 !important;
}

/* Error cell */
.handsontable td.error-cell {
    background: #2d0f0f !important;
    color: #fca5a5 !important;
    border-left: 3px solid #f87171 !important;
}

/* Empty output cell waiting for AI */
.handsontable td.output-col-empty {
    background: #0f172a !important;
    color: #475569 !important;
}

.handsontable .htDimmed { color: #64748b !important; }

/* Hover row */
.handsontable tr:hover td {
    filter: brightness(1.15) !important;
}

/* Selected cell */
.handsontable td.current,
.handsontable td.area {
    background: #1e3a5f !important;
}

.handsontable .wtBorder {
    background-color: #818cf8 !important;
}

/* Scrollbar styling */
.handsontable .wtHolder::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.handsontable .wtHolder::-webkit-scrollbar-track {
    background: #0f172a;
}

.handsontable .wtHolder::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.handsontable .wtHolder::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Divider line between source and output columns */
.handsontable td.output-col-first {
    border-left: 2px solid rgba(99, 102, 241, 0.4) !important;
}

.handsontable th.ai-col-header-first {
    border-left: 2px solid rgba(99, 102, 241, 0.4) !important;
}

/* ── Status Badge ────────────────────────────────────────── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-badge.running {
    background: var(--primary-bg);
    color: var(--primary);
}

.status-badge.complete {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.error {
    background: var(--error-bg);
    color: var(--error);
}

/* Pulsing dot for running */
.status-badge.running::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ── Legend ───────────────────────────────────────────────── */
.legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--text-hint);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid var(--border);
}

/* ── File Info Bar ───────────────────────────────────────── */
.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.file-info-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-info-icon .material-icons-outlined {
    font-size: 20px;
    color: var(--primary);
}

.file-info .name {
    font-weight: 600;
    font-size: 14px;
}

.file-info .meta {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 1px;
}

/* ── Section visibility ──────────────────────────────────── */
.section { display: none; }
.section.active { display: block; }

/* Step 3 fills all available space */
#step-3.active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

#step-3 #spreadsheet {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* ── Action Footer ───────────────────────────────────────── */
.action-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 8px;
}

/* ── Animations ──────────────────────────────────────────── */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { width: 64px; min-width: 64px; }
    .sidebar-brand span, .nav-item span, .nav-badge,
    .sidebar-nav-label, .sidebar-footer label, .api-key-row { display: none; }
    .sidebar-brand h1 { font-size: 0; }
    .sidebar-brand h1::first-letter { font-size: 16px; }
    .nav-item { justify-content: center; padding: 12px; }
    .main { margin-left: 64px; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .example-row { grid-template-columns: 1fr; }
    .toolbar { flex-wrap: wrap; }
    .page-content { padding: 16px; }
}
