/* ==========================================================================
   PASSEIA - COMPONENTES UI (LIQUID GLASS)
   Cards, Kanban, Tags T/E/R/S, Duplo Cronômetro, Chat, Modais e Toasts
   ========================================================================== */

/* Botões */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn:focus-visible,
.nav-item:focus-visible,
.icon-btn:focus-visible,
.prompt-chip:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 12px 30px rgba(37, 99, 235, 0.42);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--glass-edge-soft);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.btn-outline-blue {
  background: var(--accent-soft);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

.btn-outline-blue:hover {
  background: var(--bg-surface-hover);
  border-color: var(--accent-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface);
  box-shadow: var(--glass-highlight);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--accent-border);
  color: var(--accent-primary);
  background: var(--bg-surface-hover);
}

/* Inputs e Formulários */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: var(--bg-surface-hover);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.form-select option {
  background: var(--bg-solid);
  color: var(--text-primary);
}

input[type="range"] {
  accent-color: var(--accent-primary);
}

/* Seletor de Concurso na Barra Lateral Esquerda */
.concurso-box {
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.concurso-box-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Badges Oficiais de Tags: T (Teoria), E (Exercício), R (Revisão), S (Simulados) */
.tag-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.tag-T {
  background: var(--tag-t-bg);
  color: var(--tag-t-text);
}

.tag-E {
  background: var(--tag-e-bg);
  color: var(--tag-e-text);
}

.tag-R {
  background: var(--tag-r-bg);
  color: var(--tag-r-text);
}

.tag-S {
  background: var(--tag-s-bg);
  color: var(--tag-s-text);
}

/* KPI Grid e Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--glass-highlight), var(--shadow-sm);
}

.kpi-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}

/* Filete de luz no topo do KPI */
.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--accent-gradient);
  opacity: 0.85;
  pointer-events: none;
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.kpi-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Gráficos do Dashboard */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.chart-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 310px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chart-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.chart-canvas-wrap {
  position: relative;
  flex: 1;
  min-height: 235px;
  width: 100%;
}

@media (max-width: 1180px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
}

/* Banner de Alerta de Cobertura do Edital */
.coverage-banner {
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--glass-highlight);
}

.coverage-banner.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
}

.coverage-banner.warning {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning-text);
}

.coverage-banner.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* Quadro Kanban por Dias da Semana */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.kanban-col {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 390px;
  transition: border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.kanban-col.today-col {
  background: var(--bg-surface);
  border-color: var(--accent-border);
  box-shadow: var(--glass-highlight), 0 0 0 3px var(--accent-soft);
}

.kanban-col.drag-over,
#backlogDropContainer.drag-over {
  border: 1px dashed var(--accent-primary);
  background: var(--accent-soft);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 12.5px;
  padding: 4px 6px;
}

.kanban-count {
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.kanban-dropzone {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 320px;
}

.kanban-card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 10px 11px;
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: grab;
  user-select: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.45;
  transform: scale(0.97);
}

.kanban-card:hover {
  transform: translateY(-2px);
  background: var(--bg-surface-hover);
  box-shadow: var(--glass-highlight), var(--shadow-md);
}

/* Calendário Futuro (Tags R, S, T, E) */
.calendar-audit-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(125px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.calendar-day-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 125px;
}

.calendar-day-card.today {
  background: var(--bg-surface);
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.calendar-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 5px;
}

.calendar-item-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 8px;
  background: var(--bg-surface);
  font-size: 11px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.calendar-item-pill:hover {
  border-color: var(--accent-border);
  background: var(--bg-surface-hover);
}

/* Tabela de Tarefas na aba Metas */
.goals-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.goals-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.goals-table thead tr {
  border-bottom: 1px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.goals-table th {
  padding: 13px 14px;
  font-weight: 700;
  white-space: nowrap;
}

.goals-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

.goals-table tbody tr {
  transition: background-color var(--transition-fast);
  cursor: pointer;
}

.goals-table tbody tr:last-child td {
  border-bottom: none;
}

.goals-table tbody tr:hover,
.goals-table tbody tr.selected {
  background-color: var(--bg-surface-hover);
}

.goals-table tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

/* Duplo Cronômetro Simultâneo */
.dual-timer-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight);
  padding: 12px;
}

.timer-box {
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-highlight);
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.timer-box.running {
  border-color: var(--accent-border);
  box-shadow: var(--glass-highlight), 0 0 0 4px var(--accent-soft), var(--accent-glow);
}

.timer-box.running .timer-display {
  animation: timerBreath 2.4s ease-in-out infinite;
}

@keyframes timerBreath {
  50% { opacity: 0.72; }
}

.timer-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

.timer-display {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 26px;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.timer-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Questões Interativas */
.question-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-option {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12.8px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

.question-option:hover {
  border-color: var(--accent-border);
  background: var(--bg-surface-hover);
}

.question-option.correct {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success-text);
  font-weight: 700;
}

.question-option.wrong {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger-text);
}

/* Mentor IA */
.mentor-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mentor-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), var(--accent-glow);
}

.mentor-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
}

