html,
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

a,
.btn-link {
  color: #006bb7;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow:
    0 0 0 0.1rem white,
    0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

h1:focus {
  outline: none;
}

.valid.modified:not([type="checkbox"]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  background:
    url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=)
      no-repeat 1rem/1.8rem,
    #b32121;
  padding: 1rem 1rem 1rem 3.7rem;
  color: white;
}

.blazor-error-boundary::after {
  content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.successMessage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #4caf50;
  color: white;
  padding: 20px;
  border-radius: 5px;
  z-index: 1;
}

/* =========================================================================
   Estilo cebra (filas alternas) en las tablas de datos.
   Se usan los mismos "accent" de Bootstrap 5 que .table-striped para que funcione
   igual en las filas generadas por JS (DataTables) y no pisar el hover de .table-hover.
   Aplica a: #adminTable (visitantes), #userTable (usuarios), #report* (reportes),
   Apartments, Bikes, EnrolarBicicletas y el historial de correspondencia.
   Referencia: wwwroot/bootstrap/bootstrap.min.css (--bs-table-*).
   ========================================================================= */
.table {
  /* Tinte azul de la paleta del panel (#0d4b9a al 5%), semitransparente para no tapar
     el resaltado de la columna ordenada de DataTables ni el hover. */
  --bs-table-striped-bg: rgba(13, 75, 154, 0.05);
}

.table > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: var(--bs-table-striped-bg);
  color: var(--bs-table-striped-color);
}

/* La cebra no debe tapar el resaltado de las tablas con .table-hover */
.table-hover > tbody > tr:hover > * {
  --bs-table-accent-bg: var(--bs-table-hover-bg);
  color: var(--bs-table-hover-color);
}

/* Grilla de visitantes (#adminTable): misma tipografia y tamano base que el resto del panel. */
#adminTable {
  font-family: inherit;
  font-size: 0.85rem;
}

/* Salida de visitantes / Visitantes dentro del conjunto */
.sv-card {
  border-radius: 12px;
  border: 1px solid #d8dee8;
  box-shadow: 0 2px 6px rgba(18, 45, 84, 0.06);
  font-size: 0.85rem;   /* base del panel: igual que .dash-panel-body / .activity-text */
}

.sv-body {
  padding: 0.9rem 1rem 0.8rem;
}

.sv-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sv-title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;      /* = .dash-panel-title */
  color: #0f1115;
}

.sv-search-wrap {
  position: relative;
  width: min(620px, 100%);
}

.sv-search-wrap .rz-textbox,
.sv-search-wrap input {
  width: 100%;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #7f97b7;
  padding-right: 42px;
  font-size: 0.85rem;
}

.sv-search-btn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #0d4b9a;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.sv-search-btn:hover {
  background: #eaf2ff;
}

.sv-chip-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.sv-chip {
  border: 1px solid #c8d0db;
  background: #f8fafc;
  border-radius: 18px;
  color: #2d3848;
  font-size: 0.75rem;
  padding: 0.12rem 0.6rem;
}

.sv-chip-active {
  background: #0d4b9a;
  border-color: #0d4b9a;
  color: #fff;
}

.sv-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff8b3d;
  margin-left: 0.35rem;
}

#adminTable.sv-table thead th {
  background: #0d4b9a;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 0;
  padding: 0.55rem 0.75rem;
}

#adminTable.sv-table tbody td {
  vertical-align: middle;
  border-color: #dde4ee;
  font-size: 0.85rem;
}

.sv-visitor-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* En esta tarjeta el icono de "Ver foto" se ajusta al tamano de letra del listado
   (en los reportes conserva los 1.5rem de .sat-photo-icon). */
.sv-card .sat-photo-icon {
  font-size: 1rem;
}

.sv-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #e7ebf0;
  color: #8a98aa;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sv-visitor-meta {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.1;
}

.sv-visitor-name {
  font-weight: 700;
}

.sv-visitor-doc {
  color: #4e5b6f;
  font-size: 0.78rem;
}

