/* ============================================
   FOCCUS ZONE — Main Stylesheet
   Modern SaaS Productivity App Design
   ============================================ */

:root {
  --bg-base:      #0a0a0f;
  --bg-surface:   #111118;
  --bg-card:      #16161f;
  --bg-elevated:  #1c1c28;
  --bg-hover:     #22222f;
  --bg-active:    #1a1a2e;

  --border:       #252535;
  --border-light: #2e2e45;

  --text-primary:   #f0f0f8;
  --text-secondary: #9191a8;
  --text-muted:     #55556a;
  --text-disabled:  #3a3a50;

  --blue:       #3b7fe8;
  --blue-light: #4a8ff5;
  --blue-dark:  #2563cc;
  --blue-glow:  rgba(59,127,232,0.2);

  --green:   #22c55e;
  --red:     #ef4444;
  --orange:  #f97316;
  --purple:  #a855f7;
  --teal:    #14b8a6;
  --yellow:  #eab308;

  --priority-low:    #22c55e;
  --priority-medium: #3b7fe8;
  --priority-high:   #f97316;
  --priority-urgent: #ef4444;

  --sidebar-w:  240px;
  --radius:     10px;
  --radius-lg:  14px;
  --radius-sm:  6px;
  --shadow:     0 4px 20px rgba(0,0,0,.5);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.3);

  --transition: 0.18s ease;
  --font: 'Inter', -apple-system, sans-serif;
}

/* ============================================ RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg-base); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue-light); text-decoration: none; }
a:hover { color: var(--blue); }
button { cursor: pointer; font-family: var(--font); }
img { max-width: 100%; }
input, select, textarea { font-family: var(--font); }

/* ============================================ LAYOUT */
.app-body { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}
.brand-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-name { font-size: 1rem; font-weight: 700; color: var(--text-primary); letter-spacing: -.3px; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--blue-glow); color: var(--blue-light); }
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 3px; background: var(--blue);
  border-radius: 0 3px 3px 0;
}
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-label { flex: 1; }
.nav-badge {
  font-size: .7rem;
  color: var(--orange);
  animation: pulse 1.5s infinite;
}

.sidebar-footer { padding: 10px; border-top: 1px solid var(--border); }

.user-info {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  flex-shrink: 0;
}
.user-details { flex: 1; min-width: 0; }
.user-name { display: block; font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: .7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logout-btn { color: var(--text-muted); display: flex; align-items: center; padding: 4px; border-radius: 4px; transition: color var(--transition); }
.logout-btn:hover { color: var(--red); }

/* Main Wrapper */
.main-wrapper { flex: 1; margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
  height: 58px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title h1 { font-size: 1rem; font-weight: 600; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-time { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text-secondary); padding: 6px; border-radius: 6px; }
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Page Content */
.page-content { flex: 1; padding: 28px; max-width: 1200px; width: 100%; }

/* ============================================ SIDEBAR OVERLAY (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}
.sidebar-overlay.visible { display: block; }

/* ============================================ BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-light); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,127,232,.4); }
.btn-outline { background: transparent; border: 1px solid var(--border-light); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #16a34a; color: #fff; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-full { width: 100%; justify-content: center; padding: 11px 16px; }
.btn-sm { padding: 5px 10px; font-size: .8rem; }
.btn-icon { background: none; border: none; color: var(--text-muted); padding: 5px; border-radius: 4px; transition: all var(--transition); display: flex; align-items: center; }
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-icon-danger:hover { background: rgba(239,68,68,.15); color: var(--red); }

/* ============================================ FORMS */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-label { font-size: .8rem; font-weight: 500; color: var(--text-secondary); }
.label-hint { color: var(--text-muted); font-weight: 400; }
.form-input, .form-select, .form-textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: .875rem;
  padding: 9px 12px;
  transition: border-color var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-input-sm { padding: 5px 9px; font-size: .8rem; }
.input-error { border-color: var(--red) !important; }
.input-password { position: relative; }
.input-password .form-input { padding-right: 42px; }
.toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); display: flex; align-items: center; }
.toggle-password:hover { color: var(--text-primary); }
.search-input { min-width: 220px; }

