/* =========================================================================
   ParkeoPlatform — Sistema de diseño "Torre de Control" (tema claro)
   Dirección: panel operativo de monitoreo, no landing page.
   Paleta evoca señalización vial e infraestructura de control de acceso.
   ========================================================================= */

:root {
  /* --- Color --- */
  --bg-base: #f4f5f7;          /* fondo principal, gris muy claro con tinte azulado */
  --bg-panel: #ffffff;         /* paneles / tarjetas */
  --bg-panel-raised: #f0f1f4;  /* paneles elevados / hover */
  --bg-input: #fbfbfc;

  --border-subtle: #e3e5ea;
  --border-strong: #c9cdd6;

  --text-primary: #1a1d23;
  --text-secondary: #5b6270;
  --text-tertiary: #8b919c;

  --accent: #e06a00;           /* ámbar de señalización vial, ajustado para contraste en fondo claro */
  --accent-dim: #b85700;
  --accent-bg: rgba(224, 106, 0, 0.10);

  --status-pendiente: #6b7280;
  --status-pendiente-bg: rgba(107, 114, 128, 0.10);

  --status-procesando: #1c7ed6;
  --status-procesando-bg: rgba(28, 126, 214, 0.10);

  --status-completado: #1f9d63;
  --status-completado-bg: rgba(31, 157, 99, 0.10);

  --status-error: #e0383d;
  --status-error-bg: rgba(224, 56, 61, 0.10);

  --status-advertencia: #d68a00;
  --status-advertencia-bg: rgba(214, 138, 0, 0.12);

  /* --- Tipografía --- */
  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  /* --- Layout --- */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --sidebar-width: 248px;
  --shadow-panel: 0 1px 2px rgba(20, 22, 26, 0.04), 0 6px 16px rgba(20, 22, 26, 0.06);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-base);
  background-image:
    linear-gradient(180deg, rgba(255, 138, 30, 0.04) 0%, transparent 280px);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

::selection {
  background: var(--accent);
  color: #1a1205;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================= Layout shell ============================= */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 20px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 22px 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.app-brand__mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: #1a1205;
  flex-shrink: 0;
}

.app-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
}

.app-brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 12px;
}

.app-nav__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 14px 10px 6px 10px;
}

.app-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.app-nav__link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

.app-nav__link:hover {
  background: var(--bg-panel-raised);
  color: var(--text-primary);
}

.app-nav__link.is-active {
  background: var(--accent-bg);
  color: var(--accent);
}

.app-nav__link.is-active svg {
  opacity: 1;
}

.app-sidebar__footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.app-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.app-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.app-user__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.app-user__role {
  font-size: 11px;
  color: var(--text-tertiary);
}

.btn-logout {
  width: 100%;
  margin-top: 8px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 12.5px;
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.btn-logout:hover {
  border-color: var(--status-error);
  color: var(--status-error);
}

.app-main {
  flex: 1;
  min-width: 0;
  padding: 28px 36px 60px 36px;
}

.app-topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.app-topbar__title {
  font-size: 22px;
}

.app-topbar__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ============================== Componentes ============================== */

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.panel--pad {
  padding: 22px 24px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 920px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: var(--stat-color, var(--accent));
}

.stat-card__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}

.stat-card__hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* --- Badges de estado --- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge--pendiente { background: var(--status-pendiente-bg); color: var(--status-pendiente); }
.badge--procesando { background: var(--status-procesando-bg); color: var(--status-procesando); }
.badge--completado { background: var(--status-completado-bg); color: var(--status-completado); }
.badge--con-errores { background: var(--status-advertencia-bg); color: var(--status-advertencia); }
.badge--fallido { background: var(--status-error-bg); color: var(--status-error); }

.badge--procesando::before {
  animation: pulse-dot 1.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Formularios --- */

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: var(--text-primary);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239aa3af' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .form-row { grid-template-columns: 1fr; }
}

