/* ============================================
   LifeOS - Personal Life Management System
   Dark Theme with Accent Colors
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-elevated: #1e1e2a;
    --bg-input: #12121a;
    --border: #2a2a3a;
    --border-light: #222233;
    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-muted: #555570;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.15);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);
    --sidebar-width: 260px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
    --transition: 200ms ease;
}

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

html { font-size: 15px; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === LAYOUT === */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    overflow-y: auto;
}

.sidebar-brand {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-brand .logo {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.sidebar-brand h1 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav {
    padding: 0.75rem 0;
    flex: 1;
}

.nav-section {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 450;
    transition: all var(--transition);
    border-left: 3px solid transparent;
    margin: 1px 0;
}

.nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent-hover);
    border-left-color: var(--accent);
    font-weight: 500;
}

.nav-item .icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
}

.sidebar-footer .nav-item {
    padding: 0.5rem 0;
    border-left: none;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    background: rgba(18, 18, 26, 0.85);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.3rem;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.top-bar-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent);
}

.content-area {
    padding: 2rem;
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    border-color: var(--border);
    box-shadow: var(--shadow);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-header h2, .card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: rgba(0,0,0,0.15);
}

/* === GRID === */
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* === STAT CARDS === */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: all var(--transition);
}

.stat-card:hover { border-color: var(--border); }

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

/* === PROGRESS BARS === */
.progress-wrap {
    background: var(--bg-input);
    border-radius: 100px;
    height: 8px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--accent);
    transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1.3;
}

.btn-primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border-color: var(--danger);
}
.btn-danger:hover { background: var(--danger-bg); }

.btn-success {
    background: var(--success);
    color: white;
}
.btn-success:hover { opacity: 0.9; }

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.4rem 0.6rem;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-card); }

/* === FORMS === */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238888a0' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* === TABLES === */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.65rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
}

tr:hover td {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.badge-accent { background: var(--accent-glow); color: var(--accent-hover); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: rgba(85,85,112,0.15); color: var(--text-muted); }

/* === LIST ITEMS === */
.list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.list-item:last-child { border-bottom: none; }

.list-item:hover { background: var(--bg-card-hover); padding-left: 0.5rem; padding-right: 0.5rem; border-radius: var(--radius-sm); }

.list-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.list-item-content { flex: 1; min-width: 0; }
.list-item-title { font-size: 0.9rem; font-weight: 500; color: var(--text-primary); }
.list-item-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.list-item-action { flex-shrink: 0; }

/* === CALENDAR === */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-header {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.cal-day {
    min-height: 80px;
    padding: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
}

.cal-day:hover { border-color: var(--accent); }
.cal-day.today { border-color: var(--accent); background: var(--accent-glow); }
.cal-day.other-month { opacity: 0.35; }

.cal-day-num {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.cal-event {
    font-size: 0.68rem;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
    font-weight: 500;
}

/* === HABIT TRACKER === */
.habit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: all var(--transition);
}

.habit-row:hover { border-color: var(--border); }

.habit-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.habit-check.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.habit-check:hover:not(.done) {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.habit-info { flex: 1; }
.habit-name { font-weight: 500; font-size: 0.95rem; }
.habit-streak { font-size: 0.8rem; color: var(--text-muted); }
.habit-meta { text-align: right; }

/* === KANBAN === */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-height: 400px;
}

.kanban-col {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    padding: 0.75rem;
    min-height: 300px;
}

.kanban-col-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-col-count {
    background: var(--bg-card);
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.7rem;
}

.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: grab;
    transition: all var(--transition);
}

.kanban-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow); }

.kanban-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--accent);
    cursor: grabbing;
}

.kanban-card-placeholder {
    background: var(--accent-glow);
    border: 2px dashed var(--accent);
    border-radius: var(--radius-sm);
    min-height: 60px;
    margin-bottom: 0.5rem;
    transition: all var(--transition);
}

.kanban-col-body {
    min-height: 200px;
}

/* === CHECKLIST === */
.checklist-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-light);
}

.checklist-row:last-of-type {
    border-bottom: none;
}

.checklist-add-form {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-light);
}

