/* css/modules/gps.css */

/* ==========================================================================
   MODAL DE CONCLUSÃO: MISSÃO LIVRE (PREMIUM)
   ========================================================================== */

#gps-ml-completion-backdrop {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.gps-ml-completion-modal {
  background: rgba(15, 15, 20, 0.95) !important;
  border: 1px solid rgba(139, 92, 246, 0.4) !important;
  border-radius: 1.5rem !important;
  padding: 2.5rem !important;
  width: 90% !important;
  max-width: 480px !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(139, 92, 246, 0.15) !important;
  animation: gpsModalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
}

@keyframes gpsModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.gps-ml-completion-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1rem !important;
}

.gps-ml-completion-header [data-lucide="trophy"] {
  width: 4rem !important;
  height: 4rem !important;
  color: #a78bfa !important;
  filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.5)) !important;
}

.gps-ml-completion-header h4 {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: #f8fafc !important;
  margin: 0 !important;
  letter-spacing: -0.02em !important;
}

.gps-ml-completion-subtitle {
  color: #94a3b8 !important;
  font-size: 1.1rem !important;
  margin: 0 !important;
}

.gps-ml-completion-options {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  width: 100% !important;
}

.gps-ml-comp-btn {
  display: grid !important;
  grid-template-columns: 4rem 1fr !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  text-align: left !important;
  padding: 1.25rem !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 1.25rem !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
}

.gps-ml-comp-btn span[data-lucide] {
  grid-row: span 2 !important;
  justify-self: center !important;
  width: 1.75rem !important;
  height: 1.75rem !important;
  color: #64748b !important;
  transition: all 0.3s ease !important;
}

.gps-ml-comp-btn-title {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  color: #f1f5f9 !important;
  grid-column: 2 !important;
}

.gps-ml-comp-btn-desc {
  font-size: 0.85rem !important;
  color: #94a3b8 !important;
  grid-column: 2 !important;
}

/* Hover States Enhancement */
.gps-ml-comp-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.4) !important;
}

.gps-ml-comp-btn--livre:hover {
  border-color: rgba(139, 92, 246, 0.6) !important;
  background: rgba(139, 92, 246, 0.15) !important;
}

.gps-ml-comp-btn--livre:hover [data-lucide] {
  color: #a78bfa !important;
  transform: scale(1.2) !important;
}

.gps-ml-comp-btn--auto:hover {
  border-color: rgba(59, 130, 246, 0.6) !important;
  background: rgba(59, 130, 246, 0.15) !important;
}

.gps-ml-comp-btn--auto:hover [data-lucide] {
  color: #60a5fa !important;
  transform: scale(1.2) !important;
}

.gps-ml-comp-btn--rest:hover {
  border-color: rgba(234, 179, 8, 0.6) !important;
  background: rgba(234, 179, 8, 0.15) !important;
}

.gps-ml-comp-btn--rest:hover [data-lucide] {
  color: #facc15 !important;
  transform: scale(1.2) !important;
}

/* v2.9.0 - Add Memory Health Indicator Styles */
/* v2.8.2 - Fix Relevance Stars Interaction */
/* Base v2.8.0 */
/* v2.9.2 - Mission Timer Controls (Play, Save, Cancel) */

/* ==========================================================================
   Variáveis e Mixins
   ========================================================================== */

:root {
  /* Larguras das colunas fixas para cálculo de sticky */
  --gps-col-1-width: 30px;
  /* Expandir — compacto */
  --gps-col-2-width: 42px;
  /* Ordem (Nº) */
  --gps-col-3-width: 340px;
  /* Assunto */
  --gps-col-relevance-width: 90px;
  /* Relevância */
  --gps-col-4-width: 68px;
  /* Ex Prop */
  --gps-col-5-width: 88px;
  /* Desemp % */
  --gps-col-6-width: 100px;
  /* Acertos/Feitos */
  --gps-col-7-width: 58px;
  /* Links */
  --gps-col-8-width: 68px;
  /* Tempo */
  --gps-col-9-width: 50px;
  /* Ações */
  --gps-col-10-width: 158px;
  /* Timer */
  --gps-col-11-width: 116px;
  /* Últ Estudo — espaço para data sem quebra */

  /* Calcula offsets para colunas sticky */
  --gps-sticky-offset-col2: var(--gps-col-1-width);
  --gps-sticky-offset-col3: calc(var(--gps-sticky-offset-col2) + var(--gps-col-2-width));

  /* Cores específicas do GPS */
  --gps-parent-row-bg: rgba(255, 255, 255, 0.02);
  --gps-subtask-row-color: var(--text-secondary);
  --gps-subtask-border-color: rgba(var(--card-border-rgb, 58, 63, 69), 0.6);
  --gps-row-hover-bg: #1c2636;
  --gps-timer-active-row-bg: #1e293b;
  --gps-sticky-bg: #151d2b;
  /* Fundo base opaco para as linhas */
  --gps-highlight-temp-bg: rgba(255, 255, 0, 0.25);

  /* Cores Bloco Atual */
  --gps-bloco-review-r1-bg: rgba(59, 130, 246, 0.7);
  --gps-bloco-review-r1-border: #3b82f6;
  --gps-bloco-review-r2-bg: rgba(234, 179, 8, 0.7);
  --gps-bloco-review-r2-border: #eab308;
  --gps-bloco-review-r3-bg: rgba(249, 115, 22, 0.7);
  --gps-bloco-review-r3-border: #f97316;
  --gps-bloco-reinforcement-bg: rgba(239, 68, 68, 0.7);
  --gps-bloco-reinforcement-border: #ef4444;
  --gps-bloco-task-bg: var(--input-bg);
  --gps-bloco-task-border: var(--input-border);
  --gps-bloco-item-hover-bg: rgba(108, 117, 125, 0.1);

  /* Cores para barra de progresso inline - Baseado em Desempenho */
  --gps-progress-low: #ef4444;
  /* red-500 - Desempenho crítico */
  --gps-progress-medium: #f59e0b;
  /* amber-500 - Desempenho médio */
  --gps-progress-high: #10b981;
  /* green-500 - Bom desempenho */
  --gps-progress-nodata: #38bdf8;
  /* sky-400 - Sem dados */
  --gps-progress-track: rgba(255, 255, 255, 0.1);

  /* Cores SortableJS */
  --gps-sortable-ghost-bg: rgba(59, 130, 246, 0.2);
  --gps-sortable-drag-bg: var(--card-border);

  /* Senior Frontend Specs v3.0 */
  --bg-base: #1A212D;
  /* Fundo cinza-azulado muito escuro do painel geral */
  --bg-row-default: #252D3A;
  /* Fundo padrão das linhas da tabela */
  --accent-ciano: #00C4CC;
  /* Cor de destaque principal */
  --success-green: #34D399;
  /* Verde suave usado para Concluído */
  --text-muted: #64748B;
  /* Cor cinza/azul-claro para inativos nas linhas pendentes */
}

/* ==========================================================================
       Estilos Base do Módulo e Tabela de Acompanhamento
       ========================================================================== */

#module-gps .widget-body {
  overflow-x: auto;
  position: relative;
}

#gps-tracking-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
  min-width: 1060px;
  font-size: 0.8rem;
  box-sizing: border-box;
  border-spacing: 0;
}

#gps-tracking-table thead {
  background-color: rgba(26, 33, 45, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

#gps-tracking-table th,
#gps-tracking-table td {
  box-sizing: border-box;
  border: none;
  border-bottom: 1px solid var(--card-border);
  vertical-align: middle;
  padding: 0.55rem 0.35rem;
}

#gps-tracking-table tbody tr:last-child td {
  border-bottom: none;
}

#gps-tracking-table th {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 0.75rem 0.35rem;
}

#gps-tracking-table th:last-child {
  border-right: none;
}

#gps-tracking-table td {
  font-size: 0.82rem;
  background-color: transparent;
  /* Made transparent to show tr background */
  word-break: break-word;
  transition: background-color 0.15s ease-in-out, opacity 0.2s ease-in-out;
}

#gps-tracking-table td:last-child {
  border-right: none;
}

#gps-tracking-table tbody tr {
  background-color: var(--gps-sticky-bg) !important;
  transition: background-color 0.2s ease;
}

#gps-tracking-table tbody tr:hover {
  background-color: var(--gps-row-hover-bg) !important;
}

/* ==========================================================================
       Larguras e Alinhamentos das Colunas da Tabela
       ========================================================================== */
/* Coluna 1: Expandir */
#gps-tracking-table th:nth-child(1),
td:nth-child(1) {
  width: var(--gps-col-1-width);
  min-width: var(--gps-col-1-width);
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

/* Coluna 2: Ordem (Nº) */
#gps-tracking-table th:nth-child(2) {
  width: var(--gps-col-2-width);
  text-align: center;
}

#gps-tracking-table td:nth-child(2) {
  width: var(--gps-col-2-width);
  text-align: center;
  vertical-align: middle;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Coluna 3: Assunto */
#gps-tracking-table th:nth-child(3) {
  width: var(--gps-col-3-width);
  text-align: left;
  padding-left: 0.6rem;
}

#gps-tracking-table td:nth-child(3) {
  width: var(--gps-col-3-width);
  text-align: left;
  padding-left: 0.6rem;
  vertical-align: top;
}

/* Coluna 4: Relevância */
#gps-tracking-table th:nth-child(4),
td:nth-child(4) {
  width: var(--gps-col-relevance-width);
  text-align: center;
}

/* Coluna 5: Ex Prop */
#gps-tracking-table th:nth-child(5),
td:nth-child(5) {
  width: var(--gps-col-4-width);
  text-align: center;
}

/* Coluna 6: Desemp % */
#gps-tracking-table th:nth-child(6),
td:nth-child(6) {
  width: var(--gps-col-5-width);
  text-align: center;
  font-weight: 500;
  font-size: 0.75rem;
}

/* Coluna 7: Acertos/Feitos */
#gps-tracking-table th:nth-child(7),
td:nth-child(7) {
  width: var(--gps-col-6-width);
  text-align: center;
  font-size: 0.75rem;
}

/* Coluna 8: Links */
#gps-tracking-table th:nth-child(8),
td:nth-child(8) {
  width: var(--gps-col-7-width);
  text-align: center;
}

/* Coluna 9: Tempo */
#gps-tracking-table th:nth-child(9),
td:nth-child(9) {
  width: var(--gps-col-8-width);
  text-align: center;
  font-size: 0.75rem;
}

/* Coluna 10: Ações */
#gps-tracking-table th:nth-child(10),
td:nth-child(10) {
  width: var(--gps-col-9-width);
  text-align: center;
}

/* Coluna 11: Timer */
#gps-tracking-table th:nth-child(11),
td:nth-child(11) {
  width: var(--gps-col-10-width);
  text-align: center;
  white-space: nowrap;
  overflow: visible;
}

/* Coluna 12: Últ Estudo + Saúde */
#gps-tracking-table th:nth-child(12),
td:nth-child(12) {
  width: var(--gps-col-11-width);
  min-width: var(--gps-col-11-width);
  text-align: center;
  font-size: 0.75rem;
  white-space: nowrap;
}

/* ==========================================================================
       Indicador de Saúde da Memória (NOVO)
       ========================================================================== */
.gps-memory-health {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.gps-memory-health-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.health-high {
  color: #06b6d4;
  /* Cyan (Cheia) - Harmonizado */
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.4));
}

.health-medium {
  color: #f59e0b;
  /* Amber (Vence Hoje) */
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.3));
}

.health-low {
  color: #fb923c;
  /* Laranja (Venceu Ontem) */
  filter: drop-shadow(0 0 4px rgba(251, 146, 60, 0.3));
}

.health-critical {
  color: #ef4444;
  /* Vermelho (Atrasada) */
  animation: pulse-critical 2s infinite;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
}

.health-neutral {
  color: #4b5563;
}

/* Cinza escuro (Sem dados) */

@keyframes pulse-critical {
  0% {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
  }

  50% {
    opacity: 0.6;
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.8));
  }

  100% {
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
  }
}

/* ==========================================================================
       Estilos de Relevância (Estrelas)
       ========================================================================== */
.gps-relevance-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

/* Botão Wrapper (Este é o elemento clicável) */
.gps-star-btn {
  background: transparent;
  border: none;
  padding: 0;
  /* Sem padding para não expandir a célula */
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease;
  width: 16px;
  /* Define área de clique fixa */
  height: 16px;
}

.gps-star-btn:focus {
  outline: none;
}

/* Ícone da estrela dentro do botão */
.gps-star-icon {
  width: 14px;
  height: 14px;
  color: #4b5563;
  /* Gray-600 - Padrão/Vazia */
  transition: color 0.15s ease;
  pointer-events: none;
  /* O clique passa para o botão */
}

/* Estrela Ativa (Preenchida) */
.gps-star-icon.active {
  color: #eab308;
  /* Yellow-500 */
  fill: #eab308;
}

/* Efeito Hover */
.gps-relevance-stars:hover .gps-star-icon {
  opacity: 0.8;
}

.gps-star-btn:hover .gps-star-icon {
  transform: scale(1.2);
  opacity: 1 !important;
  color: #fbbf24;
  /* Yellow-400 no hover */
}

/* ==========================================================================
       Colunas Fixas (Sticky)
       ========================================================================== */
#gps-tracking-table th.sticky-col-1,
td.sticky-col-1,
#gps-tracking-table th.sticky-col-2,
td.sticky-col-2,
#gps-tracking-table th.sticky-col-3,
td.sticky-col-3 {
  position: sticky;
  z-index: 1;
}

/* Garante que colunas sticky tenham o mesmo fundo da linha */
#gps-tracking-table tbody tr td.sticky-col-1,
#gps-tracking-table tbody tr td.sticky-col-2,
#gps-tracking-table tbody tr td.sticky-col-3 {
  background-color: inherit !important;
}

#gps-tracking-table thead th.sticky-col-1,
#gps-tracking-table thead th.sticky-col-2,
#gps-tracking-table thead th.sticky-col-3 {
  background-color: var(--input-bg);
  z-index: 4;
}

#gps-tracking-table th.sticky-col-1,
td.sticky-col-1 {
  left: 0;
  border-left: none;
}

#gps-tracking-table th.sticky-col-2,
td.sticky-col-2 {
  left: var(--gps-sticky-offset-col2);
}

#gps-tracking-table th.sticky-col-3,
td.sticky-col-3 {
  left: var(--gps-sticky-offset-col3);
  border-right: 1px solid var(--card-border);
}

