.shell{display:grid;grid-template-columns:230px 1fr;min-height:100vh}
aside{background:var(--surface);border-right:1px solid var(--line);padding:22px 14px}
aside .logo small{display:block;color:var(--muted);font-size:10px}
nav{display:grid;gap:6px;margin-top:25px}nav a{padding:12px;border-radius:11px;color:var(--muted);font-weight:750}nav a.active,nav a:hover{background:var(--green-soft);color:var(--green)}
.mobile-nav-toggle{display:none;align-items:center;justify-content:center;width:42px;height:42px;border:0;background:transparent;color:var(--text);font-size:22px;border-radius:10px;cursor:pointer}
.mobile-nav-toggle:hover{background:var(--surface-2)}
main{padding:0 28px 40px}header{height:90px;display:flex;align-items:center;justify-content:space-between}header h1{margin:0}header p{margin:4px 0 0}.header-actions{display:flex;align-items:center;gap:9px}
.live-pill{font-size:12px;font-weight:800;padding:8px 10px;border-radius:999px}.live-pill.online{background:var(--green-soft);color:var(--green)}.live-pill.offline{background:var(--red-soft);color:var(--red)}.live-pill.loading{background:var(--surface-2);color:var(--muted)}
.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-top:14px}.metrics article{padding:17px}.metrics span{color:var(--muted)}.metrics strong{display:block;font-size:28px;margin-top:7px}
/* Resumen's top summary row gained a 5th card ("Detectados hoy", real
   fix 2026-08-26 - separate from "Total SINPE Detectados") - scoped by
   id, not a change to the shared 4-column .metrics rule other pages/
   rows still use unmodified (e.g. the 2-card "Monto confirmado/recibido
   hoy" row further down this same page). */
#summary-metrics{grid-template-columns:repeat(5,1fr)}
.panel{padding:18px;margin-top:14px}.panel-head{display:flex;justify-content:space-between;align-items:center}.panel h2{margin:0}.panel p{margin:4px 0 0}
.feed-row{display:grid;grid-template-columns:42px 1fr auto auto;gap:11px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.feed-row:last-child{border-bottom:0}.feed-row strong{font-size:16px}.feed-row small{display:block;color:var(--muted);margin-top:3px}.state-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;font-weight:900}.state-icon.ACCEPTED{background:var(--green-soft);color:var(--green)}.state-icon.REVIEW{background:var(--yellow-soft);color:var(--yellow)}.state-icon.REJECTED{background:var(--red-soft);color:var(--red)}
.row-actions{display:flex;flex-wrap:wrap;gap:8px}.row-actions .btn{padding:10px 16px;font-size:13px;border-radius:10px;min-height:44px}.row-actions .btn:disabled{opacity:.5;cursor:not-allowed}
.gmail-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:6px 0}.gmail-row strong{display:block}.gmail-row small{display:block;margin-top:3px}
.gmail-row.gmail-error{background:var(--red-soft);border:1px solid color-mix(in srgb,var(--red) 25%,transparent);border-radius:12px;padding:12px 14px}.gmail-error-message{color:var(--red);font-weight:700;margin:4px 0 0;font-size:13px}
.toast{position:fixed;right:20px;bottom:20px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow);border-radius:12px;padding:14px 18px;transform:translateY(120px);opacity:0;transition:.25s}.toast.show{transform:none;opacity:1}.toast.error{background:var(--red-soft);color:var(--red);border-color:color-mix(in srgb,var(--red) 25%,transparent)}
.supported-banks-list{list-style:none;margin:10px 0 0;padding:0;display:grid;gap:8px}.supported-banks-list li small{margin-left:6px}

/* Table/modal primitives, matching platform-admin/platform.css's existing
   definitions exactly (copied, not shared, to avoid any risk of touching
   platform-admin's live CSS for an unrelated page) - needed for the first
   time here by the Usuarios page. */
