/* ============================================
   ARCANUM — CSS v3
   Mescla Notion + Todoist + Mística ✦
   Harmonizado e refinado
   ============================================ */

:root {
  --bg: #0d0b14;
  --bg2: #13101e;
  --bg3: #1a1627;
  --surface: #1f1a2e;
  --surface2: #261f38;
  --surface-hover: #2d2545;
  --border: #2e2645;
  --border2: #3d3458;
  --accent: #9b6dff;
  --accent2: #c084fc;
  --accent3: #f0abfc;
  --gold: #f5c842;
  --rose: #f472b6;
  --teal: #5eead4;
  --text: #ede8ff;
  --muted: #8879aa;
  --muted2: #5c5178;
  --danger: #f87171;
  --success: #4ade80;
  --warning: #fbbf24;

  --font-display: "Cinzel", serif;
  --font-body: "Crimson Pro", Georgia, serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
  --glow: 0 0 20px rgba(155, 109, 255, 0.3);
  --glow-gold: 0 0 20px rgba(245, 200, 66, 0.4);

  --sidebar-w: 220px;
  --sidebar-collapsed: 60px;
  --quickadd-h: 52px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

button, input, select, textarea {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* ============================================
   AMBIENT BACKGROUND
   ============================================ */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, #7c3aed, transparent);
  top: -200px; left: -100px;
  animation: orbFloat 20s ease-in-out infinite;
}
.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #c084fc, transparent);
  bottom: -100px; right: -50px;
  animation: orbFloat 25s ease-in-out infinite reverse;
}
.orb-3 {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #5b21b6, transparent);
  top: 50%; left: 40%;
  animation: orbFloat 18s ease-in-out infinite 5s;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(30px, -20px) scale(1.05); }
  66%       { transform: translate(-20px, 30px) scale(0.95); }
}
#stars-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.6;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: rgba(13, 11, 20, 0.92);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .logo-text,
.sidebar.collapsed .user-info,
.sidebar.collapsed .xp-section,
.sidebar.collapsed .integration-status {
  opacity: 0;
  width: 0;
  overflow: hidden;
}
.sidebar.collapsed .sidebar-toggle { transform: rotate(180deg); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent2);
  white-space: nowrap;
}
.logo-glyph {
  font-size: 1.3rem;
  color: var(--accent);
  animation: glyphPulse 3s ease-in-out infinite;
}
@keyframes glyphPulse {
  0%, 100% { text-shadow: 0 0 8px var(--accent); }
  50%       { text-shadow: 0 0 20px var(--accent), 0 0 40px var(--accent2); }
}
.sidebar-toggle {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
.sidebar-toggle:hover { color: var(--text); background: var(--border); }

/* User block */
.user-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0.5rem 1rem;
  cursor: pointer;
}
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border: 1px solid var(--border2);
}
.avatar-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0.6;
  animation: ringRotate 8s linear infinite;
}
@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.user-name {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.user-level { font-size: 0.7rem; color: var(--muted); white-space: nowrap; }

/* XP Section */
.xp-section { 
  padding: 0.25rem 1rem 1.25rem; 
  border-bottom: 1px solid var(--border);
}
.xp-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.xp-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent);
}
.xp-label { font-size: 0.65rem; color: var(--muted); margin-top: 4px; }

/* Nav */
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border2); }

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  margin: 1px 0;
  transition: all 0.15s;
  position: relative;
}
.nav-btn:hover { color: var(--text); background: var(--surface); }
.nav-btn.active {
  color: var(--accent2);
  background: rgba(155, 109, 255, 0.1);
  box-shadow: inset 2px 0 0 var(--accent);
}
.nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-label { white-space: nowrap; transition: opacity 0.2s; }
.badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

/* Sidebar footer */
.sidebar-footer { padding: 0.75rem 0; border-top: 1px solid var(--border); }
.integration-status { display: flex; gap: 6px; padding: 0.4rem 1rem; }
.int-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border2);
  transition: all 0.3s;
}
.int-dot.connected { background: var(--success); box-shadow: 0 0 6px var(--success); }

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
  margin-left: var(--sidebar-w);
  height: 100vh;
  padding-top: var(--quickadd-h);
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.main-content.expanded { margin-left: var(--sidebar-collapsed); }

/* Quick Add Bar */
.quickadd-bar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--quickadd-h);
  background: rgba(13, 11, 20, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  z-index: 99;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.quickadd-bar.expanded { left: var(--sidebar-collapsed); }

.qa-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-family: var(--font-body);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.8;
}
.qa-btn:hover {
  border-color: var(--accent);
  color: var(--accent2);
  background: rgba(155, 109, 255, 0.08);
  opacity: 1;
  transform: translateY(-1px);
}
.qa-search { flex: 1; }
.qa-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.2s;
}
.qa-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 109, 255, 0.15);
}
.qa-search input::placeholder { color: var(--muted2); }

