html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #f2f5f8;
  color: #17212b;
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

body,
body.theme-defecto {
  --portal-primary: #0f4c64;
  --portal-primary-strong: #0b3a4d;
  --portal-primary-muted: #176f8d;
  --portal-accent: #0d6efd;
  --portal-soft: #e8f3f7;
  --portal-border: #cfe2eb;
  --portal-focus: #1e78b7;
  --portal-text-on-primary: #ffffff;
}

body.theme-azul {
  --portal-primary: #174ea6;
  --portal-primary-strong: #123f86;
  --portal-primary-muted: #2563eb;
  --portal-accent: #2563eb;
  --portal-soft: #eaf1ff;
  --portal-border: #bfdbfe;
  --portal-focus: #3b82f6;
}

body.theme-verde {
  --portal-primary: #166534;
  --portal-primary-strong: #14532d;
  --portal-primary-muted: #198754;
  --portal-accent: #198754;
  --portal-soft: #e9f7ef;
  --portal-border: #bfe6cf;
  --portal-focus: #22c55e;
}

body.theme-rojo {
  --portal-primary: #991b1b;
  --portal-primary-strong: #7f1d1d;
  --portal-primary-muted: #dc3545;
  --portal-accent: #dc3545;
  --portal-soft: #fff0f1;
  --portal-border: #f5c2c7;
  --portal-focus: #ef4444;
}

body.theme-amarillo {
  --portal-primary: #7a5600;
  --portal-primary-strong: #624400;
  --portal-primary-muted: #b98000;
  --portal-accent: #d99700;
  --portal-soft: #fff8e1;
  --portal-border: #ffe08a;
  --portal-focus: #d99700;
}

body.theme-morado {
  --portal-primary: #5b21b6;
  --portal-primary-strong: #4c1d95;
  --portal-primary-muted: #7c3aed;
  --portal-accent: #7c3aed;
  --portal-soft: #f3edff;
  --portal-border: #d8c8ff;
  --portal-focus: #8b5cf6;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.22rem #1e78b7;
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.22rem var(--portal-focus);
}

.validated-field {
  position: relative;
}

.validated-field .form-control {
  padding-right: 2.75rem;
}

.validated-field .form-control.is-valid,
.validated-field .form-control.is-invalid {
  background-image: none;
}

.field-state-icon {
  align-items: center;
  bottom: 0;
  display: flex;
  font-size: 1rem;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  right: 0.9rem;
  top: 0;
  width: 1rem;
}

.field-state-ok {
  color: #198754;
}

.field-state-bad {
  color: #dc3545;
}

.config-result-modal {
  border: 1px solid var(--portal-border);
  border-radius: 12px;
  box-shadow: 0 18px 44px rgba(15, 76, 100, 0.18);
}

.config-result-modal .modal-title {
  align-items: center;
  display: flex;
  font-weight: 700;
  gap: 0.5rem;
}

.miboleta-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 16px;
  background: #ffffff;
  border-bottom: 1px solid #d7e0e8;
}

.miboleta-brand {
  flex: 1 1 auto;
  min-width: 0;
  color: #263746;
  font-size: clamp(15px, 1.05vw, 20px);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: nowrap;
}

.miboleta-logo {
  height: 70px;
  max-width: 380px;
  object-fit: contain;
  background: #fff;
}

.miboleta-topbar {
  position: relative;
  z-index: 5;
  height: 49px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 0;
  background: #0f4c64;
  color: #fff;
}

.miboleta-topbar-left {
  display: flex;
  align-items: center;
}

.miboleta-menu-icon {
  width: 54px;
  height: 49px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.15s ease;
}

.miboleta-menu-icon:hover {
  background: rgba(255, 255, 255, 0.12);
}

.miboleta-user-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
}

.miboleta-user-button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  background: transparent;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.miboleta-user-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 50%;
  font-size: 8px;
}

.miboleta-caret {
  font-size: 11px;
}

.miboleta-user-dropdown {
  position: absolute;
  top: 32px;
  right: 0;
  z-index: 30;
  min-width: 190px;
  display: none;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cbd5df;
  border-radius: 3px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
  text-transform: none;
}

.miboleta-user-dropdown.open {
  display: block;
}

.miboleta-user-dropdown a,
.miboleta-user-dropdown button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: #fff;
  color: #1f2933;
  text-align: left;
  text-decoration: none;
  font-size: 13px;
}

.miboleta-user-dropdown a:hover,
.miboleta-user-dropdown button:hover {
  background: #f3f6f9;
}

.miboleta-user-dropdown .disabled {
  color: #7b8794;
  cursor: default;
}

.miboleta-shell {
  min-height: calc(100vh - 158px);
  display: flex;
  flex: 1 0 auto;
}

.miboleta-shell.sidebar-collapsed .miboleta-sidebar {
  display: none;
}

.miboleta-sidebar {
  width: 290px;
  flex: 0 0 290px;
  background: #0f4c64;
  color: #fff;
}

.miboleta-profile {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 6px;
  font-size: 12px;
}

.miboleta-profile strong {
  display: block;
  max-width: 190px;
  line-height: 1.08;
  text-transform: uppercase;
}

.miboleta-avatar {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  line-height: 1;
}