/* === SUPPLY LIST === */
.supply-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-light);
}

.supply-row:last-of-type {
    border-bottom: none;
}

/* === HEAT MAP (habits) === */
.heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fill, 18px);
    gap: 3px;
}

.heatmap-cell {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: var(--bg-input);
    transition: all var(--transition);
}

.heatmap-cell.done { background: var(--success); }
.heatmap-cell.missed { background: var(--bg-input); }

/* === QUOTE CARD === */
.quote-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.quote-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 15px;
    font-size: 6rem;
    color: var(--accent);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

.quote-text {
    font-size: 1.05rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.quote-author {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* === CHAT === */
.chat-container {
    display: flex;
    height: calc(100vh - 120px);
    gap: 1rem;
}

.chat-sidebar {
    width: 250px;
    flex-shrink: 0;
    overflow-y: auto;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.chat-msg {
    margin-bottom: 1.25rem;
    display: flex;
    gap: 0.75rem;
}

.chat-msg.user { flex-direction: row-reverse; }

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    font-weight: 600;
}

.chat-msg.user .chat-avatar { background: var(--accent); color: white; }
.chat-msg.assistant .chat-avatar { background: var(--success); color: white; }

.chat-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    line-height: 1.55;
}

.chat-msg.user .chat-bubble {
    background: var(--accent);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.assistant .chat-bubble {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-light);
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
}

.chat-input-area input {
    flex: 1;
}

/* === VISION BOARD === */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.vision-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 300ms ease;
}

.vision-item:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

.vision-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.vision-item-text {
    padding: 1.25rem;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    font-style: italic;
}

/* === EMPTY STATES === */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

/* === COLORS === */
.text-success { color: var(--success) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }
.text-accent { color: var(--accent-hover) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* === UTILITIES === */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.w-full { width: 100%; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mono { font-family: 'JetBrains Mono', monospace; }

a { color: var(--accent-hover); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* === PRIORITY INDICATORS === */
.priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.priority-1 { background: var(--text-muted); }
.priority-2 { background: var(--info); }
.priority-3 { background: var(--warning); }
.priority-4 { background: var(--danger); }

/* === ALERTS === */
.alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-info { background: var(--info-bg); border-color: rgba(59,130,246,0.2); color: var(--info); }
.alert-success { background: var(--success-bg); border-color: rgba(34,197,94,0.2); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: rgba(245,158,11,0.2); color: var(--warning); }
.alert-danger { background: var(--danger-bg); border-color: rgba(239,68,68,0.2); color: var(--danger); }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .content-area { padding: 1rem; }
    .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .kanban-board { grid-template-columns: 1fr; }
    .chat-sidebar { display: none; }
    .cal-day { min-height: 50px; }
    .top-bar { padding: 0.8rem 1rem; }
}

/* === LOADING SPINNER === */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* === NOTIFICATION DOT === */
.notif-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
}

/* === COLOR PICKER PREVIEW === */
.color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}

.color-option:hover, .color-option.selected {
    border-color: white;
    transform: scale(1.15);
}

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

/* === AUTH PAGES === */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* ============================================
   PROJECT PLANNING MODULE
   ============================================ */

/* === PROJECT NAV TABS === */
.project-nav {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.project-nav::-webkit-scrollbar { height: 3px; }
.project-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.project-nav .btn {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.3rem 0.65rem;
}

/* === HEALTH STATUS DOTS === */
.health-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-block;
}

.health-green { background: var(--success); box-shadow: 0 0 6px var(--success); }
.health-yellow { background: var(--warning); box-shadow: 0 0 6px var(--warning); }
.health-red { background: var(--danger); box-shadow: 0 0 6px var(--danger); animation: pulse-red 2s infinite; }

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 4px var(--danger); }
    50% { box-shadow: 0 0 12px var(--danger); }
}

/* === GANTT CHART === */
.gantt-container {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 400px;
}

.gantt-labels {
    width: 280px;
    flex-shrink: 0;
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
}

.gantt-labels .gantt-label-header {
    padding: 0.6rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    height: 52px;
    display: flex;
    align-items: center;
}