.sv-vehicle {
  font-weight: 600;
}

.sv-vehicle i {
  color: #1f2c3f;
}

.sv-walk {
  font-weight: 500;
}

.sv-stay-long {
  color: #a44f1f;
  font-weight: 700;
  background: #ffe8dc;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
}

.sv-exit-btn {
  background: #1466d8;
  border: 1px solid #0f59be;
  color: #fff;
  border-radius: 8px;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.sv-exit-btn:hover {
  background: #0f59be;
}

@media (max-width: 992px) {
  .sv-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

#components-reconnect-modal {
  display: none !important;
}

.custom-dropdown .rz-dropdown-item,
.rz-menuitem,
.rz-autocomplete-list-item,
.rz-multiselect-item,
.rz-dropdown-items li,
.rz-autocomplete-items li,
.rz-multiselect-items li {
  font-size: smaller;
}

.rz-calendar
  .rz-inputtext
  .rz-dropdown
  .rz-datepicker-calendar
  td
  .rz-state-default {
  font-size: smaller;
}
.rz-datepicker.rz-popup {
  width: 360px !important;
  height: 500px;
}

/*Popup -> Size of the box*/
.rz-datepicker.rz-popup {
  width: 360px !important;
  height: 500px;
}

#video {
  margin-bottom: 10px;
  border: 2px solid #ccc;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.custom-row {
  display: flex;
  justify-content: space-between;
  margin: 20px 0; /* Ajusta según sea necesario */
}

.custom-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Styles moved from Components/Pages/Login.razor */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 90vh;
}

.login-box {
  max-width: 400px;
  width: 100%;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-box .form-group {
  margin-bottom: 15px;
}

.login-box label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.login-box .form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-box .btn {
  display: inline-block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  background-color: #007bff;
  color: #fff;
  border: 1px solid #007bff;
  border-radius: 4px;
  cursor: pointer;
}

.login-box .btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
}

/* Visitantes page */
.vis-card {
  margin: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  /*max-height: calc(100vh - 110px);*/
}
.vis-card .card-body {
  overflow-y: auto;
}
.vis-main-action {
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 14px;
}
.vis-panel {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}
.vis-panel-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  letter-spacing: 0.05em;
}
.vis-panel-body {
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.vis-capture-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 90, 200, 0.85);
  border: none;
  border-radius: 24px;
  color: #fff;
  padding: 8px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.vis-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  min-height: 220px;
  background: #f8f9fa;
  font-size: 0.85rem;
  gap: 8px;
  width: 100%;
}
.vis-photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}
.vis-retry-bar {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 6px 12px;
  text-align: right;
}
.input-icon-wrap {
  position: relative;
}
.input-icon-wrap .input-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  pointer-events: none;
  z-index: 1;
}
.input-icon-wrap .rz-textbox,
.input-icon-wrap input.form-control {
  padding-left: 2rem !important;
}

