/* ============================================================
   shared.css — Capa de diseño compartida del Sistema POTG.
   Light Theme v2 — Inter font, teal POTG #138E8D, minimal clean.
   Usada por todas las páginas/módulos. Los módulos NO deben editar.
   ============================================================ */

:root {
  --bg:          #f5f7fa;
  --surface:     #ffffff;
  --surface-2:   #f0f2f8;
  --border:      #e4e8f0;
  --border-soft: #edf0f7;
  --text:        #0f1728;
  --muted:       #64748b;
  --muted-2:     #94a3b8;

  /* Brand teal — POTG #138E8D */
  --accent:       #138E8D;
  --accent-hover: #0f7473;
  --accent-soft:  #e6f4f4;
  --accent-text:  #0c6160;

  /* States */
  --green:        #059669;
  --green-soft:   #ecfdf5;
  --orange:       #d97706;
  --orange-soft:  #fffbeb;
  --danger:       #dc2626;
  --danger-soft:  #fef2f2;

  --radius:    10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.07);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  letter-spacing: -.01em;
  font-family: inherit;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ── Formularios ─────────────────────────────────────────── */
label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin: 14px 0 5px;
}

input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  transition: border-color .15s;
  box-shadow: var(--shadow-sm);
}
/* Checkboxes y radios NO son campos de texto: la regla de arriba (width:100%, padding, borde,
   sombra) y el min-height:44px de mobile los inflaba enormemente y empujaba el texto fuera.
   Se normalizan a tamaño nativo en toda la app. */
input[type="checkbox"], input[type="radio"] {
  width: 18px; height: 18px; min-height: 0; padding: 0; border-radius: 0;
  box-shadow: none; flex: none; accent-color: var(--accent); cursor: pointer;
}
/* FABs (hamburguesa/feedback): se ocultan cuando hay un modal/overlay de pantalla completa
   abierto, para no tapar sus botones de acción (p. ej. "Crear sesión"). shared.js togglea la clase. */
body.potg-overlay-open .potg-hamburger,
body.potg-overlay-open #potg-fb-btn { display: none !important; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(19,142,141,.15);
}

/* Foco visible por teclado (accesibilidad) */
.btn:focus-visible, .btn-ghost:focus-visible,
.potg-sidebar-item:focus-visible, .potg-sidebar-logout:focus-visible,
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Campo de búsqueda con ícono — unifica los buscadores del sistema */
.potg-input-search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 15px 15px;
  padding-left: 34px;
}

.row { display: flex; gap: 12px; }
.row > div { flex: 1; }

/* ── Tarjetas ────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 15px; margin: 0 0 4px; font-weight: 700; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 16px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }

/* ── Mensajes ────────────────────────────────────────────── */
.msg { padding: 11px 14px; border-radius: 8px; font-size: 13px; margin-top: 12px; }
.msg.error {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(220,38,38,.2);
}
.msg.ok {
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(5,150,105,.2);
}

.field-help { font-size: 11px; color: var(--muted-2); margin-top: 5px; }

/* ── Pills / badges ──────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-text);
}

/* ── Zona horaria / conversión ───────────────────────────── */
.tz-box {
  margin-top: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  text-align: center;
}
.tz-box b { color: var(--accent); }

/* ── Timer ───────────────────────────────────────────────── */
.result-card { border-color: var(--green); }
.timer {
  font-variant-numeric: tabular-nums;
  font-size: 26px;
  font-weight: 700;
  color: var(--orange);
}

/* ── Barra lateral (sidebar) ─────────────────────────────── */
body { padding-left: 240px; transition: padding-left .22s ease; }

.potg-sidebar {
  position: fixed;
  left: 0; top: 0;
  width: 240px;
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .22s ease;
}

.potg-sidebar-brand {
  padding: 16px 14px 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -.03em;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow: hidden;
}
.potg-sidebar-brand-text {
  white-space: nowrap;
  overflow: hidden;
}

/* ── Botón colapsar sidebar (desktop) ──────────────────── */
.potg-sb-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 6px;
  color: var(--muted-2);
  border-radius: 6px;
  line-height: 0;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.potg-sb-toggle:hover { background: var(--surface-2); color: var(--text); }
@media (min-width: 769px) {
  .potg-sb-toggle { display: flex; align-items: center; }
}

/* ── Estado colapsado (desktop) ───────────────────────── */
body.potg-sb-collapsed { padding-left: 56px; }
.potg-sidebar.potg-sb-collapsed { width: 56px; }