/* Global Mini Timer */
.global-timer {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(155, 109, 255, 0.08);
  border: 1px solid rgba(155, 109, 255, 0.25);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  height: 34px;
  flex-shrink: 0;
}
.global-timer:hover {
  background: rgba(155, 109, 255, 0.15);
  border-color: var(--accent);
}
.global-timer.work {
  border-color: rgba(155, 109, 255, 0.5);
  box-shadow: 0 0 12px rgba(155, 109, 255, 0.2);
}
.global-timer.short {
  border-color: rgba(245, 200, 66, 0.5);
  box-shadow: 0 0 12px rgba(245, 200, 66, 0.15);
}
.global-timer.long {
  border-color: rgba(94, 234, 212, 0.5);
  box-shadow: 0 0 12px rgba(94, 234, 212, 0.15);
}
.gt-icon { font-size: 0.85rem; }
.gt-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent2);
  letter-spacing: 0.04em;
}
.global-timer.short .gt-time { color: var(--gold); }
.global-timer.long  .gt-time { color: var(--teal); }

/* Theme Toggle Icon Hover Effect */
#themeToggle #themeToggleIcon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#themeToggle:hover #themeToggleIcon {
  transform: rotate(20deg) scale(1.15);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  display: none;
  padding: 1.5rem 2rem 3rem;
  height: 100%;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}
.section.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }
.header-actions { display: flex; gap: 0.75rem; align-items: center; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* DASHBOARD V2 */
.dashboard-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  width: 100%;
  gap: 1.5rem;
}

.dashboard-top-row > * {
  flex: 1;
}

#section-dashboard .section-header {
  display: flex;
  justify-content: flex-start;
}

.dash-stats-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.section-date {
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

/* Remove margens extras que podem desalinhada o dashboard */
#section-dashboard .section-header {
  margin-bottom: 0;
  display: flex;
  justify-content: flex-start;
}

#section-dashboard .section-title {
  margin: 0;
  white-space: nowrap;
}

.dash-stats-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  min-width: max-content;
}

.stat-bubble {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 140px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-bubble:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.stat-bubble-icon { font-size: 1.2rem; }
.stat-bubble-info { display: flex; flex-direction: column; }
.stat-bubble-num { font-size: 1.1rem; font-weight: bold; color: var(--text); }
.stat-bubble-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }

.section-date {
  font-size: 0.9rem;
  color: var(--muted);
  font-family: var(--font-body);
  opacity: 0.8;
  text-align: right;
  white-space: nowrap;
}

#section-dashboard {
  display: none;
  flex-direction: column;
  padding: 1.5rem 2rem;
  height: 100%;
  overflow: hidden;
}
#section-dashboard.active { display: flex; }

.dashboard-grid-v2 {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
  min-height: 0;
}

.dash-side-col {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 0;
}

