/* ==========================================================================
   SPRINT TERMINATOR - DESIGN SYSTEM & THEME
   Modern, Colorful, Executive SaaS UI
   ========================================================================== */

:root {
  /* Core Palette */
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50:  #f8fafc;

  /* Theme Tokens */
  --ink: var(--slate-900);
  --muted: var(--slate-500);
  --line: var(--slate-200);
  --paper: #ffffff;
  --canvas: #f8fafc;

  /* Brand Accents */
  --blue: #2563eb;
  --blue-hover: #1d4ed8;
  --blue-light: #eff6ff;
  --blue-border: #bfdbfe;

  --green: #10b981;
  --green-hover: #059669;
  --green-light: #ecfdf5;
  --green-border: #a7f3d0;

  --amber: #f59e0b;
  --amber-hover: #d97706;
  --amber-light: #fffbeb;
  --amber-border: #fde68a;

  --teal: #06b6d4;
  --teal-hover: #0891b2;
  --teal-light: #f0fdfa;
  --teal-border: #99f6e4;

  --purple: #8b5cf6;
  --purple-hover: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #ddd6fe;

  --red: #ef4444;
  --red-hover: #dc2626;
  --red-light: #fff1f2;
  --red-border: #fecdd3;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 16px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 14px 30px -4px rgba(37, 99, 235, 0.12), 0 6px 10px -4px rgba(15, 23, 42, 0.06);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* Base Styles */
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  background-image: radial-gradient(circle at 50% 0%, #eff6ff 0%, #f8fafc 45%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  font: 14.5px/1.55 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4 { color: var(--slate-900); font-weight: 750; letter-spacing: -0.025em; line-height: 1.2; }
h1 { font-size: clamp(2rem, 3.8vw, 2.75rem); margin: 0.15em 0 0.35em; }
h1 span { color: var(--blue); }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
h3 { font-size: 1.05rem; margin: 0; }
p { color: var(--muted); margin: 0; }
small { color: var(--muted); }

/* Navigation Topbar */
.topbar {
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}
.topbar-inner {
  min-height: 64px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  box-shadow: 0 0 14px rgba(99, 102, 241, 0.5);
  font-size: 1.05rem;
}
.brand-name {
  background: linear-gradient(to right, #ffffff, #dbeafe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}
.brand-tag {
  font-size: 0.68rem;
  font-weight: 750;
  background: rgba(99, 102, 241, 0.22);
  color: #a5b4fc;
  border: 1px solid rgba(165, 180, 252, 0.3);
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 2px;
  letter-spacing: 0.02em;
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  color: #94a3b8;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-item.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.35);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
}
.status-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 7px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.logout-btn:hover {
  background: #ef4444;
  color: #fff;
}

/* Page Layout */
.page {
  max-width: 1440px;
  margin: 30px auto 70px;
  padding: 0 24px;
}

/* Section Hero */
.hero { margin-bottom: 24px; }
.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

/* Filter Card */
.filter-card {
  margin-bottom: 26px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}
.filter-tabs {
  display: flex;
  gap: 6px;
  background: var(--slate-100);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  flex-wrap: wrap;
}
.filter-tab {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  color: var(--slate-600);
  font-size: 0.86rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-tab:hover { color: var(--slate-900); }
.filter-tab.active {
  background: var(--paper);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
  font-weight: 750;
}
.period-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  color: var(--blue-hover);
  font-weight: 750;
  font-size: 0.88rem;
}
.filter-fields-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-field {
  flex: 1;
  min-width: 140px;
}
.filter-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-600);
  margin-bottom: 5px;
  font-weight: 650;
}
.filter-field select, .filter-field input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--slate-900);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-field select:focus, .filter-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
  outline: none;
}
.filter-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}
.quick-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--slate-200);
  font-size: 0.83rem;
  color: var(--muted);
}
.quick-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  color: var(--slate-700);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.8rem;
  transition: all 0.15s ease;
}
.quick-pill:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ==========================================================================
   COLORFUL KPI / STATS CARDS
   ========================================================================== */

.stats-six {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
  width: 100%;
  box-sizing: border-box;
}
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .stats-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .stats-six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .stats-six { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}

.kpi-card {
  position: relative;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, var(--blue));
}
.kpi-card span.kpi-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  margin-bottom: 6px;
}
.kpi-card strong.kpi-value {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--card-value-color, var(--slate-900));
}
.kpi-card .kpi-subtext {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Individual Card Themes */
.kpi-blue {
  --card-accent: #3b82f6;
  --card-value-color: #1d4ed8;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 75%);
  border-color: #bfdbfe;
}
.kpi-green {
  --card-accent: #10b981;
  --card-value-color: #047857;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 75%);
  border-color: #a7f3d0;
}
.kpi-amber {
  --card-accent: #f59e0b;
  --card-value-color: #b45309;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 75%);
  border-color: #fde68a;
}
.kpi-teal {
  --card-accent: #06b6d4;
  --card-value-color: #0e7490;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 75%);
  border-color: #99f6e4;
}
.kpi-purple {
  --card-accent: #8b5cf6;
  --card-value-color: #6d28d9;
  background: linear-gradient(180deg, #f5f3ff 0%, #ffffff 75%);
  border-color: #ddd6fe;
}
.kpi-rose {
  --card-accent: #ef4444;
  --card-value-color: #be123c;
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 75%);
  border-color: #fecdd3;
}
.kpi-slate {
  --card-accent: #64748b;
  --card-value-color: #334155;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 75%);
  border-color: #cbd5e1;
}

/* Clickable Interactive Cards */
.clickable {
  cursor: pointer;
  user-select: none;
}
.kpi-card.clickable {
  position: relative;
}
.kpi-card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue) !important;
}
.kpi-card.clickable::after {
  content: '🔍 ver tarefas';
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--blue);
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.15s ease;
}
.kpi-card.clickable:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PANELS & MEMBER GRID
   ========================================================================== */

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.section-heading h2 { margin: 0; font-size: 1.3rem; }
.section-heading p { margin: 4px 0 0; font-size: 0.88rem; }
.section-heading strong {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--slate-700);
}