.gantt-label-row {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-light);
    height: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gantt-label-row a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.gantt-timeline {
    flex: 1;
    overflow-x: auto;
    position: relative;
}

.gantt-header-row {
    display: flex;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.gantt-header-cell {
    min-width: 32px;
    width: 32px;
    font-size: 0.6rem;
    text-align: center;
    color: var(--text-muted);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gantt-header-cell.weekend { background: rgba(0,0,0,0.15); }
.gantt-header-cell.today { background: var(--accent-glow); color: var(--accent-hover); font-weight: 600; }

.gantt-header-cell .month-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gantt-body {
    position: relative;
}

.gantt-row {
    height: 40px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
}

.gantt-bar {
    position: absolute;
    top: 8px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: opacity 150ms;
    z-index: 1;
}

.gantt-bar:hover { opacity: 0.85; filter: brightness(1.15); }

.gantt-bar.bar-done { background: var(--success); }
.gantt-bar.bar-in_progress { background: var(--warning); }
.gantt-bar.bar-review { background: var(--info); }
.gantt-bar.bar-todo { background: var(--text-muted); }
.gantt-bar.bar-backlog { background: rgba(85,85,112,0.4); }
.gantt-bar.bar-blocked { background: var(--danger); }

.gantt-bar .bar-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255,255,255,0.2);
    border-radius: 4px 0 0 4px;
}

.gantt-milestone-marker {
    position: absolute;
    top: 12px;
    width: 16px;
    height: 16px;
    transform: rotate(45deg);
    border: 2px solid;
    z-index: 2;
    cursor: pointer;
}

.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--danger);
    z-index: 3;
    opacity: 0.7;
}

.gantt-today-line::before {
    content: 'Today';
    position: absolute;
    top: -18px;
    left: -16px;
    font-size: 0.6rem;
    color: var(--danger);
    font-weight: 600;
    white-space: nowrap;
}

.gantt-grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border-light);
    opacity: 0.5;
}

/* === RISK MATRIX === */
.risk-matrix {
    display: grid;
    grid-template-columns: 40px repeat(5, 1fr);
    grid-template-rows: repeat(5, 60px) 30px;
    gap: 2px;
    max-width: 500px;
    margin: 1rem auto;
}

.risk-matrix-cell {
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    position: relative;
    transition: all var(--transition);
    flex-wrap: wrap;
    gap: 3px;
    padding: 2px;
}

.risk-matrix-cell:hover { filter: brightness(1.2); }

.risk-green { background: rgba(34, 197, 94, 0.2); }
.risk-yellow { background: rgba(245, 158, 11, 0.2); }
.risk-orange { background: rgba(249, 115, 22, 0.3); }
.risk-red { background: rgba(239, 68, 68, 0.3); }

.risk-matrix-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.risk-matrix-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
}

/* === SPRINT BURNDOWN CHART === */
.burndown-chart {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
}

.burndown-chart canvas {
    width: 100% !important;
    height: 250px !important;
}

/* === ACTIVITY TIMELINE === */
.activity-timeline {
    position: relative;
    padding-left: 2rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-light);
}

.activity-item {
    position: relative;
    padding: 0.75rem 0;
    padding-left: 1.5rem;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 1rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
    z-index: 1;
}

.activity-item.act-created::before { background: var(--success); }
.activity-item.act-updated::before { background: var(--info); }
.activity-item.act-completed::before { background: var(--success); }
.activity-item.act-status_changed::before { background: var(--warning); }
.activity-item.act-commented::before { background: var(--accent); }
.activity-item.act-risk_added::before { background: var(--danger); }
.activity-item.act-budget_updated::before { background: var(--info); }
.activity-item.act-milestone_reached::before { background: #a855f7; }
.activity-item.act-sprint_started::before { background: var(--success); }
.activity-item.act-sprint_completed::before { background: var(--success); }

.activity-content {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* === TAB NAVIGATION (for Risk/Docs pages) === */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1.25rem;
}

.tab-btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    font-family: inherit;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--accent-hover); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* === ANALYTICS BARS === */
.analytics-bar-group {
    margin-bottom: 0.75rem;
}

.analytics-bar-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
}