.dash-card-v2 {
  background: rgba(31, 26, 46, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.flex-grow {
  flex: 1.4;
  min-height: 0;
}

.level-card-compact {
  flex: 0.6;
  min-height: 0;
}

.task-list-v2, .task-list-scrollable-full, .task-list-scrollable, .event-list-v2, .inbox-list-v2 {
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.task-list-scrollable-full::-webkit-scrollbar { width: 4px; }
.task-list-scrollable-full::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

.card-header-v2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.card-header-v2 h3 {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  flex: 1;
}

.card-icon-v2 { color: var(--accent); font-size: 1.1rem; }

.card-add-v2 {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  width: 20px; height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
}

/* Scrollable list for upcoming */
.task-list-scrollable {
  max-height: 300px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.task-list-scrollable::-webkit-scrollbar { width: 4px; }
.task-list-scrollable::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

/* Empty state styling */
.empty-state-v2 {
  text-align: center;
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.empty-img { width: 60px; opacity: 0.5; }
.empty-state-v2 p { color: var(--text); font-size: 0.9rem; margin: 0; }
.empty-state-v2 span { color: var(--muted); font-size: 0.75rem; line-height: 1.4; }

/* Priority Accordion */
.priority-accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.priority-group { border-radius: var(--radius-sm); overflow: hidden; }
.priority-header {
  background: rgba(255,255,255,0.03);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}
.priority-header:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); }
.prio-dot { 
  width: 18px; height: 18px; 
  border-radius: 50%; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 10px; font-weight: 900;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
.prio-dot.red { background: #ef4444; color: white; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.prio-dot.yellow { background: #f59e0b; color: white; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }
.prio-dot.blue { background: #3b82f6; color: white; box-shadow: 0 0 8px rgba(59, 130, 246, 0.4); }
.prio-chevron { margin-left: auto; font-size: 0.6rem; opacity: 0.5; transition: transform 0.2s; }
.priority-content { padding: 0.5rem 0; display: none; }
.priority-content.open { display: block; }
.empty-state-inline { padding: 0.5rem 1.5rem; color: var(--muted2); font-size: 0.8rem; font-style: italic; }

/* Level Card V2 */
.level-content-v2 { display: flex; gap: 1.5rem; align-items: center; }
.crystal-ball {
  font-size: 3rem;
  filter: drop-shadow(0 0 15px var(--accent));
  animation: float 3s ease-in-out infinite;
}
.level-info-v2 { flex: 1; }
.level-title-v2 { font-family: var(--font-display); font-size: 1rem; color: var(--accent2); margin-bottom: 0.25rem; }
.level-rank-v2 { font-size: 0.8rem; color: var(--muted); margin-bottom: 1rem; }
.xp-bar-container-v2 {
  background: var(--bg3);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.xp-bar-fill-v2 {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 0 15px var(--accent);
  position: relative;
  overflow: hidden;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-bar-fill-v2::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: barShine 3s infinite;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.xp-text-v2 { font-size: 0.75rem; color: var(--muted); text-align: right; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.span-2 { grid-column: span 2; }

@media (max-width: 1300px) {
  .dash-stats-row { gap: 0.5rem; }
  .stat-bubble { min-width: 120px; padding: 0.4rem 0.75rem; }
}

@media (max-width: 1100px) {
  .dashboard-top-row { flex-direction: column; align-items: center; gap: 1rem; }
  .dash-stats-row { justify-content: center; width: 100%; order: 2; }
  .section-date { text-align: center; order: 3; }
  #section-dashboard .section-header { justify-content: center; order: 1; }
}

@media (max-width: 950px) {
  .dashboard-grid-v2 { 
    grid-template-columns: 1fr 1fr; 
    grid-template-rows: auto auto auto;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .main-content { overflow-y: auto; }
  #section-dashboard { height: auto; overflow: visible; }
  .dash-side-col { order: 10; }
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex: 1;
}
.card-icon { color: var(--accent); font-size: 1rem; }
.card-add {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  width: 24px; height: 24px;
  border-radius: 50%;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.card-add:hover { border-color: var(--accent); color: var(--accent2); }

.empty-state {
  color: var(--muted2);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem 0;
}

/* ============================================
   TASK LIST
   ============================================ */
.task-list { display: flex; flex-direction: column; gap: 0.5rem; }

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.task-item:hover { border-color: var(--border2); background: var(--surface2); }
.task-item.done { opacity: 0.45; }
.task-item.done .task-text { text-decoration: line-through; }

.task-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: none;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-check:hover { border-color: var(--accent); }
.task-check.checked { background: var(--accent); border-color: var(--accent); }
.task-check.checked::after { content: "✓"; color: white; font-size: 0.65rem; }

.task-body { flex: 1; min-width: 0; }
.task-text { font-size: 0.9rem; color: var(--text); line-height: 1.4; }
.task-meta {
  display: flex;
  gap: 0.4rem;
  margin-top: 3px;
  align-items: center;
  flex-wrap: wrap;
}
.task-tag {
  font-size: 0.63rem;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(155, 109, 255, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(155, 109, 255, 0.2);
}
.task-due { font-size: 0.68rem; color: var(--muted); font-family: var(--font-mono); }
.task-due.overdue { color: var(--danger); }

.priority-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.p1 { background: var(--danger); }
.p2 { background: var(--warning); }
.p3 { background: var(--muted2); }

/* Recurrence tag */
.recur-tag {
  background: rgba(94, 234, 212, 0.08);
  color: var(--teal);
  border-color: rgba(94, 234, 212, 0.2);
}

/* Project tag */
.proj-tag {
  background: rgba(192, 132, 252, 0.08);
  border-color: rgba(192, 132, 252, 0.25);
}

/* ============================================
   LEVEL / XP CARD
   ============================================ */
.level-card { text-align: center; }
.level-display { margin: 1rem 0; }
.level-avatar { font-size: 2.5rem; margin-bottom: 0.5rem; }
.level-name { font-family: var(--font-display); font-size: 0.9rem; color: var(--accent2); }
.level-number { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }
.xp-progress-big {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0 0.5rem;
}
.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--accent3));
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--accent);
}
.xp-numbers { font-size: 0.75rem; color: var(--muted); font-family: var(--font-mono); }

/* Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.stat-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
}
.stat-num { font-family: var(--font-display); font-size: 1.8rem; color: var(--accent2); }
.stat-label { font-size: 0.7rem; color: var(--muted); margin-top: 2px; }

/* ============================================
   INBOX
   ============================================ */
.inbox-compose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-end;
}
.inbox-compose textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  resize: none;
  min-height: 60px;
}
.inbox-compose textarea:focus { outline: none; }

.inbox-items { display: flex; flex-direction: column; gap: 0.75rem; }
.inbox-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.inbox-text { flex: 1; line-height: 1.6; }
.inbox-date { font-size: 0.7rem; color: var(--muted2); font-family: var(--font-mono); white-space: nowrap; }
.inbox-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.btn-ghost-sm {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-family: var(--font-body);
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
}
.btn-ghost-sm:hover { border-color: var(--accent); color: var(--accent2); }

/* ============================================
   TASKS — ACCORDION
   ============================================ */
.accordion-container { display: flex; flex-direction: column; gap: 0; }

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  background: rgba(31, 26, 46, 0.6);
  overflow: hidden;
  transition: border-color 0.2s;
}
.accordion-item:hover { border-color: var(--border2); }

.accordion-header {
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  background: var(--bg2);
  transition: background 0.15s, color 0.15s;
}
.accordion-header:hover { background: var(--surface-hover); color: var(--text); }
.accordion-item.open .accordion-header { color: var(--accent2); }

.accordion-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: none;
}
.accordion-item.open .accordion-body { display: block; }

.accordion-icon {
  transition: transform 0.2s;
  color: var(--muted);
  font-size: 0.7rem;
}
.accordion-item.open .accordion-icon { transform: rotate(180deg); }

/* Filter pills */
.filter-pills {
  display: flex;
  gap: 0.35rem;
  background: var(--bg2);
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.filter-pills .pill {
  border: none;
  background: none;
  font-size: 0.75rem;
  padding: 0.28rem 0.7rem;
  color: var(--muted);
}
.filter-pills .pill.active {
  background: var(--surface2);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  color: var(--accent2);
}

/* ============================================
   PROJECTS
   ============================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border2); }
.project-emoji { font-size: 1.8rem; margin-bottom: 0.5rem; }
.project-name { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.25rem; }
.project-desc { font-size: 0.8rem; color: var(--muted); }
.project-count { font-size: 0.7rem; color: var(--muted2); margin-top: 0.5rem; font-family: var(--font-mono); }

.project-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0.75rem 0 0.4rem;
  overflow: hidden;
}
.project-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.project-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap; }

/* Project Detail Modal */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 700px) {
  .project-detail-grid { grid-template-columns: 1fr; }
}
.project-tasks-col,
.project-notes-col { display: flex; flex-direction: column; }

/* ============================================
   CALENDAR
   ============================================ */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1rem;
}
.calendar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.calendar-nav button {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all 0.15s;
}
.calendar-nav button:hover { border-color: var(--accent); color: var(--accent2); }
.calendar-nav span { font-family: var(--font-display); font-size: 1rem; color: var(--accent2); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day-header {
  text-align: center;
  font-size: 0.7rem;
  font-family: var(--font-display);
  color: var(--muted);
  padding: 4px;
  letter-spacing: 0.05em;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.cal-day:hover { background: var(--surface2); }
.cal-day.other-month { color: var(--muted2); }
.cal-day.today {
  background: rgba(155, 109, 255, 0.15);
  color: var(--accent2);
  font-weight: 600;
}
.cal-day.has-event::after {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
}

/* Calendar day panel */
.calendar-day-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.cal-day-label-text {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent2);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.cal-day-tasks { display: flex; flex-direction: column; gap: 0.5rem; }
.cal-task-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}
.cal-task-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ============================================
   PLACES
   ============================================ */
.places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.place-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}
.place-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border2); }
.place-cat { font-size: 1.5rem; margin-bottom: 0.5rem; }
.place-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; margin-bottom: 0.25rem; }
.place-addr { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.place-visited { font-size: 0.7rem; }
.place-visited.yes { color: var(--success); }
.place-visited.no  { color: var(--muted2); }

/* ============================================
   BOOKS
   ============================================ */
.books-filter,
.movies-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.3rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.pill:hover,
.pill.active {
  background: rgba(155, 109, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent2);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 1rem;
}
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--border2);
}
.book-card-cover {
  width: 100%;
  height: 240px;
  position: relative;
  background: var(--bg2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.book-no-cover-title {
  padding: 1rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  line-height: 1.4;
}
.book-card-info {
  padding: 0.75rem;
  background: var(--surface);
  flex: 1;
}
.book-title-small {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
  line-height: 1.3;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.book-author-small {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-meta-small { display: flex; gap: 0.3rem; align-items: center; margin-bottom: 0.4rem; }
.format-badge-sm,
.status-badge-sm,
.rating-sm {
  font-size: 0.62rem;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--bg2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.rating-sm { color: var(--gold); border-color: rgba(245, 200, 66, 0.3); }
.book-progress-sm { margin-top: 0.4rem; }
.progress-bar-sm { height: 3px; background: var(--border); border-radius: 2px; overflow: hidden; }
.progress-fill-sm { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.progress-text-sm { font-size: 0.6rem; color: var(--muted2); margin-top: 2px; text-align: right; }

/* ============================================
   MOVIES
   ============================================ */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}
.movie-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  aspect-ratio: 2/3;
  position: relative;
}
.movie-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); }
.movie-poster { width: 100%; height: 100%; object-fit: cover; }
.movie-no-poster {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg2);
  color: var(--muted2);
  font-size: 0.75rem;
  text-align: center;
  padding: 1rem;
}
.movie-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 11, 20, 0.95) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.75rem;
}
.movie-title { font-family: var(--font-display); font-size: 0.75rem; font-weight: 600; margin-bottom: 2px; }
.movie-platform { font-size: 0.63rem; color: var(--muted); }

