/* =====================================================================
   Skin "Compacto claro" · módulo de usuario Samaria
   ---------------------------------------------------------------------
   Diseñado primero para móvil; se carga DESPUÉS de las hojas de Otika.
   Los colores de marca (--p, --p-hover, --p-soft, --p-line, --p-ink, --bg)
   los imprime includes/tema.php según la paleta configurada.

   Puntos de corte (coinciden con los de Otika, que usa 1024px):
     Móvil   < 700px    barra de pestañas inferior, sin menú lateral
     Tablet  700–1024px barra lateral angosta de íconos (88px)
     Laptop  ≥ 1025px   menú lateral completo (250px)
   ===================================================================== */

:root {
  /* Valores por defecto: tema.php los reemplaza */
  --p: #0E6E78; --p-hover: #0C5F68; --p-soft: #E7F1F2; --p-line: #B7D4D7; --p-ink: #FFFFFF; --bg: #F2F5F5;

  --surface: #FFFFFF;
  --ink: #101828;
  --muted: #475467;
  --subtle: #667085;
  --line: #E4E7EC;
  --ok: #067647;  --ok-bg: #ECFDF3;  --ok-line: #ABEFC6;
  --warn: #B54708; --warn-bg: #FFFAEB; --warn-line: #FEDF89;
  --bad: #B42318; --bad-bg: #FEF3F2; --bad-line: #FECDCA;
  --info: #175CD3; --info-bg: #EFF8FF; --info-line: #B2DDFF;
  --r: 8px;
  --r-sm: 6px;
  --tabbar-h: 60px;
  --rail-w: 88px;
  --side-w: 250px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font); color: var(--ink); }
a { color: var(--p); }
a:hover, a:focus { color: var(--p-hover); }
.text-gray-800 { color: var(--ink) !important; }
:focus-visible { outline: 3px solid var(--p-line); outline-offset: 2px; }
.loader { background-color: var(--bg); }
.navbar-bg { display: none; }
.sm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Barra superior ---------- */
.navbar.main-navbar {
  height: 56px;
  left: 0; right: 0;
  padding: 0 8px 0 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  z-index: 890;
}
.navbar .sm-logo { height: 26px; width: auto; display: block; }
.navbar .sm-title { display: none; font-size: 18px; font-weight: 600; margin: 0; color: var(--ink); }
.navbar .sm-when { display: none; font-size: 13px; color: var(--muted); white-space: nowrap; margin-right: 8px; }
.navbar .sm-when svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }
.navbar .collapse-btn { display: none !important; }
.navbar .nav-link-user {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 4px !important;
  gap: 8px;
}
.sm-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--p); color: var(--p-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.navbar .sm-user-name { display: none; color: var(--ink); font-size: 14px; }
.navbar .dropdown-toggle::after { display: none; }
.navbar .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .12);
  padding: 6px 0;
  min-width: 260px;
  margin-top: 6px;
}
.navbar .dropdown-menu .dropdown-title {
  padding: 8px 16px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.navbar .dropdown-menu .dropdown-title b { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.navbar .dropdown-menu .dropdown-item {
  min-height: 44px; display: flex; align-items: center; gap: 10px;
  padding: 0 16px; font-size: 14px; color: var(--ink);
}
.navbar .dropdown-menu .dropdown-item:hover { background: var(--p-soft); }
.navbar .dropdown-menu .dropdown-item.text-danger { color: var(--bad) !important; }
.sm-menu-label { padding: 8px 16px 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sm-swatches { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 16px 12px; }
.sm-swatch {
  width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line);
}
.sm-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Menú lateral: oculto en móvil ---------- */
.main-sidebar { display: none; }

/* ---------- Contenido ---------- */
.main-content {
  padding: 68px 12px calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom, 0px));
  width: 100%;
}
.main-content > .section > .row,
.main-content .section .row { margin-left: -6px; margin-right: -6px; }
.main-content .section .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }

/* La fecha suelta de Otika sobra: va en la barra superior (tablet/laptop) y en el saludo */
.main-content .section > .d-sm-flex:has(> h1.h6) { display: none !important; }

