/* ═══════════════════════════════════════════════════════
   PlanXP — Desktop-first CSS
   Sidebar lateral esquerda · Main content à direita
   Mantém todos os IDs/classes do JS original
═══════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────── */
:root {
  --bg-primary:    #0E0E14;
  --bg-secondary:  #16161F;
  --bg-card:       #1C1C28;
  --bg-card2:      #20202E;
  --accent:        #7C6FCD;
  --accent-blue:   #5B8DEF;
  --accent-teal:   #4ECDC4;
  --accent-warn:   #FFD166;
  --accent-danger: #EF476F;
  --text:          #F0EFF5;
  --text-sec:      #8F8FA8;
  --text-muted:    #4E4E65;
  --border:        rgba(255,255,255,0.06);
  --border-accent: rgba(124,111,205,0.2);
  --radius-card:   16px;
  --radius-btn:    12px;
  --radius-pill:   50px;
  /* sidebar */
  --sidebar-w:     220px;
  --sidebar-collapsed-w: 64px;
  /* nav (mobile fallback) */
  --nav-h:         72px;
  --safe-bottom:   env(safe-area-inset-bottom, 0px);
  --safe-top:      env(safe-area-inset-top, 0px);

  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  color: var(--text);
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden; /* sidebar + main handle their own scroll */
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; color: inherit; background: none; border: none; outline: none; }
a { color: var(--accent); text-decoration: none; }
.hidden { display: none !important; }
.rajdhani { font-family: 'Rajdhani', sans-serif; }
.w-full { width: 100%; }
.mt-16 { margin-top: 16px; }
.mt-10 { margin-top: 10px; }

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

/* ════════════════════════════════════════════════════════
   AUTH
════════════════════════════════════════════════════════ */
.auth-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-primary);
  z-index: 900;
  gap: 14px;
  padding: 24px;
}
#auth-particles { position: absolute; inset: 0; pointer-events: none; }
.auth-logo { font-family: 'Rajdhani', sans-serif; font-size: 34px; font-weight: 700; color: var(--accent); letter-spacing: 2px; }
.auth-tagline { min-height: 22px; font-size: 13px; color: var(--text-muted); }
.auth-tabs { display: flex; gap: 4px; background: var(--bg-card); border-radius: var(--radius-pill); padding: 4px; }
.auth-tab { padding: 8px 28px; border-radius: var(--radius-pill); font-weight: 700; font-size: 13px; color: var(--text-muted); transition: all .2s; }
.auth-tab.active { background: var(--accent); color: #fff; }
.auth-panel { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 10px; }
.auth-input-wrap { position: relative; }
.auth-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.auth-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 13px 14px 13px 40px; font-size: 14px; color: var(--text); transition: border-color .2s; }
.auth-input:focus { border-color: var(--accent); }
.auth-eye-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.auth-forgot { font-size: 12px; color: var(--accent); text-align: right; margin-top: -4px; }
.auth-feedback { width: 100%; max-width: 380px; padding: 10px 14px; border-radius: var(--radius-btn); font-size: 13px; font-weight: 700; background: rgba(239,71,111,0.12); color: var(--accent-danger); border: 1px solid rgba(239,71,111,0.2); }
.auth-strength-wrap { display: flex; align-items: center; gap: 8px; }
.auth-strength-track { flex: 1; height: 4px; background: var(--bg-card2); border-radius: 2px; }
.auth-strength-fill { height: 100%; border-radius: 2px; background: var(--accent-teal); transition: width .3s; width: 0; }
.auth-strength-label { font-size: 11px; color: var(--text-muted); min-width: 36px; }
.auth-terms { font-size: 11px; color: var(--text-muted); text-align: center; }
.auth-link { color: var(--accent); cursor: pointer; }

/* ════════════════════════════════════════════════════════
   ONBOARDING
════════════════════════════════════════════════════════ */
.onboarding {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--bg-primary);
  z-index: 900; padding: 32px 24px; gap: 18px;
}
#ob-particles { position: absolute; inset: 0; pointer-events: none; }
.ob-progress-track { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--bg-card); }
.ob-progress-fill { height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; transition: width .4s; width: 0; }
.ob-screen { display: none; flex-direction: column; align-items: center; text-align: center; gap: 14px; width: 100%; max-width: 440px; position: relative; z-index: 1; }
.ob-screen.active { display: flex; }
.ob-logo { display: flex; align-items: center; gap: 10px; font-family: 'Rajdhani', sans-serif; font-size: 30px; font-weight: 700; color: var(--accent); }
.ob-logo-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #fff; }
.ob-title { font-size: 32px; font-weight: 800; line-height: 1.2; color: var(--text); }
.ob-title-accent { color: var(--accent); }
.ob-sub { font-size: 14px; color: var(--text-sec); }
.ob-heading { font-size: 22px; font-weight: 800; color: var(--text); }
.ob-hint { font-size: 13px; color: var(--text-muted); }
.ob-step-label { font-size: 11px; font-weight: 700; color: var(--text-muted); letter-spacing: .08em; text-transform: uppercase; }
.ob-input-wrap { position: relative; width: 100%; }
.ob-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.ob-input { width: 100%; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 13px 14px 13px 40px; font-size: 15px; color: var(--text); }
.ob-input:focus { border-color: var(--accent); outline: none; }
.ob-options { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.ob-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1.5px solid var(--border); text-align: left; transition: all .2s; }
.ob-opt.active, .ob-opt:hover { border-color: var(--accent); background: rgba(124,111,205,.12); }
.ob-opt-icon { width: 36px; height: 36px; border-radius: 10px; background: rgba(124,111,205,.15); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--accent); flex-shrink: 0; }
.ob-opt-text { display: flex; flex-direction: column; }
.ob-opt-text strong { font-size: 14px; font-weight: 700; }
.ob-opt-text small { font-size: 11px; color: var(--text-muted); }
.ob-daily-goal-row { display: flex; align-items: center; justify-content: space-between; width: 100%; background: var(--bg-card); border-radius: var(--radius-btn); padding: 12px 14px; }
.ob-goal-label { font-size: 13px; font-weight: 700; color: var(--text-sec); }
.ob-goal-stepper { display: flex; align-items: center; gap: 12px; }
.ob-step-btn { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
#ob-goal-val { font-family: 'Rajdhani', sans-serif; font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }
.ob-finish-anim { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ob-ring-wrap { position: relative; width: 120px; height: 120px; }
.ob-ring-svg { width: 120px; height: 120px; transform: rotate(-90deg); }
.ob-ring-bg  { fill: none; stroke: var(--bg-card); stroke-width: 8; }
.ob-ring-arc { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 326; stroke-dashoffset: 326; }
.ob-ring-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 32px; color: var(--accent); }
.ob-finish-label { font-size: 20px; font-weight: 800; }
.ob-finish-sub { font-size: 13px; color: var(--text-muted); }
.ob-tut-header { text-align: center; }
.ob-tut-visual { width: 100%; min-height: 140px; background: var(--bg-card); border-radius: var(--radius-card); display: flex; align-items: center; justify-content: center; }
.ob-tut-dots { display: flex; gap: 6px; }
.ob-tut-nav { display: flex; gap: 10px; width: 100%; }
.ob-tut-skip { flex: 1; padding: 13px; border-radius: var(--radius-btn); color: var(--text-muted); background: var(--bg-card); font-weight: 700; }
.ob-cta-pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(124,111,205,.4); } 50% { box-shadow: 0 0 0 10px rgba(124,111,205,0); } }