.potg-sidebar.potg-sb-collapsed .potg-sidebar-brand-text,
.potg-sidebar.potg-sb-collapsed .potg-sidebar-label,
.potg-sidebar.potg-sb-collapsed .potg-sidebar-sep,
.potg-sidebar.potg-sb-collapsed .potg-sidebar-email,
.potg-sidebar.potg-sb-collapsed .potg-sidebar-rol,
.potg-sidebar.potg-sb-collapsed .potg-search-wrap,
.potg-sidebar.potg-sb-collapsed #potg-search-results {
  display: none !important;
}
.potg-sidebar.potg-sb-collapsed .potg-sidebar-brand {
  justify-content: center;
  padding: 16px 6px 14px;
}
.potg-sidebar.potg-sb-collapsed .potg-sidebar-nav { padding: 4px 6px; }
.potg-sidebar.potg-sb-collapsed .potg-sidebar-item {
  padding: 10px 8px;
  justify-content: center;
  gap: 0;
}
.potg-sidebar.potg-sb-collapsed .potg-sidebar-icon { opacity: 1; }
.potg-sidebar.potg-sb-collapsed .potg-sidebar-footer {
  padding: 10px 8px;
  align-items: center;
}
.potg-sidebar.potg-sb-collapsed .potg-sidebar-logout {
  font-size: 0;
  color: transparent;
  padding: 6px 0;
  line-height: 0;
}

.potg-sidebar-nav {
  flex: 1;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.potg-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .12s, color .12s;
  line-height: 1.2;
  position: relative;
}
.potg-nav-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}
.potg-sidebar-item:hover { background: var(--surface-2); color: var(--text); }
.potg-sidebar-item.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  font-weight: 600;
}

.potg-sidebar-icon {
  width: 20px; height: 20px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: .75;
}
.potg-sidebar-icon svg { width: 20px; height: 20px; }
.potg-sidebar-item:hover .potg-sidebar-icon { opacity: .9; }
.potg-sidebar-item.active .potg-sidebar-icon { opacity: 1; }

.potg-sidebar-sep {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted-2);
  padding: 16px 12px 5px;
}

.potg-sidebar-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.potg-sidebar-rol {
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent-text);
  padding: 2px 9px;
  border-radius: 99px;
  align-self: flex-start;
  font-weight: 600;
  letter-spacing: .02em;
}

.potg-sidebar-email {
  font-size: 12px;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.potg-sidebar-logout {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  padding: 7px 0;
  text-align: left;
  transition: opacity .12s;
}
.potg-sidebar-logout:hover { opacity: .7; }

/* ── Tema A: barra lateral teal sólido (estilo Eholo) ──────── */
.potg-sidebar {
  background: var(--accent);
  border-right-color: rgba(0,0,0,.10);
}
.potg-sidebar-brand {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.18);
}
.potg-sidebar .potg-sidebar-item {
  color: rgba(255,255,255,.82);
}
.potg-sidebar .potg-sidebar-item:hover {
  background: rgba(255,255,255,.10);
  color: #fff;
}
.potg-sidebar .potg-sidebar-item.active {
  background: rgba(255,255,255,.20);
  color: #fff;
}
.potg-sidebar .potg-sidebar-icon { opacity: .85; }
.potg-sidebar .potg-sidebar-item:hover .potg-sidebar-icon,
.potg-sidebar .potg-sidebar-item.active .potg-sidebar-icon { opacity: 1; }
.potg-sidebar-sep { color: rgba(255,255,255,.6); }
.potg-sidebar-footer { border-top-color: rgba(255,255,255,.18); }
.potg-sidebar-rol {
  background: rgba(255,255,255,.18);
  color: #fff;
}
.potg-sidebar-email { color: rgba(255,255,255,.72); }
.potg-sidebar-logout { color: rgba(255,255,255,.92); }
.potg-sidebar-logout:hover { color: #ffd5cf; opacity: 1; }
.potg-sb-toggle { color: rgba(255,255,255,.72); }
.potg-sb-toggle:hover { background: rgba(255,255,255,.12); color: #fff; }
/* (El buscador sobre teal se estiliza al final, tras las reglas base, para ganar por cascada.) */

/* ── Hamburger (mobile) ──────────────────────────────────── */
.potg-hamburger {
  display: none;
  position: fixed;
  right: 20px; bottom: 20px;
  width: 58px; height: 58px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  z-index: 8901;
  color: #fff;
  box-shadow: 0 4px 16px rgba(19,142,141,.45);
  align-items: center;
  justify-content: center;
}

/* ── Backdrop (mobile) ───────────────────────────────────── */
.potg-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.3);
  z-index: 199;
}
.potg-sidebar-backdrop.open { display: block; }

/* ── Login ───────────────────────────────────────────────── */
.potg-login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.potg-login-card {
  max-width: 380px;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}