/* Member Grid */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 680px)  { .member-grid { grid-template-columns: 1fr; } }

.member-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.member-card:hover {
  box-shadow: var(--shadow-md);
}
.member-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0;
  width: 100%;
}
.member-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}
.member-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.member-info h3 {
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 0;
}
.member-info p {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 2px 0 0;
}
.hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--teal-light);
  border: 1px solid var(--teal-border);
  color: var(--teal-hover);
  font-weight: 750;
  font-size: 0.78rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.member-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 12px;
  width: 100%;
  box-sizing: border-box;
}
.member-total-box {
  min-width: 0;
  overflow: hidden;
  padding: 8px 4px;
  border-radius: var(--radius-sm);
  text-align: center;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  transition: all 0.15s ease;
}
.member-total-box small {
  display: block;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-total-box strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clickable-total {
  cursor: pointer;
}
.clickable-total:hover {
  transform: translateY(-2px);
  border-color: var(--blue) !important;
  background: #eff6ff !important;
}

/* ==========================================================================
   STATUS CHIPS & BADGES (COLOR-CODED)
   ========================================================================== */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  min-width: 0;
  max-width: 100%;
}
.chips span, .status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.4;
  border: 1px solid transparent;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clickable-chip {
  cursor: pointer;
  transition: all 0.15s ease;
}
.clickable-chip:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Status Semantic Color Mapping */
.status-success, .status-validado, .status-concluído, .status-teste-aprovado {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}
.status-info, .status-em-execução, .status-teste, .status-testando {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}
.status-warning, .status-a-fazer, .status-a-fazer-2, .status-revisar {
  background: #f8fafc !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
}
.status-danger, .status-impedido, .status-teste-reprovado, .status-rejeitado {
  background: #fff1f2 !important;
  color: #be123c !important;
  border-color: #fecdd3 !important;
}
.status-purple, .status-revisado {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border-color: #ddd6fe !important;
}
.status-muted, .status-cancelado, .status-não-entregue {
  background: #f1f5f9 !important;
  color: #64748b !important;
  border-color: #e2e8f0 !important;
  text-decoration: line-through;
}

/* Projects Grid */
.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 22px 0;
}
@media (max-width: 800px) { .grid-two { grid-template-columns: 1fr; } }

.project-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 600px) { .project-list { grid-template-columns: 1fr; } }
.project-card-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  transition: all 0.15s ease;
}
.project-card-item span { font-weight: 650; font-size: 0.88rem; color: var(--slate-800); }
.project-card-item strong { font-size: 0.85rem; color: var(--blue); }
.clickable-project { cursor: pointer; }
.clickable-project:hover {
  background: #eff6ff;
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Member Task Details inside Card */
.member-tasks-details {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--slate-200);
}
.member-tasks-details summary {
  font-size: 0.82rem;
  color: var(--blue);
  cursor: pointer;
  font-weight: 650;
  user-select: none;
}
.member-tasks-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}
.member-task-item {
  font-size: 0.78rem;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.member-task-item a {
  color: var(--slate-900);
  text-decoration: none;
  font-weight: 650;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.member-task-item a:hover { color: var(--blue); text-decoration: underline; }

/* ==========================================================================
   SECTION DIVIDER & SPRINT HERO
   ========================================================================== */

.section-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--slate-300), transparent);
  margin: 50px 0 40px;
  position: relative;
}
.section-divider-label {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--canvas);
  padding: 0 20px;
  color: var(--blue);
  font-size: 0.8rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* Sprint Focus Banner */
.sprint-focus-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid #334155;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.2);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.sprint-focus-header::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.sprint-focus-header .eyebrow {
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.78rem;
}
.sprint-focus-header h2 {
  margin: 2px 0 6px;
  font-size: 1.85rem;
  color: #ffffff;
}
.sprint-focus-header p {
  color: #94a3b8;
  font-size: 0.94rem;
  max-width: 680px;
}
.sprint-focus-header strong {
  color: #38bdf8;
}

/* ==========================================================================
   BUTTONS & ACTIONS
   ========================================================================== */

button, .secondary, .primary, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font: inherit;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: none;
}
.primary {
  color: #fff;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4);
}
.primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.secondary {
  color: var(--slate-700);
  background: #ffffff;
  border: 1px solid var(--slate-300);
  box-shadow: var(--shadow-sm);
}
.secondary:hover {
  background: var(--slate-50);
  border-color: var(--slate-400);
  color: var(--slate-900);
}
.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}
.danger-button:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   TABLES & LINKS
   ========================================================================== */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}
th {
  color: var(--slate-500);
  font-size: 0.76rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--paper);
}
tbody tr {
  transition: background 0.15s ease;
}
tbody tr:hover {
  background: #f8faff;
}
tbody tr:last-child td { border-bottom: none; }

.issue-cell-link {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.issue-cell-link:hover { text-decoration: underline; }
.open-redmine-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.open-redmine-link:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}
.muted-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}
.muted-link:hover { text-decoration: underline; }
.history-state {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid #bfdbfe;
}