/* ════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════ */
.btn-primary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 20px; border-radius: var(--radius-btn);
  background: var(--accent); color: #fff;
  font-size: 14px; font-weight: 800;
  transition: opacity .2s, transform .1s;
}
.btn-primary:hover  { opacity: .9; }
.btn-primary:active { transform: scale(.97); }
.btn-secondary {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 20px; border-radius: var(--radius-btn);
  background: var(--bg-card); color: var(--text-sec);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 700;
  transition: background .2s;
}
.btn-secondary:hover { background: var(--bg-card2); }
.btn-danger {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 20px; border-radius: var(--radius-btn);
  background: var(--accent-danger); color: #fff;
  font-size: 14px; font-weight: 800;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card); color: var(--text-sec);
  border: 1px solid var(--border);
  transition: background .2s;
}
.icon-btn:hover { background: var(--bg-card2); color: var(--text); }

/* ════════════════════════════════════════════════════════
   APP LAYOUT — SIDEBAR + MAIN
════════════════════════════════════════════════════════ */
#app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  transition: width .25s ease;
  position: relative;
  z-index: 10;
}

.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px 16px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  position: relative;
  transition: background .15s, color .15s;
  white-space: nowrap;
  overflow: hidden;
}
.sidebar-btn i { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.sidebar-btn:hover { background: var(--bg-card); color: var(--text-sec); }
.sidebar-btn.active { background: rgba(124,111,205,.15); color: var(--accent); }
.sidebar-btn.active i { color: var(--accent); }

.sidebar-badge {
  margin-left: auto;
  background: var(--accent-danger);
  color: #fff; font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; flex-shrink: 0;
}

.sidebar-divider {
  height: 1px; background: var(--border);
  margin: 6px 10px;
}

.sidebar-bottom {
  padding: 8px 8px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-profile {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 2px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.sidebar-profile-info { flex: 1; min-width: 0; overflow: hidden; }
.sidebar-profile-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar-profile-level { font-size: 11px; color: var(--text-muted); display: block; }
.sidebar-streak { flex-shrink: 0; }

.sidebar-xp-bar {
  height: 3px; background: var(--bg-card);
  border-radius: 2px; margin: 0 6px;
  overflow: hidden;
}
.sidebar-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-teal));
  border-radius: 2px; transition: width .4s;
  width: 0;
}

/* ── MAIN CONTENT ────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── SCREENS ─────────────────────────────────────────── */
.tab-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  flex: 1;
}
.tab-screen.active { display: flex; }

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
}

/* ── HEADER ──────────────────────────────────────────── */
.app-header.desktop-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  padding: 0;
  background: none;
}
.greeting-sub  { font-size: 12px; color: var(--text-muted); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.greeting-name { font-size: 26px; font-weight: 800; color: var(--text); margin-top: 2px; }
.page-title    { font-size: 20px; font-weight: 800; color: var(--text); }
.header-right  { display: flex; align-items: center; gap: 10px; }

/* ════════════════════════════════════════════════════════
   TODAY SCREEN LAYOUT
════════════════════════════════════════════════════════ */
.today-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  align-items: start;
}
.today-main { min-width: 0; }
.today-sidebar-panel { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }

.today-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px;
}
.today-panel-title {
  font-size: 12px; font-weight: 700;
  color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.today-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.today-stat { background: var(--bg-card2); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.today-stat-val  { font-family: 'Rajdhani', sans-serif; font-size: 22px; font-weight: 700; color: var(--text); }
.today-stat-label{ font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

/* ── HERO CARD ───────────────────────────────────────── */
.hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-card);
  padding: 18px 20px;
  margin-bottom: 20px;
}
.hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.hero-date { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.hero-summary { font-size: 14px; font-weight: 700; color: var(--text-sec); margin-top: 2px; }
.hero-pct { font-family: 'Rajdhani', sans-serif; font-size: 28px; font-weight: 700; color: var(--accent); }
.progress-track { height: 6px; background: var(--bg-card2); border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.progress-fill  { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.hero-next { display: flex; align-items: center; gap: 8px; }
.hero-next-label { font-size: 11px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.hero-next-task  { font-size: 13px; color: var(--text-sec); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── TASK SECTIONS ───────────────────────────────────── */
.task-section { margin-bottom: 8px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px;
  cursor: pointer;
  user-select: none;
}
.section-title { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; display: flex; align-items: center; gap: 6px; }
.section-title i { font-size: 10px; }
.sec-chevron { font-size: 11px; color: var(--text-muted); transition: transform .25s; }
.sec-chevron.open { transform: rotate(180deg); }

.task-list { display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }

.empty-inline { padding: 12px 0; }
.empty-first-cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 24px 0 10px; }
.empty-first-cta i { font-size: 22px; color: var(--accent); opacity: .4; }
.empty-first-cta p { font-size: 14px; font-weight: 700; color: var(--text-sec); }
.empty-first-cta span { font-size: 12px; color: var(--text-muted); max-width: 260px; line-height: 1.5; }

/* ── TASK CARD ───────────────────────────────────────── */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 0;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
  position: relative;
}
.task-card:hover { border-color: var(--border-accent); }
.task-card.completed { opacity: .5; }
.task-card.overdue { border-color: rgba(239,71,111,.25); }

.task-card-inner { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }

.task-check-wrap { flex-shrink: 0; }
.task-check-ring {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: border-color .2s;
}
.task-card:hover .task-check-ring { border-color: var(--accent); }
.hold-ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(transparent 0deg, transparent 0deg);
}
.task-icon { font-size: 12px; color: var(--text-muted); z-index: 1; }
.task-check-done { font-size: 12px; color: var(--accent-teal); display: none; }
.completed .task-check-done { display: block; }
.completed .task-icon { display: none; }

.task-content { flex: 1; min-width: 0; }
.task-title { font-size: 13px; font-weight: 700; color: var(--text); line-height: 1.4; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 4px; }
.task-cat-tag { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-pill); display: flex; align-items: center; gap: 3px; }
.task-imp-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill); }
.imp-mandatory { background: rgba(239,71,111,.15); color: #EF476F; }
.imp-necessary  { background: rgba(255,209,102,.15); color: #FFD166; }
.imp-standard   { background: rgba(78,205,196,.12); color: #4ECDC4; }
.imp-idea       { background: rgba(124,111,205,.12); color: #7C6FCD; }
.task-meta-extra { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.task-overdue-tag { font-size: 10px; font-weight: 700; color: #EF476F; background: rgba(239,71,111,.1); padding: 2px 6px; border-radius: var(--radius-pill); }
.task-remind-tag  { font-size: 10px; font-weight: 700; color: var(--accent-warn); background: rgba(255,209,102,.1); padding: 2px 6px; border-radius: var(--radius-pill); }
.task-insistent-tag { font-size: 10px; font-weight: 700; color: var(--accent); background: rgba(124,111,205,.1); padding: 2px 6px; border-radius: var(--radius-pill); }
.task-assigned-tag  { font-size: 10px; font-weight: 700; color: var(--accent-teal); background: rgba(78,205,196,.1); padding: 2px 6px; border-radius: var(--radius-pill); }
.task-notes { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.task-xp {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px; font-weight: 700;
  color: var(--accent); flex-shrink: 0;
}

.task-actions {
  display: none;
  align-items: center; gap: 4px;
  padding: 0 8px 8px;
}
.task-card:hover .task-actions { display: flex; }
.task-action-btn {
  padding: 5px 10px; border-radius: 8px;
  font-size: 12px; color: var(--text-muted);
  background: var(--bg-card2);
  transition: background .2s, color .2s;
}
.task-action-btn:hover { background: var(--border-accent); color: var(--accent); }
.task-action-btn.action-delete:hover { background: rgba(239,71,111,.12); color: #EF476F; }

/* ── IMP DOTS ─────────────────────────────────────────── */
.imp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.imp-dot.imp-mandatory { background: #EF476F; }
.imp-dot.imp-necessary  { background: #FFD166; }
.imp-dot.imp-standard   { background: #4ECDC4; }
.imp-dot.imp-idea       { background: #7C6FCD; }

/* ── MISSION CARD ────────────────────────────────────── */
.mission-task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 6px;
}
.mtc-swipe-layer { transition: transform .15s, opacity .15s; }
.mtc-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; }
.mtc-icon { width: 32px; height: 32px; border-radius: 10px; background: rgba(124,111,205,.15); display: flex; align-items: center; justify-content: center; font-size: 14px; color: var(--accent); flex-shrink: 0; }
.mtc-info { flex: 1; min-width: 0; }
.mtc-title { font-size: 13px; font-weight: 700; color: var(--text); }
.mtc-meta  { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.mtc-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill); background: rgba(124,111,205,.12); color: var(--accent); }
.mtc-xp-total { font-family: 'Rajdhani', sans-serif; font-size: 13px; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.mtc-add-btn { width: 26px; height: 26px; border-radius: 8px; background: rgba(78,205,196,.12); color: var(--accent-teal); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.mtc-chevron { font-size: 11px; color: var(--text-muted); transition: transform .25s; flex-shrink: 0; }
.mtc-chevron.open { transform: rotate(180deg); }

.mtc-progress-wrap { padding: 0 14px 10px; }
.mtc-progress-track { height: 4px; background: var(--bg-card2); border-radius: 2px; overflow: hidden; }
.mtc-progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s; }
.mtc-progress-label { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.mtc-subtasks { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.mtc-subtasks.open { max-height: 1000px; }
.mtc-subtask-list { border-top: 1px solid var(--border); }
.mtc-subtask { padding: 9px 14px; border-bottom: 1px solid var(--border); cursor: pointer; }
.mtc-subtask.done { opacity: .45; }
.mtc-subtask-inner { display: flex; align-items: center; gap: 8px; }
.mtc-sub-check-wrap { flex-shrink: 0; }
.mtc-sub-check-ring { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border-accent); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.mtc-sub-check-ring i { font-size: 10px; color: var(--text-muted); }
.mtc-sub-hold-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(transparent 0deg, transparent 0deg); }
.mtc-sub-content { flex: 1; min-width: 0; }
.mtc-sub-title { font-size: 12px; font-weight: 700; color: var(--text); }
.mtc-sub-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mtc-sub-time { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; gap: 3px; }
.mtc-sub-tip  { font-size: 10px; color: var(--accent); font-style: italic; }
.mtc-sub-xp   { font-family: 'Rajdhani', sans-serif; font-size: 12px; font-weight: 700; color: var(--accent-teal); flex-shrink: 0; }
.mtc-loading  { display: flex; align-items: center; gap: 10px; padding: 16px 14px; }
.mtc-loading-text { font-size: 13px; color: var(--text-muted); }
.mtc-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border-accent); border-top-color: var(--accent); animation: spin .7s linear infinite; flex-shrink: 0; }
.mtc-error { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-size: 12px; color: #EF476F; }
.mission-task-card.all-done .mtc-icon { background: rgba(78,205,196,.15); color: var(--accent-teal); }

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

/* ── FOCUS LAYOUT ────────────────────────────────────── */
.focus-layout { max-width: 560px; margin: 0 auto; }
.focus-main { display: flex; flex-direction: column; gap: 20px; }
.focus-task-selector { }
.focus-select-label { display: block; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.focus-duration-row { display: flex; align-items: center; gap: 12px; }
.focus-dur-label { font-size: 13px; font-weight: 700; color: var(--text-sec); white-space: nowrap; }
.focus-dur-label span { color: var(--accent); }
input[type=range] { flex: 1; accent-color: var(--accent); height: 4px; }

.timer-ring-container {
  position: relative; width: 220px; height: 220px; margin: 10px auto;
  display: flex; align-items: center; justify-content: center;
}
.timer-ring { width: 220px; height: 220px; transform: rotate(-90deg); position: absolute; }
.ring-bg   { fill: none; stroke: var(--bg-card2); stroke-width: 8; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 603; stroke-dashoffset: 0; transition: stroke-dashoffset .5s linear; }
.timer-display { position: relative; z-index: 1; text-align: center; }
.timer-time  { font-family: 'Rajdhani', sans-serif; font-size: 48px; font-weight: 700; color: var(--text); }
.timer-state { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.focus-controls { display: flex; align-items: center; justify-content: center; gap: 16px; }
.focus-btn { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.focus-btn.primary   { background: var(--accent); color: #fff; }
.focus-btn.secondary { background: var(--bg-card); color: var(--text-sec); border: 1px solid var(--border); }
.session-counter { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; font-weight: 600; }

/* ── MISSIONS ────────────────────────────────────────── */
.missions-list { display: flex; flex-direction: column; gap: 10px; }
.mission-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px; position: relative; }
.mission-card.bonus { border-color: var(--border-accent); }
.mission-card.done  { opacity: .55; }
.bonus-badge { position: absolute; top: -8px; left: 14px; background: var(--accent-warn); color: #1a1308; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: var(--radius-pill); display: flex; align-items: center; gap: 4px; }
.mission-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.mission-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; }
.mission-reward { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mission-xp    { font-family: 'Rajdhani', sans-serif; font-size: 14px; font-weight: 700; color: var(--accent); }
.mission-coins { font-size: 12px; color: var(--accent-warn); display: flex; align-items: center; gap: 3px; }
.mission-progress-track { height: 5px; background: var(--bg-card2); border-radius: 3px; overflow: hidden; }
.mission-progress-fill  { height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.mission-progress-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.mission-done-mark { font-size: 13px; color: var(--accent-teal); font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mission-timer { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; font-weight: 600; font-family: 'JetBrains Mono', monospace; }

/* ── ACHIEVEMENTS ────────────────────────────────────── */
.badges-grid { padding-bottom: 20px; }
.badge-section-header { display: flex; align-items: center; gap: 10px; padding: 14px 0 8px; }
.badge-rarity-pill { font-size: 10px; font-weight: 800; padding: 3px 10px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: .06em; }
.badge-rarity-count { font-size: 12px; color: var(--text-muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; }
.badge-item { width: 120px; padding: 14px 10px; border-radius: var(--radius-card); border: 1px solid var(--border); background: var(--bg-card); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; transition: transform .2s; cursor: default; }
.badge-item.unlocked { cursor: pointer; }
.badge-item.unlocked:hover { transform: translateY(-2px); }
.badge-icon { font-size: 26px; }
.badge-icon-locked { font-size: 18px; color: var(--text-muted); opacity: .3; }
.badge-name { font-size: 11px; font-weight: 700; color: var(--text); }
.badge-desc { font-size: 10px; color: var(--text-muted); line-height: 1.4; }
.badge-item.locked { opacity: .45; }

/* ── TIMELINE ────────────────────────────────────────── */
.timeline { display: flex; flex-direction: column; gap: 0; padding: 4px 0; max-width: 560px; }
.timeline-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-left: 2px solid var(--border); margin-left: 10px; padding-left: 20px; position: relative; opacity: 0; transform: translateX(-8px); transition: opacity .35s, transform .35s; }
.timeline-item.visible { opacity: 1; transform: none; }
.timeline-dot { position: absolute; left: -11px; top: 14px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-card); border: 2px solid var(--border-accent); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.timeline-body { flex: 1; }
.timeline-title { font-size: 13px; font-weight: 700; color: var(--text); }
.timeline-date  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── PLAN TABS ───────────────────────────────────────── */
.plan-tabs { display: flex; gap: 4px; flex-wrap: wrap; background: var(--bg-card); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 16px; width: fit-content; }
.plan-tab { padding: 7px 16px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .2s; position: relative; white-space: nowrap; }
.plan-tab.active { background: var(--accent); color: #fff; }
.plan-tab-badge { position: absolute; top: -4px; right: -4px; background: var(--accent-danger); color: #fff; font-size: 9px; font-weight: 800; min-width: 16px; height: 16px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.plan-filters { margin-bottom: 12px; }
.plan-filters.hidden { display: none; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-chip { display: flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: var(--radius-pill); background: var(--bg-card); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-sec); transition: all .2s; cursor: pointer; }
.cat-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(124,111,205,.1); }
.cc-count { font-size: 10px; color: var(--text-muted); margin-left: 2px; }

.plan-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 48px 0; color: var(--text-muted); font-size: 13px; text-align: center; }
.plan-empty i { font-size: 28px; opacity: .3; }
.plan-group { margin-bottom: 16px; }
.plan-group-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); padding: 6px 2px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }

/* ── SETTINGS LAYOUT ─────────────────────────────────── */
.settings-layout { max-width: 480px; }
.settings-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 13px; font-weight: 600; color: var(--text-sec); }
.settings-input, .settings-select { background: none; border: none; outline: none; font-size: 13px; font-weight: 700; color: var(--text); text-align: right; font-family: inherit; }
.settings-select option { background: var(--bg-card); }
.settings-val { font-size: 14px; font-weight: 700; color: var(--text); }

/* ── EMPRESA ─────────────────────────────────────────── */
.empresa-welcome-card { max-width: 420px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px 28px; text-align: center; }
.empresa-welcome-icon { width: 56px; height: 56px; border-radius: 16px; background: rgba(124,111,205,.15); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--accent); margin: 0 auto 14px; }
.empresa-welcome-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.empresa-welcome-sub   { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin-bottom: 20px; }
.empresa-hero-card { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: var(--radius-card); padding: 16px 18px; margin-bottom: 12px; }
.empresa-hero-left { display: flex; align-items: center; gap: 12px; }
.empresa-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Rajdhani', sans-serif; font-size: 20px; font-weight: 700; }
.empresa-hero-name { font-size: 16px; font-weight: 800; }
.empresa-hero-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.empresa-settings-btn { width: 34px; height: 34px; border-radius: 10px; background: var(--bg-card2); color: var(--text-sec); display: flex; align-items: center; justify-content: center; font-size: 14px; }
.empresa-invite-row { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-btn); padding: 10px 14px; margin-bottom: 16px; }
.empresa-invite-info { display: flex; flex-direction: column; gap: 2px; }
.empresa-invite-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.empresa-invite-code  { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; letter-spacing: .15em; color: var(--accent); }
.empresa-copy-btn { width: 30px; height: 30px; border-radius: 8px; background: var(--bg-card2); color: var(--text-sec); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.empresa-tabs { display: flex; gap: 4px; background: var(--bg-card); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 12px; width: fit-content; }
.empresa-tab { padding: 7px 18px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .2s; display: flex; align-items: center; gap: 6px; }
.empresa-tab.active { background: var(--accent); color: #fff; }
.empresa-tab-content.hidden { display: none !important; }
.empresa-filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.empresa-filter-chip { padding: 5px 12px; border-radius: var(--radius-pill); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .2s; }
.empresa-filter-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(124,111,205,.1); }
.empresa-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.empresa-section-title  { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.empresa-add-btn { width: 24px; height: 24px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.empresa-member-list, .empresa-tarefas-list { display: flex; flex-direction: column; gap: 6px; }
.empresa-empty-groups, .empresa-naoadmin-notice { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 0; color: var(--text-muted); font-size: 13px; text-align: center; }
.empresa-empty-groups i, .empresa-naoadmin-notice i { font-size: 24px; opacity: .3; }
.empresa-segmento-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.empresa-seg-btn { padding: 7px 12px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 5px; transition: all .2s; }
.empresa-seg-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(124,111,205,.1); }
.membro-sheet-profile { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.membro-avatar-big { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; }
.membro-sheet-name { font-size: 15px; font-weight: 800; }
.membro-sheet-role { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.settings-section-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ════════════════════════════════════════════════════════
   SHEETS (Modal-like drawers)
   No desktop ficam centralizados como dialogs
════════════════════════════════════════════════════════ */
.bottom-sheet {
  position: fixed; inset: 0;
  z-index: 800;
  display: flex; align-items: center; justify-content: center;
}
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.sheet-panel {
  position: relative; z-index: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 22px 8px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sheet-handle { display: none; } /* hidden no desktop */
.sheet-title { font-size: 17px; font-weight: 800; color: var(--text); }

/* form inside sheets */
.quick-add-row input {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-btn); padding: 12px 14px;
  font-size: 14px; color: var(--text);
}
.quick-add-row input:focus { border-color: var(--accent); outline: none; }
.quick-add-hint { font-size: 11px; color: var(--text-muted); margin-top: -8px; }
.quick-add-hint code { background: var(--bg-card); padding: 1px 4px; border-radius: 4px; color: var(--accent); font-size: 11px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.half { }
.form-group label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

.date-input, .time-input, .num-input, .text-input, .select-input, .task-notes-input {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-btn); padding: 10px 12px;
  font-size: 13px; color: var(--text); font-family: inherit;
  transition: border-color .2s;
}
.date-input:focus, .time-input:focus, .num-input:focus,
.text-input:focus, .select-input:focus, .task-notes-input:focus {
  border-color: var(--accent); outline: none;
}
.select-input option { background: var(--bg-card2); }
.task-notes-input { resize: vertical; }
.notes-char-counter { font-size: 10px; color: var(--text-muted); text-align: right; margin-top: -8px; }

.category-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.cat-pill-sel { padding: 5px 12px; border-radius: var(--radius-pill); background: var(--bg-card); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-sec); transition: all .2s; }
.cat-pill-sel.active { background: rgba(124,111,205,.15); border-color: var(--accent); color: var(--accent); }

.importance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.imp-btn { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1.5px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-sec); transition: all .2s; }
.imp-btn.active { border-color: var(--accent); background: rgba(124,111,205,.12); color: var(--text); }
.imp-xp { margin-left: auto; font-size: 10px; color: var(--text-muted); font-family: 'Rajdhani', sans-serif; }

.task-type-toggle { display: flex; gap: 6px; }
.task-type-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1.5px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .2s; }
.task-type-btn.active { border-color: var(--accent); background: rgba(124,111,205,.12); color: var(--accent); }
.task-type-hint { font-size: 11px; color: var(--accent); display: flex; align-items: center; gap: 5px; margin-top: -8px; background: rgba(124,111,205,.08); padding: 7px 10px; border-radius: var(--radius-btn); }

.remind-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.remind-pill { padding: 5px 12px; border-radius: var(--radius-pill); background: var(--bg-card); border: 1px solid var(--border); font-size: 12px; font-weight: 700; color: var(--text-muted); transition: all .2s; }
.remind-pill.active, .remind-pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(124,111,205,.1); }
.insistent-badge { font-size: 9px; font-weight: 800; padding: 2px 6px; border-radius: var(--radius-pill); background: var(--accent-danger); color: #fff; margin-left: 6px; }
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; inset: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-pill); transition: .3s; cursor: pointer; }
.toggle-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: var(--text-muted); border-radius: 50%; transition: .3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); background: #fff; }

.color-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.color-swatch { width: 26px; height: 26px; border-radius: 8px; cursor: pointer; border: 2px solid transparent; transition: transform .15s; }
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: #fff; transform: scale(1.12); }
.icon-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-option { width: 34px; height: 34px; border-radius: 9px; background: var(--bg-card); border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; }
.icon-option:hover, .icon-option.active { border-color: var(--accent); background: rgba(124,111,205,.12); }

/* POSTPONE inside sheet */
.postpone-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.postpone-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--text-sec); transition: all .2s; }
.postpone-chip i { font-size: 16px; color: var(--accent); }
.postpone-chip:hover { border-color: var(--accent); background: rgba(124,111,205,.1); }
.postpone-divider { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }
.postpone-divider::before, .postpone-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.postpone-custom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.postpone-field { display: flex; flex-direction: column; gap: 5px; }
.postpone-field label { font-size: 11px; font-weight: 700; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.opt-label { font-size: 9px; color: var(--text-muted); font-weight: 400; }

/* CAL DAY SHEET */
.cal-day-header { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.cal-day-icon-wrap { width: 44px; height: 44px; border-radius: 14px; background: rgba(124,111,205,.15); display: flex; align-items: center; justify-content: center; font-size: 20px; color: var(--accent); flex-shrink: 0; }
.cal-day-header-info { display: flex; flex-direction: column; gap: 2px; }
.cal-day-title { font-size: 16px; font-weight: 800; }
.cal-day-date  { font-size: 12px; color: var(--text-sec); }
.cal-day-type  { font-size: 11px; color: var(--accent); font-weight: 700; }
.cal-day-section-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }

/* MENU SHEET (desktop: vertical centered dialog) */
.menu-profile-row { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.menu-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; }
.menu-avatar-info { flex: 1; min-width: 0; }
.menu-name  { font-size: 15px; font-weight: 800; }
.menu-level { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.menu-xp-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.menu-xp-track { flex: 1; height: 4px; background: var(--bg-card2); border-radius: 2px; overflow: hidden; }
.menu-xp-fill  { height: 100%; background: var(--accent); border-radius: 2px; transition: width .4s; }
.menu-xp-val   { font-size: 10px; color: var(--text-muted); white-space: nowrap; }
.menu-nav { display: flex; flex-direction: column; gap: 4px; }
.menu-nav-btn { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--text-sec); transition: background .2s; }
.menu-nav-btn:hover { background: var(--bg-card); color: var(--text); }
.menu-nav-btn i { width: 16px; text-align: center; }
.menu-badge { background: var(--accent-danger); color: #fff; font-size: 10px; font-weight: 800; min-width: 18px; height: 18px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; padding: 0 4px; margin-left: auto; }

/* SUBTASK AI suggestions */
.ai-suggestion-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1.5px solid var(--border); cursor: pointer; transition: all .2s; }
.ai-suggestion-item.selected { border-color: var(--accent); background: rgba(124,111,205,.1); }
.ai-suggestion-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 11px; color: transparent; flex-shrink: 0; margin-top: 1px; transition: all .2s; }
.ai-suggestion-item.selected .ai-suggestion-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.ai-suggestion-info { flex: 1; }
.ai-suggestion-title { font-size: 13px; font-weight: 700; color: var(--text); }
.ai-suggestion-meta  { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--text-muted); }

/* ── VOICE SHEET ──────────────────────────────────────── */
.voice-sheet {
  position: fixed; inset: 0;
  z-index: 850;
  pointer-events: none;
}
.voice-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); transition: opacity .3s; opacity: 0; }
.voice-sheet-panel {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%);
  width: 100%; max-width: 480px;
  background: var(--bg-secondary); border-radius: 24px 24px 0 0; padding: 20px 24px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  transition: transform .35s cubic-bezier(.32,1,.32,1);
}
.voice-sheet.open { pointer-events: all; }
.voice-sheet.open .voice-sheet-backdrop { opacity: 1; }
.voice-sheet.open .voice-sheet-panel { transform: translateX(-50%) translateY(0); }
.voice-sheet-handle { width: 36px; height: 4px; background: var(--border-accent); border-radius: 2px; }
.voice-mic-wrap { width: 64px; height: 64px; border-radius: 50%; background: rgba(124,111,205,.15); display: flex; align-items: center; justify-content: center; font-size: 26px; color: var(--accent); }
.voice-sheet-label { font-size: 16px; font-weight: 800; }
.voice-sheet-hint { font-size: 12px; color: var(--text-muted); text-align: center; line-height: 1.5; }
.voice-transcript { font-size: 13px; color: var(--text-sec); text-align: center; min-height: 22px; }
.voice-bars { display: flex; align-items: flex-end; gap: 4px; height: 32px; }
.voice-bar { width: 4px; height: 8px; background: var(--accent); border-radius: 2px; animation: bar-dance .8s ease-in-out infinite alternate; }
.voice-bar:nth-child(2) { animation-delay: .1s; }
.voice-bar:nth-child(3) { animation-delay: .2s; }
.voice-bar:nth-child(4) { animation-delay: .3s; }
.voice-bar:nth-child(5) { animation-delay: .15s; }
.voice-bar:nth-child(6) { animation-delay: .25s; }
.voice-bar:nth-child(7) { animation-delay: .05s; }
@keyframes bar-dance { from { height: 6px; } to { height: 26px; } }
.voice-stop-btn   { width: 100%; padding: 13px; border-radius: var(--radius-btn); background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; }
.voice-cancel-btn { font-size: 13px; color: var(--text-muted); font-weight: 700; }
.voice-sheet.open,
.voice-sheet.visible { pointer-events: all; }

.voice-sheet.open .voice-sheet-backdrop,
.voice-sheet.visible .voice-sheet-backdrop { opacity: 1; }

.voice-sheet.open .voice-sheet-panel,
.voice-sheet.visible .voice-sheet-panel { transform: translateX(-50%) translateY(0); }

/* ════════════════════════════════════════════════════════
   SNACKBAR / TOAST / OVERLAYS
════════════════════════════════════════════════════════ */
.snackbar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-card2); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 12px 18px;
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; font-weight: 700;
  z-index: 1000; white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,.4);
}
.snackbar.sb-enter { animation: sb-in .3s ease forwards; }
.snackbar.sb-exit  { animation: sb-out .25s ease forwards; }
@keyframes sb-in  { from { opacity:0; transform: translateX(-50%) translateY(12px); } to { opacity:1; transform: translateX(-50%) translateY(0); } }
@keyframes sb-out { to   { opacity:0; transform: translateX(-50%) translateY(12px); } }
#snackbar-undo { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; display: inline-flex; align-items: center; }