.field-error {
  color: var(--status-error);
  font-size: 12px;
  margin-top: 6px;
}

.validation-summary {
  background: var(--status-error-bg);
  border: 1px solid rgba(255, 93, 93, 0.35);
  color: var(--status-error);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.validation-summary ul {
  margin: 0;
  padding-left: 18px;
}

/* --- Dropzone de carga --- */

.dropzone {
    display: block; /* ← label es inline por defecto, esto lo convierte en bloque */
    width: 100%; /* ← ocupa todo el ancho del form-group padre */
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    padding: 36px 24px;
    text-align: center;
    background: var(--bg-input);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    position: relative;
}

.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--accent-bg);
  position: relative;
}

.dropzone__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px auto;
  color: var(--text-tertiary);
}

.dropzone.is-dragover .dropzone__icon {
  color: var(--accent);
}

.dropzone__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone__hint {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.dropzone__filename {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  display: none;
}

.dropzone__filename.is-visible {
  display: block;
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* --- Botones --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  border: 1px solid transparent;
  cursor: pointer;
  transition: filter 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn-primary {
  background: var(--accent);
  color: #1a1205;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 12.5px;
}

/* --- Tabla de archivos --- */

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
  padding: 0 14px 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background-color 0.1s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-panel-raised);
}

.cell-file {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cell-file__name {
  font-weight: 500;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.cell-file__size {
  font-size: 11.5px;
  color: var(--text-tertiary);
}

.cell-muted {
  color: var(--text-secondary);
}

.cell-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.progress-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 110px;
}

.progress-cell__numbers {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.progress-cell__numbers .err {
  color: var(--status-error);
}

/* --- Filtros --- */

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 190px;
}

.filter-bar__clear {
  font-size: 12.5px;
  color: var(--text-tertiary);
  padding-bottom: 11px;
}

.filter-bar__clear:hover {
  color: var(--accent);
}

/* --- Alertas / mensajes flash --- */

.alert {
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-success {
  background: var(--status-completado-bg);
  border: 1px solid rgba(31, 157, 99, 0.3);
  color: var(--status-completado);
}

.alert-error {
  background: var(--status-error-bg);
  border: 1px solid rgba(224, 56, 61, 0.3);
  color: var(--status-error);
}

/* --- Estado vacío --- */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.empty-state__hint {
  font-size: 13px;
}

/* --- Login --- */

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  background-image:
    radial-gradient(circle at 50% 0%, rgba(224, 106, 0, 0.08), transparent 55%),
    repeating-linear-gradient(135deg, rgba(0,0,0,0.012) 0px, rgba(0,0,0,0.012) 1px, transparent 1px, transparent 18px);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 32px 30px 32px;
  box-shadow: var(--shadow-panel);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand__mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: #1a1205;
}

.login-brand__name {
  font-size: 16.5px;
  font-family: var(--font-display);
  font-weight: 600;
}

.login-brand__sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.login-card h1 {
  font-size: 19px;
  margin-bottom: 4px;
}

.login-card__lead {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 24px;
}

.login-footnote {
  margin-top: 20px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* --- Section headers --- */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-header h2 {
  font-size: 16px;
}

.section-header__hint {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

/* ── Upload overlay ─────────────────────────────────────── */

.upload-overlay__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 100;
}

.upload-overlay__card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 36px 40px;
    text-align: center;
    min-width: 280px;
}

.upload-overlay__title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-overlay__hint {
    font-size: 12.5px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

/* Spinner animado */
.upload-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px auto;
    position: relative;
}

.upload-spinner__ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

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

/* ── Error popup ─────────────────────────────────────────── */

.error-popup__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 200;
}

.error-popup__card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    padding: 36px 40px;
    text-align: center;
    max-width: 420px;
    width: 90%;
}

.error-popup__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 18px auto;
    color: var(--status-error);
}

    .error-popup__icon svg {
        width: 100%;
        height: 100%;
    }

