/* Configurações de Séries de Documentos e Impostos */

/* Séries de Documentos */
.series-management {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.series-list-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.series-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.series-list-header h3 {
  margin: 0;
  color: #495057;
  font-size: 1.25rem;
  font-weight: 600;
}

.series-list {
  padding: 0;
}

.series-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.series-item:hover {
  background-color: #f8f9fa;
}

.series-item:last-child {
  border-bottom: none;
}

.series-info {
  flex: 1;
}

.series-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
}

.series-details {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.series-status {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.status-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.active {
  background-color: #d4edda;
  color: #155724;
}

.status-badge.inactive {
  background-color: #f8d7da;
  color: #721c24;
}

.status-badge.default {
  background-color: #d1ecf1;
  color: #0c5460;
}

.series-actions {
  display: flex;
  gap: 0.5rem;
}

.series-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Formulário de Séries */
.series-form-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.form-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.form-tab {
  flex: 1;
  padding: 1rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
}

.form-tab:hover {
  background-color: #e9ecef;
  color: #495057;
}

.form-tab.active {
  color: #007bff;
  border-bottom-color: #007bff;
  background-color: #fff;
}

.form-tab-content {
  display: none;
  padding: 1.5rem;
}

.form-tab-content.active {
  display: block;
}

.numbers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.number-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.number-field label {
  font-weight: 500;
  color: #495057;
  font-size: 0.875rem;
}

.number-field input {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
}

/* Prefixes Grid Styles */
.prefixes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.prefix-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.prefix-field label {
  font-weight: 500;
  color: #495057;
  font-size: 0.875rem;
}

.prefix-field input {
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.prefix-field input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.prefix-field input::placeholder {
  text-transform: none;
}

.vat-regime-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.help-link {
  color: #007bff;
  text-decoration: none;
  font-size: 0.875rem;
}

.help-link:hover {
  text-decoration: underline;
}

.template-actions {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
}

.template-actions a {
  color: #007bff;
  text-decoration: none;
  font-size: 0.875rem;
}

.template-actions a:hover {
  text-decoration: underline;
}

/* Impostos e Taxas */
.taxes-management {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.taxes-list-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.taxes-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
}

.taxes-list-header h3 {
  margin: 0;
  color: #495057;
  font-size: 1.25rem;
  font-weight: 600;
}

.taxes-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.taxes-list {
  padding: 0;
}

.tax-item {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.tax-item:hover {
  background-color: #f8f9fa;
}

.tax-item:last-child {
  border-bottom: none;
}

.tax-checkbox {
  margin-right: 1rem;
}

.tax-info {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.tax-title {
  font-weight: 600;
  color: #212529;
}

.tax-type {
  color: #6c757d;
  font-size: 0.875rem;
}

.tax-value {
  font-weight: 500;
  color: #495057;
}

.tax-default {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.tax-default .badge {
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.tax-default .badge.yes {
  background-color: #d4edda;
  color: #155724;
}

.tax-default .badge.no {
  background-color: #f8d7da;
  color: #721c24;
}

.tax-zone {
  color: #6c757d;
  font-size: 0.875rem;
}

.tax-visibility {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tax-visibility i {
  color: #6c757d;
  font-size: 1rem;
}

.tax-visibility i.fa-eye-slash {
  color: #dc3545;
}

.tax-actions {
  display: flex;
  gap: 0.5rem;
}

.tax-actions .btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

/* Formulário de Impostos */
.tax-form-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.help-icon {
  color: #6c757d;
  margin-left: 0.5rem;
  cursor: help;
}

.help-icon:hover {
  color: #007bff;
}

/* Alertas */
.alert {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.alert i {
  font-size: 1rem;
}

/* Responsividade */
@media (max-width: 768px) {
  .series-list-header,
  .taxes-list-header {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .taxes-actions {
    justify-content: center;
  }

  .tax-info {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .numbers-grid {
    grid-template-columns: 1fr;
  }

  .form-tabs {
    flex-direction: column;
  }

  .form-tab {
    text-align: left;
  }
}

/* Dark mode support */
[data-theme="dark"] .series-list-container,
[data-theme="dark"] .series-form-container,
[data-theme="dark"] .taxes-list-container,
[data-theme="dark"] .tax-form-container {
  background: #2a2d3a !important;
  color: #fff !important;
}

[data-theme="dark"] .series-list-header,
[data-theme="dark"] .taxes-list-header {
  background: #181a20 !important;
  border-bottom-color: #3a3d4a !important;
}

[data-theme="dark"] .series-item,
[data-theme="dark"] .tax-item {
  border-bottom-color: #3a3d4a !important;
}

[data-theme="dark"] .series-item:hover,
[data-theme="dark"] .tax-item:hover {
  background-color: #181a20 !important;
}

[data-theme="dark"] .form-tabs {
  background: #181a20 !important;
  border-bottom-color: #3a3d4a !important;
}

[data-theme="dark"] .form-tab {
  color: #adb5bd !important;
}

[data-theme="dark"] .form-tab:hover {
  background-color: #2a2d3a !important;
  color: #fff !important;
}

[data-theme="dark"] .form-tab.active {
  color: #60a5fa !important;
  background-color: #2a2d3a !important;
}

[data-theme="dark"] .series-name,
[data-theme="dark"] .tax-title {
  color: #fff !important;
}

[data-theme="dark"] .series-details,
[data-theme="dark"] .tax-type,
[data-theme="dark"] .tax-zone {
  color: #adb5bd !important;
}

[data-theme="dark"] .number-field input {
  background: #181a20 !important;
  color: #fff !important;
  border-color: #3a3d4a !important;
}

[data-theme="dark"] .prefix-field input {
  background: #181a20 !important;
  color: #fff !important;
  border-color: #3a3d4a !important;
}

[data-theme="dark"] .help-icon {
  color: #adb5bd !important;
}

[data-theme="dark"] .help-icon:hover {
  color: #60a5fa !important;
}

/* Financial Settings Styles */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: #495057;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
  width: auto;
  opacity: 0;
  position: absolute;
  pointer-events: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid #ced4da;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background-color: #007bff;
  border-color: #007bff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '✓';
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.form-help {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 0.25rem;
  display: block;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-info i {
  font-size: 1rem;
}

/* Dark mode for financial settings */
[data-theme="dark"] .checkbox-label {
  color: #adb5bd !important;
}

[data-theme="dark"] .checkmark {
  border-color: #3a3d4a !important;
}

[data-theme="dark"] .checkbox-label input[type="checkbox"]:checked + .checkmark {
  background-color: #60a5fa !important;
  border-color: #60a5fa !important;
}

[data-theme="dark"] .form-help {
  color: #adb5bd !important;
}

[data-theme="dark"] .alert-info {
  background-color: #1a2332 !important;
  border-color: #2a3d4a !important;
  color: #60a5fa !important;
}