.xp-toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-pill);
  font-family: 'Rajdhani', sans-serif; font-size: 15px; font-weight: 700;
  pointer-events: none; z-index: 1001;
  opacity: 0;
}
.xp-toast.visible { animation: xp-pop var(--anim-dur, 1.9s) ease forwards; }
@keyframes xp-pop { 0% { opacity:0; transform:translateX(-50%) translateY(-10px); } 15%,75% { opacity:1; transform:translateX(-50%) translateY(0); } 100% { opacity:0; transform:translateX(-50%) translateY(-10px); } }

.fullmodal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; }
.fullmodal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.65); }
.fullmodal-panel { position: relative; z-index: 1; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 20px; padding: 28px 28px 20px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.ds-header { text-align: center; margin-bottom: 20px; }
.ds-icon { font-size: 28px; color: var(--accent-warn); display: block; margin-bottom: 8px; }
.ds-header h2 { font-size: 20px; font-weight: 800; }
.ds-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.ds-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

.levelup-overlay { position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; }
.levelup-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); }
.levelup-content { position: relative; z-index: 1; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.levelup-badge-wrap { position: relative; width: 160px; height: 160px; }
.levelup-ring-svg { width: 160px; height: 160px; transform: rotate(-90deg); position: absolute; }
.levelup-ring-bg   { fill: none; stroke: rgba(124,111,205,.2); stroke-width: 8; }
.levelup-ring-glow { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 440; stroke-dashoffset: 440; animation: ring-fill 1.2s ease forwards; }
@keyframes ring-fill { to { stroke-dashoffset: 0; } }
.levelup-badge-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.levelup-label  { font-size: 10px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; }
.levelup-number { font-family: 'Rajdhani', sans-serif; font-size: 52px; font-weight: 700; color: var(--text); line-height: 1; }
.levelup-title  { font-size: 22px; font-weight: 800; color: var(--text); }
.levelup-sub    { font-size: 13px; color: var(--text-muted); }
.levelup-rewards { display: flex; gap: 8px; }
.levelup-reward-pill { padding: 6px 14px; border-radius: var(--radius-pill); background: rgba(124,111,205,.15); border: 1px solid var(--border-accent); font-size: 12px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 5px; }

/* streak pill */
.streak-pill { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--radius-pill); background: rgba(255,209,102,.12); color: var(--accent-warn); font-size: 12px; font-weight: 700; }
.streak-pill i { font-size: 12px; }