/* ============================================
   REWARDS & LEVELS
   ============================================ */
.levels-timeline { display: flex; flex-direction: column; gap: 0; margin-bottom: 2rem; }
.level-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-left: 2px solid var(--border);
  margin-left: 1.5rem;
  position: relative;
  transition: all 0.2s;
}
.level-row.unlocked { border-left-color: var(--accent); }
.level-row.current {
  border-left-color: var(--gold);
  background: rgba(245, 200, 66, 0.04);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.level-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border2);
  background: var(--bg);
  position: absolute;
  left: -8px; top: 50%;
  transform: translateY(-50%);
}
.level-row.unlocked .level-dot { background: var(--accent); border-color: var(--accent); }
.level-row.current  .level-dot { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 10px var(--gold); }
.level-row-avatar { font-size: 1.5rem; }
.level-row-info { flex: 1; }
.level-row-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; }
.level-row-sub { font-size: 0.75rem; color: var(--muted); }
.level-row-reward {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  background: rgba(155, 109, 255, 0.1);
  color: var(--accent2);
  border: 1px solid rgba(155, 109, 255, 0.2);
}
.level-row-reward.locked { background: var(--bg2); color: var(--muted2); border-color: var(--border); }

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.reward-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}
.reward-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.reward-name { font-family: var(--font-display); font-size: 0.85rem; font-weight: 600; margin-bottom: 0.25rem; }
.reward-desc { font-size: 0.75rem; color: var(--muted); }

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.settings-card h3 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.settings-card label {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.75rem 0 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.setting-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
.setting-input:focus { outline: none; border-color: var(--accent); }

.bg-options { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.bg-opt {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.bg-opt:hover,
.bg-opt.active { border-color: var(--accent); box-shadow: 0 0 8px rgba(155, 109, 255, 0.3); }
.bg-opt.locked { opacity: 0.4; cursor: not-allowed; }

.integration-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.integration-item:last-child { border-bottom: none; }
.int-name { font-size: 0.9rem; display: block; }
.int-desc { font-size: 0.72rem; color: var(--muted); }

.emoji-picker { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.emoji-opt {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
}
.emoji-opt:hover,
.emoji-opt.active { border-color: var(--accent); background: rgba(155, 109, 255, 0.1); }

/* ============================================
   MODALS
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }

/* Task modal must appear above the project detail modal */
#taskModal { z-index: 1100; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal::-webkit-scrollbar { width: 4px; }
.modal::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--accent2);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1;
}
.modal-close:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }

.modal-body { display: flex; flex-direction: column; gap: 0.75rem; }
.modal-row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.modal-field { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 120px; }
.modal-field label {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-input {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 0.2s;
}
.modal-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 109, 255, 0.1);
}
.modal-input.big { font-size: 1.1rem; padding: 0.75rem 1rem; }
.modal-input.color-inp { padding: 0.25rem; height: 40px; cursor: pointer; }
textarea.modal-input { resize: vertical; }

