:root {
  --bg: #f1f4f9;
  --ink: #0f172a;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --side-900: #02142f;
  --side-800: #06224a;
  --blue: #0d6efd;
  --blue-contrast: #ffffff;
  --surface-header-bg: #dbeafe;
  --surface-header-text: #0f172a;
  --surface-footer-bg: #eaf1fb;
  --surface-footer-text: #334155;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body {
  min-width: 320px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #e5e5e5;
}

.login-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.login-page-wrap {
  width: min(435px, calc(100vw - 1rem));
  margin: 0 auto;
}

.login-card-classic {
  border: 0;
  border-radius: 3px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  padding: 0;
}

.login-card-header {
  background: linear-gradient(180deg, #173858, #0b2b4d);
  color: #fff;
  padding: 1rem;
  text-align: center;
}

.login-card-header h1 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
}

.login-card-body {
  padding: 1.6rem 1.5rem 1.35rem;
}

.login-card-body h2 {
  color: #111827;
  font-size: 1.25rem;
  font-weight: 500;
  margin: 0 0 1.45rem;
  text-align: center;
}

.login-card-body .form-label {
  color: #111827;
  font-weight: 800;
}

.login-card-body .form-control {
  border-color: #cbd5e1;
  border-radius: 4px;
  min-height: 38px;
}

.password-input-group {
  display: flex;
}

.password-input-group .password-input {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
  min-width: 0;
}

.password-input-group .password-toggle {
  border: 1px solid #64748b;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  color: #64748b;
  flex: 0 0 44px;
  min-height: 38px;
  position: static;
  transform: none;
}

.password-input-group .password-toggle:hover {
  background: #f8fafc;
}

.login-submit {
  background: #343a40;
  border-color: #343a40;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
  min-height: 42px;
}

.login-submit:hover,
.login-submit:focus {
  background: #23272b;
  border-color: #23272b;
  color: #fff;
}

.login-forgot {
  font-size: 0.82rem;
  margin-top: 1.35rem;
  text-align: center;
}

.login-forgot a {
  color: #0d6efd;
  text-decoration: none;
}

.login-card-footer {
  background: #f7f7f7;
  color: #64748b;
  font-size: 0.8rem;
  padding: 0.9rem;
  text-align: center;
}

.login-brand {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 1rem;
  flex-direction: column;
}

.login-brand-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #0d3d86, #0d6efd);
}

.login-brand h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f1f44;
}

.password-input-wrap {
  position: relative;
}

.password-input {
  padding-right: 3.25rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #475569;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  background: rgba(148, 163, 184, 0.12);
}

.password-toggle i {
  font-size: 1.05rem;
}

.login-tip {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  color: #475569;
  font-size: 0.9rem;
}

.app-shell {
  min-height: 100vh;
  display: block;
  position: relative;
  --sidebar-width: 280px;
  --topbar-height: 82px;
}

.sidebar-overlay {
  display: none;
}

.sidebar {
  background: linear-gradient(180deg, var(--side-900), var(--side-800));
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  height: 100vh;
  overflow-y: auto;
  z-index: 1020;
}

.brand-block {
  text-align: center;
  padding: 1rem 0.5rem 1.5rem;
}