/* ════════════════════════════════════════════════════════
   DESKTOP OVERRIDES — neutraliza lógica mobile do switchTab
════════════════════════════════════════════════════════ */

/* switchTab faz app.style.bottom = 'calc(var(--nav-h)...)' ou '0px'
   No desktop esse valor inline não deve ter efeito algum.
   Sobrescrevemos com !important para garantir. */
@media (min-width: 769px) {
  #app {
    bottom: 0 !important;   /* ignora o style.bottom injetado pelo JS */
    top: 0 !important;
  }

  /* bottom-nav: JS faz classList.remove('hidden') em NAV_TABS.
     No desktop ele nunca deve aparecer. */
  #bottom-nav {
    display: none !important;
  }

  /* Sidebar: o JS adiciona .active em .nav-btn[data-tab],
     mas no desktop os botões são .sidebar-btn[data-tab].
     O patch JS em Inicializacao.js cuida de propagar a classe;
     aqui garantimos o visual correto mesmo sem o patch. */
  .sidebar-btn.active {
    background: rgba(124,111,205,.15) !important;
    color: var(--accent) !important;
  }
  .sidebar-btn.active i { color: var(--accent) !important; }

  /* FAB fixo no mobile vira botão inline no desktop —
     o JS pode injetar position:fixed via classList ou style;
     garantimos que o #fab-add dentro do painel fique normal */
  .today-panel-card #fab-add {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    border-radius: var(--radius-btn) !important;
    font-size: 14px !important;
    box-shadow: none !important;
  }
  /* o ring e o glow do fab-hold ficam invisíveis no desktop */
  .fab-hold-ring,
  .fab-hold-glow,
  .fab-implode-ring { display: none !important; }
}