/* ==========================================================================
       Estilos de Hierarquia, Status e Barra de Progresso Inline
       ========================================================================== */
.gps-parent-row td {
  font-weight: 500;
  background-color: var(--gps-parent-row-bg);
}

.gps-parent-row td.sticky-col-1,
.gps-parent-row td.sticky-col-2,
.gps-parent-row td.sticky-col-3 {
  background-color: var(--gps-parent-row-bg);
}

.gps-subtask-row td {
  border-bottom: 1px dashed var(--gps-subtask-border-color);
  font-size: 0.8rem;
  color: var(--gps-subtask-row-color);
}

.gps-subtask-row:last-of-type td {
  border-bottom: 1px solid var(--card-border);
}

/* Efeito de Tarefa Concluída - Fixado para não afetar o fundo */
tr.task-completed .gps-item-content-wrapper,
tr.task-completed .status-badge,
tr.task-completed .gps-relevance-stars,
tr.task-completed .gps-open-link-modal-btn,
tr.task-completed .gps-memory-health,
tr.task-completed .gps-topic-progress-bar-container {
  opacity: 0.65;
}

/* Colunas que contém apenas texto: usamos cor em vez de opacidade para não afetar o fundo da célula */
tr.task-completed td:nth-child(2),
/* Nº */
tr.task-completed td:nth-child(5),
/* Ex Prop */
tr.task-completed td:nth-child(6),
/* Desemp % */
tr.task-completed td:nth-child(7),
/* Acertos/Feitos */
tr.task-completed td:nth-child(9),
/* Tempo */
tr.task-completed td:nth-child(12) {
  /* Últ. Estudo (texto da data) */
  color: var(--text-muted);
}

tr.task-completed td:nth-child(3) .gps-item-content-wrapper .gps-item-text-line .truncate {
  color: var(--text-secondary);
  text-decoration: line-through;
  opacity: 0.9;
}

tr.task-completed .gps-action-button:not(.gps-action-menu-btn) {
  opacity: 0.5;
}

tr.task-completed .gps-action-button:disabled {
  opacity: 0.5;
}

td:nth-child(3) .gps-item-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  position: relative;
  z-index: 1;
}

td:nth-child(3) .gps-item-content-wrapper .gps-item-text-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}

td:nth-child(3) .gps-item-content-wrapper .truncate {
  flex-grow: 1;
  min-width: 0;
}

td:nth-child(3) .gps-item-content-wrapper .shrink-0 {
  flex-shrink: 0;
}

td:nth-child(3) span[data-lucide="alert-triangle"] {
  color: var(--result-incorrect-text);
}

.gps-topic-progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--gps-progress-track);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.1rem;
}

.gps-topic-progress-bar-fill {
  height: 100%;
  border-radius: 4px;
  background-color: var(--gps-progress-high);
  transition: width 0.3s ease-out;
  width: 0%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.gps-topic-progress-bar-fill.progress-low {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gps-topic-progress-bar-fill.progress-medium {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gps-topic-progress-bar-fill.progress-high {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gps-topic-progress-bar-fill.progress-nodata {
  background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.gps-topic-progress-bar-text {
  position: absolute;
  right: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  mix-blend-mode: difference;
  filter: invert(1) grayscale(1) contrast(100);
  white-space: nowrap;
  line-height: 8px;
}

/* ==========================================================================
       Status Badges - Cores baseadas em Desempenho
       ========================================================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
}

/* PENDENTE - Azul médio */
.status-badge-pendente {
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.22);
}

/* EM ANDAMENTO - Roxo/Lilás */
.status-badge-andamento {
  background-color: rgba(0, 196, 204, 0.14);
  color: #67e8f9;
  border-color: rgba(0, 196, 204, 0.3);
}

/* CONCLUÍDO - Estado visual único */
.status-badge-concluido,
.status-badge-concluido-high,
.status-badge-concluido-medium,
.status-badge-concluido-low,
.status-badge-concluido-nodata {
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow: none;
}

.status-badge-revisao {
  background-color: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.22);
}

/* ==========================================================================
       Botões e Interações na Tabela
       ========================================================================== */
.gps-action-button {
  background: transparent !important;
  border: none !important;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none !important;
}

.gps-action-button:hover:not(:disabled) {
  color: #f8fbff;
  background-color: rgba(255, 255, 255, 0.08) !important;
  transform: scale(1.1);
}

.gps-action-button span[data-lucide],
.gps-action-button i.fas {
  width: 1em;
  height: 1em;
  margin: 0 !important;
  display: block;
}

.gps-action-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gps-expand-toggle span[data-lucide],
.gps-expand-toggle i.fas {
  transition: transform 0.2s ease;
}

.gps-expand-toggle.expanded span[data-lucide],
.gps-expand-toggle.expanded i.fas {
  transform: rotate(90deg);
}

.gps-open-link-modal-btn.has-links {
  color: var(--gps-link-button-color);
}

.gps-open-link-modal-btn:hover {
  color: var(--gps-link-button-color);
}

.gps-timer-button .timer-display {
  color: var(--text-primary);
  font-weight: 500;
  margin-left: 0.3rem;
  font-size: 0.8rem;
}

.gps-timer-button:hover:not(.timer-running):not(:disabled) {
  color: var(--gps-timer-start-hover);
}

.gps-timer-button.timer-paused {
  color: var(--text-secondary);
}

.gps-timer-button.timer-paused:hover:not(:disabled) {
  color: var(--gps-timer-start-hover);
}

.gps-timer-button.timer-running {
  color: var(--accent-color);
}

.gps-timer-button.timer-running:hover:not(:disabled) {
  color: var(--gps-timer-pause-hover);
}

.gps-log-timer-btn {
  color: var(--text-secondary);
}

.gps-log-timer-btn:hover:not(:disabled) {
  color: var(--gps-timer-log-hover);
  background-color: rgba(59, 130, 246, 0.1);
}

.gps-action-menu-btn {
  opacity: 0.2;
  transition: opacity 0.15s ease-in-out, color 0.2s ease,
    background-color 0.2s ease;
}

tbody tr:hover .gps-action-menu-btn,
.gps-action-menu-btn.menu-open {
  opacity: 1 !important;
}

.gps-action-menu-btn.menu-open {
  background-color: rgba(255, 255, 255, 0.15);
}

.gps-delete-subtask-btn:hover {
  color: var(--btn-danger-bg);
  background-color: var(--gps-menu-delete-hover-bg);
}

/* Dropdown do Menu de Ações */
#gps-action-menu-dropdown {
  background-color: #343a40;
  border: 1px solid #495057;
  border-radius: 0.375rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  z-index: 20;
  min-width: 170px;
  padding: 0.4rem 0;
  position: absolute;
  display: block;
  visibility: visible;
  opacity: 1;
}

#gps-action-menu-dropdown.hidden {
  display: none;
  visibility: hidden;
  opacity: 0;
}

.gps-action-menu-item {
  display: flex !important;
  align-items: center !important;
  padding: 0.5rem 1rem !important;
  margin-bottom: 0.2rem !important;
  border-radius: 0.2rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
  text-decoration: none;
}

.gps-action-menu-item:last-child {
  margin-bottom: 0 !important;
}

.gps-action-menu-item:hover {
  background-color: var(--gps-menu-item-hover-bg) !important;
  color: var(--text-heading) !important;
}

.gps-action-menu-item span[data-lucide],
.gps-action-menu-item i.fas {
  margin-right: 0.7rem !important;
  width: 0.9em !important;
  height: 0.9em !important;
  color: var(--text-secondary);
  transition: color 0.15s ease;
}

.gps-action-menu-item:hover span[data-lucide],
.gps-action-menu-item:hover i.fas {
  color: var(--text-heading) !important;
}

.gps-action-menu-item.delete-action span[data-lucide],
.gps-action-menu-item.delete-action i.fas,
.gps-action-menu-item.delete-action {
  color: var(--gps-menu-delete-color) !important;
}

.gps-action-menu-item.delete-action:hover {
  background-color: var(--gps-menu-delete-hover-bg) !important;
  color: var(--gps-menu-delete-hover-color) !important;
}

.gps-action-menu-item.delete-action:hover span[data-lucide],
.gps-action-menu-item.delete-action:hover i.fas {
  color: var(--gps-menu-delete-hover-color) !important;
}

#gps-action-menu-dropdown hr {
  border: none !important;
  height: 1px !important;
  background-color: #495057 !important;
  margin: 0.5rem 0 !important;
}

/* Efeito Hover na Linha - Aplicado ao TR para ser uniforme */
tbody tr:hover {
  background-color: var(--gps-row-hover-bg) !important;
  box-shadow: inset 4px 0 0 var(--accent-ciano);
}

tbody tr:hover td {
  background-color: transparent !important;
  color: #f8fafc;
}

/* Colunas Sticky devem ter a COR OPACA do hover para não vazar o fundo ao scrolar */
tbody tr:hover td.sticky-col-1,
tbody tr:hover td.sticky-col-2,
tbody tr:hover td.sticky-col-3 {
  background-color: var(--gps-row-hover-bg) !important;
}

/* Estilo para linha com timer ativo */
tr.gps-row-timer-active {
  background-color: var(--gps-timer-active-row-bg) !important;
}

tr.gps-row-timer-active td {
  background-color: transparent !important;
}

/* Acento lateral esquerdo na primeira célula (funciona corretamente com border-collapse: collapse) */
tr.gps-row-timer-active td:first-child {
  box-shadow: inset 3px 0 0 var(--accent-color);
}

tr.gps-row-timer-active td.sticky-col-1,
tr.gps-row-timer-active td.sticky-col-2,
tr.gps-row-timer-active td.sticky-col-3 {
  background-color: var(--gps-timer-active-row-bg) !important;
}

/* ==========================================================================
       Indicador de Carregamento
       ========================================================================== */
#gps-tracking-table-body.gps-table-loading td {
  opacity: 0.5;
}

#gps-tracking-table-body.gps-table-loading {
  cursor: progress;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gps-table-loading::after {
  content: "Carregando Dados...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.75rem 1.5rem;
  background-color: var(--gps-loading-bg);
  color: var(--gps-loading-text);
  border-radius: 0.5rem;
  z-index: 20;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  animation: fadeInLoading 0.3s ease-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

@keyframes fadeInLoading {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* ==========================================================================
       Estilos do Bloco Atual (Missão Atual)
       ========================================================================== */
#gps-bloco-atual-widget .widget-header {
  gap: 0.5rem;
}

#gps-bloco-atual-widget .widget-body {
  padding: 0;
}

.gps-mission-brief {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(71, 85, 105, 0.28);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(8, 47, 73, 0.22), rgba(15, 23, 42, 0.12)),
    rgba(15, 23, 42, 0.46);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.35);
}

.gps-mission-brief.hidden {
  display: none;
}

.gps-mission-brief-copy {
  flex: 1 1 320px;
  min-width: 0;
}

.gps-mission-brief-title {
  margin: 0;
  color: #f1f5f9;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.gps-mission-brief-subtitle {
  margin: 0.28rem 0 0;
  color: #94a3b8;
  font-size: 0.73rem;
  line-height: 1.4;
}

.gps-mission-brief-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.gps-mission-brief-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.24rem 0.6rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gps-mission-brief-chip--green {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.gps-mission-brief-chip--blue {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.gps-mission-brief-chip--orange {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(251, 146, 60, 0.32);
  color: #fed7aa;
}

.gps-mission-brief-chip--cyan {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.32);
  color: #ddd6fe;
}

.gps-mission-brief-chip--accent {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.28);
  color: #a5f3fc;
}

#gps-bloco-atual-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.gps-bloco-item {
  display: flex;
  align-items: flex-start;
  padding: 0.82rem 0.95rem;
  font-size: 0.8rem;
  gap: 0.7rem;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
  border-bottom: 1px solid var(--card-border);
}

#gps-bloco-atual-lista>div:last-child .gps-bloco-item {
  border-bottom: none;
}

.gps-bloco-item:hover {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.08)),
    var(--gps-bloco-item-hover-bg);
}

/* ========== EFEITO DE TAREFA CONCLUÍDA (VERDE FORTE) ========== */
.gps-bloco-item.completed {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
  border-left: 5px solid #10b981 !important;
  opacity: 1;
  position: relative;
}

.gps-bloco-item.completed::before {
  content: '✓';
  position: absolute;
  left: -2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: bold;
  color: #10b981;
  text-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
  animation: checkPulse 2s ease-in-out infinite;
}

@keyframes checkPulse {

  0%,
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }

  50% {
    opacity: 0.8;
    transform: translateY(-50%) scale(1.1);
  }
}

.gps-bloco-item.completed .gps-bloco-status-indicator {
  background-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.9) !important;
  border-color: #059669 !important;
}

.gps-bloco-item.completed .gps-bloco-item-assunto {
  color: #6ee7b7 !important;
  font-weight: 600;
  text-shadow: 0 0 2px rgba(110, 231, 183, 0.3);
}

/* Efeito de timer ativo na missão */
.gps-bloco-item.timer-active {
  background-color: var(--gps-timer-active-row-bg) !important;
  border-left: 3px solid var(--accent-color);
}

.gps-bloco-status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.25rem;
  box-shadow: 0 0 3px 0px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gps-bloco-status-indicator.status-pendente {
  background-color: #9ca3af;
}

.gps-bloco-status-indicator.status-em-andamento {
  background-color: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.4);
}

.gps-bloco-status-indicator.status-concluido {
  background-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

.gps-bloco-item-index {
  font-weight: 600;
  color: var(--text-secondary);
  width: 20px;
  text-align: right;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 0.125rem;
  opacity: 0.88;
}

.gps-bloco-item-type-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.32rem;
  flex-shrink: 0;
  width: 138px; /* largura fixa — impede que instrução longa empurre a coluna de detalhes */
}