.miboleta-avatar i {
  color: #fff !important;
}

.miboleta-avatar i.fa-user {
  position: relative;
  display: block;
  width: 1em;
  height: 1em;
}

.miboleta-avatar i.fa-user::before {
  content: "";
  position: absolute;
  top: 0.12em;
  left: 50%;
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  background: currentColor;
  transform: translateX(-50%);
}

.miboleta-avatar i.fa-user::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.08em;
  width: 0.72em;
  height: 0.42em;
  border-radius: 50% 50% 22% 22%;
  background: currentColor;
  transform: translateX(-50%);
}

.miboleta-role {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
}

.miboleta-nav {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
}

.miboleta-nav-link,
.miboleta-nav-button {
  min-height: 42px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.miboleta-nav-link i,
.miboleta-nav-button i {
  width: 22px;
  flex: 0 0 22px;
  text-align: center;
  font-size: 15px;
  opacity: 0.95;
}

.miboleta-nav-link:hover,
.miboleta-nav-button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.miboleta-nav-link.active {
  background: #176f8d;
  border-left: 4px solid #d8ecf4;
}

.miboleta-content {
  min-width: 0;
  flex: 1;
  padding: 0 22px 28px;
  background: #f2f5f8;
}

  .miboleta-login-wrap {
    min-height: calc(100vh - 158px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(28px, 5vh, 46px) 32px 32px;
    background: #f2f5f8;
    flex: 1 0 auto;
  }

.module-page.boleta-page {
  max-width: 100%;
  gap: 8px;
  padding-top: 6px;
}

.boleta-page .miboleta-card {
  margin-top: 4px;
}

.boleta-quickbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-left: 4px solid #0f6e8d;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(20, 35, 52, 0.06);
}

.boleta-identity,
.boleta-last-session,
.boleta-kpis {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.boleta-identity i,
.boleta-last-session i,
.boleta-kpis i {
  color: #0f6e8d;
}

.boleta-identity strong {
  color: #20313f;
  font-size: 13px;
  line-height: 1.2;
}

.boleta-identity span,
.boleta-last-session,
.boleta-kpis span {
  color: #405466;
  font-size: 12px;
  line-height: 1.2;
}

.boleta-last-session {
  flex: 1 1 auto;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.boleta-last-session strong {
  color: #20313f;
  font-weight: 800;
}

.boleta-identity span {
  padding-left: 8px;
  border-left: 1px solid #d7e0e8;
}

.boleta-kpis {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.boleta-kpis strong {
  color: #0f4c64;
}

.boleta-page .module-filter-grid {
  grid-template-columns: minmax(140px, 220px) minmax(140px, 220px) auto;
  gap: 8px;
  align-items: end;
}

.boleta-page .miboleta-card > header {
  min-height: 27px;
  font-size: 14px;
}

.boleta-page .miboleta-card-body {
  padding: 8px 12px;
}

.module-page {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.module-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #d6e0e8;
}

.module-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-title-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f3f7;
  border: 1px solid #cfe2eb;
  border-radius: 8px;
  color: #0f4c64;
  font-size: 18px;
}

.module-title h1 {
  margin: 0;
  color: #143748;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 800;
  line-height: 1.15;
}

.module-title p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 13px;
}

.module-title .breadcrumb {
  margin-bottom: 2px;
  font-size: 12px;
}

.module-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  border-radius: 6px;
}

.module-alert i {
  margin-top: 2px;
}

.module-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px)) minmax(220px, 1fr);
  gap: 9px;
  align-items: end;
}

.module-filter-grid .wide {
  grid-column: span 2;
}

.module-filter-grid .form-label,
.config-form .form-label {
  margin-bottom: 5px;
  color: #314555;
  font-size: 13px;
  font-weight: 700;
}

.module-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
}

.module-filter-actions .btn,
.filter-actions-modern .btn,
.table-tools .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
}

.reports-filter {
  grid-template-columns: minmax(160px, 220px) minmax(160px, 220px) minmax(220px, 1fr);
}

.boleta-toolbar {
  min-height: auto;
  padding: 10px 0 12px;
  border-bottom: 1px solid #cbd3dc;
}

.boleta-toolbar h1 {
  margin: 0 0 4px;
  color: #0f4c64;
  font-size: 22px;
  font-weight: 700;
}

.page-subtitle {
  margin: 0;
  color: #5f6f7d;
  font-size: 13px;
}

.miboleta-card {
  margin-top: 8px;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-top: 3px solid #b7ccd8;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(20, 35, 52, 0.08);
}

.worker-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 9px;
  margin: 8px 0;
}

.worker-summary article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(20, 35, 52, 0.05);
}

.worker-summary article i {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f3f7;
  color: #0f4c64;
}

.worker-summary span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.worker-summary strong {
  color: #0f4c64;
  font-size: 21px;
}

.miboleta-card > header {
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border-bottom: 1px solid #eeeeee;
  color: #20313f;
  font-size: 15px;
  font-weight: 700;
}

.miboleta-card > header i {
  width: 22px;
  color: #0f6e8d;
  text-align: center;
}

.miboleta-card-body {
  padding: 8px 14px;
}

