/**
 * SANATORIO LOAR — Estilos del Panel Administrativo Maestro (https://admin.sanatorioloar.com)
 *
 * Estética arquitectónica formal:
 * - Blancos (#FFFFFF, #FAFAFA), grises editoriales (#F4F4F5, #E4E4E7, #52525B, #18181B)
 * - Verde oscuro clínico (#0F3D2E, hover #0A2B20) como acento sutil
 * - Rojo sobrio (#B91C1C / #FEF2F2) para bloqueos, alertas y eliminación
 * - CERO celeste, CERO botón TikTok LIVE, 100% móvil-first (360px - 430px) + escritorio ejecutivo
 */

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  background: var(--loar-bg, #fafafa);
  color: var(--loar-text, #18181b);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

img,
svg {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 20;
  font-size: 19px;
  line-height: 1;
  user-select: none;
}

.adm-loading {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #52525b;
}

.adm-loading-logo {
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  padding: 4px;
}

/* ============================================================================
   AUTENTICACIÓN, ONBOARDING SECUENCIAL Y PIN RÁPIDO
   ============================================================================ */
.adm-auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px 14px;
  background: #fafafa;
}

.adm-auth-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 1px 3px rgba(24, 24, 27, 0.04);
}

.adm-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.adm-auth-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  padding: 4px;
  background: #ffffff;
  object-fit: contain;
}

.adm-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0f3d2e;
}

.adm-auth-title {
  margin: 2px 0 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: #18181b;
}

.adm-muted {
  color: #52525b;
  font-size: 13px;
}

.adm-stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.adm-step-bar {
  height: 4px;
  border-radius: 99px;
  background: #e4e4e7;
}

.adm-step-bar.is-done,
.adm-step-bar.is-active {
  background: #0f3d2e;
}

.adm-pin-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 260px;
  margin: 4px auto;
}

.adm-pin-boxes.is-shake {
  animation: admShake 280ms ease;
}

@keyframes admShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.adm-pin-input {
  width: 100%;
  height: 54px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  border: 1.5px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  color: #18181b;
}

.adm-pin-input:focus {
  outline: 2px solid #0f3d2e;
  outline-offset: 1px;
  border-color: #0f3d2e;
}

.adm-pin-input.is-invalid {
  border-color: #b91c1c;
  background: #fef2f2;
  color: #991b1b;
}

.adm-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-width: 260px;
  margin: 4px auto 0;
}

.adm-keypad-btn {
  min-height: 48px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
  font-size: 18px;
  font-weight: 700;
  color: #18181b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.adm-keypad-btn:hover {
  background: #f4f4f5;
}

.adm-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
  background: #fafafa;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
}

.adm-recovery-code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 0.04em;
  color: #18181b;
}

.adm-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
}

.adm-qr-box img {
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  padding: 6px;
  background: #ffffff;
}

/* ============================================================================
   SHELL EJECUTIVO (HEADER COMPACTO + 7 BOTONES EXACTOS + MAIN)
   ============================================================================ */
.adm-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e4e4e7;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-brand-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 2px;
  cursor: pointer;
  min-width: 0;
  text-align: left;
}

.adm-brand-btn img {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  padding: 2px;
  background: #ffffff;
  object-fit: contain;
  flex-shrink: 0;
}

.adm-brand-name {
  display: block;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #18181b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-brand-sub {
  display: block;
  font-size: 11px;
  color: #52525b;
  white-space: nowrap;
}

.adm-topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.adm-alert-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  background: #f4f4f5;
  color: #18181b;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.adm-alert-pill.has-unread {
  border-color: #cbd9d3;
  background: #f2f6f4;
  color: #0f3d2e;
}

.adm-layout {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 56px);
}

/* Barra superior horizontal scrollable de los 7 botones exactos en móvil */
.adm-nav-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e4e4e7;
  scrollbar-width: none;
}
.adm-nav-strip::-webkit-scrollbar { display: none; }

.adm-nav-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.adm-nav-btn:hover {
  background: #f4f4f5;
}

.adm-nav-btn.is-active {
  background: #0f3d2e;
  border-color: #0f3d2e;
  color: #ffffff;
}

.adm-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 12px 48px;
}

@media (min-width: 960px) {
  .adm-layout {
    flex-direction: row;
  }
  .adm-nav-strip {
    width: 248px;
    flex-shrink: 0;
    flex-direction: column;
    overflow-x: visible;
    border-bottom: 0;
    border-right: 1px solid #e4e4e7;
    padding: 16px 12px;
    gap: 6px;
    position: sticky;
    top: 56px;
    height: calc(100dvh - 56px);
    overflow-y: auto;
  }
  .adm-nav-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    font-size: 12.5px;
  }
  .adm-main {
    padding: 22px 26px 56px;
  }
}

/* ============================================================================
   HOME GRID DE LOS 7 BOTONES EXACTOS + TARJETAS Y FORMULARIOS
   ============================================================================ */
.adm-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-view-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.adm-view-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #18181b;
  letter-spacing: -0.015em;
}