@media (max-height: 800px) {
  .vis-card {
    max-height: calc(100vh - 76px);
  }

  .vis-body {
    padding: 0.75rem !important;
    overflow: hidden;
  }

  .vis-title-block {
    margin-bottom: 0.5rem !important;
  }

  .vis-subtitle {
    margin-bottom: 0;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .vis-section-row {
    --bs-gutter-y: 0.35rem;
    margin-bottom: 0.45rem !important;
  }

  .vis-section-row .form-label {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .vis-section-row .btn,
  .vis-main-action,
  .vis-capture-btn {
    font-size: 0.8rem;
  }

  .vis-main-action {
    padding: 9px;
  }

  .vis-evidence-block {
    margin-bottom: 0.5rem !important;
  }

  .vis-panel-header {
    padding: 5px 9px;
    font-size: 0.68rem;
  }

  .vis-panel-body,
  .vis-photo-placeholder,
  .vis-photo-body {
    min-height: 250px !important;
  }

  .vis-panel-body #video,
  .vis-panel-body #capturedPhoto {
    max-height: 250px !important;
  }

  .vis-photo-placeholder svg {
    width: 30px;
    height: 30px;
  }

  .vis-capture-btn {
    bottom: 8px;
    padding: 4px 12px;
  }

  .vis-retry-bar {
    padding: 3px 8px;
  }

  .alert {
    margin-bottom: 0.35rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 992px) {
  .vis-card {
    max-height: none;
  }

  .vis-card .card-body {
    overflow-y: visible;
  }
}

/* Correspondencia page */
.corr-card {
  margin: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 110px);
}
.corr-card .card-body {
  overflow-y: auto;
}
.corr-main-action {
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 14px;
}
.corr-panel {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}
.corr-panel-header {
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  padding: 8px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  letter-spacing: 0.05em;
}
.corr-panel-body {
  position: relative;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}
.corr-capture-btn {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 90, 200, 0.85);
  border: none;
  border-radius: 24px;
  color: #fff;
  padding: 8px 20px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.corr-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #adb5bd;
  min-height: 220px;
  background: #f8f9fa;
  font-size: 0.85rem;
  gap: 8px;
  width: 100%;
}
.corr-photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}
.corr-retry-bar {
  background: #f8f9fa;
  border-top: 1px solid #dee2e6;
  padding: 6px 12px;
  text-align: right;
}
/* Modal de registro de entrega de correspondencia */
.corr-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 1rem;
}
.corr-modal-panel {
  background: #fff;
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

@media (max-height: 800px) {
  .corr-card {
    max-height: calc(100vh - 76px);
  }

  .corr-body {
    padding: 0.75rem !important;
    overflow: hidden;
  }

  .corr-title-block {
    margin-bottom: 0.5rem !important;
  }

  .corr-subtitle {
    margin-bottom: 0;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  .corr-section-row {
    --bs-gutter-y: 0.35rem;
    margin-bottom: 0.45rem !important;
  }

  .corr-section-row .form-label {
    font-size: 0.78rem;
    margin-bottom: 0.2rem;
  }

  .corr-section-row .btn,
  .corr-main-action,
  .corr-capture-btn {
    font-size: 0.8rem;
  }

  .corr-main-action {
    padding: 9px;
  }

  .corr-evidence-block {
    margin-bottom: 0.5rem !important;
  }

  .corr-panel-header {
    padding: 5px 9px;
    font-size: 0.68rem;
  }

  .corr-panel-body,
  .corr-photo-placeholder,
  .corr-photo-body {
    min-height: 130px !important;
  }

  .corr-panel-body #video,
  .corr-panel-body #capturedPhoto {
    max-height: 150px !important;
  }

  .corr-photo-placeholder svg {
    width: 30px;
    height: 30px;
  }

  .corr-capture-btn {
    bottom: 8px;
    padding: 4px 12px;
  }

  .corr-retry-bar {
    padding: 3px 8px;
  }
}

@media (max-width: 992px) {
  .corr-card {
    max-height: none;
  }

  .corr-card .card-body {
    overflow-y: visible;
  }
}

/* Acción "Ver foto": icono de cámara de Bootstrap Icons (32x32 aprox.).
   Reemplaza la imagen icono_camara.png y los antiguos <i class="fa-solid fa-camera">. */
.sat-photo-icon {
  display: inline-block;
  font-size: 1.5rem;
  line-height: 1;
  color: #0d6efd;
  vertical-align: middle;
}

/* =========================================================================
   Dashboard Operativo (PRD Documentacion/DocumentacionFuncional/DashboardOperativo/Dashboard.md)
   Barra superior del shell + las 6 zonas del resumen operativo.
   Se apoya en las familias existentes (.card.shadow-sm, .sv-*, badges Bootstrap, bi bi-*).
   ========================================================================= */

/* --- Barra superior (RF-03, RF-14, RF-15, RF-17) --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 1.5rem 0.5rem 2rem;
  background-color: #fff;
  border-bottom: 1px solid #d8dee8;
  box-shadow: 0 1px 4px rgba(18, 45, 84, 0.06);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 210px;
}

.topbar-logo {
  height: 34px;
}

.topbar-building-block {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.topbar-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b8794;
}

.topbar-building {
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f1115;
}

.topbar-company {
  font-size: 0.7rem;
  color: #7b8794;
}

.topbar-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

.live-pill--green {
  color: #0f5132;
  background-color: #d1e7dd;
  border-color: #a3cfbb;
}

.live-pill--amber {
  color: #664d03;
  background-color: #fff3cd;
  border-color: #ffda6a;
}

.live-pill--gray {
  color: #41464b;
  background-color: #e2e3e5;
  border-color: #c5c8cb;
}

.live-time {
  font-size: 0.72rem;
  color: #7b8794;
}

.topbar-search {
  position: relative;
  flex: 1 1 260px;
  max-width: 460px;
}

.topbar-search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  color: #7b8794;
  pointer-events: none;
}

.topbar-search-input {
  width: 100%;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #b8c5d6;
  background-color: #f7f9fc;
  padding: 0 0.75rem 0 2rem;
  font-size: 0.85rem;
}

.topbar-search-input:focus {
  outline: none;
  background-color: #fff;
  border-color: #258cfb;
  box-shadow: 0 0 0 0.15rem rgba(37, 140, 251, 0.18);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.topbar-icon-btn {
  position: relative;
  border: 1px solid #d8dee8;
  background-color: #fff;
  border-radius: 10px;
  width: 38px;
  height: 36px;
  color: #3d4a5c;
  cursor: pointer;
}

.topbar-icon-btn:hover {
  background-color: #f2f6fb;
}

.topbar-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background-color: #dc3545;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #0f1115;
}

/* --- Encabezado del resumen (RF-01) --- */
.dash-container {
  padding: 1rem 0 2rem;
}

.dash-title-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.dash-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0;
  color: #0f1115;
}