.personal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: 20px;
  row-gap: 6px;
  font-size: 14px;
}

.personal-grid .wide {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}

.field span {
  font-weight: 700;
  white-space: nowrap;
}

.field strong {
  min-width: 0;
  font-weight: 400;
}

.filter-grid {
  display: grid;
  grid-template-columns: 230px minmax(210px, 342px) 230px minmax(210px, 342px);
  gap: 12px 18px;
  align-items: center;
  font-size: 14px;
}

.filter-grid label {
  font-weight: 700;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 4px;
  padding-top: 4px;
}

.empty-result {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  color: #475569;
  font-size: 17px;
  text-align: center;
}

.empty-result i {
  color: #0f6e8d;
}

.boleta-results thead th {
  background: #eef4f7;
  border: 1px solid #c9c9c9;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.boleta-results {
  min-width: 840px;
}

.boleta-results tbody td {
  border: 1px solid #c9c9c9;
  font-size: 13px;
  vertical-align: middle;
}

.miboleta-content .table > :not(caption) > * > * {
  padding: 0.42rem 0.5rem;
}

.miboleta-content .table thead th {
  font-size: 13px;
}

.miboleta-content .form-control,
.miboleta-content .form-select,
.miboleta-content .btn {
  min-height: 34px;
  padding-top: 0.34rem;
  padding-bottom: 0.34rem;
}

.boleta-results tbody tr:nth-child(even) td {
  background: #f3f3f3;
}

.boleta-results tbody tr:nth-child(odd) td {
  background: #fff;
}

.boleta-action {
  min-width: 96px;
}

.boleta-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding: 10px 8px;
}

.boleta-result-footer {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-top: 1px solid #d6d6d6;
  background: #fbfcfd;
  color: #64748b;
  font-size: 12px;
}

.erp-list-toolbar {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #d8e1e8;
  background: #fbfcfd;
  color: #475569;
  font-size: 12px;
}

.erp-list-toolbar strong {
  color: #17212b;
  font-size: 15px;
}

.erp-list-toolbar span {
  margin-left: 4px;
  color: #64748b;
}

.erp-pagination {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.erp-pagination .page-btn {
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid #d8e1e8;
  border-radius: 5px;
  background: #fff;
  color: var(--portal-accent);
  font-weight: 700;
  text-decoration: none;
}

.erp-pagination .page-btn:hover {
  border-color: var(--portal-accent);
  background: #eef7fb;
}

.erp-pagination .page-btn.active {
  border-color: var(--portal-accent);
  background: var(--portal-accent);
  color: #fff;
}

.erp-pagination .page-btn.disabled {
  pointer-events: none;
  opacity: 0.45;
  color: #94a3b8;
}

.admin-grid-toolbar {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #d8e1e8;
  background: #fbfcfd;
}

.admin-grid-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #334155;
  font-size: 13px;
}

.admin-grid-summary strong {
  color: #17212b;
  font-size: 16px;
}

.admin-grid-summary span {
  color: #64748b;
}

.admin-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-page-size .form-label {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-page-size .form-select {
  width: 86px;
}

.erp-pagination-footer {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-top: 1px solid #d8e1e8;
  background: #fbfcfd;
  color: #64748b;
  font-size: 13px;
}

.erp-pagination-footer .page-link {
  min-width: 32px;
  text-align: center;
  color: var(--portal-accent);
}

.erp-pagination-footer .page-item.active .page-link {
  background-color: var(--portal-accent);
  border-color: var(--portal-accent);
}

.portal-login {
  width: min(420px, 100%);
}

.auth-page {
  width: 100%;
  display: flex;
  justify-content: center;
}

.portal-login.auth-page {
  width: min(460px, calc(100vw - 32px));
}

.change-password-page {
  padding-top: 8px;
}

.change-password-page .portal-login {
  width: min(500px, calc(100vw - 28px));
}

.change-password-page .auth-heading h1 {
  font-size: clamp(20px, 1.7vw, 24px);
  white-space: nowrap;
}

.change-password-page .portal-panel {
  padding: 22px 26px 24px;
}

.change-password-page .auth-card {
  gap: 14px;
}

.change-password-page .auth-heading {
  gap: 10px;
  align-items: flex-start;
}

.change-password-page .auth-heading p {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.35;
}

.change-password-page .auth-icon {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  font-size: 18px;
}

.change-password-page .auth-form {
  gap: 12px;
}

.change-password-page .auth-form .form-label {
  font-size: 12px;
  margin-bottom: 4px;
}

.mandatory-password-alert {
  margin: 12px 0 14px;
  border-color: #f0b429;
  background: #fff7df;
  color: #5f3b00;
}

.mandatory-password-alert strong,
.mandatory-password-alert span {
  display: block;
}

.mandatory-password-alert strong {
  font-size: 13px;
}

.mandatory-password-alert span {
  margin-top: 2px;
  font-size: 12px;
}

.change-password-page .auth-input .form-control,
.change-password-page .auth-submit,
.change-password-page .auth-actions .btn {
  min-height: 38px;
}

.change-password-page .auth-input .input-group-text,
.change-password-page .password-toggle {
  min-width: 40px;
}

.change-password-page .form-text,
.change-password-page .text-danger {
  font-size: 12px;
}

.portal-login__panel,
.portal-panel {
  background: #fff;
  border: 1px solid #d8dde3;
  border-radius: 6px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(20, 35, 52, 0.10);
}

.portal-login__panel {
  border-top: 4px solid #0f4c64;
}

.auth-card {
  display: grid;
  gap: 18px;
  width: 100%;
}

.auth-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-heading h1 {
  margin: 0;
  color: #17212b;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 800;
  line-height: 1.1;
}

.auth-heading p {
  margin: 4px 0 0;
  color: #526574;
  font-size: 14px;
}

.auth-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--portal-soft);
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  color: var(--portal-primary);
  font-size: 22px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form .form-label {
  margin-bottom: 5px;
  color: #314555;
  font-size: 13px;
  font-weight: 800;
}