/* Notices */
.notice {
  margin: 18px 0;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.warning {
  color: #854d0e;
  background: #fefce8;
  border: 1px solid #fef08a;
}
.danger {
  color: #9f1239;
  background: #fff1f2;
  border: 1px solid #fecdd3;
}

/* ==========================================================================
   DRILLDOWN MODAL
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open {
  display: flex;
  opacity: 1;
}
.modal-container {
  background: #ffffff;
  width: min(1040px, 100%);
  max-height: 88vh;
  border-radius: var(--radius-xl);
  border: 1px solid var(--slate-200);
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.open .modal-container {
  transform: scale(1) translateY(0);
}
.modal-header {
  padding: 20px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: #fafcff;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--slate-900);
}
.modal-header p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--slate-500);
}
.modal-close-btn {
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  font-size: 1.4rem;
  line-height: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--slate-500);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}
.modal-close-btn:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

.modal-search-row {
  padding: 12px 26px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.modal-search-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
}
.modal-search-row input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.modal-count-pill {
  font-size: 0.82rem;
  font-weight: 750;
  color: var(--blue);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.modal-content {
  padding: 0 26px;
  overflow-y: auto;
  flex: 1;
}
.modal-content table { margin: 12px 0 24px; }
.modal-content th {
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 2;
  box-shadow: 0 1px 0 var(--line);
}

.modal-footer {
  padding: 14px 26px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafcff;
}

/* Responsive Topbar & Layout */
@media (max-width: 1080px) {
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .topbar-nav { gap: 4px; }
  .nav-item { padding: 6px 9px; font-size: 0.82rem; gap: 4px; }
  .user-badge { padding: 4px 9px; font-size: 0.78rem; }
  .logout-btn { padding: 4px 8px; font-size: 0.76rem; }
}

@media (max-width: 820px) {
  .page { padding: 0 16px; margin-top: 20px; }
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 16px;
    height: auto;
    min-height: 64px;
    gap: 10px;
  }
  .topbar-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .topbar-nav::-webkit-scrollbar { display: none; }
  .topbar-actions {
    margin-left: auto;
  }
  .sprint-focus-header { padding: 20px; }
}

/* ==========================================================================
   TABLE ROWS STATUS COLOR STYLING (VERDINHAS, CINZA COM RISCO, AZUL, ROSA)
   ========================================================================== */

tr.row-completed, tr.row-validado, tr.row-concluido {
  background-color: #f0fdf4 !important;
  border-left: 4px solid var(--green) !important;
}
tr.row-completed td, tr.row-validado td, tr.row-concluido td {
  color: #065f46;
}
tr.row-completed:hover, tr.row-validado:hover, tr.row-concluido:hover {
  background-color: #dcfce7 !important;
}

tr.row-carried {
  background-color: #f0f7ff !important;
  border-left: 4px solid var(--blue) !important;
}
tr.row-carried td {
  color: #1e3a8a;
}
tr.row-carried:hover {
  background-color: #e0f2fe !important;
}

tr.row-cancelled, tr.row-nao-entregue, tr.row-rejeitado {
  background-color: #f8fafc !important;
  border-left: 4px solid #cbd5e1 !important;
}
tr.row-cancelled td, tr.row-nao-entregue td, tr.row-rejeitado td {
  color: #94a3b8 !important;
}
tr.row-cancelled .task-subject,
tr.row-nao-entregue .task-subject,
tr.row-rejeitado .task-subject,
tr.row-cancelled td small,
tr.row-nao-entregue td small {
  text-decoration: line-through;
  opacity: 0.8;
}
tr.row-cancelled:hover, tr.row-nao-entregue:hover {
  background-color: #f1f5f9 !important;
}

tr.row-impeded {
  background-color: #fffbeb !important;
  border-left: 4px solid var(--amber) !important;
}
tr.row-impeded td {
  color: #92400e;
}
tr.row-impeded:hover {
  background-color: #fef3c7 !important;
}

tr.row-error, tr.row-conflict {
  background-color: #fff1f2 !important;
  border-left: 4px solid var(--red) !important;
}
tr.row-error td, tr.row-conflict td {
  color: #9f1239;
}
tr.row-error:hover {
  background-color: #ffe4e6 !important;
}

.task-subject {
  color: var(--slate-800);
  font-size: 0.86rem;
  line-height: 1.35;
  display: inline-block;
  margin-top: 2px;
}

/* Action Badges */
.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-complete {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.badge-carry {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.badge-unchanged {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ==========================================================================
   WHATSAPP SUMMARY PANEL & COPY TOOL
   ========================================================================== */

.whatsapp-panel {
  display: flex;
  flex-direction: column;
}
.whatsapp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.whatsapp-textarea {
  width: 100%;
  font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-300);
  background: #fcfdfe;
  color: var(--slate-900);
  resize: vertical;
  min-height: 180px;
}
.whatsapp-textarea:focus {
  outline: none;
  border-color: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.18);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25d366 !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.28);
}
.copy-btn:hover {
  background: #1eb956 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}
.copy-feedback {
  margin-top: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-weight: 650;
  font-size: 0.84rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   DASHBOARD TABS (SPRINT ATIVA VS. VISÃO GERAL POR PERÍODO)
   ========================================================================== */

.dashboard-tabs-container {
  margin: 18px 0 24px;
}
.dashboard-tabs {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--slate-200);
  gap: 4px;
  flex-wrap: wrap;
}
.dashboard-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--slate-700);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.dashboard-tab-btn:hover {
  color: var(--slate-950);
}
.dashboard-tab-btn.active {
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.tab-content {
  display: block;
}
.tab-content.tab-hidden {
  display: none !important;
}

/* ==========================================================================
   SPRINT CHARTS GRID & SVG VISUALS
   ========================================================================== */

.sprint-charts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.25fr);
  gap: 20px;
  margin-bottom: 24px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1040px) {
  .sprint-charts-grid {
    grid-template-columns: 1fr;
  }
}

.chart-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}
.chart-header {
  margin-bottom: 16px;
}
.chart-header h3 {
  font-size: 1.12rem;
  margin: 0;
  color: var(--slate-900);
}
.chart-header p {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 3px;
}

