/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0f0f0f;
  --bg-2: #161616;
  --bg-3: #1e1e1e;
  --bg-4: #252525;
  --border: #2a2a2a;
  --border-2: #333;
  --text: #f0f0f0;
  --text-2: #a0a0a0;
  --text-3: #666;
  --accent: #4f8ef7;
  --accent-dim: rgba(79,142,247,0.12);
  --c-work: #4f8ef7;
  --c-work-bg: rgba(79,142,247,0.1);
  --c-meet: #9b7fe8;
  --c-meet-bg: rgba(155,127,232,0.1);
  --c-personal: #34c98a;
  --c-personal-bg: rgba(52,201,138,0.1);
  --c-admin: #f0b429;
  --c-admin-bg: rgba(240,180,41,0.1);
  --c-high: #f05252;
  --c-high-bg: rgba(240,82,82,0.1);
  --c-med: #f0b429;
  --c-med-bg: rgba(240,180,41,0.1);
  --c-low: #34c98a;
  --c-low-bg: rgba(52,201,138,0.1);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --sidebar-w: 220px;
  --topbar-h: 60px;
  --font: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
}

html { font-size: 14px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  transition: transform .25s ease, width .25s ease;
  z-index: 100;
}
.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); position: fixed; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; flex-shrink: 0;
}
.brand-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--text-3); }

.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 18px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 18px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  border-radius: 0;
  transition: all .12s;
  cursor: pointer;
  position: relative;
}
.nav-item i { font-size: 14px; width: 16px; text-align: center; flex-shrink: 0; }
.nav-item span:first-of-type { flex: 1; }
.nav-item:hover { color: var(--text); background: var(--bg-3); }
.nav-item.active {
  color: var(--text);
  background: var(--bg-3);
  font-weight: 500;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item-disabled { opacity: .4; pointer-events: none; }
.nav-badge {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--bg-4);
  color: var(--text-3);
  font-family: var(--font-mono);
}
.nav-badge.connected { background: var(--c-personal-bg); color: var(--c-personal); }
.nav-divider { height: 1px; background: var(--border); margin: 8px 0; }

.sidebar-clock {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
}
.clock-time { font-family: var(--font-mono); font-size: 18px; font-weight: 500; letter-spacing: .05em; }
.clock-date { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ===== MAIN WRAP ===== */
.main-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== TOPBAR ===== */
.topbar {
  height: var(--topbar-h);
  min-height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  gap: 16px;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.page-title { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.page-sub { font-size: 11px; color: var(--text-3); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.search-wrap { position: relative; }
.search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 12px; pointer-events: none; }
.search-input {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 12px 7px 30px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  width: 220px;
  transition: all .15s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus { outline: none; border-color: var(--accent); background: var(--bg-4); }

/* ===== CONTENT ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.view { display: none; }
.view.active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px; font-family: var(--font); font-weight: 400;
  cursor: pointer;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  transition: all .12s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-3); color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-ghost { border-color: transparent; }
.btn-ghost:hover { border-color: var(--border); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger { border-color: var(--c-high); color: var(--c-high); }
.btn-danger:hover { background: var(--c-high-bg); }
.btn-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-size: 14px;
  transition: all .12s;
}
.btn-icon:hover { background: var(--bg-3); color: var(--text); border-color: var(--border); }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  transition: border-color .15s;
}
.stat-card:hover { border-color: var(--border-2); }
.stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; }
.stat-val { font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
.stat-sub { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.stat-accent { color: var(--accent); }
.stat-danger { color: var(--c-high); }

/* ===== TWO COL ===== */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ===== SECTION HEADER ===== */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-title { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); margin-bottom: 12px; }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; }
.tl-item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0;
  position: relative;
}
.tl-time { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); padding: 14px 8px 0 0; text-align: right; line-height: 1; }
.tl-right { border-left: 1px solid var(--border); padding: 0 0 12px 16px; margin-left: 4px; position: relative; }
.tl-right::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--dot-c, var(--border-2));
  position: absolute;
  left: -4px; top: 12px;
  border: 1.5px solid var(--bg);
}
.tl-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-top: 6px;
  transition: border-color .12s;
  cursor: pointer;
}
.tl-card:hover { border-color: var(--border-2); }
.tl-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.tl-card-title { font-size: 13px; font-weight: 400; flex: 1; }
.tl-card-meta { font-size: 11px; color: var(--text-3); display: flex; align-items: center; gap: 10px; }
.tl-duration { font-family: var(--font-mono); }
.tl-actions { display: flex; gap: 4px; margin-left: auto; opacity: 0; transition: opacity .12s; }
.tl-card:hover .tl-actions { opacity: 1; }