/* Instrução contextual (↳ Estude / ↳ Revise...) */
.gps-bloco-session-instruction {
  font-size: 0.62rem;
  color: var(--text-secondary);
  opacity: 0.82;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  display: block;
}
.gps-bloco-session-instruction--reforco  { color: #f97316; opacity: 0.85; }
.gps-bloco-session-instruction--reaprender { color: #a78bfa; opacity: 0.85; }
.gps-bloco-session-instruction--revisao  { color: #60a5fa; opacity: 0.85; }
.gps-bloco-session-instruction--teoria   { color: #34d399; opacity: 0.85; }

.gps-bloco-item-type {
  font-weight: 600;
  padding: 0.16rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  align-self: flex-start;
  margin-top: 0.2rem;
  border: 1px solid transparent;
  color: white;
}

.gps-bloco-item-type-review-r1 {
  background-color: var(--gps-bloco-review-r1-bg);
  border-color: var(--gps-bloco-review-r1-border);
}

.gps-bloco-item-type-review-r2 {
  background-color: var(--gps-bloco-review-r2-bg);
  border-color: var(--gps-bloco-review-r2-border);
  color: #1f2937;
}

.gps-bloco-item-type-review-r3 {
  background-color: var(--gps-bloco-review-r3-bg);
  border-color: var(--gps-bloco-review-r3-border);
}

.gps-bloco-item-type-reinforcement {
  background-color: var(--gps-bloco-reinforcement-bg);
  border-color: var(--gps-bloco-reinforcement-border);
}

.gps-bloco-item-type-task {
  background-color: var(--gps-bloco-task-bg);
  border-color: var(--gps-bloco-task-border);
  color: var(--text-secondary);
}

/* =============================================
   TAGS DE SESSÃO ADAPTATIVA (mentor inteligente)
   Cada cor representa O QUE o aluno deve fazer.
   ============================================= */

/* 📖 TEORIA — Azul: aprender conteúdo novo pela primeira vez */
.gps-session-teoria {
  background-color: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

/* 🔁 REVISÃO — Âmbar: relembrar ativamente sem reler tudo */
.gps-session-revisao {
  background-color: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fcd34d;
}

/* ✏️ EXERCÍCIO — Verde: praticar questões, retrieval practice */
.gps-session-exercicio {
  background-color: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.35);
  color: #86efac;
}

/* 🔄 REAPRENDER — Laranja: tópico esquecido (>60 dias), recomeçar do zero */
.gps-session-reaprender {
  background-color: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.40);
  color: #fdba74;
}

.gps-bloco-item-details {
  flex-grow: 1;
  overflow: visible;
  min-width: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  padding-right: 0.35rem;
}

.gps-bloco-item-details:hover .gps-bloco-item-assunto {
  color: var(--gps-link-button-color);
}

.gps-bloco-item-disciplina {
  font-size: 0.68rem;
  color: #94a3b8;
  display: block;
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gps-bloco-item-assunto {
  color: #f8fafc;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  display: block;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: -0.01em;
  transition: color 0.15s ease-in-out;
}

.gps-bloco-item-assunto .italic {
  color: #6b7280;
  display: inline;
  margin-left: 0.25rem;
}

.gps-bloco-item-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.48rem 0.58rem;
}

.gps-bloco-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gps-bloco-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.26rem 0.58rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gps-bloco-meta-pill--accent {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.26);
  color: #a5f3fc;
}

.gps-bloco-meta-pill--guide {
  font-weight: 700;
}

.gps-bloco-meta-pill--guide-green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.gps-bloco-meta-pill--guide-blue {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.gps-bloco-meta-pill--guide-orange {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(251, 146, 60, 0.32);
  color: #fed7aa;
}

.gps-bloco-meta-pill--guide-cyan {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.32);
  color: #ddd6fe;
}

.gps-bloco-reason-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.gps-bloco-reason-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.66rem;
  border-radius: 9999px;
  background: rgba(8, 47, 73, 0.22);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #bae6fd;
  font-size: 0.69rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: help;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.gps-bloco-reason-trigger:hover,
.gps-bloco-reason-wrap:focus-within .gps-bloco-reason-trigger {
  border-color: rgba(34, 211, 238, 0.38);
  background: rgba(8, 47, 73, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 47, 73, 0.18);
}

.gps-bloco-reason-trigger:focus-visible {
  outline: none;
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.gps-bloco-reason-trigger-icon {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
}

.gps-bloco-reason-trigger-icon .lucide,
.gps-bloco-reason-trigger-icon i {
  width: 0.82rem;
  height: 0.82rem;
}

.gps-bloco-reason-trigger-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 9999px;
  background: rgba(34, 211, 238, 0.18);
  color: #ecfeff;
  font-size: 0.62rem;
  font-weight: 700;
}

.gps-bloco-reason-tooltip {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 250px;
  max-width: min(360px, calc(100vw - 3rem));
  padding: 0.78rem 0.88rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.42);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 20;
}

.gps-bloco-reason-wrap:hover .gps-bloco-reason-tooltip,
.gps-bloco-reason-wrap:focus-within .gps-bloco-reason-tooltip {
  opacity: 1;
  transform: translateY(0);
}

.gps-bloco-reason-tooltip-title {
  display: block;
  margin-bottom: 0.45rem;
  color: #7dd3fc;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gps-bloco-reason-tooltip-summary {
  margin: 0 0 0.55rem;
  color: #e2e8f0;
  font-size: 0.76rem;
  line-height: 1.45;
}

.gps-bloco-reason-tooltip-list {
  display: grid;
  gap: 0.38rem;
}

.gps-bloco-reason-tooltip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: #e2e8f0;
  font-size: 0.74rem;
  line-height: 1.38;
}

.gps-bloco-reason-tooltip-bullet {
  width: 0.38rem;
  height: 0.38rem;
  margin-top: 0.34rem;
  border-radius: 9999px;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  flex-shrink: 0;
}

.gps-bloco-reason-tooltip-action {
  margin: 0.65rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(56, 189, 248, 0.16);
  color: #93c5fd;
  font-size: 0.73rem;
  line-height: 1.45;
}

.gps-history-task-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.gps-history-task-badge--green {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
  color: #bbf7d0;
}

.gps-history-task-badge--blue {
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.28);
  color: #bfdbfe;
}

.gps-history-task-badge--orange {
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(251, 146, 60, 0.32);
  color: #fed7aa;
}

.gps-history-task-badge--cyan {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(167, 139, 250, 0.32);
  color: #ddd6fe;
}

.gps-bloco-item-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
  align-self: center;
  padding-top: 0.15rem;
}

#gps-bloco-atual-widget .widget-body {
  backdrop-filter: blur(8px);
}

/* --- NOVOS ESTILOS PARA CONTROLES DE TIMER NO BLOCO --- */

/* Container dos controles ativos */
.gps-bloco-timer-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
}

/* Botão Timer Padrão (Iniciar) */
.gps-timer-bloco-btn {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  /* Pill shape */
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
  min-width: 32px;
  justify-content: center;
}

.gps-timer-bloco-btn:hover {
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* Botões de Ação Específicos (Pause, Save, Cancel) */
.gps-timer-action-btn {
  padding: 0.25rem;
  border-radius: 50%;
  border: 1px solid transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background-color: transparent;
  width: 28px;
  height: 28px;
}

/* Pause/Play */
.gps-timer-action-btn.toggle-timer:hover {
  color: var(--text-primary);
  background-color: rgba(255, 255, 255, 0.1);
}

/* Save (Check) */
.gps-timer-action-btn.save-timer {
  color: #06b6d4;
  /* cyan-600 - harmonizado */
}

.gps-timer-action-btn.save-timer:hover {
  background-color: rgba(6, 182, 212, 0.2);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* Cancel (X) */
.gps-timer-action-btn.cancel-timer {
  color: #f87171;
  /* red-400 */
}

.gps-timer-action-btn.cancel-timer:hover {
  background-color: rgba(248, 113, 113, 0.2);
  border-color: rgba(248, 113, 113, 0.4);
}

/* Display de Tempo na Missão */
.gps-timer-mission-display {
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
  padding: 0 0.5rem;
  min-width: 45px;
  text-align: center;
}

.gps-timer-mission-display.paused {
  color: var(--text-secondary);
}

/* Botão salvar na missão (modo inativo) */
.gps-log-study-bloco {
  padding: 0.25rem;
  border-radius: 0.25rem;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

.gps-log-study-bloco:hover {
  color: var(--gps-timer-log-hover);
  background-color: rgba(59, 130, 246, 0.1);
}

/* ========== BOTÕES DO BLOCO MISSÃO ========== */

/* Container idle: "Iniciar foco" + "Registrar" */
.mission-start-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Base dos botões do bloco missão */
.mission-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  background: transparent;
  color: var(--text-secondary);
}

.mission-btn .lucide,
.mission-btn svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* Variantes */
.mission-btn.primary {
  background-color: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.35);
  color: #22d3ee;
}
.mission-btn.primary:hover {
  background-color: rgba(6, 182, 212, 0.28);
  border-color: rgba(6, 182, 212, 0.6);
}

.mission-btn.success {
  background-color: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}
.mission-btn.success:hover {
  background-color: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.6);
}

.mission-btn.ghost {
  background: transparent;
  border-color: var(--card-border);
  color: var(--text-secondary);
}
.mission-btn.ghost:hover {
  background-color: rgba(255, 255, 255, 0.07);
  color: var(--text-primary);
}

/* ========== TIMER ATIVO NO BLOCO MISSÃO ========== */

/* Quando timer está ativo, o item quebra para segunda linha
   para dar espaço aos controles sem sobrepor o texto */
.gps-bloco-item.timer-active {
  flex-wrap: wrap;
  row-gap: 0.5rem;
}

.gps-bloco-item.timer-active .gps-bloco-item-actions {
  width: 100%;
  margin-left: 0;
  padding-left: calc(20px + 0.5rem + 1.2rem); /* alinha com o texto: index + type-wrap offset */
  justify-content: flex-start;
}

/* Pill de tempo: ícone + "0:03" + "Foco ativo" */
.mission-time-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  background-color: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.mission-time-pill.paused {
  background-color: rgba(100, 116, 139, 0.1);
  border-color: rgba(100, 116, 139, 0.25);
}

.mission-time-status {
  font-size: 0.68rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

/* Grupo dos 3 botões de controle (Pausar/Retomar, Concluir, Cancelar) */
.mission-control-buttons {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.4rem;
}

/* Os botões de ação dentro do timer ativo já usam .mission-btn — sobrescreve o sizing
   circular do .gps-timer-action-btn (width/height: 28px fixos) */
.mission-control-buttons .mission-btn {
  width: auto;
  height: auto;
  border-radius: 9999px;
  padding: 0.25rem 0.55rem;
}

#gps-bloco-atual-lista:empty::after {
  content: "Nenhuma missão ativa.";
  display: block;
  padding: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

#gps-bloco-status-msg {
  color: #06b6d4;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--card-border);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

#gps-bloco-status-msg .lucide,
#gps-bloco-status-msg i.fas {
  width: 1.1em;
  height: 1.1em;
}

#gps-bloco-status-msg.hidden {
  display: none;
}

/* ==========================================================================
       Estilos para Ordenação (SortableJS) e Destaque
       ========================================================================== */
th.sortable-header {
  cursor: pointer;
  position: relative;
}

th.sortable-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

th .sort-indicator {
  display: inline-block;
  width: 1em;
  margin-left: 0.3em;
  opacity: 0.5;
  vertical-align: middle;
  font-size: 0.8em;
}

th.sort-asc .sort-indicator::after {
  content: "▲";
  opacity: 1;
}

th.sort-desc .sort-indicator::after {
  content: "▼";
  opacity: 1;
}

.sortable-ghost-gps {
  opacity: 0.4;
  background-color: var(--gps-sortable-ghost-bg) !important;
  outline: 1px dashed var(--accent-color);
}

.sortable-drag-gps {
  opacity: 0.9 !important;
  background-color: var(--gps-sortable-drag-bg) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

tr.highlighted-temp td,
tr.highlighted-temp td.sticky-col-1,
tr.highlighted-temp td.sticky-col-2,
tr.highlighted-temp td.sticky-col-3 {
  background-color: var(--gps-highlight-temp-bg) !important;
  transition: background-color 0.5s ease-in-out !important;
}

tr.highlighted-row td,
tr.highlighted-row td.sticky-col-1,
tr.highlighted-row td.sticky-col-2,
tr.highlighted-row td.sticky-col-3 {
  background-color: var(--gps-highlight-bg) !important;
}

/* ==========================================================================
       Estilos para Estatísticas e Modais
       ========================================================================== */
#gps-stats .widget-body {
  padding: 1rem;
}

#gps-stats .kpi-card {
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  border-radius: 0.375rem;
  border: 1px solid var(--card-border);
}

#gps-stats .kpi-title {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.125rem;
}

#gps-stats .kpi-value {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}

#gps-stats .kpi-detail {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

#gps-kpi-attention {
  color: var(--result-incorrect-text);
}

#gps-stats #gps-discipline-progress-chart {
  display: block;
  max-width: 180px;
  max-height: 180px;
  margin: 0 auto;
}

#gps-stats #gps-discipline-progress-chart-text {
  pointer-events: none;
}

#gps-link-modal-backdrop,
#gps-edit-task-modal-backdrop,
#gps-log-study-modal-backdrop,
#gps-add-subtask-modal-backdrop,
#gps-template-manager-modal-backdrop,
#gps-delete-discipline-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease-out, visibility 0s linear 0.2s;
  opacity: 0;
  visibility: hidden;
}

#gps-link-modal-backdrop.visible,
#gps-edit-task-modal-backdrop.visible,
#gps-log-study-modal-backdrop.visible,
#gps-add-subtask-modal-backdrop.visible,
#gps-template-manager-modal-backdrop.visible,
#gps-delete-discipline-modal-backdrop.visible {
  display: flex;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease-out;
}

#gps-link-modal-content,
#gps-edit-task-modal-content,
#gps-log-study-modal-content,
#gps-add-subtask-modal-content,
#gps-template-manager-modal-content,
#gps-delete-discipline-modal-content {
  width: 100%;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  z-index: 50;
  margin: 1rem;
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.375rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  max-width: 36rem;
}

#gps-link-modal-backdrop.visible #gps-link-modal-content,
#gps-edit-task-modal-backdrop.visible #gps-edit-task-modal-content,
#gps-log-study-modal-backdrop.visible #gps-log-study-modal-content,
#gps-add-subtask-modal-backdrop.visible #gps-add-subtask-modal-content,
#gps-template-manager-modal-backdrop.visible #gps-template-manager-modal-content,
#gps-delete-discipline-modal-backdrop.visible #gps-delete-discipline-modal-content {
  transform: scale(1);
  opacity: 1;
}

#gps-link-modal-content .widget-body,
#gps-edit-task-modal-content .widget-body,
#gps-log-study-modal-content .widget-body,
#gps-add-subtask-modal-content .widget-body,
#gps-template-manager-modal-content .widget-body,
#gps-delete-discipline-modal-content .widget-body {
  overflow-y: auto;
  flex-grow: 1;
}

#gps-link-modal-content .widget-body {
  max-height: 60vh;
}

#gps-link-modal-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gps-open-link-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 0.25rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 0.25rem;
}