/* Donut Chart Visual */
.donut-chart-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: nowrap;
  padding: 10px 0;
}
.donut-svg-box {
  width: 146px;
  height: 146px;
  position: relative;
  flex-shrink: 0;
}
.donut-svg-box svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}
.donut-center-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.donut-center-number {
  font-size: 1.85rem;
  font-weight: 850;
  line-height: 1;
  color: var(--slate-900);
}
.donut-center-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-top: 2px;
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.legend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  transition: background-color 0.15s ease;
  position: relative;
  border: 1px solid transparent;
}
.legend-item.clickable {
  cursor: pointer;
}
.legend-item.clickable:hover {
  background: var(--slate-100);
  transform: none !important;
  box-shadow: none !important;
  border-color: var(--slate-200) !important;
}
.legend-item.clickable::after,
.legend-item::after {
  display: none !important;
  content: none !important;
}
.legend-item-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-700);
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
}
.legend-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.legend-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-item-value {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
.legend-qty {
  font-weight: 800;
  color: var(--slate-900);
  font-size: 0.88rem;
}
.legend-pct {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-500);
}

/* Horizontal Bar Chart (Team Deliveries vs Carry) */
.bar-chart-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 6px;
}
.bar-chart-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bar-row-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}
.bar-row-name {
  font-weight: 700;
  color: var(--slate-800);
}
.bar-row-metrics {
  font-size: 0.78rem;
  color: var(--slate-600);
  font-weight: 600;
}
.bar-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: var(--slate-100);
  overflow: hidden;
  display: flex;
}
.bar-segment-green {
  background: linear-gradient(90deg, #10b981, #059669);
  height: 100%;
  transition: width 0.3s ease;
}
.bar-segment-purple {
  background: linear-gradient(90deg, #8b5cf6, #6366f1);
  height: 100%;
  transition: width 0.3s ease;
}
.bar-segment-gray {
  background: #cbd5e1;
  height: 100%;
  transition: width 0.3s ease;
}

/* ==========================================================================
   SETTINGS PAGE & CONNECTION DIAGNOSTIC
   ========================================================================== */

.settings-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  margin-bottom: 26px;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 900px) {
  .settings-grid { grid-template-columns: 1fr; }
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-icon .input-icon {
  position: absolute;
  left: 12px;
  font-size: 1.05rem;
  pointer-events: none;
  color: var(--muted);
}
.input-with-icon input {
  width: 100%;
  padding: 10px 42px 10px 38px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.15s ease;
  background: #ffffff;
}
.input-with-icon input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.toggle-password-btn {
  position: absolute;
  right: 8px;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  color: var(--muted);
  box-shadow: none !important;
  transform: none !important;
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.preset-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 650;
}
.preset-btn {
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  font-size: 0.8rem;
  font-weight: 650;
  cursor: pointer;
  color: var(--slate-700);
  transition: all 0.15s ease;
}
.preset-btn:hover {
  background: #eff6ff;
  border-color: var(--blue);
  color: var(--blue);
}

.test-conn-feedback {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin: 16px 0;
  line-height: 1.5;
}
.test-conn-feedback.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
}
.test-conn-feedback.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
}
.test-conn-feedback.loading {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: var(--slate-700);
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
}
.status-indicator-badge.live-connected {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.status-indicator-badge.live-disconnected {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pulse-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.pulse-dot.red { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.info-item:last-child { border-bottom: none; }
.info-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--muted);
  letter-spacing: 0.06em;
}
.info-value {
  font-size: 0.88rem;
  word-break: break-all;
}
.security-note {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--slate-200);
  display: flex;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--slate-700);
  line-height: 1.45;
}
.security-note-icon { font-size: 1.3rem; flex-shrink: 0; }

.settings-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==========================================================================
   RETRY FAILED CARD & FAILURE DETAIL STYLING
   ========================================================================== */

.retry-card {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-left: 6px solid #f59e0b;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.14);
}
.retry-card-info h3 {
  margin: 0 0 6px;
  color: #92400e;
  font-size: 1.18rem;
}
.retry-card-info p {
  margin: 0;
  color: #b45309;
  font-size: 0.88rem;
  max-width: 760px;
  line-height: 1.45;
}
.warning-button {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 750;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.warning-button:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(217, 119, 6, 0.45);
}

.failure-detail-card {
  margin-top: 8px;
  padding: 8px 12px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: left;
}
.failure-detail-title {
  color: #be123c;
  font-weight: 750;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 3px;
  font-size: 0.8rem;
}
.failure-detail-msg {
  color: #9f1239;
  font-weight: 650;
  word-break: break-word;
}
.failure-detail-hint {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 0.76rem;
}
.failure-detail-hint a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
}

.badge-reverted {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
  font-weight: 750;
}

/* ==========================================================================
   PROGRESS MODAL & REAL-TIME PROGRESS BAR
   ========================================================================== */

.progress-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  animation: fadeInModal 0.25s ease-out;
}

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

