/* SENIAT Receptor — superficies de negocio sobre el shell Atlas */

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

.kpi {
  background: var(--edith-primary-soft);
  border-radius: 16px;
  padding: 0.95rem 1.05rem;
  box-shadow: 0 2px 10px var(--edith-shadow);
}

.kpi .label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--edith-text-muted);
}

.kpi .value {
  margin-top: 0.25rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--edith-menu-active-text);
}

.table-wrap { overflow: auto; margin-top: 0.75rem; }
table.data-table,
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--edith-border);
  white-space: nowrap;
}
.table-wrap th {
  color: var(--edith-text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: var(--edith-menu-hover); }

.badge-ok { background: rgba(0, 137, 123, 0.16); color: #0b7a4b; }
.badge-bad { background: rgba(180, 35, 24, 0.12); color: #b42318; }
html[data-theme='dark'] .badge-ok { color: #4db6ac; }
html[data-theme='dark'] .badge-bad { color: #ff8a80; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0 0.4rem;
}
.filters .field-input,
.filters .field-select {
  width: auto;
  min-width: 10rem;
  min-height: 44px;
  margin-bottom: 0;
}

.audit-detail {
  white-space: normal;
  max-width: 22rem;
  font-size: 0.82rem;
  color: var(--edith-text-muted);
}

.btn.is-busy,
.btn:disabled {
  opacity: 0.72;
  cursor: wait;
  pointer-events: none;
}

.btn.is-busy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-spinner {
  width: 0.95em;
  height: 0.95em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.action-progress {
  margin-top: 0.7rem;
  max-width: 26rem;
}

.action-progress.hidden {
  display: none;
}

.action-progress-track {
  height: 7px;
  border-radius: 99px;
  background: var(--edith-border);
  overflow: hidden;
}

.action-progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #00568e;
  transition: width 0.18s ease;
}

html[data-theme='dark'] .action-progress-fill {
  background: #4db6ac;
}

.dl {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.4rem 0.85rem;
  margin: 1rem 0;
}
.dl dt { color: var(--edith-text-muted); font-weight: 600; }
.dl dd { margin: 0; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.err-list { margin: 0; padding-left: 1.15rem; }
.err-list li { margin: 0.35rem 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.detail-back { margin: 0 0 0.85rem; }
.detail-back .btn { text-decoration: none; }
.alert {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
  margin: 0.5rem 0;
}

.login-sudeban-logo {
  width: min(280px, 72vw);
  height: auto;
  max-height: 88px;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  box-shadow: none;
}

.header-sudeban-logo,
.sidebar-sudeban-logo {
  width: auto !important;
  height: 36px !important;
  max-width: 148px;
  border-radius: 0 !important;
  object-fit: contain !important;
  background: transparent !important;
  box-shadow: none !important;
  flex-shrink: 0;
}

.sidebar-brand:has(.sidebar-sudeban-logo) {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.sidebar-sudeban-logo {
  width: 100% !important;
  height: auto !important;
  max-width: 220px;
  max-height: 56px;
}

.sidebar-sudeban-logo--dark {
  display: none !important;
}

html[data-theme='dark'] .sidebar-sudeban-logo--light {
  display: none !important;
}

html[data-theme='dark'] .sidebar-sudeban-logo--dark {
  display: block !important;
}

.bank-cell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.bank-logo,
.bank-logo--placeholder {
  width: 40px;
  height: 40px;
  border-radius: 0;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
}

.bank-logo--placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: #fff;
  background: #0c2744;
}

.bank-logo-cell {
  width: 48px;
}

.family-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.75rem;
}
.family-tab {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--edith-text-muted);
  border: 1px solid var(--edith-border);
  font-weight: 600;
  font-size: 0.85rem;
}
.family-tab.active {
  background: var(--edith-primary-soft);
  color: var(--edith-menu-active-text);
  border-color: transparent;
}
.hash-compare {
  display: grid;
  gap: 0.35rem;
}
.hash-compare code {
  display: block;
  font-size: 0.78rem;
  word-break: break-all;
  margin-top: 0.1rem;
}
.hash-compare.hash-ok code { color: #0b7a4b; }
.hash-compare.hash-bad code { color: #b42318; }
.manifest-json {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: var(--edith-primary-soft);
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.45;
}

.period-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
}

.period-picker-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8.5rem;
}

.period-picker-field span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--edith-text-muted);
}

.period-picker .field-select {
  margin-bottom: 0;
  min-width: 9rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--edith-text-muted);
  margin-bottom: 0.3rem;
}

details.m3-surface > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--edith-menu-active-text);
}

.user-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

tr.row-muted {
  opacity: 0.65;
}

@media (max-width: 800px) {
  .dl { grid-template-columns: 1fr; }
}