/* ===== BADGES ===== */
.badge {
  font-size: 10px; padding: 2px 8px;
  border-radius: 20px; font-weight: 500;
  white-space: nowrap;
}
.badge-work { background: var(--c-work-bg); color: var(--c-work); }
.badge-meet { background: var(--c-meet-bg); color: var(--c-meet); }
.badge-personal { background: var(--c-personal-bg); color: var(--c-personal); }
.badge-admin { background: var(--c-admin-bg); color: var(--c-admin); }
.badge-high { background: var(--c-high-bg); color: var(--c-high); }
.badge-med { background: var(--c-med-bg); color: var(--c-med); }
.badge-low { background: var(--c-low-bg); color: var(--c-low); }

/* ===== TIMER ===== */
.timer-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
}
.timer-display {
  font-family: var(--font-mono);
  font-size: 40px;
  font-weight: 300;
  letter-spacing: .05em;
  color: var(--text);
  margin-bottom: 4px;
}
.timer-label { font-size: 12px; color: var(--text-3); margin-bottom: 14px; }
.timer-controls { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.timer-running .timer-display { color: var(--accent); }
.input-inline, .select-inline {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
  font-family: var(--font);
  width: 100%;
  margin-top: 6px;
}
.input-inline:focus, .select-inline:focus { outline: none; border-color: var(--accent); }

/* ===== TODAY TASKS ===== */
.today-task {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .12s;
}
.today-task:hover { border-color: var(--border-2); }
.today-task-title { font-size: 13px; flex: 1; }
.today-task-time { font-size: 11px; color: var(--c-high); font-family: var(--font-mono); }

/* ===== TASKS LIST ===== */
.filters-bar {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.filter-btn {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  font-family: var(--font);
  transition: all .12s;
}
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.filter-btn:hover:not(.active) { border-color: var(--border-2); color: var(--text); }
.select-sm {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-2);
  font-family: var(--font);
  cursor: pointer;
}

.tasks-list { display: flex; flex-direction: column; gap: 6px; }
.task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .12s;
  position: relative;
}
.task-row:hover { border-color: var(--border-2); background: var(--bg-3); }
.task-row.done { opacity: .45; }
.task-row.overdue { border-left: 3px solid var(--c-high); }
.task-check {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--border-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 10px;
  transition: all .12s;
  cursor: pointer;
}
.task-check:hover { border-color: var(--c-low); }
.task-row.done .task-check { background: var(--c-low); border-color: var(--c-low); color: #fff; }
.task-title { font-size: 13px; flex: 1; }
.task-row.done .task-title { text-decoration: line-through; color: var(--text-3); }
.task-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.task-date { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }
.task-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.task-row:hover .task-actions { opacity: 1; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}
.empty-state i { font-size: 32px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 13px; margin-bottom: 14px; }

/* ===== REPORT ===== */
.chart-bars { display: flex; flex-direction: column; gap: 8px; }
.chart-row { display: grid; grid-template-columns: 80px 1fr 40px; align-items: center; gap: 10px; }
.chart-label { font-size: 12px; color: var(--text-2); }
.chart-bar-bg { height: 8px; background: var(--bg-4); border-radius: 4px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.chart-pct { font-size: 12px; color: var(--text-2); font-family: var(--font-mono); text-align: right; }

.donut-wrap { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.legend-val { font-family: var(--font-mono); margin-left: auto; color: var(--text); }

.share-box {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.8;
  font-family: var(--font-mono);
  white-space: pre-wrap;
  margin-bottom: 10px;
}
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ===== WEEK VIEW ===== */
.week-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.week-label { font-size: 14px; font-weight: 500; flex: 1; text-align: center; }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week-day {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 10px;
  min-height: 120px;
}
.week-day.today { border-color: var(--accent); }
.week-day-header { font-size: 11px; color: var(--text-3); margin-bottom: 8px; text-align: center; }
.week-day-num {
  font-size: 18px; font-weight: 300;
  text-align: center; margin-bottom: 8px;
  color: var(--text);
}
.week-day.today .week-day-num { color: var(--accent); }
.week-task-dot {
  height: 4px; border-radius: 2px; margin-bottom: 3px;
  font-size: 10px; padding: 1px 4px; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ===== MONDAY / INTEGRATIONS ===== */
.integration-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}
.integration-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.monday-header .integration-icon { background: var(--c-meet-bg); color: var(--c-meet); }
.wa-header .integration-icon { background: var(--c-personal-bg); color: var(--c-personal); }
.gmail-header .integration-icon { background: var(--c-high-bg); color: var(--c-high); }
.integration-header h2 { font-size: 14px; font-weight: 500; }
.integration-header p { font-size: 12px; color: var(--text-3); }

.monday-board { display: flex; flex-direction: column; gap: 6px; }
.monday-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.monday-name { flex: 1; }
.monday-status-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.monday-due { font-size: 11px; font-family: var(--font-mono); }

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
}
.status-dot.connected { background: var(--c-personal); box-shadow: 0 0 6px var(--c-personal); }

/* ===== WHATSAPP / COMMANDS ===== */
.commands-list { display: flex; flex-direction: column; gap: 6px; }
.command-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
}
.command-key { font-family: var(--font-mono); color: var(--accent); font-size: 12px; white-space: nowrap; min-width: 110px; }
.command-desc { font-size: 12px; color: var(--text-2); }

.reminders-list { display: flex; flex-direction: column; gap: 8px; }
.reminder-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.reminder-info { flex: 1; }
.reminder-title { font-size: 13px; }
.reminder-sub { font-size: 11px; color: var(--text-3); }
.toggle {
  width: 36px; height: 20px;
  border-radius: 10px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  flex-shrink: 0;
}
.toggle.on { background: var(--c-personal); border-color: var(--c-personal); }
.toggle::after {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px; left: 2px;
  transition: transform .15s;
}
.toggle.on::after { transform: translateX(16px); }

/* ===== CONFIG ===== */
.config-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.config-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.config-label { font-size: 12px; color: var(--text-3); display: block; margin-bottom: 5px; }
.input-full {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  font-family: var(--font);
  transition: border-color .12s;
}
.input-full:focus { outline: none; border-color: var(--accent); }
textarea.input-full { resize: vertical; }

.days-selector { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.day-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 11px;
  cursor: pointer;
  font-family: var(--font);
  transition: all .12s;
}
.day-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; animation: fadeIn .15s ease; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow);
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 600px; }
@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 15px; font-weight: 500; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.field-label { font-size: 12px; color: var(--text-3); display: block; margin-bottom: 5px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--bg-4);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: all .2s;
  z-index: 2000;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ===== DETAIL MODAL ===== */