.gps-open-link-btn:hover:not(:disabled) {
  color: var(--accent-color);
  background-color: rgba(40, 167, 69, 0.1);
}

.gps-open-link-btn span[data-lucide],
.gps-open-link-btn i.fas {
  width: 0.9em;
  height: 0.9em;
  margin: 0 !important;
  display: block;
}

.gps-open-link-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background-color: transparent !important;
  color: var(--text-secondary) !important;
}

#gps-template-manager-modal-content {
  max-width: 48rem;
}

#gps-template-manager-modal-content .widget-body {
  max-height: 70vh;
}

#gps-template-list-select {
  margin-bottom: 0.5rem;
}

#gps-template-subtasks-container {
  border-top: 1px solid var(--card-border);
  padding-top: 1rem;
  margin-top: 1rem;
}

.gps-template-subtask-row {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px dashed var(--card-border);
}

.gps-template-subtask-row:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.gps-template-subtask-row label {
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

.gps-template-subtask-row .input-form {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}

.gps-template-subtask-row .input-form[type="number"] {
  text-align: center;
}

.gps-remove-template-subtask-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: color 0.2s ease, background-color 0.2s ease;
  height: 34px;
  width: 34px;
}

.gps-remove-template-subtask-btn:hover {
  color: var(--btn-danger-bg);
  background-color: var(--gps-menu-delete-hover-bg);
}

.gps-remove-template-subtask-btn span[data-lucide],
.gps-remove-template-subtask-btn i.fas {
  width: 0.9em;
  height: 0.9em;
  margin: 0 !important;
}

#gps-delete-discipline-modal-content {
  max-width: 30rem;
  border-color: var(--btn-danger-border);
}

#gps-delete-discipline-modal-content .widget-header {
  background-color: rgba(220, 53, 69, 0.1);
  border-bottom-color: var(--btn-danger-border);
}

#gps-delete-discipline-modal-content .widget-title {
  color: var(--btn-danger-bg);
}

#gps-delete-discipline-modal-content .widget-body p {
  margin-bottom: 0.75rem;
}

#gps-delete-discipline-option-delete-all,
#gps-delete-discipline-option-keep-data {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border: 1px solid var(--card-border);
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

#gps-delete-discipline-option-delete-all {
  background-color: rgba(220, 53, 69, 0.2);
  border-color: rgba(220, 53, 69, 0.5);
  color: var(--btn-danger-text);
}

#gps-delete-discipline-option-delete-all:hover {
  background-color: rgba(220, 53, 69, 0.4);
}

#gps-delete-discipline-option-keep-data {
  background-color: rgba(108, 117, 125, 0.1);
  border-color: var(--input-border);
  color: var(--text-primary);
}

#gps-delete-discipline-option-keep-data:hover {
  background-color: rgba(108, 117, 125, 0.2);
}

#gps-delete-discipline-option-delete-all strong,
#gps-delete-discipline-option-keep-data strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

#gps-delete-discipline-option-delete-all span,
#gps-delete-discipline-option-keep-data span {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* ==========================================================================
       Responsividade - OTIMIZADA PARA NOTEBOOKS
       ========================================================================== */

/* Laptops Padrão (1280px - 1440px) - Otimização Principal */
@media (max-width: 1440px) {
  :root {
    --gps-col-3-width: 280px;
    /* Reduz assunto */
    --gps-col-relevance-width: 85px;
    /* Compacta relevância */
    --gps-col-4-width: 70px;
    /* Ex Prop menor */
    --gps-col-5-width: 90px;
    /* Desemp % menor */
    --gps-col-8-width: 70px;
    /* Tempo menor */
  }

  #gps-tracking-table {
    font-size: 0.78rem;
  }

  #gps-tracking-table td,
  #gps-tracking-table th {
    padding: 0.7rem 0.4rem;
  }

  /* Compacta botões de ação */
  .gps-action-button {
    padding: 0.35rem;
  }

  /* Headers mais compactos */
  #gps-tracking-table th {
    font-size: 0.72rem;
    padding: 0.6rem 0.3rem;
  }
}

/* Notebooks 13-15" (1024px - 1279px) - Priorização de Colunas */
@media (max-width: 1279px) {
  :root {
    --gps-col-3-width: 240px;
    --gps-col-relevance-width: 80px;
  }

  #gps-tracking-table {
    min-width: 950px;
    font-size: 0.75rem;
  }

  /* Esconde colunas secundárias */
  #gps-tracking-table th:nth-child(7),
  td:nth-child(7) {
    /* Acertos/Feitos */
    display: none;
  }

  /* Compacta Headers com Abreviações */
  #gps-tracking-table th:nth-child(6)::after {
    content: " %";
    /* "Desemp %" */
  }

  #gps-stats .widget-body {
    grid-template-columns: 1fr 1fr;
  }

  #gps-stats .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }

  #gps-stats .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  #gps-tracking-table {
    min-width: 800px;
    font-size: 0.73rem;
  }

  #gps-tracking-table td,
  #gps-tracking-table th {
    padding: 0.6rem 0.35rem;
  }

  /* Esconde mais colunas */
  #gps-tracking-table th:nth-child(6),
  td:nth-child(6),
  /* Desemp % */
  #gps-tracking-table th:nth-child(8),
  td:nth-child(8),
  /* Links */
  #gps-tracking-table th:nth-child(12),
  td:nth-child(12) {
    /* Últ. Estudo + Saúde */
    display: none;
  }
}

/* Mobile Grande (641px - 767px) */
@media (max-width: 767px) {
  #gps-tracking-table {
    min-width: 650px;
    font-size: 0.72rem;
  }

  #gps-tracking-table th:nth-child(5),
  td:nth-child(5) {
    width: 55px;
    font-size: 0.7rem;
  }

  /* Ex Prop */

  #gps-tracking-table th:nth-child(9),
  td:nth-child(9) {
    /* Tempo */
    display: none;
  }

  #gps-stats .widget-body {
    grid-template-columns: 1fr;
  }

  #gps-stats .md\:col-span-2,
  #gps-stats .md\:col-span-1 {
    grid-column: span 1 / span 1;
  }

  #gps-stats .kpi-value {
    font-size: 1.25rem;
  }

  #gps-stats #gps-discipline-progress-chart {
    max-width: 150px;
    max-height: 150px;
  }

  #gps-stats #gps-discipline-progress-chart-text {
    font-size: 1rem;
  }
}

/* Mobile Médio (481px - 640px) */
@media (max-width: 640px) {
  #gps-tracking-table {
    min-width: 550px;
  }

  #gps-tracking-table th:nth-child(5),
  td:nth-child(5),
  /* Ex Prop */
  #gps-tracking-table th:nth-child(11),
  td:nth-child(11) {
    /* Timer */
    display: none;
  }

  #gps-tracking-table th:nth-child(4),
  td:nth-child(4) {
    /* Relevância */
    width: 70px;
  }
}

/* Mobile Pequeno (< 480px) */
@media (max-width: 480px) {
  #gps-tracking-table {
    min-width: 450px;
  }

  #gps-tracking-table th:nth-child(10),
  td:nth-child(10) {
    width: 40px;
  }

  /* Ações */

  .gps-action-menu-btn {
    padding: 0.2rem;
  }

  .gps-action-menu-btn span[data-lucide],
  .gps-action-menu-btn i.fas {
    width: 1em;
    height: 1em;
  }

  #gps-stats .grid-cols-2 {
    grid-template-columns: 1fr;
  }

  #gps-stats .kpi-card {
    text-align: left;
  }
}

/* ==========================================================================
   TOOLTIPS INFORMATIVOS (Colunas Ocultas)
   ========================================================================== */
.gps-column-tooltip {
  position: relative;
  cursor: help;
}

.gps-column-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: 6px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gps-column-tooltip:hover::after {
  opacity: 1;
}

/* Indicador visual de informação oculta */
.gps-has-hidden-info {
  position: relative;
}

.gps-has-hidden-info::before {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background: var(--accent-color);
  border-radius: 50%;
  opacity: 0.6;
}

/* ==========================================================================
   MODO CARD PARA MOBILE (< 640px) - FUTURO
   ========================================================================== */
.gps-card-view {
  display: none;
  /* Ativado via JS em telas muito pequenas */
}

@media (max-width: 640px) {

  /* Modo Card será implementado opcionalmente */
  .gps-table-view.hide-on-mobile {
    display: none;
  }

  .gps-card-view.show-on-mobile {
    display: block;
  }
}

/* ==========================================================================
   INDICADORES DE RESPONSIVIDADE (Debug Helper - Opcional)
   ========================================================================== */
.gps-responsive-indicator {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: monospace;
  z-index: 9999;
  display: none;
  /* Ativar apenas em desenvolvimento */
}

/* Mostra o indicador apenas em modo debug */
body.debug-responsive .gps-responsive-indicator {
  display: block;
}

@media (max-width: 1440px) {
  .gps-responsive-indicator::after {
    content: ' | Laptop 15" (1280-1440)';
  }
}

@media (max-width: 1279px) {
  .gps-responsive-indicator::after {
    content: ' | Notebook 13-15" (1024-1279)';
  }
}

@media (max-width: 1023px) {
  .gps-responsive-indicator::after {
    content: ' | Tablet (768-1023)';
  }
}

@media (max-width: 767px) {
  .gps-responsive-indicator::after {
    content: ' | Mobile L (641-767)';
  }
}

@media (max-width: 640px) {
  .gps-responsive-indicator::after {
    content: ' | Mobile M (481-640)';
  }
}

@media (max-width: 480px) {
  .gps-responsive-indicator::after {
    content: ' | Mobile S (<480)';
  }
}

/* --- Estilos Autocomplete Tags --- */
#gps-log-study-modal-tags-suggestions,
#acompanhamento-edit-log-modal-tags-suggestions {
  position: absolute;
  z-index: 50;
  width: 100%;
  background-color: #495057;
  border: 1px solid #6c757d;
  border-top: none;
  border-radius: 0 0 0.375rem 0.375rem;
  margin-top: -1px;
  max-height: 10rem;
  overflow-y: auto;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.tag-suggestion-item {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-suggestion-item:hover,
.tag-suggestion-item.active-suggestion {
  background-color: rgba(108, 117, 125, 0.4);
  color: var(--text-heading);
}

/* ==========================================================================
   ALINHAMENTO VERTICAL - MISSÃO ATUAL E PROGRESSO
   ========================================================================== */

/* Faz as 3 colunas terem altura igual (Sidebar, Missão, Progresso) */
@media (min-width: 1024px) {

  /* Grid principal com stretch vertical */
  .gps-main-grid {
    align-items: stretch;
    display: grid;
  }

  /* Todas as 3 colunas principais expandem em altura */
  .gps-main-grid>div {
    display: flex;
    flex-direction: column;
    min-height: 100%;
  }

  /* Remove space-y-6 das colunas centrais para permitir expansão total */
  .gps-main-grid>div:nth-child(2),
  .gps-main-grid>div:nth-child(3) {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0 !important;
  }

  /* Remove margens do space-y-6 */
  .gps-main-grid>div:nth-child(2)>*,
  .gps-main-grid>div:nth-child(3)>* {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  /* Widgets dentro das colunas também expandem */
  .gps-sidebar>*,
  .gps-main-grid>div>* {
    flex-shrink: 0;
  }

  /* Widget Missão Atual e Progresso expandem para preencher */
  #gps-bloco-atual-widget,
  #gps-stats {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
  }

  /* Headers ficam fixos */
  #gps-bloco-atual-widget .widget-header,
  #gps-stats .widget-header {
    flex-shrink: 0;
  }

  /* Body dos widgets cresce para preencher TODO o espaço disponível */
  #gps-bloco-atual-widget .widget-body,
  #gps-stats .widget-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
  }

  /* Lista da missão atual expande e tem scroll */
  #gps-bloco-atual-lista {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
  }

  /* Scrollbar estilizada para a lista da missão */
  #gps-bloco-atual-lista::-webkit-scrollbar {
    width: 8px;
  }

  #gps-bloco-atual-lista::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
  }

  #gps-bloco-atual-lista::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.5);
    /* Azul semi-transparente */
    border-radius: 4px;
    transition: background 0.2s ease;
  }

  #gps-bloco-atual-lista::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.8);
    /* Azul mais visível no hover */
  }

  /* Progresso também expande */
  #gps-stats .widget-body {
    overflow-y: auto;
  }

  /* Scrollbar para Progresso também */
  #gps-stats .widget-body::-webkit-scrollbar {
    width: 6px;
  }

  #gps-stats .widget-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
  }

  #gps-stats .widget-body::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.4);
    border-radius: 3px;
  }

  #gps-stats .widget-body::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.7);
  }

  /* KPIs do progresso não devem encolher */
  #gps-stats .widget-body>* {
    flex-shrink: 0;
  }
}

/* ==========================================================================
   OTIMIZAÇÃO DE ESCALA (Simula Zoom 80%)
   ========================================================================== */

/*
  Em notebooks, zoom 80% fica perfeito.
  Vamos ajustar os tamanhos para simular esse efeito em 100%
*/
@media (min-width: 1024px) and (max-width: 1440px) {

  /* Reduz ligeiramente o tamanho geral do módulo GPS */
  #module-gps {
    font-size: 0.9rem;
    /* 90% do tamanho original */
  }

  /* Compacta widgets sem perder legibilidade */
  .widget-card {
    font-size: 0.875rem;
  }

  /* Headers compactos mas legíveis */
  .widget-title {
    font-size: 0.95rem;
  }

  /* Page header otimizado */
  .page-header {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
  }

  /* KPI cards compactos */
  .kpi-card {
    padding: 0.875rem;
  }

  .kpi-value {
    font-size: 1.5rem;
  }

  .kpi-title,
  .kpi-detail {
    font-size: 0.75rem;
  }

  /* Botões ligeiramente menores */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  .btn-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.75rem;
  }

  /* Inputs mantêm tamanho confortável mas compactos */
  .input-form {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }

  /* Spacing reduzido entre widgets */
  .space-y-6>*+* {
    margin-top: 1.25rem !important;
  }

  .space-y-4>*+* {
    margin-top: 0.875rem !important;
  }

  /* Grid gaps otimizados */
  .gap-6 {
    gap: 1.25rem !important;
  }

  /* Widget body padding otimizado */
  .widget-body {
    padding: 1rem;
  }

  /* Tabela de acompanhamento mais compacta */
  #gps-tracking-table {
    font-size: 0.75rem;
  }

  /* Missão Atual e Progresso com altura ajustada */
  #gps-bloco-atual-widget,
  #gps-stats {
    min-height: 580px;
  }
}