.adm-view-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: #52525b;
}

.adm-seven-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 560px) {
  .adm-seven-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 920px) {
  .adm-seven-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.adm-hub-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.adm-hub-btn:hover {
  border-color: #0f3d2e;
  background: #fafafa;
}

.adm-hub-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #f2f6f4;
  border: 1px solid #cbd9d3;
  color: #0f3d2e;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.adm-hub-label {
  display: block;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #18181b;
}

.adm-hub-desc {
  display: block;
  font-size: 12px;
  color: #52525b;
  margin-top: 2px;
}

.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 680px) {
  .adm-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.adm-kpi {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 12px 14px;
}

.adm-kpi-num {
  display: block;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #18181b;
}

.adm-kpi-num--accent { color: #0f3d2e; }
.adm-kpi-num--danger { color: #b91c1c; }

.adm-kpi-lbl {
  display: block;
  font-size: 12px;
  color: #52525b;
  margin-top: 2px;
}

.adm-card {
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-card--subtle {
  background: #fafafa;
}

.adm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-card-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #18181b;
}

/* ============================================================================
   BOTONES, BADGES, ALERTAS Y BLOQUEOS
   ============================================================================ */
.adm-btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.adm-btn:hover:not(:disabled) {
  background: #f4f4f5;
}

.adm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adm-btn--sm {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
  border-radius: 6px;
}

.adm-btn--full { width: 100%; }

.adm-btn--primary {
  background: #0f3d2e;
  border-color: #0f3d2e;
  color: #ffffff;
}

.adm-btn--primary:hover:not(:disabled) {
  background: #0a2b20;
  border-color: #0a2b20;
}

.adm-btn--danger {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #ffffff;
}

.adm-btn--danger:hover:not(:disabled) {
  background: #991b1b;
}

.adm-btn--danger-outline {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.adm-btn--danger-outline:hover:not(:disabled) {
  background: #fee2e2;
}

.adm-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.adm-icon-btn:hover { background: #f4f4f5; }

.adm-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  background: #f4f4f5;
  color: #3f3f46;
  font-size: 11.5px;
  font-weight: 700;
}

.adm-badge--accent {
  background: #f2f6f4;
  border-color: #cbd9d3;
  color: #0f3d2e;
}

.adm-badge--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.adm-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid #e4e4e7;
  background: #f4f4f5;
  color: #18181b;
}

.adm-alert--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.adm-alert--success {
  background: #f2f6f4;
  border-color: #cbd9d3;
  color: #0f3d2e;
}

/* ============================================================================
   PESTAÑAS ACCESIBLES EN UNA SOLA FILA (modern-web-guidance: tabs)
   ============================================================================ */
.adm-tablist {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-snap-type: inline proximity;
  border-bottom: 1px solid #e4e4e7;
  scrollbar-width: none;
}
.adm-tablist::-webkit-scrollbar { display: none; }

.adm-tab {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #52525b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.adm-tab[aria-selected="true"] {
  color: #0f3d2e;
}

.adm-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid #0f3d2e;
}

/* ============================================================================
   FORMULARIOS Y SWITCH NATIVO (modern-web-guidance: switch)
   ============================================================================ */
.adm-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adm-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 600px) {
  .adm-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #18181b;
}

.adm-hint {
  font-size: 11.5px;
  color: #52525b;
}

.adm-input,
.adm-select,
.adm-textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #d4d4d8;
  border-radius: 8px;
  background: #ffffff;
  color: #18181b;
  font-size: 14px;
}

.adm-textarea {
  min-height: 88px;
  resize: vertical;
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
  outline: 2px solid #0f3d2e;
  outline-offset: 1px;
  border-color: #0f3d2e;
}

.adm-input.is-invalid {
  border-color: #b91c1c;
  background: #fef2f2;
}

.adm-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
}

input[type="checkbox"][switch] {
  accent-color: #0f3d2e;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
}

input[type="checkbox"][switch]:focus-visible {
  outline: 3px solid #0f3d2e;
  outline-offset: 3px;
}

/* Fallback visual para navegadores sin atributo nativo switch */
input[type="checkbox"][switch].adm-switch-fallback {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d4d4d8;
  position: relative;
  transition: background-color 150ms ease;
}

input[type="checkbox"][switch].adm-switch-fallback::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 150ms ease;
}

input[type="checkbox"][switch].adm-switch-fallback:checked {
  background: #0f3d2e;
}

input[type="checkbox"][switch].adm-switch-fallback:checked::after {
  transform: translateX(18px);
}

/* ============================================================================
   TABLAS RESPONSIVAS -> TARJETAS EN CELULAR (modern-web-guidance: responsive-table)
   ============================================================================ */
.adm-table-wrap {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 72dvh);
  container-type: inline-size;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  background: #ffffff;
}

.adm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.adm-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.adm-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  background: #f4f4f5;
}

.adm-table th,
.adm-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4e4e7;
  text-align: left;
  vertical-align: top;
}

.adm-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  background: #ffffff;
  font-weight: 700;
}