.auth-input .input-group-text {
  min-width: 44px;
  justify-content: center;
  background: #f8fafc;
  color: var(--portal-primary);
}

.auth-input .form-control {
  min-height: 42px;
}

.password-toggle {
  min-width: 44px;
}

.auth-submit,
.auth-actions .btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.validation-summary ul {
  margin-bottom: 0;
}

.portal-captcha {
  padding: 10px 12px;
  background: #eef7fb;
  border: 1px solid #c9dfea;
  border-radius: 5px;
}

.portal-captcha .form-label {
  font-weight: 700;
}

.portal-login__panel h1 {
  margin: 0;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
}

.admin-panels {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 10px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 9px;
  margin: 8px 0;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 64px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-left: 4px solid #0f6e8d;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(20, 35, 52, 0.06);
}

.metric-card i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8f3f7;
  color: #0f4c64;
}

.metric-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.metric-card strong {
  display: block;
  color: #17212b;
  font-size: 21px;
}

.metric-success {
  border-left-color: #198754;
}

.metric-info {
  border-left-color: #0d6efd;
}

.metric-warning {
  border-left-color: #d99700;
}

.admin-filter-grid {
  display: grid;
  grid-template-columns: 160px minmax(220px, 1fr) 70px minmax(110px, 160px) 60px minmax(120px, 180px);
  gap: 10px 12px;
  align-items: center;
}

.admin-filter-erp {
  grid-template-columns: minmax(130px, 160px) minmax(220px, 420px) minmax(340px, 1fr) minmax(130px, 160px) minmax(100px, 130px) minmax(100px, 130px);
}

.admin-filter-erp .wide {
  grid-column: auto;
}

.admin-filter-erp .module-filter-actions {
  grid-column: 1 / -1;
}

.admin-logo-form {
  display: grid;
  gap: 10px;
}

.admin-logo-form small {
  color: #64748b;
}

.admin-results {
  min-width: 1120px;
}

.admin-user-search {
  display: grid;
  grid-template-columns: 180px minmax(240px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.admin-person-results {
  min-width: 820px;
}

.selected-row td {
  background: #e5f3f8 !important;
}

.admin-person-summary {
  display: grid;
  gap: 2px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #eef4f7;
  border: 1px solid #d7e0e8;
  border-radius: 5px;
}

.admin-person-summary span {
  color: #5f6f7d;
}

.admin-contact-form {
  display: grid;
  gap: 8px;
}

.admin-contact-form label {
  font-weight: 700;
}

.admin-contact-form .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
}

.admin-small-title {
  margin: 0 0 8px;
  font-size: 15px;
  color: #20313f;
  font-weight: 700;
}

.admin-assigned-list {
  display: grid;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.admin-assigned-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: #f8fafc;
  border: 1px solid #d7e0e8;
  border-radius: 4px;
}

.config-page {
  display: grid;
  gap: 10px;
}

.config-form {
  display: grid;
  gap: 10px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 10px;
}

.config-panel {
  overflow: hidden;
  background: #fff;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(18, 38, 54, 0.06);
}

.config-panel > header {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid #e4ebf0;
  background: #f8fafc;
  color: #1d3545;
  font-weight: 800;
}

.config-panel > header i {
  color: #0f6e8d;
}

.config-panel-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.config-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.mail-grid {
  display: grid;
  grid-template-columns: 132px minmax(190px, 1fr) 120px 110px;
  gap: 9px;
  align-items: end;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
}

.config-master-switch {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding-left: 2.8em;
  font-weight: 700;
}

.mail-settings,
.qr-settings {
  display: grid;
  gap: 10px;
}

.config-disabled-section {
  opacity: 0.55;
  pointer-events: none;
}

.mail-switch {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0 0 0 2.6em;
}

.protocol-switch {
  align-self: center;
  font-weight: 700;
  padding-top: 20px;
}

.config-current-file {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 6px 9px;
  background: #eef6fa;
  border: 1px solid #cfe2eb;
  border-radius: 5px;
  color: #244657;
  font-size: 12px;
  font-weight: 700;
}

.config-permissions {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #f4f8fb;
  border: 1px solid #d7e4ec;
  border-radius: 6px;
  color: #526574;
  font-size: 13px;
}

.config-permissions strong {
  color: #20313f;
}

.protocol-mode-box {
  margin-top: 10px;
}

.protocol-mode-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 800;
}