/* BOTTOM NAV — hidden on desktop, shown on mobile */
.bottom-nav { display: none; }

/* avatar-mini (used in mobile header, hidden on desktop) */
.avatar-mini { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }

/* ctx menu */
.ctx-menu-nav { display: flex; flex-direction: column; gap: 6px; }
.ctx-menu-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-btn); background: var(--bg-card); border: 1px solid var(--border); transition: all .2s; }
.ctx-menu-btn:hover { border-color: var(--accent); background: rgba(124,111,205,.08); }
.ctx-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.ctx-text { flex: 1; text-align: left; }
.ctx-text strong { font-size: 13px; font-weight: 700; display: block; }
.ctx-text small   { font-size: 11px; color: var(--text-muted); }
.ctx-arrow { font-size: 11px; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════
   SEASONAL CALENDAR SCREEN
════════════════════════════════════════════════════════ */

/* Legenda de tipos */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.cal-legend-pill {
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: var(--radius-pill);
  letter-spacing: .04em;
}

/* Bloco de mês */
.cal-month-block {
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
}
.cal-month-block.cal-month-today {
  border-color: var(--border-accent);
}

.cal-month-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: var(--bg-card2);
  border-bottom: 1px solid var(--border);
}
.cal-month-name {
  font-size: 14px; font-weight: 800; color: var(--text);
  font-family: 'Rajdhani', sans-serif; letter-spacing: .04em;
  text-transform: uppercase;
}
.cal-month-count {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
}

