/* Snovasys Automation Board — Marketing Hub Style */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #7c3aed;
    --primary-light: #ede9fe;
    --primary-dark: #5b21b6;
    --bg: #f8f7fc;
    --sidebar-bg: #faf9fe;
    --white: #ffffff;
    --border: #e8e5f0;
    --text: #1e1b2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --orange: #f97316;
    --blue: #3b82f6;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --sidebar-width: 240px;
    --stats-width: 280px;
    --filter-width: 220px;
}

html, body { height: 100%; }
body {
    font-family: var(--font);
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 500; font-family: var(--font);
    border: 1px solid transparent; cursor: pointer; transition: all 0.15s;
    white-space: nowrap;
}
.btn:hover { opacity: 0.9; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-ghost { background: none; border: none; color: var(--text-secondary); padding: 4px 8px; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-light); }

/* ── Forms ────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
input[type="text"], input[type="date"], input[type="email"], input[type="password"],
textarea, select {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: 13px; font-family: var(--font);
    background: var(--white); color: var(--text); transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light);
}
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }

/* ── Setup / Login ────────────────────────────────────── */
.setup-wrapper {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: var(--bg);
}
.setup-card {
    background: var(--white); border-radius: 12px; padding: 40px;
    box-shadow: var(--shadow); max-width: 440px; width: 100%;
}
.setup-header { text-align: center; margin-bottom: 28px; }
.setup-header h2 { margin-top: 12px; font-size: 22px; }
.app-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 18px;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ── App Layout ───────────────────────────────────────── */
#app-view {
    display: flex; height: 100vh; overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width); background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
    overflow-y: auto;
}
.sidebar-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
}
.app-icon-sm {
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--text); }
.sidebar-subtitle { font-size: 11px; color: var(--text-muted); }

.sidebar-section { padding: 12px 0; }
.sidebar-section-title {
    padding: 0 16px 6px; font-size: 10px; font-weight: 700;
    letter-spacing: 0.05em; color: var(--text-muted);
}
.sidebar-link {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 16px; font-size: 13px; color: var(--text-secondary);
    border-left: 3px solid transparent; transition: all 0.12s;
    text-decoration: none;
}
.sidebar-link:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }
.sidebar-link.active {
    background: #ddd6fe; color: var(--primary-dark);
    border-left: 4px solid var(--primary); font-weight: 700;
}
.sidebar-link .sidebar-icon { font-size: 14px; width: 18px; text-align: center; }
.sidebar-link .badge-count {
    margin-left: auto; background: var(--border); color: var(--text-secondary);
    font-size: 11px; padding: 0 6px; border-radius: 10px; font-weight: 600;
}
.sidebar-link.active .badge-count { background: var(--primary); color: #fff; }
.sidebar-link .dept-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto; padding: 12px 16px; border-top: 1px solid var(--border);
}
.user-pill {
    font-size: 12px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
}
.user-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--primary); color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* ── Main Wrapper ─────────────────────────────────────── */
.main-wrapper {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
    min-width: 0;
}

/* ── Top Bar ──────────────────────────────────────────── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; background: var(--white);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.page-title { font-size: 18px; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-stats { display: flex; gap: 12px; font-size: 12px; }
.stat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.stat-item { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-secondary); }

/* ── Tab Bar ──────────────────────────────────────────── */
.tab-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 24px; background: var(--white);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.tab-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.tab-pill {
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; border: 1px solid var(--border);
    color: var(--text-secondary); background: var(--white);
}
.tab-pill:hover { border-color: var(--primary); color: var(--primary); }
.tab-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.tab-pill .pill-count { font-weight: 700; margin-left: 2px; }
.tab-actions { display: flex; gap: 8px; }

/* ── Content Layout ───────────────────────────────────── */
.content-layout {
    display: flex; flex: 1; overflow: hidden;
}

/* ── Filter Panel ─────────────────────────────────────── */
.filter-panel {
    width: var(--filter-width); background: var(--white);
    border-right: 1px solid var(--border);
    overflow-y: auto; flex-shrink: 0; padding: 14px;
}
.filter-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    color: var(--text-muted); margin-bottom: 14px;
}
.filter-collapse { cursor: pointer; font-size: 10px; }
.filter-section { margin-bottom: 16px; }
.filter-section-title {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    margin-bottom: 8px; text-transform: uppercase;
}
.filter-item {
    display: flex; align-items: center; gap: 6px;
    padding: 3px 0; font-size: 12px; color: var(--text-secondary);
    cursor: pointer;
}
.filter-item:hover { color: var(--primary); }
.filter-item input[type="checkbox"] {
    width: 14px; height: 14px; accent-color: var(--primary);
}
.filter-item .filter-count {
    margin-left: auto; font-size: 11px; color: var(--text-muted);
}