.dash-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #6c757d;
}

.dash-title-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dash-updated {
  font-size: 0.78rem;
  color: #6c757d;
}

.dash-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7b8794;
  margin: 0.5rem 0 0.5rem;
}

/* --- Tarjetas KPI (RF-04..RF-08) --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.kpi-card {
  border-radius: 12px;
  border: 1px solid #d8dee8;
  height: 100%;
}

.kpi-card--attention {
  border-color: #ffda6a;
  background-color: #fffdf5;
}

.kpi-body {
  padding: 0.85rem 1rem;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.kpi-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #55606d;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-icon {
  font-size: 1.1rem;
  color: #1b6ec2;
}

.kpi-value {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f1115;
}

.visitor-count-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.visitor-count {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  border-left: 1px solid #e6ebf2;
  text-align: center;
}

.visitor-count:first-child {
  border-left: 0;
}

.visitor-count-value {
  color: #0f1115;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.visitor-count-label {
  color: #6c757d;
  font-size: 0.62rem;
  line-height: 1.2;
}

.kpi-caption {
  font-size: 0.78rem;
  color: #6c757d;
}

/* Ronda mostrada en el KPI (en curso o ultima ejecutada) */
.kpi-round {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.75rem;
  color: #55606d;
}

.kpi-round-name {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  font-weight: 600;
  color: #1b6ec2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-round-schedule {
  font-variant-numeric: tabular-nums;
}

.kpi-round-state {
  font-size: 0.65rem;
}

.kpi-card--dense .kpi-value {
  font-size: 1.4rem;
}

/* --- Paneles del dashboard (mismo patron que .corr-panel) --- */
.dash-panel {
  border-radius: 12px;
  border: 1px solid #d8dee8;
  height: 100%;
}

.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e6ebf2;
}

.dash-panel-header--wrap {
  flex-wrap: wrap;
}

.dash-panel-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #0f1115;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-panel-body {
  padding: 0.9rem 1rem;
}

.dash-empty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  color: #6c757d;
  font-size: 0.88rem;
}

.dash-skeleton {
  padding: 0.75rem 0;
  color: #9aa5b1;
  font-size: 0.88rem;
}