/* Saludo y próxima reserva (includes/saludo.php) */
.sm-hello { margin: 4px 0 14px; }
.sm-hello h1 { font-size: 20px; font-weight: 600; margin: 0; }
.sm-hello p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.sm-next {
  background: var(--p-soft);
  border: 1px solid var(--p-line);
  border-radius: var(--r);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.sm-next .k { font-size: 12px; font-weight: 600; color: var(--muted); }
.sm-next h2 { font-size: 18px; font-weight: 600; margin: 2px 0 4px; }
.sm-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink); }
.sm-facts span { display: inline-flex; align-items: center; gap: 5px; }
.sm-facts svg { width: 15px; height: 15px; color: var(--muted); }
.sm-next .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.sm-sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.sm-sechead h2 { font-size: 16px; font-weight: 600; margin: 0; }
.sm-sechead span { font-size: 12px; color: var(--muted); }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: none;
  margin-bottom: 12px;
}
.card .card-header {
  min-height: 0;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.card .card-header h4 { font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--ink); }
.card .card-body { padding: 14px; }

/* Áreas del dashboard: fila compacta miniatura | nombre | Reservar | info */
.main-content .row > [class*="col-"]:has(> .card > .card-statistic-4) { flex: 0 0 100%; max-width: 100%; }
.card:has(> .card-statistic-4) { margin-bottom: 8px; overflow: hidden; }
.card-statistic-4 { padding: 8px 8px 8px 8px; }
.card-statistic-4 > div > .row { display: flex; flex-wrap: nowrap; align-items: center; margin: 0; gap: 10px; }
.card-statistic-4 > div > .row > [class*="col-"] { padding: 0 !important; max-width: none; }
.card-statistic-4 > div > .row > [class*="col-"]:last-child { order: -1; flex: 0 0 52px; }
.card-statistic-4 > div > .row > [class*="col-"]:first-child { flex: 1 1 auto; min-width: 0; }
.card-statistic-4 .banner-img {
  width: 52px; height: 52px; border-radius: var(--r-sm);
  background: var(--bg); display: flex; align-items: center; justify-content: center;
  padding: 4px; overflow: hidden;
}
.card-statistic-4 .banner-img img { width: auto !important; height: auto !important; max-width: 100%; max-height: 100%; object-fit: contain; }
.card-statistic-4 .card-content { display: flex; align-items: center; gap: 4px; min-height: 52px; }
.card-statistic-4 .card-content h5 {
  flex: 1 1 auto; min-width: 0; margin: 0;
  font-size: 15px !important; font-weight: 600; color: var(--ink);
}
.card-statistic-4 .card-content h2:empty,
.card-statistic-4 .card-content > p.mb-0 { display: none; }
.card-statistic-4 .card-content h2 { font-size: 12px !important; color: var(--muted); margin: 0 !important; }
.card-statistic-4 .card-content .btnrsv { order: 3; margin: 0; flex-shrink: 0; }
.card-statistic-4 .card-content [data-toggle="tooltip"] {
  order: 4; width: 40px; height: 44px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--subtle);
}
.card-statistic-4 .card-content .btnrsv svg,
.card-statistic-4 .card-content .btnrsv .feather-16 { width: 16px; height: 16px; }

/* ---------- Botones ---------- */
.btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 38px;
  box-shadow: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn-sm, .btn-xs { min-height: 40px; font-size: 13px; }
.btn-lg { min-height: 48px; font-size: 15px; }
.btn-block { display: flex; width: 100%; }
.btn-primary, .btn-success, .btn-info {
  background: var(--p) !important; border-color: var(--p) !important; color: var(--p-ink) !important;
}
.btn-primary:hover, .btn-success:hover, .btn-info:hover,
.btn-primary:focus, .btn-success:focus, .btn-info:focus {
  background: var(--p-hover) !important; border-color: var(--p-hover) !important; color: var(--p-ink) !important;
}
.btn-danger { background: var(--surface) !important; border: 1px solid var(--bad-line) !important; color: var(--bad) !important; }
.btn-danger:hover { background: var(--bad-bg) !important; }
.btn-warning { background: var(--warn-bg) !important; border: 1px solid var(--warn-line) !important; color: var(--warn) !important; }
.btn-default, .btn-secondary, .btn-light {
  background: var(--surface) !important; border: 1px solid var(--line) !important; color: var(--ink) !important;
}
.btn-default:hover, .btn-secondary:hover, .btn-light:hover { background: var(--bg) !important; }
.btn-outline-success, .btn-outline-primary { color: var(--p) !important; border-color: var(--p-line) !important; background: var(--surface) !important; }
.btn-outline-success:hover, .btn-outline-primary:hover { background: var(--p-soft) !important; }
.btn-outline-danger { color: var(--bad) !important; border-color: var(--bad-line) !important; background: var(--surface) !important; }
.btn:disabled, .btn.disabled { opacity: 1; background: var(--bg) !important; color: var(--subtle) !important; border-color: var(--line) !important; }