.analytics-bar {
    height: 24px;
    border-radius: 4px;
    background: var(--bg-input);
    overflow: hidden;
    position: relative;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 600ms ease;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    color: white;
    font-weight: 500;
}

.analytics-bar-fill.bar-success { background: var(--success); }
.analytics-bar-fill.bar-warning { background: var(--warning); }
.analytics-bar-fill.bar-info { background: var(--info); }
.analytics-bar-fill.bar-danger { background: var(--danger); }
.analytics-bar-fill.bar-muted { background: var(--text-muted); }
.analytics-bar-fill.bar-accent { background: var(--accent); }

/* === KANBAN EXTENDED (5 cols for sprints) === */
.kanban-board-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    min-height: 400px;
}

/* === DOCUMENT VIEW === */
.document-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    line-height: 1.7;
    font-size: 0.95rem;
    max-width: 800px;
}

.document-content h1, .document-content h2, .document-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* === RESPONSIVE ADDITIONS === */
@media (max-width: 1024px) {
    .kanban-board-5 { grid-template-columns: repeat(3, 1fr); }
    .gantt-labels { width: 200px; }
    .risk-matrix { max-width: 100%; }
}

@media (max-width: 768px) {
    .project-nav { gap: 0.25rem; }
    .project-nav .btn { font-size: 0.72rem; padding: 0.25rem 0.5rem; }
    .kanban-board-5 { grid-template-columns: 1fr; }
    .gantt-labels { width: 150px; }
    .gantt-label-row { font-size: 0.75rem; }
    .gantt-header-cell { min-width: 24px; width: 24px; }
}

/* === WELLNESS MODULE === */

/* Progress bar (water tracker) */
.progress-bar-container {
    background: var(--bg-input);
    border-radius: 100px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 100px;
    background: var(--info);
    transition: width 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Water chart */
.water-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 120px;
    padding-bottom: 1.5rem;
    position: relative;
}

.water-chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.water-chart-fill {
    width: 100%;
    max-width: 40px;
    background: var(--info);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: absolute;
    bottom: 0;
    min-height: 2px;
    opacity: 0.7;
    transition: height 400ms ease;
}

.water-chart-label {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.water-chart-value {
    position: absolute;
    top: -1.2rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Supplement chips */
.supplement-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    user-select: none;
}

.supplement-chip:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.supplement-chip.taken {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

.supplement-chip .check {
    font-weight: 700;
    margin-left: 0.2rem;
}

/* Supplement row (similar to habit-row) */
.supplement-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    transition: all var(--transition);
}

.supplement-row:hover { border-color: var(--border); }

.supplement-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    font-size: 0.85rem;
}

.supplement-check.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.supplement-check:hover:not(.done) {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.supplement-info { flex: 1; }
.supplement-name { font-weight: 500; font-size: 0.95rem; }

/* Mood trend chart */
.mood-trend {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 80px;
    padding-bottom: 1.5rem;
    position: relative;
}

.mood-trend-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}

.mood-trend-bar {
    width: 100%;
    max-width: 30px;
    background: linear-gradient(to top, var(--accent), var(--accent-hover));
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    position: absolute;
    bottom: 0;
    min-height: 4px;
    opacity: 0.8;
    transition: height 400ms ease;
}

.mood-trend-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    border: 2px solid var(--bg-card);
    transition: all var(--transition);
}

.mood-trend-dot:hover {
    transform: scale(1.5);
    background: var(--accent-hover);
}