.detail-field { margin-bottom: 14px; }
.detail-field-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.detail-field-val { font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.detail-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; padding: 3px 8px;
  background: var(--bg-4); border-radius: 4px;
  color: var(--text-2); font-family: var(--font-mono);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .config-sections { grid-template-columns: 1fr; }
  .week-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .sidebar { position: fixed; height: 100vh; transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.mobile-open { transform: translateX(0); }
  .topbar-right .search-wrap { display: none; }
}

/* ===== USER ROW ===== */
.user-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 500;
  flex-shrink: 0; text-transform: uppercase;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 10px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== PERFIL / CONFIG ===== */
.profile-hero {
  display: flex; align-items: center; gap: 20px;
  padding: 20px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-lg {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 500;
  text-transform: uppercase;
  overflow: hidden;
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-edit {
  position: absolute; bottom: 0; right: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-4);
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; cursor: pointer;
  transition: all .12s;
}
.profile-avatar-edit:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.profile-hero-name { font-size: 18px; font-weight: 500; margin-bottom: 3px; }
.profile-hero-email { font-size: 13px; color: var(--text-3); margin-bottom: 4px; }
.profile-hero-since { font-size: 11px; color: var(--text-3); }

.config-sections-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.stats-mini { display: flex; flex-direction: column; gap: 10px; }
.stats-mini-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.stats-mini-label { color: var(--text-2); }
.stats-mini-val { font-weight: 500; font-family: var(--font-mono); }

input[type="range"] {
  -webkit-appearance: none;
  height: 4px; border-radius: 2px;
  background: var(--border-2);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

@media (max-width: 1100px) {
  .config-sections-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .config-sections-3 { grid-template-columns: 1fr; }
  .profile-hero { flex-direction: column; text-align: center; }
}

/* ===== MODO CLARO ===== */
[data-theme="light"] {
  --bg: #f5f5f4;
  --bg-2: #ffffff;
  --bg-3: #f0efed;
  --bg-4: #e8e7e4;
  --border: #e2e0dc;
  --border-2: #d0cec9;
  --text: #1a1a1a;
  --text-2: #555550;
  --text-3: #999890;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);

  --c-work-bg: rgba(79,142,247,0.08);
  --c-meet-bg: rgba(155,127,232,0.08);
  --c-personal-bg: rgba(52,201,138,0.08);
  --c-admin-bg: rgba(240,180,41,0.08);
  --c-high-bg: rgba(240,82,82,0.08);
  --c-med-bg: rgba(240,180,41,0.08);
  --c-low-bg: rgba(52,201,138,0.08);
}

[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] .sidebar { background: var(--bg-2); }
[data-theme="light"] .topbar { background: var(--bg-2); }
[data-theme="light"] .modal { background: var(--bg-2); }
[data-theme="light"] .tl-card { background: var(--bg-3); }
[data-theme="light"] .task-row { background: var(--bg-2); }
[data-theme="light"] .task-row:hover { background: var(--bg-3); }
[data-theme="light"] .stat-card { background: var(--bg-2); }
[data-theme="light"] .today-task { background: var(--bg-2); }
[data-theme="light"] .timer-card { background: var(--bg-2); }
[data-theme="light"] .monday-item { background: var(--bg-2); }
[data-theme="light"] .command-row { background: var(--bg-2); }
[data-theme="light"] .reminder-row { background: var(--bg-2); border-color: var(--border); }
[data-theme="light"] .config-box { background: var(--bg-2); }
[data-theme="light"] .week-day { background: var(--bg-2); }
[data-theme="light"] .share-box { background: var(--bg-3); }
[data-theme="light"] .input-full,
[data-theme="light"] .input-inline,
[data-theme="light"] .select-inline,
[data-theme="light"] .select-sm,
[data-theme="light"] .search-input { background: var(--bg-3); border-color: var(--border); color: var(--text); }
[data-theme="light"] .add-form { background: var(--bg-3); }
[data-theme="light"] .profile-hero { background: var(--bg-2); }
[data-theme="light"] canvas#donut-canvas { filter: none; }

/* Transición suave al cambiar */
body, .sidebar, .topbar, .modal, .tl-card, .task-row, .stat-card,
.config-box, .week-day, .timer-card, .today-task, .monday-item {
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}

/* Botón toggle tema */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .15s;
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--bg-3); color: var(--text); border-color: var(--border-2); }