.protocol-mode-label span {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #d7e4ec;
  background: #fff;
}

.protocol-mode-label i {
  color: #6b7d8c;
  font-size: 11px;
}

.protocol-http {
  color: #875300;
}

.protocol-https {
  color: #0b7a3b;
}

.protocol-mode-box .form-check-input:checked ~ .form-check-label {
  color: #0b7a3b;
}

.config-files {
  margin-top: 2px;
}

.config-file-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 9px;
  padding: 12px;
}

.config-file-grid div {
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #d8e1e8;
  border-radius: 6px;
}

.config-file-grid span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.config-file-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #20313f;
  font-size: 13px;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 18px;
}

.portal-login__panel h2 {
  margin: 2px 0 16px;
  font-size: 1rem;
  color: #334155;
}

.licencia-activation {
  width: min(560px, 100%);
}

.licencia-form {
  display: grid;
  gap: 6px;
}

.licencia-divider {
  height: 1px;
  margin: 20px 0;
  background: #d8dde3;
}

.licencia-import {
  display: grid;
  gap: 6px;
}

.licencia-details {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 6px 10px;
  margin: 20px 0 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #d7e0e8;
  border-radius: 5px;
  font-size: 12px;
}

.licencia-details dt {
  color: #334155;
}

.licencia-details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #475569;
}

.licencia-validation:empty {
  display: none;
}

.licencia-validation ul {
  margin: 0;
  padding-left: 1rem;
}

.conexion-setup {
  width: min(620px, 100%);
}

.conexion-form {
  display: grid;
  gap: 12px;
}

.conexion-check {
  padding-top: 2px;
}

.conexion-credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.conexion-credentials.disabled-fields {
  opacity: 0.58;
}

.conexion-options {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid #d7e0e8;
  border-radius: 6px;
}

.conexion-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.usuarios-admin {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.admin-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0 8px;
  border-bottom: 1px solid #d6e0e8;
}

.admin-top h1 {
  margin: 0;
  color: #142f3f;
  font-size: clamp(21px, 1.8vw, 28px);
  font-weight: 800;
}

.admin-top p {
  margin: 2px 0 0;
  color: #657583;
  font-size: 12px;
}

.admin-top .breadcrumb {
  font-size: 12px;
}

.admin-filter-panel,
.usuario-form-panel,
.audit-panel,
.users-table-panel {
  background: #fff;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(18, 38, 54, 0.06);
}

.admin-filter-panel {
  padding: 12px;
}

.filter-title,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #1d3545;
  font-weight: 800;
}

.filter-title {
  justify-content: flex-start;
  margin-bottom: 8px;
}

.admin-filter-modern,
.form-modern-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 9px;
}

.grid-column-full {
  grid-column: 1 / -1;
}

.admin-filter-modern .form-label,
.form-modern-grid .form-label {
  margin-bottom: 4px;
  color: #324554;
  font-size: 12px;
  font-weight: 700;
}

.usuarios-admin .form-section > p,
.usuarios-admin .text-muted.small,
.usuarios-admin .alert,
.usuarios-admin .form-control,
.usuarios-admin .form-select,
.usuarios-admin .btn {
  font-size: 13px;
}

.usuarios-admin .document-lookup-field {
  grid-column: span 2;
}

.usuarios-admin .document-lookup-group .form-control {
  min-width: 220px;
}

.usuarios-admin .btn-person-search {
  width: 42px;
  padding-left: 0;
  padding-right: 0;
}

.filter-actions-modern {
  display: flex;
  align-items: end;
  gap: 8px;
}

.usuarios-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
  align-items: start;
}

.usuario-form-panel {
  overflow: hidden;
}

.panel-heading {
  min-height: 40px;
  padding: 8px 12px;
  border-bottom: 1px solid #e4ebf0;
  background: #f8fafc;
}

.form-section {
  padding: 12px;
  border-bottom: 1px solid #edf1f4;
}

.form-section h2,
.role-matrix h2 {
  margin: 0 0 8px;
  color: #0f4c64;
  font-size: 16px;
  font-weight: 800;
}

.switch-row {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 25px;
}

.role-matrix {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid #edf1f4;
}

.role-matrix h2 {
  grid-column: 1 / -1;
}

.role-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: 460px;
  padding: 12px;
  background: #f4f8fb;
  border: 1px solid #d7e4ec;
  border-radius: 8px;
}

.role-card i {
  color: #0f6e8d;
  font-size: 22px;
}

.role-card span {
  font-weight: 700;
}

.role-card strong {
  padding: 4px 8px;
  background: #e8f1f6;
  border-radius: 999px;
  color: #244657;
  font-size: 12px;
}

.form-actions-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 18px;
  background: #fbfcfd;
}

.audit-panel {
  position: sticky;
  top: 12px;
  overflow: hidden;
}

.audit-panel dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  padding: 16px;
  font-size: 13px;
}

.audit-panel dt {
  color: #334155;
}

.audit-panel dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #5b6b78;
}

.audit-panel h3 {
  margin: 0;
  padding: 12px 16px 6px;
  color: #1d3545;
  font-size: 15px;
  font-weight: 800;
}

