/**
 * SIRE (compras / ventas) — capa visual
 */
/* Título de página (h4): un solo bloque SIRE | tipo | empresa — texto oscuro */
.sire-page-heading-part {
  color: #1a2332;
  font-weight: 700;
}

.sire-crumb-sep {
  color: #5c6673;
  font-weight: 500;
}

.container-xxl.flex-grow-1.container-p-y > h4.fw-bold:has(+ .sire-page) {
  color: #1a2332;
}

.sire-page {
  --sire-accent: #696cff;
  --sire-accent-soft: rgba(105, 108, 255, 0.12);
  --sire-success: #71dd37;
  --sire-surface: #fff;
  --sire-border: rgba(67, 89, 113, 0.12);
  --sire-text: #2b3545;
  --sire-text-secondary: #4a5568;
  --sire-text-soft: #5c6b7a;
  max-width: 1200px;
  margin: 0 auto;
  color: var(--sire-text);
}

/* Textos de ayuda (sustituye text-muted en esta vista) */
.sire-page .sire-help-text,
.sire-help-text {
  color: #4a5568 !important;
  font-weight: 500;
}

.sire-block-heading {
  color: #1a2332 !important;
}

.sire-icon-secondary {
  color: var(--sire-text-soft);
  opacity: 0.95;
}

/* Periodo */
.sire-period-card {
  border: 1px solid var(--sire-border);
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.25rem rgba(67, 89, 113, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
}

.sire-period-card:hover {
  box-shadow: 0 0.25rem 1rem rgba(105, 108, 255, 0.08);
  border-color: rgba(105, 108, 255, 0.25);
}

.sire-period-card .card-body {
  padding: 1.25rem;
}

.sire-field-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #5c6b7a;
  margin-bottom: 0.5rem;
}

.sire-field-label i {
  font-size: 1.1rem;
  color: var(--sire-accent);
}

.sire-period-card .form-floating > label {
  color: #5c6b7a;
}

.sire-period-card .form-select {
  border-radius: 0.5rem;
  min-height: 3rem;
}

/* Tickets & archivos */
.sire-panel {
  border: 1px solid var(--sire-border);
  border-radius: 0.875rem;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--sire-surface);
  box-shadow: 0 0.125rem 0.25rem rgba(67, 89, 113, 0.04);
}

.sire-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
  border-bottom: 1px solid var(--sire-border);
}

.sire-panel-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sire-panel-title i {
  color: var(--sire-accent);
  font-size: 1.25rem;
}

.sire-panel-body {
  padding: 1rem 1.25rem;
  min-height: 3.5rem;
}

.sire-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  margin: 0 -1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border: none;
  background: transparent;
  width: calc(100% + 2rem);
  text-align: left;
  color: #2b3545;
  font-size: 0.875rem;
  font-weight: 500;
}

.sire-file-row:hover {
  background: var(--sire-accent-soft);
  color: var(--sire-accent);
}

.sire-file-row i.bx {
  font-size: 1.35rem;
  opacity: 0.85;
}

.sire-empty-hint {
  font-size: 0.8125rem;
  color: #4a5568;
  margin: 0;
  padding: 0.5rem 0;
  font-weight: 500;
}

/* Generar ticket */
.sire-btn-ticket {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.45rem 1rem;
  border-radius: 2rem;
  border: none;
  background: var(--sire-accent);
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(105, 108, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sire-btn-ticket:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.4);
  color: #fff !important;
}

/* Comprobantes block */
.sire-block-comprobantes {
  margin-top: 0.5rem;
}

.sire-block-header {
  margin-bottom: 1rem;
}

.sire-block-header h2 {
  color: #1f2937;
}

.sire-btn-ver {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.25);
}

.sire-btn-ver i {
  font-size: 1.15rem;
}

/* Toolbar export (inyectada por JS) */
.sire-toolbar {
  border: 1px solid var(--sire-border) !important;
  border-radius: 0.75rem !important;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 100%) !important;
}

.sire-toolbar .btn {
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.45rem 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.sire-toolbar .btn i {
  font-size: 1rem;
}

.sire-progress-card {
  border: 1px dashed rgba(105, 108, 255, 0.35) !important;
  border-radius: 0.75rem !important;
  background: rgba(105, 108, 255, 0.04) !important;
}

.sire-progress-card .progress {
  border-radius: 50rem;
  overflow: hidden;
  background: rgba(105, 108, 255, 0.1);
}

.sire-progress-card .sire-export-stats {
  line-height: 1.45;
  color: #4a5568;
}

/* Tablas listado / export */
.sirecompro .table,
.sirecompro-lista .table {
  font-size: 0.8125rem;
}

.sirecompro .table thead th,
.sirecompro-lista .table thead th {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  color: #4a5568;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.sirecompro .table tbody td,
.sirecompro-lista .table tbody td {
  vertical-align: middle;
  padding: 0.55rem 0.65rem;
}

.sirecompro .viewCpe,
.sirecompro-lista .viewCpe {
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.35rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.sirecompro .viewCpe:hover,
.sirecompro-lista .viewCpe:hover {
  background: var(--sire-accent-soft);
  color: var(--sire-accent) !important;
}

.sirecompro .loadpage,
.sirecompro-lista .loadpage {
  cursor: pointer;
  padding: 0.35rem 0.65rem;
  margin: 0 0.15rem;
  border-radius: 0.35rem;
  font-weight: 600;
  color: var(--sire-accent);
  transition: background 0.15s ease;
}

.sirecompro .loadpage:hover,
.sirecompro-lista .loadpage:hover {
  background: var(--sire-accent-soft);
}

/* Modal comprobante */
.sire-modal-cpe .modal-content {
  border: none;
  border-radius: 0.875rem;
  overflow: hidden;
  box-shadow: 0 1rem 3rem rgba(67, 89, 113, 0.18);
}

.sire-modal-cpe .modal-header {
  background: linear-gradient(180deg, #f5f5f9 0%, #fff 100%);
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--sire-border);
}

.sire-modal-cpe .modal-header .btn-close {
  opacity: 0.65;
}

.sire-modal-cpe .modal-footer {
  border-top: 1px solid var(--sire-border);
  background: #f8f9fa;
}

.sire-modal-cpe .card-footer .btn {
  border-radius: 0.5rem;
  font-weight: 500;
}

@media (max-width: 575.98px) {
  .sire-page-heading-part {
    display: inline-block;
    max-width: 100%;
  }
}
