/* ============================================================
   TASKFLOW - COMPONENTS STYLES
   ============================================================ */

/* ============================================================
   STATS / DASHBOARD CARDS
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  border-left: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-pending { border-left-color: var(--warning); }
.stat-progress { border-left-color: var(--primary); }
.stat-done { border-left-color: var(--success); }
.stat-late { border-left-color: var(--danger); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-pending .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-progress .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-done .stat-icon { background: var(--success-light); color: var(--success); }
.stat-late .stat-icon { background: var(--danger-light); color: var(--danger); }
.stat-info { display: flex; flex-direction: column; }
.stat-number { font-size: 26px; font-weight: 800; line-height: 1; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* QUICK FILTERS */
.quick-filters {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 20px;
  scrollbar-width: none;
}
.quick-filters::-webkit-scrollbar { display: none; }
.qfilter {
  flex-shrink: 0; padding: 7px 14px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 20px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.qfilter.active, .qfilter:hover {
  background: var(--primary); border-color: var(--primary);
  color: white;
}

/* SECTION CARD */
.section-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.section-header h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}

/* CHARTS */
.charts-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
}
.chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.chart-card h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.report-chart-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.report-chart-card h3 {
  font-size: 15px; font-weight: 700; color: var(--text);
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   TASK LIST (MINI)
   ============================================================ */
.task-list-mini { display: flex; flex-direction: column; gap: 8px; }
.task-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}
.task-mini:hover { background: var(--gray-100); }
.task-mini-dot {
  width: 10px; height: 10px;
  border-radius: 50%; flex-shrink: 0;
}
.task-mini-info { flex: 1; min-width: 0; }
.task-mini-title {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-mini-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.task-mini-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.task-mini-status { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.empty-state {
  text-align: center; padding: 24px 16px;
  color: var(--text-muted);
}
.empty-state i { font-size: 36px; margin-bottom: 8px; opacity: 0.4; display: block; }
.empty-state p { font-size: 13px; }

/* ============================================================
   TASKS PAGE
   ============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.search-bar i { color: var(--text-muted); }
.search-bar input {
  flex: 1; border: none; background: none;
  font-size: 14px; color: var(--text); font-family: inherit;
}
.search-bar input:focus { outline: none; }
.btn-filter {
  border: none; background: none; cursor: pointer;
  font-size: 16px; color: var(--text-muted);
  padding: 2px;
  transition: color var(--transition);
}
.btn-filter:hover { color: var(--primary); }
.filter-panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  display: none;
}
.filter-panel.open { display: block; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.filter-select {
  padding: 9px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-family: inherit;
  color: var(--text); background: var(--surface);
  width: 100%; appearance: none;
}
.filter-quick-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.qfilter-sm {
  padding: 5px 10px;
  background: var(--gray-100); border: 1px solid var(--border);
  border-radius: 16px; font-size: 12px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.qfilter-sm:hover, .qfilter-sm.active {
  background: var(--primary); border-color: var(--primary);
  color: white;
}
.view-toggle {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.view-btn {
  width: 36px; height: 36px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.view-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.tasks-container { padding-bottom: 8px; }

/* TASK CARD */
.task-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 4px solid var(--border);
  position: relative;
}
.task-card:hover { box-shadow: var(--shadow); transform: translateX(2px); }
.task-card.priority-baixa { border-left-color: #10B981; }
.task-card.priority-media { border-left-color: #F59E0B; }
.task-card.priority-alta { border-left-color: #F97316; }
.task-card.priority-urgente { border-left-color: #EF4444; }
.task-card.status-concluida { opacity: 0.7; }
.task-card.status-cancelada { opacity: 0.5; }
.task-card.status-atrasada { border-left-color: #EF4444; background: #FFF5F5; }
.task-card-header {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 8px;
}
.task-check {
  width: 22px; height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; margin-top: 1px;
  transition: all var(--transition);
  background: white;
}
.task-check:hover { border-color: var(--primary); }
.task-check.checked {
  background: var(--success); border-color: var(--success);
  color: white;
}
.task-check.checked::after { content: '✓'; font-size: 13px; font-weight: 700; }
.task-title {
  flex: 1; font-size: 14px; font-weight: 600; color: var(--text);
  line-height: 1.3;
}
.task-title.done { text-decoration: line-through; color: var(--text-muted); }
.task-card-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 600;
}
.badge-status-pendente { background: var(--warning-light); color: #92400E; }
.badge-status-andamento { background: var(--primary-light); color: var(--primary-dark); }
.badge-status-aguardando { background: #F3F4F6; color: var(--gray-600); }
.badge-status-concluida { background: var(--success-light); color: #065F46; }
.badge-status-atrasada { background: var(--danger-light); color: #991B1B; }
.badge-status-cancelada { background: var(--gray-100); color: var(--gray-500); text-decoration: line-through; }
.badge-priority-baixa { background: #ECFDF5; color: #065F46; }
.badge-priority-media { background: var(--warning-light); color: #92400E; }
.badge-priority-alta { background: #FFF7ED; color: #9A3412; }
.badge-priority-urgente { background: var(--danger-light); color: #991B1B; }
.badge-type { background: var(--gray-100); color: var(--gray-600); }
.task-due { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.task-due.overdue { color: var(--danger); font-weight: 600; }
.task-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--gray-100);
}
.task-assignee {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
}
.avatar-xs {
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; color: white;
}
.task-progress-mini {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
}
.progress-bar-mini {
  width: 50px; height: 4px;
  background: var(--gray-200); border-radius: 2px; overflow: hidden;
}
.progress-fill-mini {
  height: 100%; background: var(--primary); border-radius: 2px;
  transition: width 0.3s ease;
}
.tag-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 600;
  background: var(--gray-100); color: var(--gray-600);
  margin: 2px;
}

/* KANBAN BOARD */
.kanban-board {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 8px;
}
.kanban-col {
  flex-shrink: 0; width: 250px;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 12px;
}
.kanban-col-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.kanban-col-title {
  font-size: 13px; font-weight: 700; color: var(--text);
}
.kanban-count {
  width: 22px; height: 22px;
  background: var(--primary); color: white;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   TASK DETAIL MODAL
   ============================================================ */
.detail-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-status-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; flex-wrap: wrap;
}
.label-sm { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.status-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.status-btn {
  padding: 5px 10px; border-radius: 16px;
  border: 1.5px solid var(--border);
  font-size: 11px; font-weight: 600;
  cursor: pointer; background: var(--surface);
  color: var(--text-muted); transition: all var(--transition);
}
.status-btn:hover { border-color: var(--primary); color: var(--primary); }
.status-btn.active { background: var(--primary); border-color: var(--primary); color: white; }
.detail-info-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.detail-info-item {
  display: flex; align-items: flex-start; gap: 8px;
}
.detail-info-item i {
  color: var(--primary); font-size: 13px;
  margin-top: 2px; width: 16px;
}
.detail-info-item div { display: flex; flex-direction: column; }
.detail-info-item small { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-info-item span { font-size: 13px; color: var(--text); font-weight: 500; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 {
  font-size: 13px; font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.detail-section p { font-size: 14px; color: var(--text); line-height: 1.6; }
.tags-container { display: flex; flex-wrap: wrap; gap: 4px; }

/* SUBTASKS */
.subtask-input-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.subtask-list { display: flex; flex-direction: column; gap: 6px; }
.subtask-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--gray-50); border-radius: var(--radius-sm);
}
.subtask-check {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-radius: 4px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  background: white;
}
.subtask-check:hover { border-color: var(--primary); }
.subtask-check.done { background: var(--success); border-color: var(--success); color: white; }
.subtask-check.done::after { content: '✓'; font-size: 11px; font-weight: 700; }
.subtask-text {
  flex: 1; font-size: 13px; color: var(--text);
}
.subtask-text.done { text-decoration: line-through; color: var(--text-muted); }
.subtask-del {
  width: 22px; height: 22px;
  border: none; background: none;
  color: var(--text-light); cursor: pointer;
  font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.subtask-del:hover { color: var(--danger); }
.subtask-progress {
  display: flex; align-items: center; gap: 10px;
  margin-top: 12px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.progress-bar {
  flex: 1; height: 6px; background: var(--gray-200);
  border-radius: 3px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: var(--success); border-radius: 3px;
  transition: width 0.4s ease;
}
#detail-progress-text { font-size: 12px; font-weight: 700; color: var(--text-muted); }

/* COMMENTS */
.comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment-item {
  display: flex; gap: 10px;
  padding: 10px;
  background: var(--gray-50); border-radius: var(--radius-sm);
}
.comment-avatar {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white;
}
.comment-body { flex: 1; }
.comment-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.comment-author { font-size: 12px; font-weight: 700; color: var(--text); }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 13px; color: var(--text); }
.comment-input-row {
  display: flex; gap: 8px; align-items: flex-end;
}
.comment-input-row .form-textarea { min-height: 60px; }

/* HISTORY */
.history-list { display: flex; flex-direction: column; gap: 6px; }
.history-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px; font-size: 12px; color: var(--text-muted);
  border-left: 2px solid var(--gray-200); padding-left: 10px;
}
.history-icon { font-size: 12px; width: 16px; text-align: center; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-view-tabs {
  display: flex; gap: 4px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 4px; margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.cal-tab {
  flex: 1; padding: 8px;
  border: none; border-radius: calc(var(--radius-sm) - 2px);
  background: transparent; font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.cal-tab.active { background: var(--primary); color: white; }
.calendar-nav {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px;
}
.cal-title { flex: 1; font-size: 16px; font-weight: 700; text-align: center; }
.calendar-container { margin-bottom: 16px; }
.calendar-month { background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-header-day {
  padding: 10px 4px; text-align: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  min-height: 60px; padding: 6px 4px;
  border: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
  background: var(--surface);
}
.cal-day:hover { background: var(--gray-50); }
.cal-day.other-month { background: var(--gray-50); }
.cal-day.today { background: var(--primary-light) !important; }
.cal-day.selected { background: var(--primary) !important; }
.cal-day.selected .cal-day-num { color: white !important; }
.cal-day-num {
  font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 2px;
  line-height: 1;
}
.cal-day.today .cal-day-num {
  color: var(--primary); font-weight: 800;
}
.cal-day-dots { display: flex; gap: 2px; flex-wrap: wrap; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; }
.cal-day-tasks {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-sm);
}
.cal-week { display: flex; flex-direction: column; gap: 8px; }
.cal-week-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 12px; box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.cal-week-date { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 8px; }
.cal-week-date.today-week { color: var(--primary); }
.cal-week-tasks { display: flex; flex-direction: column; gap: 4px; }
.cal-task-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  background: var(--gray-50); cursor: pointer;
  transition: background var(--transition);
  font-size: 12px;
}
.cal-task-chip:hover { background: var(--gray-100); }
.cal-task-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ============================================================
   REPORTS PAGE
   ============================================================ */
.period-selector {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.period-btn {
  flex: 1; padding: 9px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.period-btn.active {
  background: var(--primary); border-color: var(--primary); color: white;
}
.kpi-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
}
.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.kpi-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.kpi-icon.green { color: var(--success); }
.kpi-icon.red { color: var(--danger); }
.kpi-icon.blue { color: var(--primary); }
.kpi-icon.orange { color: var(--orange); }
.kpi-number { font-size: 28px; font-weight: 800; color: var(--text); display: block; }
.kpi-label { font-size: 12px; color: var(--text-muted); display: block; margin-top: 2px; }

/* USER SUMMARY */
.user-summary-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.user-summary-item:last-child { border-bottom: none; }
.user-summary-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-summary-info { flex: 1; }
.user-summary-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-summary-stats { font-size: 11px; color: var(--text-muted); }
.user-summary-rate {
  font-size: 14px; font-weight: 800;
  color: var(--success);
}

/* ============================================================
   NOTIFICATIONS PAGE
   ============================================================ */
.notif-config-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.notif-config-card h3 {
  font-size: 14px; font-weight: 700; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.notif-config-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text);
}
.notif-config-row:last-of-type { border-bottom: none; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm);
  display: flex; gap: 12px; cursor: pointer;
  transition: background var(--transition);
  border-left: 3px solid transparent;
}
.notif-item:hover { background: var(--gray-50); }
.notif-item.unread { border-left-color: var(--primary); background: var(--primary-light); }
.notif-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.notif-icon.warning { background: var(--warning-light); color: var(--warning); }
.notif-icon.danger { background: var(--danger-light); color: var(--danger); }
.notif-icon.success { background: var(--success-light); color: var(--success); }
.notif-icon.primary { background: var(--primary-light); color: var(--primary); }
.notif-body { flex: 1; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.notif-text { font-size: 12px; color: var(--text-muted); }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* TOGGLE */
.toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gray-300); border-radius: 24px;
  transition: background 0.3s;
}
.slider:before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle input:checked + .slider { background: var(--primary); }
.toggle input:checked + .slider:before { transform: translateX(20px); }

/* ============================================================
   USERS PAGE
   ============================================================ */
.users-list { display: flex; flex-direction: column; gap: 10px; }
.user-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; gap: 12px;
  transition: box-shadow var(--transition);
}
.user-card:hover { box-shadow: var(--shadow); }
.user-card-avatar {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;
}
.user-card-info { flex: 1; min-width: 0; }
.user-card-name { font-size: 14px; font-weight: 700; color: var(--text); }
.user-card-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.user-card-actions { display: flex; gap: 6px; }
.btn-icon-sm {
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  transition: all var(--transition);
}
.btn-icon-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-icon-sm.danger:hover { border-color: var(--danger); color: var(--danger); }
.user-status-badge {
  display: inline-block;
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.status-ativo { background: var(--success-light); color: #065F46; }
.status-inativo { background: var(--danger-light); color: #991B1B; }
.perfil-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.perfil-administrador { background: #FFF7ED; color: #9A3412; }
.perfil-gestor { background: var(--primary-light); color: var(--primary-dark); }
.perfil-colaborador { background: #F3E8FF; color: #6D28D9; }
.perfil-usuario { background: var(--gray-100); color: var(--gray-600); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 24px 16px; text-align: center;
  margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.profile-avatar-big {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: white;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
}
.profile-card h2 { font-size: 20px; font-weight: 800; color: var(--text); }
.profile-role-badge {
  display: inline-block; padding: 4px 12px;
  background: var(--primary-light); color: var(--primary);
  border-radius: 16px; font-size: 12px; font-weight: 600;
  margin: 6px 0 16px;
}
.profile-stats {
  display: flex; justify-content: center; gap: 24px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.pstat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pstat span { font-size: 22px; font-weight: 800; color: var(--primary); }
.pstat small { font-size: 11px; color: var(--text-muted); }
.profile-info-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.info-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; background: var(--gray-50); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text);
}
.info-item i { color: var(--primary); width: 16px; text-align: center; }

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-section {
  background: var(--surface); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.settings-section h3 {
  font-size: 14px; font-weight: 700; color: var(--text);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.setting-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.setting-item:last-child { border-bottom: none; }
.setting-item > div {
  display: flex; flex-direction: column; gap: 2px;
}
.setting-item span { font-size: 14px; font-weight: 500; color: var(--text); }
.setting-item small { font-size: 12px; color: var(--text-muted); }
.about-info {
  padding: 8px 0;
  font-size: 13px; color: var(--text-muted); line-height: 1.8;
}
.categories-settings-list { display: flex; flex-direction: column; gap: 8px; }
.cat-setting-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; background: var(--gray-50); border-radius: var(--radius-sm);
}
.cat-color-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.cat-setting-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.cat-setting-type { font-size: 11px; color: var(--text-muted); }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex; align-items: flex-end;
  backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.open {
  opacity: 1; visibility: visible;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%; max-width: 600px;
  margin: 0 auto;
  max-height: 90vh;
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-large { max-height: 92vh; }
.modal-sm { max-height: 75vh; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-header h3 { font-size: 16px; font-weight: 700; color: var(--text); }
.modal-body {
  flex: 1; overflow-y: auto; padding: 20px;
}
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0; background: var(--surface);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 768px) {
  .page-content {
    padding-left: 0;
  }
  .bottom-nav { display: none; }
  .fab-btn { display: flex; }
  .sidebar {
    position: fixed; transform: none;
    border-right: 1px solid var(--border);
    box-shadow: none;
  }
  .sidebar-overlay { display: none; }
  .page-content { padding-left: var(--sidebar-w); }
  .top-bar { left: var(--sidebar-w); }
  .btn-menu { display: none; }
  .modal-overlay { align-items: center; }
  .modal {
    border-radius: var(--radius-xl);
    max-width: 520px;
    transform: scale(0.9);
    margin: 20px;
  }
  .modal-overlay.open .modal { transform: scale(1); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .charts-row { grid-template-columns: 1fr 1fr; }
  .kpi-grid { grid-template-columns: repeat(4, 1fr); }
}