.mentor-quick-prompts {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mentor-quick-prompts::-webkit-scrollbar {
  display: none;
}

.prompt-chip {
  padding: 6px 11px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.prompt-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.mentor-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 92%;
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.55;
  word-wrap: break-word;
  animation: bubbleIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.chat-bubble.assistant {
  align-self: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  color: var(--text-primary);
  border-bottom-left-radius: 6px;
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--accent-gradient);
  color: #FFFFFF;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 6px 18px rgba(37, 99, 235, 0.26);
  border-bottom-right-radius: 6px;
}

.chat-bubble.thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-primary);
  font-weight: 600;
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.thinking-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: mentorPulseDot 1.2s infinite ease-in-out;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes mentorPulseDot {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.45;
  }
  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Campo de mensagem em formato de cápsula de vidro */
.mentor-input-area {
  margin: 10px 12px 12px;
  padding: 5px 5px 5px 14px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.mentor-input-area:focus-within {
  border-color: var(--accent-border);
  box-shadow: var(--glass-highlight), 0 0 0 4px var(--accent-soft);
}

.mentor-input-area .form-input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 8px 0;
}

.mentor-input-area .form-input:focus {
  box-shadow: none;
  background: transparent;
}

.mentor-input-area .btn {
  padding: 8px 16px;
}

/* Modais */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 30, 0.30);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.22s ease both;
}

.modal-card {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--glass-panel-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  padding: 24px 28px;
  animation: popIn 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.dropzone {
  border: 1px dashed var(--accent-border);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dropzone:hover {
  border-color: var(--accent-primary);
}

/* Toasts (cápsulas de vidro) */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--glass-panel-strong);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: var(--text-primary);
  border: 1px solid var(--glass-edge);
  padding: 11px 18px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 13px;
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, 90vw);
  animation: toastIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.toast::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.toast.toast-success::before {
  background: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.toast.toast-error::before {
  background: #EF4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

.toast.toast-error {
  border-color: var(--danger-border);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Verificação em duas etapas (2FA)
   -------------------------------------------------------------------------- */
.otp-input {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-align: center;
  padding: 12px 10px 12px calc(10px + 0.42em);
  font-variant-numeric: tabular-nums;
}

.otp-input.otp-input-recovery {
  font-size: 17px;
  letter-spacing: 0.12em;
  padding-left: calc(10px + 0.12em);
}

.otp-input::placeholder {
  color: var(--text-muted);
  opacity: 0.45;
}

.sec-steps {
  padding-left: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.sec-qr {
  width: 196px;
  height: 196px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  padding: 6px;
  box-shadow: var(--glass-highlight), var(--shadow-md);
  image-rendering: pixelated;
}

.sec-secret {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  user-select: all;
  word-break: break-all;
  text-align: center;
}

.sec-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sec-codes-grid code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 9px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight);
  user-select: all;
}

.sec-section {
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 10px;
}

.sec-section summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Cadeado da barra lateral fica verde quando o 2FA está ativo */
#btnOpenSecurityModal.sec-on {
  border-color: var(--success-border);
  background: var(--success-bg);
}

/* --------------------------------------------------------------------------
   Filtro de Matérias (aba Planejamento)
   -------------------------------------------------------------------------- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 260px;
  padding: 6px 10px 6px 11px;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface-elevated);
  box-shadow: var(--glass-highlight);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.filter-chip:active {
  transform: scale(0.97);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.filter-chip.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-soft-text);
  box-shadow: var(--glass-highlight), 0 0 0 3px var(--accent-soft);
}

.filter-chip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.filter-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-count {
  flex-shrink: 0;
  min-width: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.filter-chip.active .filter-chip-count {
  color: var(--accent-soft-text);
}

.filter-clear-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Replanejamento completo
   -------------------------------------------------------------------------- */
.replan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.replan-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1.45;
}

.replan-check input {
  margin-top: 3px;
  accent-color: var(--accent-primary);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.replan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.replan-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight);
}