/* Eventos dentro do mês */
.cal-events { display: flex; flex-direction: column; }

.cal-event-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.cal-event-row:last-child { border-bottom: none; }
.cal-event-row:hover { background: var(--bg-card2); }

.cal-event-row.cal-event-today {
  background: rgba(124,111,205,.06);
}
.cal-event-row.cal-event-today:hover {
  background: rgba(124,111,205,.12);
}

/* Hold feedback */
.cal-event-row.cal-event-holding {
  background: rgba(124,111,205,.18);
}

/* Coluna de data */
.cal-event-date-col {
  display: flex; flex-direction: column; align-items: center;
  min-width: 34px; flex-shrink: 0;
}
.cal-event-day {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px; font-weight: 700; color: var(--text);
  line-height: 1;
}
.cal-event-weekday {
  font-size: 10px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .06em;
  margin-top: 2px;
}

/* Ícone do evento */
.cal-event-icon-wrap {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}

/* Info do evento */
.cal-event-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.cal-event-name {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-event-type {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}

/* Chips de tarefas */
.cal-task-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; }
.cal-task-chip {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--radius-pill);
  display: flex; align-items: center; gap: 4px;
}
.cal-task-chip i { font-size: 9px; }
.cal-task-chip-pending {
  background: rgba(255,209,102,.12); color: var(--accent-warn);
}
.cal-task-chip-done {
  background: rgba(78,205,196,.12); color: var(--accent-teal);
}

