:root {
  --bg: #050508;
  --bg2: #0d0d14;
  --bg3: #13131e;
  --border: #1e1e2e;
  --accent: #7c3aed;
  --accent2: #a855f7;
  --green: #10b981;
  --yellow: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --text: #e2e8f0;
  --text2: #94a3b8;
  --text3: #475569;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }

/* LAYOUT */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar { width: 220px; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.main { flex: 1; overflow-y: auto; }

/* SIDEBAR */
.logo { padding: 20px 16px 16px; border-bottom: 1px solid var(--border); }
.logo h1 { font-size: 18px; font-weight: 700; background: linear-gradient(135deg, var(--accent2), #60a5fa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.logo span { font-size: 11px; color: var(--text3); }
nav { flex: 1; padding: 8px; overflow-y: auto; }
.nav-section { font-size: 10px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; padding: 12px 8px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text2); font-size: 13px; transition: all .15s; margin-bottom: 1px; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(124,58,237,.2); color: var(--accent2); }
.nav-item .icon { font-size: 16px; width: 20px; text-align: center; }
.nav-badge { margin-left: auto; background: var(--accent); color: #fff; font-size: 10px; padding: 1px 6px; border-radius: 10px; }
.sidebar-bottom { padding: 12px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #3b82f6); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }

/* PAGES */
.page { display: none; padding: 24px; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; }
.page-sub { color: var(--text2); font-size: 13px; margin-top: 2px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; border: none; cursor: pointer; font-size: 13px; font-weight: 500; transition: all .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }

/* CARDS */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.metric-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.metric-label { font-size: 12px; color: var(--text2); margin-bottom: 8px; }
.metric-value { font-size: 28px; font-weight: 700; }
.metric-change { font-size: 12px; margin-top: 4px; }
.metric-change.up { color: var(--green); }
.metric-change.down { color: var(--red); }

/* TABLES */
.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border); background: var(--bg3); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text2); font-size: 13px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* TAGS / BADGES */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.tag-purple { background: rgba(124,58,237,.2); color: var(--accent2); }
.tag-green { background: rgba(16,185,129,.15); color: var(--green); }
.tag-yellow { background: rgba(245,158,11,.15); color: var(--yellow); }
.tag-red { background: rgba(239,68,68,.15); color: var(--red); }
.tag-blue { background: rgba(59,130,246,.15); color: var(--blue); }

/* KANBAN */
.kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; }
.kanban-col { min-width: 260px; background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.kanban-col-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kanban-col-title { font-size: 13px; font-weight: 600; }
.kanban-count { background: var(--bg3); border: 1px solid var(--border); color: var(--text2); font-size: 11px; padding: 1px 7px; border-radius: 10px; }
.kanban-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: all .15s; }
.kanban-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.kanban-card-title { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.kanban-card-meta { font-size: 11px; color: var(--text3); display: flex; gap: 10px; }
.kanban-add { width: 100%; background: transparent; border: 1px dashed var(--border); border-radius: 8px; padding: 8px; color: var(--text3); cursor: pointer; font-size: 12px; transition: all .15s; }
.kanban-add:hover { border-color: var(--accent); color: var(--accent2); }

/* TASKS */
.task-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-check { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; flex-shrink: 0; transition: all .15s; display: flex; align-items: center; justify-content: center; }
.task-check:hover { border-color: var(--accent); }
.task-check.done { background: var(--green); border-color: var(--green); }
.task-text { flex: 1; }
.task-text.done { text-decoration: line-through; color: var(--text3); }
.task-cat { font-size: 11px; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 100; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 24px; width: 480px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; color: var(--text2); margin-bottom: 6px; display: block; }
.form-input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 13px; outline: none; transition: border .15s; }
.form-input:focus { border-color: var(--accent); }
.form-input select { background: var(--bg3); }
select.form-input { appearance: none; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* CONTENT PIPELINE */
.content-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.content-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.content-title { font-size: 14px; font-weight: 600; }
.content-platforms { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.platform-icon { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.content-progress { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.progress-step { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text3); }
.progress-step.done { color: var(--green); }
.progress-step.active { color: var(--accent2); }
.progress-line { flex: 1; height: 2px; background: var(--border); border-radius: 1px; }
.progress-line.done { background: var(--green); }

/* INBOX */
.inbox-item { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .15s; }
.inbox-item:hover { background: rgba(255,255,255,.02); }
.inbox-item.unread .inbox-text { font-weight: 500; color: var(--text); }
.inbox-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3b82f6, #8b5cf6); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.inbox-from { font-size: 13px; font-weight: 600; }
.inbox-text { font-size: 12px; color: var(--text2); margin-top: 2px; }
.inbox-time { font-size: 11px; color: var(--text3); margin-left: auto; white-space: nowrap; }

/* ANALYTICS */
.chart-placeholder { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; height: 160px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 12px; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 120px; padding: 0 4px; }
.bar { flex: 1; background: linear-gradient(to top, var(--accent), var(--accent2)); border-radius: 4px 4px 0 0; min-height: 4px; transition: all .3s; cursor: pointer; }
.bar:hover { opacity: .8; }
.bar-labels { display: flex; gap: 6px; padding: 6px 4px 0; }
.bar-label { flex: 1; text-align: center; font-size: 10px; color: var(--text3); }

/* SEARCH */
.search-bar { display: flex; align-items: center; gap: 8px; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px; margin-bottom: 20px; }
.search-bar input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; flex: 1; }
.search-bar input::placeholder { color: var(--text3); }

/* MOBILE BOTTOM NAV */
.mobile-nav { display: none; }

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

/* THINK INPUT */
.thought-input { background: var(--bg2); border: 1px solid var(--border); border-radius: 16px; padding: 16px; margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-end; }
.thought-input textarea { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 14px; outline: none; resize: none; min-height: 44px; max-height: 120px; transition: border .15s; font-family: inherit; }
.thought-input textarea:focus { border-color: var(--accent); }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg2); border-top: 1px solid var(--border); padding: 8px 0 env(safe-area-inset-bottom); z-index: 50; }
  .mobile-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; cursor: pointer; color: var(--text3); font-size: 9px; }
  .mobile-nav-item.active { color: var(--accent2); }
  .mobile-nav-item .icon { font-size: 20px; }
  .main { padding-bottom: 70px; }
  .page { padding: 16px; }
  .kanban { flex-direction: column; }
  .kanban-col { min-width: unset; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
}