.replan-stat span {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.replan-stat strong {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.filter-chip.replan-weight {
  cursor: default;
}

@media (max-width: 560px) {
  .replan-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Planejamento: navegação entre semanas
   -------------------------------------------------------------------------- */
.week-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight);
}

.week-nav-arrow {
  font-size: 22px;
  line-height: 1;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.week-nav-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.week-nav-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.week-nav-center strong {
  font-size: 14px;
  font-weight: 750;
}

.week-nav-center span {
  font-size: 12px;
  color: var(--text-secondary);
}

.kanban-col.past-col {
  opacity: 0.72;
}

.kanban-card-projected {
  border-style: dashed;
  border-left-style: solid;
  opacity: 0.85;
}

.kanban-board.week-slide-left { animation: weekSlideLeft 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
.kanban-board.week-slide-right { animation: weekSlideRight 0.32s cubic-bezier(0.22, 1, 0.36, 1); }

@keyframes weekSlideLeft {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes weekSlideRight {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .kanban-board.week-slide-left,
  .kanban-board.week-slide-right { animation: none; }
}

/* --------------------------------------------------------------------------
   Replanejamento: semana final
   -------------------------------------------------------------------------- */
.replan-final {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.replan-final strong { color: var(--text-primary); font-size: 13px; }
.replan-final-warn { background: var(--warning-bg); border-color: rgba(245, 158, 11, 0.35); }

.replan-final-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.replan-final-list li { display: flex; gap: 8px; align-items: baseline; color: var(--text-primary); }
.replan-final-list small { color: var(--text-muted); }
.replan-final-date { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 40px; color: var(--success-text); }

/* --------------------------------------------------------------------------
   Escolher teorias para revisão
   -------------------------------------------------------------------------- */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
}

.segmented-btn {
  border: none;
  background: none;
  padding: 7px 10px;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.segmented-btn.active {
  background: var(--bg-surface);
  color: var(--accent-soft-text);
  box-shadow: var(--glass-highlight), var(--shadow-sm);
}

.theory-list {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--glass-edge-soft);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  margin-bottom: 10px;
}

.theory-group {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--bg-surface-elevated);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.theory-group .filter-clear-btn { margin-left: auto; }

.theory-row {
  display: grid;
  grid-template-columns: auto 64px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

.theory-row:hover { background: var(--bg-surface-hover); }
.theory-row input { accent-color: var(--accent-primary); width: 15px; height: 15px; }
.theory-row.is-blocked { opacity: 0.55; cursor: default; }
.theory-lesson { font-weight: 700; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.theory-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theory-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.theory-empty { padding: 24px; text-align: center; font-size: 12.5px; color: var(--text-muted); }

.theory-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.theory-option { display: flex; align-items: center; gap: 8px; }

/* Virar revisão × Só questões */
.theory-action { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.theory-action-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  font-size: 12.5px;
}
.theory-action-opt:has(input:checked) { border-color: var(--accent-border); background: var(--accent-soft); }
.theory-action-opt input { accent-color: var(--accent-primary); margin-top: 2px; }
.theory-action-opt span { display: flex; flex-direction: column; gap: 2px; }
.theory-action-opt small { color: var(--text-muted); font-size: 11.5px; }

/* Selo do grupo (R1, R2…) e prévia das revisões que vão ser criadas */
.theory-badge-slot { min-width: 0; }
.theory-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: var(--warning-bg);
  color: var(--warning-text);
  border: 1px solid var(--warning-border);
}
.theory-groups {
  max-height: 140px;
  overflow-y: auto;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-size: 12px;
}
.theory-groups-title { font-weight: 700; color: var(--text-secondary); margin-bottom: 4px; }
.theory-groups-row { display: flex; align-items: center; gap: 6px; padding: 2px 0; min-width: 0; }
.theory-groups-subj { font-weight: 600; white-space: nowrap; }
.theory-groups-lessons { color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.theory-groups-warn { margin-left: auto; font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Desfazer trocas */
.theory-row.theory-history-row { grid-template-columns: auto 1fr auto; cursor: default; }
.theory-history-row .theory-title { white-space: normal; }
.theory-history-date { display: block; color: var(--text-muted); font-size: 11px; }
.theory-history-kind {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.theory-history-kind.is-review { background: var(--warning-bg); color: var(--warning-text); }
.theory-history-kind.is-remove { background: var(--accent-soft); color: var(--accent-soft-text); }

@media (max-width: 560px) {
  .theory-row { grid-template-columns: auto 1fr; }
  .theory-lesson, .theory-meta, .theory-badge-slot { grid-column: 2; }
  .theory-row.theory-history-row { grid-template-columns: auto 1fr; }
  .theory-history-row .btn { grid-column: 2; justify-self: start; }
  .theory-action { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   Aba Simulados
   -------------------------------------------------------------------------- */
.sim-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.sim-kpis {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
  min-width: 0;
}

.sim-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  box-shadow: var(--glass-highlight);
  min-width: 0;
}

.sim-kpi span {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.sim-kpi strong { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sim-kpi small { font-size: 11.5px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acc-low { color: var(--danger-text); }
.acc-mid { color: var(--warning-text); }
.acc-high { color: var(--success-text); }

.sim-section-head { display: flex; align-items: center; margin: 6px 2px 10px; }
.sim-section-head h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 750; }

.sim-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.sim-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; margin: 0; }
.sim-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sim-when { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.sim-when-today { color: var(--accent-primary); }
.sim-when-late { color: var(--danger-text); }
.sim-title { font-size: 14px; font-weight: 700; line-height: 1.35; }
.sim-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-secondary); }
.sim-badge-live { color: var(--accent-primary); font-weight: 700; }
.sim-review-flag { color: var(--warning-text); font-weight: 600; }
.sim-chips { display: flex; flex-wrap: wrap; gap: 5px; }

.sim-chip {
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--glass-edge-soft);
  color: var(--text-secondary);
}

.sim-chip strong { color: var(--text-primary); }
.sim-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: auto; }

.sim-score {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sim-subj-rows { display: grid; gap: 5px; }

.sim-subj-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 1fr 52px 44px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.sim-subj-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

.sim-subj-bar {
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.sim-subj-bar span { display: block; height: 100%; border-radius: inherit; background: currentColor; }
.sim-subj-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.sim-subj-count { color: var(--text-muted); text-align: right; font-variant-numeric: tabular-nums; }

.sim-details { font-size: 12px; }
.sim-details summary { cursor: pointer; color: var(--accent-primary); font-weight: 600; margin: 2px 0 4px; }

.sim-topic {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--border-subtle);
}

.sim-topic span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); }
.sim-topic span:last-child { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.sim-note { font-size: 12px; color: var(--text-muted); }

.sim-empty { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--text-secondary); text-align: center; padding: 22px; }

.sim-evolution {
  --evo-track-h: 120px;
  --evo-date-h: 17px;
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* Linha de 70% na mesma escala das barras */
.sim-evo-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px dashed var(--danger);
  opacity: 0.55;
  pointer-events: none;
}

.sim-evo-col {
  flex: 1;
  max-width: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}

.sim-evo-val { font-size: 10.5px; font-weight: 700; color: var(--text-secondary); margin-bottom: 3px; }
.sim-evo-track { position: relative; width: 100%; height: var(--evo-track-h); }
.sim-evo-bar { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px 6px 2px 2px; background: currentColor; opacity: 0.85; }
.sim-evo-col:hover .sim-evo-bar { opacity: 1; }
.sim-evo-date { font-size: 10.5px; color: var(--text-muted); height: var(--evo-date-h); line-height: var(--evo-date-h); }

/* --------------------------------------------------------------------------
   Metas: leitura de Teoria (teto de páginas + agrupar aulas curtas)
   -------------------------------------------------------------------------- */
.study-settings {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.study-settings-title { font-size: 12.5px; font-weight: 700; }

.study-settings-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.study-settings-field input {
  width: 68px;
  padding: 4px 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

.study-settings-check { margin: 0; font-size: 12.5px; flex: 1; min-width: 220px; }
.study-settings-check small { color: var(--text-muted); }

/* Drawer: aulas agrupadas na mesma tarefa */
.merged-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  font-size: 12.5px;
}

.merged-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 6px;
}

.merged-box ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.merged-box li span { color: var(--text-secondary); }
.merged-box li small { color: var(--text-muted); }

/* Questões na prova: marcação de discursiva */
.subj-discursive-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.subj-discursive-toggle input { accent-color: var(--accent-primary); }

/* Questões na prova: matérias agrupadas numa matéria da prova */
.sq-hint { font-size: 12px; line-height: 1.5; color: var(--text-secondary); margin: 0 0 10px; }
.sq-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin-bottom: 14px; padding-right: 4px; }
.sq-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}
.sq-row.is-member { background: var(--bg-surface); border-style: dashed; }
.sq-row.sq-exam-only { border-color: var(--accent-border); }
.sq-name { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; font-size: 13px; font-weight: 600; }
.sq-name-main { display: inline-flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; }
.sq-row.is-member { margin-left: 18px; }
.sq-title { min-width: 0; overflow-wrap: anywhere; }
.sq-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sq-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.sq-select { width: auto; max-width: 220px; padding: 5px 8px; font-size: 12.5px; }
.sq-custom { width: 210px; padding: 5px 8px; font-size: 12.5px; }
.sq-qty { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }
.sq-qty input { width: 70px; padding: 5px 8px; font-weight: 700; text-align: center; }
.sq-member { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.sq-includes { grid-column: 1 / -1; font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.sq-section { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-top: 6px; }
@media (max-width: 560px) {
  .sq-row { grid-template-columns: 1fr; }
  .sq-row.is-member { margin-left: 10px; }
  .sq-controls { justify-content: flex-start; }
  .sq-select, .sq-custom { max-width: 100%; width: 100%; }
}

/* --------------------------------------------------------------------------
   Senha: medidor de força + seção "Senha e sessões"
   -------------------------------------------------------------------------- */
.pw-meter { margin-top: 7px; }

.pw-meter-bar {
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  overflow: hidden;
}

.pw-meter-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--danger);
  transition: width 0.25s ease, background 0.25s ease;
}

.pw-meter-bar[data-level="2"] span { background: #F59E0B; }
.pw-meter-bar[data-level="3"] span { background: #10B981; }
.pw-meter-bar[data-level="4"] span { background: #059669; }

.pw-meter-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 5px;
  font-size: 11.5px;
}

.pw-meter-label { font-weight: 700; color: var(--text-secondary); }
.pw-meter-rules { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--text-muted); }
.pw-meter-rules .ok { color: var(--success-text); font-weight: 600; }

.sec-account {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.sec-account-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.sec-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; text-align: center; }

.auth-back-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}

.auth-back-link:hover { color: var(--accent-primary); }

/* --------------------------------------------------------------------------
   Painel de PDFs (envio + leitura em segundo plano)
   -------------------------------------------------------------------------- */
.pdf-dock {
  position: fixed;
  left: calc(var(--shell-gap) * 2 + var(--sidebar-left-width));
  bottom: calc(var(--shell-gap) + 6px);
  z-index: 60;
  width: min(380px, calc(100vw - 32px));
  border-radius: var(--radius-lg);
  background: var(--glass-panel-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-highlight), var(--shadow-lg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  overflow: hidden;
  animation: pdfDockIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pdfDockIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.pdf-dock-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px 9px 14px;
  cursor: pointer;
}

.pdf-dock-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.pdf-dock.is-working .pdf-dock-icon { animation: pdfPulse 1.6s ease-in-out infinite; }

@keyframes pdfPulse {
  50% { box-shadow: 0 0 0 5px var(--accent-soft); }
}

.pdf-dock-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pdf-dock-text strong { font-size: 13.5px; }

.pdf-dock-text span {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.pdf-dock-btn { width: 28px; height: 28px; font-size: 13px; flex-shrink: 0; }

.pdf-dock-progress { height: 4px; margin: 0 14px; border-radius: var(--radius-full); background: var(--bg-surface-elevated); overflow: hidden; }

.pdf-dock-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width 0.4s ease;
}

.pdf-dock.is-working .pdf-dock-progress span {
  background-image: linear-gradient(110deg, #1D4ED8 0%, #2563EB 35%, #7DD3FC 50%, #2563EB 65%, #0EA5E9 100%);
  background-size: 200% 100%;
  animation: pdfShimmer 1.4s linear infinite;
}

@keyframes pdfShimmer {
  from { background-position: 200% 0; }
  to { background-position: 0 0; }
}

.pdf-dock-body { display: none; padding: 10px 12px 12px; }
.pdf-dock.is-expanded .pdf-dock-body { display: flex; flex-direction: column; gap: 8px; }

.pdf-dock-counts { display: flex; flex-wrap: wrap; gap: 5px; }
.pdf-dock-counts:empty { display: none; }

.pdf-count {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
  color: var(--text-secondary);
}

.pdf-count.is-working { color: var(--accent-soft-text); background: var(--accent-soft); border-color: var(--accent-border); }
.pdf-count.is-ready { color: var(--success-text); background: var(--success-bg); border-color: var(--success-border); }
.pdf-count.is-error { color: var(--danger-text); background: var(--danger-bg); border-color: var(--danger-border); }

.pdf-dock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(320px, 45vh);
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.pdf-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--glass-edge-soft);
}

.pdf-item-icon { width: 20px; flex-shrink: 0; text-align: center; font-size: 13px; }
.pdf-item.is-ready .pdf-item-icon { color: var(--success-text); font-weight: 800; }
.pdf-item.is-drive, .pdf-item.is-queued { opacity: 0.78; }
.pdf-item.is-error { border-color: var(--danger-border); background: var(--danger-bg); }

.pdf-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.pdf-item-title {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-item-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-item.is-error .pdf-item-meta { color: var(--danger-text); white-space: normal; }
.pdf-item-meta i { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.pdf-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--accent-soft);
  border-top-color: var(--accent-primary);
  animation: pdfSpin 0.8s linear infinite;
  vertical-align: middle;
}

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

.pdf-dock-empty { font-size: 12.5px; color: var(--text-muted); text-align: center; padding: 10px 6px; }

@media (max-width: 1080px) {
  .pdf-dock { left: 16px; }
}

@media (max-width: 560px) {
  .pdf-dock { left: 12px; right: 12px; width: auto; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .pdf-dock, .pdf-dock.is-working .pdf-dock-icon, .pdf-dock.is-working .pdf-dock-progress span, .pdf-spinner { animation: none; }
}


/* --------------------------------------------------------------------------
   Rodízio de revisões espaçadas
   -------------------------------------------------------------------------- */
.spaced-rules {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--glass-edge-soft);
}
.spaced-formula { color: var(--text-primary); }
.spaced-week-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.spaced-week { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.spaced-week-empty { font-size: 12px; color: var(--text-muted); }
.spaced-week-count { font-size: 11.5px; color: var(--text-muted); margin-left: auto; }
.spaced-week-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 9px;
  font: inherit;
  font-size: 12px;
  color: var(--text-primary);
  border-radius: 999px;
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface);
  cursor: pointer;
}
.spaced-week-chip span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spaced-week-chip small { color: var(--text-muted); white-space: nowrap; }
.spaced-week-chip.is-done { opacity: 0.65; }
.spaced-week-chip:hover { background: var(--bg-surface-hover); }

.spaced-list { max-height: 340px; }
.spaced-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
}
.spaced-main { min-width: 0; }
.spaced-title { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spaced-lesson { color: var(--text-secondary); font-weight: 700; }
.spaced-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 11px; color: var(--text-muted); }
.spaced-sub strong { color: var(--text-primary); }
.spaced-status {
  padding: 0 7px;
  border-radius: 999px;
  font-weight: 700;
  background: var(--bg-surface-hover);
  color: var(--text-secondary);
}
.spaced-status.is-ready { background: var(--success-bg); color: var(--success-text); }
.spaced-status.is-pending { background: var(--accent-soft); color: var(--accent-soft-text); }
.spaced-status.is-off { opacity: 0.7; }
.spaced-rel { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); white-space: nowrap; }
.spaced-rel select { width: auto; padding: 3px 8px; font-size: 12px; }

.kanban-card-ghost { cursor: default; border-style: dashed; }
.calendar-item-pill.is-forecast { opacity: 0.8; border: 1px dashed var(--accent-border); cursor: default; }

@media (max-width: 560px) {
  .spaced-row { grid-template-columns: 1fr; }
}


/* --------------------------------------------------------------------------
   Metas: configurações recolhidas, numeração por meta
   -------------------------------------------------------------------------- */
.goals-settings-card { padding: 0; overflow: hidden; }
.goals-settings-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  font: inherit;
  color: var(--text-primary);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.goals-settings-toggle:hover { background: var(--bg-surface-hover); }
.goals-settings-title { font-size: 14px; font-weight: 700; }
.goals-settings-summary { flex: 1; min-width: 0; font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goals-settings-sign {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  font-size: 17px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--glass-edge-soft);
  color: var(--text-secondary);
}
.goals-settings-body { padding: 4px 16px 16px; border-top: 1px solid var(--border-subtle); }
.goals-settings-body > :first-child { margin-top: 12px; }

.goals-meta-label { font-size: 12px; color: var(--text-secondary); }
.goal-num { width: 34px; text-align: center; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.goal-num strong { color: var(--text-primary); font-size: 13.5px; }
.goal-meta-row td {
  padding: 8px 14px !important;
  font-size: 12.5px;
  color: var(--text-secondary);
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.goal-meta-row strong { color: var(--text-primary); margin-right: 6px; }
.goal-meta-row td > span:last-child { margin-left: 6px; }
.goal-meta-now {
  margin-right: 6px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-soft-text);
}
.task-num {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 6px;
  color: var(--text-primary);
  background: var(--bg-surface-hover);
  font-variant-numeric: tabular-nums;
}

/* Dashboard: acerto por meta */
.meta-perf { display: flex; flex-direction: column; gap: 8px; }
.meta-perf-empty { font-size: 12.5px; color: var(--text-muted); }
.meta-perf-total { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.meta-perf-total strong { font-size: 18px; color: var(--accent-primary); }
.meta-perf-total span { font-size: 11.5px; color: var(--text-muted); }
.meta-perf-row { display: grid; grid-template-columns: 96px 1fr 84px; align-items: center; gap: 10px; font-size: 12.5px; }
.meta-perf-row.is-current .meta-perf-name { color: var(--accent-primary); }
.meta-perf-name, .meta-perf-value { display: flex; flex-direction: column; font-weight: 700; line-height: 1.2; }
.meta-perf-name small, .meta-perf-value small { font-weight: 500; font-size: 10.5px; color: var(--text-muted); }
.meta-perf-value { text-align: right; align-items: flex-end; }
.meta-perf-track { position: relative; height: 10px; border-radius: 999px; background: var(--bg-surface-hover); overflow: hidden; }
.meta-perf-bar { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent-primary); }
.meta-perf-bar.is-good { background: var(--success-text); }
.meta-perf-bar.is-low { background: var(--danger, #DC2626); }
.meta-perf-line { position: absolute; top: 0; bottom: 0; left: 70%; width: 2px; background: var(--text-muted); opacity: 0.6; }

/* Mentor: editar mensagem */
.chat-bubble.user { position: relative; }
.chat-edit-btn {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  font-size: 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.chat-bubble.user:hover .chat-edit-btn, .chat-edit-btn:focus-visible { opacity: 1; }
@media (hover: none) { .chat-edit-btn { opacity: 0.8; } }
.chat-bubble.editing { width: 92%; background: var(--bg-surface); color: var(--text-primary); border: 1px solid var(--accent-border); }
.chat-edit-input { width: 100%; resize: vertical; font-size: 13px; }
.chat-edit-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.chat-edit-hint { display: block; margin-top: 4px; font-size: 11px; color: var(--text-muted); }


/* --------------------------------------------------------------------------
   Assinatura: faixa do topo, tela de planos e painel admin
   -------------------------------------------------------------------------- */
.access-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface);
  color: var(--text-secondary);
}
.access-badge button {
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: var(--accent-primary);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}
.access-badge.is-trial { background: var(--accent-soft); color: var(--accent-soft-text); }
.access-badge.is-lifetime { color: var(--success-text); }
.access-badge.is-ending { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
@media (max-width: 720px) { .access-badge { display: none; } }

.paywall-card { position: relative; max-width: 640px; text-align: center; }
.paywall-close { position: absolute; top: 14px; right: 14px; }
.paywall-logo { margin: 0 auto 10px; border-radius: 12px; display: block; }
.paywall-card h2 { font-size: 20px; font-weight: 800; }
.paywall-lead { margin: 6px auto 16px; max-width: 460px; font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.plan-card {
  position: relative;
  padding: 16px 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-edge-soft);
  background: var(--bg-surface);
}
.plan-card.is-featured { border: 2px solid var(--accent-primary); box-shadow: var(--accent-glow); }
.plan-card h3 { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.plan-price { margin-top: 6px; font-size: 21px; font-weight: 800; color: var(--text-primary); }
.plan-sub { font-size: 11.5px; color: var(--text-muted); }
.plan-buy { margin-top: 10px; width: 100%; justify-content: center; }
.plan-pay { margin-top: 5px; font-size: 10.5px; color: var(--text-muted); }
.founder-card { flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.plan-flag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 10px;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-gradient);
}
.paywall-perks { list-style: none; padding: 0; margin: 0 0 12px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.8; }
.paywall-instructions { font-size: 12.5px; color: var(--text-primary); margin-bottom: 14px; }
.paywall-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.paywall-logout { margin-top: 12px; font: inherit; font-size: 12px; color: var(--text-muted); background: none; border: 0; cursor: pointer; text-decoration: underline; }
@media (max-width: 560px) { .plan-grid { grid-template-columns: 1fr; } }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); }
.admin-table td { vertical-align: middle; }
.admin-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.admin-note { max-width: 200px; font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-tag { padding: 1px 7px; font-size: 10.5px; font-weight: 700; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-text); }
.admin-actions { display: inline-flex; gap: 6px; align-items: center; }
.admin-actions select { width: auto; max-width: 240px; padding: 4px 8px; font-size: 12px; }
.access-pill { display: inline-block; padding: 2px 9px; font-size: 11.5px; font-weight: 700; border-radius: 999px; background: var(--bg-surface-hover); color: var(--text-secondary); }
.access-pill.is-trial { background: var(--accent-soft); color: var(--accent-soft-text); }
.access-pill.is-active, .access-pill.is-lifetime { background: var(--success-bg); color: var(--success-text); }
.access-pill.is-expired { background: var(--danger-bg); color: var(--danger); }

/* Oferta de fundador (tela de planos) */
.founder-card {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--accent-primary);
  background: var(--accent-soft);
}
.founder-card > div { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.founder-card strong { font-size: 17px; color: var(--text-primary); }
.founder-tag { font-size: 11.5px; font-weight: 800; color: var(--accent-soft-text); text-transform: uppercase; letter-spacing: 0.04em; }
.founder-sub { font-size: 12px; color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Minha Conta
   -------------------------------------------------------------------------- */
.sidebar-user-btn {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 6px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-secondary);
  background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.sidebar-user-btn:hover { background: var(--bg-surface-hover); color: var(--text-primary); }
.sidebar-user-btn #sidebarUserName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.account-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.account-subtitle { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); margin: 16px 0 8px; }
.account-sub { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.account-sub-main h4 { font-size: 20px; font-weight: 800; margin: 8px 0 4px; }
.account-sub-main p { font-size: 13px; color: var(--text-secondary); }
.account-sub-actions { display: flex; flex-direction: column; gap: 6px; }
.account-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.account-history { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.account-history li { display: grid; grid-template-columns: 86px 1fr; gap: 10px; font-size: 12.5px; padding: 6px 0; border-bottom: 1px solid var(--border-subtle); }
.account-history li span:first-child { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.account-form { display: flex; flex-direction: column; gap: 6px; }
.account-inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.account-inline .form-input { flex: 1; min-width: 180px; }
.account-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.account-facts dt { font-size: 11.5px; color: var(--text-muted); }
.account-facts dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; }
.account-danger { color: var(--danger) !important; border-color: rgba(220, 38, 38, 0.3) !important; }
.account-danger-solid { background: var(--danger); color: #fff; border: 0; }
.account-delete { margin-top: 12px; padding: 12px; display: flex; flex-direction: column; gap: 6px; border-radius: var(--radius-md); border: 1px solid rgba(220, 38, 38, 0.35); background: var(--danger-bg); }
.account-delete p { font-size: 12.5px; line-height: 1.5; }
.paywall-links { display: flex; justify-content: center; gap: 14px; }
@media (max-width: 900px) { .account-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Ícones (Material Symbols Rounded — fonts.google.com/icons). Herdam cor e tamanho do texto.
   -------------------------------------------------------------------------- */
.mi {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 1.2em;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 1em;
  overflow: hidden;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  vertical-align: -0.22em;
  flex-shrink: 0;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 20;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  user-select: none;
}
/* Ícones de destaque (cards da landing, avatar do Mentor) um pouco mais "cheios" */
.lp-feature-icon .mi,
.auth-feature-icon .mi,
.mentor-avatar .mi { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }
/* Tamanho próprio nos quadradinhos de destaque (as regras de texto dos cards não valem para o ícone) */
.auth-feature .auth-feature-icon .mi { font-size: 19px; line-height: 1; color: var(--accent-primary); }
.lp-ico .mi { font-size: 22px; color: var(--accent-primary); }
.lp-mentor-avatar .mi,
.mentor-avatar .mi { font-size: 18px; }
.lp-ico .mi,
.lp-mentor-avatar .mi { font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24; }

/* --------------------------------------------------------------------------
   Metas → Configurações (ritmo, fechar o déficit, cronograma, edital e dados)
   -------------------------------------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.cfg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cfg-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  min-width: 0;
}
.cfg-stat-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.cfg-stat-value { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cfg-stat-value b { font-size: 24px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.cfg-stat-value.is-warn b { color: var(--warning-text); }
.cfg-stat-value.is-bad b { color: var(--danger-text); }
.cfg-stat-value.is-good b { color: var(--success-text); }

.cfg-progress { margin: 12px 0 14px; }
.cfg-progress-text { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--text-secondary); margin-bottom: 6px; }
.cfg-progress-text strong { color: var(--text-primary); }
.cfg-bar { height: 8px; border-radius: 999px; background: var(--border-subtle); overflow: hidden; }
.cfg-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent-primary); transition: width 0.25s ease; }
.cfg-bar.is-full span { background: var(--success-text); }
.cfg-sim-note { margin: 6px 0 0; font-size: 12px; color: var(--accent-soft-text); }

.cfg-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-bottom: 12px; }
.cfg-grid:last-child { margin-bottom: 0; }
.cfg-card {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}
.cfg-card-wide { flex: 1.6 1 440px; }
.cfg-card-title { margin: 0; font-size: 14px; font-weight: 700; }
.cfg-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cfg-subject-filter { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.cfg-subject-filter .form-select { width: auto; min-width: 190px; padding: 6px 10px; font-size: 12.5px; }

.cfg-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; }
.cfg-line-label { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-secondary); }
.cfg-info-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
}
.cfg-info-btn:hover, .cfg-info-btn[aria-expanded="true"] { color: var(--accent-soft-text); background: var(--accent-soft); }
.cfg-info-btn .mi { font-size: 17px; }
.cfg-info {
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.cfg-stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.cfg-stepper button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  border-radius: 10px;
}
.cfg-stepper button:hover { background: var(--bg-surface-hover); }
.cfg-stepper input {
  width: 46px;
  border: 0;
  background: none;
  text-align: center;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  -moz-appearance: textfield;
}
.cfg-stepper input::-webkit-outer-spin-button,
.cfg-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cfg-stepper input:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: -2px; border-radius: 6px; }

.cfg-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; padding: 6px; }
.cfg-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cfg-switch-track { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--border-subtle); transition: background var(--transition-fast); }
.cfg-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}
.cfg-switch input:checked + .cfg-switch-track { background: var(--accent-primary); }
.cfg-switch input:checked + .cfg-switch-track::after { transform: translateX(18px); }
.cfg-switch input:focus-visible + .cfg-switch-track { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

.cfg-spacer { flex: 1; }
.cfg-save { align-self: flex-end; min-width: 120px; }

.cfg-option {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.cfg-option-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; }
.cfg-option-icon.is-blue { background: var(--accent-soft); color: var(--accent-soft-text); }
.cfg-option-icon.is-amber { background: var(--warning-bg); color: var(--warning-text); }
.cfg-option-text { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cfg-option-title { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; }
.cfg-option-sub { font-size: 12.5px; color: var(--text-muted); }
.cfg-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid var(--success-border);
}
.cfg-badge.is-empty { background: var(--bg-surface-elevated); color: var(--text-muted); border-color: var(--border-subtle); }
.cfg-btn { min-height: 40px; }
.cfg-deficit-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cfg-advice { flex: 1 1 260px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); }
.cfg-advice .is-ok { color: var(--success-text); font-weight: 600; }
.cfg-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
  .cfg-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfg-card-wide, .cfg-card { flex-basis: 100%; }
}
@media (max-width: 560px) {
  .cfg-subject-filter { width: 100%; }
  .cfg-subject-filter .form-select { flex: 1; min-width: 0; width: 100%; }
  .cfg-option-text { flex: 1 1 calc(100% - 60px); }
  .cfg-option .cfg-btn { flex: 1 1 auto; }
}
@media (max-width: 420px) {
  .cfg-stat { padding: 10px 12px; }
  .cfg-stat-value b { font-size: 20px; }
}

/* --------------------------------------------------------------------------
   Novo concurso em etapas + leitura do edital
   -------------------------------------------------------------------------- */
.wz-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.wz-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  min-width: 0;
}
.wz-steps li span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}
.wz-steps li.active { color: var(--accent-soft-text); border-color: var(--accent-border); background: var(--accent-soft); }
.wz-steps li.active span { background: var(--accent-primary); color: #fff; border-color: transparent; }
.wz-steps li.done { color: var(--success-text); }
.wz-grid { display: grid; gap: 12px; }
.wz-grid-2 { grid-template-columns: 1.4fr 0.8fr; }
.wz-hint { font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); margin: 0 0 12px; }
.wz-inline { display: flex; gap: 8px; }
.wz-inline .form-input { flex: 1; min-width: 0; }
.wz-preview {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  max-height: 200px;
  overflow-y: auto;
}
.wz-preview ul { margin: 6px 0; padding-left: 18px; }
.wz-preview li span { color: var(--text-muted); }
.wz-preview p { margin: 4px 0 0; }
.wz-ok { color: var(--success-text); font-weight: 600; }
.wz-muted { color: var(--text-muted); }
.wz-choices { display: flex; flex-direction: column; gap: 8px; }
.wz-choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  font-size: 13px;
}
.wz-choice:has(input[type="radio"]:checked) { border-color: var(--accent-border); background: var(--accent-soft); }
.wz-choice > input { margin-top: 3px; accent-color: var(--accent-primary); }
.wz-choice > span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wz-choice small { color: var(--text-muted); font-size: 12px; }
.wz-nav { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.wz-nav-spacer { flex: 1; }

.sq-edital {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.sq-edital-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--accent-soft-text); }
.sq-edital .form-input { flex: 1 1 200px; min-width: 0; padding: 4px 8px; font-size: 12px; }
.sq-edital-summary {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 12.5px;
  line-height: 1.5;
  max-height: 180px;
  overflow-y: auto;
}
.sq-edital-summary ul { margin: 4px 0; padding-left: 18px; columns: 2; column-gap: 18px; }
.sq-edital-summary p { margin: 4px 0 0; }
.sq-warn { color: var(--warning-text); }
.sq-note { color: var(--text-muted); font-size: 12px; }
.sq-tag { font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.sq-tag.is-ok { background: var(--success-bg); color: var(--success-text); }
.sq-tag.is-warn { background: var(--warning-bg); color: var(--warning-text); }
.sq-replan { margin: 0 0 10px; font-size: 12.5px; }

@media (max-width: 560px) {
  .wz-grid-2 { grid-template-columns: 1fr; }
  .wz-steps li { justify-content: center; font-size: 0; gap: 0; }
  .wz-steps li span { font-size: 11px; }
  .wz-steps li.active { font-size: 12px; gap: 6px; }
  .wz-inline { flex-direction: column; }
  .sq-edital-summary ul { columns: 1; }
}

/* --------------------------------------------------------------------------
   Tutorial guiado
   -------------------------------------------------------------------------- */
.tour-shade { position: fixed; inset: 0; z-index: 140; background: rgba(8, 12, 24, 0.55); }
.tour-spot {
  position: fixed;
  z-index: 141;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(8, 12, 24, 0.55), 0 0 0 2px var(--accent-primary);
  pointer-events: none;
  transition: top 0.25s ease, left 0.25s ease, width 0.25s ease, height 0.25s ease;
}
.tour-card {
  position: fixed;
  z-index: 142;
  padding: 16px 18px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  color: var(--text-primary);
  outline: none;
}
.tour-progress { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-soft-text); }
.tour-title { margin: 4px 0 6px; font-size: 16px; font-weight: 800; }
.tour-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.tour-text strong { color: var(--text-primary); }
.tour-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-spacer { flex: 1; }
.tour-spot.hidden, .tour-shade.hidden, .tour-card.hidden { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* Registrar desempenho: tempo estudado em horas e minutos */
.exec-time .form-label small { font-weight: 500; color: var(--text-muted); }
.exec-time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