/* ---------- Formularios ---------- */
.form-control, .custom-select {
  min-height: 44px; height: auto;
  border-radius: var(--r-sm);
  border: 1px solid #D0D5DD;
  box-shadow: none;
  font-size: 16px; /* 16px evita el zoom automático en iOS */
  color: var(--ink);
  background-color: var(--surface);
}
.form-control:focus, .custom-select:focus { border-color: var(--p); box-shadow: 0 0 0 3px var(--p-soft); }
.form-control[readonly] { background: var(--bg); }
label, .control-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input-group-text { border-radius: var(--r-sm); background: var(--bg); border-color: #D0D5DD; color: var(--muted); }
.form-control[style*="width: 180px"], select.form-control[style*="width: 180px"] { width: 100% !important; max-width: 320px; }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--p); border-color: var(--p); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--p); }

/* ---------- Tablas ---------- */
.table { color: var(--ink); font-size: 14px; margin-bottom: 0; }
.table th, .table:not(.table-sm) thead th, .card .table tr:first-child > th {
  background: var(--bg); color: var(--muted); font-size: 12px; font-weight: 600; border: 0;
  padding-top: 10px; padding-bottom: 10px;
}
.table:not(.table-sm):not(.table-md):not(.dataTable) td,
.table:not(.table-sm):not(.table-md):not(.dataTable) th { height: auto; padding: 10px 12px; vertical-align: middle; border-top: 1px solid var(--line); }
.table-striped tbody tr:nth-of-type(odd) { background: transparent; }

/* Tabla que se convierte en tarjetas en móvil (class="table-stack" + data-label) */
@media (max-width: 699.98px) {
  .table-stack, .table-stack tbody, .table-stack td { display: block; width: 100% !important; min-width: 0 !important; }
  .table-stack tr { display: flex; flex-direction: column; width: 100%; }
  .table-stack tr:first-child:has(th), .table-stack thead { display: none; }
  .table-stack tr {
    background: var(--surface) !important; border: 1px solid var(--line); border-radius: var(--r);
    padding: 8px 12px; margin: 0 0 8px;
  }
  .table-stack td {
    display: flex !important; justify-content: space-between; align-items: center; gap: 12px;
    padding: 6px 0 !important; border: 0 !important; height: auto !important; text-align: right !important;
  }
  .table-stack td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
  .table-stack td[data-label=""]::before { content: none; }
  .table-stack td.sm-td-title { order: -1; font-size: 16px; font-weight: 600; justify-content: flex-start; text-align: left !important; padding-bottom: 4px !important; }
  .table-stack td.sm-td-title::before { content: none; }
  .table-stack td.sm-td-acts { order: 9; justify-content: flex-end; border-top: 1px solid var(--line) !important; margin-top: 6px; padding-top: 10px !important; }
  .table-stack td.sm-td-acts::before { content: none; }
  .card:has(.table-stack) { background: transparent; border: 0; }
  .card:has(.table-stack) .card-header { padding: 0 0 10px; border: 0; }
  .card:has(.table-stack) .card-body { padding: 0 !important; }
}