.audit-panel ul {
  margin: 0;
  padding: 0 16px 16px 32px;
  color: #5b6b78;
  font-size: 13px;
}

.users-table-panel {
  overflow: hidden;
}

.table-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.table-tools .form-control {
  width: 220px;
}

#usuariosTable {
  min-width: 1180px;
}

#usuariosTable thead th {
  cursor: pointer;
  background: #eef5f8;
  color: #223746;
  font-size: 13px;
  white-space: nowrap;
}

#usuariosTable tbody td {
  font-size: 13px;
  vertical-align: middle;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-width: 86px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-activo {
  background: #e7f6ed;
  color: #17683a;
}

.status-generada {
  background: #e8f3f7;
  color: #0f4c64;
}

.status-publicada,
.status-descargada,
.status-ok {
  background: #e7f6ed;
  color: #17683a;
}

.status-inactivo {
  background: #eef1f4;
  color: #5d6872;
}

.status-pendiente,
.status-neutral {
  background: #eef1f4;
  color: #5d6872;
}

.status-bloqueado {
  background: #fdecef;
  color: #a51d36;
}

.status-anulada,
.status-error {
  background: #fdecef;
  color: #a51d36;
}

.module-confirm-modal .modal-content {
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(18, 38, 54, 0.22);
}

.module-confirm-modal .modal-header {
  background: #f8fafc;
  border-bottom-color: #e4ebf0;
}

.module-confirm-modal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--portal-primary);
  font-size: 18px;
  font-weight: 800;
}

.module-confirm-modal .modal-body {
  color: #334155;
  font-size: 15px;
  line-height: 1.45;
}

.action-buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
}

.action-buttons form {
  margin: 0;
}

.action-buttons .btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #e4ebf0;
  background: #fbfcfd;
  color: #64748b;
  font-size: 13px;
}

.pagination-mini {
  display: flex;
  gap: 6px;
}

.erp-table-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.erp-table-summary strong {
  color: #17212b;
  font-size: 15px;
}

.erp-table-summary span {
  color: #64748b;
}

.erp-users-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.miboleta-brand,
.module-title h1,
.boleta-toolbar h1,
.admin-top h1 {
  color: var(--portal-primary);
}

.miboleta-topbar,
.miboleta-sidebar {
  background: var(--portal-primary);
}

.miboleta-nav-link.active {
  background: var(--portal-primary-muted);
  border-left-color: var(--portal-border);
}

.module-title-icon,
.worker-summary article i,
.metric-card i {
  background: var(--portal-soft);
  border-color: var(--portal-border);
  color: var(--portal-primary);
}

.miboleta-card {
  border-top-color: var(--portal-border);
}

.miboleta-card > header i,
.empty-result i,
.config-panel > header i,
.role-card i {
  color: var(--portal-primary-muted);
}

.metric-card {
  border-left-color: var(--portal-primary-muted);
}

.btn-primary {
  background-color: var(--portal-accent) !important;
  border-color: var(--portal-accent) !important;
  color: var(--portal-text-on-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--portal-primary) !important;
  border-color: var(--portal-primary) !important;
}

.btn-outline-primary {
  border-color: var(--portal-accent) !important;
  color: var(--portal-accent) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--portal-accent) !important;
  border-color: var(--portal-accent) !important;
  color: var(--portal-text-on-primary) !important;
}

.btn-outline-primary:hover i,
.btn-outline-primary:focus i,
.btn-outline-primary:active i {
  color: var(--portal-text-on-primary) !important;
}

.portal-login__panel {
  border-top-color: var(--portal-primary);
}

.portal-captcha,
.admin-person-summary,
.config-current-file {
  background: var(--portal-soft);
  border-color: var(--portal-border);
}

.theme-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
  background: #fff;
  color: #263746;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.theme-chip::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.theme-chip.active {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent) 18%, transparent);
}

.theme-chip:hover,
.theme-chip:focus-visible {
  border-color: var(--portal-accent);
  background: var(--portal-soft);
  color: #102a3a;
}

.theme-chip-defecto::before {
  background: #0f4c64;
}

.theme-chip-azul::before {
  background: #2563eb;
}

.theme-chip-verde::before {
  background: #198754;
}

.theme-chip-rojo::before {
  background: #dc3545;
}

.theme-chip-amarillo::before {
  background: #d99700;
}

.theme-chip-morado::before {
  background: #7c3aed;
}

.appearance-mode {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e4ebf0;
}

.mode-segment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-segment .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  min-height: 38px;
  color: var(--portal-accent) !important;
  white-space: nowrap;
}

.mode-segment .btn:hover,
.mode-segment .btn:focus-visible {
  background-color: var(--portal-accent) !important;
  border-color: var(--portal-accent) !important;
  color: var(--portal-text-on-primary) !important;
}

.mode-segment .btn:hover i,
.mode-segment .btn:focus-visible i {
  color: var(--portal-text-on-primary) !important;
}

.mode-segment .btn-check:checked + .btn,
.mode-segment .btn-check:active + .btn,
.mode-segment .btn.active,
.mode-segment .btn.show {
  background-color: var(--portal-accent) !important;
  border-color: var(--portal-accent) !important;
  color: var(--portal-text-on-primary) !important;
}