/* ==========================================================================
   MELHORIAS DE RESPONSIVIDADE PARA NOTEBOOKS PEQUENOS
   ========================================================================== */

/* Notebooks pequenos (1024px - 1366px) - Telas comuns de 13-15" */
@media (max-width: 1366px) {

  /* Aumenta tamanho dos inputs para melhor visualização */
  .input-form {
    font-size: 0.9375rem;
    /* 15px */
    padding: 0.625rem 0.75rem;
    /* 10px 12px */
  }

  /* Labels mais visíveis */
  label {
    font-size: 0.875rem;
    font-weight: 600;
  }

  /* Widget cards com padding otimizado */
  .widget-body {
    padding: 1.25rem;
  }

  /* Botões com altura mínima confortável */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    min-height: 42px;
    font-size: 0.9375rem;
  }
}

/* Notebooks muito pequenos (< 1280px) - Ajustes mais agressivos */
@media (max-width: 1279px) {

  /* Grid principal do GPS: stack vertical em telas pequenas */
  .gps-main-grid {
    grid-template-columns: 1fr !important;
  }

  /* Sidebar do GPS fica em cima, não ao lado */
  .gps-sidebar {
    order: 1;
  }

  /* Conteúdo principal vem depois */
  #gps-main-content {
    order: 2;
  }

  /* Inputs ainda maiores para facilitar digitação */
  .input-form {
    font-size: 1rem;
    /* 16px - previne zoom no iOS também */
    padding: 0.75rem 1rem;
    min-height: 44px;
    /* Altura confortável para touch */
  }

  /* Placeholders mais visíveis */
  .input-form::placeholder {
    font-size: 0.875rem;
    opacity: 0.6;
  }

  /* Espaçamento entre campos */
  .widget-body .flex.flex-col>div+div {
    margin-top: 0.75rem;
  }

  /* Fieldsets com mais espaçamento */
  fieldset {
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
  }

  /* Legends mais visíveis */
  legend {
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0 0.5rem;
  }
}

/* Tablets e telas menores (< 1024px) */
@media (max-width: 1023px) {

  /* Garante que sidebar do GPS seja sempre overlay em mobile */
  .gps-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    max-width: 85vw;
    z-index: 40;
    background-color: var(--card-bg);
    border-right: 1px solid var(--card-border);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .gps-sidebar.active {
    transform: translateX(0);
  }

  /* Backdrop quando sidebar está aberta */
  .gps-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 39;
  }

  .gps-sidebar-backdrop.active {
    display: block;
  }

  /* Botão toggle sidebar visível */
  .gps-sidebar-toggle {
    display: flex !important;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 30;
    background-color: var(--accent-color);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .gps-sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  }

  .gps-sidebar-toggle:active {
    transform: scale(0.95);
  }

  /* Inputs full width e maiores em mobile */
  .input-form,
  select.input-form {
    width: 100% !important;
    font-size: 1rem;
    padding: 0.875rem 1rem;
    min-height: 48px;
  }

  /* Botões full width e maiores */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }

  /* Widget headers compactos */
  .widget-header {
    padding: 0.875rem 1rem;
  }

  .widget-title {
    font-size: 1rem;
  }

  /* Page header compacto */
  .page-header {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
}

/* Mobile pequeno (< 640px) */
@media (max-width: 639px) {

  /* Reduz padding geral */
  .widget-body {
    padding: 1rem;
  }

  /* Headers ainda mais compactos */
  .page-header {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }

  /* Botões com texto menor mas ainda legível */
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    font-size: 0.9375rem;
  }

  /* Gaps menores entre elementos */
  .space-y-4>*+* {
    margin-top: 0.75rem !important;
  }

  /* Grid gaps menores */
  .gap-6 {
    gap: 1rem !important;
  }
}

/* ==========================================================================
   v3.0+ Tracking Premium Overrides & Timer Capsules
   ========================================================================== */
#gps-tracking-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 1140px;
}

#gps-tracking-table thead {
  background-color: rgba(22, 34, 55, 0.98);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
}

#gps-tracking-table thead th {
  color: #cce0eb;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  padding: 12px 8px;
  border: none !important;
  text-transform: none;
  letter-spacing: normal;
}

#gps-tracking-table th,
#gps-tracking-table td {
  box-sizing: border-box;
  border: none !important;
  vertical-align: middle;
  padding: 16px;
}

#gps-tracking-table td {
  font-size: 14px;
  color: #c9d6e7;
  font-family: 'Inter', sans-serif;
  transition: all 0.2s ease-in-out;
}

#gps-tracking-table tbody tr {
  background-color: var(--bg-row-default);
  height: 48px;
  transition: transform 0.2s ease, background-color 0.2s ease, border-left 0.2s ease;
  border-bottom: 8px solid transparent;
  background-clip: padding-box;
  border-left: 4px solid transparent;
}

#gps-tracking-table tbody tr:hover td {
  background-color: rgba(45, 55, 72, 0.9) !important;
}

/* ======== ESTADOS DAS LINHAS (COMPONENTIZAÇÃO) ======== */

/* Estado 1: PENDENTE (Padrão) */
#gps-tracking-table tbody tr.gps-status-pendente td {
  color: var(--text-muted);
}

#gps-tracking-table tbody tr.gps-status-pendente .gps-action-menu-btn,
#gps-tracking-table tbody tr.gps-status-pendente .gps-timer-capsule-idle button {
  color: var(--text-muted);
}

/* Estado 2: EM ANDAMENTO */
#gps-tracking-table tbody tr.gps-status-andamento {
  border-left: 4px solid var(--accent-ciano);
}

#gps-tracking-table tbody tr.gps-status-andamento .truncate {
  color: #E2E8F0 !important;
  /* Apenas leve destaque no título pra legibilidade */
  font-weight: 700;
}

/* Estado 3: CONCLUÍDO (Apenas Borda Leve) */
#gps-tracking-table tbody tr.gps-status-concluido {
  border-left: 4px solid var(--success-green);
}

#gps-tracking-table tbody tr.gps-status-concluido .truncate {
  color: var(--success-green) !important;
  /* Destaque leve na string principal do título */
}

/* ----------- STATUS BADGES NOVOS ----------- */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.status-badge.concluido {
  background: rgba(52, 211, 153, 0.15) !important;
  color: var(--success-green) !important;
  border: 1px solid rgba(52, 211, 153, 0.3) !important;
}

.status-badge.pendente {
  background: rgba(100, 116, 139, 0.15) !important;
  color: var(--text-muted) !important;
  border: 1px solid rgba(100, 116, 139, 0.3) !important;
}

.status-badge.andamento {
  background: rgba(0, 196, 204, 0.15) !important;
  color: var(--accent-ciano) !important;
  border: 1px solid rgba(0, 196, 204, 0.3) !important;
}

/* ----------- TIPO/ICONES HOVER ----------- */
.gps-action-menu-btn,
.gps-delete-subtask-btn,
.gps-open-link-modal-btn {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aeb9cc;
  border-radius: 8px;
  transition: all 0.25s ease;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gps-action-menu-btn span[data-lucide],
.gps-action-menu-btn i.fas,
.gps-delete-subtask-btn span[data-lucide],
.gps-delete-subtask-btn i.fas,
.gps-open-link-modal-btn span[data-lucide],
.gps-open-link-modal-btn i.fas {
  width: 16px;
  height: 16px;
}

.gps-action-menu-btn:hover,
.gps-delete-subtask-btn:hover,
.gps-open-link-modal-btn:hover {
  background-color: rgba(56, 189, 248, 0.15);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.gps-delete-subtask-btn:hover {
  background-color: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

/* ----------- IDLE CAPSULE (Hover Mode) ----------- */
.gps-timer-capsule-idle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  padding: 0;
  border: none;
}

.gps-timer-capsule-idle[style*="display: none"] {
  display: none !important;
}

.gps-timer-capsule-idle button {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(0, 196, 204, 0.4);
  cursor: pointer;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all 0.2s ease-in-out;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 32px;
}

.gps-timer-capsule-idle button svg,
.gps-timer-capsule-idle button .lucide,
.gps-timer-capsule-active button svg,
.gps-timer-capsule-active button .lucide {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  stroke-width: 2.2 !important;
  fill: none !important;
  margin-right: 0 !important;
  flex-shrink: 0;
}

.gps-timer-capsule-idle button:hover:not(:disabled) {
  color: #E2E8F0;
  transform: translateY(-2px);
  background: rgba(0, 196, 204, 0.15);
  border-color: rgba(0, 196, 204, 0.6);
  box-shadow: 0 4px 12px rgba(0, 196, 204, 0.1);
}

.gps-timer-capsule-idle button.btn-capsule-concluir:hover:not(:disabled) {
  color: var(--success-green);
  background: rgba(52, 211, 153, 0.15);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 12px rgba(52, 211, 153, 0.1);
}

.gps-timer-capsule-idle button.btn-capsule-cancelar:hover:not(:disabled) {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.gps-timer-capsule-idle button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ----------- ACTIVE CAPSULE (Apenas no ANDAMENTO) ----------- */
.gps-timer-capsule-active {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  gap: 12px;
  min-width: 200px;
}

.gps-timer-capsule-active[style*="display: none"] {
  display: none !important;
}

.active-controls-left {
  display: flex;
  gap: 8px;
}

.gps-timer-capsule-active button {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--accent-ciano) !important;
  background: rgba(0, 196, 204, 0.1) !important;
  color: var(--accent-ciano) !important;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.gps-timer-capsule-idle button.btn-capsule-focar svg,
.gps-timer-capsule-idle button.btn-capsule-focar .lucide {
  width: 20px !important;
  height: 20px !important;
}

.gps-timer-capsule-active button.btn-active-pause svg,
.gps-timer-capsule-active button.btn-active-stop svg {
  width: 20px !important;
  height: 20px !important;
}

.gps-timer-capsule-active button:hover {
  background: rgba(0, 196, 204, 0.2) !important;
  box-shadow: 0 4px 15px rgba(0, 196, 204, 0.25);
}

/* PAUSE E STOP (RED) - Mais vibrante e com seletor específico para vencer o ciano */
.gps-timer-capsule-active button.btn-active-pause,
.gps-timer-capsule-active button.btn-active-stop {
  background-color: rgba(239, 68, 68, 0.3) !important;
  border: 1px solid #ef4444 !important;
  color: #ffffff !important;
}

.gps-timer-capsule-active button.btn-active-pause:hover,
.gps-timer-capsule-active button.btn-active-stop:hover {
  background-color: rgba(220, 38, 38, 0.5) !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  color: #ffffff !important;
}

.capsule-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-timer-display {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  color: #00C4CC;
  text-shadow: 0 0 10px rgba(0, 196, 204, 0.6);
  padding-right: 12px;
  letter-spacing: 1px;
}

/* Ajustes de grid / coluna Timer */
#gps-tracking-table td:nth-child(11),
#gps-tracking-table th:nth-child(11) {
  min-width: 220px;
}

/* ==========================================================================
   RESTORE: HEADER TOOLS & ACTION MENUS (Perdidos no revert)
   ========================================================================== */

/* Layout do Header de Acompanhamento */
.gps-tracking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.gps-tracking-filters {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.gps-status-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

/* Botões do Topo (Compacta, Foco, etc) e Filtros */
.gps-view-toggle,
.gps-status-filter-btn,
.gps-quick-action-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(51, 65, 85, 0.8);
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gps-view-toggle:hover,
.gps-status-filter-btn:hover,
.gps-quick-action-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f1f5f9;
  border-color: rgba(71, 85, 105, 0.9);
}

.gps-status-filter-btn.is-active,
.gps-view-toggle.is-active {
  background: rgba(14, 116, 144, 0.2);
  border-color: #00C4CC;
  color: #00C4CC;
  box-shadow: 0 0 10px rgba(0, 196, 204, 0.15);
}

.gps-status-filter-btn[data-status-filter="concluido"].is-active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

.gps-status-filter-btn[data-status-filter="pendente"].is-active {
  background: rgba(139, 92, 246, 0.2);
  border-color: #8b5cf6;
  color: #8b5cf6;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

/* Barra de Pesquisa de Assunto */
.gps-tracking-search {
  display: flex;
  align-items: center;
  background: rgba(9, 16, 30, 0.82);
  border: 1px solid rgba(79, 95, 122, 0.75);
  border-radius: 8px;
  padding: 8px 12px;
  gap: 8px;
  min-width: 250px;
  max-width: 400px;
  transition: all 0.2s ease;
}

.gps-tracking-search:focus-within {
  border-color: #00C4CC;
  box-shadow: 0 0 0 2px rgba(0, 196, 204, 0.2);
}

.gps-tracking-search-icon {
  color: #64748b;
  width: 16px;
  height: 16px;
}

.gps-tracking-search-input {
  background: transparent !important;
  border: none !important;
  color: #e2e8f0 !important;
  outline: none;
  width: 100%;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.gps-tracking-search-input::placeholder {
  color: #64748b;
}

/* Quick Actions Icons */
.gps-tracking-quick-actions {
  display: flex;
  gap: 8px;
}

.gps-quick-action-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Botão de Limpar Filtros */
.gps-tracking-search-clear {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 4px;
  color: #94a3b8;
  padding: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gps-tracking-search-clear:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Texto Informativo */
.gps-tracking-filter-feedback {
  font-size: 12px;
  color: #94a3b8;
}

/* Dropdown Menu e Itens (.gps-action-menu-dropdown) */
#gps-action-menu-dropdown {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  z-index: 100 !important;
  /* Muito importante para sobrepor a tabela */
  position: absolute;
}

#gps-action-menu-dropdown.hidden {
  display: none !important;
}

.gps-action-menu-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 8px 14px !important;
  margin-bottom: 2px !important;
  color: #cbd5e1;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}

.gps-action-menu-item:hover {
  background: rgba(56, 189, 248, 0.1) !important;
  color: #38bdf8 !important;
}

.gps-action-menu-item.delete-action:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  color: #ef4444 !important;
}

#gps-action-menu-dropdown hr {
  border: none !important;
  border-top: 1px solid rgba(51, 65, 85, 0.6) !important;
  margin: 6px 0 !important;
}

/* Correções no Progresso/Barra da Disciplina no Header */
.gps-tracking-insights {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.gps-insight-pill {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.5);
  padding: 8px 14px;
  border-radius: 8px;
  min-width: 100px;
}

.gps-insight-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.gps-insight-pill strong {
  font-size: 16px;
  color: #f1f5f9;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

/* Melhorias gerais de Layout */
.gps-tracking-header>div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Evitando bugs de overflow nos modais */
#gps-tracking-table-body {
  position: relative;
}

/* ==========================================================================
   RESTORE: BARRAS DE PROGRESSO (Perdidas no revert)
   ========================================================================== */
.gps-topic-progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: rgba(30, 41, 59, 0.6);
  border-radius: 9999px;
  margin-top: 6px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.gps-topic-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background-color: rgba(100, 116, 139, 0.58);
  transition: width 0.4s ease-out;
  width: 0%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.gps-topic-progress-bar-fill.progress-neutral,
.gps-topic-progress-bar-fill.progress-low {
  background: linear-gradient(90deg, rgba(100, 116, 139, 0.68) 0%, rgba(71, 85, 105, 0.95) 100%);
  box-shadow: none;
}

.gps-topic-progress-bar-fill.progress-medium {
  background: linear-gradient(90deg, rgba(100, 116, 139, 0.68) 0%, rgba(71, 85, 105, 0.95) 100%);
  box-shadow: none;
}

.gps-topic-progress-bar-fill.progress-high {
  background: linear-gradient(90deg, rgba(100, 116, 139, 0.68) 0%, rgba(71, 85, 105, 0.95) 100%);
  box-shadow: none;
}

.gps-topic-progress-bar-fill.progress-nodata {
  background: linear-gradient(90deg, rgba(100, 116, 139, 0.68) 0%, rgba(71, 85, 105, 0.95) 100%);
  box-shadow: none;
}

.gps-topic-progress-bar-text {
  position: absolute;
  right: 4px;
  font-size: 8px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.6);
  mix-blend-mode: difference;
  filter: invert(1) grayscale(1) contrast(100);
  white-space: nowrap;
  line-height: 8px;
}

