/* conferidor.css - VERSÃO COMPLETA E CORRIGIDA */

/* ====== CONTROLE DE VISIBILIDADE DOS MODOS ====== */
/* Esconder seções conforme o modo */
body:not(.mode-conferidor) .conferidor-section {
  display: none !important;
}

.mode-conferidor .number-grid-section,
.mode-conferidor .config-panel {
  display: none !important;
}

/* ====== BETSLIP (VOLANTE VIRTUAL) - RESPONSIVO ====== */
.betslip-container {
    background: #fff;
    border-radius: 10px;
    padding: 0px;
    max-width: 300px;
    margin: 0 auto;
}

.betslip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 8px;
}

.betslip-info h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 2px 0;
}

.selected-count {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  display: inline-block;
}

.betslip-quick-actions {
  display: flex;
  gap: 8px;
}

.betslip-quick-actions .btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.betslip-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin-bottom: 12px;
    max-width: 280px;
    border: 1px solid #00000042;
    padding: 8px;
    border-radius: 10px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.betslip-number {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 42px;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
}

.betslip-number:hover {
  border-color: #667eea;
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.2);
}

.betslip-number.selected {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.betslip-actions {
  margin-bottom: 16px;
}

.betslip-actions .btn {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
}

.betslip-info-text {
  text-align: center;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.betslip-info-text i {
  font-size: 16px;
}

/* ====== CABEÇALHO DO CONFERIDOR ====== */
.conferidor-section .card {
  background: #fff;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.conferidor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 8px;
}

.conferidor-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.conferidor-actions {
  display: flex;
  gap: 12px;
}

/* ====== BARRA DE FERRAMENTAS DO CONFERIDOR ====== */
.conferidor-toolbar {
  display: flex;
  gap: 12px;
  padding: 7px;
  background: #fff;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 5px;
  align-items: center;
  flex-wrap: wrap;
}

.conferidor-toolbar .btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.btn-delete-selected {
  background: #dc3545;
  color: white;
  border: none;
  transition: all 0.2s;
}

.btn-delete-selected:hover:not(:disabled) {
  background: #c82333;
}

.btn-delete-selected:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.selection-count {
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
}

.btn-select-all,
.btn-clear-all-conferidor {
  margin-left: auto;
}

/* ====== AÇÕES DO CONFERIDOR NOS CARDS ====== */
.conferidor-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #667eea;
}

.checkbox-label {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.btn-edit-conferidor {
  background: #667eea !important;
  color: white !important;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.btn-edit-conferidor:hover {
  background: #5568d3 !important;
  transform: translateY(-1px);
}

.result-card.conferidor-mode {
  border: 2px solid #e3e8ff;
}

.result-card.conferidor-mode:hover {
  border-color: #667eea;
}

/* Esconder botão favoritar no modo conferidor */
.mode-conferidor .btn-favorite {
  display: none !important;
}

/* ====== CHECKBOX NA TABELA ====== */
.cell-checkbox {
  text-align: center;
  width: 25px;
  padding: 8px;
}

.cell-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #667eea;
}

.th-checkbox {
  width: 15px;
  text-align: center;
}

/* ====== MODAL DE IMPORTAÇÃO ====== */
.import-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.import-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.import-modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-top: 5px;
}

.import-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 2px solid #f0f0f0;
}

.import-modal-header h3 {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.import-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.import-modal-close:hover {
  background: #f0f0f0;
  color: #333;
}

.import-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.import-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid #f0f0f0;
}