/* ---------- Alertas y etiquetas ---------- */
.alert {
  border-radius: var(--r); border: 1px solid; font-size: 14px; padding: 10px 44px 10px 14px;
  margin-bottom: 12px;
}
.alert strong { font-weight: 600; }
.alert.alert-success { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.alert.alert-info    { background: var(--info-bg); border-color: var(--info-line); color: var(--info); }
.alert.alert-warning { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.alert.alert-danger  { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.alert .close { color: inherit; opacity: .7; text-shadow: none; height: 100%; padding: 0 14px; top: 0; }
.badge { border-radius: 10px; font-weight: 600; font-size: 11px; padding: 3px 8px; }
.badge-success { background: var(--ok-bg); color: var(--ok); }
.badge-warning { background: var(--warn-bg); color: var(--warn); }
.badge-danger  { background: var(--bad-bg); color: var(--bad); }
.badge-info, .badge-primary { background: var(--p-soft); color: var(--p); }

/* ---------- Modales: hoja inferior en móvil ---------- */
.modal-content { border: 0; border-radius: 12px; box-shadow: 0 24px 48px rgba(16, 24, 40, .2); }
.modal-header { border-bottom: 1px solid var(--line); padding: 14px 16px; align-items: center; }
.modal-header .modal-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.modal-header .close { width: 44px; height: 44px; margin: -10px -10px -10px auto; padding: 0; }
.modal-body { padding: 16px; }
.modal-footer { border-top: 1px solid var(--line); padding: 12px 16px; }
@media (max-width: 699.98px) {
  .modal.fade .modal-dialog { transform: translateY(40px); }
  .modal.show .modal-dialog { transform: none; }
  .modal-dialog { margin: 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
  .modal-content { border-radius: 14px 14px 0 0; max-height: 92vh; overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0px); }
  .modal-footer { position: sticky; bottom: 0; background: var(--surface); }
  .modal-footer .btn { flex: 1; min-height: 44px; }
}

/* Campos dentro de input-group del modal de reserva: ocupar todo el ancho */
.modal-body .input-group { flex-wrap: nowrap; }
.modal-body .input-group > [class*="col-"] { flex: 1 1 auto; max-width: none; padding: 0; }
.modal-body .input-group .form-control,
.modal-body .input-group select.form-control { width: 100% !important; max-width: none; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.modal-body .input-group-prepend .input-group-text { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 44px; justify-content: center; }
.modal-body .div_nucleo { width: 100% !important; }
@media (max-width: 699.98px) {
  .modal-body .form-group:has(button[type="submit"]) .input-group,
  .modal-body .form-group:has(button[type="submit"]) .input-group-prepend { display: block; width: 100%; }
  .modal-body button[type="submit"] { width: 100%; min-height: 48px; }
}

/* ---------- Select2 ---------- */
body .select2-container--default .select2-selection--single { height: 44px; border-radius: var(--r-sm); border-color: #D0D5DD; }
body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 42px; }
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
body .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--p); color: var(--p-ink); }

/* ---------- Alertify ---------- */
body .alertify-notifier .ajs-message { border-radius: var(--r); color: #fff; font-size: 14px; text-shadow: none; }
body .alertify-notifier .ajs-message.ajs-success { background: #067647; }
body .alertify-notifier .ajs-message.ajs-error   { background: #B42318; }
body .alertify-notifier .ajs-message.ajs-warning { background: #B54708; }
body .alertify .ajs-dialog { border-radius: 12px; }
body .alertify .ajs-footer .ajs-button.ajs-ok { background: var(--p); color: var(--p-ink); border-radius: var(--r-sm); }

/* ---------- Barra de pestañas inferior (includes/tabbar.php) ---------- */
.sm-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 895;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.sm-tabbar a, .sm-tabbar button {
  flex: 1; min-height: var(--tabbar-h);
  border: 0; background: transparent;
  color: var(--muted); text-decoration: none !important;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-family: var(--font); font-size: 12px; font-weight: 600; position: relative; cursor: pointer;
}
.sm-tabbar svg { width: 22px; height: 22px; }
.sm-tabbar [aria-current="page"] { color: var(--p); }
.sm-tabbar [aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--p);
}

/* ---------- Botón flotante "Consultar reserva" (operadores) ---------- */
.sm-fab, .whatsapp {
  position: fixed; right: 16px; bottom: 24px; z-index: 100;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 18px;
  background: var(--p); color: var(--p-ink) !important;
  border-radius: 24px; font-size: 14px; font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .2);
}
.sm-fab:hover { background: var(--p-hover); }
@media (max-width: 699.98px) { .sm-fab, .whatsapp { display: none !important; } }  /* en móvil está en la barra de pestañas */

/* ---------- Pie de página ---------- */
.main-footer {
  background: transparent; border-top: 1px solid var(--line);
  color: var(--subtle); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0;
  padding: 14px 12px calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom, 0px));
  margin-top: 8px;
}
.main-footer .footer-left, .main-footer .footer-right { float: none; text-transform: none; font-weight: 400; }
.main-footer a { color: var(--muted); font-weight: 400; }
.main-footer .bullet { display: none; }

/* ---------- Login ---------- */
body.sm-login { background: var(--bg); min-height: 100vh; display: flex; align-items: center; padding: 16px 0; }
.sm-login-wrapper {
  width: calc(100% - 24px); max-width: 400px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 20px;
}
.sm-login-brand { text-align: center; }
.sm-login-brand img { max-width: 150px; height: auto; margin-bottom: 8px; }
.sm-login-wrapper h1 { font-size: 20px; font-weight: 600; text-align: center; margin: 4px 0 20px; }
.sm-login-wrapper form { text-align: left; }
.sm-login-wrapper .separator { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 14px; text-align: center; font-size: 13px; }
.sm-login-wrapper .separator a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.sm-login-wrapper .separator img { max-width: 140px; height: auto; margin-top: 8px; }

/* =====================================================================
   TABLET · 700px – 1024px: barra lateral de íconos
   ===================================================================== */
@media (min-width: 700px) {
  .sm-tabbar { display: none; }
  .navbar.main-navbar { left: var(--rail-w); height: 60px; padding: 0 12px 0 24px; }
  .navbar .sm-logo { display: none; }
  .navbar .sm-title { display: block; }
  .main-content { padding: 84px 24px 24px calc(var(--rail-w) + 24px); }
  .main-footer { padding: 14px 24px 20px calc(var(--rail-w) + 24px); }

  .main-sidebar,
  body.sidebar-gone .main-sidebar {
    display: block; left: 0 !important; width: var(--rail-w);
    background: var(--surface); border-right: 1px solid var(--line); box-shadow: none;
    position: fixed !important; top: 0; height: 100%; overflow-y: auto;
  }
  .main-sidebar .sidebar-brand { height: 60px; line-height: 60px; }
  .main-sidebar .sidebar-brand a { display: flex; align-items: center; justify-content: center; height: 60px; }
  .main-sidebar .sidebar-brand a .header-logo { display: none; }
  .main-sidebar .sidebar-brand .logo-name { display: none; }
  .main-sidebar .sidebar-brand .sm-brandmark {
    width: 44px; height: 44px; border-radius: var(--r); background: var(--p); color: var(--p-ink);
    display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; letter-spacing: 0;
  }
  .sm-profile, .main-sidebar .sidebar-menu li.menu-header { display: none; }
  .main-sidebar .sidebar-menu { padding: 8px; }
  .main-sidebar .sidebar-menu li { margin-bottom: 4px; }
  .main-sidebar .sidebar-menu li a,
  body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a {
    flex-direction: column; justify-content: center; gap: 4px;
    height: auto; min-height: 60px; padding: 6px 4px !important;
    border-radius: var(--r); color: var(--muted); background: transparent;
    font-size: 11px; font-weight: 600; letter-spacing: 0; text-align: center; line-height: 1.2;
  }
  .main-sidebar .sidebar-menu li a span { margin: 0 !important; white-space: normal; }
  .main-sidebar .sidebar-menu li a i, .main-sidebar .sidebar-menu li a svg { width: 22px !important; height: 22px; margin: 0 !important; color: inherit; stroke: currentColor; }
  .main-sidebar .sidebar-menu li a:hover { background: var(--bg); color: var(--ink); }
  body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a::before { display: none; }
  .main-sidebar .sidebar-menu li.active > a,
  body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a { background: var(--p-soft); color: var(--p); }
  .main-sidebar .sm-salir a { color: var(--bad) !important; }

  .main-content .row > [class*="col-"]:has(> .card > .card-statistic-4) { flex: 0 0 50%; max-width: 50%; }
  .sm-hello { display: none; }
  .sm-next { flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 18px; }

  .modal-dialog { max-width: 520px; }
}

/* =====================================================================
   LAPTOP · ≥ 1025px: menú lateral completo
   ===================================================================== */
@media (min-width: 1025px) {
  .navbar.main-navbar { left: var(--side-w); padding: 0 16px 0 28px; }
  .navbar .sm-when { display: inline-block; }
  .navbar .sm-user-name { display: inline; }
  .main-content { padding: 84px 28px 24px calc(var(--side-w) + 28px); }
  .main-footer { padding: 14px 28px 20px calc(var(--side-w) + 28px); }

  .main-sidebar, body.sidebar-gone .main-sidebar { width: var(--side-w); }
  .main-sidebar .sidebar-brand a { justify-content: flex-start; padding: 0 20px; gap: 10px; }
  .main-sidebar .sidebar-brand a .header-logo { display: block; height: 32px; width: auto; max-width: 180px; object-fit: contain; }
  .main-sidebar .sidebar-brand .sm-brandmark { display: none; }
  .sm-profile { display: flex; align-items: center; gap: 10px; padding: 10px 20px 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .sm-profile .sm-avatar {
    width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
    background: var(--p); color: var(--p-ink); border: 0; padding: 0; box-shadow: none;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600;
  }
  .sm-profile .sm-profile-info span { display: block; font-size: 12px; color: var(--muted); line-height: 1.3; }
  .sm-profile .sm-profile-info h2 { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .main-sidebar .sidebar-menu { padding: 4px 12px; }
  .main-sidebar .sidebar-menu li a,
  body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu > li.active > a {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    min-height: 44px; padding: 0 12px !important; font-size: 14px; font-weight: 500; text-align: left;
  }
  .main-sidebar .sidebar-menu li a i, .main-sidebar .sidebar-menu li a svg { width: 20px !important; height: 20px; }
  .main-sidebar .sidebar-menu li.active > a { font-weight: 600 !important; }

  .main-content .row > [class*="col-"]:has(> .card > .card-statistic-4) { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 1400px) {
  .main-content .row > [class*="col-"]:has(> .card > .card-statistic-4) { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