.brand-block h1,
.brand-home-link {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.1;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.brand-home-link {
  display: inline-block;
  font-weight: 800;
  text-decoration: none;
}

.brand-home-link:hover {
  color: #dbeafe;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.3rem 0.25rem;
}

.menu-link {
  border: 0;
  width: 100%;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #dbeafe;
  background: transparent;
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  font-weight: 600;
  transition: 0.2s ease;
}

.menu-link:hover {
  background: rgba(13, 110, 253, 0.22);
  color: #fff;
}

.menu-link.active {
  background: linear-gradient(90deg, #0d6efd, #1d4ed8);
  color: #fff;
}

.menu-link i {
  font-size: 1.05rem;
}

.content-zone {
  min-width: 0;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100% - var(--sidebar-width));
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: 9;
  background: var(--surface-header-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 1.1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: var(--topbar-height);
}

.mobile-menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

.topbar-meta {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  flex-wrap: nowrap;
}

.refresh-chip,
.profile-trigger,
.logout-chip,
.login-chip {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.45rem 0.75rem;
  min-width: 0;
  text-decoration: none;
  color: var(--ink);
}

.refresh-chip i,
.profile-trigger i,
.logout-chip i,
.login-chip i {
  font-size: 1.15rem;
  color: #0f172a;
}

.refresh-chip small,
.profile-trigger small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.refresh-chip strong,
.profile-trigger strong {
  display: block;
  font-size: 0.83rem;
  word-break: break-word;
}

.profile-trigger {
  border-color: var(--line);
  cursor: pointer;
  min-width: 220px;
  justify-content: flex-start;
}

.profile-trigger::after {
  margin-left: auto;
}

.profile-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-trigger-text {
  min-width: 0;
  text-align: left;
}

.profile-dropdown {
  width: min(320px, calc(100vw - 2rem));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.45rem;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.profile-dropdown-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.65rem 0.7rem;
}

.profile-dropdown-header strong {
  font-size: 0.95rem;
}

.profile-dropdown-header small,
.profile-dropdown-item span {
  color: var(--muted);
}

.profile-dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.45rem 0.65rem;
}

.profile-dropdown-item strong {
  font-size: 0.88rem;
  font-weight: 700;
  word-break: break-word;
}

.profile-action {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 10px;
  padding: 0.65rem;
}

.logout-inline-form {
  margin: 0;
}

.logout-chip,
.login-chip {
  font-weight: 700;
}

.logout-chip:hover,
.login-chip:hover,
.profile-trigger:hover {
  background: #f8fafc;
  color: var(--ink);
}

.main-content {
  padding-bottom: 1.5rem;
}

.hero-panel {
  background: linear-gradient(135deg, var(--side-900), var(--blue));
  color: var(--blue-contrast);
  border-radius: 18px;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 18px 35px color-mix(in srgb, var(--blue) 22%, transparent);
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
}

.hero-panel p {
  margin: 0.4rem 0 0;
  color: color-mix(in srgb, var(--blue-contrast) 86%, transparent);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  min-width: 0;
}

.card {
  background: var(--panel);
  border-color: var(--line);
}

.card-body {
  color: var(--ink);
}

.btn-primary {
  background-color: var(--blue);
  border-color: var(--blue);
  color: var(--blue-contrast);
}

.text-bg-primary,
.badge.text-bg-primary {
  background-color: var(--blue) !important;
  color: var(--blue-contrast) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:focus-visible {
  background-color: var(--blue);
  border-color: var(--blue);
  color: var(--blue-contrast);
  filter: brightness(0.93);
}

.btn-outline-primary {
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:focus-visible {
  background-color: var(--blue);
  border-color: var(--blue);
  color: var(--blue-contrast);
}

.btn-check:checked + .btn,
.btn-check:checked + .border,
.btn-check:checked + span {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--blue) 18%, transparent);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
}

.metric-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 118px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.metric-tile span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.metric-tile strong {
  color: var(--ink);
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.metric-tile small {
  color: var(--muted);
}

.stage-flow-list,
.status-breakdown {
  display: grid;
  gap: 0.75rem;
}

.stage-flow-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) minmax(180px, 2fr) minmax(82px, auto);
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.stage-flow-row:last-child {
  border-bottom: 0;
}

.stage-flow-row strong,
.stage-flow-row small {
  display: block;
}

.stage-flow-row small,
.stage-flow-count small {
  color: var(--muted);
}

.stage-flow-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.stage-flow-meter span {
  background: linear-gradient(90deg, var(--blue), var(--success));
  display: block;
  height: 100%;
}

.stage-flow-count {
  text-align: right;
}

.status-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem;
}

.status-breakdown-row span {
  font-weight: 700;
}

.status-breakdown-row small {
  color: var(--muted);
  min-width: 54px;
  text-align: right;
}

.bandeja-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.bandeja-stage-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.75rem;
}

.bandeja-stage-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 0.6rem;
  min-height: 92px;
  padding: 0.85rem;
  text-decoration: none;
}

.bandeja-stage-card.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 0.15rem color-mix(in srgb, var(--blue) 14%, transparent);
}

.bandeja-stage-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bandeja-stage-card > span,
.bandeja-stage-card-head span {
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 700;
  text-transform: uppercase;
}

.bandeja-stage-card > strong,
.bandeja-stage-card-head strong {
  color: var(--ink);
  font-size: 1.65rem;
  line-height: 1;
}

.bandeja-stage-card-subitems {
  display: grid;
  gap: 0.35rem;
}

.bandeja-stage-chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  gap: 0.5rem;
  justify-content: space-between;
  min-height: 34px;
  padding: 0.35rem 0.5rem;
  text-decoration: none;
}

.bandeja-stage-chip span {
  font-size: 0.82rem;
  line-height: 1.15;
}