.mode-segment .btn-check:checked + .btn i,
.mode-segment .btn-check:active + .btn i,
.mode-segment .btn.active i,
.mode-segment .btn.show i {
  color: var(--portal-text-on-primary) !important;
}

.visual-schedule {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #d8e1e8;
  border-radius: 8px;
}

.visual-schedule-disabled {
  opacity: 0.62;
}

body.visual-noche {
  background: #0b1117;
  color: #e5e7eb;
}

body.visual-noche .miboleta-header,
body.visual-noche .portal-footer,
body.visual-noche .miboleta-card,
body.visual-noche .portal-login__panel,
body.visual-noche .portal-panel,
body.visual-noche .metric-card,
body.visual-noche .worker-summary article,
body.visual-noche .config-panel,
body.visual-noche .admin-filter-panel,
body.visual-noche .usuario-form-panel,
body.visual-noche .audit-panel,
body.visual-noche .users-table-panel,
body.visual-noche .module-confirm-modal .modal-content {
  background: #111827;
  border-color: #263445;
  color: #e5e7eb;
}

body.visual-noche .miboleta-content,
body.visual-noche .miboleta-login-wrap {
  background: #0b1117;
}

body.visual-noche .miboleta-brand,
body.visual-noche .module-title h1,
body.visual-noche .boleta-toolbar h1,
body.visual-noche .admin-top h1,
body.visual-noche .form-section h2,
body.visual-noche .role-matrix h2,
body.visual-noche .panel-heading,
body.visual-noche .filter-title,
body.visual-noche .config-panel > header,
body.visual-noche .miboleta-card > header,
body.visual-noche .module-confirm-modal .modal-title {
  color: #f8fafc;
}

body.visual-noche .module-title p,
body.visual-noche .page-subtitle,
body.visual-noche .admin-top p,
body.visual-noche .form-text,
body.visual-noche .portal-footer,
body.visual-noche .config-permissions,
body.visual-noche .audit-panel dd,
body.visual-noche .audit-panel ul,
body.visual-noche .field strong {
  color: #cbd5e1;
}

body.visual-noche .miboleta-card > header,
body.visual-noche .panel-heading,
body.visual-noche .config-panel > header,
body.visual-noche .admin-grid-toolbar,
body.visual-noche .erp-pagination-footer,
body.visual-noche .table-footer,
body.visual-noche .module-confirm-modal .modal-header,
body.visual-noche .module-confirm-modal .modal-footer {
  background: #162132;
  border-color: #263445;
}

body.visual-noche .form-control,
body.visual-noche .form-select,
body.visual-noche .input-group-text,
body.visual-noche .form-check-input,
body.visual-noche .theme-chip,
body.visual-noche .role-card,
body.visual-noche .config-current-file,
body.visual-noche .config-file-grid div,
body.visual-noche .visual-schedule,
body.visual-noche .mail-grid,
body.visual-noche .conexion-options,
body.visual-noche .admin-person-summary,
body.visual-noche .portal-captcha {
  background-color: #0f172a;
  border-color: #334155;
  color: #e5e7eb;
}

body.visual-noche .form-control::placeholder {
  color: #94a3b8;
}

body.visual-noche .boleta-results thead th,
body.visual-noche #usuariosTable thead th {
  background: #1e293b;
  border-color: #334155;
  color: #f8fafc;
}

body.visual-noche .boleta-results tbody td,
body.visual-noche #usuariosTable tbody td {
  border-color: #334155;
  color: #e5e7eb;
}

body.visual-noche .boleta-results tbody tr:nth-child(even) td,
body.visual-noche #usuariosTable tbody tr:nth-child(even) td {
  background: #101827;
}

body.visual-noche .boleta-results tbody tr:nth-child(odd) td,
body.visual-noche #usuariosTable tbody tr:nth-child(odd) td {
  background: #111827;
}

body.visual-noche .module-alert.alert-info {
  background: #0f2942;
  border-color: #1d4f73;
  color: #dbeafe;
}

body.visual-noche .module-alert.alert-success {
  background: #0f2f22;
  border-color: #1f6f48;
  color: #dcfce7;
}

body.visual-noche .module-alert.alert-warning {
  background: #3a2c08;
  border-color: #8a6b13;
  color: #fef3c7;
}

.portal-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 18px;
  background: #ffffff;
  border-top: 1px solid #d7e0e8;
  color: #5f6f7d;
  font-size: 12px;
  flex: 0 0 auto;
}

.portal-footer a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.portal-footer a:hover,
.portal-footer a:focus {
  color: var(--gp-primary);
  text-decoration: underline;
}