/* ============================================ CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: .925rem; font-weight: 600; }
.card-body { padding: 20px; }
.card-danger { border-color: rgba(239,68,68,.3); }

/* ============================================ ALERTS */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: 16px;
  transition: opacity .4s, transform .4s;
}
.alert-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #86efac; }

/* ============================================ BADGES */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px; font-size: .72rem; font-weight: 500; }
.badge-pendente    { background: rgba(59,127,232,.15); color: #93c5fd; }
.badge-em_andamento{ background: rgba(249,115,22,.15); color: #fdba74; }
.badge-concluida   { background: rgba(34,197,94,.15);  color: #86efac; }
.badge-cancelada   { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-count { font-size: .75rem; color: var(--text-muted); }

/* Tags */
.tag { display: inline-flex; align-items: center; padding: 2px 8px; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 4px; font-size: .72rem; color: var(--text-secondary); }
.tag-green { background: rgba(34,197,94,.1); border-color: rgba(34,197,94,.3); color: var(--green); }
.tag-method { background: rgba(168,85,247,.1); border-color: rgba(168,85,247,.3); color: #c084fc; }
.tag-priority-baixa   { background: rgba(34,197,94,.1); color: var(--green); }
.tag-priority-media   { background: rgba(59,127,232,.1); color: var(--blue-light); }
.tag-priority-alta    { background: rgba(249,115,22,.1); color: var(--orange); }
.tag-priority-urgente { background: rgba(239,68,68,.1); color: var(--red); }

/* ============================================ MODALS */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
  padding: 20px;
}
.modal-backdrop.visible { display: flex; animation: fadeIn .15s ease; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp .2s ease;
}
.modal-lg { max-width: 680px; }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.4rem; line-height: 1; display: flex; align-items: center; width: 28px; height: 28px; justify-content: center; border-radius: 4px; }
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================ PAGE HEADER */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header h2 { font-size: 1.4rem; font-weight: 700; }
.page-desc { color: var(--text-muted); font-size: .85rem; margin-top: 2px; }
.header-actions { display: flex; gap: 10px; }

/* ============================================ QUICK STATS */
.quick-stats { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.qstat { border-radius: var(--radius-sm); overflow: hidden; }
.qstat a { display: flex; flex-direction: column; align-items: center; padding: 10px 18px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: all var(--transition); min-width: 80px; text-align: center; }
.qstat a:hover { border-color: var(--blue); }
.qstat.active a { background: var(--blue-glow); border-color: var(--blue); }
.qstat-n { font-size: 1.3rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.qstat-l { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }
.qstat.active .qstat-l { color: var(--blue-light); }

/* ============================================ FILTERS */
.filters-bar { margin-bottom: 20px; }
.filters-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters-form .form-input, .filters-form .form-select { max-width: 200px; }

/* ============================================ TASKS */
.tasks-container { display: flex; flex-direction: column; gap: 8px; }
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: flex-start;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.task-card:hover { border-color: var(--border-light); transform: translateX(2px); }
.task-card-left { display: flex; gap: 12px; flex: 1; min-width: 0; }
.priority-indicator { width: 3px; border-radius: 2px; flex-shrink: 0; min-height: 40px; align-self: stretch; }
.priority-baixa   { background: var(--priority-low); }
.priority-media   { background: var(--priority-medium); }
.priority-alta    { background: var(--priority-high); }
.priority-urgente { background: var(--priority-urgent); }
.task-card-body { flex: 1; min-width: 0; }
.task-card-title { font-size: .9rem; font-weight: 500; margin-bottom: 4px; }
.task-card-title.line-through { text-decoration: line-through; color: var(--text-muted); }
.task-card-desc { font-size: .8rem; color: var(--text-secondary); margin-bottom: 6px; }
.task-card-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.task-card-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.status-select { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); font-size: .78rem; padding: 5px 8px; cursor: pointer; }
.task-due { font-size: .72rem; color: var(--text-muted); }
.task-due.overdue { color: var(--red); }

/* Priority dots */
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.priority-dot-baixa   { background: var(--priority-low); }
.priority-dot-media   { background: var(--priority-medium); }
.priority-dot-alta    { background: var(--priority-high); }
.priority-dot-urgente { background: var(--priority-urgent); }

/* ============================================ GOALS */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.goal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color var(--transition);
}
.goal-card:hover { border-color: var(--border-light); }
.goal-card.status-concluida { border-color: rgba(34,197,94,.3); }
.goal-card-header { display: flex; justify-content: space-between; align-items: center; }
.goal-type-badge { font-size: .72rem; padding: 2px 8px; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 4px; color: var(--text-muted); }
.goal-actions { display: flex; gap: 4px; }
.goal-title { font-size: .95rem; font-weight: 600; }
.goal-desc { font-size: .8rem; color: var(--text-secondary); }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: .78rem; color: var(--text-secondary); }
.progress-pct { font-weight: 600; }
.progress-bar { height: 6px; background: var(--bg-elevated); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--purple)); border-radius: 99px; transition: width .5s ease; }
.goal-footer { display: flex; justify-content: space-between; align-items: center; }
.goal-deadline { font-size: .78rem; color: var(--text-muted); }
.overdue-tag { background: rgba(239,68,68,.15); color: var(--red); padding: 1px 6px; border-radius: 4px; font-size: .68rem; margin-left: 4px; }
.goal-status-badge { font-size: .72rem; padding: 2px 8px; border-radius: 4px; font-weight: 500; }
.goal-status-ativa    { background: rgba(34,197,94,.1); color: var(--green); }
.goal-status-concluida{ background: rgba(59,127,232,.1); color: var(--blue-light); }
.goal-status-pausada  { background: rgba(249,115,22,.1); color: var(--orange); }
.goal-status-cancelada{ background: rgba(107,114,128,.1); color: #9ca3af; }
.goal-update { display: flex; gap: 8px; }

/* ============================================ DASHBOARD */
.dashboard-grid { display: flex; flex-direction: column; gap: 20px; }
.welcome-card {
  background: linear-gradient(135deg, #1a1a35, #0d1a3a);
  border: 1px solid rgba(59,127,232,.3);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.welcome-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 4px; }
.welcome-title { font-size: 1.3rem; font-weight: 700; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border-light); }
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-blue   { background: rgba(59,127,232,.15); color: var(--blue-light); }
.stat-orange { background: rgba(249,115,22,.15); color: var(--orange); }
.stat-purple { background: rgba(168,85,247,.15); color: var(--purple); }
.stat-green  { background: rgba(34,197,94,.15);  color: var(--green); }
.stat-red    { background: rgba(239,68,68,.15);   color: var(--red); }
.stat-teal   { background: rgba(20,184,166,.15);  color: var(--teal); }
.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }
.dash-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.dash-card-header { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.dash-card-header h3 { font-size: .9rem; font-weight: 600; }
.link-more { font-size: .78rem; color: var(--blue-light); }
.task-list { padding: 8px 0; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: none; }
.task-item-info { flex: 1; min-width: 0; }
.task-item-title { font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.task-item-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-item-due { font-size: .72rem; color: var(--text-muted); }
.task-item-due.overdue { color: var(--red); }
.finance-summary { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.finance-row { display: flex; justify-content: space-between; font-size: .875rem; }
.finance-row.income strong { color: var(--green); }
.finance-row.expense strong { color: var(--red); }
.finance-row.balance.positive strong { color: var(--green); font-size: 1rem; }
.finance-row.balance.negative strong { color: var(--red); font-size: 1rem; }
.finance-divider { height: 1px; background: var(--border); margin: 4px 0; }
.recent-transactions { padding: 0 18px 12px; }
.transaction-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--border); }
.transaction-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.transaction-icon.income  { background: rgba(34,197,94,.15); color: var(--green); }
.transaction-icon.expense { background: rgba(239,68,68,.15);  color: var(--red); }
.transaction-info { flex: 1; min-width: 0; }
.transaction-info span { font-size: .82rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transaction-info small { font-size: .72rem; color: var(--text-muted); }
.transaction-value { font-size: .82rem; font-weight: 600; flex-shrink: 0; }
.transaction-value.entrada { color: var(--green); }
.transaction-value.saida   { color: var(--red); }
.demands-overview { padding: 16px 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.demand-pill { display: flex; flex-direction: column; align-items: center; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--bg-elevated); border: 1px solid var(--border); min-width: 80px; text-align: center; }
.demand-pill-label { font-size: .7rem; color: var(--text-muted); }
.demand-pill-count { font-size: 1.2rem; font-weight: 700; }
.demand-em_andamento { border-color: rgba(249,115,22,.3); }
.demand-em_andamento .demand-pill-count { color: var(--orange); }

/* ============================================ FINANCEIRO */
.fin-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.fin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; align-items: center; gap: 14px;
}
.fin-card-icon { width: 42px; height: 42px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 700; flex-shrink: 0; }
.fin-income .fin-card-icon  { background: rgba(34,197,94,.15); color: var(--green); }
.fin-expense .fin-card-icon { background: rgba(239,68,68,.15);  color: var(--red); }
.fin-balance.positive .fin-card-icon { background: rgba(59,127,232,.15); color: var(--blue-light); }
.fin-balance.negative .fin-card-icon { background: rgba(239,68,68,.15); color: var(--red); }
.fin-card-label { font-size: .78rem; color: var(--text-muted); display: block; margin-bottom: 2px; }
.fin-card-value { font-size: 1.15rem; font-weight: 700; display: block; }
.fin-income  .fin-card-value { color: var(--green); }
.fin-expense .fin-card-value { color: var(--red); }
.fin-balance.positive .fin-card-value { color: var(--blue-light); }
.fin-balance.negative .fin-card-value { color: var(--red); }
.fin-layout { display: grid; grid-template-columns: 1fr 280px; gap: 16px; align-items: start; }
.fin-main { min-width: 0; }
.transactions-list { display: flex; flex-direction: column; }
.transaction-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.transaction-row:last-child { border-bottom: none; }
.transaction-row:hover { background: var(--bg-hover); }
.transaction-row-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.transaction-row-icon.entrada { background: rgba(34,197,94,.15); color: var(--green); }
.transaction-row-icon.saida   { background: rgba(239,68,68,.15);  color: var(--red); }
.transaction-row-info { flex: 1; min-width: 0; }
.transaction-row-title { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.transaction-row-meta { display: flex; gap: 6px; margin-top: 3px; align-items: center; flex-wrap: wrap; }
.transaction-row-date { font-size: .72rem; color: var(--text-muted); }
.transaction-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.transaction-row-value { font-size: .9rem; font-weight: 600; }
.transaction-row-value.entrada { color: var(--green); }
.transaction-row-value.saida   { color: var(--red); }
.row-actions { display: flex; gap: 4px; opacity: 0; transition: opacity var(--transition); }
.transaction-row:hover .row-actions { opacity: 1; }
.cat-list { padding: 8px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); }
.cat-item:hover { background: var(--bg-hover); }
.cat-info { display: flex; align-items: center; gap: 8px; }
.cat-name { font-size: .85rem; }
.cat-type { font-size: .7rem; padding: 1px 6px; border-radius: 3px; }
.cat-type.entrada { background: rgba(34,197,94,.1); color: var(--green); }
.cat-type.saida   { background: rgba(239,68,68,.1); color: var(--red); }
.cat-value { font-size: .85rem; font-weight: 600; }
.cat-value.entrada { color: var(--green); }
.cat-value.saida   { color: var(--red); }
.type-toggle { display: flex; gap: 8px; }
.type-btn { flex: 1; }
.type-btn input { display: none; }
.type-btn span {
  display: block; text-align: center;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.type-btn input:checked + span { border-color: var(--blue); background: var(--blue-glow); color: var(--blue-light); }

/* ============================================ FOCO */
.foco-today { display: flex; gap: 16px; margin-bottom: 24px; }
.today-stat {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 24px;
  text-align: center; min-width: 120px;
}
.today-stat-n { display: block; font-size: 1.5rem; font-weight: 800; color: var(--blue-light); }
.today-stat-l { font-size: .75rem; color: var(--text-muted); }

.timer-section { display: flex; justify-content: center; margin-bottom: 32px; }
.timer-container {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 500px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.timer-modes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mode-btn {
  padding: 7px 14px; border-radius: 99px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-secondary); font-size: .8rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
}
.mode-btn:hover { border-color: var(--blue); color: var(--blue-light); }
.mode-btn.active { background: var(--blue-glow); border-color: var(--blue); color: var(--blue-light); }

.timer-clock { position: relative; width: 220px; height: 220px; }
.timer-ring { position: absolute; top: 0; left: 0; transform: rotate(-90deg); }
.timer-ring-bg { fill: none; stroke: var(--bg-elevated); stroke-width: 8; }
.timer-ring-fill {
  fill: none; stroke: var(--blue);
  stroke-width: 8; stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}
.timer-display {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.timer-time { font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -2px; }
.timer-mode-label { font-size: .8rem; color: var(--text-muted); margin-top: 4px; }

.timer-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.timer-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--transition);
}
.timer-start  { background: var(--blue); color: #fff; }
.timer-start:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,127,232,.4); }
.timer-pause  { background: var(--orange); color: #fff; }
.timer-pause:hover  { background: #ea580c; }
.timer-stop   { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid rgba(239,68,68,.3); }
.timer-stop:hover   { background: var(--red); color: #fff; }
.timer-reset  { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.timer-reset:hover  { color: var(--text-primary); }

.timer-config { width: 100%; }
.sessions-history .card { }
.sessions-list { display: flex; flex-direction: column; }
.session-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.session-item:last-child { border-bottom: none; }
.session-icon { font-size: 1.2rem; flex-shrink: 0; width: 32px; text-align: center; }
.session-info { flex: 1; min-width: 0; }
.session-title { font-size: .88rem; font-weight: 500; display: block; }
.session-task  { font-size: .75rem; color: var(--blue-light); display: block; }
.session-date  { font-size: .72rem; color: var(--text-muted); }
.session-meta { text-align: right; }
.session-duration { display: block; font-size: .85rem; font-weight: 600; }
.session-status { display: block; font-size: .72rem; margin-top: 2px; }
.session-status-concluida  { color: var(--green); }
.session-status-em_andamento{ color: var(--orange); }
.session-status-cancelada  { color: var(--text-muted); }

/* ============================================ AUTH */
.auth-body { background: var(--bg-base); min-height: 100vh; }
.auth-container { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-left {
  background: linear-gradient(145deg, #0d1535, #05091e);
  border-right: 1px solid var(--border);
  padding: 40px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 40%, rgba(59,127,232,.12) 0%, transparent 60%);
  pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: auto; }
.auth-brand-icon { width: 38px; height: 38px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.auth-brand span { font-size: 1.1rem; font-weight: 700; }
.auth-hero { padding: 60px 0 40px; }
.auth-hero h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.auth-hero p { color: var(--text-secondary); font-size: .95rem; max-width: 340px; margin-bottom: 28px; }
.auth-features { display: flex; flex-direction: column; gap: 10px; }
.auth-feature { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--text-secondary); }
.feature-dot { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; flex-shrink: 0; }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-form-container { width: 100%; max-width: 380px; }
.auth-header { margin-bottom: 28px; }
.auth-header h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: 6px; }
.auth-header p { color: var(--text-muted); }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.auth-switch { font-size: .875rem; color: var(--text-muted); text-align: center; }

/* ============================================ SETTINGS */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.settings-grid .card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.avatar-section { display: flex; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.avatar-big { width: 52px; height: 52px; background: linear-gradient(135deg, var(--blue), var(--purple)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; font-weight: 800; flex-shrink: 0; }
.avatar-name  { font-weight: 600; }
.avatar-email { font-size: .8rem; color: var(--text-muted); }
.avatar-since { font-size: .75rem; color: var(--text-disabled); }
.danger-desc { font-size: .85rem; color: var(--text-secondary); }

/* ============================================ EMPTY STATES */
.empty-state {
  text-align: center; padding: 56px 20px;
  color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state h3 { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.empty-state p { font-size: .875rem; }
.empty-state-small { padding: 24px; text-align: center; color: var(--text-muted); font-size: .85rem; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* ============================================ TOAST */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .875rem; color: var(--text-primary); box-shadow: var(--shadow); transform: translateX(100%); opacity: 0; transition: all .3s ease; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { border-color: rgba(34,197,94,.4); }
.toast-error   { border-color: rgba(239,68,68,.4); }

/* ============================================ ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ============================================ RESPONSIVE */
@media (max-width: 1024px) {
  .dash-columns { grid-template-columns: 1fr; }
  .fin-layout { grid-template-columns: 1fr; }
  .fin-summary { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-240px); width: 240px; }
  .sidebar.open { transform: translateX(0); }
  .main-wrapper { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .fin-summary { grid-template-columns: 1fr; }
  .auth-container { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .goals-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .foco-today { flex-wrap: wrap; }
  .timer-container { padding: 20px 16px; }
  .settings-grid { grid-template-columns: 1fr; }
  .quick-stats { gap: 6px; }
  .qstat a { padding: 8px 12px; min-width: 60px; }
}

@media (max-width: 480px) {
  .welcome-card { flex-direction: column; align-items: flex-start; }
  .stats-row { grid-template-columns: 1fr; }
  .header-actions { flex-direction: column; gap: 6px; width: 100%; }
  .page-header { flex-direction: column; }
  .filters-form { flex-direction: column; }
  .filters-form .form-input, .filters-form .form-select { max-width: 100%; }
}

/* ============================================ SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================
   FOCCUSZONE v2 — Melhorias
   Dark/Light theme, Saúde, Devocional,
   Notificações, Ranking, Gráficos
   ============================================ */

/* ---- LIGHT THEME ---- */
[data-theme="light"] {
  --bg-base:      #f4f4f8;
  --bg-surface:   #ffffff;
  --bg-card:      #ffffff;
  --bg-elevated:  #f0f0f5;
  --bg-hover:     #e8e8f0;
  --bg-active:    #e0e8ff;
  --border:       #dddde8;
  --border-light: #e8e8f2;
  --text-primary:   #1a1a2e;
  --text-secondary: #5a5a7a;
  --text-muted:     #8888a8;
  --text-disabled:  #bbbbcc;
  --shadow:     0 4px 20px rgba(0,0,0,.08);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.06);
}
[data-theme="light"] .sidebar { background: #ffffff; }
[data-theme="light"] .topbar  { background: rgba(255,255,255,0.95); border-bottom-color: var(--border); }
[data-theme="light"] .nav-item:hover { background: var(--bg-elevated); }
[data-theme="light"] .nav-item.active { background: var(--bg-active); color: var(--blue); }
[data-theme="light"] .card { background: #ffffff; }
[data-theme="light"] .form-input, [data-theme="light"] .form-select, [data-theme="light"] .form-textarea {
  background: var(--bg-elevated); border-color: var(--border); color: var(--text-primary);
}
[data-theme="light"] .stat-card { background: #ffffff; }
[data-theme="light"] .modal { background: #ffffff; }

/* ---- THEME TOGGLE BUTTON ---- */
.theme-toggle {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); padding: 6px 8px; cursor: pointer;
  display: flex; align-items: center; transition: var(--transition);
}
.theme-toggle:hover { background: var(--bg-elevated); color: var(--text-primary); }
.theme-toggle svg { width: 16px; height: 16px; }
[data-theme="dark"]  .icon-light { display: none; }
[data-theme="dark"]  .icon-dark  { display: block; }
[data-theme="light"] .icon-light { display: block; }
[data-theme="light"] .icon-dark  { display: none; }

/* ---- NOTIFICAÇÕES ---- */
.notif-wrap { position: relative; }
.notif-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-secondary); padding: 6px 8px; cursor: pointer;
  display: flex; align-items: center; position: relative; transition: var(--transition);
}
.notif-btn:hover { background: var(--bg-elevated); color: var(--text-primary); }
.notif-btn svg { width: 16px; height: 16px; }
.notif-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--red); color: #fff; font-size: .6rem; font-weight: 700;
  border-radius: 10px; padding: 1px 5px; min-width: 16px; text-align: center;
}
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); z-index: 200; overflow: hidden;
}
.notif-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: .85rem; font-weight: 600;
}
.btn-link { background: none; border: none; color: var(--blue); font-size: .78rem; cursor: pointer; padding: 0; }
.btn-link:hover { text-decoration: underline; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.notif-item:hover { background: var(--bg-elevated); }
.notif-item.unread { background: var(--bg-active); }
.notif-item:last-child { border-bottom: none; }
.notif-tipo { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.notif-body { flex: 1; min-width: 0; }
.notif-titulo { font-size: .82rem; font-weight: 600; margin-bottom: 2px; }
.notif-msg { font-size: .75rem; color: var(--text-muted); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: .7rem; color: var(--text-disabled); }

/* ---- PÁGINA SAÚDE ---- */
.health-banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(20,184,166,.1); border: 1px solid rgba(20,184,166,.3);
  border-radius: var(--radius); padding: 14px 18px;
  font-size: .875rem; color: var(--text-primary); margin-bottom: 24px;
}
.health-banner span:first-child { font-size: 1.2rem; flex-shrink: 0; }
.health-section { margin-bottom: 28px; }
.health-section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.health-section-header h3 { font-size: .95rem; font-weight: 600; }
.health-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.health-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: var(--transition);
}
.health-card:hover { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue-glow); }
.health-card.done { border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.04); }
.health-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hbadge { font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.hbadge-blue   { background: rgba(59,127,232,.15); color: var(--blue); }
.hbadge-teal   { background: rgba(20,184,166,.15); color: var(--teal); }
.hbadge-purple { background: rgba(168,85,247,.15);  color: var(--purple); }
.hbadge-cyan   { background: rgba(6,182,212,.15);   color: #06b6d4; }
.hbadge-orange { background: rgba(249,115,22,.15);  color: var(--orange); }
.hbadge-green  { background: rgba(34,197,94,.15);   color: var(--green); }
.hdone { font-size: .72rem; color: var(--green); font-weight: 600; }
.health-card h4 { font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.health-desc { font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; }
.health-meta { display: flex; gap: 12px; font-size: .75rem; color: var(--text-secondary); margin-bottom: 10px; }
.health-inst {
  background: var(--bg-elevated); border-radius: var(--radius-sm); padding: 10px 12px;
  font-size: .78rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 10px; white-space: pre-line;
}
.health-actions { display: flex; gap: 8px; justify-content: flex-end; }
.reminders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.reminder-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; transition: var(--transition);
}
.reminder-card.active { border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.04); }
.reminder-icon { font-size: 1.5rem; }
.reminder-body { flex: 1; }
.reminder-body strong { font-size: .875rem; display: block; margin-bottom: 8px; }
.reminder-row { display: flex; gap: 8px; align-items: center; }
.ex-timer { font-size: 2.5rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blue); margin: 12px 0 4px; }

/* ---- DEVOCIONAL ---- */
.devo-main {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 28px;
}
.devo-main.lido { border-color: rgba(34,197,94,.3); }
.devo-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.devo-date { font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.btn-fav { background: none; border: none; font-size: 1.2rem; cursor: pointer; transition: var(--transition); padding: 4px; border-radius: 4px; }
.btn-fav:hover { background: var(--bg-elevated); }
.devo-tema { font-size: .72rem; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.devo-titulo { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.devo-versiculo {
  background: linear-gradient(135deg, rgba(59,127,232,.1), rgba(168,85,247,.1));
  border-left: 4px solid var(--blue); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin-bottom: 22px;
}
.devo-versiculo blockquote { font-size: 1.05rem; font-style: italic; line-height: 1.7; margin-bottom: 8px; }
.devo-versiculo cite { font-size: .82rem; color: var(--blue); font-weight: 600; font-style: normal; }
.devo-section { margin-bottom: 20px; }
.devo-section h4 { font-size: .85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .3px; }
.devo-section p { font-size: .92rem; line-height: 1.8; color: var(--text-primary); }
.devo-oracao-box {
  background: var(--bg-elevated); border-radius: var(--radius); padding: 16px 20px;
}
.devo-nota h4 { font-size: .85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; }
.devo-lido-msg {
  background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); border-radius: var(--radius);
  padding: 12px 16px; font-size: .875rem; color: var(--green); text-align: center; margin-top: 16px;
}
.devo-hist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.devo-hist-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; transition: var(--transition);
}
.devo-hist-card.lido { border-color: rgba(34,197,94,.3); }
.devo-hist-card:hover { border-color: var(--blue); }

/* ---- PRODUTIVIDADE / GRÁFICOS ---- */
.prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 900px) { .prod-grid { grid-template-columns: 1fr; } }
.chart-legend { display: flex; gap: 12px; align-items: center; font-size: .75rem; color: var(--text-muted); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---- RANKING ---- */
.rank-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.rank-table thead th { padding: 10px 20px; text-align: left; font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--border); }
.rank-table tbody td { padding: 12px 20px; border-bottom: 1px solid var(--border); }
.rank-table tbody tr:last-child td { border-bottom: none; }
.rank-table tbody tr:hover { background: var(--bg-elevated); }
.rank-table tbody tr.rank-me { background: rgba(59,127,232,.07); }
.rank-pos { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: .82rem; font-weight: 700; background: var(--bg-elevated); }
.rank-pos.rank-top { background: none; font-size: 1.2rem; }
.rank-user { display: flex; align-items: center; gap: 10px; }
.rank-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; background: var(--bg-elevated); }
.rank-you { font-size: .7rem; background: var(--blue-glow); color: var(--blue); padding: 1px 6px; border-radius: 10px; margin-left: 6px; font-weight: 600; }
.rank-score { font-weight: 700; color: var(--blue); }

/* ---- HEATMAP ---- */
.heatmap { display: flex; flex-wrap: wrap; gap: 3px; }
.hm-cell { width: 12px; height: 12px; border-radius: 2px; }
.hm-0 { background: var(--bg-elevated); }
.hm-1 { background: rgba(59,127,232,.25); }
.hm-2 { background: rgba(59,127,232,.45); }
.hm-3 { background: rgba(59,127,232,.7); }
.hm-4 { background: var(--blue); }
.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: .75rem; }

/* ---- STAT ICON COLORS ---- */
.stat-teal   { background: rgba(20,184,166,.15)  !important; color: var(--teal)   !important; }
.stat-purple { background: rgba(168,85,247,.15)  !important; color: var(--purple) !important; }
.stat-orange { background: rgba(249,115,22,.15)  !important; color: var(--orange) !important; }
.stat-cyan   { background: rgba(6,182,212,.15)   !important; color: #06b6d4       !important; }

/* ---- PAGE HEADER ---- */
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.page-desc { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

/* ---- EMPTY STATE ---- */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin: 12px 0 6px; color: var(--text-primary); }
.empty-state p { font-size: .875rem; }

/* ---- FORM TEXTAREA ---- */
.form-textarea {
  width: 100%; background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); padding: 10px 12px;
  font-size: .875rem; font-family: var(--font); resize: vertical; line-height: 1.6;
  transition: var(--transition);
}
.form-textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-glow); }

/* ---- RESPONSIVE EXTRAS ---- */
@media (max-width: 768px) {
  .health-grid { grid-template-columns: 1fr; }
  .reminders-grid { grid-template-columns: 1fr; }
  .devo-main { padding: 20px 16px; }
  .devo-titulo { font-size: 1.2rem; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}