/* --- Alertas del sistema (RF-09) --- */
.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}

.alert-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  border-left: 4px solid #c5c8cb;
  background-color: #f8f9fa;
  margin-bottom: 0.5rem;
}

.alert-item--critical {
  border-left-color: #dc3545;
  background-color: #fdf2f3;
}

.alert-item--attention {
  border-left-color: #ffc107;
  background-color: #fffaf0;
}

.alert-item--warning {
  border-left-color: #0dcaf0;
  background-color: #f2fbfd;
}

.alert-item-icon {
  font-size: 1.05rem;
  margin-top: 0.15rem;
}

.alert-item--critical .alert-item-icon {
  color: #dc3545;
}

.alert-item--attention .alert-item-icon {
  color: #b8860b;
}

.alert-item--warning .alert-item-icon {
  color: #0aa2c0;
}

.alert-item-body {
  flex: 1;
}

.alert-item-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7b8794;
}

.alert-item-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f1115;
}

.alert-item-detail {
  font-size: 0.8rem;
  color: #55606d;
}

.alert-item-name {
  font-weight: 600;
  color: #0f1115;
  margin-right: 0.35rem;
}

/* --- Actividad reciente (RF-13) --- */
.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow-y: auto;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px dashed #e6ebf2;
}

/* Zebra para facilitar la lectura: mismo tinte que las tablas de datos (--bs-table-striped-bg). */
.activity-item:nth-child(odd) {
  background-color: rgba(13, 75, 154, 0.05);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-top: 0.35rem;
  flex: 0 0 auto;
  background-color: #adb5bd;
}

.activity-dot--in {
  background-color: #198754;
}

.activity-dot--out {
  background-color: #6c757d;
}

.activity-dot--vehicle {
  background-color: #1b6ec2;
}

.activity-dot--bike-in {
  background-color: #0dcaf0;
}

.activity-dot--bike-out {
  background-color: #6ea8fe;
}

.activity-dot--package {
  background-color: #fd7e14;
}

.activity-dot--delivered {
  background-color: #20c997;
}

.activity-dot--patrol {
  background-color: #6f42c1;
}

.activity-dot--alert {
  background-color: #dc3545;
}

.activity-body {
  flex: 1;
}

.activity-text {
  font-size: 0.85rem;
  color: #0f1115;
}

.activity-detail {
  font-size: 0.75rem;
  color: #7b8794;
}

.activity-time {
  font-size: 0.72rem;
  color: #7b8794;
  white-space: nowrap;
}

/* --- Secciones del menu pendientes (badge "Pronto") --- */
.nav-section-title {
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.55);
}

.nav-link--disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

/* --- Responsive: no romper los @media existentes (RNF-05) --- */
@media (max-width: 992px) {
  .topbar {
    padding: 0.5rem 0.9rem;
  }

  .topbar-search {
    order: 5;
    max-width: none;
  }

  .dash-title-block {
    align-items: flex-start;
  }

  .kpi-value {
    font-size: 1.5rem;
  }
}

/* --- Accion "Nuevo visitante" en la grilla de KPIs (ocupa el lugar del KPI de guardias) --- */
.kpi-action-card {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  font-family: inherit;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kpi-action-card:hover,
.kpi-action-card:focus-visible {
  border-color: #1b6ec2;
  box-shadow: 0 0.25rem 0.75rem rgba(27, 110, 194, 0.18);
}

.kpi-action-cta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b6ec2;
}

/* --- Popup que reutiliza la interfaz de registro de /Visitantes --- */
.sat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  z-index: 1055;
  overflow-y: auto;
}

.sat-modal-panel {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 1000px;
  margin: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sat-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e6ebf2;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.sat-modal-body {
  padding: 0.25rem;
}

.sat-modal-body .vis-card {
  border: none;
  box-shadow: none !important;
}

@media (max-height: 800px) {
  .sat-modal-body .vis-card {
    max-height: calc(100vh - 8rem);
  }
}