.potg-login-card h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -.02em;
}
.potg-login-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  body { padding-left: 0; }
  .potg-hamburger { display: flex; }

  /* iOS hace zoom automático al enfocar un input con font-size < 16px (y cortaba el contenido
     del modal). Forzamos 16px en mobile en todos los campos para evitarlo. Aplica a toda la app. */
  input, select, textarea { font-size: 16px !important; }

  /* Affordance de scroll: degradado en el borde derecho de las barras que scrollean en horizontal,
     para indicar que hay más opciones al costado (pestañas/filtros). */
  #ficha-tabs-nav, .srv-tabs, #ag-prof-pills, .ses-quick-row {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
  }

  .potg-sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    z-index: 201;
  }
  .potg-sidebar.open { transform: translateX(0); }

  .wrap { padding: 16px 14px 40px; }
  .card { padding: 16px; }
  .row { flex-direction: column; gap: 8px; }
  .row > div { flex: none; }

  /* Targets táctiles cómodos en mobile (mín. 44px) */
  .btn, .btn-ghost, input, select, textarea { min-height: 44px; }

  /* Tablas "filas limpias + tap → detalle en POTG.sheet" (patrón mobile):
     marcá con .potg-hide-mobile las columnas secundarias (th y td) y con
     .potg-tap-row las filas que abren el sheet al tocarlas. */
  .potg-hide-mobile { display: none !important; }
  tr.potg-tap-row { cursor: pointer; }

  /* Hosts con subpestañas embebidas en iframe (Finanzas): casi sin padding lateral
     en mobile, así el iframe/tabla aprovecha el ancho (el contenido interno ya
     trae su propio aire). Evita el doble margen host + wrap. */
  .potg-host-wrap { padding-left: 6px !important; padding-right: 6px !important; }
  /* Páginas directas con contenedor propio (perfil, ajustes reservador, notificaciones):
     menos padding lateral en mobile (su <style> define 20px sin @media). */
  .prf-wrap, .rc-wrap, .ntf-wrap { padding-left: 12px !important; padding-right: 12px !important; }

  /* Modal/drawer existente → bottom sheet en mobile: agregá .potg-modal-sheet al
     overlay (el que tiene position:fixed/inset:0). Pisa estilos inline con !important;
     asume un único hijo-caja directo (.card / .fac-modal / .srv-drawer / etc.). */
  .potg-modal-sheet { align-items: flex-end !important; justify-content: center !important; padding: 0 !important; }
  .potg-modal-sheet > * {
    max-width: none !important; width: 100% !important; margin: 0 !important;
    border-radius: 16px 16px 0 0 !important; max-height: 90vh !important;
  }
}

@media (min-width: 769px) {
  .wrap { padding: 24px 20px 60px; }
  .card { padding: 20px 22px; }
}

/* ── Autocomplete compartido ─────────────────────────────── */
.potg-ac-wrap {
  position: relative;
}
.potg-ac-wrap input {
  margin-bottom: 0;
}
.potg-ac-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
  z-index: 400;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
}
.potg-ac-dropdown.open { display: block; }
.potg-ac-item {
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--text);
  transition: background .1s;
}
.potg-ac-item:hover,
.potg-ac-item.focused { background: var(--accent-soft); color: var(--accent-text); }
.potg-ac-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
}

/* ── Tabla genérica POTG ─────────────────────────────────── */
.potg-tabla {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.potg-tabla th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted-2);
  padding: 6px 10px 8px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.potg-tabla td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  color: var(--text);
}
.potg-tabla tbody tr:last-child td { border-bottom: none; }
.potg-tabla tbody tr:hover td { background: var(--surface-2); }

/* Pills de estado de sesión */
.potg-estado-reservada  { background: var(--orange-soft); color: var(--orange); }
.potg-estado-confirmada { background: var(--green-soft);  color: var(--green);  }
.potg-estado-realizada  { background: var(--accent-soft); color: var(--accent-text); }
.potg-estado-cancelada  { background: var(--danger-soft); color: var(--danger); }
.potg-estado-descartada { background: var(--surface-2);   color: var(--muted-2); }