@container (width < 640px) {
  .adm-table-wrap {
    border: 0;
    background: transparent;
    max-block-size: none;
  }
  .adm-table,
  .adm-table thead,
  .adm-table tbody,
  .adm-table tr,
  .adm-table th,
  .adm-table td {
    display: block;
    width: 100%;
  }
  .adm-table thead {
    display: none;
  }
  .adm-table tr {
    margin-block-end: 10px;
    border: 1px solid #e4e4e7;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
  }
  .adm-table tbody th {
    position: sticky;
    inset-block-start: 0;
    background: #f4f4f5;
    border-bottom: 1px solid #e4e4e7;
  }
  .adm-table td {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
  }
  .adm-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #52525b;
    flex-shrink: 0;
  }
}

/* ============================================================================
   DIALOG NATIVO (modern-web-guidance: dialog)
   ============================================================================ */
dialog.adm-dialog {
  width: min(100% - 20px, 560px);
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  background: #ffffff;
  color: #18181b;
  box-shadow: 0 20px 50px rgba(24, 24, 27, 0.22);
  overflow: hidden;
}

dialog.adm-dialog[open] {
  display: flex;
  flex-direction: column;
}

dialog.adm-dialog--wide {
  width: min(100% - 20px, 840px);
}

dialog.adm-dialog:modal {
  overscroll-behavior: contain;
}

dialog.adm-dialog::backdrop {
  background: rgba(24, 24, 27, 0.56);
  backdrop-filter: blur(3px);
  overflow: hidden;
  overscroll-behavior: contain;
}

.adm-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e4e7;
  background: #fafafa;
  flex: none;
}

.adm-dialog-title {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #18181b;
}

.adm-dialog-body {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ============================================================================
   CHAT UNIVERSAL EN TIEMPO REAL Y VIDEOLLAMADA LIVEKIT
   ============================================================================ */
.adm-chat-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 820px) {
  .adm-chat-shell {
    grid-template-columns: 310px 1fr;
    align-items: start;
  }
}

.adm-chat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-conv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.adm-conv-row.is-active {
  border-color: #0f3d2e;
  background: #f2f6f4;
}

.adm-chat-thread {
  display: flex;
  flex-direction: column;
  height: min(68dvh, 560px);
  background: #ffffff;
  border: 1px solid #e4e4e7;
  border-radius: 10px;
  overflow: hidden;
}

.adm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}

.adm-msg-bubble {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  font-size: 13.5px;
  align-self: flex-start;
}

.adm-msg-bubble.is-self {
  align-self: flex-end;
  background: #0f3d2e;
  border-color: #0f3d2e;
  color: #ffffff;
}

.adm-msg-meta {
  font-size: 11px;
  opacity: 0.78;
  margin-bottom: 3px;
  font-weight: 600;
}

.adm-chat-composer {
  padding: 10px;
  border-top: 1px solid #e4e4e7;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  background: #18181b;
  padding: 12px;
  border-radius: 8px;
  min-height: 260px;
}

.adm-video-tile {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #27272a;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  color: #ffffff;
}

.adm-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.adm-video-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(24, 24, 27, 0.78);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
}

/* Calendario mensual */
.adm-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.adm-cal-day {
  min-height: 46px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 4px 2px;
}

.adm-cal-day.is-selected {
  background: #0f3d2e;
  border-color: #0f3d2e;
  color: #ffffff;
}

.adm-cal-dots {
  display: flex;
  gap: 3px;
}

.adm-cal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.adm-cal-dot--v { background: #0f3d2e; }
.adm-cal-dot--p { background: #18181b; }
.adm-cal-day.is-selected .adm-cal-dot { background: #ffffff; }

.adm-toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 120;
  max-width: calc(100vw - 24px);
  padding: 10px 16px;
  border-radius: 8px;
  background: #18181b;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.adm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e4e4e7;
  flex-shrink: 0;
  background: #f4f4f5;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #0f3d2e;
}

@media (max-width: 440px) {
  .adm-hide-xs {
    display: none;
  }
}

.rt-msg-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.rt-att-img-btn {
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  cursor: pointer;
  max-width: 180px;
}

.rt-att-img-btn img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
}

.rt-att-video-wrap {
  width: 100%;
  max-width: 260px;
}

.rt-att-video {
  width: 100%;
  border-radius: 8px;
  background: #18181b;
}

.rt-att-video-name {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}

.rt-att-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  color: #18181b;
  text-decoration: none;
  font-size: 12px;
}

.rt-att-doc-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.rt-pending-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #e4e4e7;
  background: #fafafa;
}

.rt-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #52525b;
}

.rt-pending-clear {
  border: 0;
  background: transparent;
  color: #b91c1c;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

.rt-pending-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rt-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e4e4e7;
  background: #ffffff;
  font-size: 12px;
  max-width: 190px;
}

.rt-pending-thumb {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

.rt-pending-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rt-pending-remove {
  border: 0;
  background: transparent;
  color: #52525b;
  cursor: pointer;
  font-weight: 700;
  padding: 0 2px;
}