/* Stepper Component - Minimalist Circular */
.stepper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  height: 42px !important; /* Altura aproximada do modal-input */
  margin: 0 !important;
  padding: 0 !important;
}
.stepper button {
  background: var(--bg3) !important;
  border: 1px solid var(--border) !important;
  color: var(--gold) !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
}
.stepper button:hover {
  background: var(--gold) !important;
  color: var(--bg) !important;
}
.stepper input {
  width: 30px !important;
  background: transparent !important;
  border: none !important;
  color: var(--text) !important;
  text-align: center !important;
  font-family: var(--font-heading) !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  padding: 0 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
.stepper input { -moz-appearance: textfield !important; }

.modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }

/* Chat notes */
.chat-notes {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem 0;
}
.chat-notes::-webkit-scrollbar { width: 3px; }
.chat-notes::-webkit-scrollbar-thumb { background: var(--border2); }

.note-bubble {
  background: rgba(155, 109, 255, 0.1);
  border: 1px solid rgba(155, 109, 255, 0.18);
  border-radius: 12px 12px 4px 12px;
  padding: 0.6rem 0.9rem;
  max-width: 85%;
  align-self: flex-end;
  transition: all 0.2s;
  animation: bubbleIn 0.2s ease;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: scale(0.95) translateX(8px); }
  to   { opacity: 1; transform: scale(1) translateX(0); }
}
.note-bubble.expanded { max-width: 100%; }
.note-text { font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.note-meta { font-size: 0.63rem; color: var(--muted2); margin-top: 4px; text-align: right; }
.note-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  justify-content: flex-end;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}
.note-bubble:hover .note-actions { opacity: 1; }
.note-action-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.7rem;
  font-family: var(--font-body);
  color: var(--muted);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.note-action-btn:hover { background: var(--bg3); color: var(--text); border-color: var(--border); }
.note-delete-btn:hover { background: rgba(255,80,80,0.1); color: var(--danger); border-color: rgba(255,80,80,0.3); }
.note-compose { display: flex; gap: 0.5rem; align-items: flex-end; }
.note-compose textarea {
  flex: 1;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: vertical;
  min-height: 120px;
}
.note-compose textarea:focus { outline: none; border-color: var(--accent); }

/* Subtasks */
.subtask-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; }
.subtask-item input[type="checkbox"] { accent-color: var(--accent); width: 14px; height: 14px; }
.subtask-item input[type="text"] {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
}
.subtask-item input[type="text"]:focus { outline: none; border-bottom-color: var(--accent); }
.subtask-del { background: none; border: none; color: var(--muted2); cursor: pointer; font-size: 0.8rem; }

/* Star Rating */
.star-rating { display: flex; gap: 4px; }
.star { font-size: 1.3rem; cursor: pointer; transition: transform 0.15s; color: var(--border2); }
.star:hover,
.star.active { color: var(--gold); transform: scale(1.15); }

/* Map preview */
.map-preview {
  width: 100%; height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
  margin-top: 0.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--muted2);
  font-size: 0.8rem;
}
.map-preview.visible { display: flex; }
.map-preview iframe { width: 100%; height: 100%; border: none; }

/* Poster preview */
.poster-preview { width: 80px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg3); border: 1px solid var(--border); display: none; }
.poster-preview.visible { display: block; }
.poster-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Checkbox label */
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.85rem; }
.checkbox-label input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Custom Days (Recurrence) */
.custom-days-row { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.day-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.78rem;
  transition: all 0.15s;
}
.day-btn:hover { border-color: var(--border2); color: var(--text); }
.day-btn.active { background: rgba(155, 109, 255, 0.15); border-color: var(--accent); color: var(--accent2); }

/* ============================================
   LEVEL UP MODAL
   ============================================ */