.progress-modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(15, 23, 42, 0.08);
  width: 100%;
  max-width: 580px;
  padding: 32px;
  text-align: left;
  animation: slideUpModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@keyframes slideUpModal {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.progress-modal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.progress-icon-pulse {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  animation: iconPulseAnim 2s infinite ease-in-out;
}

@keyframes iconPulseAnim {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.progress-modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--slate-950, #0f172a);
}

.progress-modal-header p {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: var(--slate-600, #475569);
}

.progress-bar-container {
  height: 14px;
  background: var(--slate-100, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--slate-200, #e2e8f0);
  box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.06);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #10b981 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: gradientShift 2.5s infinite linear;
}

@keyframes gradientShift {
  0% { background-position: 100% 0%; }
  100% { background-position: 0% 0%; }
}

.progress-bar-fill.progress-bar-done {
  background: #10b981 !important;
  animation: none !important;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.92rem;
  font-weight: 700;
}

.progress-percent {
  color: var(--blue, #2563eb);
  font-size: 1.15rem;
  font-weight: 800;
}

.progress-count {
  color: var(--slate-600, #475569);
  font-size: 0.88rem;
}

.progress-log-box {
  margin-top: 16px;
  padding: 12px 14px;
  background: #0f172a;
  color: #38bdf8;
  border-radius: var(--radius-sm, 8px);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid #1e293b;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-footer-note {
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--slate-500, #64748b);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   PROGRESS MODAL LIVE LOG COLLAPSIBLE
   ========================================================================== */

.progress-history-collapse {
  margin-top: 12px;
  background: #0b1120;
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm, 8px);
  overflow: hidden;
  transition: all 0.2s ease;
}

.progress-history-collapse[open] {
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.progress-history-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  background: #0f172a;
  transition: background 0.15s ease, color 0.15s ease;
  list-style: none;
}

.progress-history-summary::-webkit-details-marker {
  display: none;
}

.progress-history-summary:hover {
  background: #1e293b;
  color: #f1f5f9;
}

.progress-history-summary .summary-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-history-summary .collapse-icon {
  display: inline-block;
  font-size: 0.7rem;
  color: #64748b;
  transition: transform 0.2s ease;
}

.progress-history-collapse[open] .progress-history-summary .collapse-icon {
  transform: rotate(90deg);
  color: #38bdf8;
}

.progress-history-summary .summary-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-mini {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  line-height: 1.3;
}

.badge-mini.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-mini.error {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.progress-history-scroll {
  max-height: 135px;
  overflow-y: auto;
  padding: 8px 10px;
  background: #070c18;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 0.74rem;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-top: 1px solid #1e293b;
}

.progress-history-scroll::-webkit-scrollbar {
  width: 5px;
}

.progress-history-scroll::-webkit-scrollbar-track {
  background: #090d16;
}

.progress-history-scroll::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 3px;
}

.progress-history-scroll::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

.history-log-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  word-break: break-word;
  animation: logFadeIn 0.15s ease-out;
}

@keyframes logFadeIn {
  from { opacity: 0; transform: translateY(-2px); }
  to { opacity: 1; transform: translateY(0); }
}

.history-log-row .log-time {
  color: #475569;
  font-size: 0.68rem;
  flex-shrink: 0;
}

.history-log-row.success {
  color: #a7f3d0;
}

.history-log-row.error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  padding: 1px 4px;
  border-radius: 3px;
}

.history-log-row.info {
  color: #7dd3fc;
}

.history-empty {
  color: #475569;
  font-style: italic;
  padding: 8px 4px;
}

/* ==========================================================================
   PASSWORD CHANGE FORM STYLES
   ========================================================================== */

.settings-form-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.password-panel {
  border-top: 4px solid var(--blue, #2563eb);
}

/* ==========================================================================
   SPRINT SELECTOR BAR (HISTÓRICO NO SQLITE VS AO VIVO)
   ========================================================================== */

.sprint-selector-bar {
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius-lg, 14px);
  padding: 14px 20px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.sprint-selector-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sprint-select-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sprint-select-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  color: var(--slate-700, #334155);
}

.sprint-select-dropdown {
  background: #f8fafc;
  border: 1.5px solid var(--slate-300, #cbd5e1);
  border-radius: var(--radius-sm, 8px);
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-800, #1e293b);
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 250px;
}

.sprint-select-dropdown:hover, .sprint-select-dropdown:focus {
  border-color: var(--blue, #2563eb);
  background: #ffffff;
  outline: none;
}

.snapshot-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 5px 12px;
  border-radius: 999px;
}

.live-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 5px 12px;
  border-radius: 999px;
}

.back-to-live-btn {
  font-weight: 750;
  color: var(--blue, #2563eb);
  border-color: #bfdbfe;
  background: #eff6ff;
  padding: 7px 14px;
  font-size: 0.84rem;
}
.back-to-live-btn:hover {
  background: #dbeafe;
}

/* ==========================================================================
   DETECTOR DE TAREFAS ZUMBI (DASHBOARD & RUN)
   ========================================================================== */

.zombie-banner {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fef2f2 100%);
  border: 1.5px solid #fecdd3;
  border-left: 6px solid #e11d48;
  border-radius: var(--radius-lg, 14px);
  padding: 16px 22px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(225, 29, 72, 0.08);
}

.zombie-banner-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.zombie-banner-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.zombie-banner-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05rem;
  color: #9f1239;
}

.zombie-banner-badge {
  background: #be123c;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zombie-banner-desc {
  margin: 4px 0 0 0;
  font-size: 0.88rem;
  color: #881337;
}

.zombie-btn {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
  padding: 9px 18px;
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 3px 10px rgba(190, 18, 60, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.zombie-btn:hover {
  background: #9f1239;
  transform: translateY(-1px);
}

.badge-zombie {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-zombie.zombie-severe {
  background: #ffe4e6;
  border: 1.5px solid #fda4af;
  color: #9f1239;
  font-weight: 850;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.15);
}

/* ==========================================================================
   PAINEL COMPARATIVO DE HISTÓRICO DE SPRINTS (SQLITE SNAPSHOTS)
   ========================================================================== */

.sprint-comparison-panel {
  margin: 32px 0 28px;
}

.snapshot-count-badge {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 4px 10px;
  border-radius: 999px;
}

.sprint-history-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.sprint-history-card {
  background: #ffffff;
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.sprint-history-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.sprint-history-card.active-snapshot-card {
  border-color: var(--blue, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  background: #fcfdff;
}

.sprint-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sprint-badge {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--slate-900, #0f172a);
}

.pill-live {
  background: #ecfdf5;
  color: #047857;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
}

.pill-snapshot {
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  text-transform: uppercase;
}

.sprint-delivery-rate {
  font-size: 1.25rem;
  font-weight: 850;
  color: #10b981;
}
.sprint-delivery-rate span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-500, #64748b);
}

.sprint-card-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
  text-align: center;
}

.sprint-mini-metric small {
  display: block;
  font-size: 0.68rem;
  color: var(--slate-500, #64748b);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.sprint-mini-metric strong {
  font-size: 0.95rem;
  color: var(--slate-800, #1e293b);
}

.sprint-mini-bar {
  height: 7px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.sprint-mini-fill-green {
  background: #10b981;
  height: 100%;
  transition: width 0.3s ease;
}

.sprint-mini-fill-purple {
  background: #8b5cf6;
  height: 100%;
  transition: width 0.3s ease;
}

.sprint-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.sprint-saved-date {
  font-size: 0.74rem;
  color: var(--slate-500, #64748b);
}

.sprint-card-btn {
  font-size: 0.8rem;
  font-weight: 750;
  color: var(--blue, #2563eb);
  text-decoration: none;
}
.sprint-card-btn:hover {
  text-decoration: underline;
}

/* ==========================================================================
   PRÉ-VALIDAÇÃO DE CONFORMIDADE (DRY-RUN CHECK)
   ========================================================================== */

.validation-report-card {
  border-radius: var(--radius-lg, 14px);
  padding: 20px 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.validation-report-card.checking {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: var(--slate-700, #334155);
}

.validation-report-card.success {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  color: #065f46;
}

.validation-report-card.warning {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  color: #92400e;
}

.validation-report-card.error {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.validation-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.validation-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.validation-header strong {
  font-size: 1.05rem;
  display: block;
  margin-bottom: 3px;
}

.validation-header p {
  margin: 0;
  font-size: 0.88rem;
  opacity: 0.9;
}

.validation-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #cbd5e1;
  border-top-color: var(--blue, #2563eb);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.validation-warning-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.validation-warning-item {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm, 8px);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.validation-warning-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 240px;
  flex: 1;
}

.validation-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.validation-reason-pill {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

/* ==========================================================================
   HISTORY DELETION & DANGER ZONE STYLES
   ========================================================================== */

.table-delete-btn {
  background: transparent;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
  line-height: 1.2;
}
.table-delete-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.snapshot-delete-icon-btn {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: auto;
  line-height: 1.2;
}
.snapshot-delete-icon-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.danger-zone-panel {
  border-top: 4px solid #ef4444 !important;
  background: #ffffff;
}

.danger-zone-stats {
  display: flex;
  gap: 12px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.danger-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: #475569;
}
.danger-stat-pill strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.danger-zone-actions-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.danger-action-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm, 8px);
  flex-wrap: wrap;
  transition: all 0.15s ease;
}
.danger-action-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.danger-action-card.highlight-danger {
  background: #fff1f2;
  border-color: #fecdd3;
}
.danger-action-card.highlight-danger:hover {
  background: #ffe4e6;
  border-color: #fda4af;
}

.danger-action-text {
  flex: 1;
  min-width: 240px;
}
.danger-action-text strong {
  display: block;
  font-size: 0.94rem;
  margin-bottom: 3px;
  color: #1e293b;
}
.danger-action-text p {
  margin: 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
}

.clean-btn {
  background: #e11d48;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.82rem;
  white-space: nowrap;
}
.clean-btn:hover {
  background: #be123c;
}

.reset-all-btn {
  background: #9f1239;
  color: #ffffff;
  padding: 9px 18px;
  font-size: 0.84rem;
  white-space: nowrap;
}
.reset-all-btn:hover {
  background: #881337;
}

/* ==========================================================================
   MINIMALIST AUTH / LOGIN SCREEN
   ========================================================================== */

.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #f8fafc;
  background-image: radial-gradient(circle at 50% 30%, #f1f5f9 0%, #f8fafc 70%);
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.login-box {
  width: 100%;
  max-width: 340px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
}

.login-error {
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: -0.01em;
}

.login-field input {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.login-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-submit {
  width: 100%;
  height: 40px;
  margin-top: 6px;
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-submit:hover {
  background: #1d4ed8;
}

.login-submit:active {
  background: #1e40af;
  transform: scale(0.99);
}

/* ==========================================================================
   STEP-BY-STEP TURNOVER COMPLIANCE WORKFLOW
   ========================================================================== */

.turnover-workflow-card {
  background: #ffffff;
  border: 1.5px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-lg, 16px);
  padding: 22px 26px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
}

.workflow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--slate-100, #f1f5f9);
}

.workflow-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.workflow-step-badge.step-pending {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}
.workflow-step-badge.step-warning {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
  animation: pulseWarning 2s infinite;
}
.workflow-step-badge.step-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

@keyframes pulseWarning {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.workflow-steps-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md, 12px);
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  flex: 1;
  min-width: 210px;
  transition: all 0.2s ease;
}

.workflow-step.active {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

.workflow-step.completed {
  background: #f0fdf4;
  border-color: #86efac;
}

.workflow-step.warning {
  background: #fff1f2;
  border-color: #fda4af;
}

.workflow-step.locked {
  opacity: 0.65;
  background: #f8fafc;
}

.wf-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #94a3b8;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.workflow-step.active .wf-step-number {
  background: #6366f1;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.workflow-step.completed .wf-step-number {
  background: #10b981;
}
.workflow-step.warning .wf-step-number {
  background: #ef4444;
}
.workflow-step.locked .wf-step-number {
  background: #cbd5e1;
}

.wf-step-text {
  display: flex;
  flex-direction: column;
}
.wf-step-text strong {
  font-size: 0.88rem;
  color: #1e293b;
}
.wf-step-text small {
  font-size: 0.77rem;
  color: #64748b;
  line-height: 1.35;
}

.wf-arrow {
  color: #cbd5e1;
  font-size: 1.1rem;
}

.locked-execution-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm, 8px);
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1.5px dashed #cbd5e1;
}

.workflow-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6366f1;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.workflow-title-wrap h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.workflow-title-wrap p {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.4;
}

.workflow-action-toolbar {
  margin-top: 20px;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md, 12px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  transition: all 0.2s ease;
}

.workflow-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #334155;
  flex: 1;
  min-width: 260px;
}

.workflow-hint-icon {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}

.workflow-buttons-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stepper Command Buttons */
.wf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 750;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
  border: none;
  line-height: 1.3;
}

.wf-btn-secondary {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
}
.wf-btn-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.wf-btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}
.wf-btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.42);
  transform: translateY(-1px);
}

.wf-btn-locked {
  background: #f1f5f9;
  color: #64748b;
  border: 1.5px dashed #cbd5e1;
  cursor: not-allowed;
  opacity: 0.9;
}

.wf-btn-disabled {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-size: 0.84rem;
  cursor: not-allowed;
}

.wf-btn-execute {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  padding: 11px 24px !important;
  font-size: 0.94rem !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
  cursor: pointer;
  animation: pulseReadyExecute 2s infinite;
}
.wf-btn-execute:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

@keyframes pulseReadyExecute {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Minimalist Header Action Buttons */
.header-export-group {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 5px;
  gap: 2px;
}

.header-export-btn {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #64748b;
  text-decoration: none;
  transition: all 0.15s ease;
}
.header-export-btn:hover {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-delete-btn {
  background: transparent;
  color: #ef4444;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.header-delete-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

/* Button Loading & Disabled States */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: btnSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin-right: 7px;
  vertical-align: middle;
}

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

.btn-loading {
  opacity: 0.88 !important;
  cursor: wait !important;
  pointer-events: none !important;
}

.btn-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(40%) !important;
}

/* ==========================================================================
   SWEETALERT2 - 2026 MODERN EXECUTIVE THEME
   ========================================================================== */
.swal2-container {
  backdrop-filter: blur(4px) !important;
}

.swal2-popup {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  border-radius: 20px !important;
  padding: 28px 32px !important;
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  background: #ffffff !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
}

.swal2-title {
  font-size: 1.28rem !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.025em !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
}

.swal2-html-container {
  font-size: 0.94rem !important;
  line-height: 1.58 !important;
  color: #475569 !important;
  margin: 10px 0 24px !important;
}

.swal2-actions {
  gap: 12px !important;
  margin-top: 18px !important;
  width: 100% !important;
  justify-content: flex-end !important;
}

.swal2-actions button {
  border-radius: 12px !important;
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  padding: 11px 24px !important;
  box-shadow: none !important;
  transition: all 0.16s ease !important;
  cursor: pointer !important;
}

.swal2-confirm {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28) !important;
}
.swal2-confirm:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.4) !important;
}

.swal2-cancel {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border: 1px solid #cbd5e1 !important;
}
.swal2-cancel:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  transform: translateY(-1px) !important;
}

.swal2-icon {
  margin: 8px auto 20px !important;
  border-width: 3px !important;
  transform: scale(0.95);
}

/* Modern toast styling */
.swal2-toast {
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(226, 232, 240, 0.8) !important;
  padding: 14px 20px !important;
}
.swal2-toast .swal2-title {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

/* ==========================================================================
   ENHANCEMENTS: BATCH ACTIONS, DISCORD BUTTON & SPRINT HEALTH
   ========================================================================== */

/* Modal Batch Actions */
.modal-batch-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.modal-batch-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  font-family: inherit;
}
.modal-batch-btn:hover {
  background: #ffffff;
  color: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

/* Discord Button */
.discord-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 750;
  background: #5865f2;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(88, 101, 242, 0.35);
  font-family: inherit;
}
.discord-send-btn:hover {
  background: #4752c4;
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.45);
  transform: translateY(-1px);
}