/* Seta de detalhe */
.cal-row-arrow {
  font-size: 11px; color: var(--text-muted); flex-shrink: 0;
  transition: transform .15s, color .15s;
}
.cal-event-row:hover .cal-row-arrow {
  transform: translateX(3px); color: var(--accent);
}

/* Badge "hoje" */
.cal-today-badge {
  position: absolute; top: 10px; right: 42px;
  font-size: 9px; color: var(--accent);
}

/* Sheet de detalhe do dia — estilos extras */
.cal-day-task-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
  border-radius: 8px;
}
.cal-day-task-row:last-child { border-bottom: none; }
.cal-day-task-row:hover { background: var(--bg-card2); padding-left: 8px; }
.cal-day-task-row.cal-day-task-done { opacity: .5; }

.cal-day-task-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.cal-day-task-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.cal-day-task-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-day-task-cat {
  font-size: 10px; font-weight: 700;
}
.cal-day-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 24px 0; color: var(--text-muted);
  font-size: 13px; text-align: center;
}
.cal-day-empty i { font-size: 22px; opacity: .3; }

/* Desktop: calendário em 2 colunas quando há espaço */
@media (min-width: 1100px) {
  #seasonal-content { columns: 2; column-gap: 20px; }
  .cal-month-block  { break-inside: avoid; }
  .cal-legend { columns: 1; } /* legenda em 1 col */
}

/* ════════════════════════════════════════════════════════
   SEASONAL BANNER (tela Today)
════════════════════════════════════════════════════════ */
.seasonal-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  border-left: 3px solid var(--banner-accent, var(--accent));
}
.seasonal-banner:hover {
  background: var(--bg-card2);
  border-color: var(--banner-accent, var(--accent));
}
.seasonal-banner-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.seasonal-banner-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.seasonal-banner-title {
  font-size: 13px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seasonal-banner-desc {
  font-size: 11px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.seasonal-banner-arrow {
  font-size: 11px; flex-shrink: 0;
  transition: transform .15s;
}
.seasonal-banner:hover .seasonal-banner-arrow {
  transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE — Mobile fallback (< 768px)
═══════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .today-layout { grid-template-columns: 1fr; }
  .today-sidebar-panel { display: none; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .sidebar { display: none; }

  .main-content { height: calc(100vh - var(--nav-h)); }

  .screen-scroll { padding: 16px 16px; }

  .bottom-nav {
    display: flex;
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    align-items: center; justify-content: center;
    z-index: 100;
    padding-bottom: var(--safe-bottom);
  }
  .nav-pill { display: flex; gap: 4px; background: var(--bg-card); border-radius: var(--radius-pill); padding: 4px; }
  .nav-btn  { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 20px; border-radius: var(--radius-pill); font-size: 10px; font-weight: 700; color: var(--text-muted); transition: all .2s; }
  .nav-btn i    { font-size: 18px; }
  .nav-btn.active { background: var(--accent); color: #fff; }

  /* hide right panel on today mobile */
  .today-sidebar-panel { display: none; }

  /* FAB (nova tarefa) */
  #fab-add {
    position: fixed; bottom: calc(var(--nav-h) + 16px); right: 20px;
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--accent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; z-index: 200;
    box-shadow: 0 4px 20px rgba(124,111,205,.4);
  }
  /* show fab-add on today screen only (overridden to a normal inline btn on desktop) */

  .sheet-panel { border-radius: 24px 24px 0 0; max-width: 100%; }
  .bottom-sheet { align-items: flex-end; }
  .sheet-handle { display: block; width: 36px; height: 4px; background: var(--border-accent); border-radius: 2px; margin: 0 auto -6px; }

  .app-header.desktop-header { margin-bottom: 16px; }
  .greeting-name { font-size: 20px; }

  .task-actions { display: flex; } /* always visible on mobile */
}

#fab-add { overflow: hidden; }

  #fab-add .fab-hold-ring.active  { opacity: 1; }
  #fab-add .fab-hold-glow.active  { opacity: 1; }
  #fab-add.holding                { transform: scale(0.97); }

  #fab-add.voice-mode             { background: var(--accent, #7c3aed); }