.bandeja-stage-chip strong {
  background: var(--surface-header-bg);
  border-radius: 999px;
  color: var(--surface-header-text);
  font-size: 0.75rem;
  min-width: 1.8rem;
  padding: 0.1rem 0.35rem;
  text-align: center;
}

.bandeja-stage-chip:hover,
.bandeja-stage-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--blue-contrast);
}

.bandeja-stage-chip:hover strong,
.bandeja-stage-chip.active strong {
  background: color-mix(in srgb, var(--blue-contrast) 22%, transparent);
  color: var(--blue-contrast);
}

.bandeja-stage-menu {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
  position: sticky;
  top: calc(var(--topbar-height) + 1rem);
}

.bandeja-stage-group {
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
  margin-top: 0.45rem;
}

.bandeja-stage-root,
.bandeja-substage {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  font-weight: 700;
  text-align: left;
}

.bandeja-stage-root strong,
.bandeja-substage strong {
  min-width: 2.1rem;
  text-align: center;
  background: var(--surface-header-bg);
  color: var(--surface-header-text);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.78rem;
}

.bandeja-stage-root:hover,
.bandeja-substage:hover,
.bandeja-stage-root.active,
.bandeja-substage.active {
  background: var(--blue);
  color: var(--blue-contrast);
}

.bandeja-stage-root:hover strong,
.bandeja-substage:hover strong,
.bandeja-stage-root.active strong,
.bandeja-substage.active strong {
  background: color-mix(in srgb, var(--blue-contrast) 22%, transparent);
  color: var(--blue-contrast);
}

.bandeja-substage-list {
  display: grid;
  gap: 0.25rem;
  padding: 0.3rem 0 0 0.65rem;
}

.bandeja-substage {
  font-size: 0.9rem;
  font-weight: 600;
  padding-block: 0.5rem;
}

.bandeja-table-panel {
  min-width: 0;
}

.nav-tabs .nav-link.active {
  color: var(--surface-header-text);
  background: var(--surface-header-bg);
  border-color: var(--line) var(--line) transparent;
  font-weight: 700;
}

.modal-header,
.card-header,
.theme-surface-header {
  background: var(--surface-header-bg);
  color: var(--surface-header-text);
  border-bottom: 1px solid var(--line);
}

.modal-footer,
.card-footer,
.theme-surface-footer {
  background: var(--surface-footer-bg);
  color: var(--surface-footer-text);
  border-top: 1px solid var(--line);
}

.dashboard-title h2 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  font-weight: 800;
}

.dashboard-title p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.filter-label {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.filter-select {
  border-color: var(--line);
}

.metric-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 0.9rem 0.95rem;
  display: flex;
  gap: 0.8rem;
  min-height: 120px;
}

.metric-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 1.45rem;
  flex: 0 0 auto;
}

.metric-content span {
  display: block;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
}

.metric-content strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.metric-content small {
  color: var(--muted);
  font-weight: 600;
}

.metric-line {
  margin-top: 0.5rem;
  width: 75px;
  height: 4px;
  border-radius: 20px;
}

.section-title {
  margin: 0 0 0.9rem;
  font-size: 1.12rem;
  font-weight: 800;
}

.candidate-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  background: #fff;
}

.candidate-rank {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 0.55rem;
}

.candidate-photo {
  width: 100%;
  height: 150px;
  border-radius: 10px;
  object-fit: cover;
  margin-bottom: 0.6rem;
}

.candidate-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.candidate-card p {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
}

.chart-area {
  min-height: 305px;
}

.map-container {
  width: 100%;
  min-height: 340px;
  border-radius: 12px;
}

.legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 4px;
}

.dot-green { background: var(--success); }
.dot-yellow { background: var(--warning); }
.dot-red { background: var(--danger); }

.table-summary thead th {
  background: var(--surface-header-bg);
  color: var(--surface-header-text);
  border: none;
}

.table-summary tbody tr td {
  border-color: var(--line);
  font-weight: 600;
}

.summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.summary-list li:last-child {
  border-bottom: none;
}

.summary-list strong {
  color: #0b3f8a;
}

.modal-dialog-scrollable .modal-footer {
  position: sticky;
  bottom: 0;
  background: #fff;
  z-index: 2;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.table-responsive .table {
  width: 100% !important;
  min-width: 0;
}

.dataTables_wrapper {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}

.table-responsive:has(.dropdown-menu.show) {
  overflow: visible;
}

.dropdown-menu {
  z-index: 1080;
}

.dataTables_wrapper .row {
  --bs-gutter-x: 0.75rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  max-width: 100%;
}

.dataTables_wrapper .dataTables_filter input {
  max-width: 100%;
}

.documento-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
}