/* Restauração da formatação do Assunto */
#gps-tracking-table td:nth-child(3) .gps-item-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  position: relative;
  z-index: 1;
}

#gps-tracking-table td:nth-child(3) .gps-item-content-wrapper .gps-item-text-line {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

#gps-tracking-table td:nth-child(3) .gps-item-content-wrapper .truncate {
  flex-grow: 1;
  min-width: 0;
  color: #e2e8f0;
  font-weight: 600;
}

/* ==========================================================================
   GPS Tracking View Toggles (Modo Foco)
   ========================================================================== */

/* --- MODO FOCO (Aplicado no Body) --- */
body.gps-foco-ativo #sidebar {
  display: none !important;
}

body.gps-foco-ativo .gps-toolbar,
body.gps-foco-ativo .gps-ctrl-bar {
  display: none !important;
}

body.gps-foco-ativo #gps-performance-top-row,
body.gps-foco-ativo #gps-bloco-atual-widget,
body.gps-foco-ativo #gps-stats {
  display: none !important;
}

body.gps-foco-ativo #main-content,
body.gps-foco-ativo main {
  width: 100% !important;
  max-width: 100% !important;
}

/* Modificação da view do botão quando Foco está ativo */
.gps-tracking-toolbar .gps-view-toggle {
  opacity: 0.6;
}

.gps-tracking-toolbar .gps-view-toggle.is-active {
  opacity: 1;
  color: var(--accent-ciano);
  background: rgba(0, 196, 204, 0.1);
}

/* ==========================================================================
   FORCED OVERRIDES - USUÁRIO (Vibrante e Padronizado)
   ========================================================================== */

/* 1. PADRONIZAÇÃO DO FUNDO: Remove qualquer destaque verde de linhas ativas */
html body #gps-tracking-table tbody tr.gps-row-timer-active td,
html body #gps-tracking-table tbody tr.gps-status-andamento td {
  background-color: transparent !important;
}

/* 2. BOTÃO STOP EM VERMELHO VIBRANTE: Usando o seletor exato da DOM e alta especificidade */
html body #gps-tracking-table .gps-timer-capsule.active button.btn-active-stop,
html body #gps-tracking-table .gps-timer-capsule button.btn-active-stop {
  background-color: #ef4444 !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html body #gps-tracking-table .gps-timer-capsule.active button.btn-active-stop:hover {
  background-color: #dc2626 !important;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.5) !important;
  transform: translateY(-1px) !important;
}

/* 3. BOTÃO PAUSE EM VERMELHO (Opcional, para harmonia) */
html body #gps-tracking-table .gps-timer-capsule.active button.btn-active-pause,
html body #gps-tracking-table .gps-timer-capsule button.btn-active-pause {
  background-color: rgba(239, 68, 68, 0.15) !important;
  border: 1px solid #ef4444 !important;
  color: #ef4444 !important;
}

html body #gps-tracking-table .gps-timer-capsule.active button.btn-active-pause:hover {
  background-color: rgba(239, 68, 68, 0.25) !important;
  color: #ffffff !important;
}

/* ==========================================================================
   UX IMPROVEMENTS v2.10.0 — Loop de Engajamento
   ========================================================================== */

/* 1. ANIMAÇÃO FLASH — Celebra a conclusão de um tópico */
@keyframes gps-row-complete-flash {
  0% {
    background-color: rgba(52, 211, 153, 0.25) !important;
  }

  60% {
    background-color: rgba(52, 211, 153, 0.10) !important;
  }

  100% {
    background-color: transparent;
  }
}

#gps-tracking-table tbody tr.gps-row-completing td {
  animation: gps-row-complete-flash 0.9s ease-out !important;
}

/* 2. BADGE EM ANDAMENTO — Pulsa para indicar atividade em curso */
.status-badge-andamento {
  animation: badge-andamento-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-andamento-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 196, 204, 0.55);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(0, 196, 204, 0);
  }
}

/* 3. ROW EM ANDAMENTO — destaque via borda lateral */
html body #gps-tracking-table tbody tr.gps-status-andamento td {
  background: transparent !important;
  color: #8899aa !important;
}

/* Quando timer ativo, cancela o gradiente por célula (evita "quadrados" por fundo independente em cada td) */
html body #gps-tracking-table tbody tr.gps-row-timer-active td {
  background-image: none !important;
  background-color: transparent !important;
}

/* 4. PENDENTE — Texto levemente mais brilhante + borda lateral sutil */
#gps-tracking-table tbody tr.gps-status-pendente {
  border-left: 4px solid rgba(100, 116, 139, 0.28) !important;
}

#gps-tracking-table tbody tr.gps-status-pendente td {
  color: #8899aa !important;
}

/* 5. BOTÃO PLAY (focar) — Visível por padrão, não só no hover */
.gps-timer-capsule-idle button.btn-capsule-focar {
  background: rgba(0, 196, 204, 0.10) !important;
  border-color: rgba(0, 196, 204, 0.45) !important;
  color: #67d8e0 !important;
}

.gps-timer-capsule-idle button.btn-capsule-focar:hover:not(:disabled) {
  background: rgba(0, 196, 204, 0.22) !important;
  border-color: rgba(0, 196, 204, 0.72) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 0 14px rgba(0, 196, 204, 0.30) !important;
  transform: translateY(-2px) scale(1.04);
}

/* 6. ESTRELAS VAZIAS — Mais visíveis no fundo escuro */
.gps-star-icon {
  color: #475569 !important;
}

.gps-relevance-stars:hover .gps-star-icon {
  color: #64748b !important;
}

.gps-last-study-date {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  color: #94a3b8;
}

/* 8. DESEMP % — Mini barra inline */
.gps-perf-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.gps-perf-bar-track {
  width: 52px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.gps-perf-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.45s ease-out;
}

.gps-perf-bar-fill.perf-high {
  background: #34d399;
  box-shadow: 0 0 5px rgba(52, 211, 153, 0.6);
}

.gps-perf-bar-fill.perf-medium {
  background: #f59e0b;
  box-shadow: 0 0 5px rgba(245, 158, 11, 0.5);
}

.gps-perf-bar-fill.perf-low {
  background: #ef4444;
  box-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

.gps-perf-bar-fill.perf-none {
  background: rgba(255, 255, 255, 0.12);
}

/* 9. PRIMEIRA LINHA PENDENTE — Indicador "Próxima a estudar" */
#gps-tracking-table tbody tr.gps-first-pending-row {
  border-left: 4px solid rgba(139, 92, 246, 0.65) !important;
}

#gps-tracking-table tbody tr.gps-first-pending-row .status-badge-pendente {
  background: rgba(139, 92, 246, 0.18) !important;
  color: #a78bfa !important;
  border-color: rgba(139, 92, 246, 0.42) !important;
  animation: next-item-pulse 2.6s ease-in-out infinite;
}

@keyframes next-item-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.45);
  }

  50% {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0);
  }
}

/* ==========================================================================
   BARRA DE PROGRESSO DA DISCIPLINA (entre toolbar e tabela)
   ========================================================================== */
.gps-discipline-progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(10, 18, 32, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gps-discipline-progress-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 9999px;
  overflow: hidden;
}

.gps-discipline-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.65s ease-out, background 0.4s ease;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.gps-discipline-progress-bar-fill.prog-low {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.gps-discipline-progress-bar-fill.prog-medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.gps-discipline-progress-bar-fill.prog-high {
  background: linear-gradient(90deg, #34d399, #10b981);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}

.gps-discipline-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  min-width: 200px;
  text-align: right;
}

/* ==========================================================================
   SORT INDICATORS NOS CABEÇALHOS
   ========================================================================== */
.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.sortable-header:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.04);
}

/* Seta neutra (coluna não ordenada) */
.sort-indicator::after {
  content: '↕';
  font-size: 9px;
  color: #374151;
  margin-left: 3px;
  vertical-align: middle;
  display: inline-block;
}

/* Coluna ordenada ascendente */
.sortable-header.sort-asc .sort-indicator::after {
  content: '↑';
  color: #00C4CC;
}

/* Coluna ordenada descendente */
.sortable-header.sort-desc .sort-indicator::after {
  content: '↓';
  color: #00C4CC;
}

/* Destaque sutil no header ativo */
.sortable-header.sort-asc,
.sortable-header.sort-desc {
  color: #e2e8f0 !important;
  background-color: rgba(0, 196, 204, 0.07) !important;
}

/* ==========================================================================
   NOVO LAYOUT v3.0 — Toolbar + Full Width
   ========================================================================== */

/* ----- Toolbar ----- */
.gps-toolbar {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 12px;
  padding: 8px 12px;
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
  gap: 8px;
}

.gps-toolbar-discipline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 220px;
}

.gps-toolbar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gps-toolbar-select {
  flex: 1;
  max-width: 260px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(71, 85, 105, 0.6);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.gps-toolbar-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.gps-toolbar-disc-actions {
  display: flex;
  gap: 4px;
}

.gps-toolbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: rgba(71, 85, 105, 0.3);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.gps-toolbar-icon-btn:hover {
  background: rgba(71, 85, 105, 0.6);
  color: #e2e8f0;
}

.gps-toolbar-icon-btn--danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.gps-toolbar-sep {
  width: 1px;
  height: 28px;
  background: rgba(71, 85, 105, 0.5);
  margin: 0 4px;
  flex-shrink: 0;
}

.gps-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.gps-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.5);
  border: 1px solid rgba(71, 85, 105, 0.4);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.gps-toolbar-btn:hover:not(:disabled) {
  background: rgba(71, 85, 105, 0.7);
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.4);
  transform: translateY(-1px);
}

.gps-toolbar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gps-toolbar-btn--config {
  background: rgba(30, 58, 138, 0.3);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.gps-toolbar-btn--config:hover:not(:disabled) {
  background: rgba(30, 58, 138, 0.5);
  border-color: rgba(59, 130, 246, 0.5);
  color: #bfdbfe;
}

@media (max-width: 640px) {
  .gps-toolbar-btn-label {
    display: none;
  }

  .gps-toolbar-btn {
    padding: 7px;
  }

  .gps-toolbar-select {
    max-width: 180px;
  }
}

/* ----- Drawer de Configurações ----- */
.gps-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  backdrop-filter: blur(2px);
  transition: opacity 0.25s;
}

.gps-drawer-backdrop.hidden {
  display: none;
}

.gps-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 90vw;
  background: #1e293b;
  border-left: 1px solid rgba(71, 85, 105, 0.6);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.4);
}

.gps-drawer.open {
  transform: translateX(0);
}

.gps-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(71, 85, 105, 0.5);
  background: rgba(15, 23, 42, 0.5);
  flex-shrink: 0;
}

.gps-drawer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
}

.gps-drawer-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s;
}

.gps-drawer-close-btn:hover {
  background: rgba(71, 85, 105, 0.4);
  color: #e2e8f0;
}

.gps-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ==========================================================================
   MELHORIAS DE TABELA v3.1
   ========================================================================== */

/* ---- 1. Cabeçalho com mais contraste e separação ---- */
#gps-tracking-table thead {
  background: linear-gradient(to bottom, #0c1526, #111e33) !important;
  border-bottom: 2px solid rgba(59, 130, 246, 0.18);
}

#gps-tracking-table th {
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  color: #6b87a8 !important;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: 0.4rem !important;
  padding-right: 0.4rem !important;
}

/* ---- 2. Hover: borda esquerda + fundo sutil ---- */
#gps-tracking-table tbody tr.gps-task-row {
  transition: background-color 0.12s ease;
  position: relative;
}

#gps-tracking-table tbody tr.gps-task-row:hover td {
  background-color: rgba(59, 130, 246, 0.045) !important;
}

/* Borda esquerda via box-shadow na sticky col-1 */
#gps-tracking-table tbody tr.gps-task-row:hover td.sticky-col-1 {
  box-shadow: inset 3px 0 0 0 #3b82f6;
}

/* Cor da borda conforme status */
#gps-tracking-table tbody tr.gps-status-concluido:hover td.sticky-col-1 {
  box-shadow: inset 3px 0 0 0 #10b981;
}

#gps-tracking-table tbody tr.gps-status-andamento:hover td.sticky-col-1 {
  box-shadow: inset 3px 0 0 0 #f59e0b;
}

/* ---- 3. Linhas concluídas: visual recuado ---- */
#gps-tracking-table tbody tr.task-completed {
  opacity: 0.52;
  transition: opacity 0.15s ease;
}

#gps-tracking-table tbody tr.task-completed:hover {
  opacity: 0.88;
}

/* Texto do assunto com tachado sutil */
#gps-tracking-table tbody tr.task-completed td:nth-child(3) .gps-task-name,
#gps-tracking-table tbody tr.task-completed td:nth-child(3)>span:first-child,
#gps-tracking-table tbody tr.task-completed td.sticky-col-3 .gps-task-assunto-text {
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.6);
  text-decoration-thickness: 1px;
}