@media (max-width: 900px) {
  .miboleta-header {
    height: auto;
    align-items: center;
    gap: 12px;
  }

  .miboleta-brand {
    font-size: 18px;
    white-space: normal;
  }

  .miboleta-logo {
    height: 54px;
    max-width: 260px;
  }

  .miboleta-topbar {
    padding-left: 14px;
  }

  .miboleta-shell {
    display: flex;
    flex-direction: column;
  }

  .miboleta-sidebar {
    width: 100%;
    flex: 0 0 auto;
    min-height: auto;
    margin-top: 0;
    padding-top: 0;
  }

  .miboleta-shell.sidebar-collapsed .miboleta-sidebar {
    display: none;
  }

  .miboleta-profile {
    min-height: 44px;
    padding: 6px 12px;
  }

  .miboleta-profile strong {
    max-width: none;
  }

  .miboleta-avatar {
    width: 34px;
    height: 34px;
    border-width: 2px;
    font-size: 22px;
  }

  .miboleta-role {
    display: none;
  }

  .miboleta-nav {
    margin-top: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
  }

  .miboleta-nav-link,
  .miboleta-nav-button {
    min-height: 38px;
    flex: 0 0 auto;
    width: auto;
    padding: 0 12px;
    white-space: nowrap;
    font-size: 13px;
  }

  .miboleta-nav-link.active {
    border-left: 0;
    border-bottom: 3px solid #d8ecf4;
  }

  .miboleta-content {
    padding: 0 12px 24px;
  }

  .personal-grid,
  .worker-summary,
  .filter-grid,
  .module-filter-grid,
  .reports-filter,
  .admin-filter-erp,
  .admin-panels,
  .admin-metrics,
  .admin-filter-grid,
  .admin-user-search,
  .admin-filter-modern,
  .form-modern-grid,
  .usuarios-grid,
  .config-grid,
  .config-file-grid {
    grid-template-columns: 1fr;
  }

  .module-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .module-title {
    align-items: flex-start;
  }

  .module-filter-grid .wide,
  .admin-filter-erp .wide,
  .usuarios-admin .document-lookup-field {
    grid-column: auto;
  }

  .module-filter-actions {
    justify-content: stretch;
  }

  .module-filter-actions .btn {
    flex: 1 1 140px;
  }

  .boleta-quickbar,
  .erp-list-toolbar,
  .boleta-result-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .boleta-kpis {
    justify-content: flex-start;
  }

  .boleta-last-session {
    justify-content: flex-start;
  }

  .boleta-page .module-filter-grid {
    grid-template-columns: 1fr;
  }

  .erp-pagination {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .audit-panel {
    position: static;
  }

  .admin-top {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions-modern,
  .table-tools {
    justify-content: stretch;
  }

  .admin-grid-toolbar,
  .erp-pagination-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-users-pager {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .admin-page-size {
    justify-content: space-between;
  }

  .filter-actions-modern .btn,
  .module-hero > .btn,
  .table-tools .btn,
  .table-tools .form-control {
    width: 100%;
  }

  .field {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .field span {
    white-space: normal;
  }

  .table-responsive {
    border-bottom: 1px solid #d8e1e8;
  }

  .miboleta-content .table {
    min-width: 760px;
  }

  .miboleta-content .table > :not(caption) > * > * {
    padding: 0.4rem 0.45rem;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 14px;
  }

  .miboleta-header {
    min-height: 64px;
    padding: 8px 10px;
  }

  .miboleta-brand {
    font-size: 15px;
    line-height: 1.2;
  }

  .miboleta-logo {
    height: 42px;
    max-width: 190px;
  }

  .miboleta-topbar {
    height: 44px;
    padding: 0 8px;
  }

  .miboleta-menu-icon {
    width: 44px;
    height: 44px;
  }

  .miboleta-user-button span:nth-child(2) {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .miboleta-content {
    padding: 0 8px 20px;
  }

  .miboleta-profile {
    display: none;
  }

  .miboleta-nav-link,
  .miboleta-nav-button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 12px;
  }

  .module-page {
    gap: 8px;
    padding-top: 8px;
  }

  .module-title-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 15px;
  }

  .module-title h1 {
    font-size: 20px;
  }

  .module-title p {
    font-size: 12px;
  }

  .miboleta-card > header {
    min-height: 28px;
    font-size: 13px;
  }

  .boleta-toolbar {
    min-height: auto;
    padding: 14px 0 18px;
  }

  .boleta-toolbar h1 {
    font-size: 21px;
  }

  .miboleta-card {
    margin-top: 8px;
  }

  .miboleta-card-body {
    padding: 8px 10px;
  }

  .boleta-identity,
  .boleta-last-session,
  .boleta-kpis {
    gap: 6px;
  }
  
  .boleta-identity strong,
  .boleta-identity span,
  .boleta-last-session,
  .boleta-kpis span {
    font-size: 11px;
  }

  .erp-list-toolbar,
  .boleta-result-footer {
    gap: 8px;
  }

  .erp-pagination .page-btn {
    min-width: 28px;
    height: 28px;
    padding: 0 7px;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .btn {
    flex: 1;
  }

  .boleta-export-actions {
    justify-content: stretch;
  }

  .boleta-export-actions .btn {
    flex: 1;
  }

  .portal-login__panel,
  .portal-panel {
    padding: 20px;
  }

  .conexion-credentials,
  .conexion-actions,
  .auth-actions,
  .mail-grid,
  .config-two-cols {
    grid-template-columns: 1fr;
  }

  .portal-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
  }

  .role-matrix,
  .audit-panel dl {
    grid-template-columns: 1fr;
  }

  .switch-row {
    padding-top: 0;
  }

  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions-bottom .btn {
    flex: 1 1 140px;
  }
}