.documento-status.loading {
  color: var(--blue);
}

.documento-status.ready,
.documento-status.uploaded {
  color: #15803d;
}

.documento-status a {
  color: inherit;
  font-weight: 800;
}

.document-status-list {
  display: grid;
  gap: 0.45rem;
}

.document-status-item {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.6rem;
  background: #fff;
}

.document-status-item > i {
  margin-top: 0.12rem;
}

.document-status-item span {
  display: grid;
  gap: 0.1rem;
}

.document-status-item small {
  color: var(--muted);
  font-weight: 600;
}

.submit-loading {
  align-items: center;
}

.datatable-toolbar,
.page-header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.compact-form-grid .form-label {
  margin-bottom: 0.3rem;
}

.compact-form-grid .form-control,
.compact-form-grid .form-select {
  min-height: 42px;
}

@media (max-width: 992px) {
  .app-shell {
    --topbar-height: auto;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(300px, calc(100vw - 2rem));
    z-index: 1035;
    border-bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    overflow-y: auto;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .app-shell.sidebar-open .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 1030;
  }

  .menu-list {
    flex-direction: column;
    overflow: visible;
    white-space: normal;
  }

  .menu-link {
    min-width: 0;
  }

  .mobile-menu-toggle {
    display: inline-flex;
  }

  .content-zone {
    margin-left: 0;
    padding-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .topbar {
    position: sticky;
    left: 0;
    gap: 0.9rem;
    align-items: flex-start;
    justify-content: space-between;
  }

  .topbar-meta {
    flex-wrap: wrap;
    justify-content: flex-end;
    width: auto;
  }

  .refresh-chip,
  .profile-trigger,
  .logout-chip,
  .login-chip {
    width: auto;
    min-width: 0;
  }

  .main-content {
    padding-bottom: 1rem;
  }

  .metric-card {
    min-height: unset;
  }

  .chart-area,
  .map-container {
    min-height: 280px;
  }

  .table-responsive .table {
    min-width: 560px;
  }

  .bandeja-workspace {
    grid-template-columns: 1fr;
  }

  .bandeja-stage-menu {
    position: static;
  }

  .modal-dialog.modal-xl,
  .modal-dialog.modal-lg {
    margin: 0.75rem;
  }
}

@media (max-width: 768px) {
  .container-fluid {
    padding-left: 0.9rem !important;
    padding-right: 0.9rem !important;
  }

  .login-card,
  .panel,
  .hero-panel {
    border-radius: 14px;
  }

  .brand-block h1 {
    font-size: 1.45rem;
  }

  .dashboard-title h2,
  .section-title {
    font-size: 1.02rem;
  }

  .metric-content strong {
    font-size: 1.6rem;
  }

  .candidate-photo {
    height: 130px;
  }

  .table-responsive .table {
    min-width: 520px;
    font-size: 0.92rem;
  }

  .datatable-toolbar > *,
  .page-header-actions > * {
    width: 100%;
  }

  .btn.w-mobile-full,
  .w-mobile-full {
    width: 100%;
  }

  .login-brand {
    align-items: center;
  }

  .login-brand h1 {
    font-size: 1.25rem;
  }

  .login-brand-icon {
    width: 46px;
    height: 46px;
    font-size: 1.15rem;
  }

  .compact-form-grid .row > [class*="col-"] {
    width: 100%;
  }

  .topbar-meta {
    width: 100%;
    gap: 0.5rem;
  }

  .refresh-chip,
  .profile-trigger,
  .logout-chip,
  .login-chip {
    width: 100%;
  }

  .profile-trigger {
    min-width: 0;
  }
}

@media (max-width: 576px) {
  .topbar {
    padding: 0.75rem 0.85rem;
  }

  .hero-panel {
    padding: 1rem;
  }

  .metric-card {
    padding: 0.8rem;
    gap: 0.65rem;
  }

  .metric-icon {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .table-responsive .table {
    min-width: 480px;
  }

  .modal-dialog {
    margin: 0.5rem;
  }
}

.process-progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.process-progress-overlay.show {
  display: grid;
}

.process-progress-card {
  min-width: 230px;
  padding: 1.5rem;
  border-radius: 0.75rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  text-align: center;
}

.process-progress-ring {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, #fff 68%, transparent 70%),
    conic-gradient(#0d6efd, #22c55e, #f59e0b, #0d6efd);
  animation: process-progress-spin 0.85s linear infinite;
}

.status-code-icon {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 0.5rem;
  background: #fef3c7;
  color: #92400e;
  font-size: 1.35rem;
}

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