/* Painel de Saúde & Diagnóstico da Sprint */
.sprint-health-panel {
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}
.health-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.health-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--slate-900);
  margin: 0;
}
.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.health-badge.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.health-badge.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.health-badge.danger {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.health-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.insight-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--slate-50);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--slate-700);
}
.insight-card.warning {
  background: #fffdf5;
  border-color: #fde68a;
}
.insight-card.danger {
  background: #fff8f8;
  border-color: #fecdd3;
}
.insight-card.success {
  background: #f6fdf9;
  border-color: #a7f3d0;
}
.insight-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}
.insight-body {
  flex: 1;
}
.insight-body strong {
  color: var(--slate-900);
}
.insight-action-btn {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.75rem;
  font-weight: 750;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

/* Trend comparison badge */
.trend-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 6px;
}
.trend-badge.up {
  background: #ecfdf5;
  color: #059669;
}
.trend-badge.down {
  background: #fff1f2;
  color: #e11d48;
}
.trend-badge.stable {
  background: #f1f5f9;
  color: #64748b;
}

/* ==========================================================================
   TASK AGING BADGES (TEMPO DE INATIVIDADE / ESTAGNAÇÃO)
   ========================================================================== */

.badge-aging {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.70rem;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.25;
}
.badge-aging.aging-recent {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}
.badge-aging.aging-normal {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}
.badge-aging.aging-warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.badge-aging.aging-critical {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  font-weight: 800;
}