.mood-trend-label {
    position: absolute;
    bottom: -1.5rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Mood selector (radio buttons styled as emoji cards) */
.mood-selector {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    min-width: 70px;
}

.mood-option:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.mood-option.selected {
    border-color: var(--accent);
    background: var(--accent-glow);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.mood-option input[type="radio"] {
    display: none;
}

.mood-emoji {
    font-size: 1.5rem;
}

.mood-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Rating selector (daily tracker 1-5) */
.rating-selector {
    display: flex;
    gap: 0.5rem;
}

.rating-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 600;
    font-size: 0.95rem;
}

.rating-option:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.rating-option.selected {
    border-color: var(--accent);
    background: var(--accent);
    color: white;
}

.rating-option input[type="radio"] {
    display: none;
}

.text-center { text-align: center; }

/* ============================================
   Light Theme
   ============================================ */
[data-theme="light"] {
    --bg-primary: #f5f5f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f0f0f5;
    --bg-elevated: #ffffff;
    --bg-input: #f5f5f7;
    --border: #e0e0e8;
    --border-light: #eaeaf0;
    --text-primary: #1a1a2e;
    --text-secondary: #555570;
    --text-muted: #8888a0;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.1);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ============================================
   Eisenhower Matrix
   ============================================ */
.eisenhower-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.eisenhower-quadrant {
    border-radius: var(--radius);
    padding: 1rem;
    min-height: 200px;
}
.quadrant-do { background: var(--danger-bg); border: 1px solid var(--danger); }
.quadrant-schedule { background: var(--info-bg); border: 1px solid var(--info); }
.quadrant-delegate { background: var(--warning-bg); border: 1px solid var(--warning); }
.quadrant-eliminate { background: rgba(100,100,120,0.1); border: 1px solid var(--border); }
.quadrant-title { font-weight: 600; margin-bottom: 0.75rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }

/* ============================================
   Pomodoro Timer
   ============================================ */
.pomodoro-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    padding: 2rem;
    color: var(--accent);
}
.pomodoro-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* ============================================
   XP & Level System
   ============================================ */
.xp-bar-container {
    background: var(--bg-input);
    border-radius: 20px;
    height: 24px;
    overflow: hidden;
    position: relative;
}
.xp-bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease;
}
.xp-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
}
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-glow);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
}
.achievement-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-align: center;
    width: 120px;
}
.achievement-badge.earned { border-color: var(--accent); background: var(--accent-glow); }
.achievement-badge.locked { opacity: 0.4; filter: grayscale(1); }
.achievement-icon { font-size: 2rem; margin-bottom: 0.5rem; }

/* ============================================
   Book/Reading Cards
   ============================================ */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.book-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition);
}
.book-card:hover { transform: translateY(-2px); }
.book-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.book-info { padding: 0.75rem; }
.book-title { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.book-author { font-size: 0.8rem; color: var(--text-secondary); }

/* ============================================
   Star Rating
   ============================================ */
.star-rating { display: inline-flex; gap: 2px; }
.star-rating .star { cursor: pointer; font-size: 1.2rem; color: var(--text-muted); }
.star-rating .star.filled { color: #f59e0b; }

/* ============================================
   Contact Cards
   ============================================ */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.contact-avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent-glow); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.1rem; flex-shrink: 0;
}

/* ============================================
   Comparison View
   ============================================ */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.compare-grid img { width: 100%; border-radius: var(--radius); }

/* ============================================
   Range Input
   ============================================ */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

/* ============================================
   Filter Tabs
   ============================================ */
.filter-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.filter-tab {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all var(--transition);
}
.filter-tab:hover, .filter-tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ============================================
   Skill Levels
   ============================================ */
.skill-level { display: inline-flex; align-items: center; gap: 0.25rem; }
.skill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }
.skill-dot.filled { background: var(--accent); }
.skill-level-beginner .skill-dot:nth-child(1) { background: var(--text-muted); }
.skill-level-intermediate .skill-dot:nth-child(-n+2) { background: var(--info); }
.skill-level-advanced .skill-dot:nth-child(-n+3) { background: var(--accent); }
.skill-level-expert .skill-dot { background: var(--warning); }

/* ============================================
   Score Bars (Analytics)
   ============================================ */
.score-bar-wrap { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.score-label { width: 100px; font-size: 0.85rem; color: var(--text-secondary); }
.score-bar { flex: 1; height: 10px; background: var(--bg-input); border-radius: 5px; overflow: hidden; }
.score-bar-fill { height: 100%; border-radius: 5px; transition: width 0.5s ease; }

/* ============================================
   Drag & Drop Widgets
   ============================================ */
.widget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.widget-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: grab;
    transition: all var(--transition);
}
.widget-item:hover { border-color: var(--accent); }
.widget-item.dragging { opacity: 0.5; }

/* ============================================
   Timeline
   ============================================ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 0.5rem; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg-primary);
}