.import-tab {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-tab:hover {
  color: #667eea;
  background: #f8f9ff;
}

.import-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

.import-panel {
  display: none;
}

.import-panel.active {
  display: block;
}

.import-help {
  color: #666;
  margin-bottom: 12px;
  font-size: 14px;
}

.import-formats {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  list-style: none;
}

.import-formats li {
  padding: 8px 0;
  color: #555;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-formats li:before {
  content: "✓";
  color: #667eea;
  font-weight: bold;
}

.import-formats code {
  background: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  color: #667eea;
  border: 1px solid #e0e0e0;
}

.import-textarea {
  width: 100%;
  min-height: 200px;
  padding: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
  transition: all 0.2s ease;
}

.import-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.import-file-upload {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8f9fa;
    border: 2px dashed #d0d0d0;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-direction: row;
    flex-wrap: wrap;
}

.import-file-name {
  color: #666;
  font-size: 14px;
  flex: 1;
}

.import-preview {
  margin-top: 20px;
  padding: 16px;
  background: #f8f9ff;
  border: 2px solid #e3e8ff;
  border-radius: 8px;
}

.import-preview h4 {
  margin: 0 0 16px 0;
  color: #667eea;
  font-size: 16px;
}

.import-preview-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.import-preview-item {
  background: #fff;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  font-family: monospace;
  border: 1px solid #e0e0e0;
}

.preview-badge {
  background: #667eea;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 8px;
}

.import-preview-more {
  text-align: center;
  color: #666;
  font-size: 13px;
  margin: 12px 0;
}

.import-preview-summary {
  text-align: center;
  font-weight: 600;
  color: #667eea;
  font-size: 14px;
  margin: 12px 0 0 0;
}

.import-modal-footer {
  padding: 20px 24px;
  border-top: 2px solid #f0f0f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* ====== RESPONSIVO ====== */
@media (max-width: 768px) {
  .betslip-container {
    padding: 16px;
  }

  .betslip-grid {
    gap: 6px;
  }

  .betslip-number {
    font-size: 14px;
    min-height: 45px;
  }

  .conferidor-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .conferidor-toolbar .btn {
    width: 100%;
    justify-content: center;
  }

  .btn-select-all,
  .btn-clear-all-conferidor {
    margin-left: 0;
  }

  .conferidor-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .conferidor-actions {
    width: 100%;
  }

  .conferidor-actions .btn {
    flex: 1;
  }

  .import-modal-content {
    width: 95%;
    max-height: 85vh;
  }

  .import-tabs {
    flex-direction: column;
  }

  .import-tab {
    text-align: left;
  }

  .betslip-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .betslip-quick-actions {
    width: 100%;
    justify-content: space-between;
  }

  /* Tabs do conferidor */
  .conferidor-tabs {
    gap: 2px;
  }

  .conferidor-tab {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Save bar */
  .save-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .save-bar-actions {
    flex-direction: column;
  }

  .group-name-input {
    width: 100%;
  }

  /* Group cards */
  .saved-group-card {
    flex-wrap: wrap;
    padding: 10px 12px;
  }

  .group-card-main {
    flex-wrap: wrap;
    gap: 6px;
  }

  .group-info {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
  }

  .group-info .group-name {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .group-actions {
    flex-shrink: 0;
    gap: 4px;
  }

  .group-actions .btn-sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
    border-radius: 6px;
  }

  .group-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
  }

  .qc-faixa {
    font-size: 10px;
    padding: 2px 6px;
  }

  .groups-toolbar {
    flex-wrap: wrap;
    gap: 6px;
  }

  .groups-toolbar .btn-label {
    display: none;
  }
}

@media (max-width: 480px) {
  .betslip-grid {
    gap: 4px;
  }

  .betslip-number {
    font-size: 13px;
    min-height: 40px;
  }

  .conferidor-card-actions {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .checkbox-wrapper {
    width: 100%;
  }

  .btn-edit-conferidor {
    width: 100%;
    justify-content: center;
  }

  .import-modal-content {
      max-height: 80vh;
      margin-top: 0px;
  }

  .import-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 2px solid #f0f0f0;
  }

  /* Tabs empilhadas em tela muito pequena */
  .conferidor-tabs {
    flex-direction: column;
    gap: 0;
  }

  .conferidor-tab {
    padding: 10px 10px;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .conferidor-tab.active {
    border-bottom: none;
    border-left-color: #667eea;
    background: #f8f9ff;
  }

  .group-card-main {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .group-checkbox {
    flex-shrink: 0;
  }

  .group-actions {
    flex-shrink: 0;
    gap: 3px;
  }

  .group-actions .btn-sm {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 5px;
  }

  .group-info .group-name {
    font-size: 12px;
  }

  .group-meta {
    font-size: 10px;
    gap: 6px;
  }

  .saved-group-card {
    padding: 8px 10px;
    gap: 6px;
  }
}

/* ====== BOTÃO EDIÇÃO DO BETSLIP ====== */
.btn-add-bet.btn-editing {
  background: linear-gradient(135deg, #ff9800, #f57c00) !important;
}

.btn-add-bet.btn-editing:hover {
  background: linear-gradient(135deg, #f57c00, #e65100) !important;
}

.btn-cancel-edit {
  font-size: 14px;
  padding: 10px;
}

/* ====== ABAS DO CONFERIDOR ====== */
.conferidor-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0;
  flex-direction: row;
}

.conferidor-tab {
  padding: 8px 10px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: #666;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.conferidor-tab:hover {
  color: #667eea;
  background: #f8f9ff;
}

.conferidor-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* ====== CONTEÚDO DAS ABAS ====== */
.conferidor-tab-content {
  display: none;
}

.conferidor-tab-content.active {
  display: block;
}

/* ====== ABA IMPORTAR TEXTO (INLINE) ====== */
.import-section {
  padding: 8px 0;
}

.import-section .import-help {
  color: #666;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.import-section .import-textarea {
  width: 100%;
  min-height: 150px;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.import-section .import-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.import-help-small {
  color: #888;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.import-buttons {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-import-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.import-file-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.import-file-status {
  font-size: 12px;
  color: #888;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-skipped {
  color: #888;
  font-size: 12px;
  font-style: italic;
  padding: 4px 8px;
  background: #f5f5f5;
  border-radius: 4px;
}

/* ====== ABA SALVOS - GRUPOS ====== */
.saved-groups-section {
  padding: 8px 0;
}

.saved-groups-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.saved-groups-header h3 {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-refresh-groups {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.saved-groups-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.saved-group-card:hover {
  border-color: #667eea;
  background: #f8f9ff;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.group-info {
  flex: 1;
  min-width: 0;
}

.group-info .group-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 6px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #888;
}

.group-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.group-meta i {
  font-size: 12px;
  color: #aaa;
}

.group-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.group-actions .btn-sm {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
}

/* Toolbar dos grupos salvos */
.groups-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  margin-bottom: 8px;
  gap: 8px;
}

.groups-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.groups-toolbar-right {
  display: flex;
  align-items: center;
}

.groups-per-page-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
}

.groups-per-page-select {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

/* Checkbox nos cards de grupo */
.group-checkbox {
  display: flex;
  align-items: center;
  padding-right: 10px;
  flex-shrink: 0;
}

.group-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #7b2d8e;
}

.saved-group-card {
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  transition: all 0.2s;
  gap: 8px;
}

.group-card-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.saved-group-card.group-selected {
  border-color: #7b2d8e;
  background: #f8f0fc;
}

.saved-group-card.group-current {
  border-color: #667eea;
  background: #f0f3ff;
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.25);
}

.saved-group-card.group-current .group-name::after {
  content: ' (aberto)';
  font-size: 11px;
  font-weight: 400;
  color: #667eea;
}

/* Paginação dos grupos salvos */
.groups-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 0 4px;
  margin-top: 4px;
}

.groups-page-info {
  font-size: 13px;
  color: #666;
}

.groups-page-info small {
  color: #999;
}

.groups-page-btn {
  min-width: 32px;
  height: 32px;
}

.groups-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.no-groups-message {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.no-groups-message i {
  font-size: 40px;
  margin-bottom: 12px;
  display: block;
  color: #ccc;
}

.no-groups-message p {
  margin: 4px 0;
  font-size: 15px;
}

.no-groups-message .hint {
  font-size: 13px;
  color: #bbb;
}

/* ====== CONFERÊNCIA RÁPIDA ====== */
.group-quick-check {
  width: 100%;
}

.btn-quick-check {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: #fff !important;
  border: none !important;
  font-size: 12px !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-quick-check:hover {
  opacity: 0.85;
}

.quick-check-loading {
  font-size: 12px;
  color: #888;
  padding: 4px 0;
  display: inline-block;
}

.quick-check-empty,
.quick-check-error {
  font-size: 12px;
  color: #999;
  padding: 4px 0;
  display: inline-block;
}

.quick-check-error {
  color: #dc3545;
}

.quick-check-result {
  width: 100%;
}

.qc-header {
  margin-bottom: 6px;
}

.qc-contest {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.qc-contest i {
  color: #d4a017;
  margin-right: 4px;
}

.qc-scores {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.qc-faixa {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 5px;
  font-weight: 500;
  white-space: nowrap;
}

.qc-faixa strong {
  font-weight: 700;
}

.qc-total {
  font-weight: 600;
}

.loading-text {
  text-align: center;
  padding: 24px;
  color: #999;
  font-size: 14px;
}

.loading-text i {
  margin-right: 8px;
}

/* ====== SEÇÃO DE SALVAMENTO ====== */
.conferidor-save-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px solid #f0f0f0;
}

.save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f3ff 100%);
  border: 2px solid #e3e8ff;
  border-radius: 10px;
  flex-wrap: wrap;
}

.save-bar-info {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.save-bar-info span {
  font-weight: 700;
  color: #667eea;
}

.save-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.group-name-input {
  padding: 8px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  width: 220px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.group-name-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.group-name-input::placeholder {
  color: #bbb;
}

.btn-save-db {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* ====== BOTÃO DANGER ====== */
.btn-danger {
  background: #dc3545;
  color: white;
  border: none;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #c82333;
}

/* ====== BARRA DO GRUPO ABERTO ====== */
.active-group-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.group-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  flex-wrap: wrap;
}

.group-bar-info i {
  font-size: 16px;
  opacity: 0.9;
}

.group-bar-info strong {
  font-size: 15px;
}

.group-bar-count {
  opacity: 0.85;
  font-size: 13px;
}

.group-bar-actions {
  display: flex;
  gap: 8px;
}

.group-bar-actions .btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.group-bar-actions .btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 480px) {
  .active-group-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .group-bar-actions {
    justify-content: flex-end;
  }
}

/* ====== AJUSTES GERAIS ====== */
.btn-sm {
  padding: 6px 12px;
  font-size: 14px;
}

.btn i {
  margin-right: 4px;
}

/* Toolbar e ações de cards são exibidos em ambos os modos (gerador e conferidor) */
/* Regras antigas removidas - seleção/exclusão agora disponível em ambos os modos */
}

/* Esconder botão salvar geração no modo conferidor (já tem fluxo próprio) */
.mode-conferidor .btn-save-generation {
  display: none !important;
}