/* Modal Quick Filter active button */
.modal-batch-btn.active {
  background: #3b82f6;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   REFRESH BUTTONS & SPIN ANIMATION
   ========================================================================== */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spin {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

.mini-refresh-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.mini-refresh-link:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.mini-refresh-link:disabled,
#refreshDashboardBtn:disabled,
#refreshTurnoverBtn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ==========================================================================
   DAILY SPRINT TRACKING (ENTREGAS DIÁRIAS) - PREMIUM MODERN UI
   ========================================================================== */

.daily-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* Seletor de Sprint estilizado na Hero Topbar */
.daily-sprint-select {
  height: 40px;
  min-width: 170px;
  padding: 0 38px 0 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  color: #0f172a;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23334155'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 15px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.daily-sprint-select:hover {
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.daily-sprint-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Daily Hero Toolbar */
.daily-hero {
  margin-bottom: 22px;
}
.daily-hero-subtitle {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.5;
}
.daily-hero-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.daily-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.daily-actions-group button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  border-radius: 8px;
}

/* Timeline Navigator (Design Moderno Dividido em Grupos) */
.daily-timeline-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 8px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.timeline-days-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.timeline-days-section::-webkit-scrollbar {
  display: none;
}

.timeline-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-pills-list {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.timeline-vertical-sep {
  height: 26px;
  width: 1px;
  background: #e2e8f0;
  flex-shrink: 0;
  margin: 0 4px;
}

.timeline-views-section {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.timeline-views-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 11px;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
  user-select: none;
}

.timeline-pill:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.timeline-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.timeline-pill.view-mode {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.timeline-pill.view-mode:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.timeline-pill.view-mode.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.timeline-pill .pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.timeline-pill.has-data .pill-dot {
  background: #10b981;
}

.timeline-pill.active .pill-dot {
  background: #38bdf8;
}

.timeline-pill .pill-count {
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 999px;
  font-weight: 700;
  color: #64748b;
}

.timeline-pill .pill-count.pending {
  opacity: 0.5;
  background: transparent;
  padding: 0;
}

.timeline-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

@media (max-width: 1024px) {
  .daily-timeline-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .timeline-vertical-sep {
    display: none;
  }
  .timeline-views-section {
    justify-content: flex-end;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
  }
}

/* View Mode Switcher (Abas: Posição do Dia | Gráficos | Matriz Geral) */
.daily-view-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  width: fit-content;
}

.daily-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.84rem;
  font-weight: 650;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.daily-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Sub-header com detalhes do dia ativo */
.daily-active-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.daily-active-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-active-info h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.daily-active-info .date-chip {
  font-size: 0.76rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #0369a1;
  padding: 3px 8px;
  border-radius: 999px;
}

.daily-active-info .source-chip {
  font-size: 0.74rem;
  color: #64748b;
}

/* Daily KPIs Cards Grid */
.daily-kpis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.daily-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.daily-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.daily-kpi-card .kpi-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.daily-kpi-card .kpi-val {
  font-size: 1.7rem;
  font-weight: 850;
  color: #0f172a;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.daily-kpi-card .kpi-sub {
  font-size: 0.76rem;
  color: #94a3b8;
}

/* Modern Card Container */
.daily-panel-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  overflow: hidden;
}

.daily-panel-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  flex-wrap: wrap;
  gap: 12px;
}

.daily-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Modern Table */
.modern-daily-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.modern-daily-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 14px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  white-space: nowrap;
}

