﻿/* =====================================================
   RESET / BASE
===================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --vc-bg: #eef4f8;
  --vc-surface: rgba(255, 255, 255, 0.9);
  --vc-surface-strong: #ffffff;
  --vc-border: #d7e3ef;
  --vc-border-strong: #c1d1df;
  --vc-text: #132238;
  --vc-text-muted: #5c6b80;
  --vc-primary: #1d4ed8;
  --vc-primary-strong: #1e3a8a;
  --vc-secondary: #e8f0ff;
  --vc-secondary-strong: #d9e7ff;
  --vc-secondary-text: #1e3a8a;
  --vc-danger: #dc2626;
  --vc-danger-strong: #b91c1c;
  --vc-success: #0f9f6e;
  --vc-success-strong: #0b7c58;
  --vc-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.08);
  --vc-shadow-medium: 0 18px 44px rgba(15, 23, 42, 0.12);
  --vc-radius-sm: 8px;
  --vc-radius-md: 16px;
  --vc-radius-lg: 22px;
  --vc-topbar-height: 58px;
}

body {
  margin: 0;
  font-family: "Segoe UI Variable", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.07), transparent 24%),
    linear-gradient(180deg, #f8fbfd 0%, var(--vc-bg) 100%);
  color: var(--vc-text);
  text-rendering: optimizeLegibility;
}

/* =====================================================
   LOGIN
===================================================== */

html:has(body.login-page) {
  min-height: 100%;
  background: #081222;
}

body.login-page {
  min-height: 100vh;
  background:
    radial-gradient(680px circle at 12% 8%, rgba(37, 99, 235, 0.32), transparent 60%),
    radial-gradient(620px circle at 88% 82%, rgba(14, 165, 233, 0.22), transparent 58%),
    radial-gradient(900px circle at 50% 100%, rgba(29, 78, 216, 0.16), transparent 65%),
    linear-gradient(160deg, #060d1a 0%, #0a1526 46%, #081222 100%);
}

body.login-page .content {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login-page .layout,
body.login-page .sidebar,
body.login-page .topbar {
  display: none !important;
}

body.login-page #login-vue-app {
  display: none;
  width: auto;
  max-width: 100%;
}

body.login-page.login-vue-ready #login-vue-app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(18px, 4vw, 42px) clamp(14px, 3vw, 32px);
  box-sizing: border-box;
}

body.login-page .login-legacy-fallback {
  /* Oculto siempre por defecto para evitar el parpadeo del formulario plano
     mientras Vue termina de montar. Cada template lo reactiva solo dentro
     de un <noscript>, para el caso real de JS deshabilitado. */
  display: none;
}

body.login-page #password-reset-vue-app {
  display: none;
  width: auto;
  max-width: 100%;
}

body.login-page.login-vue-ready #password-reset-vue-app {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100dvh;
  padding: clamp(18px, 4vw, 42px) clamp(14px, 3vw, 32px);
  box-sizing: border-box;
}

/* =====================================================
   LOGIN CARD
===================================================== */

.login-wrapper {
  width: 100%;
  max-width: 520px;
  padding: 20px;
  margin: 0 auto;
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-brand__logo {
  display: block;
  width: min(420px, 92vw);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(15, 23, 42, 0.24));
}

.login-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  max-width: 400px;
  margin: 0 auto;
}

.login-card h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #0f172a;
}

.alert {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
}

.login-help-text {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.login-back-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.login-back-link:hover {
  text-decoration: underline;
}

.login-back-link + .login-back-link {
  margin-top: 8px;
}

/* =====================================================
   FORMULARIOS
===================================================== */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: var(--vc-radius-sm);
  border: 1px solid var(--vc-border-strong);
  font-size: 13px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  color: var(--vc-text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--vc-border-strong);
  box-shadow: none;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="date"] {
  min-height: 44px;
  line-height: 1.2;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-right: 40px;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="date"]::-webkit-datetime-edit,
input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  margin: 0;
  padding: 0;
  opacity: 0.8;
  cursor: pointer;
}

/* Keep login inputs legible even when global dark color-scheme is active. */
body.login-page .login-card input,
body.login-page .login-card select {
  background-color: #ffffff;
  color: #0f172a;
  caret-color: #0f172a;
}

body.login-page .login-card input::placeholder,
body.login-page .login-card textarea::placeholder {
  color: #64748b;
}

body.login-page .login-card input:-webkit-autofill,
body.login-page .login-card input:-webkit-autofill:hover,
body.login-page .login-card input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 9999s ease-out 0s;
}

@media (max-width: 520px) {
  body.login-page .content {
    padding: 16px 12px;
    align-items: center;
  }

  .login-wrapper {
    max-width: 100%;
    padding: 8px 0;
  }

  .login-brand {
    margin-bottom: 12px;
  }

  .login-brand__logo {
    width: min(320px, 88vw);
  }

  .login-card {
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .login-card h2 {
    margin-bottom: 16px;
    font-size: 1.4rem;
  }

  .login-card .btn-primary,
  .login-submit-btn {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }
}

/* =====================================================
   ANTIGUEDAD DE SALDOS
===================================================== */

.antiguedad-saldos-page.ec-page {
  min-height: 100%;
}

.antiguedad-saldos-page .estado-cuenta-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 680px) max-content;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 18px 20px;
}

.antiguedad-saldos-page .estado-cuenta-filter-block {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.antiguedad-saldos-page .estado-cuenta-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.antiguedad-saldos-page .estado-cuenta-provider-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 220px) minmax(180px, 220px) max-content max-content;
  gap: 14px;
  align-items: end;
  min-width: 0;
}

.antiguedad-saldos-page .estado-cuenta-card {
  margin-top: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.antiguedad-saldos-page .estado-cuenta-card--table {
  overflow: hidden;
}

.antiguedad-saldos-page .estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.antiguedad-saldos-page .estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-input__control {
  min-height: 42px;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #93c5fd;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field__overlay {
  opacity: 0 !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field__input {
  min-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field__field {
  align-items: center;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-select__selection {
  color: #0f172a;
}

/* =====================================================
   CONCILIACION BANCARIA
===================================================== */

.cb-page {
  min-height: 100%;
}

.cb-shell {
  display: grid;
  gap: 18px;
}

.cb-hero-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.cb-hero-meta__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.cb-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(191, 219, 254, 0.24);
  font-size: 12px;
  font-weight: 700;
}

.cb-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(180px, 220px) minmax(260px, 1.2fr) auto;
  gap: 14px;
  align-items: end;
}

.cb-file-field {
  min-width: 0;
}

.cb-file-field .v-input {
  min-width: 0;
}

.cb-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.cb-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cb-summary-card {
  padding: 18px 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #dbe7f3;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.cb-summary-card__title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cb-summary-card__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 13px;
  color: #475569;
}

.cb-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.cb-panel {
  overflow: hidden;
}

.cb-panel__title {
  padding-bottom: 0;
  font-size: 18px;
  font-weight: 800;
}

.cb-panel__filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.cb-panel__filters .vc-vue-form-field {
  min-width: 0;
}

.cb-toolbar-grid .vc-vue-form-field__label,
.cb-panel__filters .vc-vue-form-field__label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-toolbar-grid .v-input,
.cb-panel__filters .v-input {
  width: 100%;
  min-width: 0;
}

.cb-toolbar-grid .v-field,
.cb-panel__filters .v-field {
  --v-input-control-height: 44px;
  --v-field-padding-top: 0px;
  --v-field-padding-bottom: 0px;
  border-radius: 10px !important;
  background: #fff;
}

.cb-toolbar-grid .v-field__field,
.cb-panel__filters .v-field__field {
  align-items: center;
}

.cb-toolbar-grid .v-field__input,
.cb-panel__filters .v-field__input {
  min-height: 44px !important;
  padding-top: 0;
  padding-bottom: 0;
  align-items: center;
}

.cb-toolbar-grid .v-select .v-field__input,
.cb-toolbar-grid .v-autocomplete .v-field__input,
.cb-panel__filters .v-select .v-field__input,
.cb-panel__filters .v-autocomplete .v-field__input {
  padding-top: 0;
  padding-bottom: 0;
}

.cb-toolbar-grid .v-select .v-select__selection,
.cb-toolbar-grid .v-autocomplete .v-autocomplete__selection,
.cb-panel__filters .v-select .v-select__selection,
.cb-panel__filters .v-autocomplete .v-autocomplete__selection {
  align-items: center;
  margin-top: 0;
  margin-bottom: 0;
}

.cb-toolbar-grid .v-select .v-select__selection-text,
.cb-panel__filters .v-select .v-select__selection-text {
  display: inline-flex;
  align-items: center;
  min-height: 100%;
}

.cb-toolbar-grid .v-field__prepend-inner,
.cb-toolbar-grid .v-field__append-inner,
.cb-toolbar-grid .v-field__clearable,
.cb-panel__filters .v-field__prepend-inner,
.cb-panel__filters .v-field__append-inner,
.cb-panel__filters .v-field__clearable {
  align-self: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.cb-page .v-field input,
.cb-page .v-field select,
.cb-page .v-field textarea {
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.cb-panel__search-field {
  grid-column: span 2;
}

.cb-panel__filter-action {
  display: flex;
  align-items: end;
  min-width: 0;
}

.cb-panel__filter-action .v-btn {
  width: 100%;
}

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

.cb-row {
  cursor: pointer;
}

.cb-row--selected td {
  background: #dbeafe !important;
}

.cb-row--matched td {
  background: #ecfdf5;
}

.cb-match-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  border: 1px solid #dbe7f3;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.cb-match-bar__copy {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .cb-toolbar-grid,
  .cb-panel__filters,
  .cb-summary-grid,
  .cb-panels {
    grid-template-columns: 1fr;
  }

  .cb-hero-meta,
  .cb-match-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cb-toolbar__actions,
  .cb-hero-meta__chips {
    justify-content: flex-start;
  }
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select input {
  color: #0f172a;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field__append-inner,
.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select .v-input__details {
  display: none !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select--center .v-field__input {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-inline: 0 36px !important;
}

.antiguedad-saldos-page .estado-cuenta-vuetify-select--center .v-select__selection,
.antiguedad-saldos-page .estado-cuenta-vuetify-select--center .v-select__selection-text,
.antiguedad-saldos-page .estado-cuenta-vuetify-select--center input {
  width: calc(100% - 36px);
  margin: 0 auto;
  text-align: center;
  justify-content: center;
}

.antiguedad-saldos-page .estado-cuenta-toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.antiguedad-saldos-page .estado-cuenta-search-btn,
.antiguedad-saldos-page .estado-cuenta-clear-btn,
.antiguedad-saldos-page .estado-cuenta-action-btn {
  min-height: 42px;
  border-radius: 14px;
  text-transform: none;
  font-weight: 700;
}

.antiguedad-saldos-page .antiguedad-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.antiguedad-saldos-page .estado-cuenta-table-wrap {
  overflow: auto;
  padding: 16px 20px 20px;
}

.antiguedad-saldos-page .estado-cuenta-table {
  width: 100%;
  border-collapse: collapse;
}

.antiguedad-saldos-page .estado-cuenta-table th,
.antiguedad-saldos-page .estado-cuenta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.antiguedad-saldos-page .estado-cuenta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.antiguedad-saldos-page .estado-cuenta-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.antiguedad-saldos-page .estado-cuenta-total-row td {
  background: #f8fafc;
  font-weight: 700;
}

.antiguedad-saldos-page .antiguedad-table__total {
  font-weight: 700;
  color: #0f172a;
}

.antiguedad-saldos-page .estado-cuenta-pagination {
  padding: 0 20px 20px;
}

.antiguedad-saldos-page .ec-alert-wrap {
  padding: 18px 20px 0;
}

@media (max-width: 1100px) {
  .antiguedad-saldos-page .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .antiguedad-saldos-page .estado-cuenta-toolbar-buttons {
    justify-content: flex-start;
  }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .antiguedad-saldos-page .estado-cuenta-provider-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .antiguedad-saldos-page .estado-cuenta-date-row,
  .antiguedad-saldos-page .estado-cuenta-provider-row {
    grid-template-columns: 1fr;
  }

  .antiguedad-saldos-page .antiguedad-caption {
    flex-direction: column;
  }
}

/* =====================================================
   ESTADISTICA FRECUENCIA VENTAS
===================================================== */

.estadistica-frecuencia-page.ec-page {
  min-height: 100%;
}

.estadistica-frecuencia-page .estado-cuenta-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 680px) max-content;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 18px 20px;
}

.estadistica-frecuencia-page .estado-cuenta-filter-block {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.estadistica-frecuencia-page .estado-cuenta-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.estadistica-frecuencia-page .estado-cuenta-provider-row {
  display: grid;
  gap: 12px;
  align-items: end;
  min-width: 0;
}

.estadistica-frecuencia-page .estado-cuenta-provider-row--single {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) max-content max-content;
}

.estadistica-frecuencia-page .estado-cuenta-card {
  margin-top: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.estadistica-frecuencia-page .estado-cuenta-card--table {
  overflow: hidden;
}

.estadistica-frecuencia-page .estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.estadistica-frecuencia-page .estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-input__control {
  min-height: 42px;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #93c5fd;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field__overlay {
  opacity: 0 !important;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field__input {
  min-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field__field {
  align-items: center;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-select__selection {
  color: #0f172a;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select input {
  color: #0f172a;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field__append-inner,
.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.estadistica-frecuencia-page .estado-cuenta-vuetify-select .v-input__details {
  display: none !important;
}

.estadistica-frecuencia-page .estado-cuenta-toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.estadistica-frecuencia-page .estado-cuenta-search-btn,
.estadistica-frecuencia-page .estado-cuenta-clear-btn,
.estadistica-frecuencia-page .estado-cuenta-action-btn {
  min-height: 42px;
  border-radius: 14px;
  text-transform: none;
  font-weight: 700;
}

.estadistica-frecuencia-page .frecuencia-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}

.estadistica-frecuencia-page .frecuencia-summary-card {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.estadistica-frecuencia-page .frecuencia-summary-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.estadistica-frecuencia-page .frecuencia-summary-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.estadistica-frecuencia-page .estado-cuenta-table-wrap {
  overflow: auto;
  padding: 16px 20px 20px;
}

.estadistica-frecuencia-page .estado-cuenta-table {
  width: 100%;
  border-collapse: collapse;
}

.estadistica-frecuencia-page .estado-cuenta-table th,
.estadistica-frecuencia-page .estado-cuenta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.estadistica-frecuencia-page .estado-cuenta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.estadistica-frecuencia-page .estado-cuenta-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.estadistica-frecuencia-page .estado-cuenta-total-row td {
  background: #f8fafc;
  font-weight: 700;
}

.estadistica-frecuencia-page .estado-cuenta-pagination {
  padding: 0 20px 20px;
}

.estadistica-frecuencia-page .ec-alert-wrap {
  padding: 18px 20px 0;
}

@media (max-width: 1100px) {
  .estadistica-frecuencia-page .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .estadistica-frecuencia-page .estado-cuenta-toolbar-buttons {
    justify-content: flex-start;
  }

  .estadistica-frecuencia-page .frecuencia-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 721px) and (max-width: 1120px) {
  .estadistica-frecuencia-page .estado-cuenta-provider-row--single {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .estadistica-frecuencia-page .estado-cuenta-date-row,
  .estadistica-frecuencia-page .estado-cuenta-provider-row--single,
  .estadistica-frecuencia-page .frecuencia-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   RUTERO DE COBRANZA
===================================================== */

.rutero-cobranza-page.ec-page {
  min-height: 100%;
}

.rutero-cobranza-page .estado-cuenta-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 760px) max-content;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 18px 20px;
}

.rutero-cobranza-page .estado-cuenta-filter-block {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.rutero-cobranza-page .estado-cuenta-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rutero-cobranza-page .rutero-filters-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.rutero-cobranza-page .estado-cuenta-provider-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.rutero-cobranza-page .estado-cuenta-card {
  margin-top: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.rutero-cobranza-page .estado-cuenta-card--table {
  overflow: hidden;
}

.rutero-cobranza-page .estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.rutero-cobranza-page .estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-input__control {
  min-height: 42px;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #93c5fd;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field__overlay {
  opacity: 0 !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field__input {
  min-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field__field {
  align-items: center;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.rutero-cobranza-page .estado-cuenta-vuetify-select .v-select__selection {
  color: #0f172a;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select input {
  color: #0f172a;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field__append-inner,
.rutero-cobranza-page .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select .v-input__details {
  display: none !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select--center .v-field__input {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-inline: 0 36px !important;
}

.rutero-cobranza-page .estado-cuenta-vuetify-select--center .v-select__selection,
.rutero-cobranza-page .estado-cuenta-vuetify-select--center .v-select__selection-text,
.rutero-cobranza-page .estado-cuenta-vuetify-select--center input {
  width: calc(100% - 36px);
  margin: 0 auto;
  text-align: center;
  justify-content: center;
}

.rutero-cobranza-page .estado-cuenta-toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rutero-cobranza-page .estado-cuenta-search-btn,
.rutero-cobranza-page .estado-cuenta-clear-btn,
.rutero-cobranza-page .estado-cuenta-action-btn {
  min-height: 42px;
  border-radius: 14px;
  text-transform: none;
  font-weight: 700;
}

.rutero-cobranza-page .rutero-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 20px 0;
}

.rutero-cobranza-page .rutero-summary-card {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.rutero-cobranza-page .rutero-summary-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.rutero-cobranza-page .rutero-summary-card strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1;
}

.rutero-cobranza-page .estado-cuenta-table-wrap {
  overflow: auto;
  padding: 16px 20px 20px;
}

.rutero-cobranza-page .estado-cuenta-table {
  width: 100%;
  border-collapse: collapse;
}

.rutero-cobranza-page .estado-cuenta-table th,
.rutero-cobranza-page .estado-cuenta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.rutero-cobranza-page .estado-cuenta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rutero-cobranza-page .estado-cuenta-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.rutero-cobranza-page .estado-cuenta-total-row td {
  background: #f8fafc;
  font-weight: 700;
}

.rutero-cobranza-page .estado-cuenta-pagination {
  padding: 0 20px 20px;
}

.rutero-cobranza-page .ec-alert-wrap {
  padding: 18px 20px 0;
}

@media (max-width: 1100px) {
  .rutero-cobranza-page .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .rutero-cobranza-page .estado-cuenta-toolbar-buttons {
    justify-content: flex-start;
  }

  .rutero-cobranza-page .rutero-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rutero-cobranza-page .rutero-filters-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .rutero-cobranza-page .rutero-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rutero-cobranza-page .rutero-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .rutero-cobranza-page .estado-cuenta-date-row,
  .rutero-cobranza-page .rutero-filters-grid,
  .rutero-cobranza-page .rutero-summary-grid {
    grid-template-columns: 1fr;
  }

  .rutero-cobranza-page .estado-cuenta-provider-row {
    flex-direction: column;
    align-items: stretch;
  }
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2364748b' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 36px;
}

/* =====================================================
   BOTONES
===================================================== */

.btn-primary,
.btn-danger,
.page-btn,
.btn-logout,
.modal-close,
.modal-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-primary-strong));
  color: #ffffff !important;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.28);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited,
.btn-primary .btn-loading-text,
.btn-primary > span,
.btn-primary > i {
  color: #ffffff !important;
}

.support-widget-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px 10px 56px;
  min-height: 52px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  font-weight: 700;
  position: fixed;
  overflow: visible;
}

.support-widget-toggle-icon {
  position: absolute;
  left: -14px;
  top: 50%;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #1d4ed8;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16);
  flex: 0 0 46px;
  overflow: hidden;
  transform: translateY(-50%);
}

.support-widget-toggle-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.support-widget-toggle-label {
  white-space: nowrap;
}

.survey-bubble-toggle {
  position: fixed;
  /* Sits beside .support-widget-toggle (same bottom:24px row) instead of
     stacked above it, so the two floating widgets only ever occupy one
     ~48px-tall strip in the bottom-right corner instead of two. */
  right: 185px;
  bottom: 24px;
  z-index: 1199;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(29, 78, 216, 0.24);
  cursor: pointer;
  font-weight: 800;
}

.survey-bubble-toggle-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.survey-bubble-toggle-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.support-widget {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 1201;
  width: min(420px, calc(100vw - 28px));
}

.support-widget-card {
  border: 1px solid #d7e0ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.support-widget-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid #e6edf8;
}

.support-widget-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
}

.support-widget-head h3 {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}

.support-widget-close {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #d7e0ef;
  background: #f8fbff;
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.support-widget-context {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px 10px;
}

.support-widget-context-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.support-widget-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.support-widget-chip {
  border: 1px solid #c9d7ef;
  background: #f8fbff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.support-widget-messages {
  max-height: 390px;
  min-height: 240px;
  overflow-y: auto;
  padding: 0 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-widget-message {
  display: flex;
}

.support-widget-message-bot {
  justify-content: flex-start;
}

.support-widget-message-user {
  justify-content: flex-end;
}

.support-widget-message-user p,
.support-widget-response {
  margin: 0;
  border-radius: 18px;
  padding: 12px 14px;
  max-width: 92%;
}

.support-widget-message-user p {
  background: #2563eb;
  color: #fff;
}

.support-widget-response {
  position: relative;
  overflow: hidden;
  background: #f8fbff;
  border: 1px solid #dbe7fb;
  color: #0f172a;
}

.support-widget-response--welcome {
  min-height: 240px;
  padding: 18px 18px 16px;
}

.support-widget-response--thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.support-widget-thinking-dots {
  display: inline-flex;
  gap: 3px;
}

.support-widget-thinking-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: support-widget-thinking-bounce 1.1s infinite ease-in-out both;
}

.support-widget-thinking-dots span:nth-child(2) { animation-delay: 0.15s; }
.support-widget-thinking-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes support-widget-thinking-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.support-widget-response--ia .support-widget-ia-answer {
  margin: 0;
  white-space: pre-line;
  line-height: 1.5;
}

.support-widget-response--welcome strong,
.support-widget-response--welcome p,
.support-widget-response--welcome ul {
  position: relative;
  z-index: 1;
}

.support-widget-response__art {
  position: absolute;
  inset: auto -18px -18px auto;
  width: min(240px, 68%);
  height: min(240px, 68%);
  background: url("../images/conty.7bc0c071d0b5.png") center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
  z-index: 0;
  filter: saturate(0.95) contrast(1.02);
  transform: translate(12px, 10px);
}

.support-widget-response strong {
  display: block;
  margin-bottom: 6px;
}

.support-widget-response p {
  margin: 0 0 8px;
}

.support-widget-response ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.support-widget-response li + li {
  margin-top: 6px;
}

.support-widget-demo-intro {
  color: #92400e;
  font-weight: 700;
}

.support-widget-response--demo-tour {
  width: 100%;
  max-width: 100%;
}

.support-widget-demo-tour {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.support-widget-demo-tour__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1d4ed8;
}

.support-widget-demo-tour__meta {
  font-size: 13px;
  color: #1e3a8a;
}

.support-widget-demo-tour__tip {
  margin-bottom: 0;
  color: #475569;
}

.support-widget-demo-tour__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.support-widget-demo-tour__actions {
  display: inline-flex;
  gap: 8px;
}

.support-widget-chip[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.support-widget-form {
  display: flex;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid #e6edf8;
}

.support-widget-input {
  flex: 1;
}

.support-widget-submit {
  white-space: nowrap;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  background: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
  opacity: 0.72;
  box-shadow: none !important;
  transform: none !important;
}

.btn-primary:disabled:hover,
.btn-primary[disabled]:hover,
.btn-primary:disabled:active,
.btn-primary[disabled]:active {
  background: #cbd5e1 !important;
  color: #64748b !important;
  transform: none !important;
}

.btn-danger {
  background: linear-gradient(135deg, var(--vc-danger), var(--vc-danger-strong));
  color: #ffffff;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-danger:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

.modal-close,
.modal-close-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 11px;
  border-color: #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #e8eef8);
  color: #334155;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(148, 163, 184, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.modal-close:hover,
.modal-close-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f8fbff, #dce7f6);
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.22);
}

html[data-theme="dark"] .support-widget-card {
  background: #0f172a;
  border-color: #334155;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.56);
}

html[data-theme="dark"] .support-widget-head,
html[data-theme="dark"] .support-widget-form {
  border-color: #334155;
}

html[data-theme="dark"] .support-widget-head h3,
html[data-theme="dark"] .support-widget-response {
  color: #e5eefc;
}

html[data-theme="dark"] .support-widget-context-label {
  color: #94a3b8;
}

html[data-theme="dark"] .support-widget-close,
html[data-theme="dark"] .support-widget-chip,
html[data-theme="dark"] .support-widget-response {
  background: #111c31;
  border-color: #334155;
}

@media (max-width: 768px) {
  .support-widget-toggle {
    right: 12px;
    bottom: 12px;
    width: 54px;
    height: 54px;
    padding: 0;
    gap: 0;
    justify-content: center;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  }

  .support-widget-toggle-label {
    display: none;
  }

  .support-widget-toggle-icon {
    left: 50%;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.98);
    border-width: 1px;
    transform: translate(-50%, -50%);
  }

  .support-widget-toggle-image {
    width: 22px;
    height: 22px;
  }

  .support-widget {
    right: 10px;
    left: 10px;
    bottom: 78px;
    width: auto;
  }

  .support-widget-messages {
    max-height: 320px;
  }

  .support-widget-response--welcome {
    min-height: 220px;
  }

  .support-widget-response__art {
    width: min(190px, 70%);
    height: min(190px, 70%);
    opacity: 0.1;
    inset: auto -22px -16px auto;
    transform: translate(8px, 8px);
  }
}

/* =====================================================
   TOPBAR
===================================================== */

body:not(.login-page) .topbar {
  min-height: 74px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
  padding: 8px 22px;
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.35fr) minmax(320px, 1fr);
  align-items: center;
  position: relative;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.16);
}

.btn-logout {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-logout:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(220, 38, 38, 0.24);
}

/* =====================================================
   LAYOUT
===================================================== */

body:not(.login-page) .layout {
  display: flex;
  height: calc(100vh - var(--vc-topbar-height));
  overflow: hidden;
}

body:not(.login-page) {
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

body:not(.login-page) input,
body:not(.login-page) textarea,
body:not(.login-page) [contenteditable="true"],
body:not(.login-page) .select2-search__field,
body:not(.login-page) .swal2-input,
body:not(.login-page) .swal2-textarea {
  -webkit-user-select: text;
  user-select: text;
}

body:not(.login-page) .main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
  width: 240px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(2, 6, 23, 0)),
    #020617;
  padding: 20px 15px;
  color: #ffffff;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.14) transparent;
}

.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.14);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-title {
  font-size: 18px;
  margin-bottom: 20px;
  padding-left: 10px;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
}

.sidebar-menu a {
  display: flex;
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5f5;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  transform: translateX(2px);
}

.sidebar-menu a,
.submenu-toggle,
.sidebar-module-action-btn,
.mobile-sidebar-toggle,
.sidebar-mobile-close {
  touch-action: manipulation;
}

/* =====================================================
   CONTENT
===================================================== */

.content {
  flex: 1;
  min-height: 0;
  padding: 32px 32px 104px;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-padding-bottom: 104px;
  scrollbar-width: thin;
  scrollbar-color: #2563eb #dbe6fb;
  -ms-overflow-style: auto;
}

.content {
  display: flex;
  flex-direction: column;
}

.content > div[id$="-vue-app"] {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.content .v-application {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.content .v-application__wrap {
  min-height: 0 !important;
  min-width: 0 !important;
}



.content::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 999px;
}

.content::-webkit-scrollbar-track {
  background: transparent;
}

body:not(.login-page) .app-footer {
  border-top: 1px solid var(--vc-border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--vc-text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  backdrop-filter: blur(10px);
}

/* =====================================================
   TABLAS
===================================================== */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--vc-surface-strong);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf5;
}

tbody tr:hover {
  background: #f8fbff;
}

/* =====================================================
   MODAL (FORMULARIO XFA LARGO)
===================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);

  /* ðŸ”¥ CLAVE ABSOLUTA */
  display: none !important;
  pointer-events: none;

  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex !important;
  pointer-events: auto;
}

/* CAJA */



/* HEADER */
.modal-header {
  padding: 14px 20px;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
  border-bottom: 1px solid var(--vc-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}


/* BOTONES */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 14px;
  box-shadow: none;
}
/* CHECKBOX */
.form-group.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.grid {
  display: grid;
  gap: 10px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1200px) {
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .factura-active-group {
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  .factura-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .factura-search-box {
    width: 100%;
    margin-left: 0;
  }

  .factura-search-box input {
    width: 100%;
  }

  .factura-filters-actions {
    justify-content: stretch;
  }

  .factura-filter-clear,
  .factura-active-chip,
  .factura-filter-toggle {
    width: 100%;
  }

  .factura-filter-menu {
    width: 100%;
    min-width: 0;
  }

  .factura-active-group {
    width: 100%;
  }

  .factura-active-group input[type="date"],
  .factura-active-group input[type="number"],
  .factura-active-group input[type="text"],
  .factura-active-group select {
    width: 100%;
  }

  .producto-top-layout {
    grid-template-columns: 1fr;
  }

  .producto-nombre-grid {
    grid-template-columns: 1fr;
  }

  .foto-preview-panel {
    max-width: none;
    justify-self: stretch;
  }

  .grid-6,
  .grid-5,
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
/* FIX OVERFLOW GRID + INPUTS */
.grid > * {
  min-width: 0;
}

input,
select,
textarea {
  min-width: 0;
}


.switch-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.switch-label {
  font-size: 14px;
  color: #444;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 30px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #2563eb;
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
}
.pagination-container {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
  padding-right: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8f9fb;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.page-btn {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 10px;
  border-color: #c7d8f6;
  background: linear-gradient(180deg, var(--vc-secondary), var(--vc-secondary-strong));
  color: var(--vc-secondary-text);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, border-color 0.18s ease;
}

.page-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.01);
  border-color: #94b6ef;
  box-shadow: 0 12px 22px rgba(59, 130, 246, 0.2);
}

.page-btn.btn-danger {
  border-color: rgba(220, 38, 38, 0.2);
  background: linear-gradient(135deg, var(--vc-danger), var(--vc-danger-strong));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}

.page-btn.btn-danger:hover {
  border-color: rgba(185, 28, 28, 0.3);
  box-shadow: 0 14px 26px rgba(220, 38, 38, 0.22);
}

.page-btn.btn-secondary {
  border-color: #bfd3f4;
  background: linear-gradient(180deg, #f8fbff, #e6eefc);
  color: #1e40af;
}

.page-btn.btn-secondary:hover {
  border-color: #9bb8ea;
}

.page-btn.btn-success {
  border-color: rgba(15, 159, 110, 0.24);
  background: linear-gradient(135deg, var(--vc-success), var(--vc-success-strong));
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 159, 110, 0.16);
}

.page-btn:disabled {
  background: #cbd5e1;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.table-actions .page-btn,
.table-actions .btn-danger {
  min-width: 84px;
}

.table-actions .page-btn.btn-danger,
.table-actions .btn-danger {
  min-width: 92px;
}

.page-info {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  min-width: 90px;
  text-align: center;
}
.table-wrapper {
  width: 100%;
  border-radius: var(--vc-radius-md);
  background: var(--vc-surface-strong);
  border: 1px solid var(--vc-border);
  box-shadow: var(--vc-shadow-soft);
  overflow: hidden;
}
/* ===== RESET LISTAS SIDEBAR ===== */
.sidebar-menu,
.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Ã­tems */
.sidebar-menu > li {
  margin: 6px 0;
}

/* enlaces */
.sidebar-menu a {
  display: block;
  padding: 8px 12px;
  color: #cfd8dc;
  text-decoration: none;
  border-radius: 6px;
}

/* hover */
.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* ===== SUBMENÃš ===== */
.sidebar-submenu {
  padding-left: 18px;
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

/* abierto */
.has-submenu.open > .sidebar-submenu {
  max-height: 500px;
}

/* flecha */
.submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.submenu-toggle::after {
  content: "›";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 3px;
  border-radius: 999px;
  border: 1px solid rgba(215, 201, 58, 0.45);
  background: rgba(215, 201, 58, 0.10);
  color: #d7c93a;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* flecha abierta */
.has-submenu.open > .submenu-toggle::after {
  transform: rotate(90deg);
  color: #f1e56a;
  background: rgba(215, 201, 58, 0.18);
  border-color: rgba(215, 201, 58, 0.75);
}

.has-submenu > .submenu-toggle:hover::after {
  color: #f1e56a;
  background: rgba(215, 201, 58, 0.16);
}

.has-submenu.open > .submenu-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-submenu a {
  font-size: 14px;
  color: #b9c4d3;
  padding-left: 14px;
}

.sidebar-submenu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
}
.swal2-container {
  z-index: 4000 !important;
}
/* ===============================
   TEXTAREA - ESTILO GENERAL
=============================== */
textarea {
  width: 100%;
  min-height: 120px;   /* o 140px, 160px */
  padding: 10px 12px;
  resize: vertical;
}


/* ===============================
   FOCUS
=============================== */
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ===============================
   PLACEHOLDER
=============================== */
textarea::placeholder {
  color: #9ca3af;
}

/* ===============================
   DISABLED
=============================== */
textarea:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

/* ===============================
   READONLY
=============================== */
textarea[readonly] {
  background-color: #f9fafb;
  color: #374151;
}
/* SweetAlert custom */
.swal-popup {
  border-radius: 14px !important;
  font-size: 15px;
}

.swal-btn {
  padding: 8px 22px;
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.swal-success {
  background: #16a34a !important;
  color: #fff !important;
}

.swal-error {
  background: #dc2626 !important;
  color: #fff !important;
}

.swal-warning {
  background: #f59e0b !important;
  color: #fff !important;
}

.swal-info {
  background: #2563eb !important;
  color: #fff !important;
}

/* Selector "que anular" (factura/retencion/ambas) con estilo de interruptores */
.factura-anular-scope-popup .swal2-radio {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  margin: 18px 2px 4px;
}

.factura-anular-scope-popup .swal2-radio label {
  display: flex !important;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  margin: 0 !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.factura-anular-scope-popup .swal2-radio label:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.factura-anular-scope-popup .swal2-radio label:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.factura-anular-scope-popup .swal2-radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  min-width: 42px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0 !important;
  transition: background 0.15s ease;
}

.factura-anular-scope-popup .swal2-radio input::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s ease;
}

.factura-anular-scope-popup .swal2-radio input:checked {
  background: #2563eb;
}

.factura-anular-scope-popup .swal2-radio input:checked::before {
  transform: translateX(18px);
}

.factura-anular-scope-popup .swal2-label {
  font-size: 14px;
  color: #1e293b;
  font-weight: 600;
  text-align: left;
}

/* SweetAlert unificado para catalogos/transaccion */
.vc-swal-popup {
  border-radius: 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.34) !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  color: #0f172a !important;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.16) !important;
  padding: 1.8rem 1.25rem 1.45rem !important;
  min-width: 340px;
}

.vc-swal-toast {
  border-radius: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.3) !important;
  background: linear-gradient(180deg, #ffffff, #f8fbff) !important;
  color: #0f172a !important;
}

.vc-swal-title {
  color: #0f172a !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

.vc-swal-html {
  color: #334155 !important;
  font-size: 1.05rem !important;
}

.swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: #86efac !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(134, 239, 172, 0.34) !important;
}

.vc-swal-confirm {
  background: linear-gradient(180deg, #3b82f6, #2563eb) !important;
  color: #ffffff !important;
  border: 1px solid #60a5fa !important;
  border-radius: 10px !important;
  font-size: 1.05rem !important;
  font-weight: 700 !important;
  padding: 10px 24px !important;
  box-shadow: 0 9px 20px rgba(37, 99, 235, 0.34);
}

.vc-swal-cancel {
  background: linear-gradient(180deg, #f8fafc, #e2e8f0) !important;
  color: #334155 !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 10px !important;
  font-size: 1.02rem !important;
  font-weight: 700 !important;
  padding: 10px 22px !important;
}

.vc-swal-confirm:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8) !important;
}

.vc-swal-cancel:hover {
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1) !important;
}
/* SWITCH ESTADO */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #2563eb; /* azul */
}

input:checked + .slider:before {
  transform: translateX(22px);
}
/* CONTENEDOR GENERAL */
.producto-top-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
  align-items: start;
  margin-bottom: 10px;
}

.producto-top-fields {
  display: grid;
  gap: 10px;
}

.producto-nombre-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foto-preview-panel {
  width: 100%;
  max-width: 220px;
  justify-self: end;
}

.foto-upload-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #1f3b68;
}

.foto-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
 }

/* CONTENEDOR DE FOTO */
.foto-preview-wrapper {
  height: 180px;
  width: 100%;
  max-width: none;

  border: 1px dashed #dcdcdc;
  border-radius: 6px;
  margin-top: 0;

  position: relative;
  overflow: hidden;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 96' fill='none' stroke='%23cbd5e1' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='12' y='18' width='72' height='60' rx='10'/%3E%3Ccircle cx='34' cy='38' r='6'/%3E%3Cpath d='M22 66l18-18 12 12 10-10 12 16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 72px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.foto-preview-wrapper:focus {
  outline: none;
}

.foto-preview-wrapper.has-image {
  border-color: transparent;
  background-image: none;
  background-color: transparent;
}


/* IMAGEN */
.foto-preview-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 8px;
  display: none;
}

.foto-preview-wrapper.has-image img {
  padding: 0;
}
.param-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  padding: 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.94), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(203, 213, 225, 0.9);
}

.param-tab-btn {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid #d5deea;
  background: linear-gradient(180deg, #ffffff, #eef4fb);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  color: #334155;
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.param-tab-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(148, 163, 184, 0.18);
}

.param-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #1d4ed8;
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.param-tab-pane {
  display: none;
}

.param-tab-pane.active {
  display: block;
}

.param-series-panel {
  padding: 18px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.06), transparent 24%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(255, 255, 255, 0.98));
}

.param-series-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(214, 223, 235, 0.92);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.param-series-table {
  min-width: 1860px;
  width: max-content;
  box-shadow: none;
  background: transparent;
}

.param-series-table thead {
  background: linear-gradient(180deg, #eaf1fb, #dfe9f7);
}

.param-series-table thead th {
  padding: 14px 10px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #d7e3f0;
}

.param-series-table tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid #edf2f8;
  background: rgba(255, 255, 255, 0.96);
}

.param-series-table tbody tr:hover td {
  background: #f8fbff;
}

.param-series-table input[type="text"],
.param-series-table input[type="number"] {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #d6e0eb !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-sizing: border-box;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.param-series-table th:nth-child(1),
.param-series-table td:nth-child(1) {
  min-width: 120px;
}

.param-series-table th:nth-child(2),
.param-series-table td:nth-child(2) {
  min-width: 220px;
}

.param-series-table th:nth-child(3),
.param-series-table td:nth-child(3) {
  min-width: 240px;
}

.param-series-table th:nth-child(n + 4):nth-child(-n + 14),
.param-series-table td:nth-child(n + 4):nth-child(-n + 14) {
  min-width: 110px;
}

.param-series-table th:nth-child(15),
.param-series-table td:nth-child(15) {
  min-width: 110px;
}

.param-series-table th:nth-child(16),
.param-series-table td:nth-child(16) {
  min-width: 100px;
  text-align: center;
}

.param-series-table th:nth-child(17),
.param-series-table td:nth-child(17) {
  min-width: 70px;
  text-align: center;
}

.param-series-table input[type="text"]:focus,
.param-series-table input[type="number"]:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12) !important;
}

.param-series-photo {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid #d7e3ef;
  background: linear-gradient(180deg, #f8fbff, #eef4fa);
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.14);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.param-series-photo:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(148, 163, 184, 0.18);
  opacity: 0.96;
}

.param-series-delete-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.param-series-delete-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.22);
}

.param-series-empty {
  padding: 22px 10px !important;
  text-align: center;
  color: #64748b;
  font-weight: 600;
}

.parametros-dialog-card {
  min-height: min(88vh, 920px);
}

.parametros-list-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.parametros-list-table {
  min-width: 940px;
}

.vc-table-number {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.modal-box {
    background: #ffffff;
    width: 95%;
    max-width: 900px;
    max-height: 90vh; /* baja un poco */
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden; /* importante */
}
#parametroForm {
    display: flex;
    flex-direction: column;
    flex: 1;                   /* ðŸ‘ˆ ocupa todo el modal */
}
.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-actions {
    flex-shrink: 0;            /* ðŸ‘ˆ nunca se comprime */
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
}

.modal-actions .btn-primary {
  order: -1;
}
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-number-btn {
  padding: 6px 10px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  border-radius: 4px;
}

.page-number-btn.active {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}
.table-header {
  display: flex;
  justify-content: space-between; /* separa izquierda y derecha */
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.paises-header {
  margin-bottom: 12px;
}

.factura-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.factura-list-header {
  margin-bottom: 14px;
}

.transaccion-list-table-wrap,
.factura-list-table-wrap {
  margin-top: 12px;
  border: 1px solid rgba(203, 213, 225, 0.96);
  border-radius: 24px;
  overflow-x: auto;
  overflow-y: visible;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.1);
  scrollbar-color: rgba(100, 116, 139, 0.7) rgba(226, 232, 240, 0.8);
  scrollbar-width: auto;
}

.transaccion-list-table-wrap > .transaccion-list-table,
.factura-list-table-wrap > .factura-list-table {
  width: 100%;
  min-width: 1480px;
  margin: 0;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}

.transaccion-list-table-wrap > .transaccion-list-table thead th,
.factura-list-table-wrap > .factura-list-table thead th {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid rgba(219, 227, 239, 0.92);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  text-align: left;
  white-space: nowrap;
}

.transaccion-list-table-wrap > .transaccion-list-table tbody tr,
.factura-list-table-wrap > .factura-list-table tbody tr {
  transition: background-color 0.18s ease;
}

.transaccion-list-table-wrap > .transaccion-list-table tbody tr:hover,
.factura-list-table-wrap > .factura-list-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.96);
}

.transaccion-list-table-wrap > .transaccion-list-table tbody td,
.factura-list-table-wrap > .factura-list-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  color: #1e293b;
  font-size: 12px;
  vertical-align: middle;
  white-space: nowrap;
}

.transaccion-list-table-wrap > .transaccion-list-table tbody tr:last-child td,
.factura-list-table-wrap > .factura-list-table tbody tr:last-child td {
  border-bottom: 0;
}

.transaccion-list-pagination-container,
.factura-list-pagination-container {
  margin-top: 12px;
  padding-right: 0;
}

.transaccion-list-pagination,
.factura-list-pagination {
  width: 100%;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(203, 213, 225, 0.92);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.transaccion-list-pagination .pagination-center,
.factura-list-pagination .pagination-center {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.transaccion-list-pagination .page-summary,
.factura-list-pagination .page-summary {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.transaccion-list-pagination .page-numbers,
.factura-list-pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.transaccion-list-pagination .page-number-btn,
.factura-list-pagination .page-number-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(226, 232, 240, 0.96);
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.transaccion-list-pagination .page-number-btn:hover,
.factura-list-pagination .page-number-btn:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  color: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.transaccion-list-pagination .page-number-btn.active,
.factura-list-pagination .page-number-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.factura-table-status-row td {
  padding: 30px 16px !important;
  color: #64748b;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.factura-table-status-row.is-loading td {
  color: #1d4ed8;
}

.factura-table-status-row.is-error td {
  color: #b91c1c;
}

.factura-serie-plain,
.factura-numero-plain {
  display: inline-block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.factura-party-cell {
  min-width: 220px;
}

.factura-party-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.factura-party-doc {
  font-size: 10px;
  color: #475569;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.factura-party-name {
  color: #0f172a;
  line-height: 1.15;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.factura-actions-cell {
  min-width: 118px;
}

.factura-estado-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.factura-estado-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.factura-estado-dot.is-active {
  background: #16a34a;
  box-shadow:
    0 0 0 4px rgba(22, 163, 74, 0.10),
    0 1px 2px rgba(15, 23, 42, 0.08);
}

.factura-estado-dot.is-inactive {
  background: #94a3b8;
  box-shadow:
    0 0 0 4px rgba(148, 163, 184, 0.10),
    0 1px 2px rgba(15, 23, 42, 0.08);
}

.factura-estado-wrap .switch {
  transform: scale(0.88);
  transform-origin: center;
}

.transaccion-list-table-wrap::-webkit-scrollbar,
.factura-list-table-wrap::-webkit-scrollbar {
  height: 14px;
}

.transaccion-list-table-wrap::-webkit-scrollbar-track,
.factura-list-table-wrap::-webkit-scrollbar-track {
  background: rgba(226, 232, 240, 0.9);
  border-radius: 999px;
}

.transaccion-list-table-wrap::-webkit-scrollbar-thumb,
.factura-list-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.78);
  border-radius: 999px;
  border: 2px solid rgba(226, 232, 240, 0.9);
}

.guia-destinatarios-container {
  display: grid;
  gap: 14px;
}

.guia-destinatario-card {
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.guia-destinatario-card .table-header {
  margin-bottom: 10px;
  align-items: center;
}

.guia-destinatario-card .table-header .btn-danger,
.guia-destinatario-card .table-header .btn-primary {
  min-height: 36px;
}

.guia-destinatario-card .form-group {
  margin-bottom: 10px;
}

.guia-destinatario-card .table-wrapper {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
}

.guia-destinatario-card table {
  width: 100%;
}

.guia-destinatario-card table thead th {
  white-space: nowrap;
}

.guia-destinatario-card table tbody td {
  vertical-align: middle;
}

.guia-destinatario-card .guia-detalle-row input,
.guia-destinatario-card .guia-detalle-row select {
  min-height: 38px;
}

.guia-destinatario-card .guia-remove-detalle {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.guia-factura-origen-group[hidden] {
  display: none !important;
}

.factura-search-panel {
  width: min(760px, 100%);
  margin-left: auto;
  display: grid;
  gap: 10px;
}

.factura-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.factura-search-box {
  width: 100%;
  position: relative;
}

.factura-search-box input {
  width: 100%;
  min-height: 42px;
}

.factura-search-box input.factura-search-summary {
  background: #eff6ff;
  color: transparent;
  caret-color: transparent;
  cursor: default;
}

.factura-search-tokens {
  position: absolute;
  inset: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}

.factura-search-token {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.factura-search-token-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.factura-search-token-remove {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.factura-search-token-remove:hover {
  color: #1e3a8a;
}

.factura-group-row > td {
  background: #ffffff;
}

.factura-group-row > td.factura-group-label-cell {
  background: #f8fbff;
  border-radius: 14px 0 0 14px;
}

.factura-group-row.is-open > td.factura-group-label-cell {
  background: #eef5ff;
}

.factura-group-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  padding: 0;
  color: #0f172a;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  justify-content: flex-start;
}

.factura-group-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 13px;
  flex: 0 0 auto;
}

.factura-group-toggle-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.factura-group-toggle-subtext {
  font-size: 14px;
  font-weight: 500;
  color: #5b6b84;
}

.factura-group-detail-row[hidden] {
  display: none;
}

.factura-group-detail-row > td {
  padding: 0 24px 18px 24px !important;
  background: #f8fbff;
}

.factura-group-detail-panel {
  display: grid;
  gap: 10px;
  padding: 12px 0 0;
}

.factura-group-detail-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  background: #ffffff;
}

.factura-group-detail-main,
.factura-group-detail-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.factura-group-detail-main span,
.factura-group-detail-side span {
  color: #64748b;
  font-size: 13px;
}

.factura-group-detail-side {
  justify-content: flex-end;
}

.factura-group-detail-empty {
  padding: 12px 14px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  color: #64748b;
}

.factura-filter-dialog-grid {
  display: grid;
  gap: 14px;
  text-align: left;
}

.factura-filter-dialog-field {
  display: grid;
  gap: 6px;
}

.factura-filter-dialog-field span {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.factura-filter-dialog-input,
.factura-filter-dialog-select {
  width: 100% !important;
  margin: 0 !important;
  min-height: 42px !important;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  box-sizing: border-box !important;
}

.factura-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  flex-wrap: wrap;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}

.factura-filter-search-box {
  flex: 0 1 320px;
  width: min(320px, 100%);
  min-width: 240px;
}

.factura-filter-search-box input {
  min-height: 40px;
}

.factura-filter-menu-wrap {
  position: relative;
  flex: 0 0 auto;
}

.factura-filter-toggle,
.factura-filter-clear,
.factura-active-chip {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.factura-filter-toggle:hover,
.factura-filter-clear:hover,
.factura-active-chip:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.factura-active-chip.active,
.factura-filter-toggle.active,
.factura-filter-menu-item.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

.factura-filter-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 240px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  padding: 6px;
  z-index: 30;
}

#facturaExportMenu {
  left: auto;
  right: 0;
}

.factura-filter-menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #1e293b;
  text-align: left;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
}

.factura-filter-menu-item:hover {
  background: #eff6ff;
}

.factura-filter-submenu-wrap {
  display: grid;
  gap: 4px;
}

.factura-filter-menu-parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.factura-filter-menu-arrow {
  color: #64748b;
  font-size: 12px;
  transition: transform 0.18s ease;
}

.factura-filter-menu-parent.is-open .factura-filter-menu-arrow {
  transform: rotate(90deg);
}

.factura-filter-submenu {
  display: grid;
  gap: 2px;
  margin-left: 12px;
  padding-left: 10px;
  border-left: 2px solid #dbeafe;
}

.factura-filter-submenu[hidden] {
  display: none !important;
}

.factura-filter-menu-subitem {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
}

.factura-active-filters,
.factura-selected-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
}

.factura-active-filters,
.factura-selected-filters,
.factura-filters-actions {
  display: none !important;
}

.factura-filter-bar > .factura-active-filters:last-of-type {
  display: contents;
}

.factura-active-filters > .form-group,
.factura-selected-filters > .form-group {
  display: none;
}

.factura-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.factura-active-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  max-width: 100%;
}

.factura-active-group .form-control {
  min-height: 32px;
  height: 32px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.factura-active-group input[type="date"],
.factura-active-group input[type="number"] {
  width: 140px;
}

.factura-active-group select {
  width: 180px;
}

.factura-active-group input[type="text"] {
  width: 220px;
}

.factura-active-group .select2-container {
  min-width: 220px !important;
}

.factura-active-group .select2-container--default .select2-selection--single {
  height: 32px !important;
  min-height: 32px;
}

.factura-active-group .select2-container--default .select2-selection--single .select2-selection__rendered {
  font-size: 13px;
}

.factura-active-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

.factura-active-close {
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 4px;
}

.factura-active-close:hover {
  color: #0f172a;
}

.factura-filters-actions {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.parametro-periodo-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  color: #0f172a;
}

.parametro-periodo-badge.current-year {
  background: #e7f6ed;
  color: #2f6b45;
  box-shadow: inset 0 0 0 1px #c8e6d2;
}

.parametro-row-current-year td {
  background: #f2fbf5;
}

.parametro-row-current-year:hover td {
  background: #e7f6ed;
}

.select-form {
    display: flex;
    flex-direction: column;
    align-items: center;   /* centra horizontal */
    gap: 20px;             /* espacio entre select y botÃ³n */
    margin-top: 40px;      /* lo baja mÃ¡s */
}

.select-button {
    background-color: #2563eb;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

.select-button:hover {
    background-color: #1e40af;
    transform: translateY(-2px);
}
/* CONTENEDOR */
.select2-container:not(.select2-container--open) {
  width: 100% !important;
}

/* CAJA */
.select2-container--default .select2-selection--single {
  height: 40px !important;
  border-radius: 8px !important;
  border: 1px solid #cbd5e1 !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
  font-size: 13px;
}

/* TEXTO CENTRADO VERTICAL */
.select2-container--default 
.select2-selection--single 
.select2-selection__rendered {
  line-height: normal !important;
  padding: 0 !important;
}

/* FOCUS IGUAL A TUS INPUTS */
.select2-container--default.select2-container--focus 
.select2-selection--single {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37,99,235,.15) !important;
}
.select2-container--default .select2-selection--single {
  height: 40px;
  display: flex;
  align-items: center;
}

.select2-search--dropdown {
  padding: 0 !important;
}

.select2-container--open:not(.select2-container--above) .select2-dropdown:not(.select2-dropdown--above) {
  margin-top: -40px;
  border-top: none;
}

/* Cuando Select2 abre hacia arriba (poco espacio debajo, comun en tablets/movil),
   el offset de -40px de arriba empujaba el panel sobre el campo de busqueda y
   tapaba el input, impidiendo escribir para filtrar. Aqui se deja el panel en
   su posicion natural (sin superponerse a la caja de seleccion). */
.select2-container--open.select2-container--above .select2-dropdown,
.select2-container--open .select2-dropdown--above {
  margin-top: 0;
  margin-bottom: 4px;
  border-top: 1px solid #cbd5e1;
  border-bottom: none;
}

.factura-select2-action {
  padding: 10px 12px 12px;
  border-top: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
}

.factura-select2-action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #bfd3ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.factura-select2-action-link:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.16);
}

.factura-select2-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 16px;
  line-height: 1;
}

.factura-select2-editable .select2-selection--single {
  position: relative !important;
  padding-right: 68px !important;
}

.factura-select2-selection-edit {
  position: absolute;
  top: 50%;
  right: 32px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.factura-select2-selection-edit:hover {
  background: #1d4ed8;
  color: #fff;
}

.factura-select2-selection-edit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* ===============================
   FORMA DE PAGO
=============================== */

.forma-pago-container {
  margin-top: 30px;
}

.forma-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: #334155;
}

.forma-wrapper {
  display: flex;
  gap: 40px;
}

.forma-left {
  flex: 2;
}

.forma-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
}

.forma-actions-row .switch-container {
  margin-top: 0;
}

.forma-autogen-switch {
  justify-content: flex-end;
  margin-left: auto;
}

.forma-right {
  flex: 1;
  background: #f8fafc;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.resumen-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 14px;
}

.resumen-total {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-weight: bold;
  font-size: 16px;
}
/* ===============================
   DETALLES ADICIONALES
=============================== */
#detalletransaccionTable td[contenteditable="true"] {
  cursor: text;
  transition: background 0.2s ease;
}

#detalletransaccionTable td[contenteditable="true"]:focus {
  outline: none;
  background: #eef2ff;
}

#detalletransaccionTable td {
  padding: 10px;
}

.subtotal {
  font-weight: 600;
  text-align: right;
}
/* ===============================
   DETALLES ADICIONALES
=============================== */

.detalles-adicionales-container {
  margin-top: 25px;
}

.detalles-adicionales-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.detalle-adicional-catalogo-picker {
  display: flex;
  align-items: center;
  gap: 8px;
}

.detalle-adicional-catalogo-picker .select2-container {
  min-width: 220px;
}

.detalle-adicional-catalogo-picker .btn-primary {
  min-height: 34px;
  padding: 0 14px;
}
#detallesAdicionalesTable td {
  min-height: 36px;
  cursor: text;
}

#detallesAdicionalesTable td:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  background-color: #f9fafb;
}
.modal-child {
  z-index: 9999;
  background: rgba(0,0,0,0.6);
}

.link-crear-detalle {
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.link-crear-detalle:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
.link-crear-forma {
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.link-crear-forma:hover {
  background: #eff6ff;
  color: #1d4ed8;
}
#detalleFacturaForm {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#detallePrecioCalculo[readonly] {
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
}

#detallePrecioCalculo[readonly]:focus {
  outline: 2px solid rgba(37, 99, 235, 0.25);
}

#detalleFacturaModal .detalleprecio-bloqueado,
#detalleFacturaModal .detalleprecio-bloqueado[readonly] {
  background: #e5e7eb !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

#detalleFacturaModal .detalleprecio-bloqueado:focus {
  box-shadow: none !important;
  outline: 2px solid rgba(148, 163, 184, 0.35) !important;
}

/* FILA SIMPLE */
.detallefactura-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* LABELS ALINEADOS */
.detallefactura-row label {
  width: 160px;   /* ðŸ‘ˆ CLAVE: mismo ancho para todos */
  min-width: 160px;
  font-weight: 600;
}

/* INPUTS */
.detallefactura-row input,
.detallefactura-row textarea {
  flex: 1;
}

/* FILAS DOBLES */
/* LINEA VERTICAL */
.detallefactura-row::after {
  content: "";
  display: none;
}
/* INPUTS */
.detallefactura-row input,
.detallefactura-row textarea,
.detallefactura-row select {
  width: 100%;
}
.switch-group-precio {
  display: flex;
  gap: 18px;
  align-items: center;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  cursor: pointer;
}

/* Ocultamos radio real */
.switch-item input {
  display: none;
}

/* Switch pequeÃ±o */
.slider.small {
  position: relative;
  width: 34px;
  height: 16px;
  background: #cbd5e1;
  border-radius: 20px;
  transition: .2s;
}

.slider.small::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: .2s;
}

/* Cuando estÃ¡ seleccionado */
.switch-item input:checked + .slider.small {
  background: #2563eb;
}

.switch-item input:checked + .slider.small::before {
  transform: translateX(18px);
}

/* ===============================
   DIRECCIONES - TABLA BONITA
=============================== */

.tabla-direcciones {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 14px;
}

.tabla-direcciones {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  font-size: 14px;
}

.tabla-direcciones th {
  text-align: left;
  padding: 10px 6px;
  font-weight: 600;
  color: #475569;
  border: none;
}

.tabla-direcciones td {
  padding: 8px 6px;
  border: none;
}

.tabla-direcciones tbody tr {
  background: transparent;
}

.tabla-direcciones tbody tr:hover {
  background: transparent;
}

/* Inputs mÃ¡s ligeros dentro tabla */
.tabla-direcciones input,
.tabla-direcciones select {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
}
.tabla-direcciones input:focus,
.tabla-direcciones select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

/* BotÃ³n eliminar minimal */
.tabla-direcciones button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.tabla-direcciones button:hover {
  opacity: 1;
}

/* ===============================
   LINK AGREGAR DIRECCIÃ“N
=============================== */

.direccion-link-wrapper {
  margin-top: 10px;
}

.link-agregar-direccion {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.link-agregar-direccion:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

.tabla-direcciones th,
.tabla-direcciones td {
  border-bottom: none !important;
}

.tabla-direcciones {
  border: none !important;
}
.tabla-direcciones tbody tr {
  border-bottom: none;
}

.tabla-direcciones td {
  padding: 14px 10px;
}
.tabla-direcciones thead {
  background: transparent;
}

.tabla-direcciones {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  font-size: 14px;
}

/* Quitar bordes heredados */
.tabla-direcciones th,
.tabla-direcciones td {
  border: none !important;
}

/* Header estilo gris plano */
.tabla-direcciones thead {
  background: #e5e7eb;
}

.tabla-direcciones th {
  padding: 12px 14px;
  font-weight: 600;
  color: #1f2937;
  text-align: left;
}

/* Filas sin lÃ­neas */
.tabla-direcciones td {
  padding: 10px 14px;
}

/* Quitar hover global */
.tabla-direcciones tbody tr:hover {
  background: transparent;
}

/* Inputs mÃ¡s planos */
.tabla-direcciones input,
.tabla-direcciones select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  font-size: 13px;
}

/* Icono eliminar mÃ¡s limpio */
.tabla-direcciones button {
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.6;
}

.tabla-direcciones button:hover {
  opacity: 1;
}
.link-agregar-direccion {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}

.link-agregar-direccion:hover {
  text-decoration: underline;
  color: #1d4ed8;
}
/* ===============================
   QUITAR CONTORNO EN DIRECCIONES
=============================== */

.tabla-direcciones input,
.tabla-direcciones select {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
}

/* Quitar tambiÃ©n el focus azul */
.tabla-direcciones input:focus,
.tabla-direcciones select:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}
.tabla-direcciones input {
  background: transparent;
  padding-left: 0;
}
/* Celda eliminar centrada */
.dir-delete-cell {
  width: 40px;
  text-align: center;
}

/* BotÃ³n eliminar minimal */
/* BotÃ³n eliminar rojo */
.dir-delete-btn {
  cursor: pointer;
  font-size: 15px;
  color: #dc2626;          /* rojo */
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.dir-delete-btn:hover {
  opacity: 1;
  transform: scale(1.1);
  color: #b91c1c;          /* rojo mÃ¡s oscuro */
}
.codigo-detalle {
  cursor: pointer;
  background-color: #f9fafb;
}
/* ===== TABLA BONITA ===== */

.custom-table thead {
  background: #e5e7eb;
}

.custom-table thead th {
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #e5e7eb;
}

.custom-table tbody td {
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.custom-table tbody tr:hover {
  background-color: #f9fafc;
}
.custom-table input[type="text"],
.custom-table input[type="number"],
.custom-table input[type="file"] {
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 4px 2px;
}
.custom-table input:focus {
  outline: none !important;
  border: none !important;
  box-shadow: none !important;
}

.custom-table input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}
.custom-table .switch {
  display: flex;
  justify-content: center;
}
.custom-table td .preview-foto img {
  border-radius: 6px;
  border: 1px solid #ddd;
}
.custom-table {
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.custom-table,
.custom-table th,
.custom-table td {
  border: none !important;
}
.preview-foto img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease;
}

.preview-foto img:hover {
  transform: scale(1.05);
  opacity: .85;
}
.detallefactura-totales {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  width: 100%;
}

.detallefactura-row-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.detallefactura-row-inline label {
  min-width: 75px;
  font-weight: 600;
}

.detallefactura-row-inline input {
  flex: 1;
}
.total-destacado input {
  font-weight: bold;
  background-color: #f0f6ff;
  border: 2px solid #3b82f6;
}
.detallefactura-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.detallefactura-row label {
  min-width: 120px;
  font-weight: 600;
}

.detallefactura-row input {
  flex: 1;
}

.detallefactura-input--xs {
  flex: 0 0 auto;
  width: 72px;
}

.detallefactura-input--sm {
  flex: 0 0 auto;
  width: 120px;
}

.detallefactura-input--md {
  flex: 0 0 auto;
  width: 150px;
}

.detallefactura-input--lg {
  flex: 0 0 auto;
  width: 180px;
}

.detallefactura-row--descuento label {
  min-width: 120px;
}

.detallefactura-descuento {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.detallefactura-descuento__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detallefactura-descuento__item > span {
  font-weight: 700;
  color: #334155;
  min-width: 14px;
  text-align: center;
}

.detallefactura-row--pvp-sync label {
  min-width: 120px;
}

.detallefactura-pvp-sync {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.detallefactura-pvp-sync input[type="number"] {
  flex: 1;
  min-width: 120px;
}

#detalleFacturaModal .detallefactura-row label,
#detalleFacturaModal .detallefactura-row-inline label {
  min-width: 120px;
}

.vc-input-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc-input-actions__btn {
  flex: 0 0 auto;
  height: 36px;
  min-width: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.vc-input-actions__btn:hover {
  background: #eef2ff;
  border-color: #93c5fd;
}

.vc-estado-cuenta-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vc-estado-cuenta-modal .table-wrapper {
  overflow-x: auto;
}

.vc-estado-cuenta-modal table {
  width: 100%;
  table-layout: auto;
  min-width: 760px;
}

.vc-estado-cuenta-modal th,
.vc-estado-cuenta-modal td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc-estado-cuenta-modal th:first-child,
.vc-estado-cuenta-modal td:first-child {
  min-width: 96px;
}

/* Estado de Cuenta: Movimientos (dar más espacio a Fecha y bajar fuente) */
#estadoCuentaModal .transaccion-detalle-table th:first-child,
#estadoCuentaModal .transaccion-detalle-table td:first-child {
  min-width: 118px;
  width: 118px;
  font-size: 12px;
}

/* Estado de Cuenta: Detalle movimiento (evitar scroll por gaps grandes) */
#estadoCuentaMovimientoModal .transaccion-detalle-table {
  min-width: 640px;
}

#estadoCuentaMovimientoModal .transaccion-detalle-table th,
#estadoCuentaMovimientoModal .transaccion-detalle-table td {
  padding: 10px 10px;
}

#estadoCuentaMovimientoModal .transaccion-detalle-table th:nth-child(1),
#estadoCuentaMovimientoModal .transaccion-detalle-table td:nth-child(1) {
  width: 70px;
  min-width: 70px;
}

#estadoCuentaMovimientoModal .transaccion-detalle-table th:nth-child(3),
#estadoCuentaMovimientoModal .transaccion-detalle-table td:nth-child(3),
#estadoCuentaMovimientoModal .transaccion-detalle-table th:nth-child(4),
#estadoCuentaMovimientoModal .transaccion-detalle-table td:nth-child(4),
#estadoCuentaMovimientoModal .transaccion-detalle-table th:nth-child(5),
#estadoCuentaMovimientoModal .transaccion-detalle-table td:nth-child(5) {
  width: 92px;
  min-width: 92px;
}

.vc-estado-cuenta-modal th:nth-child(3),
.vc-estado-cuenta-modal td:nth-child(3) {
  max-width: 220px;
}

.vc-estado-cuenta-modal th:nth-last-child(3),
.vc-estado-cuenta-modal td:nth-last-child(3),
.vc-estado-cuenta-modal th:nth-last-child(2),
.vc-estado-cuenta-modal td:nth-last-child(2),
.vc-estado-cuenta-modal th:nth-last-child(1),
.vc-estado-cuenta-modal td:nth-last-child(1) {
  max-width: 110px;
}

.vc-estado-cuenta-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.vc-estado-cuenta-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.vc-estado-cuenta-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}

.vc-estado-cuenta-section__title {
  font-weight: 800;
}

.vc-estado-cuenta-section__meta {
  color: #64748b;
  font-size: 12px;
}

.vc-estado-cuenta-eye-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}

.vc-estado-cuenta-eye-btn:hover {
  background: #f1f5f9;
  border-color: #93c5fd;
}
.detallefactura-precio-tipo {
  display: flex;
  width: 100%;
  gap: 30px;
  align-items: center;
}
.switch-group-precio {
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
}
/* Contenedor principal */
/* Cada columna */
.detallefactura-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  width: 100%;
}

/* Cada fila */
.detallefactura-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

/* Labels alineados */
.detallefactura-row label {
  min-width: 110px;
  font-weight: 600;
}

/* Inputs que se expanden */
.detallefactura-row input {
  flex: 1;
}

/* Cuando hay dos inputs (Unidad X) */
.detallefactura-row input + input {
  flex: 1;
}
/* Espaciado general entre bloques */
.detallefactura-row {
  margin-bottom: 14px;
}

/* Labels consistentes */
.detallefactura-row label {
  min-width: 110px;
  font-weight: 600;
}

/* Inputs se expanden */
.detallefactura-row input,
.detallefactura-row select,
.detallefactura-row textarea {
  flex: 1;
}
/* Inputs deshabilitados mÃ¡s suaves */
.detallefactura-row input:disabled {
  background-color: #f5f7fa;
  color: #555;
  border: 1px solid #dcdfe6;
}
/* ===== RESUMEN FACTURA PROFESIONAL ===== */

.forma-right {
  width: 100%;
  max-width: 380px;
  margin-left: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef1f5;
  font-family: "Inter", "Segoe UI", sans-serif;
}

.resumen-line,
.resumen-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
}

.resumen-line span:first-child {
  font-weight: 500;
  color: #6b7280;
}

.resumen-line span:last-child {
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.3px;
}

/* Separadores sutiles */
.resumen-line:not(:last-child) {
  border-bottom: 1px dashed #edf0f4;
}

/* Subtotales destacados */
.resumen-total {
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 600;
  color: #1f2937;
  border-top: 1px solid #e5e7eb;
}

/* TOTAL FINAL */
.resumen-total:last-child {
  margin-top: 14px;
  padding-top: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  border-top: 2px solid #d1d5db;
}

#total {
  color: #0d47a1;
  font-size: 18px;
  font-weight: 800;
}
.iva,
.cantidad,
.precio,
.descuento,
.subtotal {
    text-align: right;
}
.detallefactura-grid-3 {
  display: flex;
  gap: 30px;
  width: 100%;
}
.input-error-soft {
  border: 1.5px solid #e57373 !important; 
  background-color: #fdeaea !important;      
  box-shadow: 0 0 0 2px rgba(229, 115, 115, 0.15);
  transition: all 0.2s ease;
}

.input-error-soft:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 115, 115, 0.25);
}
.validation-message {
  font-size: 12px;
  margin-top: 4px;
  color: #d32f2f;
  display: none;
}

.validation-message.active {
  display: block;
}
.validation-message.validation-message-info {
  color: #2563eb;
}
.validation-message.validation-message-success {
  color: #15803d;
}
.validation-message.validation-message-warning {
  color: #b45309;
}
input.is-invalid {
  border: 2px solid #dc3545 !important;
  background-color: #fff5f5;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.invalid-feedback {
  color: #dc3545;
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

input.is-invalid + .invalid-feedback {
  display: block;
}
.btn-edit-detalle {
  background: #3b82f6;
  border: none;
  color: white;
  padding: 4px 7px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-edit-detalle:hover {
  background: #2563eb;
  transform: scale(1.05);
}
#detalleFacturaModal .modal-box {
  position: relative;
}

.swal-inside-modal {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(0,0,0,0.35);
  z-index: 9999 !important;
}

.swal-inside-modal .swal2-popup {
  z-index: 10000 !important;
}

.bitacora-detail {
  text-align: left;
  -webkit-user-select: none;
  user-select: none;
}

.bitacora-detail-meta {
  margin: 0 0 6px;
}

.bitacora-detail-meta-last {
  margin-bottom: 12px;
}

.bitacora-detail-label {
  margin: 8px 0 4px;
}

.bitacora-changes-wrap {
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px;
}

.bitacora-changes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.bitacora-changes-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bitacora-chip-hoy,
.bitacora-chip-hoy-tabla {
  display: inline-flex;
  align-items: center;
  border: 1px solid #16a34a;
  color: #166534;
  background: #dcfce7;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
}

.bitacora-detail-search {
  flex: 1 1 280px;
  max-width: 360px;
}

.bitacora-detail-search input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  color: #0f172a;
  -webkit-user-select: text;
  user-select: text;
}

.bitacora-recent-actions {
  margin-top: 6px;
}

.bitacora-btn-recent {
  background: #16a34a;
}

.bitacora-btn-recent:hover {
  background: #15803d;
}

.bitacora-detail-table-wrap {
  margin-top: 8px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  overflow: hidden;
}

.bitacora-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.bitacora-detail-table th,
.bitacora-detail-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.bitacora-detail-table th {
  background: #eef3fb;
  color: #0b1c40;
  font-weight: 700;
}

.bitacora-detail-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.bitacora-detail-table td {
  color: #1e293b;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bitacora-detail-table th:nth-child(1),
.bitacora-detail-table td:nth-child(1) {
  width: 24%;
}

.bitacora-detail-table th:nth-child(2),
.bitacora-detail-table td:nth-child(2) {
  width: 38%;
}

.bitacora-detail-table th:nth-child(3),
.bitacora-detail-table td:nth-child(3) {
  width: 38%;
}

.bitacora-user-table th:nth-child(1),
.bitacora-user-table td:nth-child(1) {
  width: 16%;
}

.bitacora-user-table th:nth-child(2),
.bitacora-user-table td:nth-child(2) {
  width: 14%;
}

.bitacora-user-table th:nth-child(3),
.bitacora-user-table td:nth-child(3) {
  width: 10%;
}

.bitacora-user-table th:nth-child(4),
.bitacora-user-table td:nth-child(4) {
  width: 12%;
}

.bitacora-user-table th:nth-child(5),
.bitacora-user-table td:nth-child(5) {
  width: 24%;
}

.bitacora-user-table th:nth-child(6),
.bitacora-user-table td:nth-child(6) {
  width: 24%;
}

.bitacora-detail-row-hoy td {
  background: #ecfdf5 !important;
  color: #14532d;
}

.bitacora-recent-focus td {
  box-shadow: inset 0 0 0 2px #22c55e;
}

.bitacora-detail-pager {
  margin-top: 9px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bitacora-detail-pager .pagination {
  padding: 10px 14px;
}

.bitacora-detail-pager .page-summary {
  font-size: 11px;
  font-weight: 600;
}

.bitacora-detail-pager .page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bitacora-empty {
  margin: 9px 0 0;
  color: #64748b;
}

.bitacora-raw-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.bitacora-raw-item {
  min-width: 0;
}

.bitacora-raw-box {
  min-height: 70px;
  max-height: 180px;
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 9px 10px;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Bitacora table: sin scroll horizontal, contenido ajustado */
body:not(.login-page) .content > .table-wrapper.bitacora-table-wrap {
  overflow: hidden;
}

.bitacora-table {
  width: 100%;
  table-layout: fixed;
  -webkit-user-select: none;
  user-select: none;
}

.bitacora-table th,
.bitacora-table td {
  white-space: normal;
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.bitacora-table th:nth-child(1),
.bitacora-table td:nth-child(1) {
  width: 16%;
  text-align: left;
}

.bitacora-table th:nth-child(2),
.bitacora-table td:nth-child(2) {
  width: 10%;
}

.bitacora-table th:nth-child(3),
.bitacora-table td:nth-child(3) {
  width: 12%;
}

.bitacora-table th:nth-child(4),
.bitacora-table td:nth-child(4) {
  width: 54%;
}

.bitacora-table th:nth-child(5),
.bitacora-table td:nth-child(5) {
  width: 8%;
  text-align: center;
}

.bitacora-row-hoy td {
  background: #f0fdf4 !important;
}

.bitacora-row-hoy td:nth-child(1),
.bitacora-row-hoy td:nth-child(4) {
  color: #166534;
  font-weight: 700;
}

.btn-delete-detalle-factura {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.25s ease;
}
. {
    background: #fff;
    color: #dc3545;
    border: 1px solid #dc3545;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.25s ease;
}


.btn-delete-detalle-factura:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}


.btn-delete-detalle-factura:active {
    transform: scale(0.92);
}


.btn-delete-detalle-factura:focus {
    outline: none;
}
.btn-edit-detalle {
    background: #fff;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.25s ease;
}


.btn-edit-detalle:hover {
    background: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}


.btn-edit-detalle:active {
    transform: scale(0.92);
}


.btn-edit-detalle:focus {
    outline: none;
}
.detallefactura-row .select2-container {
  flex: 1 !important;
  width: 100% !important;
}


.detallefactura-row .select2-selection {
  height: 38px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 10px !important;
  border-radius: 6px !important;
}

.detallefactura-row .select2-selection__rendered {
  line-height: normal !important;
  padding-left: 0 !important;
}

#detalleFacturaModal .modal-body form {
  position: relative;
}

#detalleFacturaModal .detallefactura-totales {
  border-top: 1px solid #dcdcdc;
  padding-top: 20px;
  margin-top: 20px;
}
/* Evitar scroll del modal padre cuando hay modal hijo */
.modal-overlay.modal-child {
  overflow: auto;
}

.modal-overlay.active:not(.modal-child) {
  overflow: hidden;
}
.forma-wrapper {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  max-width: 1200px;  
  margin: 0 auto;     
}

.forma-left {
  flex: 0 0 65%;
}

.forma-right {
  flex: 0 0 35%;
}

#detalleFacturaModal .detalle-col-numeric,
#Factura_ventaModal .detalle-col-numeric,
#detalletransaccionTable .detalle-col-numeric,
#Factura_ventaModal table thead th.detalle-col-tax,
#Factura_ventaModal table thead th.detalle-col-qty,
#Factura_ventaModal table thead th.detalle-col-price,
#Factura_ventaModal table thead th.detalle-col-discount,
#Factura_ventaModal table thead th.detalle-col-subtotal,
#Factura_ventaModal table tbody td.detalle-col-tax,
#Factura_ventaModal table tbody td.detalle-col-qty,
#Factura_ventaModal table tbody td.detalle-col-price,
#Factura_ventaModal table tbody td.detalle-col-discount,
#Factura_ventaModal table tbody td.detalle-col-subtotal,
#Factura_ventaModal #detalletransaccionTable td:nth-child(4),
#Factura_ventaModal #detalletransaccionTable td:nth-child(5),
#Factura_ventaModal #detalletransaccionTable td:nth-child(6),
#Factura_ventaModal #detalletransaccionTable td:nth-child(7),
#Factura_ventaModal #detalletransaccionTable td:nth-child(8),
#Factura_ventaModal table thead th:nth-child(4),
#Factura_ventaModal table thead th:nth-child(5),
#Factura_ventaModal table thead th:nth-child(6),
#Factura_ventaModal table thead th:nth-child(7),
#Factura_ventaModal table thead th:nth-child(8) {
  text-align: right !important;
  font-variant-numeric: tabular-nums;
  padding-right: 18px;
}

#Factura_ventaModal .transaccion-detalle-table {
  width: 100%;
  min-width: 1140px;
  table-layout: fixed;
}

#Factura_ventaModal .transaccion-detalle-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-action {
  width: 44px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-code {
  width: 120px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-product {
  width: 250px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-tipo {
  width: 92px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-tax,
#Factura_ventaModal .transaccion-detalle-table col.detalle-col-qty {
  width: 90px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-casillero {
  width: 100px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-price {
  width: 120px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-discount,
#Factura_ventaModal .transaccion-detalle-table col.detalle-col-subtotal {
  width: 110px;
}

#Factura_ventaModal .transaccion-detalle-table col.detalle-col-reserva {
  width: 94px;
}

#Factura_ventaModal .transaccion-detalle-table th:nth-child(4),
#Factura_ventaModal .transaccion-detalle-table th:nth-child(5),
#Factura_ventaModal .transaccion-detalle-table th:nth-child(6),
#Factura_ventaModal .transaccion-detalle-table th:nth-child(7),
#Factura_ventaModal .transaccion-detalle-table th:nth-child(8),
#Factura_ventaModal .transaccion-detalle-table td:nth-child(4),
#Factura_ventaModal .transaccion-detalle-table td:nth-child(5),
#Factura_ventaModal .transaccion-detalle-table td:nth-child(6),
#Factura_ventaModal .transaccion-detalle-table td:nth-child(7),
#Factura_ventaModal .transaccion-detalle-table td:nth-child(8) {
  text-align: right !important;
  padding-right: 18px !important;
}

#Factura_ventaModal .transaccion-detalle-table th.detalle-col-product,
#Factura_ventaModal .transaccion-detalle-table td.detalle-col-product {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#Factura_ventaModal .transaccion-detalle-table th.detalle-col-tipo,
#Factura_ventaModal .transaccion-detalle-table td.detalle-col-tipo {
  white-space: nowrap;
  text-align: center;
}

#Factura_ventaModal .transaccion-detalle-table th.detalle-col-reserva,
#Factura_ventaModal .transaccion-detalle-table td.detalle-col-reserva {
  white-space: nowrap;
  text-align: center !important;
  padding-right: 0 !important;
}

#Factura_ventaModal .transaccion-detalle-table th.detalle-col-reserva,
#Factura_ventaModal .transaccion-detalle-table td.detalle-col-reserva {
  position: sticky;
  right: 0;
  z-index: 2;
  background: #f8fbff;
  box-shadow: -8px 0 14px rgba(15, 23, 42, 0.06);
}

#Factura_ventaModal .transaccion-detalle-table th.detalle-col-reserva {
  z-index: 3;
}

#Factura_ventaModal.factura-reserva-hidden .transaccion-detalle-table col.detalle-col-reserva,
#Factura_ventaModal.factura-reserva-hidden .transaccion-detalle-table th.detalle-col-reserva,
#Factura_ventaModal.factura-reserva-hidden .transaccion-detalle-table td.detalle-col-reserva {
  display: none !important;
}

#Factura_ventaModal .detalle-reserva-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
}

#Factura_ventaModal .factura-reserva-switch {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 28px;
}

#Factura_ventaModal .factura-reserva-switch .factura-reserva-slider {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 22px;
  background: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

#Factura_ventaModal .factura-reserva-switch .factura-reserva-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 1px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

#Factura_ventaModal .factura-reserva-switch input:checked + .factura-reserva-slider {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #2563eb;
}

#Factura_ventaModal .factura-reserva-switch input:checked + .factura-reserva-slider::before {
  transform: translateX(22px);
}

/* Factura: alinear bloques de tablas a la izquierda dentro del modal */
#Factura_ventaModal .forma-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.95fr);
  align-items: flex-start;
  max-width: none;
  margin: 0;
  gap: 24px;
}

#Factura_ventaModal .forma-left {
  flex: initial;
  min-width: 0;
  margin-left: 0;
}

#Factura_ventaModal .forma-right {
  flex: initial;
  width: 100%;
  max-width: none;
  min-width: 320px;
}

#Factura_ventaModal .transferencia-summary-wrapper {
  display: flex;
  justify-content: flex-end;
  max-width: none;
  margin: 0;
}

#Factura_ventaModal .transferencia-summary-wrapper .forma-right {
  width: 100%;
  max-width: 420px;
}

#Factura_ventaModal .forma-left .table-wrapper,
#Factura_ventaModal .detalles-adicionales-container .table-wrapper {
  margin-left: 0;
  width: 100%;
}

#Factura_ventaModal .modal-actions.factura-actions {
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

#Factura_ventaModal .modal-actions.factura-actions .modal-actions-left,
#Factura_ventaModal .modal-actions.factura-actions .modal-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

#Factura_ventaModal .modal-actions.factura-actions .modal-actions-left {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

#Factura_ventaModal .modal-actions.factura-actions .modal-actions-right {
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

#GuiaRemisionModal .modal-actions.factura-actions {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#GuiaRemisionModal .modal-actions.factura-actions .modal-actions-left,
#GuiaRemisionModal .modal-actions.factura-actions .modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

#GuiaRemisionModal .modal-actions.factura-actions .modal-actions-left {
  justify-content: flex-start;
}

#GuiaRemisionModal .modal-actions.factura-actions .modal-actions-right {
  justify-content: flex-end;
}

#Factura_ventaModal .factura-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 4px 0;
  flex: 0 0 auto;
}

#Factura_ventaModal .modal-actions.factura-actions .btn-primary,
#Factura_ventaModal .modal-actions.factura-actions .btn-danger,
#Factura_ventaModal .modal-actions.factura-actions .btn-autorizar {
  min-height: 44px;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 0 0 auto;
}

#Factura_ventaModal .modal-actions.factura-actions .btn-primary,
#Factura_ventaModal .modal-actions.factura-actions .btn-danger {
  min-width: 128px;
}

#Factura_ventaModal .modal-actions.factura-actions #btnEnviarCorreo,
#Factura_ventaModal .modal-actions.factura-actions #btnEnviarWhatsapp,
#Factura_ventaModal .modal-actions.factura-actions #btnGuardarPendienteFactura {
  min-width: 136px;
}

#Factura_ventaModal .modal-actions.factura-actions #btnGuardarFactura,
#Factura_ventaModal .modal-actions.factura-actions #btnCancelarFactura {
  min-width: 118px;
}

#Factura_ventaModal .modal-actions.factura-actions .btn-autorizar {
  min-width: 72px;
  padding-inline: 12px;
  border-radius: 11px;
}

#Factura_ventaModal .modal-actions.factura-actions .btn-autorizar img {
  width: 22px;
  height: 22px;
}

@media (max-width: 1180px) {
  #Factura_ventaModal .forma-wrapper {
    grid-template-columns: 1fr;
  }

  #Factura_ventaModal .forma-right {
    min-width: 0;
  }

  #Factura_ventaModal .transferencia-summary-wrapper .forma-right {
    max-width: none;
  }
}

#Factura_ventaModal.compra-mode .factura-auth-hidden-mode > label,
#Factura_ventaModal.compra-mode .factura-auth-hidden-mode .factura-tributarios-inline input {
  display: none;
}

#Factura_ventaModal.compra-mode .factura-auth-hidden-mode .factura-tributarios-inline {
  justify-content: flex-start;
}

#Factura_ventaModal .factura-inline-status {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff7d6;
  border: 1px solid #f1d27a;
  color: #6f5600;
  font-size: 14px;
  line-height: 1.4;
}

#Factura_ventaModal .factura-btn-secondary {
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-primary-strong));
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
}

#Factura_ventaModal .factura-btn-secondary:hover,
#Factura_ventaModal .factura-btn-secondary:focus {
  background: linear-gradient(135deg, var(--vc-primary), var(--vc-primary-strong));
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.16);
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(29, 78, 216, 0.28);
}

#Factura_ventaModal .factura-btn-secondary:disabled,
#Factura_ventaModal .factura-btn-secondary[disabled],
#Factura_ventaModal .factura-btn-secondary:disabled:hover,
#Factura_ventaModal .factura-btn-secondary[disabled]:hover {
  background: #cbd5e1 !important;
  color: #64748b !important;
  border-color: transparent !important;
  box-shadow: none !important;
  filter: none !important;
}

#Factura_ventaModal .modal-box {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
}

#Factura_ventaModal .factura-soft-lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(248, 250, 252, 0.76);
  backdrop-filter: blur(2px);
  border-radius: 18px;
  z-index: 60;
  pointer-events: all;
}

#Factura_ventaModal .factura-soft-lock[hidden] {
  display: none !important;
}

#Factura_ventaModal .factura-soft-lock-card {
  width: min(430px, calc(100% - 36px));
  padding: 22px 20px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  text-align: center;
}

#Factura_ventaModal .factura-soft-lock-title {
  margin-top: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

#Factura_ventaModal .factura-soft-lock-text {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.45;
  color: #475569;
}

#Factura_ventaModal .factura-soft-lock-spinner {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 999px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  animation: facturaSoftSpin 0.9s linear infinite;
}

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


@media (max-width: 1024px) {
  #Factura_ventaModal .modal-actions.factura-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #Factura_ventaModal .modal-actions.factura-actions .modal-actions-left,
  #Factura_ventaModal .modal-actions.factura-actions .modal-actions-right {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
    align-items: stretch;
    flex-wrap: wrap;
    overflow: visible;
  }

  #Factura_ventaModal .factura-action-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  #Factura_ventaModal .modal-actions.factura-actions .btn-primary,
  #Factura_ventaModal .modal-actions.factura-actions .btn-danger,
  #Factura_ventaModal .modal-actions.factura-actions .btn-autorizar {
    min-width: 0;
    flex: 1 1 170px;
    white-space: normal;
  }
}
.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap; 
  justify-content: center;
}

.page-summary {
  font-size: 13px;
  opacity: 0.8;
}
.page-summary {
  font-size: 11px;      
  color: #6c757d;      
  opacity: 0.85;         
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}
.page-summary {
  font-size: 10px;
  font-weight: 400;
}
.page-summary {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 10px;
}

td {
  padding: 10px;
}

th:first-child,
td:first-child {
  text-align: center; /* columna # */
  width: 60px;
}

th:last-child,
td:last-child {
  text-align: right; /* acciones */
  width: 120px;
}

td:nth-child(2),
td:nth-child(3),
td:nth-child(4) {
  text-align: left;
}
.btn-autorizar {
    background: #28a745;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-autorizar img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1); /* Hace el icono blanco */
}

.btn-autorizar:hover {
    background: #218838;
    transform: scale(1.05);
}

.btn-autorizar:disabled,
.btn-autorizar[disabled] {
    background: #cbd5e1 !important;
    cursor: not-allowed !important;
    opacity: 1;
    box-shadow: none !important;
    transform: none !important;
}

.btn-autorizar:disabled img,
.btn-autorizar[disabled] img {
    filter: brightness(0) saturate(100%) invert(44%) sepia(8%) saturate(796%) hue-rotate(175deg) brightness(91%) contrast(88%);
}

.btn-autorizar:active {
    transform: scale(0.95);
}

.btn-autorizar:disabled:hover,
.btn-autorizar[disabled]:hover,
.btn-autorizar:disabled:active,
.btn-autorizar[disabled]:active {
    background: #cbd5e1 !important;
    transform: none !important;
}

#Factura_ventaModal .btn-autorizar.is-loading,
#retencionModal .btn-autorizar.is-loading,
#GuiaRemisionModal .btn-autorizar.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
  min-width: 146px;
}

#Factura_ventaModal .btn-autorizar.is-loading:hover,
#Factura_ventaModal .btn-autorizar.is-loading:active,
#retencionModal .btn-autorizar.is-loading:hover,
#retencionModal .btn-autorizar.is-loading:active,
#GuiaRemisionModal .btn-autorizar.is-loading:hover,
#GuiaRemisionModal .btn-autorizar.is-loading:active {
  transform: none;
  background: #28a745;
}

#Factura_ventaModal .btn-autorizar.is-loading img,
#retencionModal .btn-autorizar.is-loading img,
#GuiaRemisionModal .btn-autorizar.is-loading img {
  display: none;
}

#Factura_ventaModal .btn-autorizar.is-loading .btn-loading-text,
#retencionModal .btn-autorizar.is-loading .btn-loading-text,
#GuiaRemisionModal .btn-autorizar.is-loading .btn-loading-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

#Factura_ventaModal .btn-autorizar.is-loading::before,
#retencionModal .btn-autorizar.is-loading::before,
#GuiaRemisionModal .btn-autorizar.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: -3px;
  animation: factura-spin 0.7s linear infinite;
}

#Factura_ventaModal .btn-primary.is-loading,
#retencionModal .btn-primary.is-loading,
#GuiaRemisionModal .btn-primary.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
}

#Factura_ventaModal .btn-primary.is-loading .btn-loading-text,
#retencionModal .btn-primary.is-loading .btn-loading-text,
#GuiaRemisionModal .btn-primary.is-loading .btn-loading-text {
  opacity: 0.92;
}

#Factura_ventaModal .btn-primary.is-loading::before,
#retencionModal .btn-primary.is-loading::before,
#GuiaRemisionModal .btn-primary.is-loading::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: -3px;
  animation: factura-spin 0.7s linear infinite;
}

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

/* =====================================================
   ERP SIDEBAR POLISH
===================================================== */
body:not(.login-page) .sidebar {
  width: 236px;
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 24%),
    #0a1224;
  border-right: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 8px 0 20px rgba(2, 6, 23, 0.28);
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.38) transparent;
  transition: width 0.24s ease, padding 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, transform 0.24s ease, opacity 0.24s ease;
}

.sidebar-mobile-head,
.sidebar-mobile-section-title {
  display: none;
}

.sidebar-mobile-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-mobile-brand {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

  .sidebar-mobile-brand-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.72);
  }

  .sidebar-mobile-brand-title {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.05;
    color: #ffffff;
    word-break: break-word;
  }

  .sidebar-mobile-close {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }

.sidebar-mobile-section-title {
  margin: 6px 4px 10px;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #bfdbfe;
}

body:not(.login-page) .sidebar-menu::-webkit-scrollbar {
  width: 3px;
}

body:not(.login-page) .sidebar-menu::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

body:not(.login-page) .sidebar-menu::-webkit-scrollbar-track {
  background: transparent;
}

body:not(.login-page) .sidebar-title {
  margin: 2px 4px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.45px;
  text-transform: uppercase;
  line-height: 1.2;
}

.sidebar-context-card {
  margin: 0 4px 12px;
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.2) 0%, rgba(15, 23, 42, 0.82) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 16px 28px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.sidebar-context-card summary {
  list-style: none;
}

.sidebar-context-card summary::-webkit-details-marker {
  display: none;
}

.sidebar-context-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
}

.sidebar-context-summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(226, 232, 240, 0.9);
  border-bottom: 2px solid rgba(226, 232, 240, 0.9);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s ease;
}

.sidebar-context-card[open] .sidebar-context-summary::after {
  transform: rotate(-135deg) translateY(-1px);
}

.sidebar-context-summary-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.sidebar-context-summary-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.88);
}

.sidebar-context-summary-title {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.sidebar-context-summary-current {
  display: block;
  overflow: hidden;
  color: rgba(226, 232, 240, 0.86);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-context-summary-module {
  display: block;
  overflow: hidden;
  color: rgba(148, 197, 253, 0.82);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-context-fields {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.sidebar-system-select {
  margin: 0 4px 10px;
  padding: 6px 28px 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background-color: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  font-size: 10px;
  font-weight: 600;
}

.sidebar-context-fields .sidebar-system-select {
  margin: 0;
}

.sidebar-system-select:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.sidebar .select2-container {
  width: calc(100% - 8px) !important;
  margin: 0 4px 10px;
}

.sidebar-context-fields .select2-container {
  width: 100% !important;
  margin: 0 !important;
}

.sidebar .select2-container--default .select2-selection--single {
  height: auto !important;
  min-height: 44px;
  border-radius: 9px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #e2e8f0 !important;
  display: flex !important;
  align-items: flex-start !important;
  padding: 8px 30px 8px 10px !important;
  box-shadow: none !important;
}

.sidebar .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #f8fafc !important;
  line-height: 1.28 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: none;
  white-space: normal !important;
  word-break: break-word;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sidebar .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: 6px !important;
}

.sidebar .select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #cbd5e1 transparent transparent transparent !important;
}

.sidebar .select2-container--default.select2-container--open .select2-selection--single,
.sidebar .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: rgba(59, 130, 246, 0.85) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18) !important;
}

.sidebar-select2-dropdown {
  background: #24314a !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 12px !important;
  min-width: min(340px, calc(100vw - 24px)) !important;
  max-width: min(420px, calc(100vw - 24px)) !important;
  overflow: hidden;
  box-shadow: 0 20px 32px rgba(2, 6, 23, 0.32);
}

.sidebar-select2-dropdown .select2-results__options {
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.42) rgba(27, 39, 64, 0.96);
}

.sidebar-select2-dropdown .select2-results__options::-webkit-scrollbar {
  width: 10px;
}

.sidebar-select2-dropdown .select2-results__options::-webkit-scrollbar-track {
  background: rgba(27, 39, 64, 0.96);
  border-left: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-select2-dropdown .select2-results__options::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.52) 0%, rgba(59, 130, 246, 0.74) 100%);
  border-radius: 999px;
  border: 2px solid rgba(27, 39, 64, 0.96);
}

.sidebar-select2-dropdown .select2-results__options::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(125, 191, 255, 0.72) 0%, rgba(59, 130, 246, 0.92) 100%);
}

.sidebar-select2-dropdown .select2-search--dropdown {
  background: #1b2740 !important;
  padding: 8px !important;
}

.sidebar-select2-dropdown .select2-search__field {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 8px !important;
}

.sidebar-select2-dropdown .select2-results__option {
  color: #f8fafc !important;
  font-size: 11px;
  line-height: 1.35;
  padding: 10px 12px;
  white-space: normal;
  word-break: break-word;
}

.sidebar-select2-dropdown .select2-results__option[aria-selected="true"],
.sidebar-select2-dropdown .select2-results__option--selected {
  background: rgba(59, 130, 246, 0.16) !important;
  color: #f8fafc !important;
  box-shadow: inset 3px 0 0 rgba(125, 191, 255, 0.95);
  font-weight: 700;
}

.sidebar-select2-dropdown .select2-results__option[aria-selected="true"]::after,
.sidebar-select2-dropdown .select2-results__option--selected::after {
  content: "✓";
  float: right;
  color: rgba(191, 219, 254, 0.95);
  font-weight: 800;
  margin-left: 10px;
}

.sidebar-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.28);
}

.sidebar-select2-dropdown .select2-results__option--highlighted.select2-results__option--selectable::after {
  color: #ffffff;
}

.dashboard-system-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 20px;
  background: linear-gradient(160deg, #1e2d4d 0%, #0f172a 100%);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.dashboard-system-card-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.dashboard-system-card-item:last-child {
  border-bottom: none;
}

.dashboard-system-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.85);
}

.dashboard-system-card-icon {
  opacity: 0.7;
  font-size: 13px !important;
}

.dashboard-system-card-value {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 12px;
}

.dashboard-hero-copy {
  position: relative;
  overflow: hidden;
  padding: 18px 24px;
  border-radius: 20px;
  background: linear-gradient(140deg, #0f172a 0%, #1e2d4d 55%, #1e3a8a 100%);
  border: 1px solid rgba(96, 165, 250, 0.2);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.dashboard-hero-copy::before {
  content: "";
  position: absolute;
  inset: -60px -60px auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22) 0%, rgba(59, 130, 246, 0) 70%);
  pointer-events: none;
}

.dashboard-hero-copy::after {
  content: "";
  position: absolute;
  inset: auto auto -80px -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.3) 0%, rgba(29, 78, 216, 0) 70%);
  pointer-events: none;
}

.dashboard-hero-bg-icon {
  position: absolute !important;
  right: -10px;
  bottom: -18px;
  font-size: 104px !important;
  opacity: 0.05;
  color: #ffffff !important;
  pointer-events: none;
  user-select: none;
}

.dashboard-eyebrow {
  margin: 0 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #93c5fd;
}

.dashboard-eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
}

.dashboard-hero-copy h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.dashboard-hero-text {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.4;
  color: rgba(203, 213, 225, 0.85);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.dashboard-kpi-card {
  position: relative;
  overflow: hidden;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid #dce7f8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 255, 0.96) 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.dashboard-kpi-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -26px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 72%);
  pointer-events: none;
}

.dashboard-kpi-card[data-tone="success"]::before {
  background: linear-gradient(90deg, #16a34a 0%, #4ade80 100%);
}
.dashboard-kpi-card[data-tone="success"]::after {
  background: radial-gradient(circle, rgba(22, 163, 74, 0.12) 0%, rgba(22, 163, 74, 0) 72%);
}
.dashboard-kpi-card[data-tone="success"] .dashboard-kpi-value {
  color: #15803d;
}

.dashboard-kpi-card[data-tone="warning"]::before {
  background: linear-gradient(90deg, #d97706 0%, #fbbf24 100%);
}
.dashboard-kpi-card[data-tone="warning"]::after {
  background: radial-gradient(circle, rgba(217, 119, 6, 0.12) 0%, rgba(217, 119, 6, 0) 72%);
}
.dashboard-kpi-card[data-tone="warning"] .dashboard-kpi-value {
  color: #b45309;
}

.dashboard-kpi-card[data-tone="error"]::before {
  background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
}
.dashboard-kpi-card[data-tone="error"]::after {
  background: radial-gradient(circle, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0) 72%);
}
.dashboard-kpi-card[data-tone="error"] .dashboard-kpi-value {
  color: #b91c1c;
}

.dashboard-kpi-card[data-tone="neutral"]::before {
  background: linear-gradient(90deg, #64748b 0%, #94a3b8 100%);
}
.dashboard-kpi-card[data-tone="neutral"]::after {
  background: radial-gradient(circle, rgba(100, 116, 139, 0.10) 0%, rgba(100, 116, 139, 0) 72%);
}

.dashboard-kpi-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.1);
  margin-bottom: 10px;
}

.dashboard-kpi-icon-wrap .v-icon {
  color: #2563eb;
}

.dashboard-kpi-card[data-tone="success"] .dashboard-kpi-icon-wrap {
  background: rgba(22, 163, 74, 0.1);
}
.dashboard-kpi-card[data-tone="success"] .dashboard-kpi-icon-wrap .v-icon {
  color: #15803d;
}

.dashboard-kpi-card[data-tone="warning"] .dashboard-kpi-icon-wrap {
  background: rgba(217, 119, 6, 0.1);
}
.dashboard-kpi-card[data-tone="warning"] .dashboard-kpi-icon-wrap .v-icon {
  color: #b45309;
}

.dashboard-kpi-card[data-tone="error"] .dashboard-kpi-icon-wrap {
  background: rgba(220, 38, 38, 0.1);
}
.dashboard-kpi-card[data-tone="error"] .dashboard-kpi-icon-wrap .v-icon {
  color: #b91c1c;
}

.dashboard-kpi-card[data-tone="neutral"] .dashboard-kpi-icon-wrap {
  background: rgba(100, 116, 139, 0.1);
}
.dashboard-kpi-card[data-tone="neutral"] .dashboard-kpi-icon-wrap .v-icon {
  color: #475569;
}

.dashboard-kpi-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6b7a92;
}

.dashboard-kpi-value {
  display: block;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 900;
  line-height: 1.05;
  color: #12213f;
}

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-panel {
  padding: 20px 22px;
  border-radius: 22px;
  border: 1px solid #dce7f8;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.dashboard-panel-wide {
  grid-column: 1 / -1;
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-panel-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
}

.dashboard-panel-head h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  color: #172749;
}

.dashboard-sri-wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.dashboard-sri-donut {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(#dbe4f2 0deg 360deg);
  position: relative;
  margin: 0 auto;
}

.dashboard-sri-donut::before {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e5edf9;
}

.dashboard-sri-donut::after {
  content: attr(data-total-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 54px;
  text-align: center;
  white-space: pre-line;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  color: #152544;
}

.dashboard-sri-legend {
  display: grid;
  gap: 10px;
}

.dashboard-sri-legend-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f8fbff;
  border: 1px solid #e3ebf7;
}

.dashboard-sri-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.dashboard-sri-legend-name {
  font-size: 13px;
  font-weight: 700;
  color: #2f405f;
}

.dashboard-sri-legend-value {
  font-size: 16px;
  font-weight: 900;
  color: #152544;
}

.dashboard-bar-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 260px;
}

.dashboard-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: end;
  gap: 10px;
  min-height: 240px;
}

.dashboard-bar-track {
  height: 180px;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
  border: 1px solid #e1ebf8;
  padding: 10px;
}

.dashboard-bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}

.dashboard-bar-value {
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  color: #2f405f;
}

.dashboard-bar-label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: #64748b;
}

.dashboard-chart-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #dce7f8;
  border-radius: 12px;
  background: #f8fbff;
}

.dashboard-chart-toggle button {
  min-width: 58px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.dashboard-chart-toggle button.is-active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.dashboard-seller-sales-panel {
  overflow: hidden;
}

.dashboard-seller-sales-head {
  align-items: flex-start;
}

.dashboard-seller-sales-summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e2ebf8;
  border-radius: 14px;
  background: #f8fbff;
}

.dashboard-seller-sales-summary span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-seller-sales-summary strong {
  font-size: 22px;
  font-weight: 900;
  color: #172749;
}

.dashboard-seller-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 14px;
  align-items: end;
  min-height: 270px;
}

.dashboard-seller-bar-chart > .dashboard-empty-state {
  grid-column: 1 / -1;
}

.dashboard-seller-bar-item {
  display: grid;
  grid-template-rows: 1fr auto auto auto;
  align-items: end;
  gap: 8px;
  min-height: 250px;
  min-width: 0;
}

.dashboard-seller-bar-track {
  height: 178px;
  display: flex;
  align-items: end;
  justify-content: center;
  padding: 10px;
  border: 1px solid #e1ebf8;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf3fb 100%);
}

.dashboard-seller-bar-fill {
  width: 100%;
  min-height: 8px;
  border-radius: 14px 14px 8px 8px;
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
  box-shadow: 0 12px 20px rgba(37, 99, 235, 0.22);
}

.dashboard-seller-bar-value,
.dashboard-seller-bar-label,
.dashboard-seller-bar-count {
  min-width: 0;
  text-align: center;
}

.dashboard-seller-bar-value {
  font-size: 12px;
  font-weight: 900;
  color: #172749;
}

.dashboard-seller-bar-label {
  overflow: hidden;
  color: #2f405f;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-seller-bar-count {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-top-list {
  display: grid;
  gap: 12px;
}

.dashboard-top-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #f9fbff;
}

.dashboard-top-main {
  min-width: 0;
}

.dashboard-top-name {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 800;
  color: #172749;
}

.dashboard-top-bar {
  height: 10px;
  border-radius: 999px;
  background: #e5edf9;
  overflow: hidden;
}

.dashboard-top-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #14b8a6 0%, #2563eb 100%);
}

.dashboard-top-value {
  font-size: 16px;
  font-weight: 900;
  color: #172749;
}

.dashboard-activity-list {
  display: grid;
  gap: 10px;
}

.dashboard-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #fbfdff;
}

.dashboard-activity-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #eaf2ff;
  color: #1d4ed8;
}

.dashboard-activity-main {
  min-width: 0;
}

.dashboard-activity-title {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: #172749;
}

.dashboard-activity-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-activity-time {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-align: right;
}

.dashboard-empty-state {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  background: #f8fbff;
}

.dashboard-license-board {
  margin-bottom: 20px;
}

.dashboard-license-panel-head {
  align-items: flex-start;
}

.dashboard-license-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.8fr);
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-license-overview-copy {
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid #e2ebf8;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.11), transparent 42%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dashboard-license-status-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.dashboard-license-badge {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #e5edf9;
  color: #1e293b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.dashboard-license-badge[data-tone="success"] {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.dashboard-license-badge[data-tone="warning"] {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.dashboard-license-badge[data-tone="error"] {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.dashboard-license-inline-message {
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.dashboard-license-overview-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.1;
  color: #172749;
}

.dashboard-license-overview-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.65;
  color: #52627d;
}

.dashboard-license-compact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #f8fbff;
  color: #334155;
}

.dashboard-license-compact-line strong {
  font-size: 14px;
  font-weight: 900;
  color: #172749;
}

.dashboard-license-compact-line span {
  font-size: 13px;
  color: #64748b;
}

.dashboard-license-summary-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 100%;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid #dce7f8;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 46%),
    linear-gradient(160deg, #eef4ff 0%, #f8fbff 60%, #fefcff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.dashboard-license-summary-card[data-tone="warning"] {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 46%),
    linear-gradient(160deg, #fff8eb 0%, #fffdf8 100%);
  border-color: rgba(245, 158, 11, 0.24);
}

.dashboard-license-summary-card[data-tone="error"] {
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 46%),
    linear-gradient(160deg, #fff3f3 0%, #fffafa 100%);
  border-color: rgba(220, 38, 38, 0.18);
}

.dashboard-license-summary-card[data-tone="success"] {
  background:
    radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 46%),
    linear-gradient(160deg, #eefcf4 0%, #f9fffb 100%);
  border-color: rgba(34, 197, 94, 0.18);
}

.dashboard-license-summary-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.dashboard-license-summary-value {
  font-size: clamp(34px, 3vw, 42px);
  font-weight: 900;
  line-height: 1;
  color: #132448;
}

.dashboard-license-summary-caption {
  font-size: 13px;
  color: #52627d;
}

.dashboard-license-summary-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  color: #64748b;
}

.dashboard-license-summary-meta strong {
  font-size: 15px;
  font-weight: 900;
  color: #172749;
}

.dashboard-license-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-license-card {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid #e2ebf8;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.dashboard-license-card:nth-child(1) {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 44%),
    linear-gradient(180deg, #f4f9ff 0%, #ffffff 100%);
}

.dashboard-license-card:nth-child(2) {
  background:
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.12), transparent 44%),
    linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.dashboard-license-card:nth-child(3) {
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.12), transparent 44%),
    linear-gradient(180deg, #f0fdf9 0%, #ffffff 100%);
}

.dashboard-license-card-label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.dashboard-license-card-value {
  display: block;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.2;
  color: #172749;
}

.dashboard-license-types {
  display: grid;
  gap: 10px;
}

.dashboard-license-history {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.dashboard-license-history-list {
  display: grid;
  gap: 10px;
}

.dashboard-license-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #fbfdff;
}

.dashboard-license-history-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-license-history-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-license-history-badge[data-current="1"] {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}

.dashboard-license-types-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dashboard-license-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-license-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #dbe4f4;
  background: #f8fbff;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.dashboard-superadmin-board {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.9) 0%, rgba(240, 247, 255, 0.85) 100%);
  border: 1px solid #dce7f8;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.dashboard-superadmin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-superadmin-head h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.05;
  color: #172749;
  letter-spacing: -0.01em;
}

.dashboard-superadmin-intro {
  max-width: 62ch;
  margin: 8px 0 0;
  color: #52627d;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-superadmin-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-superadmin-updated {
  font-size: 11px;
  font-weight: 700;
  color: #8898aa;
  letter-spacing: 0.01em;
}

.dashboard-superadmin-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 2px;
}

.dashboard-superadmin-section-heading > div {
  display: grid;
  gap: 0;
}

.dashboard-superadmin-section-heading span {
  color: #172749;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-superadmin-section-heading p,
.dashboard-superadmin-section-heading small {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.dashboard-superadmin-section-heading--documents {
  padding-top: 6px;
  border-top: 1px solid #dce7f8;
}

.dashboard-superadmin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-superadmin-kpi-grid--operational {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card:nth-child(-n + 4) {
  grid-column: span 3;
}

.dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card:nth-child(n + 5) {
  /* Segunda fila: cuatro tarjetas del mismo ancho que la fila superior. */
  grid-column: span 3;
}

.dashboard-superadmin-kpi-grid--documents {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-superadmin-kpi-card {
  position: relative;
  padding: 12px 14px;
  min-height: 102px;
  border-radius: 16px;
  border: 1px solid #dce7f8;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.dashboard-superadmin-kpi-card--document {
  min-height: 102px;
  overflow: hidden;
}

.dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card,
.dashboard-superadmin-kpi-grid--documents > .dashboard-superadmin-kpi-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 9px;
  row-gap: 4px;
  align-content: start;
}

.dashboard-superadmin-kpi-grid--operational .dashboard-superadmin-kpi-icon-wrap {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
}

.dashboard-superadmin-kpi-grid--operational .dashboard-superadmin-kpi-label,
.dashboard-superadmin-kpi-grid--documents .dashboard-superadmin-kpi-label {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  margin: 0;
}

.dashboard-superadmin-kpi-grid--operational .dashboard-superadmin-kpi-value,
.dashboard-superadmin-kpi-grid--operational .dashboard-superadmin-kpi-avatar-stack,
.dashboard-superadmin-kpi-grid--operational .dashboard-superadmin-kpi-caption,
.dashboard-superadmin-kpi-grid--documents .dashboard-superadmin-kpi-value {
  grid-column: 1 / -1;
}

.dashboard-superadmin-kpi-grid--documents .dashboard-superadmin-kpi-card__topline {
  grid-column: 1;
  grid-row: 1;
}

.dashboard-superadmin-kpi-grid--documents .dashboard-superadmin-kpi-icon-wrap {
  margin: 0;
}

.dashboard-superadmin-kpi-card__topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.dashboard-superadmin-kpi-card__source {
  padding: 5px 8px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dashboard-superadmin-kpi-card[data-tone="warning"] .dashboard-superadmin-kpi-card__source {
  border-color: rgba(180, 83, 9, 0.22);
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.dashboard-superadmin-kpi-card[data-tone="error"] .dashboard-superadmin-kpi-card__source {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
}

.dashboard-superadmin-kpi-card--button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-superadmin-kpi-card--button:hover {
  transform: translateY(-2px);
  border-color: #bfd3f3;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
}

.dashboard-superadmin-kpi-card--button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-superadmin-kpi-card--button {
    transition: none;
  }

  .dashboard-superadmin-kpi-card--button:hover {
    transform: none;
  }
}

.dashboard-superadmin-kpi-card[data-tone="success"] {
  background:
    radial-gradient(circle at top right, rgba(22, 163, 74, 0.14), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #f4fff9 100%);
}

.dashboard-superadmin-kpi-card[data-tone="warning"] {
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.14), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.dashboard-superadmin-kpi-card[data-tone="error"] {
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.14), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #fff5f5 100%);
}

.dashboard-superadmin-kpi-card[data-tone="muted"] {
  background:
    radial-gradient(circle at top right, rgba(100, 116, 139, 0.14), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-superadmin-kpi-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(37, 99, 235, 0.12);
  margin-bottom: 7px;
}

.dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #2563eb;
}

.dashboard-superadmin-kpi-card[data-tone="success"] .dashboard-superadmin-kpi-icon-wrap {
  background: rgba(22, 163, 74, 0.12);
}
.dashboard-superadmin-kpi-card[data-tone="success"] .dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #15803d;
}

.dashboard-superadmin-kpi-card[data-tone="warning"] .dashboard-superadmin-kpi-icon-wrap {
  background: rgba(217, 119, 6, 0.12);
}
.dashboard-superadmin-kpi-card[data-tone="warning"] .dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #b45309;
}

.dashboard-superadmin-kpi-card[data-tone="error"] .dashboard-superadmin-kpi-icon-wrap {
  background: rgba(220, 38, 38, 0.12);
}
.dashboard-superadmin-kpi-card[data-tone="error"] .dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #b91c1c;
}

.dashboard-superadmin-kpi-card[data-tone="muted"] .dashboard-superadmin-kpi-icon-wrap {
  background: rgba(100, 116, 139, 0.12);
}
.dashboard-superadmin-kpi-card[data-tone="muted"] .dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #475569;
}

.dashboard-superadmin-kpi-card[data-tone="neutral"] .dashboard-superadmin-kpi-icon-wrap {
  background: rgba(100, 116, 139, 0.1);
}
.dashboard-superadmin-kpi-card[data-tone="neutral"] .dashboard-superadmin-kpi-icon-wrap .v-icon {
  color: #64748b;
}

.dashboard-superadmin-kpi-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #64748b;
}

.dashboard-superadmin-kpi-value {
  display: block;
  font-size: clamp(23px, 1.7vw, 29px);
  font-weight: 900;
  line-height: 1.05;
  color: #142545;
}

.dashboard-superadmin-kpi-avatar-stack {
  display: flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 2px;
  isolation: isolate;
}

.dashboard-superadmin-kpi-avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: -8px;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.dashboard-superadmin-kpi-avatar:first-child {
  margin-left: 0;
}

.dashboard-superadmin-kpi-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-superadmin-kpi-avatar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.dashboard-superadmin-kpi-avatar[data-tone="warning"] {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.dashboard-superadmin-kpi-avatar[data-tone="success"] {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.dashboard-superadmin-kpi-avatar[data-tone="muted"] {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.dashboard-superadmin-kpi-avatar--more {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  font-size: 12px;
}

.dashboard-superadmin-tooltip {
  border-radius: 22px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.dashboard-superadmin-tooltip-card {
  min-width: 260px;
  max-width: 300px;
  padding: 14px 15px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(30, 41, 59, 0.98) 100%);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.28);
  color: #f8fafc;
}

.dashboard-superadmin-tooltip-card--compact {
  min-width: 220px;
  max-width: 260px;
}

.dashboard-superadmin-tooltip-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-superadmin-tooltip-card__avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.24);
}

.dashboard-superadmin-tooltip-card__avatar[data-tone="warning"] {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
}

.dashboard-superadmin-tooltip-card__avatar[data-tone="success"] {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.dashboard-superadmin-tooltip-card__avatar[data-tone="muted"] {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.dashboard-superadmin-tooltip-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-superadmin-tooltip-card__avatar span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.dashboard-superadmin-tooltip-card__title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dashboard-superadmin-tooltip-card__title strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
}

.dashboard-superadmin-tooltip-card__title span {
  color: rgba(226, 232, 240, 0.82);
  font-size: 12px;
  line-height: 1.3;
}

.dashboard-superadmin-tooltip-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.dashboard-superadmin-tooltip-card__grid div {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.dashboard-superadmin-tooltip-card__grid span,
.dashboard-superadmin-tooltip-card--compact span {
  color: rgba(226, 232, 240, 0.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-superadmin-tooltip-card__grid strong,
.dashboard-superadmin-tooltip-card--compact strong {
  color: #ffffff;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
}

.dashboard-superadmin-tooltip-card--compact {
  display: grid;
  gap: 4px;
}

.dashboard-superadmin-kpi-caption {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: #64748b;
}

.dashboard-superadmin-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.85fr);
  gap: 18px;
}

.dashboard-superadmin-table {
  display: grid;
  gap: 10px;
}

.dashboard-superadmin-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) 90px 90px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #fbfdff;
}

.dashboard-superadmin-table-row--head {
  background: transparent;
  border: 0;
  padding: 0 6px 4px;
}

.dashboard-superadmin-table-row--head span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dashboard-superadmin-system {
  min-width: 0;
}

.dashboard-superadmin-system strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #172749;
}

.dashboard-superadmin-system span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}

.dashboard-superadmin-cell {
  display: grid;
  gap: 3px;
}

.dashboard-superadmin-cell strong {
  font-size: 14px;
  font-weight: 900;
  color: #172749;
}

.dashboard-superadmin-cell span {
  font-size: 12px;
  color: #64748b;
}

.dashboard-superadmin-session-list {
  display: grid;
  gap: 10px;
}

.dashboard-superadmin-session-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #e2ebf8;
  background: #fbfdff;
}

.dashboard-superadmin-session-item strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #172749;
}

.dashboard-superadmin-session-item p {
  margin: 4px 0 0;
  font-size: 12px;
  color: #64748b;
}

.dashboard-superadmin-session-meta {
  text-align: right;
}

.dashboard-superadmin-session-meta span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #172749;
}

.dashboard-superadmin-session-meta small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #64748b;
}

.dashboard-insight-dialog .v-overlay__content {
  max-height: min(820px, calc(100vh - 40px));
}

.dashboard-insight-card {
  overflow: hidden;
  border: 1px solid #dce7f6;
  border-radius: 24px !important;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 35, 75, 0.2) !important;
}

.dashboard-insight-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #edf2f9;
}

.dashboard-insight-heading {
  display: flex;
  min-width: 0;
  gap: 16px;
  align-items: center;
}

.dashboard-insight-heading__icon,
.dashboard-superadmin-dialog-item__icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: #1769e0;
  background: #edf4ff;
}

.dashboard-insight-heading__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
}

.dashboard-insight-heading__icon[data-tone="success"],
.dashboard-superadmin-dialog-item__icon[data-tone="success"] {
  color: #16854d;
  background: #e9f8ef;
}

.dashboard-insight-heading__icon[data-tone="warning"],
.dashboard-superadmin-dialog-item__icon[data-tone="warning"] {
  color: #c96a0a;
  background: #fff2df;
}

.dashboard-insight-heading__icon[data-tone="error"],
.dashboard-superadmin-dialog-item__icon[data-tone="error"] {
  color: #d22f37;
  background: #ffebec;
}

.dashboard-insight-heading__icon[data-tone="muted"],
.dashboard-superadmin-dialog-item__icon[data-tone="muted"] {
  color: #66758f;
  background: #eef2f6;
}

.dashboard-insight-heading h2 {
  margin: 0;
  color: #10264f;
  font-size: clamp(20px, 2.5vw, 27px);
  font-weight: 900;
  letter-spacing: -0.025em;
}

.dashboard-insight-heading p {
  max-width: 640px;
  margin: 5px 0 0;
  color: #60708b;
  font-size: 13px;
  line-height: 1.45;
}

.dashboard-insight-content {
  padding: 18px 26px 14px !important;
}

.dashboard-insight-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-insight-stat {
  display: flex;
  min-width: 0;
  min-height: 78px;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid #dbe8f9;
  border-radius: 15px;
  color: #1769e0;
  background: linear-gradient(135deg, #f6f9ff 0%, #eef5ff 100%);
}

.dashboard-insight-stat[data-tone="success"] {
  color: #15854c;
  border-color: #d7eee2;
  background: linear-gradient(135deg, #f7fcf9 0%, #ebf9f1 100%);
}

.dashboard-insight-stat[data-tone="warning"] {
  color: #bf680f;
  border-color: #f3dfc5;
  background: linear-gradient(135deg, #fffdfa 0%, #fff4e6 100%);
}

.dashboard-insight-stat[data-tone="error"] {
  color: #ce3038;
  border-color: #f5dfe0;
  background: linear-gradient(135deg, #fffafa 0%, #fff0f1 100%);
}

.dashboard-insight-stat[data-tone="violet"] {
  color: #6449c4;
  border-color: #e6ddfa;
  background: linear-gradient(135deg, #fcfbff 0%, #f3efff 100%);
}

.dashboard-insight-stat span {
  display: block;
  color: #6d7d97;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-insight-stat > div {
  min-width: 0;
  flex: 1 1 auto;
}

.dashboard-insight-stat strong {
  display: block;
  margin-top: 2px;
  color: #112750;
  font-size: clamp(16px, 1.55vw, 21px);
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.dashboard-insight-loading {
  display: flex;
  min-height: 220px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #5b6c88;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-superadmin-dialog-list {
  display: grid;
  gap: 9px;
}

.dashboard-superadmin-dialog-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(140px, 240px);
  gap: 13px;
  align-items: start;
  min-height: 72px;
  padding: 11px 14px;
  border: 1px solid #dde8f7;
  border-left: 3px solid #3b82f6;
  border-radius: 14px;
  background: #fbfdff;
}

.dashboard-superadmin-dialog-item[data-tone="success"] { border-left-color: #20a464; }
.dashboard-superadmin-dialog-item[data-tone="warning"] { border-left-color: #e38a23; }
.dashboard-superadmin-dialog-item[data-tone="error"] { border-left-color: #e14a51; }
.dashboard-superadmin-dialog-item[data-tone="muted"] { border-left-color: #8190a8; }

.dashboard-superadmin-dialog-item__icon {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 900;
  margin-top: 1px;
}

.dashboard-superadmin-dialog-item__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dashboard-superadmin-dialog-item__body {
  min-width: 0;
}

.dashboard-superadmin-dialog-item strong {
  display: block;
  overflow: hidden;
  color: #172749;
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-superadmin-dialog-item p {
  overflow: hidden;
  margin: 3px 0 0;
  color: #65758e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-superadmin-dialog-badges {
  display: inline-flex;
  gap: 5px;
  margin-top: 4px;
}

.dashboard-superadmin-dialog-badge {
  padding: 2px 6px;
  border-radius: 999px;
  color: #1769e0;
  background: #eaf2ff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
}

.dashboard-superadmin-dialog-meta {
  min-width: 0;
  text-align: right;
}

.dashboard-superadmin-dialog-meta span {
  display: block;
  overflow-wrap: break-word;
  color: #172749;
  font-size: 12px;
  font-weight: 900;
}

.dashboard-superadmin-dialog-meta small {
  display: block;
  overflow-wrap: break-word;
  margin-top: 3px;
  color: #71819a;
  font-size: 10px;
  line-height: 1.35;
}

.dashboard-insight-actions {
  min-height: 66px;
  padding: 12px 26px 18px !important;
  border-top: 1px solid #edf2f9;
}

.dashboard-insight-actions > span {
  color: #71819a;
  font-size: 11px;
  font-weight: 700;
}

.dashboard-insight-content .vc-cursor-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: 100%;
  max-width: 100%;
  padding-right: 0 !important;
  text-align: center;
}

.dashboard-insight-content .vc-cursor-pagination__summary {
  width: 100%;
  text-align: center;
}

.dashboard-insight-content .vc-cursor-pagination__actions {
  justify-content: center;
  width: 100%;
}

@media (max-width: 1180px) {
  .dashboard-hero,
  .dashboard-analytics-grid,
  .dashboard-license-overview,
  .dashboard-superadmin-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-superadmin-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card {
    grid-column: auto;
  }

  .dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card:last-child:nth-child(odd),
  .dashboard-superadmin-kpi-grid--documents > .dashboard-superadmin-kpi-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .dashboard-license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-sri-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-copy h2 {
    font-size: clamp(28px, 4.8vw, 44px);
    line-height: 1.02;
  }

  .dashboard-panel-head h3 {
    font-size: clamp(20px, 2.4vw, 24px);
    line-height: 1.12;
  }

  .dashboard-superadmin-head h3 {
    font-size: clamp(22px, 2.8vw, 28px);
  }

  .dashboard-license-overview-title {
    font-size: clamp(18px, 2.2vw, 22px);
  }

  .dashboard-license-summary-value {
    font-size: clamp(28px, 4vw, 38px);
  }
}

@media (max-width: 900px) {
  .dashboard-superadmin-table {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .dashboard-superadmin-table-row {
    min-width: 720px;
  }

  .dashboard-superadmin-table-row--head {
    padding-left: 2px;
    padding-right: 2px;
  }
}

@media (max-width: 720px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-superadmin-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-superadmin-kpi-grid--operational > .dashboard-superadmin-kpi-card,
  .dashboard-superadmin-kpi-grid--documents > .dashboard-superadmin-kpi-card {
    grid-column: auto;
  }

  .dashboard-license-status-row,
  .dashboard-license-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-superadmin-head {
    flex-direction: column;
  }

  .dashboard-superadmin-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-superadmin-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .dashboard-superadmin-table-row {
    grid-template-columns: 1fr;
  }

  .dashboard-superadmin-table-row--head {
    display: none;
  }

  .dashboard-superadmin-session-item {
    grid-template-columns: 1fr;
  }

  .dashboard-superadmin-session-meta {
    text-align: left;
  }

  .dashboard-superadmin-dialog-item {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .dashboard-superadmin-dialog-meta {
    grid-column: 2;
    text-align: left;
  }

  .dashboard-insight-header {
    padding: 18px;
  }

  .dashboard-insight-heading {
    align-items: flex-start;
  }

  .dashboard-insight-heading__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }

  .dashboard-insight-heading p {
    display: none;
  }

  .dashboard-insight-content {
    padding: 14px 18px 10px !important;
  }

  .dashboard-insight-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-insight-stat {
    min-height: 62px;
  }

  .dashboard-insight-actions {
    padding: 10px 18px 14px !important;
  }

  .dashboard-insight-actions > span {
    display: none;
  }

  .dashboard-license-compact-line {
    align-items: flex-start;
  }

  .dashboard-license-summary-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-bar-chart {
    gap: 8px;
  }

  .dashboard-seller-sales-head,
  .dashboard-seller-sales-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-chart-toggle {
    width: 100%;
  }

  .dashboard-chart-toggle button {
    flex: 1;
  }

  .dashboard-seller-bar-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-panel {
    padding: 16px;
  }

  .dashboard-hero-copy {
    padding: 20px;
  }

  .dashboard-hero-copy h2 {
    font-size: clamp(24px, 8vw, 34px);
  }

  .dashboard-panel-head h3 {
    font-size: 20px;
  }

  .dashboard-superadmin-head h3 {
    font-size: 22px;
  }

  .dashboard-license-overview-copy {
    padding: 16px;
  }

  .dashboard-license-summary-card {
    padding: 16px;
  }
}

.sidebar-module-card {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  margin-left: 6px;
  padding: 2px 4px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.sidebar-module-card:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.22);
}

.sidebar-module-card-link {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  text-decoration: none;
  padding: 7px 10px 7px 24px;
  margin: 0;
  border: 0 !important;
  background: transparent !important;
  border-radius: 7px;
  position: relative;
  font-size: 12px;
  line-height: 1.25;
  color: #aebed4;
}

.sidebar-module-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.sidebar-module-card-name {
  display: inline-block;
  margin-left: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-module-card-link::before {
  display: none;
}

.sidebar-submenu-item {
  margin: 0;
}

.sidebar-submenu-entry {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-left: 8px;
}

.sidebar-module-link {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-module-link span:last-child {
  display: inline-block;
  line-height: 1.18;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: normal;
}

.sidebar-module-action-btn {
  flex: 0 0 auto;
  width: 14px;
  min-height: 28px;
  align-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(226, 232, 240, 0.82);
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  padding: 0;
  position: relative;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sidebar-module-action-btn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -65%) rotate(45deg);
}

.sidebar-module-action-btn:hover {
  color: #f8fafc;
  transform: translateX(1px);
}

.sidebar-module-action-btn.is-pinned {
  color: #93c5fd;
}

@media (hover: hover) and (pointer: fine) {
  .sidebar-submenu-entry .sidebar-module-action-btn {
    opacity: 0;
    transform: translateX(4px);
    pointer-events: none;
  }

  .sidebar-submenu-entry:hover .sidebar-module-action-btn,
  .sidebar-submenu-entry:focus-within .sidebar-module-action-btn {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
  }
}

.sidebar-module-action-menu {
  position: fixed;
  z-index: 2600;
  min-width: 172px;
  padding: 8px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.86) 0%, rgba(17, 24, 39, 0.82) 100%);
  box-shadow: 0 16px 28px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(14px);
}

.sidebar-module-action-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 1px 0 rgba(15, 23, 42, 0.35);
}

.sidebar-module-action-menu-item::before {
  content: "•";
  color: #93c5fd;
  font-size: 15px;
  line-height: 1;
}

.sidebar-module-action-menu-item:hover {
  background: rgba(37, 99, 235, 0.12);
}

.sidebar-module-action-menu-item:disabled,
.sidebar-module-action-menu-item[aria-disabled="true"] {
  opacity: 0.42;
  cursor: not-allowed;
  background: transparent;
}

.sidebar-modules-submenu {
  gap: 6px;
}

.sidebar-module-group {
  margin-left: 0;
  padding: 0;
}

.sidebar-module-group-title {
  margin: 0 0 3px 6px;
  font-size: 10px;
  font-weight: 800;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.sidebar-module-list {
  display: grid;
  gap: 2px;
}

.sidebar-module-empty {
  margin-left: 6px;
  padding: 6px 8px;
  border: 1px dashed rgba(148, 163, 184, 0.18);
  border-radius: 7px;
  color: #94a3b8;
  font-size: 10px;
  background: rgba(15, 23, 42, 0.22);
}

.dashboard-modules-board {
  margin: 18px 0 20px;
  padding: 18px 20px;
  border: 1px solid #d6deea;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.dashboard-modules-board-header {
  margin-bottom: 14px;
}

.dashboard-modules-board-header h3 {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
}

.dashboard-modules-board-header p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 14px;
}

.dashboard-modules-spotlight {
  margin-bottom: 18px;
}

.dashboard-modules-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.dashboard-modules-rail::-webkit-scrollbar {
  height: 8px;
}

.dashboard-modules-rail::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
}

.dashboard-modules-title {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.dashboard-spotlight-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 156px;
  padding: 16px;
  border: 1px solid #dce5f2;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-spotlight-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.dashboard-spotlight-label {
  font-size: 12px;
  font-weight: 800;
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

.dashboard-spotlight-pin {
  width: 36px;
  height: 36px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #ffffff;
  color: #64748b;
}

.dashboard-spotlight-pin.is-pinned {
  color: #b45309;
  border-color: #f3d28a;
  background: #fff7d9;
}

.dashboard-spotlight-name {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
  line-height: 1.05;
}

.dashboard-spotlight-meta {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.dashboard-spotlight-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.dashboard-modules-tabs {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 6px;
  border-radius: 999px;
  background: #edf4fb;
}

.dashboard-modules-tab {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-modules-tab.is-active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.24);
}

.dashboard-modules-panel {
  display: none;
}

.dashboard-modules-panel.is-active {
  display: block;
}

.dashboard-modules-table {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.dashboard-module-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 180px 150px 48px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #edf2f7;
}

.dashboard-module-row:last-child {
  border-bottom: 0;
}

.dashboard-module-row:hover {
  background: #f8fbff;
}

.dashboard-module-main {
  min-width: 0;
}

.dashboard-module-name {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-module-sub {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 13px;
}

.dashboard-module-col {
  color: #475569;
  font-size: 13px;
}

.dashboard-module-action {
  width: 36px;
  height: 36px;
  border: 1px solid #d9e2ef;
  border-radius: 12px;
  background: #ffffff;
  color: #64748b;
  cursor: pointer;
}

.dashboard-module-action:hover {
  border-color: #c6d4e7;
  background: #f8fbff;
}

.dashboard-module-action.is-pinned {
  color: #b45309;
  border-color: #f3d28a;
  background: #fff7d9;
}

.dashboard-module-empty {
  padding: 12px;
  border: 1px dashed #cdd8e7;
  border-radius: 12px;
  color: #64748b;
  font-size: 13px;
  background: #f8fbff;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  z-index: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.16) transparent;
  padding-right: 1px;
}

.sidebar-menu .admin-sticky-menu {
  position: relative;
  top: auto;
  z-index: 1;
  background: transparent;
  padding-top: 2px;
  padding-bottom: 2px;
}

.sidebar-user-footer {
  margin: auto 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.82);
  text-decoration: none;
}

.sidebar-user-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(15, 23, 42, 0.18));
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-avatar-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sidebar-user-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-user-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
  word-break: break-word;
}

.sidebar-user-role {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #93c5fd;
  line-height: 1.2;
}

.sidebar-user-link {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #bfdbfe;
  line-height: 1.2;
}

.sidebar-menu > li {
  margin: 0;
}

.sidebar-menu hr {
  border: 0;
  height: 1px;
  margin: 10px 8px;
  background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.46), transparent);
}

.sidebar-menu > li > a,
.submenu-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-menu > li > a:hover,
.submenu-toggle:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  transform: translateX(1px);
}

.sidebar-menu > li > a.active {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.25), rgba(37, 99, 235, 0.08));
  border-color: rgba(59, 130, 246, 0.42);
  color: #ffffff;
}

.submenu-toggle {
  justify-content: space-between;
}

.submenu-toggle::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.has-submenu.open > .submenu-toggle {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(37, 99, 235, 0.06));
  border-color: rgba(59, 130, 246, 0.35);
  color: #ffffff;
}

.has-submenu.open > .submenu-toggle::after {
  transform: rotate(45deg);
  border-color: #c7d2fe;
}

.sidebar-submenu {
  margin-top: 2px;
  padding-left: 0;
  display: grid;
  gap: 2px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.26s ease, opacity 0.18s ease, transform 0.18s ease;
}

.has-submenu.open > .sidebar-submenu {
  max-height: var(--vc-submenu-max-height, 1200px);
  overflow: visible;
  opacity: 1;
  padding-bottom: 8px;
  transform: translateY(0);
}

.sidebar-submenu a {
  position: relative;
  margin-left: 6px;
  padding: 7px 10px 7px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: #aebed4;
  font-size: 12px;
  line-height: 1.25;
}

.sidebar-submenu a::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.62);
  transform: translateY(-50%);
}

.sidebar-submenu a:hover,
.sidebar-submenu a.active {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(148, 163, 184, 0.22);
  color: #f1f5f9;
}

@media (max-width: 1024px) {
  body:not(.login-page) .sidebar {
    width: 214px;
    padding: 10px 8px 12px;
  }

  .dashboard-module-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* =====================================================
   GLOBAL ERP FORMS THEME
===================================================== */
body:not(.login-page) .content > h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

body:not(.login-page) .content > .table-header {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body:not(.login-page) .content > .table-header .search-container {
  position: relative;
}

body:not(.login-page) .content > .table-header .search-container::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

body:not(.login-page) .content > .table-header .search-container input {
  width: 320px;
  max-width: 42vw;
  padding: 10px 12px 10px 30px;
  border-radius: 10px;
  border: 1px solid #c7d4e5;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

body:not(.login-page) .content > .table-header .btn-primary {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.27);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

body:not(.login-page) .content > .table-header .btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

body:not(.login-page) .content > .table-header .btn-lote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #bfd3fb;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 244, 255, 0.98));
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body:not(.login-page) .content > .table-header .btn-lote:hover {
  transform: translateY(-1px);
  border-color: #93c5fd;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(225, 236, 255, 1));
  box-shadow: 0 12px 24px rgba(59, 130, 246, 0.18);
}

body:not(.login-page) .content > .table-header .btn-lote:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(59, 130, 246, 0.16),
    0 12px 24px rgba(59, 130, 246, 0.18);
}

body:not(.login-page) .content > .table-wrapper {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

body:not(.login-page) .content > table {
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

body:not(.login-page) .content > .table-wrapper > table,
body:not(.login-page) .content > table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

body:not(.login-page) .content > .table-wrapper > table thead th,
body:not(.login-page) .content > table thead th {
  background: #eef3fb;
  color: #0b1c40;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 13px 14px;
  border-bottom: 1px solid #dbe3ef;
}

body:not(.login-page) .content > .table-wrapper > table tbody td,
body:not(.login-page) .content > table tbody td {
  color: #1e293b;
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef7;
  font-size: 14px;
  vertical-align: middle;
}

.factura-fecha-cell {
  min-width: 104px;
}

.factura-fecha-value {
  display: inline-block;
  white-space: nowrap;
}

#facturaTableHead th,
#facturaTable td {
  font-size: 11px !important;
  line-height: 1.15;
  white-space: nowrap;
}

#facturaTableHead th {
  padding: 8px 10px !important;
}

#facturaTable td {
  padding: 8px 10px !important;
}

.factura-serie-cell {
  min-width: 96px;
  width: 96px;
}

.factura-numero-cell {
  min-width: 96px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-fecha {
  width: 104px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-serie {
  width: 108px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-numero {
  width: 104px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-cliente {
  width: 240px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-neto {
  width: 104px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-estado {
  width: 96px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-sri {
  width: 72px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-retencion {
  width: 220px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-conversion {
  width: 110px;
}

.factura-list-table-wrap > .factura-list-table col.factura-col-acciones {
  width: 128px;
}

.factura-serie-value {
  display: inline-block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

body:not(.login-page) .content > .table-wrapper > table tbody tr:hover,
body:not(.login-page) .content > table tbody tr:hover {
  background: #f8fbff;
}

body:not(.login-page) .content > .pagination-container {
  margin-top: 14px;
}

body:not(.login-page) .content > .pagination-container .pagination {
  border: 1px solid #dbe3ef;
  background: #f9fbff;
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.18);
}

body:not(.login-page) .content > .pagination-container .page-summary {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) {
  backdrop-filter: blur(2px);
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-box {
  max-height: 92vh;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header {
  background: #eef3fb;
  color: #0b1c40;
  border-bottom: 1px solid #dbe3ef;
  padding: 14px 18px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.25px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .btn-danger {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: linear-gradient(180deg, #ffffff, #e2e8f0);
  color: #334155;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
  box-shadow: none;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .btn-danger:hover {
  background: #cbd5e1;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close:hover,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close-btn:hover {
  background: #cbd5e1;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body {
  background: #f2f5fb;
  padding: 18px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body form {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 16px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .form-group label {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body input,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body select,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body textarea {
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid #c7d4e5;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body input:focus,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body select:focus,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .switch-container {
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
  display: inline-flex;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .switch-label {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions {
  border-top: 1px solid #dbe3ef;
  padding: 14px 0 2px;
  background: transparent;
}

body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions .btn-primary,
body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions .btn-danger {
  min-width: 128px;
  min-height: 38px;
  border-radius: 10px;
  font-weight: 700;
}

@media (max-width: 900px) {
  body:not(.login-page) .content > h2 {
    font-size: 24px;
  }

  body:not(.login-page) .content > .table-header {
    gap: 8px;
    flex-wrap: wrap;
  }

  body:not(.login-page) .content > .table-header .search-container input {
    width: 100%;
    max-width: none;
  }

  body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-box {
    width: 98vw;
    border-radius: 12px;
  }
}

/* =====================================================
   PERSONAS ERP 2026
===================================================== */
.personas-page {
  --persona-bg: #f2f5fb;
  --persona-card: #ffffff;
  --persona-border: #dbe3ef;
  --persona-ink: #0f172a;
  --persona-muted: #64748b;
  --persona-primary: #2563eb;
  --persona-primary-dark: #1d4ed8;
  --persona-head: #eef3fb;
  --persona-row-hover: #f8fbff;
  --persona-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.personas-page .personas-title {
  margin: 0 0 14px;
  color: var(--persona-ink);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.personas-page .personas-toolbar {
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border: 1px solid var(--persona-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--persona-shadow);
}

.personas-page .personas-search {
  position: relative;
}

.personas-page .personas-search::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 13px;
  pointer-events: none;
}

.personas-page .personas-search input {
  width: 320px;
  max-width: 42vw;
  padding: 10px 12px 10px 30px;
  border-radius: 10px;
  border: 1px solid #c7d4e5;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

.personas-page #btnNuevoPersona {
  background: linear-gradient(135deg, #2563eb, #1e40af);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.27);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.personas-page #btnNuevoPersona:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
}

.personas-page .personas-table-wrap {
  border: 1px solid var(--persona-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--persona-shadow);
  background: var(--persona-card);
}

.personas-page .personas-table {
  margin: 0;
  width: 100%;
  border-collapse: collapse;
}

.personas-page .personas-table thead th {
  background: var(--persona-head);
  color: #0b1c40;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.2px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--persona-border);
}

.personas-page .personas-table tbody td {
  color: #1e293b;
  padding: 12px 14px;
  border-bottom: 1px solid #e8eef7;
  font-size: 14px;
  vertical-align: middle;
}

.personas-page .personas-table tbody tr:hover {
  background: var(--persona-row-hover);
}

.personas-page .personas-table th:last-child,
.personas-page .personas-table td:last-child {
  text-align: right;
}

.personas-page .personas-table td:last-child .page-btn {
  min-width: 84px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.2);
}

.personas-page .personas-table td:last-child .btn-danger {
  margin-left: 6px;
}

.personas-page .pagination-container {
  margin-top: 14px;
}

.personas-page .pagination {
  border: 1px solid var(--persona-border);
  background: #f9fbff;
  box-shadow: 0 6px 14px rgba(148, 163, 184, 0.18);
}

.personas-page .page-summary {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.25px;
}

.personas-page .persona-modal {
  backdrop-filter: blur(2px);
}

.personas-page .persona-modal-box {
  width: min(1280px, 96vw);
  max-width: 1280px;
  max-height: 92vh;
  border-radius: 14px;
  border: 1px solid var(--persona-border);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.personas-page .persona-modal-header {
  background: #eef3fb;
  color: #0b1c40;
  border-bottom: 1px solid #dbe3ef;
  padding: 14px 18px;
}

.personas-page .persona-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.25px;
}

.personas-page .modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.personas-page .modal-close-btn:hover {
  background: #cbd5e1;
}

.personas-page .modal-body {
  background: var(--persona-bg);
  padding: 18px;
}

.personas-page #personaForm {
  display: grid;
  gap: 10px;
  background: var(--persona-card);
  border: 1px solid var(--persona-border);
  border-radius: 12px;
  padding: 16px;
}

.personas-page #personaForm .grid {
  gap: 12px;
}

.personas-page #personaForm .form-group {
  margin-bottom: 6px;
}

.personas-page #personaForm label {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

.personas-page #personaForm input,
.personas-page #personaForm select,
.personas-page #personaForm textarea {
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid #c7d4e5;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

.personas-page #personaForm textarea[name="actividad"],
.persona-modal #personaForm textarea[name="actividad"] {
  min-height: 132px !important;
  height: auto;
  padding: 14px 16px !important;
  line-height: 1.5 !important;
  resize: vertical;
  overflow-y: auto;
  white-space: pre-wrap !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.personas-page #personaForm .persona-highlight-field {
  background: #ffe7c4 !important;
}

.personas-page #personaForm input:focus,
.personas-page #personaForm select:focus,
.personas-page #personaForm textarea:focus {
  border-color: var(--persona-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.personas-page #cliente_id {
  background: #f4f7fc;
  color: #475569;
  font-weight: 700;
}

.personas-page .form-section-title {
  margin: 8px 0 2px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.personas-page .personas-direcciones {
  border: 1px solid var(--persona-border);
  border-radius: 11px;
  background: #fbfdff;
  padding: 10px;
}

.personas-page .table-wrapper-direcciones {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.personas-page .tabla-direcciones thead {
  background: #eef3fb !important;
}

.personas-page .tabla-direcciones th {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.personas-page .tabla-direcciones td {
  padding: 8px 7px;
  border-top: 1px solid #edf2f9 !important;
}

.personas-page .tabla-direcciones {
  table-layout: fixed;
}

/* Evita que aplique el ancho global de primera/última columna */
.personas-page .tabla-direcciones th:first-child,
.personas-page .tabla-direcciones td:first-child,
.personas-page .tabla-direcciones th:last-child,
.personas-page .tabla-direcciones td:last-child {
  width: auto;
  text-align: left;
}

.personas-page .tabla-direcciones th:nth-child(1),
.personas-page .tabla-direcciones td:nth-child(1) {
  width: 18%;
  min-width: 140px;
}

.personas-page .tabla-direcciones th:nth-child(2),
.personas-page .tabla-direcciones td:nth-child(2) {
  width: 18%;
}

.personas-page .tabla-direcciones th:nth-child(3),
.personas-page .tabla-direcciones td:nth-child(3) {
  width: 22%;
}

.personas-page .tabla-direcciones th:nth-child(4),
.personas-page .tabla-direcciones td:nth-child(4) {
  width: 26%;
}

.personas-page .tabla-direcciones th:nth-child(5),
.personas-page .tabla-direcciones td:nth-child(5) {
  width: 16%;
}

.personas-page .tabla-direcciones th:nth-child(6),
.personas-page .tabla-direcciones td:nth-child(6) {
  width: 42px;
  min-width: 42px;
  text-align: center;
}

.personas-page .tabla-direcciones input,
.personas-page .tabla-direcciones select {
  min-height: 34px;
  border: 1px solid #d0dceb !important;
  border-radius: 8px;
  background: #fff !important;
  padding: 6px 8px !important;
}

.personas-page .link-agregar-direccion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.personas-page .link-agregar-direccion:hover {
  background: #dbeafe;
  color: #1e3a8a;
  text-decoration: none;
}

.personas-page .switch-container {
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
  display: inline-flex;
}

.personas-page .switch-label {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.personas-page .modal-actions {
  border-top: 1px solid var(--persona-border);
  padding: 14px 0 2px;
  background: transparent;
}

.personas-page .modal-actions .btn-primary,
.personas-page .modal-actions .btn-danger {
  min-width: 128px;
  min-height: 38px;
  border-radius: 10px;
  font-weight: 700;
}

.personas-page .personas-cancel-btn {
  background: #ef4444;
}

.personas-page .validation-message {
  font-size: 12px;
  margin-top: 6px;
  color: #dc2626;
  font-weight: 600;
}

.personas-page .validation-message.validation-message-success {
  color: #15803d;
}

.personas-page .validation-message.validation-message-info {
  color: #2563eb;
}

.personas-page .validation-message.validation-message-warning {
  color: #b45309;
}

@media (max-width: 900px) {
  .personas-page .personas-title {
    font-size: 24px;
  }

  .personas-page .personas-toolbar {
    gap: 8px;
    flex-wrap: wrap;
  }

  .personas-page .personas-search input {
    width: 100%;
    max-width: none;
  }

  .personas-page .persona-modal-box {
    width: 98vw;
    border-radius: 12px;
  }
}

/* =====================================================
   FACTURA CHILD MODALS ERP
===================================================== */

/* Disable browser scroll anchoring: prevents scrollTop from shifting when
   select2 is destroyed/recreated or fields are filled in. */
#detalleFacturaModal {
  overflow-anchor: none;
}

#detalleFacturaModal.modal-overlay.modal-child,
#formaPagoModal.modal-overlay.modal-child {
  backdrop-filter: blur(2px);
  background: rgba(2, 6, 23, 0.52);
}

#detalleFacturaModal .modal-box,
#formaPagoModal .modal-box {
  position: relative;
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: visible;
}

#detalleFacturaModal .detallefactura-row--stock {
  align-items: center;
}

#detalleFacturaModal .detalle-stock-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#detalleFacturaModal .detalle-stock-inline #detalleStock {
  flex: 1 1 auto;
}

#detalleFacturaModal .detalle-stock-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

#detalleFacturaModal .detalle-stock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.18);
  background: #dbeafe;
}

#detalleStockBodegasModal {
  z-index: 10060 !important;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal-box {
  max-height: min(72vh, 640px);
  overflow: hidden;
  position: relative;
  z-index: 10061;
}

#detalleStockBodegasModal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fbff;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__product {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__filters {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 260px;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__filters select {
  min-width: 240px;
}

#detalleStockBodegasModal .detalle-stock-bodegas-cell {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__table-wrap {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

#detalleStockBodegasModal .detalle-stock-bodegas-modal__footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#detalleFacturaModal .modal-header,
#formaPagoModal .modal-header {
  background: #eef3fb;
  color: #0b1c40;
  border-bottom: 1px solid #dbe3ef;
  padding: 14px 18px;
}

#detalleFacturaModal .modal-header h3,
#formaPagoModal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

#detalleFacturaModal .modal-header .btn-danger,
#formaPagoModal .modal-header .btn-danger {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

#detalleFacturaModal .modal-header .btn-danger:hover,
#formaPagoModal .modal-header .btn-danger:hover {
  background: #cbd5e1;
}

#detalleFacturaModal .modal-body,
#formaPagoModal .modal-body {
  background: #f2f5fb;
  padding: 18px;
}

#detalleFacturaModal .modal-body form,
#formaPagoModal .modal-body form {
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  padding: 16px;
}

#detalleFacturaModal label,
#formaPagoModal label {
  font-size: 11px;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.35px;
  text-transform: uppercase;
}

#detalleFacturaModal input,
#detalleFacturaModal select,
#detalleFacturaModal textarea,
#formaPagoModal input,
#formaPagoModal select,
#formaPagoModal textarea {
  min-height: 40px;
  border-radius: 9px;
  border: 1px solid #c7d4e5;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
}

#detalleFacturaModal input:focus,
#detalleFacturaModal select:focus,
#detalleFacturaModal textarea:focus,
#formaPagoModal input:focus,
#formaPagoModal select:focus,
#formaPagoModal textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

#detalleFacturaModal #detalleCantidad3 {
  background: #FFDBBB;
  color: #7c2d12;
}

#detalleFacturaModal .detallefactura-row,
#detalleFacturaModal .detallefactura-row-inline {
  align-items: center;
  gap: 10px;
}

#detalleFacturaModal .detallefactura-grid-3 {
  gap: 16px;
}

#detalleFacturaModal .detallefactura-totales {
  background: #fbfdff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

#detalleFacturaModal .total-destacado input {
  background: #eff6ff;
  border: 2px solid #2563eb;
  font-weight: 700;
}

#detalleFacturaModal #detalleStock.detalle-stock-critico:disabled {
  color: #FF2C2C !important;
  border-color: #FF2C2C !important;
  background-color: #fff3f3 !important;
  box-shadow: inset 0 0 0 1px #FF2C2C !important;
}

#detalleFacturaModal .switch-group-precio {
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px 10px;
}

#detalleFacturaModal .modal-actions,
#formaPagoModal .modal-actions {
  border-top: 1px solid #dbe3ef;
  padding-top: 14px;
  margin-top: 8px;
  background: transparent;
}

#detalleFacturaModal .modal-actions .btn-primary,
#detalleFacturaModal .modal-actions .btn-danger,
#formaPagoModal .modal-actions .btn-primary,
#formaPagoModal .modal-actions .btn-danger {
  min-width: 128px;
  min-height: 38px;
  border-radius: 10px;
  font-weight: 700;
}

.link-crear-detalle,
.link-crear-forma {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px dashed #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.btn-factura-edit-icon {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.factura-table-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.btn-factura-table-disabled,
.btn-factura-table-disabled:disabled {
  border-color: #d7dee8 !important;
  background: #eef2f7 !important;
  color: #7c8aa0 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

.btn-factura-icon {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 900;
}

.btn-factura-duplicate-table {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #bfd3f9;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #e8f0ff 100%);
  color: #1d4ed8;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-factura-duplicate-table:hover {
  border-color: #60a5fa;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.btn-factura-config-table {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #bfd3f9;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #e8f0ff 100%);
  color: #1d4ed8;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-factura-config-table:hover {
  border-color: #60a5fa;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.btn-factura-assign-table {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #bfd3f9;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7faff 0%, #e8f0ff 100%);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-factura-assign-table:hover {
  border-color: #60a5fa;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

.btn-factura-annul {
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #f0b6b6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff4f4 0%, #ffe2e2 100%);
  color: #b42318;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-factura-annul:hover {
  border-color: #ef4444;
  box-shadow: 0 10px 18px rgba(239, 68, 68, 0.14);
  transform: translateY(-1px);
}

.btn-factura-annul-disabled,
.btn-factura-annul:disabled {
  border-color: #d7dee8;
  background: #eef2f7;
  color: #7c8aa0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.factura-row-blocked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  border: 1px solid #d7dee8;
  font-size: 12px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1.1;
}

.factura-row-blocked--restorable {
  cursor: pointer;
  user-select: none;
  background: #fde8e8;
  color: #dc2626;
  border-color: #f5b7b7;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.factura-row-blocked--restorable:hover {
  background: #fee2e2;
  border-color: #ef4444;
}

.factura-row-blocked--restorable:focus-visible {
  outline: 2px solid rgba(220, 38, 38, 0.2);
  outline-offset: 2px;
}

.factura-restore-cell {
  cursor: pointer;
}

.factura-row--from-sri {
  background-color: rgba(34, 197, 94, 0.10) !important;
}

.factura-row--from-sri:hover {
  background-color: rgba(34, 197, 94, 0.18) !important;
}

.factura-sri-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.factura-sri-aut {
  background: #e8f8ee;
  color: #0f8a43;
  border: 1px solid #b7e4c7;
}

.factura-sri-nat {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.factura-sri-ppr {
  background: #fff7e6;
  color: #b45309;
  border: 1px solid #fde68a;
}

.factura-sri- {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.btn-retencion-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #c7d5ea;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff 0%, #edf4ff 100%);
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn-retencion-modal:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.factura-retencion-value {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.factura-retencion-cell {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  justify-content: center;
}

.factura-retencion-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.factura-retencion-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.factura-retencion-number {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
}

.factura-retencion-table-cell {
  min-width: 220px;
  white-space: nowrap;
  text-align: center;
}

.factura-retencion-table-head {
  text-align: center;
}

.factura-retencion-table-cell .factura-retencion-cell {
  margin: 0 auto;
}

.factura-retencion-cell .factura-row-blocked {
  margin: 0 auto;
}

.factura-float-tooltip {
  position: fixed;
  z-index: 5100;
  max-width: 260px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
  pointer-events: none;
  white-space: nowrap;
}

.factura-float-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 8px;
  height: 8px;
  background: rgba(15, 23, 42, 0.94);
  transform: translateX(-50%) rotate(45deg);
}

.factura-float-tooltip[data-placement="top"]::after {
  bottom: -4px;
}

/* Tooltip flotante generico para dropdowns Select2 en todo el sistema
   (reemplaza el tooltip nativo del navegador que Select2 arma copiando el
   title de cada <option> a su <li>). Ver static/utils/select2_helper.js. */
.vc-select2-tooltip {
  position: fixed;
  z-index: 6100;
  max-width: 320px;
  padding: 6px 9px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
  pointer-events: none;
  white-space: normal;
  word-break: break-word;
}

.factura-float-tooltip[data-placement="bottom"]::after {
  top: -4px;
}

.factura-neto-cell {
  min-width: 104px;
  text-align: right;
  white-space: nowrap;
}

.factura-neto-value {
  display: inline-block;
  min-width: 100%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 99999px) {
  .transaccion-list-table-wrap,
  .factura-list-table-wrap {
    overflow-x: clip;
  }

  .transaccion-list-table-wrap > .transaccion-list-table,
  .factura-list-table-wrap > .factura-list-table {
    min-width: 0;
    table-layout: fixed;
  }

  #facturaTableHead th,
  #facturaTable td {
    font-size: 8px !important;
    line-height: 1.05;
  }

  #facturaTableHead th {
    font-size: 9px !important;
    font-weight: 600 !important;
    padding: 6px 8px !important;
  }

  #facturaTable td {
    padding: 6px 8px !important;
  }

  .factura-fecha-cell {
    min-width: 70px;
    width: 70px;
  }

  .factura-serie-cell {
    min-width: 68px;
    width: 68px;
  }

  .factura-numero-cell {
    min-width: 62px;
    width: 62px;
  }

  .factura-party-cell {
    min-width: 140px;
    width: 17%;
  }

  .factura-party-stack {
    gap: 1px;
  }

  .factura-serie-plain,
  .factura-numero-plain,
  .factura-party-doc,
  .factura-party-name,
  .factura-retencion-value,
  .factura-retencion-number,
  .factura-sri-badge,
  .factura-neto-value {
    font-size: 8px !important;
  }

  .factura-party-name,
  .factura-party-doc {
    line-height: 1.1;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .factura-neto-cell {
    min-width: 70px;
    width: 70px;
  }

  .factura-retencion-table-cell {
    min-width: 88px;
    width: 88px;
  }

  .factura-actions-cell {
    min-width: 72px;
    width: 72px;
  }

  .factura-table-actions {
    gap: 3px;
    flex-wrap: nowrap;
  }

  .btn-factura-edit-icon,
  .btn-factura-icon {
    min-width: 24px;
    width: 24px;
    height: 24px;
    font-size: 7px;
  }

  .btn-retencion-modal {
    min-width: 54px;
    height: 24px;
    padding: 0 5px;
    font-size: 6px;
  }

  .factura-retencion-cell,
  .factura-retencion-stack,
  .factura-retencion-row {
    gap: 3px;
  }

  .factura-sri-badge {
    min-width: 34px;
    padding: 3px 6px;
  }

  .factura-estado-wrap {
    gap: 4px;
  }

  .factura-estado-dot {
    width: 7px;
    height: 7px;
  }

  .factura-estado-dot.is-active,
  .factura-estado-dot.is-inactive {
    box-shadow: none;
  }

  .factura-estado-wrap .switch {
    transform: scale(0.8);
    transform-origin: center;
  }
}

#retencionModal .retencion-modal-box {
  width: min(96vw, 1440px);
  max-width: 1440px;
}

.factura-tributarios-inline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.factura-tributarios-inline input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.btn-datos-tributarios {
  min-width: 180px;
  white-space: nowrap;
}

.nota-debito-xml-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  align-self: end;
  flex: 1 1 320px;
  max-width: 100%;
}

.nota-debito-xml-launch {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid #bfd3f4;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #e6eefc);
  color: #334155;
  box-shadow: 0 6px 14px rgba(29, 78, 216, 0.08);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.nota-debito-xml-launch:hover,
.nota-debito-xml-launch:focus-visible {
  border-color: #8fb2e7;
  box-shadow: 0 10px 18px rgba(29, 78, 216, 0.14);
  transform: translateY(-1px);
  outline: none;
}

.nota-debito-xml-launch__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: #2563eb;
}

.nota-debito-xml-launch__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 600;
}

#datosTributariosModal .datos-tributarios-modal-box {
  max-width: 1080px;
}

#datosTributariosModal .datos-tributarios-grid {
  align-items: end;
}

#datosTributariosModal .select2-container {
  width: 100% !important;
}

#retencionModal .modal-body form {
  gap: 16px;
}

#retencionModal .retencion-meta-grid {
  display: grid;
  grid-template-columns: 180px 180px minmax(280px, 1fr) 180px;
  gap: 14px;
  align-items: end;
}

#retencionModal .retencion-meta-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#retencionModal .retencion-meta-field label {
  color: #22324d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

#retencionModal .retencion-meta-field input {
  width: 100%;
}

#retencionModal .retencion-meta-field select {
  width: 100%;
}

#retencionModal .retencion-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#retencionModal .retencion-section-header h4 {
  margin: 0;
  color: #22324d;
  font-size: 18px;
  font-weight: 800;
}

#retencionModal .retencion-section-header-secondary {
  margin-top: 8px;
}

#retencionModal .btn-retencion-add {
  min-width: 190px;
}

#retencionModal .retencion-table-wrapper {
  overflow-x: auto;
}

#retencionModal .retencion-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

#retencionModal .retencion-renta-table {
  min-width: 1480px;
}

#retencionModal .retencion-iva-table {
  min-width: 1140px;
}

#retencionModal .retencion-iva-table td:nth-child(1),
#retencionModal .retencion-iva-table td:nth-child(2),
#retencionModal .retencion-iva-table th:nth-child(1),
#retencionModal .retencion-iva-table th:nth-child(2) {
  min-width: 140px;
}

#retencionModal .retencion-iva-table td:nth-child(3),
#retencionModal .retencion-iva-table th:nth-child(3) {
  min-width: 180px;
}

#retencionModal .retencion-iva-table td:nth-child(5),
#retencionModal .retencion-iva-table td:nth-child(6),
#retencionModal .retencion-iva-table th:nth-child(5),
#retencionModal .retencion-iva-table th:nth-child(6) {
  min-width: 160px;
}

#retencionModal .retencion-iva-table td:nth-child(4),
#retencionModal .retencion-iva-table th:nth-child(4) {
  min-width: 240px;
}

#retencionModal .retencion-table thead th {
  padding: 12px 14px;
  background: #eff4fb;
  border-bottom: 1px solid #dbe3ef;
  color: #22324d;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.2;
}

#retencionModal .retencion-table tbody td {
  padding: 14px;
  border-bottom: 1px solid #e5edf7;
  vertical-align: middle;
  white-space: nowrap;
}

#retencionModal .retencion-action-cell {
  width: 70px;
  text-align: center;
}

#retencionModal .retencion-table select,
#retencionModal .retencion-table input {
  min-width: 100%;
}

#retencionModal .retencion-renta-table td:nth-child(1),
#retencionModal .retencion-renta-table td:nth-child(2),
#retencionModal .retencion-renta-table td:nth-child(3),
#retencionModal .retencion-renta-table th:nth-child(1),
#retencionModal .retencion-renta-table th:nth-child(2),
#retencionModal .retencion-renta-table th:nth-child(3) {
  min-width: 130px;
}

#retencionModal .retencion-renta-table td:nth-child(4),
#retencionModal .retencion-renta-table th:nth-child(4) {
  min-width: 320px;
}

#retencionModal .retencion-renta-table td:nth-child(5),
#retencionModal .retencion-renta-table td:nth-child(7),
#retencionModal .retencion-renta-table td:nth-child(8),
#retencionModal .retencion-renta-table th:nth-child(5),
#retencionModal .retencion-renta-table th:nth-child(7),
#retencionModal .retencion-renta-table th:nth-child(8) {
  min-width: 170px;
}

#retencionModal .retencion-renta-table td:nth-child(6),
#retencionModal .retencion-renta-table th:nth-child(6) {
  min-width: 170px;
}

#retencionModal .retencion-renta-table .retencion-base-input {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

#retencionModal .retencion-iva-table .retencion-iva-base-input {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

#retencionModal.compra-mode .retencion-renta-table td:nth-child(6),
#retencionModal.compra-mode .retencion-renta-table th:nth-child(6) {
  min-width: 150px;
}

#retencionModal.compra-mode .retencion-renta-table .retencion-base-input {
  min-width: 150px;
}

#retencionModal.compra-mode .retencion-iva-table td:nth-child(4),
#retencionModal.compra-mode .retencion-iva-table th:nth-child(4) {
  min-width: 150px;
}

#retencionModal.compra-mode .retencion-iva-table .retencion-iva-base-input {
  min-width: 150px;
}

#retencionModal .select2-container {
  max-width: 100%;
}

#retencionModal .retencion-renta-table .select2-container {
  min-width: 320px !important;
}

#retencionModal .retencion-renta-table .select2-selection__rendered {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#retencionModal .btn-retencion-row-delete {
  width: 34px;
  height: 34px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff5f5;
  color: #dc2626;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

#retencionModal .btn-retencion-row-delete:hover {
  background: #fee2e2;
}

#retencionModal .retencion-total-box {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 8px 4px 0;
  color: #22324d;
  font-weight: 800;
}

#retencionModal .modal-actions.retencion-actions {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

#retencionModal .modal-actions.retencion-actions .modal-actions-left,
#retencionModal .modal-actions.retencion-actions .modal-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#retencionModal .modal-actions.retencion-actions .modal-actions-left {
  justify-content: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}

#retencionModal .modal-actions.retencion-actions .modal-actions-right {
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 0 auto;
}

#retencionModal .factura-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

#retencionModal .modal-actions.retencion-actions .btn-primary,
#retencionModal .modal-actions.retencion-actions .btn-danger,
#retencionModal .modal-actions.retencion-actions .btn-autorizar {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  #Factura_ventaModal,
  #detalleFacturaModal,
  #formaPagoModal,
  #datosTributariosModal,
  #retencionModal {
    padding: 8px;
    align-items: flex-start;
    overflow-y: auto;
  }

  #Factura_ventaModal .modal-box,
  #detalleFacturaModal .modal-box,
  #formaPagoModal .modal-box,
  #datosTributariosModal .modal-box,
  #retencionModal .modal-box {
    width: min(100%, calc(100vw - 16px));
    max-width: none !important;
    max-height: calc(100dvh - 16px);
    margin: 0 auto;
    border-radius: 14px;
  }

  #Factura_ventaModal .modal-header,
  #detalleFacturaModal .modal-header,
  #formaPagoModal .modal-header,
  #datosTributariosModal .modal-header,
  #retencionModal .modal-header {
    padding: 12px 14px;
    gap: 10px;
  }

  #Factura_ventaModal .modal-header h3,
  #detalleFacturaModal .modal-header h3,
  #formaPagoModal .modal-header h3,
  #datosTributariosModal .modal-header h3,
  #retencionModal .modal-header h3 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  #Factura_ventaModal .modal-body,
  #detalleFacturaModal .modal-body,
  #formaPagoModal .modal-body,
  #datosTributariosModal .modal-body,
  #retencionModal .modal-body {
    padding: 12px;
    overflow-x: hidden;
  }

  #Factura_ventaModal .grid.grid-4,
  #Factura_ventaModal .grid.grid-3,
  #Factura_ventaModal .grid.grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  #detalleFacturaModal .modal-body form,
  #formaPagoModal .modal-body form,
  #datosTributariosModal .modal-body form,
  #retencionModal .modal-body form {
    padding: 12px;
  }

  #Factura_ventaModal .factura-tributarios-inline {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  #Factura_ventaModal .factura-tributarios-inline input,
  #Factura_ventaModal .factura-tributarios-inline > input,
  #Factura_ventaModal #autorizacion {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }

  #Factura_ventaModal .btn-datos-tributarios {
    width: 100%;
    min-width: 0;
  }

  #Factura_ventaModal .forma-wrapper {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #Factura_ventaModal .forma-left,
  #Factura_ventaModal .forma-right {
    width: 100%;
    min-width: 0;
  }

  #Factura_ventaModal .forma-right {
    padding: 14px;
  }

  #Factura_ventaModal .transaccion-detalle-wrapper,
  #Factura_ventaModal .table-wrapper,
  #retencionModal .retencion-table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  #Factura_ventaModal .transaccion-detalle-table {
    min-width: 1140px;
  }

  #Factura_ventaModal .modal-actions.factura-actions,
  #retencionModal .modal-actions.retencion-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
  }

  #Factura_ventaModal .modal-actions.factura-actions .modal-actions-left,
  #Factura_ventaModal .modal-actions.factura-actions .modal-actions-right,
  #retencionModal .modal-actions.retencion-actions .modal-actions-left,
  #retencionModal .modal-actions.retencion-actions .modal-actions-right {
    width: 100%;
    margin-left: 0;
    justify-content: stretch;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
    overflow: visible;
  }

  #Factura_ventaModal .factura-action-group,
  #retencionModal .factura-action-group {
    width: 100%;
    gap: 10px;
    flex-wrap: wrap;
  }

  #Factura_ventaModal .modal-actions.factura-actions .btn-primary,
  #Factura_ventaModal .modal-actions.factura-actions .btn-danger,
  #Factura_ventaModal .modal-actions.factura-actions .btn-autorizar,
  #retencionModal .modal-actions.retencion-actions .btn-primary,
  #retencionModal .modal-actions.retencion-actions .btn-danger,
  #retencionModal .modal-actions.retencion-actions .btn-autorizar {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  #detalleFacturaModal .detallefactura-grid-3,
  #detalleFacturaModal .detallefactura-totales,
  #datosTributariosModal .datos-tributarios-grid,
  #retencionModal .retencion-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #detalleFacturaModal .detallefactura-row,
  #detalleFacturaModal .detallefactura-row-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 10px;
  }

  #detalleFacturaModal .detallefactura-row label,
  #detalleFacturaModal .detallefactura-row-inline label {
    min-width: 0;
  }

  #detalleFacturaModal .detallefactura-precio-tipo {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #detalleFacturaModal .switch-group-precio {
    justify-content: flex-start;
    gap: 10px;
  }

  #detalleFacturaModal .modal-actions,
  #formaPagoModal .modal-actions,
  #datosTributariosModal .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  #detalleFacturaModal .modal-actions .btn-primary,
  #detalleFacturaModal .modal-actions .btn-danger,
  #formaPagoModal .modal-actions .btn-primary,
  #formaPagoModal .modal-actions .btn-danger,
  #datosTributariosModal .modal-actions .btn-primary,
  #datosTributariosModal .modal-actions .btn-danger {
    width: 100%;
    min-width: 0;
  }

  #retencionModal .retencion-section-header {
    flex-direction: column;
    align-items: stretch;
  }

  #retencionModal .btn-retencion-add {
    width: 100%;
    min-width: 0;
  }

  #retencionModal .retencion-total-box {
    justify-content: space-between;
    flex-wrap: wrap;
  }
}

@media (max-width: 1400px) {
  #retencionModal .modal-actions.retencion-actions {
    flex-wrap: wrap;
  }

  #retencionModal .modal-actions.retencion-actions .modal-actions-left,
  #retencionModal .modal-actions.retencion-actions .modal-actions-right,
  #retencionModal .factura-action-group {
    flex-wrap: wrap;
  }

  #retencionModal .modal-actions.retencion-actions .modal-actions-right {
    width: 100%;
    margin-left: 0;
  }
}

#retencionModal .select2-container {
  width: 100% !important;
}

#retencionModal .select2-container--default .select2-selection--single {
  min-height: 42px;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  display: flex;
  align-items: center;
}

#retencionModal .select2-container--default .select2-selection__rendered {
  line-height: 40px;
  padding-left: 12px;
  padding-right: 34px;
}

#retencionModal .select2-container--default .select2-selection__arrow {
  height: 40px;
  right: 8px;
}

#retencionModal .select2-dropdown {
  border: 1px solid #cfd9e6;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

#retencionModal .select2-results__options {
  max-height: 280px;
}

.link-crear-detalle:hover,
.link-crear-forma:hover {
  background: #dbeafe;
  color: #1e3a8a;
  text-decoration: none;
}

/* Factura: Forma de Pago y Detalles Adicionales alineados como la tabla de detalle */
#Factura_ventaModal #formaPagoGrid,
#Factura_ventaModal #detallesAdicionalesTable {
  table-layout: fixed;
}

#Factura_ventaModal #formaPagoGrid th,
#Factura_ventaModal #formaPagoGrid td,
#Factura_ventaModal #detallesAdicionalesTable th,
#Factura_ventaModal #detallesAdicionalesTable td {
  text-align: left !important;
}

#Factura_ventaModal #formaPagoGrid th:nth-child(1),
#Factura_ventaModal #formaPagoGrid td:nth-child(1),
#Factura_ventaModal #formaPagoGrid th:nth-child(4),
#Factura_ventaModal #formaPagoGrid td:nth-child(4) {
  width: 48px !important;
}

#Factura_ventaModal #formaPagoGrid td.fp-action-cell,
#Factura_ventaModal #formaPagoGrid td:nth-child(1),
#Factura_ventaModal #formaPagoGrid td:nth-child(4),
#Factura_ventaModal #detallesAdicionalesTable td.da-action-cell,
#Factura_ventaModal #detallesAdicionalesTable td:nth-child(3) {
  text-align: center !important;
}

#Factura_ventaModal #formaPagoGrid td.fp-value-cell {
  text-align: left !important;
}

#Factura_ventaModal #detallesAdicionalesTable th:nth-child(1),
#Factura_ventaModal #detallesAdicionalesTable td:nth-child(1) {
  width: 52% !important;
}

#Factura_ventaModal #detallesAdicionalesTable th:nth-child(2),
#Factura_ventaModal #detallesAdicionalesTable td:nth-child(2) {
  width: calc(48% - 56px) !important;
}

#Factura_ventaModal #detallesAdicionalesTable th:nth-child(3),
#Factura_ventaModal #detallesAdicionalesTable td:nth-child(3) {
  width: 56px !important;
  min-width: 56px !important;
  max-width: 56px !important;
  padding-inline: 6px !important;
}

#Factura_ventaModal #detallesAdicionalesTable td[contenteditable="false"] {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
}

.detalle-adicional-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  vertical-align: middle;
}

/* Iconos borrar: Forma de Pago + Detalles Adicionales (estilo factura detalle) */
#detallesAdicionalesTable .btn-delete-detalle,
#formaPagoTable td:last-child button {
  background: #fff;
  color: #dc3545;
  border: 1px solid #dc3545;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  transition: all 0.25s ease;
}

#Factura_ventaModal #detallesAdicionalesTable .btn-delete-detalle {
  margin: 0 auto;
}

#detallesAdicionalesTable .btn-delete-detalle:hover,
#formaPagoTable td:last-child button:hover {
  background: #dc3545;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

#detallesAdicionalesTable .btn-delete-detalle:active,
#formaPagoTable td:last-child button:active {
  transform: scale(0.92);
}

#detallesAdicionalesTable .btn-delete-detalle:focus,
#formaPagoTable td:last-child button:focus {
  outline: none;
}

/* =====================================================
   SELECT2 ERP THEME (GLOBAL)
===================================================== */
.select2-container:not(.select2-container--open) {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 40px !important;
  min-height: 40px;
  border-radius: 10px !important;
  border: 1px solid #cbd5e1 !important;
  background: #f8fafc !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 36px 0 12px !important;
  font-size: 13px;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #0f172a !important;
  line-height: 1.2 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #64748b !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  right: 10px !important;
  height: 100% !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #475569 transparent transparent transparent !important;
  border-width: 5px 4px 0 4px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.20) !important;
}

.select2-dropdown {
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  margin-top: 4px;
}

.select2-search--dropdown {
  padding: 8px !important;
  background: #eef2f7;
  border-bottom: 1px solid #dbe3ef;
}

.select2-search--dropdown .select2-search__field {
  min-height: 34px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 13px;
  color: #0f172a;
  background: #f8fafc;
}

.select2-search--dropdown .select2-search__field:focus {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.20);
  outline: none;
}

.select2-results__options {
  padding: 6px;
}

.select2-results__option {
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 13px;
  color: #1e293b;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #eef2f7 !important;
  color: #0f172a !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.select2-results__group {
  padding: 8px 10px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #64748b;
}

.select2-container--default .select2-selection--multiple {
  min-height: 40px;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  background: #f8fafc !important;
  padding: 4px 8px !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
  border-color: #94a3b8 !important;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.20) !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  border: 1px solid #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #334155 !important;
  border-radius: 999px !important;
  padding: 3px 8px !important;
  font-size: 12px;
  font-weight: 600;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #475569 !important;
  margin-right: 6px !important;
}

.select2-container--open {
  z-index: 3005;
}

.modal-overlay .select2-container--open {
  z-index: 4200;
}

/* Respeta el tamaño compacto que ya usas dentro de detalle de factura */
#detalleFacturaModal .detallefactura-row .select2-selection--single {
  height: 38px !important;
  min-height: 38px !important;
  border-radius: 8px !important;
}

/* =====================================================
   THEME TOGGLE + DARK MODE
===================================================== */

:root[data-theme="light"] {
  color-scheme: light;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body:not(.login-page) .topbar,
body:not(.login-page) .sidebar,
body:not(.login-page) .content,
body:not(.login-page) .app-footer,
table,
th,
td,
input,
select,
textarea,
.modal-box,
.modal-header,
.modal-body {
  transition: background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-logo {
  position: relative;
  z-index: 2;
  order: 1;
}

.topbar-logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
}

.topbar-system {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  text-align: center;
  pointer-events: none;
}

.topbar-shortcuts-strip {
  padding: 10px 16px 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topbar-shortcuts-strip[hidden] {
  display: none;
}

.topbar-shortcuts-strip .topbar-recent-shortcuts {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.topbar-system-demo-tools {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 100%;
  pointer-events: auto;
}

.topbar-system-line {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-system-line-primary {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.94;
}

.topbar-system-line-secondary {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.74;
}

.topbar-recent-shortcuts {
  display: flex;
  align-items: center;
  gap: 5px;
  width: min(100%, 1220px);
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 1px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  pointer-events: auto;
}

.topbar-recent-shortcuts::-webkit-scrollbar {
  display: none;
}

.topbar-recent-shortcuts-item {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 0 auto;
  max-width: 248px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(226, 232, 240, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.topbar-recent-shortcuts-item.is-active {
  border-color: rgba(217, 165, 74, 0.55);
  background: rgba(217, 165, 74, 0.14);
  box-shadow: inset 0 0 0 1px rgba(217, 165, 74, 0.18);
}

.topbar-recent-shortcuts-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  padding: 3px 8px;
  color: #0f172a;
  text-decoration: none;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  border-radius: 999px;
}

.topbar-recent-shortcuts-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 10px;
  line-height: 1;
  opacity: 0.85;
}

.topbar-recent-shortcuts-item.is-active .topbar-recent-shortcuts-link {
  color: #92660f;
}

.topbar-recent-shortcuts-label {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-recent-shortcuts-close {
  border: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.28);
  background: transparent;
  color: #334155;
  width: 20px;
  height: 20px;
  border-radius: 0 999px 999px 0;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.topbar-recent-shortcuts-close:hover {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.24);
}

.topbar-recent-shortcuts-close:focus-visible,
.topbar-recent-shortcuts-link:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 1px;
}

.topbar-system-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: auto;
}

.topbar-system-badge--demo {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.36);
}

.topbar-system-guide-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  background: rgba(37, 99, 235, 0.12);
  color: #dbeafe;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  pointer-events: auto;
}

body.demo-system-page:not(.login-page) {
  --vc-topbar-height: 76px;
}

body.demo-system-page:not(.login-page) .topbar {
  min-height: 76px;
}

body.demo-system-page .topbar-system {
  gap: 4px;
  max-width: min(68vw, 860px);
}

.topbar-system-guide-btn:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(96, 165, 250, 0.38);
  transform: translateY(-1px);
}

.topbar-system-guide-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.9);
  outline-offset: 2px;
}

.vc-demo-guide {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

.vc-demo-guide__scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(2px);
  pointer-events: auto;
}

.vc-demo-guide__highlight {
  position: fixed;
  border-radius: 20px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 9999px rgba(15, 23, 42, 0.28),
    0 16px 34px rgba(15, 23, 42, 0.2);
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease, opacity 0.18s ease;
  pointer-events: none;
}

.vc-demo-guide__pulse {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5);
  animation: vc-demo-guide-pulse 1.7s ease-out infinite;
}

.vc-demo-guide__panel {
  position: fixed;
  width: min(380px, calc(100vw - 32px));
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(219, 234, 254, 0.85);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.26);
  color: #0f172a;
  pointer-events: auto;
  transition: top 0.22s ease, left 0.22s ease;
}

.vc-demo-guide__panel::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid rgba(219, 234, 254, 0.85);
  border-top: 1px solid rgba(219, 234, 254, 0.85);
  transform: rotate(45deg);
}

.vc-demo-guide__panel[data-placement="bottom"]::before,
.vc-demo-guide__panel[data-placement="center"]::before {
  top: -9px;
  left: 34px;
}

.vc-demo-guide__panel[data-placement="top"]::before {
  bottom: -9px;
  left: 34px;
  transform: rotate(225deg);
}

.vc-demo-guide__panel[data-placement="right"]::before {
  top: 28px;
  left: -9px;
  transform: rotate(315deg);
}

.vc-demo-guide__panel[data-placement="left"]::before {
  top: 28px;
  right: -9px;
  transform: rotate(135deg);
}

.vc-demo-guide__panel[data-placement="center"]::before {
  display: none;
}

.vc-demo-guide__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.vc-demo-guide__title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.05;
}

.vc-demo-guide__body,
.vc-demo-guide__tip {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #475569;
}

.vc-demo-guide__tip {
  margin-top: 12px;
  color: #1e3a8a;
  font-weight: 700;
}

.vc-demo-guide__footer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vc-demo-guide__progress {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
}

.vc-demo-guide__actions {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.vc-demo-guide__btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.vc-demo-guide__btn:hover {
  transform: translateY(-1px);
}

.vc-demo-guide__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.vc-demo-guide__btn--ghost {
  border-color: #d7e0ef;
  background: #fff;
  color: #475569;
}

.vc-demo-guide__btn--secondary {
  border-color: #c7d8f6;
  background: #eef4ff;
  color: #1d4ed8;
}

.vc-demo-guide__btn--primary {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

@keyframes vc-demo-guide-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.46);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(249, 115, 22, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
  }
}

@media (max-width: 768px) {
  body.demo-system-page:not(.login-page) {
    --vc-topbar-height: 112px;
  }

  .topbar-system-guide-btn {
    padding: 4px 9px;
    font-size: 10px;
  }

  .topbar-system-demo-tools {
    justify-content: flex-start;
  }

  .vc-demo-guide__panel {
    width: calc(100vw - 20px);
    padding: 16px 14px 14px;
  }

  .vc-demo-guide__title {
    font-size: 21px;
  }

  .vc-demo-guide__body,
  .vc-demo-guide__tip {
    font-size: 14px;
  }

  .vc-demo-guide__footer,
  .vc-demo-guide__actions {
    width: 100%;
  }

  .vc-demo-guide__actions {
    justify-content: space-between;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  align-content: center;
  justify-content: flex-end;
  justify-self: end;
  min-width: 0;
}

/* Los pills (Estado/Restantes/Fecha corte) son el unico elemento que se
   puede achicar o partir en 2 lineas cuando falta espacio: la campanita y
   el avatar (cerrar sesion) nunca deben separarse ni caer a otra fila. */
.topbar-actions > .topbar-control-summary {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-actions > #topbarNotifications,
.topbar-actions > .topbar-user {
  flex: 0 0 auto;
}

.topbar-maintenance-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.26);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.16) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #fee2e2;
  font-weight: 900;
  font-size: 12px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-maintenance-indicator:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.22) 0%, rgba(220, 38, 38, 0.14) 100%);
  border-color: rgba(248, 113, 113, 0.34);
}

.topbar-payment-notification {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background: rgba(37, 99, 235, 0.18);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-payment-notification strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  line-height: 1;
}

.topbar-payment-notification:hover {
  transform: translateY(-1px);
  background: rgba(37, 99, 235, 0.26);
  border-color: rgba(96, 165, 250, 0.44);
}

.topbar-survey-notification {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-survey-notification__icon {
  opacity: 0.92;
}

.topbar-survey-notification strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: #ffffff;
  color: #047857;
  line-height: 1;
}

.topbar-survey-notification:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.46);
}

.topbar-notification-legacy {
  display: none !important;
}

.topbar-notifications {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
}

.topbar-notifications-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-notifications-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.16);
  color: #d1fae5;
  cursor: pointer;
  flex: 0 0 auto;
  white-space: nowrap;
}

.topbar-notifications-toggle:hover {
  transform: translateY(-1px);
  background: rgba(16, 185, 129, 0.24);
  border-color: rgba(52, 211, 153, 0.46);
}

.topbar-notifications-count {
  position: absolute;
  top: -4px;
  right: -4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid #0f172a;
  background: #ef4444;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.topbar-notifications-count[hidden] {
  display: none;
}

.topbar-notifications-icon {
  font-size: 0.95rem;
}

.topbar-notifications-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(360px, 90vw);
  z-index: 90;
  border: 1px solid rgba(157, 178, 216, 0.3);
  border-radius: 14px;
  background: #f7faff;
  box-shadow: 0 16px 34px rgba(13, 38, 76, 0.22);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.topbar-notifications-menu__head {
  font-size: 0.95rem;
  color: #1f3158;
  font-weight: 900;
  padding: 2px 4px 4px;
}

.topbar-notifications-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: center;
  border: 1px solid rgba(157, 178, 216, 0.35);
  border-radius: 12px;
  background: #ffffff;
  padding: 10px 12px;
  text-decoration: none;
}

.topbar-notifications-item:hover {
  border-color: rgba(70, 114, 205, 0.44);
  background: #f3f7ff;
}

.topbar-notifications-item__title {
  font-size: 0.92rem;
  font-weight: 800;
  color: #22365b;
}

.topbar-notifications-item__meta {
  font-size: 0.8rem;
  color: #60749a;
}

.topbar-notifications-item__count {
  grid-row: 1 / span 2;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(49, 100, 211, 0.12);
  color: #315ed3;
}

.topbar-notifications-item__message {
  grid-column: 1;
  font-size: 0.8rem;
  color: #3a4a6b;
  white-space: normal;
  word-break: break-word;
}

.topbar-notifications-item--payment[data-tone="aprobado"] {
  border-color: rgba(34, 168, 100, 0.4);
  background: #f0fbf4;
}

.topbar-notifications-item--payment[data-tone="aprobado"] .topbar-notifications-item__title {
  color: #1f8a52;
}

.topbar-notifications-item--payment[data-tone="rechazado"] {
  border-color: rgba(214, 68, 68, 0.4);
  background: #fdf3f3;
}

.topbar-notifications-item--payment[data-tone="rechazado"] .topbar-notifications-item__title {
  color: #c23a3a;
}

.topbar-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 0;
}

.topbar-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-user-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.topbar-user-toggle:focus-visible {
  outline: 2px solid rgba(147, 197, 253, 0.92);
  outline-offset: 2px;
}

.topbar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.26), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.topbar-user-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.topbar-user-avatar-initials {
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-user-caret {
  font-size: 12px;
  opacity: 0.9;
  margin-right: 2px;
}

.topbar-user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(320px, calc(100vw - 24px));
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.22);
  z-index: 3200;
}

.topbar-user-meta {
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.topbar-user-name {
  font-weight: 900;
  font-size: 16px;
  line-height: 1.15;
}

.topbar-user-email {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  word-break: break-word;
}

.topbar-user-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.topbar-user-menu-item:hover {
  background: rgba(15, 23, 42, 0.04);
}

.topbar-user-menu-item:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: -2px;
}

.topbar-user-menu-item--danger {
  color: #dc2626;
}

.topbar-user-menu-item--danger:hover {
  background: rgba(220, 38, 38, 0.08);
}

.topbar-user-menu-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  opacity: 0.9;
}

html[data-theme="dark"] body:not(.login-page) .topbar-user-menu {
  background: #0b1220;
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] body:not(.login-page) .topbar-user-meta {
  border-bottom-color: rgba(148, 163, 184, 0.14);
}

html[data-theme="dark"] body:not(.login-page) .topbar-user-email {
  color: rgba(226, 232, 240, 0.7);
}

html[data-theme="dark"] body:not(.login-page) .topbar-user-menu-item:hover {
  background: rgba(226, 232, 240, 0.06);
}

html[data-theme="dark"] body:not(.login-page) .topbar-user-menu-item--danger:hover {
  background: rgba(248, 113, 113, 0.14);
}

.topbar-control-summary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar-control-summary::-webkit-scrollbar {
  display: none;
}

.topbar-control-pill {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  flex: 0 1 auto;
  min-width: 72px;
  max-width: 130px;
  min-height: 38px;
  padding: 5px 10px 5px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.06) 100%);
  color: #e2e8f0;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.topbar-control-pill::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.8), rgba(59, 130, 246, 0.35));
}

.topbar-control-pill[data-tone="success"] {
  background: linear-gradient(180deg, rgba(22, 163, 74, 0.14) 0%, rgba(22, 163, 74, 0.09) 100%);
  border-color: rgba(74, 222, 128, 0.22);
}

.topbar-control-pill[data-tone="warning"] {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.14) 0%, rgba(245, 158, 11, 0.09) 100%);
  border-color: rgba(251, 191, 36, 0.22);
}

.topbar-control-pill[data-tone="error"] {
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.14) 0%, rgba(220, 38, 38, 0.09) 100%);
  border-color: rgba(248, 113, 113, 0.2);
}

.topbar-control-pill[data-tone="success"]::before {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.9), rgba(22, 163, 74, 0.4));
}

.topbar-control-pill[data-tone="warning"]::before {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.9), rgba(245, 158, 11, 0.42));
}

.topbar-control-pill[data-tone="error"]::before {
  background: linear-gradient(180deg, rgba(248, 113, 113, 0.88), rgba(220, 38, 38, 0.42));
}

.topbar-control-pill-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.82;
  line-height: 1;
}

.topbar-control-pill-value {
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
}

.mobile-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  position: relative;
  order: 2;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.mobile-sidebar-toggle::before,
.mobile-sidebar-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #f8fafc;
  transition: transform 0.22s ease, top 0.22s ease, width 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.mobile-sidebar-toggle::before {
  top: 14px;
  transform: translateX(-50%);
  box-shadow: 0 6px 0 #f8fafc, 0 12px 0 #f8fafc;
}

.mobile-sidebar-toggle::after {
  top: 20px;
  transform: translateX(-50%);
  width: 18px;
  height: 2px;
  opacity: 0;
}

.mobile-sidebar-toggle[aria-expanded="true"],
.mobile-sidebar-toggle[aria-expanded="false"] {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mobile-sidebar-toggle[aria-expanded="true"]::before,
.mobile-sidebar-toggle[aria-expanded="false"]::before {
  top: 14px;
  transform: translateX(-50%);
  box-shadow: 0 6px 0 #f8fafc, 0 12px 0 #f8fafc;
}

.mobile-sidebar-toggle[aria-expanded="true"]::after,
.mobile-sidebar-toggle[aria-expanded="false"]::after {
  top: 20px;
  opacity: 0;
  transform: translateX(-50%);
}

.mobile-sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(148, 163, 184, 0.32);
  transform: translateY(-1px);
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar {
  width: 76px !important;
  padding: 14px 8px;
  border-right-color: rgba(148, 163, 184, 0.12);
  box-shadow: 8px 0 20px rgba(2, 6, 23, 0.28);
  transform: none;
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
  overflow-x: visible;
  position: relative;
  z-index: 1150;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.16) transparent;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar > * {
  opacity: 1;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-title,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-context-card,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-system-select,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-mobile-section-title,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-user-footer,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-mobile-head {
  display: none !important;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu > li > a,
body:not(.login-page).sidebar-desktop-collapsed .submenu-toggle {
  justify-content: center;
  gap: 0;
  min-height: 42px;
  padding: 10px 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu {
  overflow: visible !important;
  flex: 0 0 auto;
  min-height: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar::-webkit-scrollbar {
  width: 3px;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar::-webkit-scrollbar-track {
  background: transparent;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar:hover {
  scrollbar-color: rgba(148, 163, 184, 0.26) transparent;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar:hover::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.26);
}

body:not(.login-page).sidebar-desktop-collapsed .layout,
body:not(.login-page).sidebar-desktop-collapsed .main-wrapper {
  overflow: visible;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu > .has-submenu {
  position: relative;
  z-index: 1;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu > .has-submenu.open {
  z-index: 9999;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu > li > a > span:last-child,
body:not(.login-page).sidebar-desktop-collapsed .submenu-toggle > span:last-child {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-menu > li > a > span:first-child,
body:not(.login-page).sidebar-desktop-collapsed .submenu-toggle > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  font-size: 16px;
}

body:not(.login-page).sidebar-desktop-collapsed .submenu-toggle::after {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  min-width: 64px;
  width: 64px;
  max-width: 64px;
  margin-top: 0;
  padding: 8px 6px;
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 18, 36, 0.94) 100%);
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(18px);
  display: grid !important;
  gap: 6px;
  justify-items: center;
  align-content: start;
  max-height: none !important;
  overflow: visible;
  opacity: 0 !important;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.98) !important;
  transform-origin: top center;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  z-index: 9998;
}

body:not(.login-page).sidebar-desktop-collapsed .has-submenu.open > .sidebar-submenu {
  opacity: 1 !important;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1) !important;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a {
  margin-left: 0;
  min-height: 42px;
  padding: 9px 0;
  justify-content: center;
  border-radius: 12px;
  font-size: 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a::before {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a > span:last-child {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  font-size: 16px;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a:hover,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a:focus-visible,
body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu a.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-submenu-entry {
  margin-left: 0;
  gap: 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-card {
  margin-left: 0;
  padding: 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-card-link {
  justify-content: center;
  padding: 9px 0;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-card-link::before {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-card-name {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-card-icon {
  width: 18px;
  min-width: 18px;
  font-size: 16px;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-action-btn {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-group-title {
  display: none;
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar-module-empty {
  display: none;
}

.sidebar-backdrop {
  position: fixed;
  inset: var(--vc-topbar-height) 0 0 0;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(2px);
  z-index: 1090;
}

.theme-toggle {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 7px 11px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

.theme-toggle:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 1px;
}

@media (max-width: 1180px) {
  :root {
    --vc-topbar-height: 106px;
  }

  body:not(.login-page) {
    overflow: auto;
  }

  body.sidebar-mobile-open {
    overflow: hidden;
  }

  body:not(.login-page) .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding: 10px 12px 12px;
    gap: 8px;
  }

  .mobile-sidebar-toggle {
    flex: 0 0 auto;
  }

  .topbar-brand {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    grid-template-areas: ". logo toggle";
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-items: center;
    order: 0;
  }

  .topbar-logo {
    grid-area: logo;
    font-size: clamp(1.28rem, 4.1vw, 1.7rem);
    line-height: 1;
    justify-self: center;
    text-align: center;
    align-self: center;
  }

  .mobile-sidebar-toggle {
    grid-area: toggle;
    justify-self: end;
    align-self: center;
  }

  .topbar-system {
    order: -1;
    justify-self: stretch;
    width: 100%;
    max-width: none;
    text-align: center;
    align-items: center;
    gap: 2px;
    pointer-events: auto;
  }

  .topbar-recent-shortcuts {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding-top: 2px;
  }

  .topbar-shortcuts-strip {
    width: 100%;
    padding: 8px 10px 0;
  }

  .topbar-recent-shortcuts-item {
    max-width: 214px;
  }

  .topbar-recent-shortcuts-label {
    max-width: 156px;
  }

  body.demo-system-page:not(.login-page) .topbar {
    min-height: 0;
  }

  .topbar-system-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.12;
    overflow-wrap: normal;
  }

  .topbar-system-line-primary {
    font-size: 11px;
  }

  .topbar-system-line-secondary {
    font-size: 10px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    align-items: flex-start;
    justify-items: center;
    justify-content: stretch;
    gap: 8px;
  }

  .topbar-control-summary {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .topbar-control-summary::-webkit-scrollbar {
    display: none;
  }

  .topbar-control-pill {
    flex: 0 0 98px;
    min-width: 0;
    min-height: 36px;
    padding: 5px 9px 5px 12px;
    border-radius: 10px;
  }

  .topbar-control-pill-label {
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .topbar-control-pill-value {
    font-size: 10px;
  }

  .topbar-actions form {
    margin: 0;
    justify-self: center;
    align-self: start;
  }

  .btn-logout {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 11px;
    white-space: nowrap;
  }

  body:not(.login-page) .layout {
    display: block;
    height: auto;
    min-height: calc(100vh - var(--vc-topbar-height));
  }

  body:not(.login-page) .main-wrapper {
    height: auto;
    min-height: calc(100vh - var(--vc-topbar-height));
    overflow: visible;
  }

  body:not(.login-page) .sidebar {
    position: fixed;
    top: var(--vc-topbar-height);
    left: 0;
    bottom: 0;
    width: min(86vw, 308px);
    height: calc(100dvh - var(--vc-topbar-height));
    max-height: calc(100dvh - var(--vc-topbar-height));
    z-index: 1100;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    padding: 0;
    background:
      linear-gradient(180deg, rgba(30, 64, 175, 0.18) 0%, rgba(30, 64, 175, 0) 20%),
      linear-gradient(180deg, #0f172a 0%, #0a1224 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 18px 0 42px rgba(2, 6, 23, 0.38);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  body.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-mobile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 10px;
    background:
      linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(29, 78, 216, 0.88)),
      #1d4ed8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .sidebar-mobile-brand {
    display: grid;
    gap: 2px;
    justify-items: center;
    text-align: center;
    min-width: 0;
  }

  .sidebar-mobile-section-title {
    display: block;
    margin: 4px 8px 6px;
    padding: 0 4px;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-align: center;
  }

  body:not(.login-page) .sidebar-title {
    display: none;
  }

  .sidebar-system-select,
  .sidebar .select2-container {
    margin-left: 8px;
    margin-right: 8px;
  }

  .sidebar-menu {
    display: block;
    flex: 0 0 auto;
    margin: 0 6px;
    padding: 0 4px 14px;
    min-height: 0;
    overflow: visible;
    overscroll-behavior: contain;
  }

  .sidebar-menu > li {
    margin-bottom: 0;
  }

  .sidebar-menu .admin-sticky-menu,
  .sidebar-menu .admin-sticky-menu.open {
    position: relative;
    top: auto;
  }

  .sidebar-menu > li > a,
  .sidebar-menu .submenu-toggle {
    justify-content: flex-start;
    text-align: left;
    min-height: 32px;
    padding: 7px 9px;
    font-size: 12px;
  }

  .sidebar-menu .sidebar-submenu {
    padding-left: 0;
    gap: 1px;
  }

  .sidebar-menu .has-submenu.open > .sidebar-submenu {
    padding-bottom: 6px;
  }

  .sidebar-menu .sidebar-submenu-entry {
    gap: 6px;
  }

  .sidebar-menu .sidebar-module-link {
    padding: 7px 9px;
    font-size: 11px;
  }

  .sidebar-context-card {
    margin: 4px 8px 8px;
    border-radius: 14px;
    background:
      linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 12px 22px rgba(2, 6, 23, 0.18);
  }

  .sidebar-context-summary {
    padding: 8px 10px;
    justify-content: center;
    text-align: center;
  }

  .sidebar-context-summary-kicker {
    font-size: 8px;
    letter-spacing: 0.07em;
    color: rgba(191, 219, 254, 0.72);
  }

  .sidebar-context-summary-title {
    font-size: 11px;
  }

  .sidebar-context-summary-current {
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
  }

  .sidebar-context-fields {
    gap: 6px;
    padding: 0 8px 8px;
  }

  .sidebar-context-fields .sidebar-system-select,
  .sidebar-context-fields .select2-container--default .select2-selection--single {
    min-height: 40px !important;
    height: auto !important;
    font-size: 11px !important;
  }

  .sidebar-user-footer {
    flex: 0 0 auto;
    margin: 8px 8px 10px;
    border-radius: 14px;
  }

  body:not(.login-page) .content {
    padding: 12px 10px 18px;
  }

  body:not(.login-page) .has-submenu.open > .sidebar-submenu {
    max-height: none;
    overflow: visible;
  }

  body:not(.login-page) .content > h2 {
    font-size: 24px;
    margin-bottom: 12px;
  }

  body:not(.login-page) .content > .table-header {
    padding: 12px;
  }

  body:not(.login-page) .content > .table-header .search-container input {
    width: 100%;
    max-width: 100%;
  }

  body:not(.login-page) .content > .table-wrapper,
  body:not(.login-page) .content > table {
    overflow-x: auto;
  }

  body:not(.login-page) .content > .table-wrapper > table,
  body:not(.login-page) .content > table {
    min-width: 720px;
  }

  body:not(.login-page) .app-footer {
    padding: 12px 14px;
    gap: 8px;
    flex-wrap: wrap;
  }

  .support-widget-toggle {
    right: 12px;
    bottom: 12px;
    width: 50px;
    height: 50px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
  }

  .survey-bubble-toggle {
    /* Beside support-widget-toggle (same bottom:12px row) instead of
       stacked above it - same reasoning as the desktop rule above. */
    right: 70px;
    bottom: 12px;
    width: 50px;
    height: 50px;
    padding: 0;
    justify-content: center;
    border-radius: 14px;
    gap: 0;
  }

  .support-widget-toggle-label {
    display: none;
  }

  .survey-bubble-toggle-label,
  .survey-bubble-toggle-count {
    display: none;
  }

  .support-widget-toggle-icon {
    width: 34px;
    height: 34px;
  }

  .support-widget-toggle-image {
    width: 22px;
    height: 22px;
  }

  .survey-bubble-toggle-icon {
    width: 24px;
    height: 24px;
  }

  body.sidebar-mobile-open .support-widget-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }

  body.sidebar-mobile-open .survey-bubble-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
  }
}

@media (max-width: 640px) {
  :root {
    --vc-topbar-height: 156px;
  }

  body:not(.login-page) .topbar {
    padding: 10px 10px 12px;
    gap: 8px;
  }

  .topbar-brand {
    padding-inline: 42px;
    margin-bottom: 0;
  }

  .topbar-logo {
    font-size: 1.08rem;
  }

  .topbar-system {
    max-width: 620px;
    margin-bottom: 0;
  }

  .topbar-system-line-primary {
    font-size: 9px;
  }

  .topbar-system-line-secondary {
    display: block;
    font-size: 8px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    justify-content: stretch;
    width: 100%;
    gap: 8px;
  }

  .topbar-control-summary {
    width: 100%;
    max-width: 620px;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    padding-bottom: 0;
  }

  .topbar-control-pill {
    flex: 1 1 96px;
    min-width: 92px;
    max-width: 124px;
  }

  .topbar-notifications,
  .topbar-user,
  .topbar-maintenance-indicator,
  .topbar-payment-notification,
  .topbar-survey-notification {
    justify-self: center;
    margin-inline: auto;
  }

  .topbar-user {
    width: auto;
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
  }

  .topbar-user-menu {
    position: fixed;
    top: calc(var(--vc-topbar-height) + 8px);
    left: 50%;
    right: auto;
    width: min(320px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--vc-topbar-height) - 24px);
    transform: translateX(-50%);
    overflow-y: auto;
  }

  .topbar-actions form {
    width: 100%;
    justify-self: stretch;
  }

  .btn-logout {
    width: 100%;
    justify-content: center;
  }
}

html[data-theme="dark"] body:not(.login-page) {
  background: radial-gradient(circle at 0% 0%, rgba(51, 65, 85, 0.26) 0%, transparent 32%),
              radial-gradient(circle at 100% 0%, rgba(30, 41, 59, 0.22) 0%, transparent 36%),
              #0b1220;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .topbar {
  background: linear-gradient(92deg, #0d1422, #111827 58%, #0f172a);
  border-bottom: 1px solid #263447;
}

html[data-theme="dark"] .theme-toggle {
  background: rgba(15, 23, 42, 0.65);
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .btn-logout {
  background: #b91c1c;
}

html[data-theme="dark"] body:not(.login-page) .btn-logout:hover {
  background: #991b1b;
}

html[data-theme="dark"] body:not(.login-page) .sidebar {
  background: #0b1220;
  border-right: 1px solid #263447;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-menu .admin-sticky-menu {
  background: #0b1220;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-user-footer {
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.3);
}

html[data-theme="dark"] body:not(.login-page) .sidebar-user-name {
  color: #f8fafc;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-user-role {
  color: #93c5fd;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-user-link {
  color: #bfdbfe;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-title {
  color: #f8fafc;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-menu a {
  color: #cbd5e1;
}

html[data-theme="dark"] body:not(.login-page) .sidebar-menu a:hover,
html[data-theme="dark"] body:not(.login-page) .sidebar-menu a.active,
html[data-theme="dark"] body:not(.login-page) .has-submenu.open > .submenu-toggle {
  background: #1e293b;
  color: #f8fafc;
}

html[data-theme="dark"] body:not(.login-page) .content {
  background:
    radial-gradient(circle at 8% 0%, rgba(51, 65, 85, 0.25) 0%, rgba(51, 65, 85, 0) 34%),
    radial-gradient(circle at 100% 8%, rgba(30, 41, 59, 0.2) 0%, rgba(30, 41, 59, 0) 40%),
    #0b1220;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .content h1,
html[data-theme="dark"] body:not(.login-page) .content h2,
html[data-theme="dark"] body:not(.login-page) .content h3,
html[data-theme="dark"] body:not(.login-page) .content h4,
html[data-theme="dark"] body:not(.login-page) .content p,
html[data-theme="dark"] body:not(.login-page) .content small,
html[data-theme="dark"] body:not(.login-page) .content label {
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .content > h2 {
  color: #f8fafc;
  text-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header {
  background: linear-gradient(180deg, #111b2f, #0f172a);
  border: 1px solid #2c3d55;
  box-shadow: 0 8px 22px rgba(2, 6, 23, 0.3);
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header .search-container::before {
  color: #94a3b8;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header .search-container input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header .btn-lote {
  border-color: rgba(96, 165, 250, 0.36);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(37, 99, 235, 0.18));
  color: #dbeafe;
  box-shadow: 0 10px 22px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] body:not(.login-page) .content > .table-header .btn-lote:hover {
  border-color: rgba(147, 197, 253, 0.56);
  background: linear-gradient(180deg, rgba(15, 23, 42, 1), rgba(37, 99, 235, 0.28));
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.34);
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper,
html[data-theme="dark"] body:not(.login-page) .content > table {
  background: #0f172a;
  border: 1px solid #2c3d55;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.32);
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table,
html[data-theme="dark"] body:not(.login-page) .content > table,
html[data-theme="dark"] body:not(.login-page) .custom-table {
  background: #0f172a;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table thead th,
html[data-theme="dark"] body:not(.login-page) .content > table thead th,
html[data-theme="dark"] body:not(.login-page) .custom-table thead th {
  background: #172339;
  color: #e2e8f0;
  border-bottom: 1px solid #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table tbody tr,
html[data-theme="dark"] body:not(.login-page) .content > table tbody tr,
html[data-theme="dark"] body:not(.login-page) .custom-table tbody tr {
  background: #0f1a2e;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table tbody td,
html[data-theme="dark"] body:not(.login-page) .content > table tbody td,
html[data-theme="dark"] body:not(.login-page) .custom-table tbody td {
  color: #cbd5e1;
  border-bottom: 1px solid #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table tbody tr:nth-child(even),
html[data-theme="dark"] body:not(.login-page) .content > table tbody tr:nth-child(even),
html[data-theme="dark"] body:not(.login-page) .custom-table tbody tr:nth-child(even) {
  background: #101d32;
}

html[data-theme="dark"] body:not(.login-page) .content > .table-wrapper > table tbody tr:hover,
html[data-theme="dark"] body:not(.login-page) .content > table tbody tr:hover,
html[data-theme="dark"] body:not(.login-page) .custom-table tbody tr:hover {
  background: #172741;
}

html[data-theme="dark"] .param-tabs {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(17, 24, 39, 0.98));
  border-color: #334155;
}

html[data-theme="dark"] .param-tab-btn {
  background: linear-gradient(180deg, #172033, #101827);
  border-color: #334155;
  color: #cbd5e1;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.3);
}

html[data-theme="dark"] .param-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  border-color: #2563eb;
  color: #fff;
}

html[data-theme="dark"] .param-series-panel {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(17, 24, 39, 0.98));
  border-color: #334155;
}

html[data-theme="dark"] .param-series-table-wrap {
  border-color: #334155;
  background: rgba(15, 23, 42, 0.98);
}

html[data-theme="dark"] .param-series-table thead {
  background: linear-gradient(180deg, #1b2a44, #172339);
}

html[data-theme="dark"] .param-series-table thead th {
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-theme="dark"] .param-series-table tbody td {
  background: rgba(15, 26, 46, 0.96);
  border-bottom-color: #334155;
}

html[data-theme="dark"] .param-series-table tbody tr:hover td {
  background: #172741;
}

html[data-theme="dark"] .param-series-table input[type="text"],
html[data-theme="dark"] .param-series-table input[type="number"] {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0;
}

html[data-theme="dark"] .param-series-photo {
  border-color: #334155;
  background: linear-gradient(180deg, #162033, #0f172a);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.36);
}

html[data-theme="dark"] .param-series-empty {
  color: #94a3b8;
}

html[data-theme="dark"] .parametros-list-table-wrap {
  background: rgba(15, 23, 42, 0.3);
}

html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .pagination {
  background: #111c30;
  border: 1px solid #32455f;
  box-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .page-summary,
html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .page-info,
html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .page-numbers {
  color: #cbd5e1;
}

html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .page-number-btn {
  background: #16243a;
  border-color: #39516d;
  color: #cbd5e1;
}

html[data-theme="dark"] body:not(.login-page) .content > .pagination-container .page-number-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

html[data-theme="dark"] body:not(.login-page) .modal-box {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) table {
  background: #0f172a;
}

html[data-theme="dark"] body:not(.login-page) th {
  background: #111827;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) td {
  color: #cbd5e1;
  border-bottom-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) tbody tr:hover {
  background: #1e293b;
}

html[data-theme="dark"] body:not(.login-page) input,
html[data-theme="dark"] body:not(.login-page) select,
html[data-theme="dark"] body:not(.login-page) textarea {
  background: #111827;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) input::placeholder,
html[data-theme="dark"] body:not(.login-page) textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] body:not(.login-page) input:focus,
html[data-theme="dark"] body:not(.login-page) select:focus,
html[data-theme="dark"] body:not(.login-page) textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

html[data-theme="dark"] body:not(.login-page) .modal-header,
html[data-theme="dark"] body:not(.login-page) .modal-body,
html[data-theme="dark"] body:not(.login-page) .modal-actions {
  background: #0b1220;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) {
  background: rgba(2, 6, 12, 0.58);
  backdrop-filter: blur(3px);
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-box {
  background: linear-gradient(180deg, #111a2d, #0f172a);
  border: 1px solid #2f415a;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header {
  background: #1a2539;
  border-bottom: 1px solid #33465f;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header h3 {
  color: #e5e7eb;
  text-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #3e556f;
  background: #25354a;
  color: #d1d5db;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .btn-danger,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #3e556f;
  background: #25354a;
  color: #d1d5db;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close:hover {
  background: #31445d;
  border-color: #58728f;
  color: #ffffff;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .btn-danger:hover,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-header .modal-close-btn:hover {
  background: #31445d;
  border-color: #58728f;
  color: #ffffff;
}

html[data-theme="dark"] .page-btn {
  border-color: #38557d;
  background: linear-gradient(180deg, #15243b, #1d3352);
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .page-btn:hover {
  border-color: #5373a0;
  background: linear-gradient(180deg, #1a2c48, #224068);
}

html[data-theme="dark"] .page-btn.btn-secondary {
  border-color: #45607f;
  background: linear-gradient(180deg, #1a2538, #24344d);
  color: #dbeafe;
}

html[data-theme="dark"] .page-btn.btn-danger {
  border-color: rgba(248, 113, 113, 0.2);
}

html[data-theme="dark"] .btn-factura-assign-table {
  border-color: #45607f;
  background: linear-gradient(180deg, #1a2538, #24344d);
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.24);
}

html[data-theme="dark"] .btn-factura-config-table {
  border-color: #45607f;
  background: linear-gradient(180deg, #1a2538, #24344d);
  color: #dbeafe;
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.24);
}

html[data-theme="dark"] .modal-close,
html[data-theme="dark"] .modal-close-btn {
  border-color: #3e556f;
  background: #25354a;
  color: #d1d5db;
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.3);
}

html[data-theme="dark"] .table-actions .page-btn,
html[data-theme="dark"] .table-actions .btn-danger {
  box-shadow: 0 10px 20px rgba(2, 6, 23, 0.24);
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body {
  background: #0f172a;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body form {
  background: #111b2f;
  border: 1px solid #33465f;
  box-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .form-group label {
  color: #cbd5e1;
  letter-spacing: 0.35px;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body input,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body select,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body textarea {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body input::placeholder,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body textarea::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body input:focus,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body select:focus,
html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body small {
  color: #94a3b8 !important;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .table-wrapper {
  background: #0f172a;
  border-color: #33465f;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .table-wrapper thead th {
  background: #1b293e;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .table-wrapper tbody td {
  color: #cbd5e1;
  border-bottom-color: #334155;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .switch-container {
  background: #17253a;
  border-color: #39516d;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-body .switch-label {
  color: #cbd5e1;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions {
  border-top: 1px solid #33465f;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions .btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

html[data-theme="dark"] body:not(.login-page) .content > .modal-overlay:not(.modal-child) .modal-actions .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

html[data-theme="dark"] .guia-destinatario-card {
  border-color: #33465f;
  background: linear-gradient(180deg, #111b2f 0%, #0f172a 100%);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.35);
}

html[data-theme="dark"] .guia-destinatario-card .table-wrapper {
  border-color: #33465f;
}

html[data-theme="dark"] body:not(.login-page) .pagination {
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: none;
}

html[data-theme="dark"] body:not(.login-page) .page-info {
  color: #cbd5e1;
}

html[data-theme="dark"] body:not(.login-page) .param-tab-btn {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] body:not(.login-page) .app-footer {
  background: #030712;
  border-top-color: #1f2937;
  color: #94a3b8;
}

/* Personas/Clientes/Proveedores: unificar con estilo de Usuarios */
html[data-theme="dark"] .personas-page {
  --persona-bg: #0f172a;
  --persona-card: #0f172a;
  --persona-border: #2c3d55;
  --persona-ink: #f8fafc;
  --persona-muted: #94a3b8;
  --persona-primary: #3b82f6;
  --persona-primary-dark: #2563eb;
  --persona-head: #172339;
  --persona-row-hover: #172741;
  --persona-shadow: 0 10px 28px rgba(2, 6, 23, 0.32);
}

html[data-theme="dark"] .personas-page .personas-title {
  color: #f8fafc;
  text-shadow: none;
}

html[data-theme="dark"] .personas-page .personas-toolbar {
  background: linear-gradient(180deg, #111b2f, #0f172a);
  border-color: #2c3d55;
  box-shadow: var(--persona-shadow);
}

html[data-theme="dark"] .personas-page .personas-search::before {
  color: #94a3b8;
}

html[data-theme="dark"] .personas-page .personas-search input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .personas-page #btnNuevoPersona {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: none;
}

html[data-theme="dark"] .personas-page #btnNuevoPersona:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

html[data-theme="dark"] .personas-page .personas-table-wrap {
  background: #0f172a;
  border-color: #2c3d55;
  box-shadow: var(--persona-shadow);
}

html[data-theme="dark"] .personas-page .personas-table thead th {
  background: #172339;
  color: #e2e8f0;
  border-bottom-color: #334155;
}

html[data-theme="dark"] .personas-page .personas-table tbody td {
  color: #cbd5e1;
  border-bottom-color: #334155;
}

html[data-theme="dark"] .personas-page .personas-table tbody tr {
  background: #0f1a2e;
}

html[data-theme="dark"] .personas-page .personas-table tbody tr:nth-child(even) {
  background: #101d32;
}

html[data-theme="dark"] .personas-page .personas-table tbody tr:hover {
  background: #172741;
}

html[data-theme="dark"] .personas-page .pagination {
  background: #111c30;
  border-color: #32455f;
  box-shadow: none;
}

html[data-theme="dark"] .personas-page .page-summary {
  color: #94a3b8;
}

html[data-theme="dark"] .personas-page .persona-modal {
  background: rgba(2, 6, 12, 0.58);
  backdrop-filter: blur(3px);
}

html[data-theme="dark"] .personas-page .persona-modal-box {
  background: linear-gradient(180deg, #111a2d, #0f172a);
  border-color: #2f415a;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] .personas-page .persona-modal-header {
  background: #1a2539;
  color: #e2e8f0;
  border-bottom-color: #33465f;
}

html[data-theme="dark"] .personas-page .persona-modal-header h3 {
  color: #e5e7eb;
  text-shadow: none;
}

html[data-theme="dark"] .personas-page .modal-close-btn {
  border-color: #3e556f;
  background: #25354a;
  color: #d1d5db;
}

html[data-theme="dark"] .personas-page .modal-close-btn:hover {
  background: #31445d;
  border-color: #58728f;
  color: #ffffff;
}

#usuarioBodegaModal .modal-box {
  max-width: 860px;
}

#usuarioBodegaModal .modal-body > p {
  margin: 0 0 14px;
  font-size: 14px;
  color: #475569;
}

#usuarioBodegaModal .table-wrapper {
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  box-shadow: none;
}

#usuarioBodegaModal table th {
  background: #f6f9ff;
  color: #0f172a;
  font-weight: 800;
}

#usuarioBodegaModal table td {
  vertical-align: middle;
}

#usuarioBodegaModal input[type="checkbox"],
#usuarioBodegaModal input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #2563eb;
  cursor: pointer;
}

#usuarioBodegaModal .usuario-bodega-switch {
  margin: 0 auto;
}

#usuarioBodegaModal .usuario-bodega-switch input[type="checkbox"],
#usuarioBodegaModal .usuario-bodega-switch input[type="radio"] {
  width: 0;
  height: 0;
}

#usuarioBodegaModal input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

html[data-theme="dark"] #usuarioBodegaModal .table-wrapper {
  border-color: #334155;
}

html[data-theme="dark"] #usuarioBodegaModal table th {
  background: #172235;
  color: #e5eefc;
}

html[data-theme="dark"] .personas-page .modal-body {
  background: #0f172a;
}

html[data-theme="dark"] .personas-page #personaForm {
  background: #111b2f;
  border-color: #33465f;
  box-shadow: none;
}

html[data-theme="dark"] .personas-page #personaForm label,
html[data-theme="dark"] .personas-page .form-section-title {
  color: #cbd5e1;
}

html[data-theme="dark"] .personas-page #personaForm input,
html[data-theme="dark"] .personas-page #personaForm select,
html[data-theme="dark"] .personas-page #personaForm textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] .personas-page #personaForm input:focus,
html[data-theme="dark"] .personas-page #personaForm select:focus,
html[data-theme="dark"] .personas-page #personaForm textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

html[data-theme="dark"] .personas-page #cliente_id {
  background: #17253a;
  color: #cbd5e1;
}

html[data-theme="dark"] .personas-page .personas-direcciones,
html[data-theme="dark"] .personas-page .table-wrapper-direcciones {
  background: #0f172a;
  border-color: #33465f;
}

html[data-theme="dark"] .personas-page .tabla-direcciones thead {
  background: #1b293e !important;
}

html[data-theme="dark"] .personas-page .tabla-direcciones th {
  color: #e2e8f0;
}

html[data-theme="dark"] .personas-page .tabla-direcciones td {
  border-top-color: #334155 !important;
}

html[data-theme="dark"] .personas-page .tabla-direcciones input,
html[data-theme="dark"] .personas-page .tabla-direcciones select {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .personas-page .link-agregar-direccion {
  border-color: #39516d;
  background: #16243a;
  color: #cbd5e1;
}

html[data-theme="dark"] .personas-page .link-agregar-direccion:hover {
  background: #1b2d46;
  color: #e2e8f0;
}

html[data-theme="dark"] .personas-page .switch-container {
  background: #17253a;
  border-color: #39516d;
}

html[data-theme="dark"] .personas-page .switch-label {
  color: #cbd5e1;
}

/* Estados de validacion en dark: sin fondos claros rosados */
html[data-theme="dark"] body:not(.login-page) .input-error-soft {
  border: 1.5px solid #f87171 !important;
  background-color: #1a1a2a !important;
  color: #f8fafc !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.14);
}

html[data-theme="dark"] body:not(.login-page) .input-error-soft:focus {
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

html[data-theme="dark"] body:not(.login-page) .validation-message,
html[data-theme="dark"] .personas-page .validation-message {
  color: #fda4af;
}

html[data-theme="dark"] .personas-page .validation-message.validation-message-success {
  color: #86efac;
}

html[data-theme="dark"] .personas-page .validation-message.validation-message-info {
  color: #93c5fd;
}

html[data-theme="dark"] .personas-page .validation-message.validation-message-warning {
  color: #fdba74;
}

html[data-theme="dark"] body:not(.login-page) input.is-invalid,
html[data-theme="dark"] body:not(.login-page) select.is-invalid,
html[data-theme="dark"] body:not(.login-page) textarea.is-invalid {
  border: 2px solid #f87171 !important;
  background-color: #1a1a2a !important;
  color: #f8fafc !important;
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.14);
}

html[data-theme="dark"] body:not(.login-page) .invalid-feedback {
  color: #fda4af;
}

/* Factura (modal principal) adaptada a dark */
html[data-theme="dark"] #Factura_ventaModal .forma-right {
  background: #111b2f;
  border: 1px solid #33465f;
  box-shadow: none;
}

html[data-theme="dark"] #Factura_ventaModal .resumen-line,
html[data-theme="dark"] #Factura_ventaModal .resumen-total {
  color: #cbd5e1;
}

html[data-theme="dark"] #Factura_ventaModal .resumen-line span:first-child {
  color: #94a3b8;
}

html[data-theme="dark"] #Factura_ventaModal .resumen-line span:last-child,
html[data-theme="dark"] #Factura_ventaModal .resumen-total span:last-child {
  color: #e2e8f0;
}

html[data-theme="dark"] #Factura_ventaModal #total {
  color: #60a5fa;
}

html[data-theme="dark"] #Factura_ventaModal .resumen-line:not(:last-child) {
  border-bottom-color: #334155;
}

html[data-theme="dark"] #Factura_ventaModal .resumen-total {
  border-top-color: #33465f;
}

html[data-theme="dark"] #Factura_ventaModal .link-crear-detalle,
html[data-theme="dark"] #Factura_ventaModal .link-crear-forma {
  background: #16243a;
  border-color: #39516d;
  color: #cbd5e1;
}

html[data-theme="dark"] #Factura_ventaModal .link-crear-detalle:hover,
html[data-theme="dark"] #Factura_ventaModal .link-crear-forma:hover {
  background: #1b2d46;
  color: #e2e8f0;
}

html[data-theme="dark"] #Factura_ventaModal #detallesAdicionalesTable .btn-delete-detalle {
  background: #17253a;
  color: #fca5a5;
  border-color: #ef4444;
}

/* Bitacora detail popup adaptado a dark */
html[data-theme="dark"] .swal2-popup .bitacora-changes-wrap,
html[data-theme="dark"] .swal2-popup .bitacora-raw-box {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-search input {
  background: #0b1324;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .swal2-popup .bitacora-chip-hoy,
html[data-theme="dark"] .bitacora-chip-hoy-tabla {
  background: rgba(34, 197, 94, 0.18);
  border-color: #22c55e;
  color: #86efac;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-table-wrap {
  border-color: #334155;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-table th {
  background: #172339;
  border-bottom: 1px solid #334155;
  color: #e2e8f0;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-table td {
  border-bottom: 1px solid #334155;
  color: #cbd5e1;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-table tbody tr:nth-child(even) {
  background: #111e34;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-row-hoy td {
  background: rgba(22, 163, 74, 0.2) !important;
  color: #bbf7d0;
}

html[data-theme="dark"] .swal2-popup .bitacora-empty {
  color: #94a3b8;
}

html[data-theme="dark"] .swal2-popup .bitacora-detail-meta,
html[data-theme="dark"] .swal2-popup .bitacora-detail-label {
  color: #cbd5e1;
}

html[data-theme="dark"] .bitacora-row-hoy td {
  background: rgba(22, 163, 74, 0.16) !important;
}

html[data-theme="dark"] .bitacora-row-hoy td:nth-child(1),
html[data-theme="dark"] .bitacora-row-hoy td:nth-child(4) {
  color: #86efac;
}

@media (max-width: 760px) {
  .bitacora-raw-wrap {
    grid-template-columns: 1fr;
  }

  .bitacora-detail-search {
    flex-basis: 100%;
    max-width: 100%;
  }

  .bitacora-detail-pager {
    justify-content: center;
  }
}

/* SweetAlert2 en dark */
html[data-theme="dark"] .swal2-container.swal2-backdrop-show,
html[data-theme="dark"] .swal-inside-modal {
  background: rgba(2, 6, 12, 0.58) !important;
}

html[data-theme="dark"] .swal2-popup {
  background: #111b2f !important;
  color: #e2e8f0 !important;
  border: 1px solid #33465f !important;
  border-radius: 14px !important;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45) !important;
}

html[data-theme="dark"] .vc-swal-popup {
  border: 1px solid rgba(96, 165, 250, 0.34) !important;
  background: linear-gradient(180deg, #11213b, #0f1a2f) !important;
  color: #e2e8f0 !important;
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.56) !important;
}

html[data-theme="dark"] .vc-swal-toast {
  border: 1px solid rgba(96, 165, 250, 0.28) !important;
  background: linear-gradient(180deg, #11213b, #0f1a2f) !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .vc-swal-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .vc-swal-html {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .vc-swal-cancel {
  background: linear-gradient(180deg, #334155, #1f2937) !important;
  color: #e2e8f0 !important;
  border: 1px solid #475569 !important;
}

html[data-theme="dark"] .vc-swal-cancel:hover {
  background: linear-gradient(180deg, #1f2937, #111827) !important;
}

html[data-theme="dark"] .swal2-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .swal2-html-container,
html[data-theme="dark"] .swal2-content {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .swal2-confirm {
  background: #3b82f6 !important;
  color: #ffffff !important;
  border: 1px solid #60a5fa !important;
}

html[data-theme="dark"] .swal2-cancel {
  background: #1f2937 !important;
  color: #e2e8f0 !important;
  border: 1px solid #475569 !important;
}

html[data-theme="dark"] .swal2-styled:focus {
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.24) !important;
}

html[data-theme="dark"] .swal2-input,
html[data-theme="dark"] .swal2-textarea,
html[data-theme="dark"] .swal2-select,
html[data-theme="dark"] .swal2-file {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border: 1px solid #334155 !important;
}

html[data-theme="dark"] .swal2-validation-message {
  background: rgba(239, 68, 68, 0.16) !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: #86efac !important;
}

html[data-theme="dark"] .swal2-icon.swal2-success .swal2-success-ring {
  border-color: rgba(134, 239, 172, 0.3) !important;
}

/* Modales hijos de factura en dark, alineados al estilo de Usuarios */
html[data-theme="dark"] #detalleFacturaModal.modal-overlay.modal-child,
html[data-theme="dark"] #formaPagoModal.modal-overlay.modal-child {
  background: rgba(2, 6, 12, 0.58);
  backdrop-filter: blur(3px);
}

html[data-theme="dark"] #detalleFacturaModal .modal-box,
html[data-theme="dark"] #formaPagoModal .modal-box {
  background: linear-gradient(180deg, #111a2d, #0f172a);
  border-color: #2f415a;
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);
}

html[data-theme="dark"] #detalleFacturaModal .modal-header,
html[data-theme="dark"] #formaPagoModal .modal-header {
  background: #1a2539;
  color: #e2e8f0;
  border-bottom-color: #33465f;
}

html[data-theme="dark"] #detalleFacturaModal .modal-header h3,
html[data-theme="dark"] #formaPagoModal .modal-header h3 {
  color: #e5e7eb;
}

html[data-theme="dark"] #detalleFacturaModal .modal-header .btn-danger,
html[data-theme="dark"] #formaPagoModal .modal-header .btn-danger {
  border-color: #3e556f;
  background: #25354a;
  color: #d1d5db;
}

html[data-theme="dark"] #detalleFacturaModal .modal-header .btn-danger:hover,
html[data-theme="dark"] #formaPagoModal .modal-header .btn-danger:hover {
  background: #31445d;
  border-color: #58728f;
  color: #ffffff;
}

html[data-theme="dark"] #detalleFacturaModal .modal-body,
html[data-theme="dark"] #formaPagoModal .modal-body {
  background: #0f172a;
}

html[data-theme="dark"] #detalleFacturaModal .modal-body form,
html[data-theme="dark"] #formaPagoModal .modal-body form {
  background: #111b2f;
  border-color: #33465f;
}

html[data-theme="dark"] #detalleFacturaModal label,
html[data-theme="dark"] #formaPagoModal label {
  color: #cbd5e1;
}

html[data-theme="dark"] #detalleFacturaModal input,
html[data-theme="dark"] #detalleFacturaModal select,
html[data-theme="dark"] #detalleFacturaModal textarea,
html[data-theme="dark"] #formaPagoModal input,
html[data-theme="dark"] #formaPagoModal select,
html[data-theme="dark"] #formaPagoModal textarea {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] #detalleFacturaModal input:focus,
html[data-theme="dark"] #detalleFacturaModal select:focus,
html[data-theme="dark"] #detalleFacturaModal textarea:focus,
html[data-theme="dark"] #formaPagoModal input:focus,
html[data-theme="dark"] #formaPagoModal select:focus,
html[data-theme="dark"] #formaPagoModal textarea:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

html[data-theme="dark"] #detalleFacturaModal #detalleCantidad3 {
  background: #FFDBBB;
  color: #7c2d12;
  border-color: #f4b183;
}

html[data-theme="dark"] #detalleFacturaModal .modal-actions,
html[data-theme="dark"] #formaPagoModal .modal-actions {
  border-top-color: #33465f;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .select2-dropdown {
  background: #0f172a;
  border-color: #334155 !important;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.5);
}

html[data-theme="dark"] .select2-search--dropdown {
  background: #111827;
  border-bottom-color: #334155;
}

html[data-theme="dark"] .select2-search--dropdown .select2-search__field {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #334155 !important;
}

html[data-theme="dark"] .select2-results__option {
  color: #cbd5e1;
}

html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: #1f2937 !important;
  color: #f8fafc !important;
}

@media (max-width: 900px) {
  .topbar-system {
    display: flex;
  }
}

/* ==============================
   VUE CATALOG SHELL
============================== */

.vc-vue-page {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  min-width: 0;
  max-width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px 32px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(96, 165, 250, 0.12), transparent 22%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.98)),
    linear-gradient(180deg, #f8fbff 0%, #eef4fa 56%, #e8f0f7 100%);
}

.vc-vue-page::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.26), transparent 74%);
}

.vc-vue-shell {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 16px 14px 24px;
  box-sizing: border-box;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vc-vue-hero {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.vc-vue-hero__eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #0f766e;
}

.vc-vue-hero__title {
  font-size: clamp(1.6rem, 2.5vw, 2.1rem);
  line-height: 1.05;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.vc-vue-hero__copy {
  max-width: 720px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #475569;
}

.vc-vue-hero--catalog {
  gap: 4px;
  padding: 14px 22px;
  border-radius: 20px;
  background: linear-gradient(135deg, #23429f 0%, #2f62e4 58%, #5ea2f6 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
  flex-shrink: 0;
}

.vc-vue-hero--catalog .vc-vue-hero__eyebrow {
  color: rgba(219, 234, 254, 0.92);
}

.vc-vue-hero--catalog .vc-vue-hero__title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.vc-vue-hero--catalog .vc-vue-hero__copy {
  font-size: 0.9rem;
  line-height: 1.4;
  color: rgba(239, 246, 255, 0.94);
}

.vc-vue-hero--personas {
  gap: 8px;
}

.vc-vue-hero--personas .vc-vue-hero__title {
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.vc-vue-hero--personas .vc-vue-hero__copy {
  font-size: 0.95rem;
  line-height: 1.45;
}

.vc-vue-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.vc-vue-summary-card {
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  height: 100%;
}

.vc-vue-summary-card__label {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.vc-vue-summary-card__value {
  margin-top: 10px;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0f172a;
}

.vc-vue-toolbar-card,
.vc-vue-table-card {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(203, 213, 225, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.05);
}

.vc-vue-toolbar-card {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.vc-vue-table-card {
  flex-grow: 1;
}

.vc-vue-shell > .vc-vue-toolbar-card.vc-vue-toolbar-card--catalog {
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 0;
  height: auto;
}

.vc-vue-shell > .vc-vue-toolbar-card.vc-vue-toolbar-card--catalog .v-card-text {
  flex: 0 0 auto !important;
  min-height: 0;
  height: auto;
}

.vc-vue-shell > .vc-vue-table-card.vc-vue-table-card--catalog {
  flex: 0 0 auto !important;
  flex-grow: 0 !important;
  flex-shrink: 0;
  align-self: stretch;
  min-height: 0;
  height: auto;
}

.vc-vue-shell > .vc-vue-table-card.vc-vue-table-card--catalog .v-card-text {
  min-height: 0;
  height: auto;
}

.vc-vue-toolbar-card .v-card-text,
.vc-vue-table-card .v-card-text {
  padding: 12px 14px 14px;
}

.vc-vue-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.vc-vue-toolbar .v-btn {
  min-height: 34px;
  padding-inline: 14px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.vc-vue-toolbar__create-btn.v-btn {
  min-height: 42px;
  padding-inline: 18px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #2563eb, #1e40af) !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.27);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.vc-vue-toolbar__create-btn.v-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #1d4ed8, #1e3a8a) !important;
}

.vc-vue-toolbar > .v-btn,
.vc-vue-toolbar > .vc-vue-toolbar__actions {
  order: 1;
  flex: 0 0 auto;
}

.vc-vue-toolbar__search {
  order: 2;
  margin-inline-start: auto;
  flex: 1 1 360px;
  max-width: 440px;
  min-width: min(100%, 280px);
}

.vc-vue-toolbar__search .v-field {
  min-height: 40px;
  border-radius: 10px;
}

.vc-vue-toolbar__search .v-field__input {
  min-height: 40px;
  font-size: 0.92rem;
}

.vc-vue-toolbar__search .v-label {
  font-size: 0.9rem;
}

.vc-vue-toolbar__search--personas .v-field {
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
  border: 1px solid rgba(191, 219, 254, 0.78);
}

.vc-vue-toolbar__search--personas .v-field__outline {
  display: none;
}

.vc-vue-toolbar__search--personas .v-field__overlay {
  display: none;
}

.vc-vue-toolbar__search--personas .v-field__input {
  padding-inline: 2px 12px;
}

.vc-vue-toolbar__search--personas .v-input__control {
  box-shadow: none;
}

.vc-vue-toolbar__search--personas .v-field--focused {
  border-color: rgba(191, 219, 254, 0.78);
}

.vc-vue-toolbar__search--personas .v-field__field,
.vc-vue-toolbar__search--personas .v-field__input,
.vc-vue-toolbar__search--personas input,
.vc-vue-toolbar__search--personas .v-field__prepend-inner,
.vc-vue-toolbar__search--personas .v-field__append-inner {
  outline: none !important;
  box-shadow: none !important;
}

.vc-vue-toolbar__search--personas .v-field--focused .v-field__field,
.vc-vue-toolbar__search--personas .v-field--focused .v-field__input,
.vc-vue-toolbar__search--personas .v-field--focused input {
  outline: none !important;
  box-shadow: none !important;
}

.vc-vue-toolbar__search--catalog .v-field {
  border-radius: 999px;
  background: #ffffff;
  box-shadow: none;
  border: 1px solid rgba(191, 219, 254, 0.78);
}

.vc-vue-toolbar__search--catalog .v-field__outline,
.vc-vue-toolbar__search--catalog .v-field__overlay {
  display: none;
}

.vc-vue-toolbar__search--catalog .v-field__input {
  padding-inline: 2px 12px;
}

.vc-vue-toolbar__search--catalog .v-input__control {
  box-shadow: none;
}

.vc-vue-toolbar__search--catalog .v-field--focused {
  border-color: rgba(191, 219, 254, 0.78);
}

.vc-vue-toolbar__search--catalog .v-field__field,
.vc-vue-toolbar__search--catalog .v-field__input,
.vc-vue-toolbar__search--catalog input,
.vc-vue-toolbar__search--catalog .v-field__prepend-inner,
.vc-vue-toolbar__search--catalog .v-field__append-inner,
.vc-vue-toolbar__search--catalog .v-field__clearable,
.vc-vue-toolbar__search--catalog .v-field--focused .v-field__field,
.vc-vue-toolbar__search--catalog .v-field--focused .v-field__input,
.vc-vue-toolbar__search--catalog .v-field--focused input {
  outline: none !important;
  box-shadow: none !important;
}

.vc-vue-table-alert {
  margin-bottom: 10px;
}

.vc-vue-table {
  border-radius: 14px;
  overflow: hidden;
}

.vc-vue-table thead th {
  background: #edf3fc;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  border-bottom-color: #d8e3f3;
}

.vc-vue-table tbody td {
  font-size: 13px;
  line-height: 1.35;
  color: #0f172a;
  border-bottom-color: #dde7f3;
}

.vc-vue-table td,
.vc-vue-table th {
  white-space: nowrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.vc-vue-table td.vc-vue-table__name,
.vc-vue-table th.vc-vue-table__name {
  white-space: normal;
}

.vc-vue-table .font-weight-bold.text-body-1 {
  font-size: 13px !important;
  line-height: 1.35;
  font-weight: 700 !important;
}

.vc-vue-table td > .d-flex.align-center.ga-3 {
  gap: 8px !important;
}

.vc-vue-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 10px;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
}

.vc-vue-status-dot--active {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.vc-vue-status-dot--inactive {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.vc-vue-table .v-selection-control {
  min-height: 26px !important;
}

.vc-vue-table .v-switch {
  transform: scale(0.82);
  transform-origin: center right;
}

.vc-vue-table__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.vc-vue-check-cell {
  min-height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-vue-dialog-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vc-vue-dialog-card {
  border-radius: 26px;
  overflow: clip;
}

.vc-vue-dialog-card__titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 64px 20px 22px;
}

.vc-vue-dialog-card__title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.vc-vue-dialog-card .vc-vue-modal-close-btn {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 3;
  margin: 0 !important;
}

.vc-vue-dialog-card__body {
  padding: 18px 20px 20px;
  background: #f8fbff;
}

.vc-vue-dialog-loading {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 24px;
  color: #3555a6;
}

.vc-vue-dialog-loading__text {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.vc-vue-modal-close-btn,
.vc-vue-modal-btn {
  min-height: 40px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
}

.vc-vue-modal-close-btn {
  min-height: 32px;
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
}

.vc-vue-modal-btn {
  min-width: 122px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.vc-vue-modal-btn--primary {
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.vc-vue-modal-btn--danger {
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.2);
}

.vc-vue-form-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.vc-vue-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.vc-vue-form-grid--6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.vc-vue-form-grid--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.vc-vue-form-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.vc-vue-form-field__hint {
  font-size: 12px;
  color: var(--vc-muted-text, #6b7280);
}

.vc-select-system-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.vc-vue-form-field__label,
.vc-select-system-field__label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-transform: none;
  letter-spacing: 0.01em;
}

.vc-vue-form-field--span-2 {
  grid-column: span 2;
}

.vc-vue-form-field--span-3 {
  grid-column: span 3;
}

.vc-vue-form-field--span-4 {
  grid-column: span 4;
}

.vc-vue-form-grid .v-input,
.vc-vue-form-grid--6 .v-input,
.vc-vue-form-grid--two .v-input,
.vc-vue-form-stack .v-input,
.vc-select-system-field .v-input,
.profile-fields .v-input,
.vc-producto-form .v-input {
  width: 100%;
  min-width: 0;
}

.vc-vue-form-grid .v-field,
.vc-vue-form-grid--6 .v-field,
.vc-vue-form-grid--two .v-field,
.vc-vue-form-stack .v-field,
.vc-select-system-field .v-field,
.profile-fields .v-field,
.vc-producto-form .v-field,
.vc-persona-field .v-field {
  --v-input-control-height: 44px;
  --v-field-padding-top: 0px;
  --v-field-padding-bottom: 0px;
  border-radius: 10px !important;
  background: #fff;
}

.vc-vue-form-grid .v-label,
.vc-vue-form-grid--6 .v-label,
.vc-vue-form-grid--two .v-label,
.vc-vue-form-stack .v-label,
.vc-select-system-field .v-label,
.profile-fields .v-label,
.vc-producto-form .v-label,
.vc-persona-field .v-label {
  font-size: 0.9rem;
  color: #64748b;
  transition: none !important;
}

.vc-vue-form-grid .v-field__input,
.vc-vue-form-grid--6 .v-field__input,
.vc-vue-form-grid--two .v-field__input,
.vc-vue-form-stack .v-field__input,
.vc-select-system-field .v-field__input,
.profile-fields .v-field__input,
.vc-producto-form .v-field__input,
.vc-persona-field .v-field__input {
  min-height: 44px !important;
  padding-top: 0;
  padding-bottom: 0;
}

.vc-vue-form-grid .v-field__field,
.vc-vue-form-grid--6 .v-field__field,
.vc-vue-form-grid--two .v-field__field,
.vc-vue-form-stack .v-field__field,
.vc-select-system-field .v-field__field,
.profile-fields .v-field__field,
.vc-producto-form .v-field__field,
.vc-persona-field .v-field__field {
  align-items: center;
}

.vc-vue-form-grid .v-select .v-field__input,
.vc-vue-form-grid--6 .v-select .v-field__input,
.vc-vue-form-grid--two .v-select .v-field__input,
.vc-vue-form-stack .v-select .v-field__input,
.vc-select-system-field .v-select .v-field__input,
.profile-fields .v-select .v-field__input,
.vc-producto-form .v-select .v-field__input,
.vc-persona-field .v-select .v-field__input,
.vc-vue-form-grid .v-autocomplete .v-field__input,
.vc-vue-form-grid--6 .v-autocomplete .v-field__input,
.vc-vue-form-grid--two .v-autocomplete .v-field__input,
.vc-vue-form-stack .v-autocomplete .v-field__input,
.vc-select-system-field .v-autocomplete .v-field__input,
.profile-fields .v-autocomplete .v-field__input,
.vc-producto-form .v-autocomplete .v-field__input,
.vc-persona-field .v-autocomplete .v-field__input {
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.vc-vue-form-grid .v-field--variant-outlined .v-field__outline__start,
.vc-vue-form-grid--6 .v-field--variant-outlined .v-field__outline__start,
.vc-vue-form-grid--two .v-field--variant-outlined .v-field__outline__start,
.vc-vue-form-stack .v-field--variant-outlined .v-field__outline__start,
.vc-select-system-field .v-field--variant-outlined .v-field__outline__start,
.profile-fields .v-field--variant-outlined .v-field__outline__start,
.vc-producto-form .v-field--variant-outlined .v-field__outline__start,
.vc-persona-field .v-field--variant-outlined .v-field__outline__start,
.vc-vue-form-grid .v-field--variant-outlined .v-field__outline__notch,
.vc-vue-form-grid--6 .v-field--variant-outlined .v-field__outline__notch,
.vc-vue-form-grid--two .v-field--variant-outlined .v-field__outline__notch,
.vc-vue-form-stack .v-field--variant-outlined .v-field__outline__notch,
.vc-select-system-field .v-field--variant-outlined .v-field__outline__notch,
.profile-fields .v-field--variant-outlined .v-field__outline__notch,
.vc-producto-form .v-field--variant-outlined .v-field__outline__notch,
.vc-persona-field .v-field--variant-outlined .v-field__outline__notch,
.vc-vue-form-grid .v-field--variant-outlined .v-field__outline__end,
.vc-vue-form-grid--6 .v-field--variant-outlined .v-field__outline__end,
.vc-vue-form-grid--two .v-field--variant-outlined .v-field__outline__end,
.vc-vue-form-stack .v-field--variant-outlined .v-field__outline__end,
.vc-select-system-field .v-field--variant-outlined .v-field__outline__end,
.profile-fields .v-field--variant-outlined .v-field__outline__end,
.vc-producto-form .v-field--variant-outlined .v-field__outline__end,
.vc-persona-field .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.vc-vue-form-grid .v-field--variant-outlined .v-field__outline,
.vc-vue-form-grid--6 .v-field--variant-outlined .v-field__outline,
.vc-vue-form-grid--two .v-field--variant-outlined .v-field__outline,
.vc-vue-form-stack .v-field--variant-outlined .v-field__outline,
.vc-select-system-field .v-field--variant-outlined .v-field__outline,
.profile-fields .v-field--variant-outlined .v-field__outline,
.vc-producto-form .v-field--variant-outlined .v-field__outline,
.vc-persona-field .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.vc-vue-form-grid .v-field--variant-outlined .v-field__outline::after,
.vc-vue-form-grid--6 .v-field--variant-outlined .v-field__outline::after,
.vc-vue-form-grid--two .v-field--variant-outlined .v-field__outline::after,
.vc-vue-form-stack .v-field--variant-outlined .v-field__outline::after,
.vc-select-system-field .v-field--variant-outlined .v-field__outline::after,
.profile-fields .v-field--variant-outlined .v-field__outline::after,
.vc-producto-form .v-field--variant-outlined .v-field__outline::after,
.vc-persona-field .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #c7d6e4;
  border-radius: 10px !important;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
  transition: none !important;
}

.vc-vue-form-grid .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-vue-form-grid--6 .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-vue-form-grid--two .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-vue-form-stack .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-select-system-field .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.profile-fields .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-producto-form .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.vc-persona-field .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #c7d6e4;
  border-width: 1px;
  box-shadow: none !important;
}

.vc-vue-form-grid .v-field--focused,
.vc-vue-form-grid--6 .v-field--focused,
.vc-vue-form-grid--two .v-field--focused,
.vc-vue-form-stack .v-field--focused,
.vc-select-system-field .v-field--focused,
.profile-fields .v-field--focused,
.vc-producto-form .v-field--focused,
.vc-persona-field .v-field--focused {
  box-shadow: none !important;
}

.vc-vue-form-grid .v-field__overlay,
.vc-vue-form-grid--6 .v-field__overlay,
.vc-vue-form-grid--two .v-field__overlay,
.vc-vue-form-stack .v-field__overlay,
.vc-select-system-field .v-field__overlay,
.profile-fields .v-field__overlay,
.vc-producto-form .v-field__overlay,
.vc-persona-field .v-field__overlay {
  opacity: 0 !important;
}

.vc-vue-form-grid .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-vue-form-grid--6 .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-vue-form-grid--two .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-vue-form-stack .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-select-system-field .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.profile-fields .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-producto-form .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after,
.vc-persona-field .v-field--variant-outlined.v-field--error:not(.v-field--disabled) .v-field__outline::after {
  border-color: rgb(var(--v-theme-error));
}

.vc-vue-form-grid .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-vue-form-grid--6 .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-vue-form-grid--two .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-vue-form-stack .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-select-system-field .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.profile-fields .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-producto-form .v-field--variant-outlined.v-field--disabled .v-field__outline::after,
.vc-persona-field .v-field--variant-outlined.v-field--disabled .v-field__outline::after {
  border-color: #d8e2ec;
}

.vc-vue-form-grid .v-select .v-select__selection,
.vc-vue-form-grid--6 .v-select .v-select__selection,
.vc-vue-form-grid--two .v-select .v-select__selection,
.vc-vue-form-stack .v-select .v-select__selection,
.vc-select-system-field .v-select .v-select__selection,
.profile-fields .v-select .v-select__selection,
.vc-producto-form .v-select .v-select__selection,
.vc-persona-field .v-select .v-select__selection,
.vc-vue-form-grid .v-autocomplete .v-autocomplete__selection,
.vc-vue-form-grid--6 .v-autocomplete .v-autocomplete__selection,
.vc-vue-form-grid--two .v-autocomplete .v-autocomplete__selection,
.vc-vue-form-stack .v-autocomplete .v-autocomplete__selection,
.vc-select-system-field .v-autocomplete .v-autocomplete__selection,
.profile-fields .v-autocomplete .v-autocomplete__selection,
.vc-producto-form .v-autocomplete .v-autocomplete__selection,
.vc-persona-field .v-autocomplete .v-autocomplete__selection {
  align-items: center;
  margin-top: 0;
  margin-bottom: 0;
}

.vc-vue-form-grid .v-select .v-select__selection-text,
.vc-vue-form-grid--6 .v-select .v-select__selection-text,
.vc-vue-form-grid--two .v-select .v-select__selection-text,
.vc-vue-form-stack .v-select .v-select__selection-text,
.vc-select-system-field .v-select .v-select__selection-text,
.profile-fields .v-select .v-select__selection-text,
.vc-producto-form .v-select .v-select__selection-text,
.vc-persona-field .v-select .v-select__selection-text {
  display: inline-flex;
  align-items: center;
  min-height: 100%;
}

.vc-vue-form-grid .v-field__prepend-inner,
.vc-vue-form-grid .v-field__append-inner,
.vc-vue-form-grid .v-field__clearable,
.vc-vue-form-grid--6 .v-field__prepend-inner,
.vc-vue-form-grid--6 .v-field__append-inner,
.vc-vue-form-grid--6 .v-field__clearable,
.vc-vue-form-grid--two .v-field__prepend-inner,
.vc-vue-form-grid--two .v-field__append-inner,
.vc-vue-form-grid--two .v-field__clearable,
.vc-vue-form-stack .v-field__prepend-inner,
.vc-vue-form-stack .v-field__append-inner,
.vc-vue-form-stack .v-field__clearable,
.vc-select-system-field .v-field__prepend-inner,
.vc-select-system-field .v-field__append-inner,
.vc-select-system-field .v-field__clearable,
.profile-fields .v-field__prepend-inner,
.profile-fields .v-field__append-inner,
.profile-fields .v-field__clearable,
.vc-producto-form .v-field__prepend-inner,
.vc-producto-form .v-field__append-inner,
.vc-producto-form .v-field__clearable,
.vc-persona-field .v-field__prepend-inner,
.vc-persona-field .v-field__append-inner,
.vc-persona-field .v-field__clearable {
  align-self: center;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding-top: 0;
  padding-bottom: 0;
}

.vc-vue-form-field--highlight .v-field {
  background: #fff3d8 !important;
}

.vc-vue-lookup-menu {
  margin-top: 6px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 18px 42px rgba(15, 23, 42, 0.14),
    0 4px 12px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.vc-vue-lookup-list {
  padding: 6px;
}

.vc-vue-lookup-list .v-list-item {
  min-height: 34px;
  border-radius: 8px;
  margin-bottom: 2px;
}

.vc-vue-lookup-list .v-list-item:last-child {
  margin-bottom: 0;
}

.vc-vue-lookup-list .v-list-item-title {
  font-size: 0.84rem;
  line-height: 1.2;
  color: #0f172a;
}

.vc-persona-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.vc-persona-form-grid--after-address {
  margin-top: 16px;
}

.vc-persona-form-grid--single {
  grid-template-columns: 1fr;
}

.vc-persona-form-grid--double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.vc-persona-form-grid--triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vc-persona-field {
  min-width: 0;
}

.vc-persona-field--span-2 {
  grid-column: span 2;
}

.vc-persona-dialog {
  border-radius: 26px;
  overflow: hidden;
}

.vc-persona-overlay {
  z-index: 5005 !important;
}

.vc-persona-overlay .v-overlay__scrim {
  background: rgba(7, 15, 32, 0.48) !important;
  opacity: 1 !important;
}

.vc-persona-overlay .v-overlay__content,
.vc-persona-overlay__content {
  z-index: 5006 !important;
}

body .vc-persona-overlay--nested {
  z-index: 25050 !important;
}

body .vc-persona-overlay--nested .v-overlay__scrim {
  background: rgba(7, 15, 32, 0.72) !important;
  opacity: 1 !important;
}

body .vc-persona-overlay--nested .v-overlay__content,
body .vc-persona-overlay__content--nested {
  z-index: 25051 !important;
}

body .vc-persona-overlay__content--nested .vc-persona-dialog {
  box-shadow: 0 30px 80px rgba(7, 15, 32, 0.38) !important;
}

.vc-persona-dialog__titlebar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 64px 20px 22px;
}

.vc-persona-dialog__title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  flex: 1 1 auto;
  min-width: 0;
}

.vc-persona-dialog .vc-vue-modal-close-btn {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  z-index: 3;
  margin: 0 !important;
}

.vc-persona-dialog__body {
  padding: 18px 20px 20px;
  background: #f8fbff;
}

.vc-persona-section {
  margin-top: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.vc-persona-section--grouped {
  display: grid;
  gap: 0;
}

.vc-persona-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.vc-persona-section__title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
}

.vc-persona-address-wrap {
  border-radius: 0;
  border: 0;
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.vc-persona-address-wrap .v-table > .v-table__wrapper > table {
  min-width: 960px;
}

.vc-persona-address-wrap .v-table > .v-table__wrapper > table > thead > tr > th,
.vc-persona-address-wrap .v-table > .v-table__wrapper > table > tbody > tr > td {
  padding-top: 10px;
  padding-bottom: 10px;
  vertical-align: middle;
}

.vc-persona-address-wrap .v-input,
.vc-persona-address-wrap .v-input__control,
.vc-persona-address-wrap .v-field,
.vc-persona-address-wrap .v-field__field {
  background: transparent !important;
  box-shadow: none !important;
}

.vc-persona-address-wrap .v-field {
  min-height: 36px !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.vc-persona-address-wrap .v-field__outline,
.vc-persona-address-wrap .v-field__overlay {
  display: none !important;
}

.vc-persona-address-wrap .v-field--focused,
.vc-persona-address-wrap .v-field--variant-outlined,
.vc-persona-address-wrap .v-field--variant-plain {
  box-shadow: none !important;
}

.vc-persona-address-wrap .v-field__input {
  min-height: 36px !important;
  padding: 0 !important;
}

.vc-persona-address-wrap .v-select .v-field__input,
.vc-persona-address-wrap .v-autocomplete .v-field__input {
  column-gap: 0 !important;
}

.vc-persona-address-wrap .v-select .v-field__append-inner,
.vc-persona-address-wrap .v-autocomplete .v-field__append-inner {
  align-self: center;
  padding-inline-start: 6px;
  color: #64748b;
  opacity: 0.9;
}

.vc-persona-address-wrap .v-select .v-field__clearable,
.vc-persona-address-wrap .v-autocomplete .v-field__clearable {
  display: none !important;
}

.vc-persona-address-wrap input {
  outline: none !important;
  box-shadow: none !important;
}

.vc-persona-address-cell--pais {
  min-width: 220px;
}

.vc-persona-highlight-field .v-field {
  background: #ffe7c4 !important;
}

.vc-persona-status {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.vc-persona-section--grouped .vc-persona-status {
  margin-top: 16px;
}

.vc-persona-dialog__actions {
  background: #fff;
}

.vc-cursor-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  box-sizing: border-box;
}

.vc-cursor-pagination__summary {
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}

.vc-cursor-pagination__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.vc-cursor-pagination__dots {
  min-width: 24px;
  text-align: center;
  color: #64748b;
}

@media (min-width: 1100px) {
  body:not(.login-page) .vc-cursor-pagination,
  body:not(.login-page) .pagination-container {
    padding-right: 320px;
  }
}

.sri-log-page {
  display: grid;
  gap: 1.25rem;
}

.sri-log-page .vc-panel-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #d8e0ea);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.sri-log-page .vc-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.sri-log-page .vc-panel-head h1 {
  margin: 0;
  font-size: 1.5rem;
}

.sri-log-page .vc-panel-head p,
.sri-log-page .vc-panel-muted {
  margin: 0.35rem 0 0;
  color: var(--text-muted, #5f6b7a);
}

.sri-log-page .vc-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.sri-log-page .vc-field {
  display: grid;
  gap: 0.35rem;
}

.sri-log-page .vc-field label {
  font-size: 0.92rem;
  font-weight: 600;
}

.sri-log-page .vc-field input,
.sri-log-page .vc-field select {
  border: 1px solid var(--border-color, #ccd6e2);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  background: var(--input-bg, #fff);
  color: inherit;
}

.sri-log-page .vc-filter-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.sri-log-page .vc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.sri-log-page .vc-btn-primary {
  background: #0f766e;
  color: #fff;
}

.sri-log-page .vc-btn-secondary {
  background: transparent;
  border-color: var(--border-color, #ccd6e2);
  color: inherit;
}

.sri-log-page .vc-alert {
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 500;
}

.sri-log-page .vc-alert-warning {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.sri-log-page .vc-alert-info {
  background: #eff6ff;
  border: 1px solid #93c5fd;
  color: #1d4ed8;
}

.sri-log-page .factura-list-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.sri-log-page .vc-sri-table {
  width: 100%;
  min-width: 1280px;
}

.sri-log-page .factura-list-table-wrap > .vc-sri-table tbody td {
  vertical-align: top;
}

.sri-log-page .vc-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  background: #e6fffb;
  color: #115e59;
  font-size: 0.78rem;
  font-weight: 700;
}

.sri-log-page .vc-code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.83rem;
  word-break: break-word;
}

.sri-log-page .vc-pre {
  margin: 0.65rem 0 0;
  padding: 0.85rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  overflow-x: auto;
  font-size: 0.78rem;
  line-height: 1.45;
}

.sri-log-page .vc-cursor-pagination {
  margin-top: 18px;
  padding: 0 4px;
}

.sri-log-page .vc-cursor-pagination__summary {
  font-size: 0.96rem;
  font-weight: 600;
}

.sri-log-page .vc-cursor-pagination__actions {
  gap: 10px;
  justify-content: flex-end;
}

.sri-log-page .vc-cursor-pagination__btn,
.sri-log-page .vc-cursor-pagination__page,
.sri-log-page .vc-cursor-pagination__dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f3f4f6;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.sri-log-page .vc-cursor-pagination__page {
  min-width: 52px;
  padding: 0 12px;
  background: #ffffff;
}

.sri-log-page .vc-cursor-pagination__page.is-active {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.sri-log-page .vc-cursor-pagination__btn:hover,
.sri-log-page .vc-cursor-pagination__page:hover {
  border-color: #cbd5e1;
  filter: brightness(0.99);
}

.sri-log-page .vc-cursor-pagination__btn.is-disabled,
.sri-log-page .vc-cursor-pagination__page.is-disabled {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #c0c4cc;
  pointer-events: none;
  box-shadow: none;
}

.sri-log-page .vc-cursor-pagination__dots {
  min-width: 28px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #94a3b8;
}

.sri-log-vue-page .sri-log-toolbar {
  display: grid;
  gap: 16px;
}

.sri-log-vue-page .sri-log-toolbar__search {
  max-width: 420px;
}

.sri-log-vue-page .sri-log-toolbar__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sri-log-vue-page .sri-log-toolbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sri-log-vue-page .sri-log-toolbar__system {
  color: #64748b;
  font-size: 0.94rem;
}

.sri-log-vue-page .sri-log-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sri-log-vue-page .sri-log-toolbar-feedback {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.sri-log-vue-page .sri-log-vue-table {
  width: 100%;
  min-width: 1080px;
  table-layout: fixed;
}

.sri-log-vue-page .sri-log-vue-table th,
.sri-log-vue-page .sri-log-vue-table td {
  vertical-align: top;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(1),
.sri-log-vue-page .sri-log-vue-table th:nth-child(1) {
  width: 14%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(2),
.sri-log-vue-page .sri-log-vue-table th:nth-child(2) {
  width: 8%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(3),
.sri-log-vue-page .sri-log-vue-table th:nth-child(3) {
  width: 10%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(4),
.sri-log-vue-page .sri-log-vue-table th:nth-child(4) {
  width: 8%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(5),
.sri-log-vue-page .sri-log-vue-table th:nth-child(5) {
  width: 9%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(6),
.sri-log-vue-page .sri-log-vue-table th:nth-child(6) {
  width: 19%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(7),
.sri-log-vue-page .sri-log-vue-table th:nth-child(7) {
  width: 22%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(8),
.sri-log-vue-page .sri-log-vue-table th:nth-child(8) {
  width: 10%;
  min-width: 0;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(6),
.sri-log-vue-page .sri-log-vue-table td:nth-child(7) {
  max-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.32;
}

.sri-log-vue-page .sri-log-vue-table td:nth-child(8) .vc-vue-table__actions {
  justify-content: flex-start;
  white-space: nowrap;
}

.sri-log-vue-page .sri-log-meta {
  margin-top: 6px;
  color: #64748b;
  font-size: 0.88rem;
  line-height: 1.45;
}

.sri-log-vue-page .sri-log-code {
  display: block;
  min-inline-size: 0;
  max-width: 100%;
  font-family: Consolas, "Courier New", monospace;
  overflow-wrap: anywhere;
  white-space: normal;
}

.sri-log-vue-page .sri-log-message-btn {
  min-inline-size: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (min-width: 901px) and (max-width: 1180px) {
  body:not(.login-page) .content {
    padding: 22px 18px 28px;
  }

  body:not(.login-page) .sidebar {
    width: 206px;
  }

  .proforma-shell {
    max-width: 100%;
  }

  .proforma-toolbar-card__content,
  .proforma-filters-card__content {
    padding: 16px 18px;
  }

  .proforma-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .proforma-toolbar__actions {
    width: 100%;
  }

  .proforma-toolbar__actions .v-btn {
    flex: 1 1 160px;
  }

  .proforma-toolbar__search {
    order: 99;
    width: 100%;
    max-width: none;
    margin-inline-start: 0;
  }

  .proforma-table-card .v-card-text {
    padding: 14px 16px 16px;
  }

  .sri-log-vue-page .sri-log-toolbar-feedback {
    justify-content: flex-start;
  }

  .sri-log-vue-page .sri-log-vue-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .sri-log-vue-page .sri-log-vue-table th,
  .sri-log-vue-page .sri-log-vue-table td {
    font-size: 0.78rem;
    padding-left: 8px;
    padding-right: 8px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(1),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(1) {
    width: 130px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(2),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(2) {
    width: 76px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(3),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(3) {
    width: 96px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(4),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(4) {
    width: 82px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(5),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(5) {
    width: 92px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(6),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(6) {
    width: 150px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(7),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(7) {
    width: 150px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(8),
  .sri-log-vue-page .sri-log-vue-table th:nth-child(8) {
    width: 92px;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(6),
  .sri-log-vue-page .sri-log-vue-table td:nth-child(7) {
    line-height: 1.22;
  }

  .sri-log-vue-page .sri-log-vue-table td:nth-child(8) .vc-vue-table__actions {
    white-space: normal;
  }
}

.sri-log-vue-page .sri-log-dialog-grid {
  display: grid;
  gap: 18px;
}

.sri-log-vue-page .sri-log-dialog-meta {
  display: grid;
  gap: 8px;
}

.sri-log-vue-page .sri-log-dialog-meta p {
  margin: 0;
}

.sri-log-vue-page .sri-log-dialog-payloads {
  display: grid;
  gap: 16px;
}

.sri-log-vue-page .sri-log-dialog-loading,
.sri-log-vue-page .sri-log-dialog-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: #64748b;
}

.sri-log-vue-page .sri-log-dialog-section {
  display: grid;
  gap: 8px;
}

.sri-log-vue-page .sri-log-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.sri-log-vue-page .sri-log-dialog-section__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.sri-log-vue-page .sri-log-event-panels {
  display: grid;
  gap: 12px;
}

.sri-log-vue-page .sri-log-event-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  width: 100%;
}

.sri-log-vue-page .sri-log-event-title__stage {
  font-weight: 700;
  color: #0f172a;
}

.sri-log-vue-page .sri-log-event-title__meta {
  color: #475569;
  font-size: 0.92rem;
}

.sri-log-vue-page .sri-log-payload {
  margin: 0;
  padding: 14px;
  border-radius: 14px;
  background: #0f172a;
  color: #e2e8f0;
  overflow: auto;
  font-size: 0.8rem;
  line-height: 1.5;
}

.import-data-vue-page {
  min-width: 0;
}

.import-data-vue-page .import-data-inline-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.import-data-vue-page .import-data-notes {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.import-data-vue-page .import-data-note {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.import-data-vue-page .import-data-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.import-data-vue-page .import-data-status {
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}

.import-data-vue-page .import-data-results-header {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.import-data-vue-page .import-data-results-title {
  margin: 0;
  color: #0f172a;
  font-size: 1.1rem;
}

.import-data-vue-page .import-data-progress-note {
  margin-top: 8px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 600;
}

.import-data-vue-page .import-data-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.import-data-vue-page .import-data-list-card {
  min-width: 0;
}

.import-data-vue-page .import-data-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: #475569;
  line-height: 1.5;
}

.import-data-vue-page .import-data-summary-card__value {
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .sri-log-page .vc-panel-card {
    padding: 1rem;
  }

  .sri-log-page .vc-panel-head h1 {
    font-size: 1.25rem;
  }

  .sri-log-page .vc-sri-table {
    min-width: 980px;
  }

  .sri-log-page .vc-cursor-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .sri-log-page .vc-cursor-pagination__actions {
    justify-content: flex-start;
  }

  .sri-log-vue-page .sri-log-toolbar__search {
    max-width: none;
  }

  .sri-log-vue-page .sri-log-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sri-log-vue-page .sri-log-vue-table {
    min-width: 980px;
  }

  .import-data-vue-page .import-data-results-grid {
    grid-template-columns: 1fr;
  }
}

.vc-usuarios-help {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.vc-usuarios-help--context {
  margin-bottom: 12px;
}

.vc-usuarios-check-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vc-usuarios-mini-switch {
  width: 38px;
  height: 22px;
}

.vc-usuarios-mini-switch .slider {
  border-radius: 999px;
  background: #d5deeb;
}

.vc-usuarios-mini-switch .slider::before {
  width: 16px;
  height: 16px;
  left: 3px;
  bottom: 3px;
}

.vc-usuarios-mini-switch input:checked + .slider {
  background: #2563eb;
}

.vc-usuarios-mini-switch input:checked + .slider::before {
  transform: translateX(16px);
}

.vc-usuarios-mini-switch--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .parametros-dialog-card {
    min-height: 100vh;
    border-radius: 0 !important;
  }

  .param-tabs {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
  }

  .param-tab-btn {
    flex: 1 1 calc(50% - 5px);
    justify-content: center;
  }

  .param-series-panel {
    padding: 12px;
  }

  .param-series-panel .vc-persona-section__header {
    flex-direction: column;
    align-items: stretch;
  }

  .param-series-add-btn {
    width: 100%;
  }

  .param-series-table-wrap {
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
  }

  .param-series-table {
    min-width: 1860px;
  }

  .parametros-list-table {
    min-width: 860px;
  }

  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 14px;
  }

  .modal-actions .btn-primary,
  .modal-actions .btn-danger {
    width: 100%;
  }

  .vc-vue-page {
    padding: 6px 6px 14px;
  }

  .vc-vue-shell {
    max-width: 100%;
    padding: 4px 0 10px;
  }

  .vc-vue-hero {
    margin-bottom: 10px;
  }

  .vc-vue-hero--catalog {
    gap: 3px;
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 8px 16px rgba(37, 99, 235, 0.14);
  }

  .vc-vue-hero__eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.13em;
  }

  .vc-vue-hero__title,
  .vc-vue-hero--catalog .vc-vue-hero__title,
  .vc-vue-hero--personas .vc-vue-hero__title {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
    line-height: 1.08;
  }

  .vc-vue-hero__copy,
  .vc-vue-hero--catalog .vc-vue-hero__copy {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .vc-vue-toolbar-card .v-card-text,
  .vc-vue-table-card .v-card-text {
    padding: 10px 10px 11px;
  }

  .vc-vue-toolbar-card,
  .vc-vue-table-card {
    border-radius: 18px;
    box-shadow:
      0 12px 24px rgba(15, 23, 42, 0.08),
      0 2px 6px rgba(15, 23, 42, 0.04);
  }

  .vc-vue-table td,
  .vc-vue-table th {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.84rem;
  }

  .vc-vue-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .vc-vue-toolbar__search {
    margin-inline-start: 0;
    flex: 0 0 auto !important;
    max-width: none;
    min-width: 0;
    width: 100%;
  }

  .vc-vue-toolbar__search--catalog {
    flex-basis: auto !important;
  }

  .vc-vue-toolbar > .v-btn,
  .vc-vue-toolbar > .vc-vue-toolbar__actions {
    width: 100%;
  }

  .vc-vue-toolbar .v-btn {
    min-height: 38px;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
  }

  .vc-vue-toolbar__search .v-field,
  .vc-vue-toolbar__search .v-field__input {
    min-height: 38px;
  }

  .vc-vue-table th {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .sidebar-context-card {
    margin-bottom: 10px;
  }

  .sidebar-context-summary {
    padding: 11px 12px;
  }

  .sidebar-context-summary-title {
    font-size: 11px;
  }

  .sidebar-context-fields {
    padding: 0 10px 10px;
  }

  .vc-vue-form-grid {
    grid-template-columns: 1fr;
  }

  .vc-vue-form-grid--6 {
    grid-template-columns: 1fr;
  }

  .vc-vue-form-grid--two {
    grid-template-columns: 1fr;
  }

  .vc-persona-form-grid {
    grid-template-columns: 1fr;
  }

  .vc-vue-form-field--span-2,
  .vc-vue-form-field--span-3,
  .vc-vue-form-field--span-4,
  .vc-persona-field--span-2 {
    grid-column: span 1;
  }

  .vc-persona-dialog__body {
    padding: 12px;
  }

  .vc-persona-section {
    padding: 14px;
  }

  .vc-persona-section__header {
    flex-direction: column;
    align-items: stretch;
  }

  .vc-persona-address-add {
    width: 100%;
    justify-content: center;
  }

  .vc-persona-address-wrap .v-table > .v-table__wrapper > table {
    min-width: 900px;
  }

  .vc-persona-status {
    justify-content: flex-start;
  }

  .vc-cursor-pagination {
    align-items: stretch;
  }

  .vc-cursor-pagination__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 768px) {
  .transaccion-list-pagination,
  .factura-list-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .transaccion-list-pagination .pagination-center,
  .factura-list-pagination .pagination-center {
    justify-content: center;
  }

  .factura-party-cell {
    min-width: 220px;
  }
}

html[data-theme="dark"] .transaccion-list-table-wrap,
html[data-theme="dark"] .factura-list-table-wrap {
  border-color: rgba(71, 85, 105, 0.9);
  background: rgba(15, 23, 42, 0.98);
}

html[data-theme="dark"] .transaccion-list-table-wrap > .transaccion-list-table thead th,
html[data-theme="dark"] .factura-list-table-wrap > .factura-list-table thead th {
  background: rgba(15, 23, 42, 0.98);
  border-bottom-color: rgba(71, 85, 105, 0.82);
  color: #e2e8f0;
}

html[data-theme="dark"] .transaccion-list-table-wrap > .transaccion-list-table tbody tr:nth-child(even),
html[data-theme="dark"] .factura-list-table-wrap > .factura-list-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.82);
}

html[data-theme="dark"] .transaccion-list-table-wrap > .transaccion-list-table tbody tr:hover,
html[data-theme="dark"] .factura-list-table-wrap > .factura-list-table tbody tr:hover {
  background: rgba(30, 41, 59, 0.95);
}

html[data-theme="dark"] .transaccion-list-table-wrap > .transaccion-list-table tbody td,
html[data-theme="dark"] .factura-list-table-wrap > .factura-list-table tbody td,
html[data-theme="dark"] .factura-party-doc,
html[data-theme="dark"] .factura-party-name {
  color: #e2e8f0;
}

html[data-theme="dark"] .transaccion-list-pagination,
html[data-theme="dark"] .factura-list-pagination {
  border-color: rgba(71, 85, 105, 0.88);
  background: rgba(15, 23, 42, 0.96);
}

html[data-theme="dark"] .transaccion-list-pagination .page-summary,
html[data-theme="dark"] .factura-list-pagination .page-summary {
  color: #cbd5e1;
}

html[data-theme="dark"] .transaccion-list-pagination .page-number-btn,
html[data-theme="dark"] .factura-list-pagination .page-number-btn {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(30, 41, 59, 0.92);
  color: #bfdbfe;
}

html[data-theme="dark"] .factura-serie-plain,
html[data-theme="dark"] .factura-numero-plain {
  color: #dbeafe;
}

html[data-theme="dark"] .factura-estado-dot.is-active {
  box-shadow:
    0 0 0 4px rgba(22, 163, 74, 0.18),
    0 1px 2px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .factura-estado-dot.is-inactive {
  box-shadow:
    0 0 0 4px rgba(148, 163, 184, 0.18),
    0 1px 2px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .transaccion-list-table-wrap::-webkit-scrollbar-track,
html[data-theme="dark"] .factura-list-table-wrap::-webkit-scrollbar-track {
  background: rgba(30, 41, 59, 0.92);
}

html[data-theme="dark"] .transaccion-list-table-wrap::-webkit-scrollbar-thumb,
html[data-theme="dark"] .factura-list-table-wrap::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.72);
  border-color: rgba(30, 41, 59, 0.92);
}

/* =====================================================
   VUE APP GLOBAL BLOCKS MOVED FROM SFCs
===================================================== */

.parametros-dialog-card {
  border-radius: 26px;
  overflow: hidden;
}

.parametros-dialog-card .v-card-text {
  background: #f8fbff;
}

.parametros-form-grid--4 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vc-select-system-page {
  height: 100%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  box-sizing: border-box;
}

body[data-page="select_sistema"] .vc-select-system-page {
  overflow: visible;
}

body[data-page="select_sistema"] .content {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body[data-page="select_sistema"] .content > div[id$="-vue-app"] {
  flex: 0 0 auto;
  width: 100%;
}

.vc-select-system-shell {
  width: min(100%, 940px);
  display: grid;
  gap: 24px;
}

/* El resto del estilo visual de .vc-select-system-hero (fondo, tipografia,
   layout responsivo, boton de administracion global) vive en el <style
   scoped> de SelectSistemaApp.vue -- ese bloque scoped ya definia sus
   propias reglas para estas mismas clases desde antes, con selectores
   [data-v-xxxxx] que pesan mas que las de aqui, asi que cualquier regla
   duplicada en este archivo global simplemente no hacia nada visible.
   Se dejo solo aqui lo que no colisiona (el "shell" de mas abajo). */

.vc-select-system-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.vc-select-system-form {
  display: grid;
  gap: 20px;
}

.vc-select-system-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vc-select-system-field {
  min-width: 0;
}

.vc-select-system-actions {
  display: flex;
  justify-content: flex-end;
}

.vc-select-system-submit {
  min-width: 180px;
}

.vc-select-system-empty {
  padding: 28px 8px;
  text-align: center;
  color: #475569;
  font-weight: 600;
}

.tfh-card {
  margin-bottom: 24px;
  border: 1px solid rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(239, 246, 255, 0.98) 100%);
}

.tfh-grid {
  display: grid;
  gap: 16px;
}

.tfh-grid + .tfh-grid {
  margin-top: 16px;
}

.tfh-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tfh-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tfh-inline-block {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tfh-inline-block .v-input {
  flex: 1 1 auto;
}

.tfe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 20px;
}

.tfe-card {
  border: 1px solid rgba(37, 99, 235, 0.12);
}

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

.tfe-table {
  width: 100%;
  border-collapse: collapse;
}

.tfe-table th,
.tfe-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  vertical-align: middle;
}

.tfe-table th {
  text-align: left;
  white-space: nowrap;
}

.tfe-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.tfe-summary-line--accent strong {
  color: #1d4ed8;
}

.tfe-summary-line--total {
  font-size: 1.05rem;
  font-weight: 800;
  border-bottom: 0;
  padding-bottom: 0;
}

.producto-photo-col {
  display: flex;
  flex-direction: column;
}

.producto-photo-input-hidden {
  display: none;
}

.producto-photo-frame {
  position: relative;
  height: 220px;
  max-height: 220px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  cursor: pointer;
  border: none;
  padding: 0;
  outline: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.producto-photo-frame:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 22px rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.86);
}

.producto-photo-preview {
  width: auto;
  height: 100%;
  object-fit: contain;
  max-width: 100%;
  padding: 0;
  filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.08));
}

.producto-photo-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.producto-photo-empty__icon,
.producto-photo-overlay__badge {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.producto-photo-empty__text {
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #475569;
}

.producto-photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0);
  opacity: 1;
  transition: opacity 0.18s ease, background-color 0.18s ease;
}

.producto-photo-overlay--active {
  opacity: 0;
}

.producto-photo-frame:hover .producto-photo-overlay--active,
.producto-photo-frame:focus-visible .producto-photo-overlay--active {
  opacity: 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.08));
}

.profile-page {
  min-height: calc(100vh - 180px);
  padding: 28px 18px 36px;
}

.profile-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 36px;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% -10%, rgba(217, 165, 74, 0.16), transparent 38%),
    linear-gradient(160deg, #0b1220 0%, #101a2d 55%, #0b1220 100%);
  color: #fff;
  box-shadow: 0 24px 44px rgba(6, 10, 20, 0.35);
}

.profile-hero__content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.profile-hero__eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d9a54a;
}

.profile-hero__title {
  margin: 10px 0 10px;
  font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.12;
  color: #fff;
}

.profile-hero__copy {
  margin: 0;
  max-width: 52ch;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.65;
  font-size: 0.94rem;
}

.profile-hero__chart {
  flex: 0 0 auto;
  width: clamp(96px, 14vw, 150px);
  height: auto;
  opacity: 0.9;
}

.profile-hero__chart rect {
  fill: rgba(217, 165, 74, 0.5);
}

.profile-hero__chart rect:last-child {
  fill: #d9a54a;
}

.profile-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.profile-loading {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 28px;
}

.profile-side {
  display: grid;
  justify-items: center;
  gap: 14px;
  align-content: start;
  padding: 4px 4px 0;
  text-align: center;
}

.profile-photo-ring {
  padding: 5px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #d9a54a, #2563eb, #7c3aed, #d9a54a);
}

.profile-photo-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  padding: 0;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.9), rgba(248, 250, 252, 1));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.profile-photo-frame:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.16);
}

.profile-photo-frame--readonly {
  cursor: default;
}

.profile-photo-input {
  display: none;
}

.profile-photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(15, 23, 42, 0.1));
  color: #1e3a8a;
  font-size: 1.5rem;
  font-weight: 800;
}

.profile-photo-btn {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.profile-side-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.profile-side-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 1.25rem;
}

.profile-side-copy p {
  margin: 0;
  color: #64748b;
  font-weight: 600;
  font-size: 0.88rem;
}

.profile-side-stats {
  width: 100%;
  display: grid;
  gap: 2px;
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  text-align: left;
}

.profile-side-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 2px;
}

.profile-side-stat + .profile-side-stat {
  border-top: 1px dashed rgba(148, 163, 184, 0.22);
}

.profile-side-stat dt {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 600;
}

.profile-side-stat dd {
  margin: 0;
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 62%;
}

.profile-main {
  display: grid;
  gap: 24px;
}

.profile-section-label {
  position: relative;
  display: inline-block;
  margin: 0 0 16px;
  padding-bottom: 8px;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-section-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #d9a54a;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-security {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: rgba(248, 250, 252, 0.94);
}

.profile-security__header {
  display: grid;
  gap: 4px;
}

.profile-security__header .profile-section-label {
  margin-bottom: 6px;
}

.profile-security__header p {
  margin: 0;
  color: #64748b;
  line-height: 1.55;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
}

.compras-sri-page {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(64, 133, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #f4f8ff 0%, #eef3fb 100%);
}

.compras-sri-shell {
  width: min(100%, 1380px);
  max-width: calc(100vw - 36px);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  box-sizing: border-box;
}

.compras-sri-hero {
  padding: 2rem 2.2rem;
  border-radius: 32px;
  color: #fff;
  background: linear-gradient(135deg, #1f3875 0%, #2f63d8 100%);
  box-shadow: 0 24px 48px rgba(21, 49, 110, 0.22);
}

.compras-sri-hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  opacity: 0.82;
}

.compras-sri-hero__title {
  margin: 0.4rem 0 0.6rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  font-weight: 800;
}

.compras-sri-hero__copy {
  margin: 0;
  max-width: 920px;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
}

.compras-sri-toolbar-card,
.compras-sri-table-card,
.compras-sri-runs-card {
  margin-top: 1.35rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 36px rgba(33, 58, 110, 0.1);
}

.compras-sri-toolbar-card__body {
  padding: 1.25rem !important;
}

.compras-sri-section-copy {
  margin: 0 0 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #1f4f96;
}

.compras-sri-section-copy--secondary {
  margin-top: 1.15rem;
  color: #5a6d8f;
}

.compras-sri-toolbar-grid,
.compras-sri-sync-grid,
.compras-sri-metrics,
.compras-sri-detail-grid {
  display: grid;
  gap: 1rem;
}

.compras-sri-toolbar-grid .vc-vue-form-field,
.compras-sri-sync-grid .vc-vue-form-field {
  min-width: 0;
}

.compras-sri-toolbar-grid {
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(180px, 1fr));
}

.compras-sri-sync-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
  margin-top: 1rem;
  align-items: center;
}

.compras-sri-toolbar-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
}

.compras-sri-metrics {
  margin-top: 1.35rem;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.compras-sri-metric {
  overflow: visible !important;
  padding: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(33, 58, 110, 0.08);
}

.compras-sri-metric__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 94px;
  padding: 1.1rem 1.2rem 1rem;
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: flex-start;
}

.compras-sri-metric__label {
  display: block;
  margin: 0 0 0.45rem;
  color: #5b6888;
  font-size: 0.9rem;
  line-height: 1.35;
}

.compras-sri-metric__value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: #17336f;
}

.compras-sri-table-wrap {
  overflow-x: auto;
}

.compras-sri-table th {
  white-space: nowrap;
  color: #183063;
}

.compras-sri-cell--wide,
.compras-sri-run-message {
  min-width: 280px;
}

.compras-sri-detail-card {
  border-radius: 28px;
}

.compras-sri-detail-grid {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.compras-sri-detail-field {
  padding: 0.95rem 1rem;
  border: 1px solid rgba(42, 83, 167, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(244, 248, 255, 0.88), rgba(255, 255, 255, 0.96));
}

.compras-sri-detail-field__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5b6888;
}

.compras-sri-detail-field__value {
  margin-top: 0.3rem;
  font-weight: 700;
  color: #1c3060;
}

.proforma-page {
  min-height: 100%;
  background: linear-gradient(180deg, #eef3fb 0%, #f8fafc 46%, #edf2f8 100%);
  padding: 34px 0 52px;
}

.proforma-shell {
  width: min(100%, 1408px);
  max-width: calc(100vw - 32px);
  margin: 0 auto;
  box-sizing: border-box;
}

.proforma-hero {
  padding: 30px 36px;
  border-radius: 36px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 56%, #60a5fa 100%);
  color: #fff;
  box-shadow: 0 24px 46px rgba(30, 58, 138, 0.2);
}

.proforma-hero__eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.82;
}

.proforma-hero__title {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 3.8vw, 3.35rem);
  line-height: 1.02;
  font-weight: 800;
}

.proforma-hero__copy {
  max-width: 760px;
  font-size: 1.06rem;
  opacity: 0.9;
}

.proforma-toolbar-card,
.proforma-filters-card,
.proforma-table-card {
  margin-top: 24px;
  border: 1px solid rgba(203, 213, 225, 0.84);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
}

.proforma-toolbar-card__content,
.proforma-filters-card__content {
  padding: 20px 24px;
}

.proforma-toolbar {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.proforma-toolbar > .vc-vue-toolbar__create-btn.v-btn {
  order: 0;
}

.proforma-toolbar__search {
  min-width: 0;
  flex: 1 1 360px;
  max-width: 560px;
  margin-inline-start: auto;
}

.proforma-toolbar__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  order: 1;
}

.proforma-toolbar__search .v-input,
.proforma-filters__grid .v-input {
  min-width: 0;
}

.proforma-toolbar__search .v-field,
.proforma-filters__grid .v-field {
  border-radius: 14px;
  background: #fff;
}

.proforma-toolbar__search .v-field__input {
  min-height: 54px;
}

.proforma-toolbar__search .v-input__control,
.proforma-toolbar__search .v-field {
  box-shadow: none !important;
}

.proforma-filters__grid .v-field__input {
  min-height: 48px;
}

.proforma-toolbar__actions .v-btn,
.proforma-filters__actions .v-btn {
  min-height: 42px;
  padding-inline: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.proforma-toolbar__actions .v-btn {
  border: 1px solid rgba(191, 219, 254, 0.96);
  background: #fff !important;
  color: #1e293b !important;
  box-shadow: none !important;
}

.proforma-toolbar__actions .v-btn:hover {
  background: #eff6ff !important;
}

.proforma-filter-dialog {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.86);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.16);
}

.proforma-filter-dialog__titlebar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px;
}

.proforma-filter-dialog__title {
  font-size: 1.08rem;
  font-weight: 800;
  color: #0f172a;
}

.proforma-filter-dialog__copy {
  margin-top: 3px;
  font-size: 0.9rem;
  color: #64748b;
}

.proforma-filter-dialog__body {
  padding: 18px 20px 20px;
}

.proforma-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.proforma-filter-grid--single {
  grid-template-columns: 1fr;
}

.proforma-filter-grid .v-input {
  min-width: 0;
}

.proforma-filter-grid .v-field {
  border-radius: 14px;
  background: #fff;
}

.proforma-filter-grid .v-field__input {
  min-height: 48px;
}

.proforma-filter-autocomplete .v-field__clearable,
.proforma-filter-autocomplete .v-field__append-inner {
  align-self: center;
}

.proforma-filter-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px 18px;
}

.proforma-filters {
  display: block;
}

.proforma-filters__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.proforma-filters__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}

.proforma-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.proforma-table-wrap table {
  min-width: 1040px;
}

.proforma-table th {
  white-space: nowrap;
  font-weight: 700;
}

.proforma-table thead th:first-child,
.proforma-table tbody tr:not(.proforma-group-row) > td:first-child {
  width: 96px;
  min-width: 96px;
  white-space: nowrap;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.proforma-table__number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  width: 92px;
  min-width: 92px;
  white-space: nowrap;
}

.proforma-table__retencion {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  width: 150px;
  min-width: 150px;
}

.proforma-table .v-switch .v-selection-control__wrapper {
  transform: scale(0.82);
  transform-origin: left center;
}

.proforma-table .v-selection-control {
  min-height: 32px;
}

.proforma-table__client {
  min-width: 250px;
}

.proforma-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

.proforma-group-row td {
  padding: 0 !important;
  background: #eff6ff;
}

.proforma-group-row__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
}

.proforma-group-row__title {
  font-weight: 800;
  color: #0f172a;
}

.proforma-group-row__meta {
  margin-top: 2px;
  font-size: 0.86rem;
  color: #475569;
}

.proforma-group-row__summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  color: #334155;
  white-space: nowrap;
}

.proforma-group-row__summary strong {
  font-size: 1rem;
  color: #1d4ed8;
}

.proforma-group-detail-row td {
  background: rgba(255, 255, 255, 0.96);
}

.proforma-retencion-cell {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  justify-content: flex-start;
  min-width: 140px;
  margin: 0 auto;
}

.proforma-retencion-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proforma-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.proforma-status-dot.is-active {
  background: #16a34a;
  box-shadow:
    0 0 0 4px rgba(22, 163, 74, 0.10),
    0 1px 2px rgba(15, 23, 42, 0.08);
}

.proforma-status-dot.is-inactive {
  background: #ef4444;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.10),
    0 1px 2px rgba(15, 23, 42, 0.08);
}

@media (min-width: 769px) {
  .proforma-page:not(.proforma-page--factura-venta) .proforma-table-wrap {
    overflow-x: hidden;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table-wrap table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table th,
  .proforma-page:not(.proforma-page--factura-venta) .proforma-table td {
    padding: 6px 8px !important;
    font-size: 0.76rem !important;
    line-height: 1.08 !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table .text-caption {
    font-size: 0.68rem !important;
    line-height: 1.05 !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table thead th:first-child,
  .proforma-page:not(.proforma-page--factura-venta) .proforma-table tbody tr:not(.proforma-group-row) > td:first-child {
    width: 78px;
    min-width: 78px;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__number {
    width: 74px;
    min-width: 74px;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__retencion {
    width: 220px;
    min-width: 220px;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__client {
    width: 22%;
    min-width: 0;
    max-width: 0;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__client > div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-retencion-cell {
    gap: 4px;
    align-items: flex-start;
    min-width: 0;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-retencion-cell .v-btn {
    min-width: 68px;
    font-size: 0.64rem !important;
    padding-inline: 8px !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__pagar {
    width: 108px;
    min-width: 108px;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__sri {
    width: 56px;
    min-width: 56px;
    text-align: center;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__actions-col {
    width: 76px;
    min-width: 76px;
    text-align: center !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table__status-col {
    width: 76px;
    min-width: 76px;
    text-align: center;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-actions {
    gap: 2px;
    flex-wrap: nowrap;
    width: 100%;
    justify-content: center;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-actions .v-btn {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-actions .v-icon {
    font-size: 0.92rem !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table .v-chip {
    min-width: 38px;
    font-size: 0.68rem !important;
  }

  .proforma-page:not(.proforma-page--factura-venta) .proforma-table .v-switch .v-selection-control__wrapper {
    transform: scale(0.72);
  }
}

.cxc-page {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 26%),
    linear-gradient(180deg, #eef3fb 0%, #f7f9fc 48%, #edf2f8 100%);
  padding: 32px 0 48px;
}

.cxc-shell {
  width: min(100%, 1380px);
  max-width: calc(100vw - 36px);
  margin: 0 auto;
  box-sizing: border-box;
}

.cxc-hero {
  padding: 34px 40px;
  border-radius: 36px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 24px 48px rgba(30, 58, 138, 0.22);
}

.cxc-hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.82;
}

.cxc-hero__title {
  margin: 10px 0 8px;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  font-weight: 800;
}

.cxc-hero__copy {
  max-width: 760px;
  font-size: 1.14rem;
  opacity: 0.9;
}

.cxc-toolbar-card,
.cxc-table-card {
  margin-top: 28px;
}

.cxc-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cxc-toolbar__search {
  flex: 1 1 auto;
  min-width: min(100%, 360px);
}

.cxc-toolbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.cxc-document-autocomplete .v-field {
  border-radius: 14px;
  background: #fff;
}

.cxc-document-autocomplete .v-field__input {
  padding-top: 14px;
  min-height: 54px;
}

.cxc-document-autocomplete .v-field__clearable,
.cxc-document-autocomplete .v-field__append-inner {
  align-self: center;
}

.cxc-document-item .v-list-item-title {
  white-space: normal;
}

.cxc-row-actions {
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
}

.cxc-dialog-card {
  border-radius: 26px;
  overflow: hidden;
}

.cxc-dialog-card__title {
  padding: 18px 20px;
  font-weight: 800;
}

.cxc-dialog-card__body {
  background: #f8fbff;
}

.cxc-dialog-form-shell {
  display: grid;
  gap: 16px;
}

.cxc-form-grid {
  display: grid;
  gap: 14px;
}

.cxc-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cxc-form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cxc-form-grid--after {
  margin-top: 4px;
}

.cxc-form-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.cxc-form-field--wide {
  grid-column: span 1;
}

.cxc-form-field__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.cxc-form-grid .v-input,
.cxc-form-grid .v-field {
  width: 100%;
  min-width: 0;
}

.cxc-form-grid .v-field {
  --v-input-control-height: 44px;
  --v-field-padding-top: 0px;
  --v-field-padding-bottom: 0px;
  border-radius: 10px !important;
  background: #fff;
}

.cxc-form-grid .v-field__input {
  min-height: 44px !important;
  padding-top: 0;
  padding-bottom: 0;
}

.cxc-form-grid .v-field__field,
.cxc-form-grid .v-select .v-field__input,
.cxc-form-grid .v-autocomplete .v-field__input {
  align-items: center;
}

.cxc-form-grid .v-label {
  font-size: 0.9rem;
  color: #64748b;
  transition: none !important;
}

.cxc-form-grid .v-field--variant-outlined .v-field__outline__start,
.cxc-form-grid .v-field--variant-outlined .v-field__outline__notch,
.cxc-form-grid .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.cxc-form-grid .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.cxc-form-grid .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #c7d6e4;
  border-radius: 10px !important;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
  transition: none !important;
}

.cxc-form-grid .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.cxc-form-grid .v-field--focused {
  border-color: #c7d6e4;
  box-shadow: none !important;
}

.cxc-form-grid .v-field__overlay {
  opacity: 0 !important;
}

.cxc-doc-card {
  margin-top: 8px;
  border-radius: 20px;
}

.cxc-amount-cell {
  min-width: 150px;
  text-align: right;
}

.cxc-lot-cell,
.cxc-detail-cell {
  cursor: pointer;
}

.cxc-detail-cell--active {
  background: rgba(37, 99, 235, 0.06);
}

.cxc-detail-inline-value,
.cxc-lot-inline-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: right;
}

.cxc-detail-cell:hover .cxc-detail-inline-value,
.cxc-lot-cell:hover .cxc-lot-inline-value {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.14);
}

.cxc-detail-inline-input,
.cxc-lot-inline-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #c7d6e4;
  border-radius: 10px;
  outline: none;
  box-shadow: none;
  font: inherit;
  text-align: right;
}

.cxc-detail-inline-input:focus,
.cxc-lot-inline-input:focus {
  border-color: #c7d6e4;
  box-shadow: none;
}

.cxc-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}

.cxc-table-wrap table {
  min-width: 1020px;
}

.cxc-lot-table table {
  min-width: 860px;
}

.cxc-detail-table table {
  min-width: 980px;
}

.cxc-table th,
.cxc-detail-table th,
.cxc-history-table th,
.cxc-lot-table th {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.94rem;
}

.cxc-table td,
.cxc-detail-table td,
.cxc-lot-table td {
  vertical-align: top;
  font-size: 0.96rem;
}

.cxc-cell {
  line-height: 1.35;
  white-space: normal;
}

.cxc-cell--doc {
  min-width: 260px;
  max-width: 340px;
}

.cxc-cell--client {
  min-width: 220px;
  max-width: 290px;
}

.cxc-cell--obs {
  min-width: 170px;
  max-width: 220px;
  word-break: break-word;
}

.cxc-lot-summary {
  background: rgba(37, 99, 235, 0.06);
}

.cxp-page {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 26%),
    linear-gradient(180deg, #eef3fb 0%, #f7f9fc 48%, #edf2f8 100%);
  padding: 32px 0 48px;
}

.cxp-shell {
  width: min(100%, 1380px);
  max-width: calc(100vw - 36px);
  margin: 0 auto;
  box-sizing: border-box;
}

.cxp-hero {
  padding: 34px 40px;
  border-radius: 36px;
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff;
  box-shadow: 0 24px 48px rgba(30, 58, 138, 0.22);
}

.cxp-hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.82;
}

.cxp-hero__title {
  margin: 10px 0 8px;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 0.98;
  font-weight: 800;
}

.cxp-hero__copy {
  max-width: 760px;
  font-size: 1.14rem;
  opacity: 0.9;
}

.cxp-toolbar-card,
.cxp-table-card {
  margin-top: 28px;
}

.cxp-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.cxp-toolbar__search {
  flex: 1 1 auto;
  min-width: min(100%, 360px);
}

.cxp-toolbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.cxp-document-autocomplete .v-field {
  border-radius: 14px;
  background: #fff;
}

.cxp-document-autocomplete .v-field__input {
  padding-top: 14px;
  min-height: 54px;
}

.cxp-document-autocomplete .v-field__clearable,
.cxp-document-autocomplete .v-field__append-inner {
  align-self: center;
}

.cxp-document-item .v-list-item-title {
  white-space: normal;
}

.cxp-row-actions {
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
}

.cxp-dialog-card {
  border-radius: 26px;
  overflow: hidden;
}

.cxp-dialog-card__title {
  padding: 18px 20px;
  font-weight: 800;
}

.cxp-dialog-card__body {
  background: #f8fbff;
}

.cxp-dialog-form-shell {
  display: grid;
  gap: 16px;
}

.cxp-form-grid {
  display: grid;
  gap: 14px;
}

.cxp-form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cxp-form-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cxp-form-grid--after {
  margin-top: 4px;
}

.cxp-form-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.cxp-form-field--wide {
  grid-column: span 1;
}

.cxp-form-field__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.cxp-form-grid .v-input,
.cxp-form-grid .v-field {
  width: 100%;
  min-width: 0;
}

.cxp-form-grid .v-field {
  --v-input-control-height: 44px;
  --v-field-padding-top: 0px;
  --v-field-padding-bottom: 0px;
  border-radius: 10px !important;
  background: #fff;
}

.cxp-form-grid .v-field__input {
  min-height: 44px !important;
  padding-top: 0;
  padding-bottom: 0;
}

.cxp-form-grid .v-field__field,
.cxp-form-grid .v-select .v-field__input,
.cxp-form-grid .v-autocomplete .v-field__input {
  align-items: center;
}

.cxp-form-grid .v-label {
  font-size: 0.9rem;
  color: #64748b;
  transition: none !important;
}

.cxp-form-grid .v-field--variant-outlined .v-field__outline__start,
.cxp-form-grid .v-field--variant-outlined .v-field__outline__notch,
.cxp-form-grid .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.cxp-form-grid .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.cxp-form-grid .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #c7d6e4;
  border-radius: 10px !important;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
  transition: none !important;
}

.cxp-form-grid .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.cxp-form-grid .v-field--focused {
  border-color: #c7d6e4;
  box-shadow: none !important;
}

.cxp-form-grid .v-field__overlay {
  opacity: 0 !important;
}

.cxp-doc-card {
  margin-top: 8px;
  border-radius: 20px;
}

.cxp-amount-cell {
  min-width: 150px;
  text-align: right;
}

.cxp-lot-cell,
.cxp-detail-cell {
  cursor: pointer;
}

.cxp-detail-cell--active {
  background: rgba(37, 99, 235, 0.06);
}

.cxp-detail-inline-value,
.cxp-lot-inline-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: right;
}

.cxp-detail-cell:hover .cxp-detail-inline-value,
.cxp-lot-cell:hover .cxp-lot-inline-value {
  background: rgba(37, 99, 235, 0.04);
  border-color: rgba(37, 99, 235, 0.14);
}

.cxp-detail-inline-input,
.cxp-lot-inline-input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #c7d6e4;
  border-radius: 10px;
  outline: none;
  box-shadow: none;
  font: inherit;
  text-align: right;
}

.cxp-detail-inline-input:focus,
.cxp-lot-inline-input:focus {
  border-color: #c7d6e4;
  box-shadow: none;
}

.cxp-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
}

.cxp-table-wrap table {
  min-width: 1020px;
}

.cxp-lot-table table {
  min-width: 860px;
}

.cxp-detail-table table {
  min-width: 980px;
}

.cxp-table th,
.cxp-detail-table th,
.cxp-history-table th,
.cxp-lot-table th {
  font-weight: 700;
  white-space: nowrap;
  font-size: 0.94rem;
}

.cxp-table td,
.cxp-detail-table td,
.cxp-lot-table td {
  vertical-align: top;
  font-size: 0.96rem;
}

.cxp-cell {
  line-height: 1.35;
  white-space: normal;
}

.cxp-cell--doc {
  min-width: 260px;
  max-width: 340px;
}

.cxp-cell--provider {
  min-width: 220px;
  max-width: 290px;
}

.cxp-cell--obs {
  min-width: 170px;
  max-width: 220px;
  word-break: break-word;
}

.cxp-lot-summary {
  background: rgba(37, 99, 235, 0.06);
}

.guia-page {
  padding: 0 0 32px;
}

.guia-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 28px 24px 0;
}

.guia-hero {
  display: grid;
  gap: 10px;
  padding: 34px 40px;
  margin-bottom: 22px;
  border-radius: 34px;
  color: #f8fbff;
  background:
    radial-gradient(circle at top left, rgba(133, 179, 255, 0.24), transparent 38%),
    linear-gradient(135deg, #22325e 0%, #3651aa 100%);
  box-shadow: 0 24px 44px rgba(28, 49, 108, 0.24);
}

.guia-hero__eyebrow {
  font-size: 0.86rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.guia-hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.05;
  font-weight: 900;
}

.guia-hero__copy {
  max-width: 720px;
  margin: 0;
  font-size: 1.04rem;
  color: rgba(247, 250, 255, 0.88);
}

.guia-toolbar-card,
.guia-table-card {
  border-radius: 30px;
  box-shadow: 0 18px 34px rgba(30, 48, 92, 0.14);
}

.guia-toolbar-card {
  margin-bottom: 26px;
}

.guia-toolbar-card__content {
  padding-bottom: 18px;
}

.guia-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
}

.guia-toolbar__search {
  flex: 1;
}

.guia-toolbar__feedback {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.guia-search-field .v-field {
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.guia-search-field .v-field__outline {
  --v-field-border-opacity: 0.16;
}

.guia-search-field .v-field--focused {
  box-shadow: none;
}

.guia-table th {
  white-space: nowrap;
}

.guia-dest-cell {
  display: grid;
  gap: 4px;
  min-width: 200px;
}

.guia-dest-cell__copy {
  color: rgba(15, 23, 42, 0.66);
  font-size: 0.9rem;
}

.guia-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex: none;
}

.guia-status-dot--active {
  background: #16a34a;
  box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.guia-status-dot--inactive {
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.guia-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.guia-status-switch {
  transform: scale(0.82);
  transform-origin: left center;
  margin-inline-start: -8px;
}

.guia-status-switch .v-selection-control {
  min-height: 34px;
}

.guia-modal-close {
  flex: none;
}

.guia-dialog-card__body {
  background: #f8fbff;
}

/* .guia-editable-area es un <fieldset> (no un <div>): con [disabled] real
   deshabilita de forma nativa TODOS los inputs/selects/botones que
   contiene -- a diferencia de pointer-events:none en un div, esto no se
   puede saltear escribiendo directo en un input ya enfocado. Reset del
   estilo nativo de <fieldset> (min-width/border/padding) para que no
   rompa el grid de campos. */
.guia-editable-area {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.guia-editable-area--locked {
  opacity: 0.72;
}

.guia-form-shell {
  margin-bottom: 6px;
  /* Serie sec y Serie estab. destino muestran texto auxiliar. Alinear al
     inicio evita que esas ayudas desplacen verticalmente las demas cajas. */
  align-items: start;
}

.guia-form-shell .vc-vue-form-field {
  min-width: 0;
}

.guia-dest-form-grid {
  align-items: start;
}

.guia-form-status-field {
  align-self: stretch;
}

.guia-form-status-field__control {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #c7d6e4;
  border-radius: 10px;
  background: #fff;
}

.guia-form-status-field__control .v-selection-control {
  min-height: 0;
}

.guia-form-status-field__control .v-label {
  opacity: 1;
  color: #475569;
}

.guia-field-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.guia-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.guia-table-wrap > .v-table,
.guia-table-wrap > .v-table > .v-table__wrapper,
.guia-table-wrap > .v-table > .v-table__wrapper > table {
  width: 100%;
  min-width: 100%;
}

.guia-table-wrap > .v-table {
  min-width: 1080px;
}

.guia-table-wrap > .v-table > .v-table__wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.guia-table-wrap > .v-table > .v-table__wrapper > table {
  width: max-content;
  min-width: 1080px;
  table-layout: auto;
}

.guia-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 16px 14px;
  flex-wrap: wrap;
}

.guia-footer__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.guia-authorize-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.guia-footer__left {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

#GuiaRemisionModal .factura-action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.guia-footer__right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.guia-section {
  margin-top: 26px;
}

.guia-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 16px;
}

.guia-section__header h3 {
  margin: 0 0 4px;
  font-size: 1.24rem;
  font-weight: 800;
}

.guia-section__header p {
  margin: 0;
  color: rgba(15, 23, 42, 0.68);
}

.guia-catalogo-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
  flex: 1 1 300px;
}

.guia-catalogo-picker .vc-select2-field {
  min-width: 280px;
}

.guia-catalogo-picker .select2-container {
  min-width: 280px;
  flex: 1 1 auto;
}

.guia-destinatarios {
  display: grid;
  gap: 18px;
}

.guia-dest-card {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.95));
}

.guia-dest-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.guia-dest-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #16254f;
}

.guia-dest-card__copy {
  color: rgba(15, 23, 42, 0.66);
}

.guia-subsection {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.guia-subsection__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.guia-subsection__title {
  font-weight: 800;
  color: #1b316b;
}

.guia-additional-table,
.guia-detail-table {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(248, 250, 252, 0.8);
}

.guia-additional-table table,
.guia-detail-table table {
  border-collapse: collapse;
}

.guia-additional-table thead th,
.guia-detail-table thead th {
  height: 56px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.94rem;
  font-weight: 800;
  color: #172554;
}

.guia-additional-table tbody tr,
.guia-detail-table tbody tr {
  background: rgba(255, 255, 255, 0.94);
}

.guia-additional-table tbody tr + tr td,
.guia-detail-table tbody tr + tr td {
  border-top: 1px solid rgba(226, 232, 240, 0.88);
}

.guia-additional-table td,
.guia-detail-table td {
  height: 60px;
  padding: 0 18px;
  vertical-align: middle;
}

.guia-detail-table__product-cell {
  min-width: 240px;
}

.guia-detail-table__qty-cell {
  min-width: 140px;
}

.guia-additional-table__name-cell {
  min-width: 220px;
}

.guia-detail-table__action-cell {
  width: 74px;
}

.guia-grid-input {
  margin: 0;
}

.guia-grid-input .v-input__control {
  min-height: 100%;
}

.guia-grid-input .v-field {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guia-grid-input .v-field__overlay,
.guia-grid-input .v-field__outline {
  display: none;
}

.guia-grid-input .v-field__input {
  min-height: 58px;
  padding: 0;
  color: #0f172a;
}

.guia-grid-input input {
  font-size: 0.98rem;
}

.guia-grid-input--autocomplete .v-field__append-inner {
  padding-inline-end: 6px;
}

/* Codigo interno: viene del producto, no se edita. */
.guia-grid-input--readonly .v-field__input,
.guia-grid-input--readonly input {
  color: #64748b;
  cursor: default;
}

.guia-grid-input--autocomplete .v-field__clearable,
.guia-grid-input--autocomplete .v-field__append-inner {
  align-self: center;
}

.guia-modal-btn {
  min-width: 144px;
  border-radius: 14px;
  letter-spacing: 0.04em;
}

@media (max-width: 1400px) {
  .cxc-shell,
  .cxp-shell {
    max-width: calc(100vw - 28px);
  }
}

@media (max-width: 1280px) {
  .compras-sri-toolbar-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .compras-sri-sync-grid,
  .compras-sri-metrics,
  .compras-sri-detail-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .compras-sri-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .proforma-toolbar__actions {
    justify-content: flex-start;
  }

  .proforma-filters__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .parametros-form-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cxc-shell,
  .cxp-shell {
    width: min(100%, calc(100vw - 28px));
  }
}

@media (max-width: 1080px) {
  .tfe-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .tfh-grid--4,
  .tfh-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cxc-form-grid--4,
  .cxp-form-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 960px) {
  .producto-photo-frame {
    height: 240px;
    max-height: 240px;
  }

  .guia-shell {
    padding: 18px 14px 0;
  }

  .guia-hero {
    padding: 26px 22px;
    border-radius: 26px;
  }

  .guia-toolbar,
  .guia-footer,
  .guia-footer__left,
  .guia-footer__right,
  .guia-section__header,
  .guia-dest-card__header,
  .guia-subsection__header {
    flex-direction: column;
    align-items: stretch;
  }

  .guia-field-actions .v-btn {
    width: 100%;
    justify-content: center;
  }

  .guia-table-wrap .proforma-table {
    min-width: 960px;
  }

  .guia-table-wrap > .v-table > .v-table__wrapper > table,
  .guia-table-wrap .proforma-table {
    width: max-content;
    min-width: 960px;
  }

  .guia-footer__right {
    margin-left: 0;
  }
}

@media (max-width: 900px) {
  .vc-select-system-grid {
    grid-template-columns: 1fr;
  }

  .vc-select-system-actions {
    justify-content: stretch;
  }

  .vc-select-system-submit {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .compras-sri-shell {
    padding: 1rem 0.75rem 2rem;
  }

  .compras-sri-hero {
    padding: 1.4rem 1.2rem;
    border-radius: 24px;
  }

  .compras-sri-toolbar-grid,
  .compras-sri-sync-grid,
  .compras-sri-metrics,
  .compras-sri-detail-grid {
    grid-template-columns: 1fr;
  }

  .compras-sri-toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 760px) {
  .parametros-form-grid--4,
  .proforma-filters__grid,
  .profile-fields {
    grid-template-columns: 1fr;
  }

  .proforma-shell {
    max-width: calc(100vw - 20px);
  }

  .proforma-toolbar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .proforma-toolbar__search {
    width: 100%;
    max-width: none;
    margin-inline-start: 0;
  }

  .proforma-toolbar-card,
  .proforma-table-card {
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
  }

  .proforma-toolbar-card .v-card-text,
  .proforma-table-card .v-card-text,
  .proforma-toolbar-card__content,
  .proforma-filters-card__content {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    align-self: auto !important;
  }

  .proforma-toolbar__actions,
  .proforma-filters__actions,
  .profile-actions {
    justify-content: stretch;
  }

  .proforma-group-row__content {
    align-items: flex-start;
    flex-direction: column;
  }

  .proforma-filter-grid {
    grid-template-columns: 1fr;
  }

  .proforma-filter-dialog__titlebar,
  .proforma-filter-dialog__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .proforma-toolbar__actions .v-btn,
  .proforma-filters__actions .v-btn,
  .profile-actions .v-btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .proforma-table-card .v-card-text {
    display: block;
    min-height: 0;
  }

  .proforma-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .proforma-table-card .v-table {
    display: block;
    width: 100%;
  }

  .proforma-table-card .v-table > .v-table__wrapper {
    height: auto !important;
    min-height: 0 !important;
    overflow-x: auto;
    overflow-y: visible;
  }

  .cxc-form-grid--3,
  .cxc-form-grid--4,
  .cxp-form-grid--3,
  .cxp-form-grid--4 {
    grid-template-columns: 1fr;
  }

  .cxc-page,
  .cxp-page {
    padding-top: 18px;
  }

  .cxc-hero,
  .cxp-hero {
    padding: 28px 22px;
    border-radius: 24px;
  }

  .cxc-toolbar,
  .cxp-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .profile-hero {
    padding: 22px 20px;
  }

  .profile-hero__chart {
    display: none;
  }
}

@media (max-width: 640px) {
  .tfh-grid--4,
  .tfh-grid--2 {
    grid-template-columns: 1fr;
  }

  .tfh-inline-block {
    flex-direction: column;
  }
}

/* Compact shared hero headers */
.vc-vue-hero--catalog,
.proforma-hero,
.cxc-hero,
.cxp-hero,
.compras-sri-hero,
.guia-hero {
  padding: 10px 18px;
  border-radius: 16px;
}

.vc-vue-hero__eyebrow,
.proforma-hero__eyebrow,
.cxc-hero__eyebrow,
.cxp-hero__eyebrow,
.compras-sri-hero__eyebrow,
.guia-hero__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
}

.vc-vue-hero__title,
.proforma-hero__title,
.cxc-hero__title,
.cxp-hero__title,
.compras-sri-hero__title,
.guia-hero__title {
  margin: 4px 0 0;
}

.vc-vue-hero--catalog .vc-vue-hero__title,
.vc-vue-hero--personas .vc-vue-hero__title {
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.proforma-hero__title,
.guia-hero__title {
  font-size: clamp(1.4rem, 2.7vw, 2.35rem);
}

.cxc-hero__title,
.cxp-hero__title,
.compras-sri-hero__title {
  font-size: clamp(1.45rem, 2.8vw, 2.45rem);
}

.vc-vue-hero__copy,
.proforma-hero__copy,
.cxc-hero__copy,
.cxp-hero__copy,
.compras-sri-hero__copy,
.guia-hero__copy {
  display: none !important;
}

@media (min-width: 1024px) {
  body:not(.login-page) {
    font-size: 90%;
  }

  body:not(.login-page) .topbar {
    min-height: 68px;
    padding: 8px 18px;
  }

  .topbar-brand {
    gap: 10px;
  }

  .topbar-logo {
    font-size: 1.5rem;
  }

  .topbar-system {
    max-width: 60vw;
  }

  .topbar-system-line-primary {
    font-size: 13px;
  }

  .topbar-system-line-secondary {
    font-size: 11px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .theme-toggle,
  .btn-logout,
  .topbar-control-pill {
    min-height: 38px;
    border-radius: 10px;
  }

  .btn-logout {
    font-size: 11px;
    padding: 6px 10px;
  }

  .sidebar {
    width: 216px;
    padding: 18px 13px;
  }

  .sidebar-title {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .sidebar-system-select {
    min-height: 34px;
    font-size: 10px;
  }

  .sidebar-menu > li > a,
  .sidebar-menu a {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
  }

  .sidebar-submenu a,
  .sidebar-module-link {
    font-size: 11px;
    padding: 8px 10px;
  }

  .sidebar-user-footer {
    padding: 10px 12px;
  }

  .sidebar-user-avatar {
    width: 34px;
    height: 34px;
  }

  .sidebar-user-name {
    font-size: 11px;
  }

  .sidebar-user-role,
  .sidebar-user-link {
    font-size: 10px;
  }

  .content {
    padding: 28px;
  }

  body:not(.login-page) .app-footer {
    padding: 10px 18px;
    font-size: 12px;
  }

  .vc-vue-shell,
  .proforma-shell,
  .cxc-shell,
  .cxp-shell {
    max-width: 1240px;
  }

  .vc-vue-toolbar .v-btn,
  .proforma-toolbar__actions .v-btn,
  .proforma-filters__actions .v-btn {
    min-height: 38px;
    font-size: 0.84rem;
    padding-inline: 14px;
  }

  .vc-vue-toolbar__create-btn.v-btn {
    min-height: 40px;
  }

  .vc-vue-toolbar__search--catalog .v-field__input,
  .vc-vue-toolbar__search--personas .v-field__input,
  .proforma-toolbar__search .v-field__input,
  .proforma-filters__grid .v-field__input {
    min-height: 46px;
    font-size: 0.84rem;
  }

  .vc-vue-toolbar-card .v-card-text,
  .vc-vue-table-card .v-card-text,
  .proforma-toolbar-card__content,
  .proforma-filters-card__content {
    padding: 16px 18px;
  }

  .proforma-toolbar,
  .cxc-toolbar,
  .cxp-toolbar,
  .guia-toolbar {
    gap: 12px;
  }

  .proforma-table th,
  .proforma-table td {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .proforma-table .text-caption {
    font-size: 0.74rem !important;
  }

  .vc-cursor-pagination__summary,
  .page-summary {
    font-size: 0.74rem;
  }

  .vc-vue-form-grid .v-field,
  .vc-vue-form-grid--6 .v-field,
  .vc-vue-form-grid--two .v-field,
  .vc-vue-form-stack .v-field,
  .vc-select-system-field .v-field,
  .profile-fields .v-field,
  .vc-producto-form .v-field,
  .vc-persona-field .v-field,
  .cxc-form-grid .v-field,
  .cxp-form-grid .v-field,
  .guia-grid-input .v-field {
    min-height: 40px;
  }

  .vc-vue-form-grid .v-field__input,
  .vc-vue-form-grid--6 .v-field__input,
  .vc-vue-form-grid--two .v-field__input,
  .vc-vue-form-stack .v-field__input,
  .vc-select-system-field .v-field__input,
  .profile-fields .v-field__input,
  .vc-producto-form .v-field__input,
  .vc-persona-field .v-field__input,
  .cxc-form-grid .v-field__input,
  .cxp-form-grid .v-field__input,
  .guia-grid-input .v-field__input {
    font-size: 0.84rem;
  }
}

.estado-cuenta-shell {
  width: min(100%, 1380px);
  max-width: calc(100vw - 36px);
  box-sizing: border-box;
}

.estado-cuenta-card {
  margin-top: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.estado-cuenta-toolbar {
  display: grid;
  grid-template-columns: 170px 170px minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  padding: 18px 20px;
}

.estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.estado-cuenta-field--select .select2-container {
  width: 100% !important;
}

.estado-cuenta-field--select .select2-container--default .select2-selection--single,
.estado-cuenta-field input.form-control {
  min-height: 42px;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  background: #fff;
}

.estado-cuenta-field--select .select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
}

.estado-cuenta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.estado-cuenta-group-wrap {
  align-self: end;
}

.estado-cuenta-group-wrap .factura-filter-toggle {
  min-height: 42px;
  border-radius: 12px;
}

.estado-cuenta-filter-wrap {
  align-self: end;
}

.estado-cuenta-filter-wrap .factura-filter-toggle {
  min-height: 42px;
  border-radius: 12px;
}

.estado-cuenta-filter-menu {
  min-width: 340px;
  padding: 14px;
}

.estado-cuenta-filter-grid {
  display: grid;
  gap: 12px;
}

.estado-cuenta-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.estado-cuenta-actions .btn-secondary {
  border: 1px solid #d6e0ef;
  border-radius: 12px;
  padding: 10px 16px;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.estado-cuenta-card--table {
  overflow: hidden;
}

.estado-cuenta-table-wrap {
  overflow-x: auto;
}

.estado-cuenta-table th,
.estado-cuenta-table td {
  padding: 11px 12px;
}

.estado-cuenta-table--detail {
  width: 100%;
  table-layout: fixed;
}

.estado-cuenta-table--detail th,
.estado-cuenta-table--detail td {
  padding: 10px 10px;
}

.estado-cuenta-table--detail th:nth-child(1),
.estado-cuenta-table--detail td:nth-child(1) {
  width: 72px;
}

.estado-cuenta-table--detail th:nth-child(2),
.estado-cuenta-table--detail td:nth-child(2) {
  width: auto;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.estado-cuenta-table--detail th:nth-child(3),
.estado-cuenta-table--detail td:nth-child(3) {
  width: 56px;
}

.estado-cuenta-table--detail th:nth-child(4),
.estado-cuenta-table--detail td:nth-child(4) {
  width: 74px;
}

.estado-cuenta-table--detail th:nth-child(5),
.estado-cuenta-table--detail td:nth-child(5) {
  width: 68px;
}

.estado-cuenta-table--detail th:nth-child(6),
.estado-cuenta-table--detail td:nth-child(6) {
  width: 64px;
}

.estado-cuenta-table--detail th:nth-child(7),
.estado-cuenta-table--detail td:nth-child(7) {
  width: 86px;
}

.estado-cuenta-table--detail th:nth-child(8),
.estado-cuenta-table--detail td:nth-child(8) {
  width: 86px;
}

.estado-cuenta-table__action {
  width: 86px;
  text-align: center;
}

.estado-cuenta-group-row td {
  padding: 12px 14px !important;
  background: #eef4ff;
  color: #1e3a8a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.estado-cuenta-subtotal-row td,
.estado-cuenta-total-row td {
  background: #f8fafc;
  font-weight: 800;
}

.estado-cuenta-total-row td {
  border-top: 2px solid #dbe4f0;
}

.estado-cuenta-eye-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #d6e0ef;
  border-radius: 10px;
  background: #f8fbff;
  color: #2563eb;
  font-size: 16px;
}

.estado-cuenta-eye-btn:hover {
  background: #ecf4ff;
}

.estado-cuenta-empty {
  padding: 22px !important;
  text-align: center;
  color: #64748b;
}

.estado-cuenta-modal-box {
  max-width: 1180px;
}

.estado-cuenta-modal-body {
  display: grid;
  gap: 16px;
}

.estado-cuenta-modal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid #dbe4f0;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
}

.estado-cuenta-modal-hero__main {
  display: grid;
  gap: 6px;
}

.estado-cuenta-modal-hero__eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
}

.estado-cuenta-modal-hero__document {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  color: #0f172a;
}

.estado-cuenta-modal-hero__party,
.estado-cuenta-modal-hero__meta {
  margin: 0;
  color: #475569;
}

.estado-cuenta-modal-hero__total {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 18px;
  background: #0f172a;
  color: #f8fafc;
  text-align: right;
}

.estado-cuenta-modal-hero__total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #93c5fd;
}

.estado-cuenta-modal-hero__total-value {
  font-size: 30px;
  line-height: 1;
}

.estado-cuenta-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.estado-cuenta-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #fff;
}

.estado-cuenta-summary-card__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.estado-cuenta-summary-card__value {
  font-size: 16px;
  color: #0f172a;
}

.estado-cuenta-detail-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.estado-cuenta-detail-field {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #f8fbff;
}

.estado-cuenta-detail-field__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.estado-cuenta-detail-field__value {
  font-size: 14px;
  color: #0f172a;
}

.estado-cuenta-detail-ref {
  padding: 12px 14px;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
}

.estado-cuenta-table-wrap--detail {
  max-height: 380px;
}

html[data-theme="dark"] .estado-cuenta-card {
  border-color: rgba(100, 116, 139, 0.35);
  background: rgba(15, 23, 42, 0.92);
}

html[data-theme="dark"] .estado-cuenta-field label,
html[data-theme="dark"] .estado-cuenta-modal-hero__document,
html[data-theme="dark"] .estado-cuenta-modal-hero__party,
html[data-theme="dark"] .estado-cuenta-modal-hero__meta,
html[data-theme="dark"] .estado-cuenta-summary-card__value,
html[data-theme="dark"] .estado-cuenta-detail-field__value,
html[data-theme="dark"] .estado-cuenta-detail-ref {
  color: #e2e8f0;
}

html[data-theme="dark"] .estado-cuenta-field--select .select2-container--default .select2-selection--single,
html[data-theme="dark"] .estado-cuenta-field input.form-control,
html[data-theme="dark"] .estado-cuenta-modal-hero,
html[data-theme="dark"] .estado-cuenta-summary-card,
html[data-theme="dark"] .estado-cuenta-detail-field,
html[data-theme="dark"] .estado-cuenta-detail-ref {
  border-color: rgba(100, 116, 139, 0.4);
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .estado-cuenta-modal-hero__eyebrow {
  color: #93c5fd;
}

html[data-theme="dark"] .estado-cuenta-modal-hero__total {
  background: rgba(30, 41, 59, 0.92);
}

html[data-theme="dark"] .estado-cuenta-eye-btn {
  border-color: rgba(96, 165, 250, 0.3);
  background: rgba(37, 99, 235, 0.14);
  color: #bfdbfe;
}

html[data-theme="dark"] .estado-cuenta-group-row td {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .estado-cuenta-subtotal-row td,
html[data-theme="dark"] .estado-cuenta-total-row td {
  background: rgba(15, 23, 42, 0.72);
}

html[data-theme="dark"] .estado-cuenta-total-row td {
  border-top-color: rgba(100, 116, 139, 0.4);
}

html[data-theme="dark"] .estado-cuenta-actions .btn-secondary {
  border-color: rgba(100, 116, 139, 0.4);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

@media (max-width: 1024px) {
  .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .estado-cuenta-modal-hero,
  .estado-cuenta-summary-grid,
  .estado-cuenta-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .estado-cuenta-modal-hero,
  .estado-cuenta-summary-grid,
  .estado-cuenta-detail-grid {
    grid-template-columns: 1fr;
  }

  .estado-cuenta-modal-hero__total {
    text-align: left;
  }
}

.tributary-repo-page .tributary-repo-toolbar {
  gap: 1rem;
  align-items: flex-end;
}

.tributary-repo-toolbar__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 0.9rem;
  flex: 1 1 560px;
}

.tributary-repo-filter {
  min-width: 0;
}

.tributary-repo-feedback {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.tributary-repo-table-wrap {
  overflow-x: auto;
}

.tributary-repo-table {
  width: 100%;
  min-width: 1000px;
  table-layout: fixed;
}

.tributary-repo-table th,
.tributary-repo-table td {
  vertical-align: top;
}

.tributary-repo-table td:nth-child(1),
.tributary-repo-table th:nth-child(1) {
  width: 12%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(2),
.tributary-repo-table th:nth-child(2) {
  width: 10%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(3),
.tributary-repo-table th:nth-child(3) {
  width: 30%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(4),
.tributary-repo-table th:nth-child(4) {
  width: 16%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(5),
.tributary-repo-table th:nth-child(5) {
  width: 13%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(6),
.tributary-repo-table th:nth-child(6) {
  width: 10%;
  min-width: 0;
}

.tributary-repo-table td:nth-child(7),
.tributary-repo-table th:nth-child(7) {
  width: 9%;
  min-width: 0;
}

.tributary-repo-table .tributary-repo-document,
.tributary-repo-table td:nth-child(5) {
  min-inline-size: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.28;
}

.tributary-repo-table td:nth-child(1),
.tributary-repo-table td:nth-child(3) {
  max-width: 0;
  overflow: hidden;
}

.tributary-repo-table td:nth-child(7),
.tributary-repo-table th:nth-child(7),
.tributary-repo-actions {
  white-space: nowrap;
}

.tributary-repo-meta {
  color: rgba(71, 85, 105, 0.92);
  font-size: 0.88rem;
}

.tributary-repo-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tributary-repo-dialog__body {
  display: grid;
  gap: 1rem;
}

.tributary-repo-dialog {
  border-radius: 24px;
  overflow: hidden;
}

.tributary-repo-file-list {
  display: grid;
  gap: 0.9rem;
}

.tributary-repo-file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
}

.tributary-repo-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.db-backup-page {
  display: grid;
  min-width: 0;
}

.db-backup-shell {
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.db-backup-hero,
.db-backup-kpi-card,
.db-backup-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.96));
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.db-backup-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.8rem;
}

.db-backup-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2563eb;
}

.db-backup-title {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
  color: #0f172a;
}

.db-backup-copy {
  margin: 0.8rem 0 0;
  max-width: 760px;
  color: #475569;
  line-height: 1.65;
}

.db-backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-start;
}

.db-backup-alert {
  border-radius: 18px;
}

.db-backup-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.db-backup-kpi-card {
  display: grid;
  gap: 0.45rem;
  padding: 1.3rem 1.4rem;
}

.db-backup-kpi-label {
  color: #64748b;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.db-backup-kpi-value {
  font-size: 1.45rem;
  color: #0f172a;
}

.db-backup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 1rem;
  align-items: start;
}

.db-backup-panel__title {
  font-weight: 800;
  color: #0f172a;
}

.db-backup-panel__body {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.db-backup-panel__actions {
  justify-content: flex-end;
  padding: 1rem 1.25rem 1.25rem;
}

.db-backup-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.db-backup-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.db-backup-switch__label {
  font-weight: 700;
  color: #334155;
}

.db-backup-note-grid {
  display: grid;
  gap: 0.8rem;
}

.db-backup-note {
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.85);
  color: #1e3a8a;
}

.db-backup-empty {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  color: #64748b;
}

.db-backup-history {
  display: grid;
  gap: 0.85rem;
  max-height: clamp(320px, 56dvh, 760px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.2rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.db-backup-history-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.db-backup-history-item__title {
  font-weight: 800;
  color: #0f172a;
}

.db-backup-history-item__meta {
  margin-top: 0.2rem;
  color: #64748b;
  font-size: 0.9rem;
}

.db-backup-history-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

@media (max-width: 1100px) {
  .db-backup-kpi-grid,
  .db-backup-grid,
  .db-backup-switches {
    grid-template-columns: 1fr;
  }

  .db-backup-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .db-backup-copy {
    margin-inline: auto;
  }

  .db-backup-actions {
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
  }

  .db-backup-actions .v-btn {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .db-backup-actions .v-btn__content {
    white-space: normal;
    line-height: 1.15;
    text-align: center;
  }

  .db-backup-panel__actions {
    justify-content: center;
  }

  .db-backup-history {
    max-height: clamp(280px, 50dvh, 620px);
  }
}

@media (max-width: 960px) {
  .tributary-repo-toolbar__filters {
    grid-template-columns: 1fr;
    flex-basis: 100%;
  }

  .tributary-repo-page .tributary-repo-toolbar {
    align-items: stretch;
  }

  .tributary-repo-file-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 769px) {
  .tributary-repo-page .tributary-repo-table-wrap {
    overflow-x: auto;
  }

  .tributary-repo-page .tributary-repo-table {
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
  }
}

@media (max-width: 760px) {
  .tributary-repo-page {
    padding-top: 22px;
  }

  .tributary-repo-page .tributary-repo-table-wrap {
    overflow-x: auto;
  }

  .tributary-repo-page .tributary-repo-table {
    width: max-content;
    min-width: 1080px;
    table-layout: auto !important;
  }

  .tributary-repo-file-actions {
    width: 100%;
  }

  .tributary-repo-file-actions .v-btn {
    flex: 1 1 100%;
  }

  .tributary-repo-dialog__body {
    padding: 14px;
  }

  .tributary-repo-dialog__body .dashboard-empty-state {
    min-height: auto;
  }

  .tributary-repo-dialog-content {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 8px !important;
    max-height: calc(100dvh - 16px);
  }
}

@media (max-width: 800px) {
  .db-backup-hero,
  .db-backup-history-item {
    flex-direction: column;
    align-items: stretch;
  }

  .db-backup-actions .v-btn {
    width: 100%;
    justify-content: center;
  }

  .db-backup-history {
    max-height: clamp(260px, 44dvh, 540px);
  }
}

.reportes-kardex-page.ec-page,
.reportes-ventas-page.ec-page,
.reportes-comprobantes-page.ec-page,
.reportes-auxiliar-page.ec-page,
.reportes-embarque-page.ec-page {
  min-height: 100%;
}

.reportes-kardex-page .estado-cuenta-toolbar,
.reportes-ventas-page .estado-cuenta-toolbar,
.reportes-comprobantes-page .estado-cuenta-toolbar,
.reportes-auxiliar-page .estado-cuenta-toolbar,
.reportes-embarque-page .estado-cuenta-toolbar {
  display: grid;
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 18px 20px;
}

.reportes-kardex-page .estado-cuenta-toolbar {
  grid-template-columns: minmax(0, 760px) max-content;
}

.reportes-ventas-page .estado-cuenta-toolbar {
  grid-template-columns: minmax(0, 960px) max-content;
}

.reportes-comprobantes-page .estado-cuenta-toolbar {
  grid-template-columns: minmax(0, 960px) max-content;
}

.reportes-auxiliar-page .estado-cuenta-toolbar {
  grid-template-columns: minmax(0, 960px) max-content;
}

.reportes-embarque-page .estado-cuenta-toolbar {
  grid-template-columns: minmax(0, 960px) max-content;
}

.reportes-kardex-page .estado-cuenta-filter-block,
.reportes-ventas-page .estado-cuenta-filter-block,
.reportes-comprobantes-page .estado-cuenta-filter-block,
.reportes-auxiliar-page .estado-cuenta-filter-block,
.reportes-embarque-page .estado-cuenta-filter-block {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.reportes-kardex-page .estado-cuenta-date-row,
.reportes-ventas-page .estado-cuenta-date-row,
.reportes-comprobantes-page .estado-cuenta-date-row,
.reportes-auxiliar-page .estado-cuenta-date-row,
.reportes-embarque-page .estado-cuenta-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reportes-kardex-page .reportes-kardex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reportes-ventas-page .reportes-ventas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reportes-comprobantes-page .reportes-ventas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reportes-auxiliar-page .reportes-ventas-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reportes-embarque-page .reportes-ventas-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.reportes-kardex-page .estado-cuenta-provider-row,
.reportes-ventas-page .estado-cuenta-provider-row,
.reportes-comprobantes-page .estado-cuenta-provider-row,
.reportes-auxiliar-page .estado-cuenta-provider-row,
.reportes-embarque-page .estado-cuenta-provider-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.reportes-kardex-page .estado-cuenta-card,
.reportes-ventas-page .estado-cuenta-card,
.reportes-comprobantes-page .estado-cuenta-card,
.reportes-auxiliar-page .estado-cuenta-card,
.reportes-embarque-page .estado-cuenta-card {
  margin-top: 18px;
  border: 1px solid #dbe4f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.reportes-kardex-page .estado-cuenta-card--table,
.reportes-ventas-page .estado-cuenta-card--table,
.reportes-auxiliar-page .estado-cuenta-card--table,
.reportes-embarque-page .estado-cuenta-card--table {
  overflow: hidden;
}

.reportes-kardex-page .estado-cuenta-field,
.reportes-ventas-page .estado-cuenta-field,
.reportes-auxiliar-page .estado-cuenta-field,
.reportes-embarque-page .estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reportes-kardex-page .estado-cuenta-field label,
.reportes-ventas-page .estado-cuenta-field label,
.reportes-auxiliar-page .estado-cuenta-field label,
.reportes-embarque-page .estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-input__control,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-input__control,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-input__control,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-input__control {
  min-height: 42px;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  opacity: 1;
  pointer-events: none;
  box-shadow: none !important;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #93c5fd;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field__overlay,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field__overlay,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field__overlay,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field__overlay {
  opacity: 0 !important;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field__input,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field__input,
.reportes-auxiliar-page .estado-cuenta-vuetify-select .v-field__input,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field__input {
  min-height: 42px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field__field,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field__field,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field__field {
  align-items: center;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.reportes-kardex-page .estado-cuenta-vuetify-select .v-select__selection,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-select__selection {
  color: #0f172a;
}

.reportes-embarque-page .estado-cuenta-vuetify-select .v-autocomplete__selection,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-select__selection {
  color: #0f172a;
}

.reportes-kardex-page .estado-cuenta-vuetify-select input,
.reportes-ventas-page .estado-cuenta-vuetify-select input,
.reportes-embarque-page .estado-cuenta-vuetify-select input {
  color: #0f172a;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-field__append-inner,
.reportes-kardex-page .estado-cuenta-vuetify-select .v-field__clearable,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field__append-inner,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.reportes-embarque-page .estado-cuenta-vuetify-select .v-field__append-inner,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.reportes-kardex-page .estado-cuenta-vuetify-select .v-input__details,
.reportes-ventas-page .estado-cuenta-vuetify-select .v-input__details,
.reportes-comprobantes-page .estado-cuenta-vuetify-select .v-input__details,
.reportes-embarque-page .estado-cuenta-vuetify-select .v-input__details {
  display: none !important;
}

.reportes-kardex-page .estado-cuenta-toolbar-buttons,
.reportes-ventas-page .estado-cuenta-toolbar-buttons,
.reportes-comprobantes-page .estado-cuenta-toolbar-buttons,
.reportes-embarque-page .estado-cuenta-toolbar-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.reportes-kardex-page .estado-cuenta-search-btn,
.reportes-kardex-page .estado-cuenta-clear-btn,
.reportes-kardex-page .estado-cuenta-action-btn,
.reportes-ventas-page .estado-cuenta-search-btn,
.reportes-ventas-page .estado-cuenta-clear-btn,
.reportes-ventas-page .estado-cuenta-action-btn,
.reportes-comprobantes-page .estado-cuenta-search-btn,
.reportes-comprobantes-page .estado-cuenta-clear-btn,
.reportes-comprobantes-page .estado-cuenta-action-btn,
.reportes-embarque-page .estado-cuenta-search-btn,
.reportes-embarque-page .estado-cuenta-clear-btn,
.reportes-embarque-page .estado-cuenta-action-btn {
  min-height: 42px;
  border-radius: 14px;
  text-transform: none;
  font-weight: 700;
}

.reportes-kardex-page .estado-cuenta-table-wrap,
.reportes-ventas-page .estado-cuenta-table-wrap,
.reportes-comprobantes-page .estado-cuenta-table-wrap,
.reportes-embarque-page .estado-cuenta-table-wrap {
  overflow: auto;
  padding: 16px 20px 20px;
}

.reportes-kardex-page .estado-cuenta-table,
.reportes-ventas-page .estado-cuenta-table,
.reportes-comprobantes-page .estado-cuenta-table,
.reportes-embarque-page .estado-cuenta-table {
  width: 100%;
  border-collapse: collapse;
}

.reportes-kardex-page .estado-cuenta-table th,
.reportes-kardex-page .estado-cuenta-table td,
.reportes-ventas-page .estado-cuenta-table th,
.reportes-ventas-page .estado-cuenta-table td,
.reportes-comprobantes-page .estado-cuenta-table th,
.reportes-comprobantes-page .estado-cuenta-table td,
.reportes-auxiliar-page .estado-cuenta-table th,
.reportes-auxiliar-page .estado-cuenta-table td,
.reportes-embarque-page .estado-cuenta-table th,
.reportes-embarque-page .estado-cuenta-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  white-space: nowrap;
}

.reportes-kardex-page .estado-cuenta-table thead th,
.reportes-ventas-page .estado-cuenta-table thead th,
.reportes-auxiliar-page .estado-cuenta-table thead th,
.reportes-embarque-page .estado-cuenta-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reportes-kardex-page .estado-cuenta-empty,
.reportes-ventas-page .estado-cuenta-empty,
.reportes-auxiliar-page .estado-cuenta-empty,
.reportes-embarque-page .estado-cuenta-empty {
  text-align: center;
  padding: 32px 16px;
  color: #64748b;
}

.reportes-kardex-page .estado-cuenta-total-row td,
.reportes-ventas-page .estado-cuenta-total-row td,
.reportes-embarque-page .estado-cuenta-total-row td {
  background: #f8fafc;
  font-weight: 700;
}

.reportes-kardex-page .estado-cuenta-pagination,
.reportes-ventas-page .estado-cuenta-pagination,
.reportes-comprobantes-page .estado-cuenta-pagination,
.reportes-auxiliar-page .estado-cuenta-pagination,
.reportes-embarque-page .estado-cuenta-pagination {
  padding: 0 20px 20px;
}

.reportes-kardex-page .ec-alert-wrap,
.reportes-ventas-page .ec-alert-wrap,
.reportes-comprobantes-page .ec-alert-wrap,
.reportes-auxiliar-page .ec-alert-wrap,
.reportes-embarque-page .ec-alert-wrap {
  padding: 18px 20px 0;
}

.reportes-kardex-page .estado-cuenta-toolbar.reportes-toolbar,
.reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar,
.reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar,
.reportes-embarque-page .estado-cuenta-toolbar.reportes-toolbar {
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px 16px;
  align-items: center;
}

.reportes-toolbar .estado-cuenta-filter-block {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.reportes-toolbar .reportes-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.reportes-toolbar .estado-cuenta-toolbar-buttons {
  justify-content: flex-end;
}

.reportes-toolbar .estado-cuenta-action-btn.reportes-filter-trigger {
  min-width: 156px;
}

.reportes-toolbar .reportes-toolbar-search {
  min-width: 0;
}

.reportes-toolbar .reportes-toolbar-search .v-input {
  width: 100%;
}

.reportes-toolbar .reportes-toolbar-search .v-field__input {
  min-height: 42px;
}

.reportes-kardex-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
.reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
.reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
.reportes-embarque-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 12px 16px;
  align-items: center;
}

.reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
.reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions {
  min-width: 0;
}

.reportes-kardex-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions,
.reportes-compras-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions,
.reportes-ventas-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.reportes-kardex-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
  grid-template-columns: max-content minmax(220px, 1fr);
}

.reportes-kardex-page .estado-cuenta-action-btn {
  min-height: 38px;
  padding: 0 10px;
  font-size: 12.5px;
}

.reportes-kardex-page .estado-cuenta-action-btn.reportes-filter-trigger {
  min-width: 0;
}

.reportes-toolbar.reportes-toolbar--with-search .estado-cuenta-action-btn {
  white-space: nowrap;
}

.reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search {
  min-width: 320px;
  width: 100%;
  margin-inline-start: auto;
}

@media (max-width: 1400px) {
  .reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  }
}

.reportes-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  min-width: 0;
}

.reportes-filter-grid .estado-cuenta-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.reportes-filter-grid .estado-cuenta-field label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.reportes-filter-grid .estado-cuenta-field .form-control {
  min-height: 42px;
  border-radius: 12px;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field {
  min-height: 42px;
  border-radius: 12px;
  background: #fff;
  box-shadow: none !important;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-input__control {
  min-height: 42px;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__start,
.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__notch,
.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline {
  color: transparent;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  opacity: 1;
  pointer-events: none;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field--variant-outlined.v-field--focused .v-field__outline::after {
  border-color: #3468f2;
  box-shadow: 0 0 0 1px rgba(52, 104, 242, 0.18);
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-field__append-inner,
.reportes-filter-grid .estado-cuenta-vuetify-select .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.reportes-filter-grid .estado-cuenta-vuetify-select .v-input__details {
  display: none !important;
}

@media (max-width: 1100px) {
  .reportes-kardex-page .estado-cuenta-toolbar,
  .reportes-ventas-page .estado-cuenta-toolbar,
  .reportes-comprobantes-page .estado-cuenta-toolbar,
  .reportes-auxiliar-page .estado-cuenta-toolbar,
  .reportes-embarque-page .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .reportes-kardex-page .estado-cuenta-toolbar-buttons,
  .reportes-ventas-page .estado-cuenta-toolbar-buttons,
  .reportes-comprobantes-page .estado-cuenta-toolbar-buttons,
  .reportes-auxiliar-page .estado-cuenta-toolbar-buttons,
  .reportes-embarque-page .estado-cuenta-toolbar-buttons {
    justify-content: flex-start;
  }

  .reportes-kardex-page .reportes-kardex-grid,
  .reportes-ventas-page .reportes-ventas-grid,
  .reportes-comprobantes-page .reportes-ventas-grid,
  .reportes-auxiliar-page .reportes-ventas-grid,
  .reportes-embarque-page .reportes-ventas-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
    grid-template-columns: 1fr;
  }

  .reportes-kardex-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-embarque-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
    grid-template-columns: 1fr;
  }

  .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin-inline-start: 0;
  }

  .reportes-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .reportes-kardex-page .estado-cuenta-date-row,
  .reportes-kardex-page .reportes-kardex-grid,
  .reportes-ventas-page .estado-cuenta-date-row,
  .reportes-ventas-page .reportes-ventas-grid,
  .reportes-comprobantes-page .estado-cuenta-date-row,
  .reportes-comprobantes-page .reportes-ventas-grid,
  .reportes-auxiliar-page .estado-cuenta-date-row,
  .reportes-auxiliar-page .reportes-ventas-grid,
  .reportes-embarque-page .estado-cuenta-date-row,
  .reportes-embarque-page .reportes-ventas-grid {
    grid-template-columns: 1fr;
  }

  .reportes-kardex-page .estado-cuenta-provider-row,
  .reportes-ventas-page .estado-cuenta-provider-row,
  .reportes-comprobantes-page .estado-cuenta-provider-row,
  .reportes-auxiliar-page .estado-cuenta-provider-row,
  .reportes-embarque-page .estado-cuenta-provider-row {
    flex-direction: column;
    align-items: stretch;
  }

  .reportes-filter-grid {
    grid-template-columns: 1fr;
  }

  .reportes-kardex-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-compras-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-ventas-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search,
  .reportes-embarque-page .estado-cuenta-toolbar.reportes-toolbar.reportes-toolbar--with-search {
    gap: 10px;
  }

  .reportes-kardex-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions,
  .reportes-compras-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions,
  .reportes-ventas-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions,
  .reportes-embarque-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .reportes-kardex-page .reportes-toolbar.reportes-toolbar--with-search .estado-cuenta-action-btn,
  .reportes-compras-page .reportes-toolbar.reportes-toolbar--with-search .estado-cuenta-action-btn,
  .reportes-ventas-page .reportes-toolbar.reportes-toolbar--with-search .estado-cuenta-action-btn,
  .reportes-embarque-page .reportes-toolbar.reportes-toolbar--with-search .estado-cuenta-action-btn {
    width: 100%;
    justify-content: center;
  }

  .reportes-kardex-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search,
  .reportes-compras-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search,
  .reportes-ventas-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search,
  .reportes-embarque-page .reportes-toolbar.reportes-toolbar--with-search .reportes-toolbar-search {
    width: 100%;
  }
}

.sesiones-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.sesiones-summary-card__label {
  color: rgba(15, 23, 42, 0.62);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sesiones-summary-card__value {
  color: #132d55;
  font-size: 1.9rem;
  font-weight: 700;
  margin-top: 6px;
}

.sesiones-page .sesiones-toolbar-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(220px, 0.9fr) auto;
  gap: 14px;
  align-items: end;
}

.sesiones-page .sesiones-toolbar-grid__search {
  grid-column: span 1;
}

.sesiones-page .sesiones-toolbar-grid__actions {
  display: flex;
  justify-content: flex-start;
}

.sesiones-page .sesiones-toolbar-grid__actions .v-btn {
  min-height: 44px;
}

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

.sesiones-table {
  width: 100%;
  border-collapse: collapse;
}

.sesiones-table th,
.sesiones-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  text-align: left;
  vertical-align: top;
}

.sesiones-table th {
  color: #132d55;
  font-size: 0.82rem;
  font-weight: 700;
}

.sesiones-table__row-current {
  background: rgba(37, 99, 235, 0.06);
}

.sesiones-main-cell {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sesiones-secondary-cell {
  margin-top: 4px;
  color: rgba(15, 23, 42, 0.62);
  font-size: 0.84rem;
  line-height: 1.35;
}

@media (max-width: 960px) {
  .sesiones-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sesiones-page .sesiones-toolbar-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sesiones-summary-grid {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   INDICADORES APP
   ============================================================ */

.indicadores-page-root {
  min-height: 100%;
}

.indicadores-page {
  display: grid;
  gap: 18px;
  padding-bottom: 18px;
}

.indicadores-hero {
  background:
    radial-gradient(circle at top right, rgba(147, 197, 253, 0.28), transparent 26%),
    linear-gradient(135deg, #1d4ed8 0%, #3b82f6 58%, #60a5fa 100%);
  border: 1px solid rgba(96, 165, 250, 0.6);
  box-shadow: 0 22px 48px rgba(29, 78, 216, 0.18);
}

.indicadores-hero .vc-vue-hero__eyebrow {
  color: rgba(219, 234, 254, 0.92);
}

.indicadores-hero .vc-vue-hero__title,
.indicadores-hero .vc-vue-hero__copy {
  color: #ffffff;
}

.indicadores-toolbar__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.indicadores-toolbar__meta {
  display: grid;
  gap: 2px;
}

.indicadores-toolbar__legend {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.indicadores-toolbar__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.indicadores-toolbar__value {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.system-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.system-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, rgba(248, 250, 255, 0.92));
  border: 1px solid var(--system-border, rgba(148, 163, 184, 0.25));
  color: #334155;
  font-size: 12px;
}

.system-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.indicadores-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.indicadores-summary-card {
  border: 1px solid var(--summary-border, rgba(191, 219, 254, 0.9));
  background: linear-gradient(180deg, #ffffff 0%, var(--summary-soft, rgba(49, 94, 251, 0.06)) 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.indicadores-summary-card__body {
  position: relative;
}

.indicadores-summary-card__tone {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, var(--summary-solid, #315efb), color-mix(in srgb, var(--summary-solid, #315efb) 55%, white));
}

.indicadores-summary-card__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.indicadores-summary-card__value {
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  color: #1e3a8a;
}

.indicadores-summary-card__help {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
}

.indicadores-summary-card__spark {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(191, 219, 254, 0.7);
  background: rgba(248, 250, 255, 0.86);
}

.summary-spark {
  width: 100%;
  height: 34px;
}

.summary-spark__line {
  fill: none;
  stroke: var(--summary-solid, #315efb);
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.95;
}

.summary-spark__meta {
  display: grid;
  justify-items: end;
  gap: 2px;
}

.summary-spark__meta span {
  font-size: 11px;
  color: #64748b;
}

.summary-spark__meta strong {
  font-size: 16px;
  color: #0f172a;
}

.indicadores-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 16px;
}

.live-work-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.9fr;
  gap: 16px;
  align-items: start;
}

.indicadores-panel {
  border: 1px solid rgba(191, 219, 254, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 250, 255, 0.94));
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.indicadores-panel--wide {
  grid-column: span 2;
}

.indicadores-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(191, 219, 254, 0.55);
}

.indicadores-panel__eyebrow {
  color: #2563eb;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
  font-weight: 800;
}

.indicadores-panel__title {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.05;
  color: #0f172a;
}

.indicadores-panel__hint {
  color: #64748b;
  font-size: 13px;
}

.connected-now-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 150, 105, 0.10);
  border: 1px solid rgba(5, 150, 105, 0.28);
  border-radius: 20px;
  padding: 6px 14px;
}
.connected-now-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
  flex-shrink: 0;
}
.connected-now-badge__count {
  font-size: 20px;
  font-weight: 700;
  color: #047857;
  line-height: 1;
}
.connected-now-badge__label {
  font-size: 12px;
  color: #065f46;
}

.trend-chart {
  display: grid;
  gap: 10px;
}

.trend-chart__svg {
  width: 100%;
  height: 220px;
  background:
    linear-gradient(to bottom, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0)),
    #f8fbff;
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 20px;
  overflow: hidden;
}

.trend-bar {
  fill: rgba(37, 99, 235, 0.45);
  rx: 1;
}

.trend-bar--current {
  fill: #2563eb;
  rx: 1;
}

.trend-bar__baseline {
  stroke: rgba(37, 99, 235, 0.18);
  stroke-width: 0.4;
}

.trend-chart__footer {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 4px;
}

.trend-chart__tick {
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.activity-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.activity-charts__card {
  border-radius: 20px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(191, 219, 254, 0.8);
  background:
    radial-gradient(circle at top right, rgba(147, 197, 253, 0.22), transparent 40%),
    linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 255, 0.9) 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.activity-charts__headline {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.activity-charts__headline strong {
  color: #0f172a;
  font-size: 14px;
}

.activity-charts__meta {
  color: #64748b;
  font-size: 12px;
}

.activity-chart__svg {
  width: 100%;
  height: 160px;
  background:
    linear-gradient(to bottom, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0)),
    #f8fbff;
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 18px;
  overflow: hidden;
}

.activity-bar {
  fill: rgba(37, 99, 235, 0.4);
  rx: 1;
  transition: y 280ms ease, height 280ms ease, fill 280ms ease;
}

.activity-bar--current {
  fill: #2563eb;
  rx: 1;
  transition: y 280ms ease, height 280ms ease, fill 280ms ease;
}

.activity-bar__baseline {
  stroke: rgba(37, 99, 235, 0.18);
  stroke-width: 0.4;
}

.activity-chart__footer {
  margin-top: 10px;
  display: grid;
  gap: 4px;
}

.activity-chart__footer--12 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.activity-chart__footer--24 {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.activity-chart__tick {
  color: #64748b;
  font-size: 11px;
  text-align: center;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
}

.donut-chart {
  width: 220px;
  height: 220px;
  border-radius: 999px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.7);
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.donut-chart__center {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
}

.donut-chart__center strong {
  font-size: 42px;
  line-height: 1;
  color: #0f172a;
}

.donut-chart__center span {
  color: #64748b;
  font-size: 13px;
}

.donut-legend {
  display: grid;
  gap: 10px;
}

.donut-legend__item {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
}

.donut-legend__swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.donut-legend__label {
  color: #334155;
}

.donut-legend__value {
  color: #0f172a;
}

.bars-list {
  display: grid;
  gap: 14px;
}

.bars-list__row {
  display: grid;
  gap: 8px;
}

.bars-list__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.bars-list__label {
  color: #334155;
  font-weight: 600;
}

.bars-list__label--with-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bars-list__system-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.bars-list__value {
  color: #0f172a;
}

.bars-list__track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.bars-list__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.bars-list__fill--module {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.bars-list__fill--system {
  background: linear-gradient(90deg, #0f766e, #34d399);
}

.indicator-list {
  display: grid;
  gap: 12px;
}

.indicator-list__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, rgba(245, 249, 255, 0.95));
  border: 1px solid rgba(191, 219, 254, 0.8);
}

.indicator-list__item--error {
  align-items: flex-start;
}

.indicator-list__item--stacked {
  align-items: stretch;
}

.indicator-list__full {
  width: 100%;
  display: grid;
  gap: 4px;
}

.indicator-list__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.indicator-list__sub {
  color: #64748b;
  font-size: 13px;
  margin-top: 3px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.users-grid__card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--system-border, rgba(191, 219, 254, 0.82));
  background: linear-gradient(135deg, #ffffff, var(--system-soft, rgba(240, 249, 255, 0.95)));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.users-grid__avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  overflow: hidden;
}

.users-grid__avatar--photo {
  background: #fff;
}

.users-grid__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.users-grid__content {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 14px;
}

.users-grid__content strong {
  color: #0f172a;
  font-size: 16px;
}

.users-grid__headline {
  margin-bottom: 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px 10px;
}

.users-grid__headline strong {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.users-grid__system-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  text-align: center;
}

.users-grid__module {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.users-grid__module strong {
  color: #1d4ed8;
  font-size: 15px;
}

.users-grid__detail {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.users-grid__meta-label {
  min-width: 58px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.users-grid__content small {
  color: #64748b;
}

@media (max-width: 720px) {
  .users-grid__card {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .users-grid__avatar {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }

  .users-grid__content {
    min-width: 0;
  }

  .users-grid__headline {
    flex-direction: column;
    align-items: flex-start;
  }

  .users-grid__headline strong {
    width: 100%;
  }

  .users-grid__system-chip {
    width: fit-content;
    max-width: 100%;
  }

  .users-grid__module,
  .users-grid__detail {
    gap: 4px;
  }

  .users-grid__meta-label {
    min-width: 52px;
  }
}

.activity-feed {
  border: 1px solid rgba(191, 219, 254, 0.82);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(49, 94, 251, 0.08), transparent 32%),
    linear-gradient(135deg, rgba(248, 250, 255, 0.98), rgba(240, 249, 255, 0.95));
  padding: 14px;
}

.activity-feed__header {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.activity-feed__list {
  max-height: 250px;
  overflow-y: auto;
  display: grid;
  gap: 10px;
  padding-right: 4px;
}

.activity-feed__item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, var(--system-soft, rgba(255,255,255,0.92)));
  border: 1px solid var(--system-border, rgba(191, 219, 254, 0.72));
}

.activity-feed__item--alert {
  border-color: rgba(248, 113, 113, 0.55);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.98));
}

.activity-feed__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.activity-feed__item strong {
  color: #0f172a;
  font-size: 14px;
}

.activity-feed__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.activity-feed__item span {
  color: #334155;
  font-size: 14px;
}

.activity-feed__item small {
  color: #64748b;
  font-size: 12px;
}

.activity-feed__group-meta {
  font-weight: 700;
  color: #315efb;
}

.activity-feed__group-detail {
  display: block;
}

.indicadores-empty {
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  color: #64748b;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

.indicadores-alert {
  margin-top: -4px;
}

.indicadores-empty--compact {
  min-height: 120px;
  display: grid;
  place-items: center;
}

@media (max-width: 1180px) {
  .indicadores-summary-grid,
  .indicadores-grid,
  .live-work-grid,
  .activity-charts,
  .users-grid,
  .donut-wrap {
    grid-template-columns: 1fr;
  }

  .indicadores-toolbar__content,
  .indicadores-toolbar__legend,
  .system-legend {
    justify-content: flex-start;
    justify-items: start;
  }

  .indicadores-panel--wide {
    grid-column: span 1;
  }

  .donut-chart {
    margin: 0 auto;
  }
}


/* ---- Bitacora: badge de accion ---- */
.activity-feed__count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-left: 8px;
}

.activity-feed__accion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.activity-feed__list {
  max-height: 480px;
}

/* ---- Panel Acciones del dia ---- */
.action-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.action-summary-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--ac-color, #64748b) 28%, transparent);
  background: linear-gradient(135deg, #ffffff, var(--ac-soft, rgba(100,116,139,0.06)));
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
  animation: action-card-in 0.4s ease both;
}

@keyframes action-card-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.action-summary-card__value {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--ac-color, #64748b);
  animation: count-pulse 2.8s ease-in-out infinite;
}

@keyframes count-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.72; }
}

.action-summary-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

/* ---- Barra tablas mas activas ---- */
.bars-list__fill--table {
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
}

/* Select estilo Select2 para controles Vuetify puntuales */
.vc-select2-like .v-field {
  min-height: 40px;
  border-radius: 4px;
  background: #fff;
  box-shadow: none !important;
}

.vc-select2-like .v-field--variant-outlined .v-field__outline__start,
.vc-select2-like .v-field--variant-outlined .v-field__outline__notch,
.vc-select2-like .v-field--variant-outlined .v-field__outline__end {
  display: none !important;
}

.vc-select2-like .v-field--variant-outlined .v-field__outline::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid #aaa;
  border-radius: 4px;
  pointer-events: none;
}

.vc-select2-like .v-field--focused .v-field__outline::after {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.vc-select2-like .v-field__overlay {
  opacity: 0 !important;
}

.vc-select2-like .v-field__input {
  min-height: 40px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center;
  color: #111827;
}

.vc-select2-like .v-autocomplete__selection,
.vc-select2-like .v-select__selection,
.vc-select2-like input {
  color: #111827;
  font-size: 13px;
}

.vc-select2-like .v-field__append-inner,
.vc-select2-like .v-field__clearable {
  align-self: center;
  padding-inline-end: 6px;
}

.vc-select2-like .v-input__details {
  display: none !important;
}

.vc-select2-like-menu {
  border: 1px solid #aaa;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.16);
}

.vc-select2-like-menu .v-list {
  padding: 4px 0;
}

.vc-select2-like-menu .v-list-item {
  min-height: 34px;
  padding-inline: 12px;
}

.vc-select2-like-menu .v-list-item-title {
  font-size: 13px;
  color: #111827;
}

.vc-select2-like-menu .v-list-item:hover,
.vc-select2-like-menu .v-list-item--active {
  background: #eef4ff;
}

/* Validar totales de transacciones */
.validar-totales-page {
  min-height: calc(100vh - 90px);
  padding: 24px;
  background: #f6f7fb;
  color: #0f172a;
}

.totales-admin__bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.totales-admin__title h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  color: #071936;
}

.totales-admin__title p {
  margin: 6px 0 0;
  color: #445b86;
  font-size: 13px;
}

.totales-admin__filters {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.totales-admin__field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.totales-admin__field input {
  height: 42px;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  padding: 0 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  box-shadow: none;
}

.totales-admin__field input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.totales-admin__filters .totales-admin__field input {
  width: 110px;
}

.totales-admin button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  font-weight: 800;
  color: #fff;
  background: #2563eb;
  cursor: pointer;
}

.totales-admin button.secondary {
  background: #64748b;
}

.totales-admin button.danger {
  background: #c56a6a;
}

.totales-admin button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.totales-admin__summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.totales-admin__metric {
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 16px 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.04);
}

.totales-admin__metric span {
  color: #334f7e;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.totales-admin__metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1;
  color: #071936;
}

.totales-admin__message {
  min-height: 20px;
  margin: 0 0 12px;
  color: #475569;
  font-weight: 700;
}

.totales-admin__message.error {
  color: #b42318;
}

.totales-admin__message.ok {
  color: #027a48;
}

.totales-admin__card {
  overflow: hidden;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.06);
}

.totales-admin__table-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) max-content;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.totales-admin__search input {
  width: 100%;
}

.totales-admin__page-summary {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.totales-admin__table-wrap {
  overflow: auto;
}

.totales-admin table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
  font-size: 13px;
}

.totales-admin th,
.totales-admin td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.totales-admin th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.totales-admin td.money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.totales-admin__diffs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.totales-admin__diff {
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  padding: 4px 8px;
  font-weight: 800;
  white-space: nowrap;
}

.totales-admin__empty {
  padding: 32px 16px;
  color: #64748b;
  text-align: center;
}

.totales-admin__pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
}

.totales-admin__page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.totales-admin__page-btn {
  min-width: 38px;
  min-height: 36px;
  border: 1px solid #dbe4f0 !important;
  border-radius: 12px !important;
  padding: 0 12px !important;
  background: #fff !important;
  color: #334155 !important;
  font-weight: 800;
}

.totales-admin__page-btn:hover:not(:disabled) {
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  transform: translateY(-1px);
}

.totales-admin__page-btn.active {
  border-color: #2563eb !important;
  background: #2563eb !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .validar-totales-page {
    padding: 16px;
  }

  .totales-admin__bar,
  .totales-admin__table-toolbar {
    grid-template-columns: 1fr;
  }

  .totales-admin__filters,
  .totales-admin__pagination {
    justify-content: flex-start;
  }

  .totales-admin__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .totales-admin__summary {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   FACTURAS DESCARGA
===================================================== */

.facturas-descarga-page.ec-page {
  min-height: 100%;
}

.facturas-descarga-page .estado-cuenta-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 20px;
  align-items: start;
  justify-content: space-between;
  padding: 18px 20px;
}

.facturas-descarga-page .reportes-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  min-width: 0;
  justify-content: flex-start;
}

.facturas-descarga-page .reportes-toolbar-search {
  min-width: 320px;
  align-self: start;
  margin-top: 2px;
}

.facturas-descarga-page .facturas-descarga-type-select {
  min-width: 220px;
  flex: 1 1 260px;
}

.facturas-descarga-page .estado-cuenta-action-btn {
  min-height: 42px;
  border-radius: 14px;
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.facturas-descarga-page .reportes-filter-trigger {
  min-width: 132px;
}

.facturas-descarga-page .estado-cuenta-table {
  table-layout: auto;
}

.facturas-descarga-page .estado-cuenta-card--table {
  overflow: hidden;
}

.facturas-descarga-page .facturas-descarga-alert {
  display: grid;
  gap: 0.25rem;
}

.facturas-descarga-page .facturas-descarga-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  opacity: 0.95;
  word-break: break-all;
}

.facturas-descarga-page .estado-cuenta-table th,
.facturas-descarga-page .estado-cuenta-table td {
  vertical-align: middle;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(1),
.facturas-descarga-page .estado-cuenta-table td:nth-child(1) {
  width: 52px;
  white-space: nowrap;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(2),
.facturas-descarga-page .estado-cuenta-table td:nth-child(2) {
  width: 104px;
  white-space: nowrap;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(3),
.facturas-descarga-page .estado-cuenta-table td:nth-child(3) {
  width: 96px;
  white-space: nowrap;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(4),
.facturas-descarga-page .estado-cuenta-table td:nth-child(4) {
  width: 96px;
  white-space: nowrap;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(5),
.facturas-descarga-page .estado-cuenta-table td:nth-child(5) {
  min-width: 320px;
}

.facturas-descarga-page .estado-cuenta-table th:nth-child(6),
.facturas-descarga-page .estado-cuenta-table td:nth-child(6),
.facturas-descarga-page .estado-cuenta-table th:nth-child(7),
.facturas-descarga-page .estado-cuenta-table td:nth-child(7),
.facturas-descarga-page .estado-cuenta-table th:nth-child(8),
.facturas-descarga-page .estado-cuenta-table td:nth-child(8) {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .facturas-descarga-page .estado-cuenta-toolbar {
    grid-template-columns: 1fr;
  }

  .facturas-descarga-page .reportes-toolbar-search {
    margin-top: 8px;
  }

  .facturas-descarga-page .reportes-toolbar-actions {
    grid-auto-flow: row;
    grid-auto-columns: 1fr;
    justify-content: stretch;
  }
}

@media (max-width: 680px) {
  .facturas-descarga-page .reportes-toolbar-actions {
    grid-template-columns: 1fr;
  }

  .facturas-descarga-page .estado-cuenta-action-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================
   CHAT SUPERADMIN
===================================================== */

.chat-superadmin-page.ec-page {
  min-height: 100%;
}

.chat-superadmin-page-shell {
  gap: 18px;
}

.chat-superadmin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.chat-superadmin-board {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.chat-superadmin-task-board,
.chat-superadmin-activity-card,
.chat-superadmin-presence-card {
  padding: 18px 14px 14px;
}

.chat-superadmin-task-board--history {
  border-color: rgba(34, 197, 94, 0.2);
}

.chat-superadmin-activity-list,
.chat-superadmin-presence-list {
  display: grid;
  gap: 10px;
}

.chat-superadmin-activity-item,
.chat-superadmin-presence-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chat-superadmin-activity-item__avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-superadmin-activity-item__body,
.chat-superadmin-presence-item__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-superadmin-activity-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.chat-superadmin-activity-item__meta strong,
.chat-superadmin-presence-item__body strong {
  color: var(--vc-text);
}

.chat-superadmin-activity-item__meta span,
.chat-superadmin-activity-item__body p,
.chat-superadmin-presence-item__body span {
  color: var(--vc-text-muted);
}

.chat-superadmin-float-panel {
  position: fixed;
  right: 92px;
  top: 50%;
  transform: translateY(-50%);
  width: min(340px, calc(100vw - 120px));
  height: min(68vh, 650px);
  z-index: 9999;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, rgba(255,255,255,0.99) 0%, rgba(244,248,255,0.99) 100%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(10px);
}

.chat-superadmin-float-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chat-superadmin-float-panel__title {
  display: grid;
  gap: 2px;
}

.chat-superadmin-float-panel__title strong {
  color: var(--vc-text);
}

.chat-superadmin-float-panel__title span {
  color: var(--vc-text-muted);
  font-size: 0.84rem;
}

.chat-superadmin-float-panel__subtitle {
  font-size: 0.8rem;
}

.chat-superadmin-float-panel__actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-superadmin-float-panel__presence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-float-panel__search {
  display: grid;
  gap: 8px;
}

.chat-superadmin-float-panel__search .v-field {
  border-radius: 999px;
}

.chat-superadmin-float-panel__search .v-field__outline::before,
.chat-superadmin-float-panel__search .v-field__outline::after {
  border-radius: 999px;
}

.chat-superadmin-float-panel__thread {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding-right: 2px;
  padding-top: 2px;
}

.chat-superadmin-message--compact {
  padding: 10px 12px;
  gap: 10px;
  border-radius: 14px;
}

.chat-superadmin-message--compact .chat-superadmin-message__avatar {
  width: 34px;
  height: 34px;
  font-size: 0.78rem;
}

.chat-superadmin-message--compact .chat-superadmin-message__text {
  font-size: 0.94rem;
}

.chat-superadmin-image-button img {
  display: block;
  max-width: 220px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--vc-border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.chat-superadmin-favorite-sticker {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-superadmin-float-panel__composer {
  display: grid;
  gap: 8px;
  padding-top: 2px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.chat-superadmin-reply-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-left: 4px solid #2563eb;
  border-radius: 14px;
  background: rgba(37, 99, 235, 0.08);
}

.chat-superadmin-reply-preview div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-superadmin-reply-preview strong,
.chat-superadmin-reply-preview span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-superadmin-reply-preview strong {
  color: var(--vc-text);
  font-size: 0.84rem;
}

.chat-superadmin-reply-preview span {
  color: var(--vc-text-muted);
  font-size: 0.78rem;
}

.chat-superadmin-reply-preview button {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-superadmin-float-panel__textarea .v-field {
  border-radius: 30px;
}

.chat-superadmin-float-panel__textarea .v-field__outline::before,
.chat-superadmin-float-panel__textarea .v-field__outline::after {
  border-radius: 30px;
}

.chat-superadmin-float-panel__textarea textarea {
  min-height: 86px;
}

.chat-superadmin-float-panel__preview-list,
.chat-superadmin-task-dialog__preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.chat-superadmin-float-panel__preview {
  position: relative;
  flex: 0 0 auto;
  width: 84px;
  min-width: 84px;
  padding: 6px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 14px;
  background: rgba(239, 246, 255, 0.88);
}

.chat-superadmin-float-panel__preview img {
  display: block;
  width: 100%;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #fff;
}

.chat-superadmin-float-panel__preview-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.chat-superadmin-float-panel__preview-meta strong,
.chat-superadmin-float-panel__preview-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-superadmin-float-panel__preview-meta strong {
  color: var(--vc-text);
  font-size: 0.86rem;
}

.chat-superadmin-float-panel__preview-meta span {
  color: var(--vc-text-muted);
  font-size: 0.78rem;
}

.chat-superadmin-float-panel__preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.chat-superadmin-float-panel__composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.chat-superadmin-float-panel__composer-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.chat-superadmin-reaction-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.chat-superadmin-reaction-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-superadmin-reaction-picker__head div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.chat-superadmin-reaction-picker__head strong {
  color: var(--vc-text);
  font-size: 0.88rem;
}

.chat-superadmin-reaction-picker__head button {
  border: 0;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-superadmin-reaction-picker__grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.chat-superadmin-reaction-picker__emoji,
.chat-superadmin-reaction-picker__sticker {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: #f8fbff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-superadmin-reaction-picker__emoji:hover,
.chat-superadmin-reaction-picker__sticker:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.chat-superadmin-reaction-picker__emoji {
  height: 34px;
  font-size: 1.18rem;
  line-height: 1;
}

.chat-superadmin-reaction-picker__grid--stickers {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.chat-superadmin-reaction-picker__sticker {
  min-height: 64px;
  display: grid;
  place-items: center;
  gap: 2px;
  padding: 6px 4px;
}

.chat-superadmin-reaction-picker__sticker span {
  font-size: 1.55rem;
  line-height: 1;
}

.chat-superadmin-reaction-picker__sticker img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.chat-superadmin-reaction-picker__sticker small {
  max-width: 100%;
  color: var(--vc-text-muted);
  font-size: 0.66rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-superadmin-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
}

.chat-superadmin-file--hidden {
  display: none;
}

.chat-superadmin-float-panel__attachment-label {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--vc-text-muted);
}

.chat-superadmin-float-panel__taskbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.chat-superadmin-float-panel__taskbar-note {
  font-size: 0.85rem;
  color: var(--vc-text-muted);
}

.chat-superadmin-task-card--wide {
  min-height: 0;
}

.chat-superadmin-panel-eyebrow--wrap {
  display: inline-flex;
  max-width: 100%;
  white-space: normal;
  line-height: 1.15;
}

.chat-superadmin-message__avatar {
  overflow: hidden;
}

.chat-superadmin-message__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-superadmin-launcher {
  position: fixed !important;
  right: 20px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 70px;
  height: 70px;
  min-width: 70px !important;
  padding: 0 !important;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  touch-action: none;
  z-index: 9998;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.chat-superadmin-launcher--dragging {
  cursor: grabbing;
}

.chat-superadmin-launcher .v-btn__content {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
}

.chat-superadmin-launcher__avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.chat-superadmin-launcher__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.chat-superadmin-launcher__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(239,68,68,0.28);
}

.chat-superadmin-shell--floating {
  position: fixed;
  right: 92px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1390;
  width: min(1120px, calc(100vw - 44px));
  max-height: min(84vh, 920px);
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(6px);
}

.chat-superadmin-shell--floating .chat-superadmin-layout {
  grid-template-columns: minmax(0, 1fr);
}

.chat-superadmin-shell--floating .chat-superadmin-side {
  display: none;
}

.chat-superadmin-shell--floating .chat-superadmin-main {
  overflow: hidden;
}

.chat-superadmin-shell--floating .estado-cuenta-card {
  box-shadow: none;
}

.chat-superadmin-shell--floating .chat-superadmin-thread {
  max-height: 38vh;
}

.chat-superadmin-hero__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.chat-superadmin-close {
  margin-top: 4px;
}

.chat-superadmin-presence-strip {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.chat-superadmin-presence-strip__label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.92);
}

.chat-superadmin-presence-strip__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-presence-avatar {
  margin-right: 6px;
  font-size: 0.7rem;
  font-weight: 800;
}

.chat-superadmin-float-enter-active,
.chat-superadmin-float-leave-active {
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.chat-superadmin-float-enter-from,
.chat-superadmin-float-leave-to {
  transform: translateY(14px) scale(0.98);
  opacity: 0;
}

.chat-superadmin-shell {
  gap: 18px;
}

.chat-superadmin-hero {
  padding-bottom: 4px;
}

.chat-superadmin-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.chat-superadmin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.chat-superadmin-main,
.chat-superadmin-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.chat-superadmin-main > .chat-superadmin-card {
  position: relative;
}

.chat-superadmin-side .chat-superadmin-card {
  position: static;
  z-index: 2;
}

.chat-superadmin-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,251,255,0.98) 100%);
}

.chat-superadmin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.chat-superadmin-search {
  display: grid;
  gap: 8px;
}

.chat-superadmin-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.chat-superadmin-composer {
  display: grid;
  gap: 14px;
}

.chat-superadmin-composer-card {
  position: relative;
}

.chat-superadmin-composer-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #60a5fa, #7c3aed);
}

.chat-superadmin-composer__field {
  display: grid;
  gap: 8px;
}

.chat-superadmin-composer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.chat-superadmin-composer__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.chat-superadmin-composer__hint {
  color: var(--vc-text-muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.chat-superadmin-file {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--vc-border-strong);
  border-radius: 14px;
  background: #fff;
}

.chat-superadmin-image-preview {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.chat-superadmin-image-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--vc-border);
  background: #f8fafc;
}

.chat-superadmin-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--vc-text);
}

.chat-superadmin-loading,
.chat-superadmin-empty {
  min-height: 240px;
  display: grid;
  place-items: center;
  color: var(--vc-text-muted);
}

.chat-superadmin-empty--compact {
  min-height: 160px;
}

.chat-superadmin-thread {
  max-height: 64vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 6px;
}

.chat-superadmin-thread-card {
  position: relative;
}

.chat-superadmin-thread-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 4px;
}

.chat-superadmin-thread-header h2 {
  margin: 4px 0 0;
  font-size: 1.18rem;
  color: var(--vc-text);
}

.chat-superadmin-thread-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chat-superadmin-message {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dce8f5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.chat-superadmin-message--mine {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
}

.chat-superadmin-message__avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chat-superadmin-message--mine {
  justify-self: end;
  grid-template-columns: minmax(0, 1fr);
  max-width: 86%;
  width: fit-content;
  background: linear-gradient(180deg, #e7ffeb 0%, #c8f7d1 100%);
  border-color: rgba(22, 163, 74, 0.22);
}

.chat-superadmin-message--mine .chat-superadmin-message__avatar {
  display: none;
}

.chat-superadmin-message--mine .chat-superadmin-message__body {
  align-items: end;
}

.chat-superadmin-message--mine .chat-superadmin-message__header {
  justify-content: flex-end;
}

.chat-superadmin-message--mine .chat-superadmin-message__meta {
  text-align: right;
}

.chat-superadmin-message--mine .chat-superadmin-message__text,
.chat-superadmin-message--mine .chat-superadmin-task-title {
  text-align: right;
}

.chat-superadmin-message--mine .chat-superadmin-message__avatar {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
}

.chat-superadmin-message__body {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.chat-superadmin-message__header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.chat-superadmin-message__meta {
  display: grid;
  gap: 2px;
}

.chat-superadmin-message__meta strong {
  color: var(--vc-text);
}

.chat-superadmin-message__meta span {
  color: var(--vc-text-muted);
  font-size: 0.88rem;
}

.chat-superadmin-message__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-task-title {
  font-weight: 800;
  color: var(--vc-secondary-text);
}

.chat-superadmin-message__text {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.chat-superadmin-image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-image-button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-superadmin-image-button img {
  display: block;
  max-width: 220px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--vc-border);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.chat-superadmin-message__actions {
  display: flex;
  gap: 8px;
}

.chat-superadmin-task-panel {
  display: grid;
  gap: 12px;
  border-left: 4px solid rgba(245, 158, 11, 0.55);
}

.chat-superadmin-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.chat-superadmin-panel-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--vc-primary);
}

.chat-superadmin-panel-header h2 {
  margin: 4px 0 0;
  font-size: 1.3rem;
}

.chat-superadmin-task-list {
  display: grid;
  gap: 12px;
}

.chat-superadmin-task-board__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.chat-superadmin-kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.chat-superadmin-kanban__column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 320px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chat-superadmin-kanban__column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-superadmin-kanban__column-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.chat-superadmin-kanban__column-head small,
.chat-superadmin-kanban__empty {
  color: var(--vc-text-muted);
  font-size: 0.82rem;
}

.chat-superadmin-task-note {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #fff8bf;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  cursor: grab;
}

.chat-superadmin-task-note--en_ejecucion {
  background: #dbeafe;
}

.chat-superadmin-task-note--hecho {
  background: #dcfce7;
}

.chat-superadmin-task-note__top,
.chat-superadmin-task-note__meta,
.chat-superadmin-task-note__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-superadmin-task-note__top {
  align-items: flex-start;
}

.chat-superadmin-task-note__top strong {
  font-size: 0.95rem;
  line-height: 1.25;
}

.chat-superadmin-task-note__detail {
  margin: 0;
  color: var(--vc-text);
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.chat-superadmin-task-note__meta {
  flex-wrap: wrap;
  color: var(--vc-text-muted);
  font-size: 0.78rem;
}

.chat-superadmin-task-note__images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-superadmin-task-note__image-btn {
  border: 0;
  border-radius: 999px;
  padding: 5px 10px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.chat-superadmin-task-table-wrap {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.chat-superadmin-task-table {
  width: 100%;
  border-collapse: collapse;
}

.chat-superadmin-task-table__media,
.chat-superadmin-thread__older {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.chat-superadmin-history-item__images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chat-superadmin-task-table th,
.chat-superadmin-task-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.chat-superadmin-task-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(243, 248, 255, 0.98);
  color: var(--vc-text);
  font-weight: 800;
}

.chat-superadmin-task-table tbody tr:last-child td {
  border-bottom: none;
}

.chat-superadmin-task-table__subtext,
.chat-superadmin-task-table__text {
  display: block;
  margin-top: 4px;
  color: var(--vc-text-muted);
  font-size: 0.85rem;
}

.chat-superadmin-task-table__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-task-table__empty {
  text-align: center;
  color: var(--vc-text-muted);
  padding: 28px 14px;
}

.chat-superadmin-history-list {
  display: grid;
  gap: 12px;
}

.chat-superadmin-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.chat-superadmin-history-item__main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.chat-superadmin-history-item__top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.chat-superadmin-history-item__top h3 {
  margin: 0;
  color: var(--vc-text);
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.chat-superadmin-history-item__meta,
.chat-superadmin-history-item__done {
  color: var(--vc-text-muted);
  font-size: 0.86rem;
}

.chat-superadmin-history-item__meta {
  margin: 4px 0 0;
}

.chat-superadmin-history-item__detail {
  margin: 0;
  color: var(--vc-text);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.chat-superadmin-history-item__done {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.chat-superadmin-history-item__actions {
  display: flex;
  justify-content: flex-end;
}

.chat-superadmin-task-dialog {
  border-radius: 24px;
  overflow: hidden;
  max-height: min(88vh, 760px);
}

.chat-superadmin-task-dialog__body {
  display: grid;
  gap: 14px;
  overflow-y: auto;
}

.chat-superadmin-task-dialog__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.chat-superadmin-task-dialog__upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.chat-superadmin-task-dialog__upload-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--vc-text-muted);
}

.chat-superadmin-task-dialog__paste-hint {
  margin: -4px 0 0;
  color: var(--vc-text-muted);
  font-size: 0.84rem;
}

.chat-superadmin-task-dialog__preview {
  position: relative;
  flex: 0 0 auto;
  width: 96px;
  min-width: 96px;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, 0.12) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, 0.12) 75%),
    #fff;
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.chat-superadmin-task-dialog__preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  border: 0;
  border-radius: 999px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.chat-superadmin-task-dialog__preview img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--vc-border);
  background: rgba(255, 255, 255, 0.92);
}


.chat-superadmin-task-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #dbe7f3;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
  position: relative;
  overflow: hidden;
}

.chat-superadmin-task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #f59e0b, #f97316);
}

.chat-superadmin-task-card__header {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.chat-superadmin-task-card__title-wrap {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.chat-superadmin-task-card__header strong {
  color: var(--vc-text);
  line-height: 1.35;
}

.chat-superadmin-task-card__subtitle {
  font-size: 0.86rem;
  color: var(--vc-text-muted);
}

.chat-superadmin-task-card p {
  margin: 0;
  color: var(--vc-text-muted);
  line-height: 1.45;
}

.chat-superadmin-task-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--vc-text-muted);
  font-size: 0.86rem;
}

.chat-superadmin-task-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-superadmin-task-card__actions .v-btn {
  border-radius: 12px;
}

.chat-superadmin-image-dialog__img {
  min-height: 300px;
  max-height: 70vh;
  background: #f8fafc;
}

@media (max-width: 1180px) {
  .chat-superadmin-dashboard {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-float-panel {
    width: calc(100vw - 24px);
    right: 12px;
    top: auto;
    bottom: 72px;
    transform: none;
    height: min(76vh, 720px);
  }

  .chat-superadmin-shell--floating {
    width: calc(100vw - 24px);
    right: 12px;
    top: 78px;
    bottom: auto;
    transform: none;
  }

  .chat-superadmin-layout {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-toolbar,
  .chat-superadmin-composer__grid {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-toolbar__actions {
    justify-content: flex-start;
  }

  .chat-superadmin-side .chat-superadmin-card {
    position: static;
  }
}

.chat-superadmin-global-host,
.chat-superadmin-global-host .v-application,
.chat-superadmin-global-host .v-application__wrap,
.chat-superadmin-global-host .chat-superadmin-page--floating-only {
  display: contents;
  min-height: 0;
}

.chat-superadmin-page:not(.chat-superadmin-page--floating-only) .chat-superadmin-launcher {
  top: auto;
  bottom: 126px;
  transform: none;
}

.v-overlay:has(.chat-superadmin-task-dialog),
.v-overlay:has(.chat-superadmin-image-dialog) {
  z-index: 10050 !important;
}

@media (max-width: 720px) {
  .chat-superadmin-launcher {
    right: 12px;
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .chat-superadmin-float-panel {
    width: calc(100vw - 16px);
    right: 8px;
    top: 72px;
    bottom: 74px;
    height: auto;
    max-height: calc(100dvh - 148px);
    border-radius: 18px;
    z-index: 9990;
  }

  .chat-superadmin-task-dialog {
    max-height: calc(100dvh - 28px);
    border-radius: 18px;
  }

  .chat-superadmin-task-dialog__body {
    max-height: calc(100dvh - 160px);
  }

  .chat-superadmin-task-dialog__grid {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-float-panel__composer-row,
  .chat-superadmin-float-panel__taskbar {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-kanban {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-float-panel__composer-tools {
    justify-content: flex-start;
  }

  .chat-superadmin-reaction-picker__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .chat-superadmin-reaction-picker__grid--stickers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-superadmin-history-item {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-history-item__top {
    flex-direction: column;
  }

  .chat-superadmin-history-item__actions {
    justify-content: flex-start;
  }

  .chat-superadmin-float-panel__preview {
    width: 72px;
    min-width: 72px;
  }

  .chat-superadmin-float-panel__preview img {
    height: 52px;
  }

  .chat-superadmin-float-panel__preview-remove {
    width: 18px;
    height: 18px;
    font-size: 0.82rem;
  }

  .chat-superadmin-float-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-superadmin-float-panel__actions {
    align-self: flex-end;
  }

  .chat-superadmin-launcher {
    right: 12px;
    top: auto;
    bottom: 12px;
    transform: none;
  }

  .chat-superadmin-shell--floating {
    width: calc(100vw - 16px);
    right: 8px;
    top: 68px;
    bottom: auto;
    max-height: calc(100vh - 96px);
  }

  .chat-superadmin-message {
    grid-template-columns: 1fr;
  }

  .chat-superadmin-message__avatar {
    width: 36px;
    height: 36px;
  }

  .chat-superadmin-message--mine {
    max-width: 92%;
  }

  .chat-superadmin-message__header {
    flex-direction: column;
  }

  .chat-superadmin-composer__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-superadmin-thread-header {
    flex-direction: column;
  }
}

/* =====================================================
   RESPONSIVE SYSTEM-WIDE UTILITIES
===================================================== */

.vc-vue-toolbar-card .v-card-text,
.vc-vue-table-card .v-card-text {
  min-width: 0;
}

body:not(.login-page) .layout,
body:not(.login-page) .main-wrapper,
body:not(.login-page) .content {
  min-width: 0;
}

.topbar-brand,
.topbar-system,
.topbar-actions,
.topbar-control-summary {
  min-width: 0;
}

.vc-vue-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vc-vue-toolbar__search,
.vc-vue-toolbar__actions,
.vc-vue-toolbar > .v-btn {
  min-width: 0;
}

.vc-vue-table-wrap,
.table-wrapper,
.transaccion-list-table-wrap,
.factura-list-table-wrap,
.retencion-table-wrapper,
.cxc-table-wrap,
.cxp-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.vc-vue-table-wrap > .v-table,
.vc-vue-table-wrap > table,
.table-wrapper > table,
.transaccion-list-table-wrap > table,
.factura-list-table-wrap > table,
.retencion-table-wrapper > table,
.cxc-table-wrap > table,
.cxp-table-wrap > table {
  width: 100%;
  min-width: 100%;
}

.vc-vue-table-wrap > .v-table {
  overflow: visible;
}

.vc-vue-table-wrap > .v-table > .v-table__wrapper,
.vc-vue-table-wrap > .v-table > .v-table__wrapper > table {
  width: max-content;
  min-width: 100%;
}

.vc-vue-table-wrap > .v-table > .v-table__wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}

.v-tabs,
.param-tabs,
.dashboard-modules-tabs,
.document-control-tabs,
.po-module-tabs-wrap,
.po-section-tabs-wrap {
  max-width: 100%;
}

.v-tabs .v-slide-group__content,
.param-tabs .v-slide-group__content,
.dashboard-modules-tabs .v-slide-group__content,
.document-control-tabs .v-slide-group__content {
  min-width: max-content;
}

.v-tabs .v-tab,
.param-tab-btn,
.dashboard-modules-tabs .v-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.vc-vue-table {
  width: 100%;
  min-width: 100%;
}

.vc-vue-table td,
.vc-vue-table th {
  white-space: nowrap;
}

.vc-vue-table td.vc-vue-table__name,
.vc-vue-table th.vc-vue-table__name {
  white-space: normal;
}

.vc-vue-table th.actions-column,
.vc-vue-table td.actions-column,
.vc-vue-table th.vc-actions-column,
.vc-vue-table td.vc-actions-column {
  min-width: 150px;
  width: 150px;
  white-space: nowrap;
  text-align: center;
}

@media (max-width: 1199px) {
  :root {
    --vc-topbar-height: 132px;
  }

  body:not(.login-page) .topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 12px;
    padding: 10px 12px 12px;
    min-height: 0;
  }

  .topbar-brand {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    padding-inline: 44px;
  }

  .topbar-system {
    width: 100%;
    max-width: 820px;
    order: -1;
  }

  .topbar-system-line {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.14;
  }

  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 8px 10px;
  }

  .topbar-control-summary {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    gap: 8px;
  }

  .topbar-control-pill {
    flex: 0 1 clamp(92px, 16vw, 132px);
    min-width: 92px;
    max-width: 132px;
  }

  .topbar-notifications,
  .topbar-user,
  .topbar-maintenance-indicator,
  .topbar-payment-notification,
  .topbar-survey-notification {
    margin-inline: auto;
  }

  .topbar-user {
    display: flex;
    justify-content: center;
  }

  .mobile-sidebar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  body:not(.login-page) .content > .table-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  body:not(.login-page) .content > .table-header .search-container {
    flex: 1 1 100%;
  }

  body:not(.login-page) .content > .table-header .search-container input {
    width: 100%;
    max-width: none;
  }

  .vc-vue-toolbar-card .v-card-text,
  .vc-vue-table-card .v-card-text {
    padding: 12px;
  }

  .vc-vue-toolbar {
    gap: 12px;
  }

  .vc-vue-toolbar__search {
    order: 99;
    flex: 1 1 100%;
    max-width: none;
    margin-inline-start: 0;
  }

  .vc-vue-toolbar__actions {
    flex: 1 1 auto;
  }

  .vc-vue-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vc-vue-form-grid--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .vc-vue-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero,
  .dashboard-license-overview,
  .dashboard-sri-wrap {
    grid-template-columns: 1fr;
  }

  .dashboard-hero {
    gap: 14px;
  }

  .dashboard-panel-head,
  .dashboard-license-status-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-license-overview-copy,
  .dashboard-license-summary-card {
    padding: 16px;
  }

  .dashboard-panel-head h3 {
    font-size: clamp(20px, 2.6vw, 24px);
    line-height: 1.12;
  }
}

@media (max-width: 991px) {
  body:not(.login-page) .content > .table-wrapper,
  body:not(.login-page) .content > table,
  .vc-vue-table-wrap,
  .table-wrapper,
  .transaccion-list-table-wrap,
  .factura-list-table-wrap,
  .retencion-table-wrapper {
    overflow-x: auto;
  }

  .vc-vue-table-card .v-card-text {
    padding: 12px 10px;
  }

  .vc-vue-table,
  body:not(.login-page) .content > .table-wrapper > table,
  body:not(.login-page) .content > table {
    min-width: 760px;
  }

  .vc-vue-table-wrap > .v-table {
    min-width: 760px;
    overflow: visible;
  }

  .vc-vue-table-wrap > .v-table > .v-table__wrapper,
  .vc-vue-table-wrap > .v-table > .v-table__wrapper > table {
    width: max-content;
    min-width: 760px;
  }

  .vc-vue-table__actions {
    flex-wrap: nowrap;
  }

  body:not(.login-page) .content > .pagination-container .pagination {
    flex-wrap: wrap;
    gap: 8px;
  }

  body:not(.login-page) .content > .pagination-container .page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }

  body:not(.login-page) .content > .pagination-container .page-summary,
  body:not(.login-page) .content > .pagination-container .page-info {
    white-space: nowrap;
  }

  .vc-vue-form-grid--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  body:not(.login-page) .topbar {
    gap: 8px;
  }

  .topbar-brand {
    width: 100%;
  }

  .topbar-system {
    order: -1;
    text-align: center;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-control-summary {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .topbar-control-summary::-webkit-scrollbar {
    display: none;
  }

  .topbar-control-pill {
    flex: 0 0 104px;
    min-width: 104px;
    max-width: 104px;
  }

  body:not(.login-page) .content > .table-header {
    padding: 12px;
  }

  body:not(.login-page) .content > .table-header .search-container,
  body:not(.login-page) .content > .table-header .search-container input {
    width: 100%;
    max-width: none;
  }

  .vc-vue-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .vc-vue-toolbar > .v-btn,
  .vc-vue-toolbar > .vc-vue-toolbar__actions,
  .vc-vue-toolbar__search {
    width: 100%;
    max-width: none;
    margin-inline-start: 0;
  }

  .vc-vue-toolbar .v-btn,
  .vc-vue-toolbar__create-btn.v-btn {
    width: 100%;
    justify-content: center;
  }

  .vc-vue-form-grid,
  .vc-vue-form-grid--6,
  .vc-vue-form-grid--two,
  .vc-vue-form-stack {
    grid-template-columns: 1fr;
  }

  .vc-vue-form-field--span-2,
  .vc-vue-form-field--span-3,
  .vc-vue-form-field--span-4 {
    grid-column: auto;
  }

  .vc-vue-table-card .v-card-text {
    padding: 10px;
  }

  .vc-vue-table,
  body:not(.login-page) .content > .table-wrapper > table,
  body:not(.login-page) .content > table {
    min-width: 720px;
  }

  .vc-vue-table-wrap > .v-table {
    min-width: 720px;
    overflow: visible;
  }

  .vc-vue-table-wrap > .v-table > .v-table__wrapper,
  .vc-vue-table-wrap > .v-table > .v-table__wrapper > table {
    width: max-content;
    min-width: 720px;
  }

  body:not(.login-page) .content > .pagination-container .pagination {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    --vc-topbar-height: 128px;
  }

  body:not(.login-page) .topbar {
    padding: 7px 8px 9px;
    gap: 5px;
  }

  .topbar-brand {
    padding-inline: 34px;
  }

  .topbar-logo {
    font-size: 1.02rem;
  }

  .topbar-system {
    max-width: 100%;
  }

  .topbar-system-line {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    line-height: 1.12;
  }

  .topbar-system-line-primary {
    font-size: 8px;
  }

  .topbar-system-line-secondary {
    display: none;
  }

  .topbar-control-summary {
    width: auto;
    flex: 1 1 auto;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .topbar-control-pill {
    min-width: 84px;
    max-width: 88px;
    padding: 5px 8px 5px 10px;
  }

  .topbar-user-toggle {
    padding: 5px 7px;
  }

  .vc-vue-table,
  body:not(.login-page) .content > .table-wrapper > table,
  body:not(.login-page) .content > table {
    min-width: 680px;
  }

  .vc-vue-table-wrap > .v-table {
    min-width: 680px;
    overflow: visible;
  }

  .vc-vue-table-wrap > .v-table > .v-table__wrapper,
  .vc-vue-table-wrap > .v-table > .v-table__wrapper > table {
    width: max-content;
    min-width: 680px;
  }
}

.proforma-page--factura-venta .proforma-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table {
  width: 1920px;
  min-width: 1920px;
  table-layout: fixed;
  border-collapse: collapse;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-fecha,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-fecha {
  width: 116px;
  min-width: 116px;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-serie,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-serie {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-numero,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-numero {
  width: 180px;
  min-width: 180px;
  max-width: 180px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-serie .proforma-col-numero__main,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-numero .proforma-col-numero__main,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-serie .factura-serie-plain,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-numero .factura-numero-plain {
  display: inline-block;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.15;
  letter-spacing: normal;
  transform: none;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-cliente,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-cliente {
  width: 280px;
  min-width: 280px;
  max-width: 320px;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-neto,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-neto,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-devol,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-devol,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-abono,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-abono,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-retencion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-retencion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-pagar,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-pagar,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-sri,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-sri,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-conversion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-conversion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-estado,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-estado,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-acciones,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-acciones {
  white-space: nowrap;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-neto,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-neto,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-devol,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-devol,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-abono,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-abono,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-pagar,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-pagar {
  width: 120px;
  min-width: 120px;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-table__retencion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-table__retencion {
  width: 260px;
  min-width: 260px;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-table__sri,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-table__sri {
  width: 100px;
  min-width: 100px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-conversion,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-conversion {
  width: 120px;
  min-width: 120px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-table__status-col,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-table__status-col,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-estado,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-estado {
  width: 128px;
  min-width: 128px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-table__actions-col,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-table__actions-col,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table th.proforma-col-acciones,
.proforma-page--factura-venta .proforma-table-wrap table.proforma-table td.proforma-col-acciones {
  width: 150px;
  min-width: 150px;
  text-align: center;
}

.proforma-page--factura-venta .proforma-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.proforma-page--factura-venta .proforma-actions .v-btn {
  width: 28px;
  min-width: 28px;
  height: 28px;
}

.proforma-page--factura-venta .proforma-retencion-cell {
  min-width: 0;
  white-space: nowrap;
}

/* =====================================================
   FINAL MOBILE TOPBAR OVERRIDE
   Keeps the header centered and consistent across narrow screens.
===================================================== */

@media (max-width: 767px) {
  :root {
    --vc-topbar-height: 152px;
  }

  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body:not(.login-page) .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 12px;
    min-height: 0;
  }

  body:not(.login-page) {
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body:not(.login-page) .content {
    height: calc(100dvh - var(--vc-topbar-height));
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  .topbar-brand {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    padding-inline: 0;
    margin-bottom: 0;
    min-height: 42px;
  }

  .topbar-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: max-content;
    max-width: calc(100% - 96px);
    text-align: center;
    white-space: nowrap;
    font-size: clamp(1.08rem, 4.2vw, 1.45rem);
    line-height: 1;
  }

  .mobile-sidebar-toggle {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .topbar-system {
    order: -1;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
    text-align: center;
    align-items: center;
    gap: 2px;
    pointer-events: auto;
  }

  .topbar-system-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.12;
  }

  .topbar-system-line-primary {
    font-size: 10px;
  }

  .topbar-system-line-secondary {
    font-size: 8px;
  }

  .topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
  }

  .topbar-control-summary {
    width: 100%;
    max-width: 620px;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow: visible;
    gap: 8px;
    padding-bottom: 0;
  }

  .topbar-control-pill {
    flex: 1 1 96px;
    min-width: 92px;
    max-width: 128px;
  }

  .topbar-notifications,
  .topbar-user,
  .topbar-maintenance-indicator,
  .topbar-payment-notification,
  .topbar-survey-notification {
    margin-inline: auto;
  }

  .topbar-user {
    width: auto;
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
  }

  body:not(.login-page) .layout {
    display: flex;
    height: calc(100dvh - var(--vc-topbar-height));
    overflow: hidden;
  }

  body:not(.login-page) .main-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body[data-page="select_sistema"] {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  body[data-page="select_sistema"] .layout,
  body[data-page="select_sistema"] .main-wrapper {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  body[data-page="select_sistema"] .content {
    height: auto;
    min-height: calc(100dvh - var(--vc-topbar-height));
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }

  body[data-page="select_sistema"] .vc-select-system-page {
    min-height: calc(100dvh - var(--vc-topbar-height));
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    overflow-y: auto;
  }
}

/* ── ProformaListApp (Vue): tabla compacta + fix zoom ─────────────────── */
/* Todo este bloque va con prefijo .proforma-page: usa clases genericas
   (.proforma-table-wrap, .proforma-table) que otros componentes con
   <table> plano (Log SRI, Repositorio tributario) tambien reutilizan.
   Sin el prefijo, el overflow-x:hidden del wrapper externo se aplicaba a
   esos componentes tambien pero ellos no tienen el .v-table__wrapper
   interno de Vuetify que da el scroll de reemplazo, dejando columnas
   como "Acciones" cortadas sin forma de verlas. */

/* Wrapper externo: sin scroll propio (evita doble scrollbar) */
.proforma-page .proforma-table-wrap {
  width: 100%;
  overflow-x: hidden;
}

/* Solo el wrapper interno de Vuetify hace scroll — UN SOLO scrollbar */
.proforma-page .proforma-table .v-table__wrapper {
  overflow-x: auto !important;
}

/* Ancho mínimo en la tabla interna */
.proforma-page .proforma-table .v-table__wrapper > table,
.proforma-page .proforma-table table {
  min-width: 900px;
}

/* Compactar headers Vuetify */
.proforma-page .proforma-table thead th {
  font-size: 11px !important;
  padding: 5px 8px !important;
  white-space: nowrap !important;
  font-weight: 600;
  height: auto !important;
}

/* Compactar celdas Vuetify */
.proforma-page .proforma-table tbody td {
  font-size: 12px !important;
  padding: 4px 8px !important;
  white-space: nowrap !important;
  height: auto !important;
}

/* Ancho mínimo por columna */
.proforma-page .proforma-col-fecha   { min-width: 82px;  white-space: nowrap !important; }
.proforma-page .proforma-col-serie   { min-width: 76px;  white-space: nowrap !important; }
.proforma-page .proforma-col-numero  { min-width: 86px !important; white-space: nowrap !important; }
.proforma-page .proforma-table thead th.proforma-col-numero { min-width: 86px !important; white-space: nowrap !important; }
.proforma-page .proforma-col-cliente { min-width: 130px; max-width: 155px; overflow: hidden; }
.proforma-page .proforma-col-cliente div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.proforma-page .proforma-col-neto,
.proforma-page .proforma-col-devol,
.proforma-page .proforma-col-abono,
.proforma-page .proforma-col-pagar   { min-width: 60px;  white-space: nowrap !important; }
.proforma-page .proforma-col-retencion { min-width: 90px; }
.proforma-page .proforma-col-sri     { min-width: 54px;  white-space: nowrap !important; }
.proforma-page .proforma-col-estado  { min-width: 60px;  white-space: nowrap !important; }
.proforma-page .proforma-col-acciones { min-width: 84px; white-space: nowrap !important; }
/* ──────────────────────────────────────────────────────────────────────── */

/* =====================================================
   VUE SIDEBAR SHELL V2
   Modern drawer layer. Kept as a final override so older
   sidebar rules can remain while Vue owns the behavior.
===================================================== */
:root {
  --vc-sidebar-v2-width: 254px;
  --vc-sidebar-v2-bg: #28374d;
  --vc-sidebar-v2-bg-deep: #202d41;
  --vc-sidebar-v2-ink: #eef6ff;
  --vc-sidebar-v2-muted: rgba(226, 237, 255, 0.72);
  --vc-sidebar-v2-line: rgba(157, 179, 210, 0.18);
  --vc-sidebar-v2-accent: #4d7cff;
  --vc-sidebar-v2-cyan: #22d3ee;
}

body:not(.login-page) .sidebar {
  width: var(--vc-sidebar-v2-width);
  padding: 14px 10px 12px;
  gap: 10px;
  background:
    radial-gradient(circle at 18% 8%, rgba(67, 126, 255, 0.24), transparent 30%),
    linear-gradient(180deg, var(--vc-sidebar-v2-bg) 0%, var(--vc-sidebar-v2-bg-deep) 100%);
  border-right: 1px solid rgba(226, 237, 255, 0.12);
  box-shadow: 18px 0 42px rgba(12, 20, 35, 0.28);
  transition: width 0.22s ease, padding 0.22s ease, opacity 0.18s ease, box-shadow 0.22s ease, border 0.22s ease;
}

.sidebar-brand-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0 2px 4px;
  padding: 8px 10px;
  border-radius: 18px;
  color: var(--vc-sidebar-v2-ink);
}

.sidebar-brand-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 16px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    url("/static/images/logo_vc.597ec95e6b10.png") center / contain no-repeat,
    rgba(219, 234, 254, 0.08);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.32);
  overflow: hidden;
}

.sidebar-brand-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-brand-copy strong {
  color: #d8e6ff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-brand-copy small {
  max-width: 170px;
  overflow: hidden;
  color: rgba(219, 234, 254, 0.66);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-profile-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 2px 8px;
  padding: 12px;
  border: 1px solid rgba(226, 237, 255, 0.12);
  border-radius: 20px;
  background: rgba(15, 25, 42, 0.28);
  color: var(--vc-sidebar-v2-ink);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-profile-card:hover {
  background: rgba(15, 25, 42, 0.38);
  transform: none;
}

.sidebar-profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  background: linear-gradient(135deg, #dbeafe, #93c5fd);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.sidebar-profile-avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-profile-avatar-initials {
  color: #1e3a8a;
  font-size: 18px;
  font-weight: 900;
}

.sidebar-profile-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sidebar-profile-copy strong {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-profile-copy small {
  color: #dbeafe;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
}

body:not(.login-page) .sidebar-menu {
  flex: 1 1 auto;
  margin: 0;
  padding: 4px 2px 92px;
  overflow-x: hidden;
  overflow-y: auto;
}

body:not(.login-page) .sidebar-menu > li {
  margin: 2px 0;
}

.sidebar-module-heading {
  margin-top: 8px !important;
}

.sidebar-module-group-title,
.sidebar-mobile-section-title {
  color: #bcd2f5;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:not(.login-page) .sidebar-menu > li > a,
body:not(.login-page) .submenu-toggle,
body:not(.login-page) .sidebar-module-card-link,
body:not(.login-page) .sidebar-module-link {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #e5eefc;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

body:not(.login-page) .sidebar-menu > li > a > span:first-child,
body:not(.login-page) .submenu-toggle > span:first-child,
body:not(.login-page) .sidebar-module-link > span:first-child,
body:not(.login-page) .sidebar-module-card-icon {
  width: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

body:not(.login-page) .sidebar-menu > li > a:hover,
body:not(.login-page) .submenu-toggle:hover,
body:not(.login-page) .sidebar-module-card-link:hover,
body:not(.login-page) .sidebar-module-link:hover {
  background: rgba(236, 248, 255, 0.08) !important;
  border-color: rgba(219, 234, 254, 0.14);
  color: #ffffff;
  transform: translateX(2px);
}

body:not(.login-page) .sidebar-menu > li > a.active,
body:not(.login-page) .sidebar-module-card-link.active,
body:not(.login-page) .sidebar-module-link.active,
body:not(.login-page) .sidebar-submenu a.active {
  background:
    linear-gradient(90deg, rgba(77, 124, 255, 0.34), rgba(34, 211, 238, 0.12)) !important;
  border-color: rgba(125, 191, 255, 0.42);
  color: #ffffff;
  box-shadow:
    inset 4px 0 0 rgba(34, 211, 238, 0.95),
    0 10px 22px rgba(16, 24, 40, 0.2);
}

.submenu-toggle {
  justify-content: flex-start;
}

.submenu-toggle::after {
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-color: rgba(238, 246, 255, 0.78);
}

.has-submenu.open > .submenu-toggle {
  background: rgba(236, 248, 255, 0.09) !important;
  border-color: rgba(219, 234, 254, 0.16);
}

.sidebar-submenu {
  margin: 4px 0 0;
  padding-left: 0;
  gap: 3px;
}

.sidebar-submenu-entry {
  margin-left: 12px;
}

body:not(.login-page) .sidebar-submenu a,
body:not(.login-page) .sidebar-module-link {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-height: 34px;
  padding: 7px 8px;
  color: rgba(226, 237, 255, 0.78);
  font-size: 11px;
  font-weight: 700;
}

body:not(.login-page) .sidebar-submenu a::before {
  display: none;
}

body:not(.login-page) .sidebar-module-link > span:first-child,
body:not(.login-page) .sidebar-submenu a > span:first-child {
  flex-shrink: 0;
  margin-top: 1px;
}

body:not(.login-page) .sidebar-module-link > span:last-child {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.sidebar-module-card {
  margin-left: 0;
  padding: 0;
  border-radius: 14px;
}

.sidebar-module-card:hover {
  background: transparent;
  border-color: transparent;
}

.sidebar-module-card-name {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-module-action-btn {
  width: 30px;
  min-height: 34px;
  border-radius: 12px;
  color: rgba(219, 234, 254, 0.68);
}

.sidebar-module-action-btn:hover,
.sidebar-module-action-btn.is-pinned {
  background: rgba(219, 234, 254, 0.08);
  color: #bfdbfe;
}

.sidebar-context-card {
  margin: 0 2px 8px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(29, 45, 70, 0.78), rgba(19, 31, 51, 0.72));
  border-color: rgba(219, 234, 254, 0.14);
}

.sidebar-context-summary {
  min-height: 50px;
  padding: 12px;
}

.sidebar-context-summary-kicker {
  color: #bcd2f5;
}

.sidebar-context-summary-current {
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
}

.sidebar-user-footer {
  display: flex;
}

.sidebar-backdrop {
  background: rgba(8, 14, 25, 0.58);
  backdrop-filter: blur(8px);
}

body:not(.login-page).sidebar-desktop-collapsed .sidebar {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: none !important;
}

@media (max-width: 1180px) {
  :root {
    --vc-sidebar-v2-mobile-width: min(78vw, 252px);
  }

  body:not(.login-page) .sidebar {
    width: var(--vc-sidebar-v2-mobile-width);
    padding: 0 12px 14px;
    border-radius: 0 28px 28px 0;
    background:
      radial-gradient(circle at 16% 2%, rgba(77, 124, 255, 0.3), transparent 28%),
      linear-gradient(180deg, #2d3d55 0%, #202d41 100%);
    box-shadow: 26px 0 56px rgba(2, 6, 23, 0.42);
  }

  .sidebar-mobile-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    margin: 0 -12px 12px;
    padding: 14px 14px 12px;
    background:
      linear-gradient(135deg, rgba(45, 61, 85, 0.98), rgba(35, 48, 69, 0.96));
    border-bottom: 1px solid rgba(226, 237, 255, 0.12);
  }

  .sidebar-mobile-brand {
    justify-items: start;
    text-align: left;
  }

  .sidebar-mobile-brand-title {
    font-size: 17px;
    letter-spacing: 0.01em;
  }

  .sidebar-mobile-close {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 26px;
  }

  .sidebar-brand-panel {
    display: none;
  }

  .sidebar-profile-card {
    margin: 0 0 10px;
    padding: 12px;
    border-radius: 22px;
  }

  .sidebar-profile-avatar {
    width: 54px;
    height: 54px;
  }

  .sidebar-context-card {
    margin: 0 0 12px;
  }

  .sidebar-context-summary {
    justify-content: space-between;
    text-align: left;
    min-height: 56px;
  }

  .sidebar-context-fields {
    gap: 10px;
    padding: 0 10px 12px;
  }

  .sidebar-context-fields .sidebar-system-select,
  .sidebar-context-fields .select2-container--default .select2-selection--single {
    min-height: 48px !important;
    border-radius: 14px !important;
  }

  .sidebar-mobile-section-title {
    display: block;
    margin: 2px 0 8px;
    padding: 0 4px;
    text-align: left;
  }

  body:not(.login-page) .sidebar-menu {
    margin: 0;
    padding: 0 0 calc(26px + env(safe-area-inset-bottom));
  }

  body:not(.login-page) .sidebar-menu > li > a,
  body:not(.login-page) .submenu-toggle,
  body:not(.login-page) .sidebar-module-card-link,
  body:not(.login-page) .sidebar-module-link {
    min-height: 48px;
    padding: 12px 13px;
    border-radius: 16px;
    font-size: 14px;
  }

  body:not(.login-page) .sidebar-submenu a,
  body:not(.login-page) .sidebar-module-link {
    min-height: 44px;
    font-size: 13px;
  }

  .sidebar-submenu-entry {
    margin-left: 8px;
  }

  .sidebar-module-action-btn {
    width: 38px;
    min-height: 42px;
  }

  .mobile-sidebar-toggle {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
  }
}

@media (max-width: 420px) {
  body:not(.login-page) .sidebar {
    width: calc(100vw - 18px);
    border-radius: 0 24px 24px 0;
  }

  .sidebar-profile-copy strong {
    font-size: 12px;
  }
}

.topbar-logo {
  order: 1;
}

.mobile-sidebar-toggle {
  order: 2;
  width: 42px;
  height: 42px;
  margin-left: 2px;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mobile-sidebar-toggle[aria-expanded="true"],
.mobile-sidebar-toggle[aria-expanded="false"],
.mobile-sidebar-toggle:hover {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.mobile-sidebar-toggle::before {
  width: 18px;
  background: #2f6bff;
  box-shadow: 0 5px 0 #2f6bff, 0 10px 0 #2f6bff;
}

.mobile-sidebar-toggle[aria-expanded="true"]::before,
.mobile-sidebar-toggle[aria-expanded="false"]::before {
  background: #2f6bff;
  box-shadow: 0 5px 0 #2f6bff, 0 10px 0 #2f6bff;
}

@media (max-width: 1180px) {
  .topbar-brand {
    grid-template-columns: minmax(0, 1fr) 46px;
    grid-template-areas: "logo toggle";
  }

  .topbar-logo {
    grid-area: logo;
    justify-self: start;
  }

  .mobile-sidebar-toggle {
    grid-area: toggle;
    justify-self: end;
    margin-left: 0;
  }
}

/* ── Tablas compactas: resto de transacciones ───────────────────────────── */
.compras-sri-table thead th,
.ventas-sri-table thead th,
.cxc-table thead th,
.cxp-table thead th,
.egm-table thead th {
  font-size: 11px !important;
  padding: 5px 8px !important;
  white-space: nowrap !important;
  font-weight: 600;
}

.compras-sri-table tbody td,
.ventas-sri-table tbody td,
.cxc-table tbody td,
.cxp-table tbody td,
.egm-table tbody td {
  font-size: 12px !important;
  padding: 3px 8px !important;
}

.compras-sri-table-wrap,
.ventas-sri-table-wrap,
.cxc-table-wrap,
.cxp-table-wrap,
.egm-table-wrap {
  overflow-x: auto;
  width: 100%;
}

/* Sidebar cerrado: oculta completamente al dar clic en el hamburguer. */
/* ──────────────────────────────────────────────────────────────────────── */

/* ── Guia de Remision: scroll horizontal real en movil ─────────────────── */
.guia-table-wrap.vc-vue-table-wrap {
  overflow-x: auto !important;
}

.guia-table-wrap.vc-vue-table-wrap > .v-table {
  overflow: visible !important;
}

.guia-table-wrap.vc-vue-table-wrap > .v-table > .v-table__wrapper {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.guia-table-wrap .proforma-table th,
.guia-table-wrap .proforma-table td {
  white-space: nowrap !important;
}

/* El ancho fijo (para forzar scroll horizontal) solo debe aplicar en
   pantallas angostas -- en laptop/escritorio la tabla debe estirarse para
   llenar el ancho disponible como el resto de tablas del sistema
   (width: max-content; min-width: 100%, heredado de .vc-vue-table-wrap). */
@media (max-width: 900px) {
  .guia-table-wrap.vc-vue-table-wrap > .v-table > .v-table__wrapper > table,
  .guia-table-wrap .proforma-table {
    width: 1080px !important;
    min-width: 1080px !important;
    table-layout: auto !important;
  }
}

@media (max-width: 767px) {
  .guia-table-wrap.vc-vue-table-wrap > .v-table > .v-table__wrapper > table,
  .guia-table-wrap .proforma-table {
    width: 960px !important;
    min-width: 960px !important;
  }
}
/* ──────────────────────────────────────────────────────────────────────── */

/* Let the main module shells use the whole content width instead of staying
   capped in a centered column. */
body:not(.login-page) .vc-vue-shell,
body:not(.login-page) .proforma-shell,
body:not(.login-page) .cxc-shell,
body:not(.login-page) .cxp-shell,
body:not(.login-page) .compras-sri-shell,
body:not(.login-page) .profile-shell,
body:not(.login-page) .guia-shell,
body:not(.login-page) .estado-cuenta-shell,
body:not(.login-page) .db-backup-shell,
body:not(.login-page) .chat-superadmin-page-shell,
body:not(.login-page) .chat-superadmin-dashboard {
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
}

/* Log SRI y repositorio tributario usan tablas HTML, no el wrapper interno
   de Vuetify. Mantener el contenido largo dentro de su columna y conservar
   el acceso horizontal en los anchos donde la tabla no puede comprimirse. */
.sri-log-vue-page .sri-log-table-wrap,
.tributary-repo-page .tributary-repo-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.sri-log-vue-page .sri-log-vue-table tbody td:nth-child(6),
.sri-log-vue-page .sri-log-vue-table tbody td:nth-child(7),
.sri-log-vue-page .sri-log-code,
.sri-log-vue-page .sri-log-message-btn,
.tributary-repo-page .tributary-repo-table tbody td:nth-child(1),
.tributary-repo-page .tributary-repo-table tbody td:nth-child(3),
.tributary-repo-page .tributary-repo-document,
.tributary-repo-page .tributary-repo-meta {
  min-inline-size: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal !important;
}

.tributary-repo-page .tributary-repo-table th.vc-actions-column,
.tributary-repo-page .tributary-repo-table td.vc-actions-column {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px;
}