/* ── Content Main ─────────────────────────────────────── */
.content-main {
    flex: 1; overflow-y: auto; padding: 16px 20px; min-width: 0;
}

/* ── Task List Table ──────────────────────────────────── */
.list-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px; font-size: 12px;
}
.list-header-title {
    font-weight: 700; color: var(--text-secondary); text-transform: uppercase;
    font-size: 11px;
}
.task-table { width: 100%; border-collapse: collapse; }
.task-table th {
    text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg);
}
.task-table td {
    padding: 10px 10px; border-bottom: 1px solid var(--border);
    font-size: 13px; vertical-align: middle;
}
.task-table tr { transition: background 0.1s; }
.task-table tr:hover { background: var(--primary-light); cursor: pointer; }

.task-title-cell { display: flex; align-items: flex-start; gap: 8px; }
.task-type-icon {
    width: 22px; height: 22px; border-radius: var(--radius-sm);
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.task-title-text { font-weight: 500; }
.task-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

/* Stage / Status Dropdown */
.stage-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: var(--radius-sm); font-size: 11px;
    font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.stage-badge.New { background: #dbeafe; color: #1d4ed8; }
.stage-badge.InProgress { background: #fef3c7; color: #b45309; }
.stage-badge.Done { background: #d1fae5; color: #065f46; }
.stage-badge.Todo { background: #f3e8ff; color: #7c3aed; }
.stage-badge.Review { background: #fce7f3; color: #be185d; }
.stage-badge.Urgent { background: #fee2e2; color: #dc2626; }

/* Assigned User */
.assigned-user {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--text-secondary);
}
.assigned-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--primary-light); color: var(--primary);
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* Priority indicators */
.priority-dot {
    width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.priority-dot.Urgent { background: var(--danger); }
.priority-dot.High { background: var(--orange); }
.priority-dot.Medium { background: var(--warning); }
.priority-dot.Low { background: var(--success); }

/* ── Stats Panel ──────────────────────────────────────── */
.stats-panel {
    width: var(--stats-width); background: var(--white);
    border-left: 1px solid var(--border);
    overflow-y: auto; flex-shrink: 0; padding: 14px;
}
.stats-header {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 14px; font-weight: 700; margin-bottom: 12px;
}
.stats-collapse { cursor: pointer; font-size: 10px; color: var(--text-muted); }
.stats-tabs {
    display: flex; border-bottom: 2px solid var(--border); margin-bottom: 14px;
}
.stats-tab {
    padding: 6px 14px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
    color: var(--text-muted); background: none; border: none; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.stats-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.stats-person {
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.stats-person-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
}
.stats-person-name { font-size: 13px; font-weight: 600; }
.stats-person-hours { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.stats-person-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.stats-tag {
    font-size: 10px; display: flex; align-items: center; gap: 3px; color: var(--text-muted);
}
.stats-tag .tag-dot { width: 6px; height: 6px; border-radius: 50%; }
.stats-bar {
    height: 6px; border-radius: 3px; background: var(--border); overflow: hidden;
}
.stats-bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }

/* Stat bar colors per person (cycle) */
.bar-green { background: var(--success); }
.bar-orange { background: var(--orange); }
.bar-blue { background: var(--blue); }
.bar-purple { background: var(--primary); }
.bar-warning { background: var(--warning); }
.bar-danger { background: var(--danger); }

/* ── Discussion List ──────────────────────────────────── */
.disc-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 8px;
    cursor: pointer; transition: box-shadow 0.12s;
}
.disc-card:hover { box-shadow: var(--shadow); }
.disc-card.pinned { border-left: 3px solid var(--primary); }
.disc-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.disc-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; }
.disc-badge {
    display: inline-block; padding: 1px 8px; border-radius: 10px;
    font-size: 10px; font-weight: 600; background: var(--primary-light); color: var(--primary);
}

/* ── Discussion Detail / Replies ──────────────────────── */
.reply-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.reply-item {
    background: var(--bg); border-radius: var(--radius);
    padding: 10px 14px; border-left: 3px solid var(--border);
}
.reply-author { font-weight: 600; font-size: 12px; }
.reply-date { font-size: 11px; color: var(--text-muted); margin-left: 8px; }
.reply-content { margin-top: 4px; font-size: 13px; }

/* ── AI Chat ──────────────────────────────────────────── */
.ai-container { max-width: 800px; }
.ai-messages {
    min-height: 350px; max-height: 500px; overflow-y: auto;
    padding: 16px; background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--border); margin-bottom: 12px;
}
.ai-msg {
    margin-bottom: 12px; padding: 10px 14px; border-radius: 12px;
    max-width: 80%; font-size: 13px; line-height: 1.6; white-space: pre-wrap;
}
.ai-msg.user {
    background: var(--primary); color: #fff;
    margin-left: auto; border-bottom-right-radius: 4px;
}
.ai-msg.assistant {
    background: var(--bg); border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.ai-input-row { display: flex; gap: 8px; }
.ai-input-row input { flex: 1; }

/* ── Slide Panel (Task Detail) ────────────────────────── */
.slide-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3);
    z-index: 900; opacity: 0; transition: opacity 0.25s;
}
.slide-overlay.open { opacity: 1; }

.slide-panel {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 56%; min-width: 600px; max-width: 860px;
    background: var(--white); z-index: 950;
    box-shadow: -8px 0 30px rgba(0,0,0,0.12);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.slide-panel.open { transform: translateX(0); }

.slide-panel-header {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 20px 24px 16px; border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.slide-panel-header .panel-title-area { flex: 1; min-width: 0; }
.slide-panel-header .panel-title {
    font-size: 17px; font-weight: 700; line-height: 1.3;
    margin-bottom: 4px;
}
.slide-panel-header .panel-meta {
    font-size: 11px; color: var(--text-muted);
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.slide-panel-close {
    width: 32px; height: 32px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--text-muted); cursor: pointer;
    border: 1px solid var(--border); background: none; flex-shrink: 0;
    transition: all 0.12s;
}
.slide-panel-close:hover { background: var(--bg); color: var(--text); }

.slide-panel-body {
    display: flex; flex: 1; overflow: hidden;
}

/* Vertical Tabs */
.panel-vtabs {
    width: 52px; background: var(--bg);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 0; gap: 2px; flex-shrink: 0;
}
.panel-vtab {
    width: 40px; height: 40px; border-radius: 8px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: 16px; cursor: pointer; color: var(--text-muted);
    border: none; background: none; transition: all 0.12s;
    position: relative;
}
.panel-vtab .vtab-label {
    font-size: 8px; font-weight: 600; letter-spacing: 0.02em;
    margin-top: 1px; text-transform: uppercase;
}
.panel-vtab:hover { background: var(--primary-light); color: var(--primary); }
.panel-vtab.active {
    background: var(--primary); color: #fff; border-radius: 8px;
}
.panel-vtab .vtab-badge {
    position: absolute; top: 2px; right: 2px;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--danger); color: #fff;
    font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}

/* Tab Content */
.panel-tab-content {
    flex: 1; overflow-y: auto; padding: 20px 24px;
}

/* Detail Fields */
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px;
}
.detail-field label {
    display: block; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.03em; margin-bottom: 4px;
}
.detail-field select, .detail-field input {
    width: 100%; padding: 7px 10px; border: 1px solid var(--border);
    border-radius: 6px; font-size: 13px; font-family: var(--font);
    background: var(--bg); transition: border-color 0.15s;
}
.detail-field select:focus, .detail-field input:focus {
    border-color: var(--primary); background: var(--white);
    outline: none; box-shadow: 0 0 0 2px var(--primary-light);
}

.detail-section {
    margin-bottom: 20px;
}
.detail-section-title {
    font-size: 12px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.04em;
    margin-bottom: 10px; padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* Time entry row */
.time-entry {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: var(--bg); border-radius: 6px;
    margin-bottom: 6px; font-size: 12px;
}
.time-entry .time-hours {
    font-weight: 700; color: var(--primary); font-size: 14px;
    min-width: 40px;
}
.time-entry .time-user { font-weight: 600; }
.time-entry .time-date { color: var(--text-muted); }
.time-entry .time-notes { color: var(--text-secondary); font-style: italic; }

/* Time log form */
.time-log-form {
    display: grid; grid-template-columns: 80px 130px 1fr auto;
    gap: 8px; align-items: end; margin-top: 12px;
    padding: 12px; background: var(--bg); border-radius: 8px;
}
.time-log-form .form-group { margin-bottom: 0; }
.time-log-form label { font-size: 10px; }
.time-log-form input { padding: 6px 8px; font-size: 12px; margin: 0; }

/* Progress bar in panel */
.time-progress {
    margin: 12px 0; padding: 12px; background: var(--bg);
    border-radius: 8px; display: flex; align-items: center; gap: 12px;
}
.time-progress-bar {
    flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden;
}
.time-progress-fill {
    height: 100%; border-radius: 4px; background: var(--primary);
    transition: width 0.3s;
}
.time-progress-label { font-size: 13px; font-weight: 700; color: var(--primary); white-space: nowrap; }

/* Comment in panel */
.panel-comment {
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.panel-comment:last-child { border-bottom: none; }
.panel-comment-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.panel-comment-author { font-weight: 600; font-size: 12px; }
.panel-comment-date { font-size: 11px; color: var(--text-muted); }
.panel-comment-body { font-size: 13px; line-height: 1.5; }

.comment-input-row {
    display: flex; gap: 8px; margin-top: 12px;
    padding-top: 12px; border-top: 1px solid var(--border);
}
.comment-input-row input { flex: 1; padding: 8px 12px; }

/* ── Modal ────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1000; display: flex; align-items: center; justify-content: center;
}
.modal-content {
    background: var(--white); border-radius: 12px; padding: 24px;
    max-width: 560px; width: 95%; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal-content h3 { font-size: 16px; margin-bottom: 0; }
.modal-close {
    font-size: 20px; color: var(--text-muted); text-decoration: none;
    line-height: 1;
}
.modal-close:hover { color: var(--text); text-decoration: none; }

/* ── Users Table ──────────────────────────────────────── */
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th {
    text-align: left; padding: 8px 10px; font-size: 11px; font-weight: 600;
    color: var(--text-muted); text-transform: uppercase; border-bottom: 2px solid var(--border);
}
.users-table td { padding: 10px; border-bottom: 1px solid var(--border); }
.users-table tr:hover { background: var(--primary-light); }

/* ── Settings ─────────────────────────────────────────── */
.settings-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.settings-card h4 {
    font-size: 14px; font-weight: 700; margin-bottom: 14px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ── Utilities ────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; }
.inline-flex { display: inline-flex; align-items: center; }

/* ── Page Editor (OneNote-style) ──────────────────────── */
.page-editor-wrapper {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; min-height: 500px;
}
.page-editor-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 12px; background: var(--bg);
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.toolbar-left { display: flex; align-items: center; gap: 2px; }
.toolbar-right { display: flex; align-items: center; }
.toolbar-btn {
    padding: 4px 8px; border: none; background: none;
    border-radius: var(--radius-sm); cursor: pointer; font-size: 12px;
    color: var(--text-secondary); font-family: var(--font);
}
.toolbar-btn:hover { background: var(--primary-light); color: var(--primary); }
.toolbar-sep {
    width: 1px; height: 18px; background: var(--border); margin: 0 4px;
}
.toolbar-select {
    padding: 3px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 11px; background: var(--white); cursor: pointer; width: auto;
}
.page-editor {
    flex: 1; padding: 20px 24px; outline: none; font-size: 14px;
    line-height: 1.7; overflow-y: auto; min-height: 450px;
}
.page-editor h2 { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.page-editor h3 { font-size: 16px; font-weight: 700; margin: 16px 0 6px; color: var(--text); }
.page-editor p { margin-bottom: 8px; }
.page-editor ul, .page-editor ol { margin: 4px 0 12px 24px; }
.page-editor li { margin-bottom: 4px; }
.page-editor strong { font-weight: 700; }
.page-editor em { font-style: italic; color: var(--text-secondary); }
.page-checkbox {
    cursor: pointer; font-size: 16px; user-select: none;
}
.page-checkbox.checked { color: var(--success); }
.save-status { transition: opacity 0.3s; }

/* ── Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