.modern-daily-table th:first-child {
  text-align: left;
  padding-left: 20px;
}

.modern-daily-table td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.modern-daily-table td:first-child {
  text-align: left;
  padding-left: 20px;
}

.modern-daily-table tbody tr:hover {
  background: #f8fafc;
}

/* Member Column */
.member-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.member-cell-info strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}

.member-cell-info small {
  font-size: 0.72rem;
  color: #64748b;
}

/* Modern Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.2;
}

.badge-status.fazer {
  background: #f1f5f9;
  color: #475569;
}

.badge-status.impedido {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-status.exec {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.15);
}

.badge-status.teste {
  background: #fef3c7;
  color: #b45309;
}

.badge-status.testando {
  background: #ffedd5;
  color: #c2410c;
}

.badge-status.reprovado {
  background: #fee2e2;
  color: #991b1b;
}

.badge-status.aprovado {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.badge-status.zero {
  opacity: 0.35;
  font-weight: 500;
  background: transparent;
  color: #94a3b8;
}

/* Row Progress Bar */
.member-progress-wrap {
  width: 90px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
}

.member-progress-fill {
  height: 100%;
  background: #10b981;
}

/* Total Row */
.modern-daily-table tfoot tr td {
  background: #f8fafc;
  font-weight: 800;
  color: #0f172a;
  border-top: 2px solid #cbd5e1;
  padding: 14px;
}

/* Charts Card Full */
.daily-chart-large-wrap {
  position: relative;
  height: 380px;
  width: 100%;
  padding: 10px 0;
}

.member-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 16px;
}

.member-chart-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.member-chart-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.member-chart-canvas-small {
  position: relative;
  height: 180px;
  width: 100%;
}

/* ==========================================================================
   Excel Table Styling & Matriz Comparativa Semanal
   ========================================================================== */

.excel-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #ffffff;
}

.excel-table th {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  text-align: center;
}

.excel-table th:first-child {
  text-align: left;
  padding-left: 16px;
}

.excel-table td {
  padding: 9px 12px;
  text-align: center;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.excel-table td:first-child {
  text-align: left;
  font-weight: 650;
  color: #0f172a;
  padding-left: 16px;
}

.excel-table tbody tr:hover {
  background: #f8fafc;
}

.excel-table .excel-total-row td {
  background: #f1f5f9;
  font-weight: 850;
  color: #0f172a;
  border-top: 2px solid #94a3b8;
  padding: 11px 12px;
}

.excel-table .cell-highlight-imp {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  font-weight: 800;
}

.excel-table .cell-highlight-exec {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  font-weight: 800;
}

.excel-table .cell-highlight-approved {
  background: #ecfdf5 !important;
  color: #047857 !important;
  font-weight: 800;
}

/* Master Weekly Comparison Table (Matriz Executiva Dia a Dia) */
.matrix-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: #ffffff;
}

.matrix-summary-table th {
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 14px;
  border: 1px solid #334155;
  text-align: center;
}

.matrix-summary-table th:first-child {
  text-align: left;
  padding-left: 18px;
}

.matrix-summary-table td {
  padding: 11px 14px;
  text-align: center;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.matrix-summary-table td:first-child {
  text-align: left;
  font-weight: 750;
  color: #0f172a;
  padding-left: 18px;
  background: #f8fafc;
}

.matrix-summary-table tbody tr:hover td {
  background: #f1f5f9;
}

.matrix-summary-table tbody tr:hover td:first-child {
  background: #e2e8f0;
}

.matrix-summary-table .metric-badge {
  display: inline-block;
  min-width: 32px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.85rem;
}

.matrix-day-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.matrix-day-header {
  background: #1e3a8a;
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.daily-empty-state {
  text-align: center;
  padding: 48px 24px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-lg, 12px);
  margin: 10px 0;
}

.daily-empty-state .empty-icon {
  font-size: 2.6rem;
  display: block;
  margin-bottom: 12px;
}

.daily-empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.daily-empty-state p {
  margin: 0 auto 20px;
  max-width: 480px;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
}