/* ---- 4. Botões ✓ e ✕ do timer: visíveis só no hover ---- */
/* !important necessário para sobrepor .gps-timer-capsule-idle button:disabled { opacity: 0.6 } */
#gps-tracking-table .gps-timer-capsule-idle .btn-capsule-concluir,
#gps-tracking-table .gps-timer-capsule-idle .btn-capsule-cancelar {
  opacity: 0 !important;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none !important;
}

#gps-tracking-table tbody tr:hover .gps-timer-capsule-idle .btn-capsule-concluir,
#gps-tracking-table tbody tr:hover .gps-timer-capsule-idle .btn-capsule-cancelar {
  opacity: 1 !important;
  transform: scale(1);
  pointer-events: auto !important;
}

/* Play button sempre visível, mas mais destacado no hover */
.gps-timer-capsule-idle .btn-capsule-focar {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#gps-tracking-table tbody tr:hover .gps-timer-capsule-idle .btn-capsule-focar {
  transform: scale(1.05);
}

/* ---- 5. Estrelas de relevância: visíveis só no hover (sem rating definido) ---- */
.gps-relevance-stars:not(.has-rating) {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.gps-relevance-stars:not(.has-rating)::before {
  content: '—';
  color: #374151;
  font-size: 0.85rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#gps-tracking-table tbody tr:hover .gps-relevance-stars:not(.has-rating) {
  opacity: 1;
}

#gps-tracking-table tbody tr:hover .gps-relevance-stars:not(.has-rating)::before {
  display: none;
}

/* Garante posicionamento relativo na célula de relevância */
#gps-tracking-table td:nth-child(4) {
  position: relative;
}

/* Stars com rating: sempre visíveis */
.gps-relevance-stars.has-rating {
  opacity: 1 !important;
}

/* ---- 6. Botão de ações (⋮) e link: visíveis só no hover ---- */
.gps-action-menu-btn,
.gps-open-link-modal-btn:not(.has-links) {
  opacity: 0.2;
  transition: opacity 0.15s ease;
}

#gps-tracking-table tbody tr:hover .gps-action-menu-btn,
#gps-tracking-table tbody tr:hover .gps-open-link-modal-btn:not(.has-links),
.gps-action-menu-btn.menu-open {
  opacity: 1 !important;
}

/* Link com links definidos: sempre visível */
.gps-open-link-modal-btn.has-links {
  opacity: 1 !important;
}

/* ---- 7. Traço elegante para células sem dados ---- */
#gps-tracking-table td .text-gray-500 {
  color: #2d3748;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   INDICADORES VISUAIS DE ATENÇÃO v3.2
   ========================================================================== */

/* ==========================================================================
   ABA REVISÕES — GPS v1.0
   ========================================================================== */

/* ---- Tabs (Tabela | Revisões) ---- */
.gps-section-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-left: 8px;
}

.gps-section-tab {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #6b87a8;
  background: transparent;
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.gps-section-tab:hover {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.08);
}

.gps-section-tab.is-active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

/* Badge de contagem na aba Revisões */
.gps-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: #ef4444;
  border-radius: 9999px;
  line-height: 1;
}

/* ---- Filtros de Revisão ---- */
.gps-revisoes-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gps-revisoes-filters select,
.gps-revision-modal select,
#gps-tab-panel-revisoes select {
  background: rgba(7, 15, 30, 0.92) !important;
  border: 1px solid rgba(46, 219, 127, 0.16) !important;
  color: #e8f0ff !important;
}

.gps-revisoes-filters select option,
.gps-revision-modal select option,
#gps-tab-panel-revisoes select option {
  background: #0b1220;
  color: #e6f0ff;
}

.gps-rev-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.gps-rev-filter-btn:hover {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
}

.gps-rev-filter-btn.is-active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.4);
}

/* ---- Lista de cards de revisão ---- */
.gps-revisoes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px;
  max-height: 520px;
  overflow-y: auto;
}

.gps-revision-backlog-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(15, 25, 45, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: #93a4bf;
  font-size: 0.76rem;
}

.gps-revision-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gps-revision-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
}

.gps-revision-section-header h4 {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dbe7fb;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gps-revision-section-header span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
}

.gps-revision-section-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gps-revisoes-msg {
  text-align: center;
  font-size: 0.85rem;
  padding: 2rem 0;
  color: #6b7280;
}

/* ---- Card de revisão ---- */
.gps-revision-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 25, 45, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-left: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  transition: background 0.12s;
}

.gps-revision-card:hover {
  background: rgba(20, 35, 65, 0.85);
}

.gps-revision-card.urg-overdue {
  border-left-color: #ef4444;
}

.gps-revision-card.urg-urgent {
  border-left-color: #f59e0b;
}

.gps-revision-card.urg-soon {
  border-left-color: #3b82f6;
}

.gps-revision-card.urg-reforco {
  border-left-color: #f59e0b;
}

.gps-revision-card.urg-scheduled {
  border-left-color: #374151;
}

.gps-rev-card-left {
  flex: 1;
  min-width: 0;
}

.gps-rev-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 4px;
}

.gps-rev-urgency-badge.urg-overdue {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.gps-rev-urgency-badge.urg-urgent {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.gps-rev-urgency-badge.urg-soon {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.gps-rev-urgency-badge.urg-reforco {
  background: rgba(245, 158, 11, 0.15);
  color: #fcd34d;
}

.gps-rev-urgency-badge.urg-scheduled {
  background: rgba(75, 85, 99, 0.3);
  color: #9ca3af;
}

.gps-rev-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gps-rev-card-meta {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 2px;
}

.gps-rev-card-note {
  font-size: 0.69rem;
  color: #93c5fd;
  margin-top: 4px;
}

.gps-rev-card-guidance {
  font-size: 0.72rem;
  color: #a8b7d1;
  margin-top: 5px;
  line-height: 1.35;
}

/* ---- Botões de ação no card ---- */
.gps-rev-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Wrapper do Adiar + picker de dias */
.gps-rev-snooze-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.gps-rev-snooze-picker {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  display: flex;
  gap: 4px;
  background: #1e293b;
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 8px;
  padding: 4px 6px;
  z-index: 20;
  white-space: nowrap;
}

.gps-rev-snooze-picker.hidden {
  display: none;
}

.gps-rev-snooze-day {
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(75, 85, 99, 0.4);
  border: 1px solid rgba(75, 85, 99, 0.6);
  border-radius: 5px;
  color: #d1d5db;
  cursor: pointer;
  transition: background 0.12s;
}

.gps-rev-snooze-day:hover {
  background: rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

.gps-rev-btn-snooze {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  height: 28px;
  background: rgba(75, 85, 99, 0.3);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 6px;
  color: #9ca3af;
  font-size: 0.7rem;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.gps-rev-btn-snooze:hover {
  background: rgba(75, 85, 99, 0.6);
  color: #d1d5db;
}

.gps-rev-btn-snooze:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Ignorar */
.gps-rev-btn-ignore {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(75, 85, 99, 0.2);
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.gps-rev-btn-ignore:hover {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.4);
}

.gps-rev-btn-ignore:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Suspender */
.gps-rev-btn-suspend {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(75, 85, 99, 0.2);
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 6px;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.gps-rev-btn-suspend:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.35);
}

.gps-rev-btn-suspend:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gps-rev-btn-register {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.gps-rev-btn-register:hover {
  opacity: 0.88;
  transform: scale(1.02);
}

.gps-rev-btn-register:active {
  transform: scale(0.98);
}

/* ════════════════════════════════════════════════════════
   MISSÃO LIVRE
   ════════════════════════════════════════════════════════ */

.gps-ml-open-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.gps-ml-open-btn:hover {
  background: rgba(139, 92, 246, 0.28);
  color: #ddd6fe;
}

.gps-ml-drawer {
  width: 420px;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border-left: 1px solid rgba(139, 92, 246, 0.25);
}

.gps-ml-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.06);
  flex-shrink: 0;
}

.gps-ml-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
  border: 1px solid rgba(139, 92, 246, 0.4);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gps-ml-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(75, 85, 99, 0.3);
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 6px;
  color: #9ca3af;
  cursor: pointer;
  transition: background 0.12s;
}

.gps-ml-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.gps-ml-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gps-ml-hint {
  font-size: 0.72rem;
  color: #6b7280;
  line-height: 1.5;
}

.gps-ml-block {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 10px;
  overflow: hidden;
}

.gps-ml-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(139, 92, 246, 0.06);
  border-bottom: 1px solid rgba(75, 85, 99, 0.3);
}

.gps-ml-disc-select {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.78rem;
  padding: 5px 8px;
  cursor: pointer;
}

.gps-ml-disc-select:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.6);
}

.gps-ml-block-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}

.gps-ml-block-remove:hover {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
}

.gps-ml-topicos-list {
  padding: 8px 12px 10px;
}

.gps-ml-loading {
  font-size: 0.72rem;
  color: #6b7280;
  padding: 6px 0;
}

.gps-ml-aulas-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gps-ml-aula-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 5px;
  transition: background 0.1s;
}

.gps-ml-aula-item label:hover {
  background: rgba(139, 92, 246, 0.1);
}

.gps-ml-aula-item input[type="checkbox"] {
  accent-color: #7c3aed;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.gps-ml-new-topico {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(75, 85, 99, 0.4);
}

.gps-ml-new-topico-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 0.75rem;
  padding: 5px 8px;
}

.gps-ml-new-topico-input::placeholder {
  color: #4b5563;
}

.gps-ml-new-topico-input:focus {
  outline: none;
  border-color: rgba(139, 92, 246, 0.5);
}

.gps-ml-new-topico-btn {
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.2);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 6px;
  color: #c4b5fd;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}

.gps-ml-new-topico-btn:hover {
  background: rgba(139, 92, 246, 0.35);
}

.gps-ml-new-topico-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gps-ml-add-block-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #7c3aed;
  background: transparent;
  border: 1px dashed rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  width: 100%;
  transition: background 0.12s, color 0.12s;
}

.gps-ml-add-block-btn:hover {
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}

.gps-ml-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.04);
  flex-shrink: 0;
}

.gps-ml-summary-text {
  font-size: 0.72rem;
  color: #6b7280;
}

.gps-ml-start-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.gps-ml-start-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: scale(1.02);
}

.gps-ml-start-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* --- Missão Livre: Seletor de Tipo de Estudo --- */
.gps-ml-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.gps-ml-study-type-select {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 4px;
  color: #e2e8f0;
  font-size: 11px;
  padding: 2px 4px;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gps-ml-study-type-select:hover {
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(30, 41, 59, 0.9);
}

.gps-ml-study-type-select:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.gps-ml-study-type-option {
  background: #0f172a;
  color: #e2e8f0;
}

.gps-ml-item-label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
  user-select: none;
}

/* ---- Modal de registro rápido ---- */
.gps-revision-modal {
  background: #0f172a;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 12px;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.gps-revision-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.gps-revision-modal-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
  margin: 0;
}

.gps-revision-modal-header button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #6b7280;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}

.gps-revision-modal-header button:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
}

.gps-revision-modal-body {
  padding: 16px 18px;
}

.gps-revision-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px 14px;
}

.gps-rev-modal-btn-cancel {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  background: transparent;
  border: 1px solid rgba(75, 85, 99, 0.5);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}

.gps-rev-modal-btn-cancel:hover {
  color: #d1d5db;
  border-color: #6b7280;
}

.gps-rev-modal-btn-save {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.gps-rev-modal-btn-save:hover {
  opacity: 0.88;
}

.gps-rev-modal-btn-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---- Status badge clicável (Pendente / Em Andamento) ---- */
.status-badge-pendente[title],
.status-badge-andamento[title] {
  transition: opacity 0.12s ease, transform 0.1s ease;
}

.status-badge-pendente:hover,
.status-badge-andamento:hover {
  opacity: 0.8;
  transform: scale(1.05);
}

/* ============================================================
   GPS CENTRAL DE CONTROLE — Redesign Gamificado
   ============================================================ */

.gps-ctrl-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(20, 28, 50, 0.95));
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

/* Subtle ambient glow top-left */
.gps-ctrl-bar::before {
  content: '';
  position: absolute;
  top: -30px;
  left: -30px;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

/* === Block headers === */
.gps-ctrl-block-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
}

.gps-ctrl-header-icon {
  width: 13px !important;
  height: 13px !important;
  color: rgba(148, 163, 184, 0.5);
  flex-shrink: 0;
}

.gps-ctrl-block-title {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.45);
}

/* === Discipline Block === */
.gps-ctrl-discipline-block {
  flex: 1;
  min-width: 240px;
}

.gps-ctrl-discipline-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gps-ctrl-select {
  flex: 1;
  min-width: 160px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 10px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.gps-ctrl-select:focus {
  border-color: rgba(96, 165, 250, 0.6);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
  background: rgba(15, 23, 42, 0.95);
}

.gps-ctrl-select option {
  background: #1e293b;
  color: #e2e8f0;
}

/* === Discipline Action Buttons (Edit/Delete) === */
.gps-ctrl-disc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gps-ctrl-disc-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  border: 1px solid;
}

.gps-ctrl-disc-btn svg,
.gps-ctrl-disc-btn .lucide {
  width: 13px !important;
  height: 13px !important;
  flex-shrink: 0;
}

.gps-ctrl-disc-btn--edit {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.gps-ctrl-disc-btn--edit:hover {
  background: rgba(59, 130, 246, 0.22);
  border-color: rgba(59, 130, 246, 0.55);
  color: #bfdbfe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.gps-ctrl-disc-btn--delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.gps-ctrl-disc-btn--delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* === Vertical separator === */
.gps-ctrl-vsep {
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(96, 165, 250, 0.2), transparent);
  align-self: stretch;
  margin: 0 4px;
  flex-shrink: 0;
}

/* === Actions Block === */
.gps-ctrl-actions-block {
  flex-shrink: 0;
}

.gps-ctrl-actions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Base action button */
.gps-ctrl-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  border: 1px solid;
  letter-spacing: 0.01em;
}

.gps-ctrl-action-btn svg,
.gps-ctrl-action-btn .lucide {
  width: 14px !important;
  height: 14px !important;
  flex-shrink: 0;
}

.gps-ctrl-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Nova Disciplina — green */
.gps-ctrl-action-btn--new {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.gps-ctrl-action-btn--new:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(52, 211, 153, 0.55);
  color: #a7f3d0;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(52, 211, 153, 0.2);
}

/* Tópico — cyan */
.gps-ctrl-action-btn--topic {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.25);
  color: #67e8f9;
}