.level-up-modal {
  text-align: center;
  max-width: 420px;
  background: linear-gradient(135deg, var(--bg2), #1a0f30);
  border-color: var(--gold);
  box-shadow: 0 0 40px rgba(245, 200, 66, 0.25), var(--shadow-lg);
}
.level-up-fx { position: relative; }
.lu-stars { position: absolute; inset: 0; pointer-events: none; }
.lu-avatar {
  font-size: 5rem;
  margin: 1rem 0;
  filter: drop-shadow(0 0 20px gold);
  animation: luPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes luPop {
  from { transform: scale(0); }
  70%  { transform: scale(1.15); }
  to   { transform: scale(1); }
}
.lu-title { font-family: var(--font-display); font-size: 1.3rem; color: var(--gold); margin-bottom: 0.5rem; }
.lu-level { font-size: 1.1rem; color: var(--accent2); margin-bottom: 1rem; }
.lu-reward {
  font-size: 0.9rem;
  color: var(--text);
  background: rgba(245, 200, 66, 0.08);
  border: 1px solid rgba(245, 200, 66, 0.25);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.lu-btn { width: 100%; margin-top: 0.5rem; }

/* ============================================
   FOCUS / POMODORO
   ============================================ */
.focus-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.focus-timer-card {
  background: rgba(31, 26, 46, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  /* Sutil glow como os dash-cards */
  box-shadow: 0 0 0 1px var(--border), 0 4px 24px rgba(0, 0, 0, 0.3);
}

/* Focus Timer States & Dynamic Colors (Both Themes) */
.focus-timer-card.work .focus-timer-display { color: var(--accent) !important; }
.focus-timer-card.work .focus-mode-label { color: var(--accent) !important; }
.focus-timer-card.work #focusRing { stroke: var(--accent) !important; }

.focus-timer-card.short .focus-timer-display { color: var(--gold) !important; }
.focus-timer-card.short .focus-mode-label { color: var(--gold) !important; }
.focus-timer-card.short #focusRing { stroke: var(--gold) !important; }

.focus-timer-card.long .focus-timer-display { color: var(--teal) !important; }
.focus-timer-card.long .focus-mode-label { color: var(--teal) !important; }
.focus-timer-card.long #focusRing { stroke: var(--teal) !important; }
.focus-mode-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}
.focus-ring-wrap {
  position: relative;
  width: 200px; height: 200px;
  margin: 0 auto 1.25rem;
}
.focus-svg { width: 200px; height: 200px; }
#focusRing { transition: stroke-dashoffset 1s linear; }
.focus-timer-display {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 2.4rem;
  color: var(--text);
  letter-spacing: 0.05em;
}

.focus-mode-btns {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.focus-mode-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.28rem 0.85rem;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.78rem;
  font-family: var(--font-body);
  transition: all 0.15s;
}
.focus-mode-pill:hover,
.focus-mode-pill.active {
  background: rgba(155, 109, 255, 0.1);
  border-color: var(--accent);
  color: var(--accent2);
}

.focus-controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.focus-big-btn { padding: 0.65rem 1.5rem; font-size: 1rem; }
.focus-short-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.focus-side { display: flex; flex-direction: column; gap: 1rem; }
.focus-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.focus-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
}
.focus-history-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.focus-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 320px;
  overflow-y: auto;
}
.focus-history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  border: 1px solid var(--border);
  transition: border-color 0.15s;
}
.focus-history-item:hover { border-color: var(--border2); }
.focus-hist-icon { font-size: 1rem; flex-shrink: 0; }
.focus-hist-info { flex: 1; min-width: 0; }
.focus-hist-task { font-size: 0.7rem; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================
   NOTES HUB
   ============================================ */
.notes-search-bar { margin-bottom: 1.25rem; }
.notes-search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s;
}
.notes-search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(155, 109, 255, 0.12);
}
.notes-search-input::placeholder { color: var(--muted2); }

.notes-hub {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  transition: border-color 0.2s;
  animation: fadeIn 0.2s ease;
  /* Mesma textura dos dash-cards */
  backdrop-filter: blur(4px);
}
.note-card:hover { border-color: var(--border2); }
.note-card-text {
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 0.75rem;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
.note-card-meta { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #7c3aed);
  border: none;
  color: white;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--border2); color: var(--text); }

.btn-ghost {
  background: none;
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: all 0.15s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }

.btn-connect {
  background: rgba(155, 109, 255, 0.08);
  border: 1px solid rgba(155, 109, 255, 0.25);
  color: var(--accent2);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  transition: all 0.15s;
}
.btn-connect:hover { background: rgba(155, 109, 255, 0.15); border-color: var(--accent); }
.btn-connect.connected { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.3); color: var(--success); }

.btn-danger {
  background: rgba(248, 113, 113, 0.08);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: var(--danger);
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  width: 100%;
  transition: all 0.15s;
}
.btn-danger:hover { background: rgba(248, 113, 113, 0.15); border-color: var(--danger); }

.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.85rem;
}
.filter-select:focus { outline: none; border-color: var(--accent); }

/* ============================================
   TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  animation: toastIn 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 200px;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error   { border-left: 3px solid var(--danger); }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================
   EVENT LIST
   ============================================ */
.event-list { display: flex; flex-direction: column; gap: 0.5rem; }
.event-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.event-item:last-child { border-bottom: none; }
.event-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.event-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); min-width: 70px; }
.event-name { font-size: 0.85rem; }

/* ============================================
   AUTH OVERLAY — tom alinhado ao universo Arcanum
   ============================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 5, 12, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Orbs sutis no fundo do auth */