.page-actions{display:flex;justify-content:flex-end;margin-bottom:14px}
.toolbar{display:flex;gap:10px;align-items:center;padding:12px;margin-bottom:14px}
.toolbar .input{flex:1}
.toolbar .page-size-select{flex:none;width:auto}
.pagination{display:flex;justify-content:space-between;align-items:center;margin-top:14px;font-size:12px;color:var(--muted)}
.pagination .btn{padding:8px 14px;font-size:12px}
.table-card{overflow:hidden}
table{width:100%;border-collapse:collapse}
th,td{padding:13px 15px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}
th{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
tbody tr:hover{background:var(--surface-2)}
.table-action{border:0;background:transparent;color:var(--green);font-weight:800}
.table-action:disabled{color:var(--muted);cursor:not-allowed}
.role-select{padding:7px 9px;border-radius:9px;border:1px solid var(--line);background:var(--surface);color:var(--text);font-size:12px}
.role-select:disabled{opacity:.6;cursor:not-allowed}
.modal{display:none;position:fixed;inset:0;background:#0009;z-index:30;place-items:center;padding:18px}
.modal.open{display:grid}
.modal-card{width:min(480px,100%);padding:22px;max-height:92vh;overflow:auto}
.modal-title{display:flex;justify-content:space-between;align-items:flex-start}
.modal-title h2{margin:4px 0}
.modal-title button{border:0;background:transparent;color:var(--muted);font-size:26px}
.eyebrow{font-size:10px;letter-spacing:.08em;color:var(--green);font-weight:900}
.detail-grid{display:grid;grid-template-columns:1fr;gap:10px}
.detail-grid label{display:block;color:var(--muted);font-size:11px;margin:0 0 5px}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.error{margin-top:14px;padding:12px;border-radius:12px;background:var(--red-soft);color:var(--red);font-size:13px;font-weight:700}
.success{margin-top:14px;padding:12px;border-radius:12px;background:var(--green-soft);color:var(--green);font-size:13px;font-weight:700}
.code-block{margin-top:10px;padding:14px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line);font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.6;overflow-x:auto;white-space:pre}
/* .token-result etc. were referenced in profile.html since fc00272 but had
   zero CSS anywhere in the app - real gap found 2026-08-25 while
   investigating a reported "credential secret didn't show" bug. Unstyled,
   the box still rendered (removing `hidden` alone makes a bare <div>
   visible) but with no background/spacing/border and the raw input packed
   against the copy button - easy to read as "nothing happened" at a
   glance, especially on a page a merchant only visits once to grab a key. */
.token-result{margin-top:16px;padding:16px;border-radius:13px;background:var(--surface-2);border:1px solid var(--line)}
.token-label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}
.token-row{display:flex;gap:8px;align-items:center}
.token-value{flex:1;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px}
.token-warn{margin-top:10px}
.token-result .toggle-row{margin-top:10px}
/* merchant-admin never had .toggle-row at all (platform-admin/admin do,
   in their own platform.css/admin.css) - added now for the ack-gate
   checkbox above, so it doesn't repeat the exact same unstyled-class
   mistake .token-result itself just got fixed for. */