.error-popup__title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.error-popup__msg {
    font-size: 13.5px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* ── Modal ───────────────────────────────────────────────── */

.modal__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    z-index: 200;
}

.modal__card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 201;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-panel);
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 32px;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal__title {
    font-size: 16px;
    font-family: var(--font-display);
    font-weight: 600;
}

.modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.12s ease;
}

    .modal__close:hover {
        color: var(--text-primary);
    }

    .modal__close svg {
        width: 18px;
        height: 18px;
    }

.modal__loading {
    display: flex;
    justify-content: center;
    padding: 40px 0;
}

.modal__error {
    text-align: center;
    color: var(--status-error);
    padding: 32px 0;
    font-size: 13.5px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

/* ── Grilla de detalle contable ──────────────────────────── */

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.detalle-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detalle-item__label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.detalle-item__value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.detalle-item__value--mono {
    font-family: var(--font-mono);
    font-size: 13.5px;
    color: var(--accent);
}
/* ── Tabla de líneas contables en modal ──────────────────── */

.data-table tfoot td {
    border-top: 1px solid var(--border-strong);
    border-bottom: none;
}

.totales-row td {
    background: var(--bg-panel-raised);
}

.badge--estado {
    background: var(--status-pendiente-bg);
    color: var(--text-secondary);
}

    .badge--estado[data-estado="Aprobado"] {
        background: var(--status-procesando-bg);
        color: var(--status-procesando);
    }

    .badge--estado[data-estado="Contabilizado"] {
        background: var(--status-completado-bg);
        color: var(--status-completado);
    }

    .badge--estado[data-estado="Rechazado"] {
        background: var(--status-error-bg);
        color: var(--status-error);
    }

    .badge--estado[data-estado="Cargado"] {
        background: var(--status-advertencia-bg);
        color: var(--status-advertencia);
    }











/* ── Dashboard ───────────────────────────────────────────── */

.dash-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.dash-legend__item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.dash-legend__dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Colores de badge por estado — solo CSS, sin lógica en C# */
.badge-cargado {
    background: var(--status-advertencia-bg);
    color: var(--status-advertencia);
}

.badge-aprobado {
    background: var(--status-procesando-bg);
    color: var(--status-procesando);
}

.badge-contabilizado {
    background: var(--status-completado-bg);
    color: var(--status-completado);
}

.badge-rechazado {
    background: var(--status-error-bg);
    color: var(--status-error);
}

.badge-pendiente {
    background: var(--status-pendiente-bg);
    color: var(--status-pendiente);
}






/* ── Admin cards ─────────────────────────────────────────── */

.admin-section-label {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 10px;
}

@media (max-width: 860px) {
    .admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    transition: border-color .12s ease, box-shadow .12s ease;
}

    .admin-card:hover {
        border-color: var(--border-strong);
        box-shadow: 0 2px 8px rgba(0,0,0,.06);
    }

.admin-card--featured {
    border-color: var(--accent);
}

.admin-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

    .admin-card__icon svg {
        width: 20px;
        height: 20px;
    }

.admin-card__title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.admin-card__desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.55;
}

.admin-card__badge {
    display: inline-flex;
    margin-top: 10px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.admin-card__badge--blue {
    background: var(--status-procesando-bg);
    color: var(--status-procesando);
}

.admin-card__badge--green {
    background: var(--status-completado-bg);
    color: var(--status-completado);
}

.admin-card__badge--amber {
    background: var(--status-advertencia-bg);
    color: var(--status-advertencia);
}

/* ── Acciones rápidas ────────────────────────────────────── */

.admin-quick-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 860px) {
    .admin-quick-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background-color .12s ease, border-color .12s ease;
}

    .admin-quick-card:hover {
        background: var(--bg-panel-raised);
        border-color: var(--border-strong);
        color: var(--text-primary);
    }

    .admin-quick-card svg {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        color: var(--text-tertiary);
    }

.admin-quick-card__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.admin-quick-card__sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}