.gps-ctrl-action-btn--topic:hover:not(:disabled) {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
  color: #a5f3fc;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.18);
}

/* Importar — amber */
.gps-ctrl-action-btn--import {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.gps-ctrl-action-btn--import:hover:not(:disabled) {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.5);
  color: #fef3c7;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(251, 191, 36, 0.18);
}

/* Templates — cyan */
.gps-ctrl-action-btn--templates {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.25);
  color: #a5f3fc;
}

.gps-ctrl-action-btn--templates:hover:not(:disabled) {
  background: rgba(34, 211, 238, 0.18);
  border-color: rgba(34, 211, 238, 0.5);
  color: #cffafe;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.18);
}

/* === Responsive: stack on mobile === */
@media (max-width: 640px) {
  .gps-mission-brief {
    padding: 0.9rem 0.85rem 0.8rem;
  }

  .gps-mission-brief-chips {
    justify-content: flex-start;
  }

  .gps-bloco-item {
    gap: 0.6rem;
    padding: 0.78rem 0.78rem;
  }

  .gps-bloco-item-type-wrap {
    width: 112px;
  }

  .gps-bloco-item-assunto {
    font-size: 0.94rem;
  }

  .gps-bloco-reason-tooltip {
    left: 0;
    right: auto;
    min-width: 220px;
    max-width: min(300px, calc(100vw - 2.25rem));
  }

  .gps-ctrl-bar {
    flex-direction: column;
    gap: 10px;
  }

  .gps-ctrl-vsep {
    display: none;
  }

  .gps-ctrl-discipline-row {
    align-items: stretch;
    flex-direction: column;
  }

  .gps-ctrl-disc-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gps-ctrl-actions-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gps-ctrl-action-btn span:not(.lucide):not(svg) {
    display: inline;
  }

  .gps-ctrl-action-btn {
    min-height: 44px;
    padding: 10px 12px;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .gps-ctrl-bar {
    padding: 12px;
    gap: 12px;
  }

  .gps-ctrl-discipline-block,
  .gps-ctrl-actions-block {
    width: 100%;
    min-width: 0;
  }

  .gps-ctrl-select {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }

  .gps-ctrl-disc-btn,
  .gps-ctrl-action-btn {
    min-height: 42px;
  }

  .gps-ctrl-disc-btn {
    justify-content: center;
  }

  #gps-bloco-atual-widget .widget-header {
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 12px;
  }

  #gps-bloco-atual-widget .widget-header > div:first-child {
    width: 100%;
    margin-right: 0;
    padding-right: 32px;
    flex-wrap: wrap;
    gap: 8px;
  }

  #gps-bloco-atual-widget .widget-title {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  #gps-bloco-atual-widget .widget-header > div:last-child {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #gps-bloco-atual-widget .widget-header > div:last-child > button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  #gps-bloco-atual-widget #gps-bloco-status-msg {
    margin-left: 0;
    width: 100%;
  }

  #gps-mission-config-btn {
    top: 10px;
    right: 10px;
  }

  .gps-tracking-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .gps-section-tabs,
  .gps-tracking-toolbar,
  .gps-tracking-filters {
    width: 100%;
  }

  .gps-tracking-toolbar {
    display: flex;
  }

  .gps-view-toggle {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .gps-tracking-search {
    min-width: 0;
    max-width: none;
    width: 100%;
    flex: 1 1 100%;
  }

  .gps-status-filters {
    width: 100%;
    margin-left: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .gps-status-filters::-webkit-scrollbar,
  .gps-revisoes-filters::-webkit-scrollbar {
    display: none;
  }

  .gps-tracking-filter-feedback {
    width: 100%;
    flex: 1 1 100%;
  }

  .gps-tracking-quick-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gps-quick-action-btn {
    justify-content: center;
    min-height: 42px;
  }

  .gps-tracking-insights {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .gps-insight-pill {
    min-width: 0;
    padding: 8px 10px;
  }

  .gps-revisoes-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  #gps-tab-panel-table {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #gps-tracking-table th:nth-child(4),
  #gps-tracking-table td:nth-child(4),
  #gps-tracking-table th:nth-child(5),
  #gps-tracking-table td:nth-child(5),
  #gps-tracking-table th:nth-child(8),
  #gps-tracking-table td:nth-child(8),
  #gps-tracking-table th:nth-child(9),
  #gps-tracking-table td:nth-child(9),
  #gps-tracking-table th:nth-child(12),
  #gps-tracking-table td:nth-child(12) {
    display: none;
  }

  #gps-tracking-table th,
  #gps-tracking-table td {
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  #gps-tracking-table th.sticky-col-3,
  #gps-tracking-table td.sticky-col-3 {
    min-width: 14rem;
    width: 14rem !important;
    max-width: 14rem;
  }

  #gps-tracking-table .gps-timer-capsule-idle {
    gap: 6px;
  }

  #gps-tracking-table .gps-timer-capsule-idle button {
    padding: 6px 10px;
    min-width: 36px;
  }
}

@media (max-width: 520px) {
  .gps-ctrl-disc-actions,
  .gps-ctrl-actions-row,
  #gps-bloco-atual-widget .widget-header > div:last-child,
  .gps-tracking-quick-actions,
  .gps-tracking-insights {
    grid-template-columns: 1fr;
  }

  #gps-tracking-table th:nth-child(7),
  #gps-tracking-table td:nth-child(7) {
    display: none;
  }

  #gps-tracking-table th.sticky-col-3,
  #gps-tracking-table td.sticky-col-3 {
    min-width: 12.5rem;
    width: 12.5rem !important;
    max-width: 12.5rem;
  }
}

@media (hover: none), (pointer: coarse) {
  #gps-tracking-table .gps-action-menu-btn,
  #gps-tracking-table .gps-open-link-modal-btn:not(.has-links) {
    opacity: 1 !important;
  }

  #gps-tracking-table .gps-timer-capsule-idle .btn-capsule-concluir,
  #gps-tracking-table .gps-timer-capsule-idle .btn-capsule-cancelar {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .gps-relevance-stars:not(.has-rating) {
    opacity: 1;
  }

  .gps-relevance-stars:not(.has-rating)::before {
    display: none;
  }
}

/* ============================================================
   GPS TEMPLATE MODAL — Gamificado
   ============================================================ */

.tpl-modal-card {
  background: linear-gradient(160deg, #0f1220 0%, #111827 50%, #0d1117 100%);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.tpl-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.08), rgba(96, 165, 250, 0.05));
  border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}

.tpl-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tpl-modal-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(96, 165, 250, 0.15));
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(167, 139, 250, 0.2);
}

.tpl-modal-icon .lucide {
  width: 18px;
  height: 18px;
  color: #c4b5fd;
}

.tpl-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
}

.tpl-modal-subtitle {
  font-size: 0.7rem;
  color: rgba(148, 163, 184, 0.55);
  margin-top: 1px;
}

.tpl-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.tpl-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.tpl-modal-close-btn .lucide {
  width: 16px;
  height: 16px;
}

.tpl-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tpl-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tpl-section-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tpl-section-icon {
  width: 14px;
  height: 14px;
  color: #a78bfa;
  flex-shrink: 0;
}

.tpl-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(167, 139, 250, 0.7);
}

.tpl-saved-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tpl-select {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 8px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
  flex: 1;
}

.tpl-select:focus {
  border-color: rgba(167, 139, 250, 0.5);
}

.tpl-select option {
  background: #1e293b;
}

.tpl-action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  border: 1px solid;
  white-space: nowrap;
  flex-shrink: 0;
}

.tpl-action-btn .lucide {
  width: 13px;
  height: 13px;
}

.tpl-action-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.tpl-action-btn--edit {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

.tpl-action-btn--edit:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.5);
  color: #bfdbfe;
}

.tpl-action-btn--delete {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.tpl-action-btn--delete:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fecaca;
}

.tpl-new-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(96, 165, 250, 0.1));
  border: 1px solid rgba(167, 139, 250, 0.3);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  align-self: flex-start;
}

.tpl-new-btn:hover {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.25), rgba(96, 165, 250, 0.18));
  border-color: rgba(167, 139, 250, 0.55);
  color: #ddd6fe;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(167, 139, 250, 0.2);
}

.tpl-new-btn .lucide {
  width: 15px;
  height: 15px;
}

.tpl-form-section {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tpl-form-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tpl-form-title-icon {
  width: 16px;
  height: 16px;
  color: #a78bfa;
}

.tpl-form-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #e2e8f0;
}

.tpl-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tpl-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(148, 163, 184, 0.7);
}

.tpl-label .lucide {
  width: 12px;
  height: 12px;
}

.tpl-input {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: #e2e8f0;
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.tpl-input:focus {
  border-color: rgba(167, 139, 250, 0.5);
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1);
}

.tpl-input::placeholder {
  color: rgba(148, 163, 184, 0.35);
}

/* Pattern Builder */
.tpl-builder-card {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.04), rgba(34, 211, 238, 0.04));
  border: 1px solid rgba(52, 211, 153, 0.18);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tpl-builder-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tpl-builder-header-icon {
  width: 14px;
  height: 14px;
  color: #6ee7b7;
}

.tpl-builder-header-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(110, 231, 183, 0.8);
}

.tpl-builder-fields {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.tpl-builder-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 90px;
}

.tpl-builder-field--narrow {
  flex: 0 0 80px;
  min-width: 0;
}

.tpl-builder-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.5);
}

.tpl-builder-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.tpl-builder-input:focus {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.1);
}

.tpl-builder-input--center {
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.tpl-builder-input::placeholder {
  color: rgba(148, 163, 184, 0.3);
  font-weight: 400;
}

.tpl-builder-hint {
  font-size: 0.58rem;
  color: rgba(148, 163, 184, 0.4);
}

.tpl-builder-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 18px;
  color: rgba(52, 211, 153, 0.3);
  flex-shrink: 0;
}

.tpl-builder-arrow .lucide {
  width: 14px;
  height: 14px;
}

/* Preview */
.tpl-preview-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tpl-preview-header {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tpl-preview-eye {
  width: 13px;
  height: 13px;
  color: rgba(148, 163, 184, 0.4);
}

.tpl-preview-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(148, 163, 184, 0.4);
}

.tpl-preview-pattern-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #6ee7b7;
}

.tpl-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}

.tpl-preview-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.25);
  color: #a7f3d0;
  font-family: 'JetBrains Mono', monospace;
  animation: chip-pop 0.2s ease;
}

@keyframes chip-pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.tpl-preview-more {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.45);
  padding: 4px 6px;
  font-style: italic;
}

.tpl-preview-empty {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.35);
  font-style: italic;
}

/* ============================================================
   GPS IMPORT MODAL — Gamified Premium Design
   ============================================================ */

/* --- Card Container --- */
#gps-import-modal-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#gps-import-modal-backdrop.hidden {
  display: none !important;
}

.gps-import-modal-card {
  background: linear-gradient(160deg, #0f1220 0%, #111827 50%, #0d1117 100%);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 16px;
  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(251, 191, 36, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
  min-height: 520px;
  margin: auto !important;
}

/* --- Header --- */
.gps-import-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(245, 158, 11, 0.04));
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.gps-import-modal-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.gps-import-modal-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.15));
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fde68a;
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
  animation: gps-import-icon-pulse 3s ease-in-out infinite;
}

@keyframes gps-import-icon-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.15);
  }

  50% {
    box-shadow: 0 0 28px rgba(251, 191, 36, 0.25);
  }
}

.gps-import-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.01em;
  margin: 0;
}

.gps-import-modal-subtitle {
  font-size: 0.7rem;
  color: rgba(253, 230, 138, 0.6);
  margin-top: 2px;
}

.gps-import-modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.gps-import-modal-close-btn i {
  color: inherit;
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
}

.gps-import-modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

/* --- Body --- */
.gps-import-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gps-import-hint {
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.7);
  line-height: 1.55;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.1);
  border-radius: 10px;
  margin: 0;
}

.gps-import-hint em {
  color: #fde68a;
  font-style: normal;
  font-weight: 600;
}

/* --- Two-column layout --- */
.gps-import-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 280px;
}

.gps-import-col-input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gps-import-col-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.55);
}

/* --- Custom Textarea --- */
.gps-import-textarea {
  flex: 1;
  resize: none;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-radius: 10px;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.78rem;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
  line-height: 1.6;
}

.gps-import-textarea::placeholder {
  color: rgba(148, 163, 184, 0.3);
}

.gps-import-textarea:focus {
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08), 0 0 20px rgba(251, 191, 36, 0.06);
}

/* --- Preview Column --- */
.gps-import-col-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.gps-import-preview-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
  letter-spacing: 0.02em;
  animation: gps-import-badge-glow 2s ease-in-out infinite;
}

@keyframes gps-import-badge-glow {

  0%,
  100% {
    box-shadow: none;
  }

  50% {
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.15);
  }
}

.gps-import-preview-badge:empty {
  display: none;
}

.gps-import-preview-list {
  flex: 1;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(75, 85, 99, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.gps-import-preview-empty {
  color: rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
  font-style: italic;
  text-align: center;
  margin: auto;
  line-height: 1.7;
}

.gps-import-preview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.18s ease;
  animation: gps-import-item-in 0.2s ease;
}

@keyframes gps-import-item-in {
  from {
    opacity: 0;
    transform: translateX(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.gps-import-preview-item:hover {
  background: rgba(251, 191, 36, 0.05);
  border-color: rgba(251, 191, 36, 0.12);
}

.gps-import-preview-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(245, 158, 11, 0.1));
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fde68a;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  z-index: 1;
}

.gps-import-preview-text {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
  z-index: 1;
}

/* --- Footer --- */
.gps-import-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid rgba(251, 191, 36, 0.1);
  background: rgba(251, 191, 36, 0.02);
  border-radius: 0 0 16px 16px;
  flex-shrink: 0;
}

.gps-import-cancel-btn {
  padding: 8px 18px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #9ca3af;
  background: transparent;
  border: 1px solid rgba(75, 85, 99, 0.4);
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
}

.gps-import-cancel-btn:hover {
  color: #d1d5db;
  border-color: #6b7280;
  background: rgba(255, 255, 255, 0.03);
}

.gps-import-confirm-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 22px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border: none;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.25);
  letter-spacing: 0.01em;
}

.gps-import-confirm-btn:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.gps-import-confirm-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.gps-import-confirm-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .gps-import-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gps-import-preview-list {
    max-height: 200px;
  }

  .gps-import-modal-header {
    padding: 14px 16px 12px;
  }

  .gps-import-modal-body {
    padding: 14px;
  }
}