.toggle-row{display:flex!important;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--line);margin:0!important;color:var(--text)!important;font-size:13px!important}
.toggle-row:last-child{border-bottom:0}
.integration-notes{margin:14px 0 0;padding-left:20px;font-size:13px;color:var(--muted)}
.integration-notes li{margin-bottom:8px}
.integration-notes code{background:var(--surface-2);border-radius:5px;padding:1px 5px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.status-lifecycle{margin:10px 0 0;display:grid;gap:8px}
.status-lifecycle div{display:grid;grid-template-columns:120px 1fr;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface-2);font-size:13px}
.status-lifecycle code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-weight:700}
.pairing-result{margin-top:16px;padding:18px;border-radius:13px;background:var(--surface-2);text-align:center}
.pairing-code{font-size:40px;font-weight:900;letter-spacing:.12em;font-variant-numeric:tabular-nums}
.pairing-expiry{margin-top:6px;font-size:13px;font-weight:700;color:var(--green)}
.pairing-expiry.expiring{color:var(--yellow)}
.pairing-expiry.expired{color:var(--red)}
.usage-box{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:6px 0}.usage-box>div{background:var(--surface-2);border-radius:13px;padding:13px}.usage-box span{display:block;color:var(--muted);font-size:11px}.usage-box strong{display:block;margin:5px 0}progress{width:100%;accent-color:var(--green)}
.usage-box-wide{grid-template-columns:repeat(3,1fr)}
@media(max-width:800px){
  .shell{display:block}
  /* Top hamburger instead of a bottom bar (Jorge's decision, 2026-08-23) -
     aside becomes a slim fixed-top strip (logo + toggle only), nav becomes
     a slide-down panel beneath it, closed by default (max-height:0) and
     opened via .open (added/removed by shared/mobilenav.js). Unified with
     platform-admin's own <800px threshold on purpose - see platform.css. */
  aside{position:fixed;z-index:30;top:0;left:0;right:0;width:auto;height:auto;border-right:0;border-bottom:1px solid var(--line);padding:10px 14px;display:flex;align-items:center;justify-content:space-between}
  aside .logo{display:flex}
  .mobile-nav-toggle{display:flex}
  nav{position:fixed;top:61px;left:0;right:0;z-index:29;display:flex;flex-direction:column;gap:0;margin-top:0;background:var(--surface);border-bottom:1px solid var(--line);max-height:0;overflow:hidden;transition:max-height .2s ease}
  nav.open{max-height:70vh;overflow-y:auto}
  nav a{padding:14px 16px;border-radius:0;border-bottom:1px solid var(--line);min-height:44px;display:flex;align-items:center}
  main{padding:70px 14px 24px}
  header{height:auto;flex-wrap:wrap;gap:10px;padding:14px 0}
  #user-email{display:none}
  .header-actions{width:100%;justify-content:space-between}
  .metrics{grid-template-columns:1fr 1fr}
  #summary-metrics{grid-template-columns:1fr 1fr}
  .usage-box-wide{grid-template-columns:1fr 1fr}
  .toast{bottom:20px}
  .table-card{overflow-x:auto}
  table{min-width:640px}
  /* Real gap confirmed 2026-08-23 (audit found ~250-440px of hidden
     columns/actions on Pagos detectados and Usuarios specifically,
     reachable only by an undiscoverable horizontal scroll) - stacked
     cards instead, scoped to just these two (.stack-mobile, added in the
     HTML), matching platform-admin's identical treatment for its own
     3 confirmed tables. Real <table>/<tr>/<td> markup stays, just
     restyled as blocks; each cell's label comes from data-label (set in
     payments.js/usuarios.js) via content:attr() since the header row is
     visually hidden. */
  .stack-mobile{overflow-x:visible}
  .stack-mobile table{min-width:0}
  .stack-mobile table,.stack-mobile thead,.stack-mobile tbody,.stack-mobile tr,.stack-mobile th,.stack-mobile td{display:block}
  .stack-mobile thead{position:absolute;left:-9999px;top:-9999px}
  .stack-mobile tbody tr{border:1px solid var(--line);border-radius:13px;padding:10px 12px;margin-bottom:10px}
  .stack-mobile tbody tr:last-child{margin-bottom:0}
  .stack-mobile td{border-bottom:1px solid var(--line);padding:10px 4px 10px 46%;position:relative;text-align:right;min-height:20px}
  .stack-mobile td:last-child{border-bottom:0}
  .stack-mobile td[data-label]::before{content:attr(data-label);position:absolute;left:4px;width:42%;text-align:left;font-weight:750;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.03em}
  .stack-mobile td[data-label=""]{padding-left:4px;text-align:left}
  .stack-mobile td[data-label=""]::before{content:none}
}