/* Botón copiar al portapapeles (icono dos hojitas) */
.copy-field { display: inline-flex; gap: 6px; align-items: center; width: 100%; }
.copy-field input { flex: 1; min-width: 0; }
.copy-btn {
  flex: none; width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px; background: transparent;
  color: var(--muted-2); cursor: pointer; transition: color .15s, border-color .15s;
}
.copy-btn:hover { color: var(--accent-text); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.copy-inline { width: 22px; height: 22px; vertical-align: middle; margin-left: 4px; }

/* ── Filtro multi-select (checkbox dropdown) ──────────────────── */
.ms { position: relative; }
.ms > summary {
  list-style: none; cursor: pointer; user-select: none;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 28px 8px 10px; background: var(--surface); font-size: 13px;
  position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ms > summary::-webkit-details-marker { display: none; }
.ms > summary::after {
  content: "▾"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 11px;
}
.ms[open] > summary { border-color: var(--accent); }
.ms-count { color: var(--accent-text); font-weight: 600; }
.ms-menu {
  position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 6px; max-height: 280px; overflow-y: auto;
}
.ms-menu label {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px;
  font-size: 13px; font-weight: 400; cursor: pointer; margin: 0; white-space: nowrap;
}
.ms-menu label:hover { background: var(--surface-2); }
.ms-menu input[type="checkbox"] { width: auto; margin: 0; }
.ms-menu .ms-actions { display: flex; gap: 8px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 6px; }
.ms-menu .ms-actions button { font-size: 12px; padding: 3px 8px; }
/* Mobile: el menú no debe salirse del viewport por la derecha (left:0 lo empujaba afuera).
   Se ancla al borde derecho del control y permite que los nombres largos hagan wrap. */
@media (max-width: 768px) {
  .ms-menu { left: auto; right: 0; max-width: calc(100vw - 24px); }
  .ms-menu label { white-space: normal; }
}

/* ── Selección de filas + barra de acciones masivas ──────────── */
th.rowsel-th, td.rowsel-td { width: 34px; text-align: center; padding-left: 10px; padding-right: 4px; }
.rowsel { width: auto; margin: 0; cursor: pointer; }
.bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid var(--accent);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 12px;
}
.bulkbar.hidden { display: none; }
.bulkbar .bulk-count { font-weight: 600; color: var(--accent-text); }
.bulkbar select { font-size: 13px; width: auto; min-width: 150px; margin: 0; }
.bulkbar .btn { font-size: 13px; }
.bulkbar .bulk-spacer { flex: 1; }
/* Oculta la columna de selección cuando el rol no puede hacer acciones masivas */
.bulk-off .rowsel-th, .bulk-off .rowsel-td { display: none; }

/* ── Búsqueda global en sidebar ────────────────────────────── */
.potg-search-wrap {
  position: relative;
  margin: 0 12px 8px;
  display: flex;
  align-items: center;
}
.potg-search-icon {
  position: absolute;
  left: 10px;
  width: 15px; height: 15px;
  color: var(--muted-2);
  pointer-events: none;
  flex-shrink: 0;
}
.potg-search-input {
  width: 100%;
  font-size: 13px;
  padding: 7px 10px 7px 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color .15s;
  box-shadow: none;
}
.potg-search-input:focus { border-color: var(--accent); outline: none; }

/* ── Buscador en la barra teal ──────────────────────────────────────────────
   La caja queda clara (reglas base, surface-2) y estable. Solo se anula el halo
   de foco — el box-shadow global de `input:focus` (~shared.css:97) — que dibujaba
   la línea junto a la lupa, y se mantiene el borde neutro al enfocar (sin cambio
   de color). Va tras las reglas base para ganar por cascada. */
.potg-search-input:focus {
  box-shadow: none;
  border-color: var(--border);
}
.potg-search-results {
  display: none;
  position: fixed;
  top: auto;
  left: 12px;
  width: 216px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 500;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.potg-search-results.open { display: block; }
.potg-search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background .1s;
}
.potg-search-result:hover { background: var(--accent-soft); color: var(--accent-text); }
.psr-name { font-weight: 500; }
.psr-badge {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}
.psr-consultante{ background: var(--surface-2);   color: var(--muted);  }
.psr-en_curso   { background: var(--green-soft);  color: var(--green);  }
.psr-alta       { background: var(--accent-soft); color: var(--accent-text); }
.psr-abandono   { background: var(--danger-soft); color: var(--danger); }
.potg-search-empty {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
}

/* ── Tabs / paneles POTG (subpestañas reutilizables) ─────────
   Usados por módulos host con subpestañas (Servicios, Finanzas).
   Servicios usa además sus propias clases .srv-* (legado). */
.potg-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.potg-tab {
  background: transparent; border: none; color: var(--muted);
  font-size: 14px; font-weight: 600; padding: 10px 18px;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; border-radius: 8px 8px 0 0;
  transition: color .15s, border-color .15s;
}
.potg-tab:hover { color: var(--text); background: var(--surface-2); }
.potg-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.potg-panel { display: none; }
.potg-panel.active { display: block; }
.potg-embed {
  width: 100%; border: 0; display: block;
  height: calc(100vh - 130px); min-height: 480px;
}
.potg-host-wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }

@media (max-width: 640px) {
  .potg-tabs {
    overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
}