.auth-overlay::before,
.auth-overlay::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.auth-overlay::before {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18), transparent);
  top: -100px; left: -80px;
}
.auth-overlay::after {
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.12), transparent);
  bottom: -60px; right: -60px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(155, 109, 255, 0.1);
  animation: modalIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  display: block;
  /* Usa o mesmo glyph pulsante do logo */
  animation: glyphPulse 3s ease-in-out infinite;
  color: var(--gold);
}
.auth-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent2);
  margin-bottom: 0.5rem;
  /* Mesmo gradiente dos section-titles */
  background: linear-gradient(135deg, var(--text) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-header p { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }

.auth-body { display: flex; flex-direction: column; gap: 1rem; }
#authForm { display: flex; flex-direction: column; }
#authForm .modal-field + .modal-field { margin-top: 1.25rem; }
#authForm .auth-actions { margin-top: 15px; }

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  color: var(--muted2);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .focus-layout   { grid-template-columns: 1fr; }
  .calendar-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar        { width: var(--sidebar-collapsed); }
  .main-content   { margin-left: var(--sidebar-collapsed); }
  .quickadd-bar   { left: var(--sidebar-collapsed); }
  .span-2         { grid-column: span 1; }
  .task-columns   { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .section        { padding: 1rem 1rem 3rem; }
  .focus-stats-row { grid-template-columns: repeat(3, 1fr); }
  .notes-hub      { grid-template-columns: 1fr; }
  .system-clock   { display: none; }
}

/* ============================================
   SCROLLBAR GLOBAL
   ============================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

/* ============================================
   TEMAS
   ============================================ */
body.bg-forest {
  --bg: #070f0d;
  --bg2: #0c1a15;
  --bg3: #111f19;
  --surface: #162318;
}
body.bg-moon {
  --bg: #07080f;
  --bg2: #0d0f1c;
  --bg3: #12152a;
}
body.bg-void {
  --bg: #030305;
  --bg2: #060609;
  --bg3: #0a0a10;
}

/* Light Theme Variables & Overrides */
body.light-theme {
  --bg: #fdfcff !important;
  --bg2: #f7f5fa !important;
  --bg3: #eeeaf5 !important;
  --surface: #ffffff !important;
  --surface2: #fdfcff !important;
  --surface-hover: #f3f0f8 !important;
  --border: #e8e3f2 !important;
  --border2: #dad3eb !important;
  --accent: #7c3aed !important;
  --accent2: #6d28d9 !important;
  --accent3: #c084fc !important;
  --gold: #d97706 !important;
  --rose: #db2777 !important;
  --teal: #0f766e !important;
  --text: #3c2f5c !important;
  --muted: #8b7cae !important;
  --muted2: #a79bca !important;
  --shadow: 0 4px 12px rgba(124, 58, 237, 0.03) !important;
  --shadow-lg: 0 8px 24px rgba(124, 58, 237, 0.05) !important;
}

body.light-theme .orb-1 {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.05), transparent) !important;
}
body.light-theme .orb-2 {
  background: radial-gradient(circle, rgba(244, 114, 182, 0.05), transparent) !important;
}
body.light-theme .orb-3 {
  background: radial-gradient(circle, rgba(167, 139, 250, 0.03), transparent) !important;
}
body.light-theme .sidebar {
  background: #fdfcff !important;
  border-right: 1px solid #e8e3f2 !important;
}
body.light-theme .encouragement-modal {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 20px 50px rgba(124, 58, 237, 0.1) !important;
}

/* Light Theme Component Tweaks */
body.light-theme .quickadd-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e8e3f2 !important;
}

body.light-theme .qa-search input {
  background: #f7f5fa !important;
  border: 1px solid #e8e3f2 !important;
  color: #3c2f5c !important;
}

body.light-theme .qa-search input::placeholder {
  color: #a79bca !important;
}

body.light-theme .qa-btn {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  color: #5c4e8c !important;
}

body.light-theme .qa-btn:hover {
  background: #f7f5fa !important;
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}

body.light-theme .dash-card-v2 {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.03) !important;
}

body.light-theme .stat-bubble {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.02) !important;
}

body.light-theme .nav-btn:hover {
  color: var(--text) !important;
  background: var(--surface-hover) !important;
}

body.light-theme .nav-btn.active {
  color: var(--accent) !important;
  background: rgba(124, 58, 237, 0.08) !important;
  box-shadow: inset 3px 0 0 var(--accent) !important;
}

body.light-theme .modal,
body.light-theme .modal-overlay {
  background: rgba(255, 255, 255, 0.98) !important;
  color: var(--text) !important;
}

body.light-theme .modal-input,
body.light-theme .filter-select,
body.light-theme .notes-search-input {
  background: var(--surface) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

body.light-theme .accordion-item {
  background: var(--surface) !important;
  border-color: var(--border) !important;
}

body.light-theme .accordion-header {
  background: var(--bg2) !important;
}

body.light-theme .accordion-header:hover {
  background: var(--surface-hover) !important;
}

body.light-theme .filter-pills {
  background: var(--bg2) !important;
  border-color: var(--border) !important;
}

body.light-theme .filter-pills .pill.active {
  background: var(--surface) !important;
}

body.light-theme .event-item,
body.light-theme .cal-task-row {
  border-bottom-color: var(--border) !important;
}

body.light-theme .cal-task-row {
  background: var(--bg2) !important;
}

/* Light Theme Pomodoro Focus Section & Global Timer Exclusives */
body.light-theme .focus-timer-card {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.03) !important;
}

body.light-theme .focus-stat,
body.light-theme .focus-history-card {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.02) !important;
}

body.light-theme .focus-history-item {
  background: #fdfcff !important;
  border: 1px solid #e8e3f2 !important;
  color: #3c2f5c !important;
}

body.light-theme .focus-history-item:hover {
  border-color: #7c3aed !important;
}

body.light-theme .focus-mode-pill {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
  color: #5c4e8c !important;
}

body.light-theme .focus-mode-pill:hover,
body.light-theme .focus-mode-pill.active {
  background: rgba(124, 58, 237, 0.08) !important;
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}

body.light-theme .global-timer {
  background: #ffffff !important;
  border: 1px solid #e8e3f2 !important;
}

body.light-theme .global-timer:hover {
  background: #f7f5fa !important;
  border-color: #7c3aed !important;
}

body.light-theme .global-timer.work {
  border-color: rgba(124, 58, 237, 0.4) !important;
  box-shadow: 0 0 12px rgba(124, 58, 237, 0.08) !important;
}

body.light-theme .global-timer.short {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.08) !important;
}

body.light-theme .global-timer.long {
  border-color: rgba(15, 118, 110, 0.4) !important;
  box-shadow: 0 0 12px rgba(15, 118, 110, 0.08) !important;
}

body.light-theme .global-timer.work .gt-time { color: #7c3aed !important; }
body.light-theme .global-timer.work .gt-icon { color: #7c3aed !important; }
body.light-theme .global-timer.short .gt-time { color: #d97706 !important; }
body.light-theme .global-timer.short .gt-icon { color: #d97706 !important; }
body.light-theme .global-timer.long .gt-time { color: #0f766e !important; }
body.light-theme .global-timer.long .gt-icon { color: #0f766e !important; }

/* Font themes */
body.font-mono {
  --font-body: "JetBrains Mono", monospace;
  font-size: 14px;
}

/* Global Timer */
/* Global Timer Statuses */
.global-timer.active {
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(139, 111, 168, 0.3);
}
.global-timer.short {
  color: var(--gold);
  border-color: var(--gold);
}
.global-timer.long {
  color: #5eead4;
  border-color: #5eead4;
}
.project-quick-add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}

/* Project Detail Layout */
.project-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 700px) {
  .project-detail-grid {
    grid-template-columns: 1fr;
  }
}
.project-tasks-col, .project-notes-col {
  display: flex;
  flex-direction: column;
}

/* Accordions */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--surface);
  overflow: hidden;
}
.accordion-header {
  padding: 1rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  user-select: none;
  background: var(--bg2);
  transition: background 0.2s;
}
.accordion-header:hover {
  background: var(--surface-hover);
}
.accordion-body {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: none;
}
.accordion-item.open .accordion-body {
  display: block;
}
.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
}
.accordion-icon {
  transition: transform 0.2s;
  color: var(--muted);
}

/* Auth Overlay */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  animation: modalFadeIn 0.5s ease;
}
.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo {
  font-size: 3rem;
  color: var(--gold);
  text-shadow: 0 0 20px rgba(212,175,55,0.3);
  margin-bottom: 1rem;
}
.auth-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.auth-header p {
  color: var(--muted);
  font-size: 0.9rem;
}
.auth-footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

/* ============================================
   ENCOURAGEMENT MODAL
   ============================================ */
#encouragementModal {
  z-index: 1200;
  background: rgba(13, 11, 20, 0.85);
}

.encouragement-modal {
  max-width: 480px;
  background: rgba(31, 26, 46, 0.85) !important;
  backdrop-filter: blur(20px);
  border: 1px solid var(--rose) !important;
  box-shadow: 0 10px 40px rgba(244, 114, 182, 0.2), var(--shadow-lg) !important;
  border-radius: var(--radius-lg);
  text-align: center;
  padding: 2.5rem 2rem;
  overflow: hidden;
  position: relative;
}

.encouragement-modal::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.encouragement-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.encouragement-heart-wrap {
  position: relative;
  width: 80px; height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.encouragement-heart {
  font-size: 3.5rem;
  display: inline-block;
  animation: beat 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 15px rgba(244, 114, 182, 0.6));
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.12); }
  40% { transform: scale(1.05); }
  60% { transform: scale(1.15); }
}

.encouragement-sparkles {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--accent3);
  pointer-events: none;
  animation: rotateSparkles 8s linear infinite;
}

@keyframes rotateSparkles {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.encouragement-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--text) 0%, var(--rose) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.encouragement-text {
  font-family: var(--font-body);
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.encouragement-btn {
  background: linear-gradient(135deg, var(--accent) 0%, var(--rose) 100%) !important;
  border: none !important;
  color: white !important;
  padding: 0.75rem 2rem !important;
  font-size: 1rem !important;
  font-weight: 600;
  border-radius: 30px !important;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(244, 114, 182, 0.3) !important;
  transition: all 0.2s ease;
}

.encouragement-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 114, 182, 0.5) !important;
  background: linear-gradient(135deg, var(--rose) 0%, var(--accent2) 100%) !important;
}

.auth-footer a {
  transition: all 0.2s ease;
}

.auth-footer a:hover {
  color: var(--accent2) !important;
  text-shadow: 0 0 10px var(--accent);
}
