/* ─────────────────────────────────────────────────────────────
   Agua Bendita · Acceso único (SSO)
   Mismo sistema visual que la Mesa de servicios: negro cálido,
   dorado envejecido y marfil; Jost para leer y Cormorant Garamond
   para titular. Solo modo claro; lo oscuro queda para la cabecera
   y los paneles destacados.
   ───────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Dorado Agua Bendita (400 = #C9A45F) */
  --gold-50: #fbf8f1;  --gold-100: #f5eedd; --gold-200: #eadbb8; --gold-300: #dcc28c;
  --gold-400: #c9a45f; --gold-500: #b8914a; --gold-600: #9c773a; --gold-700: #7f5f30;
  --gold-800: #654c2b; --gold-900: #523f26;

  /* Tinta y marca */
  --ink-950: #16130f; --ink-900: #1f1b17; --ink-800: #2e2822; --ink-700: #4a4238; --ink-600: #5f564a; --ink-500: #7a7064;
  --brand-navy: #15120f; --brand-navy-mid: #262019; --brand-navy-light: #3a3128; --brand-ivory: #f7f3ec;
  --menu-dark: #1d1914;

  /* Neutros cálidos (stone) */
  --stone-50: #fafaf9; --stone-100: #f5f5f4; --stone-200: #e7e5e4; --stone-300: #d6d3d1;
  --stone-400: #a8a29e; --stone-500: #78716c; --stone-600: #57534e; --stone-700: #44403c;

  /* Estados (solo semánticos) */
  --ok-bg: #ecfdf5;    --ok-text: #065f46;    --ok-ring: #a7f3d0;
  --error-bg: #fff1f2; --error-text: #9f1239; --error-ring: #fecdd3;
  --warn-bg: #fffbeb;  --warn-text: #78350f;  --warn-ring: #fde68a;

  /* Alias que usan las plantillas (estilos en línea) */
  --ab-hueso:    var(--brand-ivory);
  --ab-arena:    var(--stone-50);
  --ab-linea:    var(--stone-200);
  --ab-tinta:    var(--ink-900);
  --ab-texto:    var(--ink-800);
  --ab-suave:    var(--ink-600);
  --ab-oro:      var(--gold-400);
  --ab-oro-osc:  var(--gold-700);
  --ab-oro-sua:  rgb(201 164 95 / .10);
  --ab-turquesa: var(--gold-600);
  --ab-rojo:     var(--error-text);
  --ab-tarjeta:  #fff;

  --ab-f-texto:  'Jost', system-ui, sans-serif;
  --ab-f-titulo: 'Cormorant Garamond', Georgia, serif;
  --ab-f-acento: 'Cormorant Garamond', Georgia, serif;
  --ab-f-mono:   'JetBrains Mono', Consolas, monospace;
  --ab-curva:    cubic-bezier(.16,1,.3,1);

  --radius-md: .5rem; --radius-lg: .75rem; --radius-xl: 1rem;
  --shadow-card: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-panel: 0 4px 6px -1px rgb(28 25 23 / .04), 0 2px 4px -2px rgb(28 25 23 / .04);
  --ring-foco: 0 0 0 2px rgb(220 194 140 / .6);
}

/* ══════════════════ BASE ══════════════════ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background-color: var(--brand-ivory);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgb(201 164 95 / .10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgb(21 18 15 / .05), transparent 60%);
  background-attachment: fixed;
  color: var(--ink-800); font: 400 14px/1.6 var(--ab-f-texto); -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-700); text-decoration: none; font-weight: 500; }
a:hover { color: var(--gold-800); text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--gold-200); color: var(--ink-950); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 8px; }
h1, h2, h3 { color: var(--brand-navy); margin: 0 0 10px; }
h1 { font-family: var(--ab-f-titulo); font-weight: 600; letter-spacing: .01em; }
h2 { font: 600 20px/1.25 var(--ab-f-titulo); letter-spacing: .01em; }
h3 { font: 600 10px var(--ab-f-texto); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-600); margin-top: 22px; }
p { margin: 0 0 12px; }
code { font: 500 12px var(--ab-f-mono); background: var(--stone-100); color: var(--ink-900); padding: 1px 6px; border-radius: 4px; word-break: break-all; }
.muted { color: var(--ink-600); }
.small { font-size: 12.5px; }
.block { display: block; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--error-text); }

/* Títulos: Cormorant; <em> en cursiva dorada */
.display, .ab-titulo { font-family: var(--ab-f-titulo); font-weight: 600; font-size: 1.875rem; line-height: 1.15; letter-spacing: .01em; color: var(--brand-navy); margin: 0; }
.display em, .ab-titulo em, .auth-heading em { font-family: var(--ab-f-acento); font-style: italic; font-weight: 500; color: var(--gold-600); }
.eyebrow, .brand-eyebrow { font: italic 500 14px var(--ab-f-titulo); letter-spacing: .2em; color: var(--gold-600); margin-bottom: 4px; }
.brand-rule { height: 1px; width: 100%; background: linear-gradient(to right, transparent, rgb(201 164 95 / .7), transparent); }

/* ══════════════════ CABECERA OSCURA ══════════════════ */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.ab-header { position: sticky; top: 0; z-index: 30; background: var(--brand-navy); color: var(--stone-100); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .25); }
.ab-header + .brand-rule { position: sticky; top: 64px; z-index: 29; }
.ab-header__inner { max-width: 80rem; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 24px; }

.sb-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sb-brand:hover { text-decoration: none; }
.sb-brand img { height: 36px; width: auto; }
.sb-brand-name { font: 600 20px/1 var(--ab-f-titulo); letter-spacing: .01em; color: #fff; }
.sb-brand-sub { margin-top: 3px; font: 600 9px var(--ab-f-texto); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-400); }

.ab-nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: var(--radius-md);
  color: var(--stone-200); font: 500 13px var(--ab-f-texto); white-space: nowrap; cursor: pointer; list-style: none; transition: background-color .15s, color .15s; }
.nav-link::-webkit-details-marker { display: none; }
.nav-link i { font-size: 12px; color: var(--stone-400); }
.nav-link:hover { background: rgb(255 255 255 / .06); color: #fff; text-decoration: none; }
.nav-link.active { background: rgb(201 164 95 / .10); color: var(--gold-300); }
.nav-link.active i { color: var(--gold-400); }
.nav-link.active::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-400); order: -1; }
.nav-link.active > i:first-child { display: none; }
.ab-menu-caret { font-size: 9px !important; margin-left: 2px; transition: transform .15s; }
details[open] > summary .ab-menu-caret { transform: rotate(180deg); }

/* Menús desplegables */
.ab-menu { position: relative; }
.ab-menu > summary { list-style: none; }
.ab-menu > summary::-webkit-details-marker { display: none; }
.ab-menu-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; min-width: 290px; padding: 8px; border-radius: var(--radius-lg);
  background: var(--menu-dark); box-shadow: 0 25px 50px -12px rgb(0 0 0 / .5), 0 0 0 1px rgb(201 164 95 / .2); }
.ab-menu-right { left: auto; right: 0; }
.ab-menu-title { margin: 4px 10px 6px; font: 600 10px var(--ab-f-texto); letter-spacing: .16em; text-transform: uppercase; color: rgb(201 164 95 / .8); }
.ab-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-md); background: none;
  color: var(--stone-200); font: 500 13px var(--ab-f-texto); text-align: left; cursor: pointer; }
.ab-menu-item:hover { background: rgb(255 255 255 / .06); color: #fff; text-decoration: none; }
.ab-menu-item.active { background: rgb(201 164 95 / .10); color: var(--gold-300); }
.ab-menu-label { display: block; }
.ab-menu-desc { display: block; font-size: 11px; font-weight: 400; color: var(--stone-400); }
.ab-menu-item .nav-icon { width: 30px; height: 30px; border-radius: var(--radius-md); display: grid; place-items: center; flex-shrink: 0; font-size: 12px;
  background: rgb(255 255 255 / .05); color: var(--gold-400); }
.ab-menu-danger { color: #fda4af; }
.ab-menu-danger .nav-icon { color: #fda4af; }
.ab-menu-danger:hover { background: rgb(244 63 94 / .10); color: #fecdd3; }
.ab-menu-panel form { margin: 0; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-shrink: 0; }
.clock-pill { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font: 500 11px var(--ab-f-mono); color: var(--stone-300);
  background: rgb(255 255 255 / .04); border: 1px solid rgb(255 255 255 / .08); }
.clock-pill i { color: var(--gold-400); }
.sb-user-btn { display: flex; align-items: center; gap: 6px; padding: 3px; border-radius: 999px; cursor: pointer; color: var(--stone-400); }
.sb-user-btn:hover { background: rgb(255 255 255 / .06); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid rgb(255 255 255 / .08); }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-mail { font-size: 11px; color: var(--stone-400); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--radius-md); background: transparent;
  color: var(--stone-200); cursor: pointer; flex-shrink: 0; }
.icon-btn:hover { background: rgb(255 255 255 / .06); }
.menu-btn { display: none !important; }

/* Indicador de Google Workspace (administradores) */
.gw-pill { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid; }
.gw-pill:hover { text-decoration: none; }
.gw-pill.ok { background: rgb(16 185 129 / .10); color: #6ee7b7; border-color: rgb(16 185 129 / .3); }
.gw-pill.ok:hover { color: #a7f3d0; }
.gw-pill.pendiente { background: var(--gold-400); color: var(--brand-navy); border-color: transparent; font-weight: 600; }
.gw-pill.pendiente:hover { background: var(--gold-300); color: var(--brand-navy); }

.main-area { flex: 1; min-width: 0; }
.content { padding: 32px 24px 48px; animation: fadeIn .15s ease-out both; }
.content-inner { max-width: 80rem; margin: 0 auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.footer { display: flex; justify-content: center; gap: 10px; padding: 32px 0 0; color: var(--ink-500); font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.dot-sep { color: var(--gold-400); }

/* Avatar */
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  font: 600 14px var(--ab-f-titulo); color: var(--gold-300); background: rgb(201 164 95 / .15); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .4); }
.main-area .avatar { background: var(--brand-navy); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }
.avatar.lg { width: 60px; height: 60px; font-size: 22px; }
.avatar.xl { width: 96px; height: 96px; font-size: 34px; }

/* ══════════════════ ENCABEZADO DE PÁGINA ══════════════════ */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { display: flex; align-items: center; gap: 16px; }
.page-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); display: grid; place-items: center; flex-shrink: 0; font-size: 17px;
  background: var(--brand-navy); color: var(--gold-300); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .2), 0 0 0 1px rgb(201 164 95 / .25); }
.page-title p { margin: 4px 0 0; color: var(--ink-600); font-size: 14px; line-height: 1.6; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; color: var(--ink-600); font-size: 12.5px; font-weight: 500; }

/* ══════════════════ TARJETAS ══════════════════ */
.card { background: #fff; border: 1px solid rgb(231 229 228 / .8); border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-card); margin-bottom: 20px; }
.card > h2:first-child, .card-head h2 { display: flex; align-items: center; gap: 10px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.h-icon { width: 30px; height: 30px; border-radius: var(--radius-md); display: grid; place-items: center; font-size: 12px; flex-shrink: 0;
  background: rgb(201 164 95 / .10); color: var(--gold-700); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .3); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* Efectos de js/aguabendita.js: suaves */
.ab-brillo { position: relative; isolation: isolate; }
.ab-brillo::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgb(201 164 95 / .08), transparent 45%); }
.ab-brillo:hover::after { opacity: 1; }
.ab-js .ab-aparece { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ab-curva), transform .5s var(--ab-curva); }
.ab-js .ab-aparece.ab-visto { opacity: 1; transform: none; }
.ab-onda { position: absolute; border-radius: 50%; pointer-events: none; transform: scale(0); background: rgb(255 255 255 / .3); animation: ab-onda .6s ease-out forwards; }
@keyframes ab-onda { to { transform: scale(3.2); opacity: 0; } }

/* Indicadores del panel */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 140px; padding: 20px; border-radius: var(--radius-xl);
  background: #fff; border: 1px solid rgb(231 229 228 / .8); box-shadow: var(--shadow-card); color: var(--ink-900); font-weight: 400;
  transition: border-color .15s, box-shadow .15s; }
.stat:hover { text-decoration: none; border-color: var(--gold-300); box-shadow: var(--shadow-panel); }
.stat::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(to right, transparent, rgb(201 164 95 / .7), transparent); }
.stat .bg-icon { display: none; }
.stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; }
.stat-ico { width: 38px; height: 38px; border-radius: var(--radius-md); display: grid; place-items: center; font-size: 14px;
  background: var(--brand-navy); color: var(--gold-300) !important; }
.stat-label { padding: 2px 8px; border-radius: 999px; font: 600 10px var(--ab-f-texto); letter-spacing: .14em; text-transform: uppercase;
  background: rgb(201 164 95 / .10); color: var(--gold-700); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .3); }
.stat-value { margin-top: 14px; font: 600 42px/1 var(--ab-f-titulo); color: var(--brand-navy); font-variant-numeric: lining-nums tabular-nums; }
.stat-sub { margin-top: 6px; color: var(--ink-600); font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.stat-sub a { color: var(--gold-700); }
.stat.tone-1 .stat-ico { color: #fda4af !important; }

/* ══════════════════ BOTONES ══════════════════ */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: var(--radius-md); font: 600 12.5px var(--ab-f-texto); cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s, border-color .15s; }
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--brand-navy); color: #fff; }
.btn-primary:hover { background: var(--brand-navy-mid); color: #fff; }
.btn-oro { background: var(--gold-400); color: var(--brand-navy); border-radius: 999px; }
.btn-oro:hover { background: var(--gold-300); color: var(--brand-navy); }
.btn-secondary, .btn-ghost { background: #fff; color: var(--stone-700); border-color: var(--stone-200); box-shadow: var(--shadow-card); font-weight: 500; }
.btn-secondary:hover, .btn-ghost:hover { background: var(--stone-50); border-color: var(--stone-300); color: var(--ink-900); }
.btn-danger { background: var(--error-bg); color: var(--error-text); border-color: var(--error-ring); }
.btn-danger:hover { background: #be123c; color: #fff; border-color: #be123c; }
.btn-link-danger { background: none; border: 0; color: var(--error-text); padding: 4px 8px; font-weight: 600; }
.btn-link-danger:hover { background: var(--error-bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn-google { width: 100%; padding: 12px 18px; background: #fff; color: var(--ink-900); border-color: var(--stone-200); font-size: 14px; }
.btn-google:hover { border-color: var(--gold-400); }
.btn-inline { width: auto; }

/* ══════════════════ FORMULARIOS ══════════════════ */
input, select, textarea { font: 400 14px var(--ab-f-texto); padding: 9px 12px; border: 1px solid var(--stone-200); border-radius: var(--radius-md);
  background: rgb(250 250 249 / .6); color: var(--ink-900); outline: none; min-width: 0; transition: background-color .15s, border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--stone-400); }
input:focus, select:focus, textarea:focus { background: #fff; border-color: var(--gold-400); box-shadow: var(--ring-foco); }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--brand-navy); }
input[type=checkbox]:focus, input[type=radio]:focus { box-shadow: none; }
textarea { resize: vertical; width: 100%; }
.form label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; font: 500 14px var(--ab-f-texto); color: var(--ink-800); }
.form label input, .form label select, .form label textarea { font-size: 14px; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form .checkbox { flex-direction: row; align-items: center; gap: 10px; font-weight: 400; color: var(--ink-900); }
.form-actions { display: flex; justify-content: flex-end; }
.hint { font-weight: 400; font-size: 12px; color: var(--ink-600); }
.field-error { font-weight: 500; font-size: 12px; color: var(--error-text); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; }
.filters input[type=search] { flex: 1; min-width: 240px; background: #fff; }
.inline-form { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.inline-form select, .inline-form input { flex: 1; }
.grant-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; padding: 14px; border-radius: var(--radius-lg); background: var(--stone-50); }
.grant-form textarea { flex: 2; min-width: 240px; background: #fff; }
.grant-form select { background: #fff; }
form.inline { display: inline; }
input[readonly] { opacity: .7; cursor: not-allowed; }

/* ══════════════════ TABLAS (estilo mesa de servicio) ══════════════════ */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; border-color: rgb(231 229 228 / .9); box-shadow: var(--shadow-panel); }
.card.table-wrap > h2 { padding: 18px 20px 10px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; line-height: 1.6; color: var(--ink-800); }
thead tr { background: linear-gradient(to bottom, rgb(245 245 244 / .95), rgb(250 250 249 / .9)); }
th { text-align: left; padding: 10px 12px; font: 600 10px var(--ab-f-texto); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  color: var(--brand-navy); border-bottom: 1px solid rgb(231 229 228 / .8); }
td { padding: 9px 12px; border-bottom: 1px solid var(--stone-100); vertical-align: middle; color: var(--ink-800); }
tbody tr:hover td { background: rgb(251 248 241 / .7); }
tr:last-child td { border-bottom: 0; }
.row-muted td { opacity: .5; }
.card:not(.table-wrap) table th:first-child, .card:not(.table-wrap) table td:first-child { padding-left: 6px; }

/* ══════════════════ BADGES Y ALERTAS ══════════════════ */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; font: 500 11.5px var(--ab-f-texto);
  background: var(--stone-100); color: var(--stone-600); box-shadow: inset 0 0 0 1px var(--stone-200); vertical-align: middle; white-space: nowrap; }
.badge-success { background: var(--ok-bg); color: var(--ok-text); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.badge-danger  { background: var(--error-bg); color: var(--error-text); box-shadow: inset 0 0 0 1px var(--error-ring); }
.badge-warning { background: var(--warn-bg); color: var(--warn-text); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.badge-info    { background: rgb(201 164 95 / .10); color: var(--gold-700); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .3);
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 3px 9px; }
.badge-success::before, .badge-danger::before, .badge-warning::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }

.alert { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: var(--radius-lg); border: 1px solid; font-size: 14px; animation: slideDown .3s var(--ab-curva) both; }
.alert::before { font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 15px; flex-shrink: 0; }
.alert-success { background: var(--ok-bg); color: #064e3b; border-color: var(--ok-ring); }
.alert-success::before { content: '\f058'; }
.alert-error   { background: var(--error-bg); color: var(--error-text); border-color: var(--error-ring); }
.alert-error::before { content: '\f057'; }
.alert-warning { background: var(--warn-bg); color: var(--warn-text); border-color: var(--warn-ring); }
.alert-warning::before { content: '\f071'; }
.alert-info    { background: rgb(184 145 74 / .05); color: var(--ink-800); border-color: rgb(184 145 74 / .3); }
.alert-info::before { content: '\f05a'; color: var(--gold-600); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.secret-box { flex-direction: column; align-items: flex-start; }
.secret-box::before { display: none; }
.secret-box code { font-size: 14px; padding: 10px 12px; background: #fff; }
.copy { cursor: copy; }
.copy.copied { background: var(--ok-bg); color: var(--ok-text); }

/* ══════════════════ PIEZAS VARIAS ══════════════════ */
.user-cell { display: flex; align-items: center; gap: 10px; color: var(--ink-900); font-weight: 400; }
.user-cell:hover { text-decoration: none; color: var(--ink-900); }
.user-cell:hover strong { color: var(--gold-700); }
.user-cell strong { font-weight: 600; }
.details { display: grid; grid-template-columns: 180px 1fr; gap: 10px 14px; margin: 0; }
.details dt { color: var(--ink-600); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding-top: 3px; }
.details dd { margin: 0; color: var(--ink-900); }
.details code.block { display: inline-block; margin-bottom: 4px; }
.details.compact { grid-template-columns: 250px 1fr; margin: 12px 0 6px; }
.activity { list-style: none; margin: 0 0 14px; padding: 0; }
.activity li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--stone-100); }
.activity li:last-child { border-bottom: 0; }
.activity-action { font-weight: 500; color: var(--ink-900); }
.checklist { list-style: none; padding: 0; margin: 0 0 8px; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--ink-900); }
.checklist .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; }
.checklist .ok .dot { background: var(--ok-bg); color: var(--ok-text); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.checklist .ok .dot::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.checklist .pending .dot { background: var(--warn-bg); color: var(--warn-text); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.checklist .pending .dot::before { content: '\f017'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.steps { padding-left: 22px; margin: 0 0 6px; }
.steps li { margin-bottom: 10px; }
.steps code.block { display: block; width: fit-content; margin-top: 4px; }
.kv { display: inline-block; margin: 2px 6px 2px 0; padding: 1px 9px; border-radius: 999px; background: var(--stone-100); color: var(--stone-600); font-size: 11.5px; }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 4px; }
.pagination a { min-width: 32px; height: 32px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: var(--radius-md); border: 1px solid var(--stone-200);
  background: #fff; color: var(--ink-800); font-size: 11.5px; font-weight: 500; }
.pagination a:hover { background: var(--stone-50); text-decoration: none; }
.pagination a.active { background: var(--brand-navy); color: var(--gold-200); border-color: var(--brand-navy); }
.empty-state { text-align: center; padding: 56px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ico { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; margin-bottom: 6px;
  background: var(--brand-navy); color: var(--gold-300); box-shadow: 0 0 0 1px rgb(201 164 95 / .25); }
.empty-state h1 { font: 600 28px var(--ab-f-titulo); }
.status-code { font: 600 72px/1 var(--ab-f-titulo); color: var(--gold-300); }

/* Portal: accesos a las plataformas */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.app-tile { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: var(--radius-xl); color: var(--ink-900);
  background: #fff; border: 1px solid rgb(231 229 228 / .8); box-shadow: var(--shadow-card); overflow: hidden; font-weight: 400;
  transition: border-color .15s, box-shadow .15s, transform .2s var(--ab-curva); }
.app-tile::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(to right, transparent, var(--gold-400), transparent); opacity: 0; transition: opacity .2s; }
.app-tile:hover { transform: translateY(-2px); border-color: var(--gold-300); box-shadow: 0 10px 24px -12px rgb(21 18 15 / .25); text-decoration: none; color: var(--ink-900); }
.app-tile:hover::after { opacity: 1; }
.app-tile[aria-disabled=true] { pointer-events: none; opacity: .6; }
.app-logo { width: 48px; height: 48px; border-radius: var(--radius-lg); display: grid; place-items: center; overflow: hidden; margin-bottom: 10px;
  font: 600 20px var(--ab-f-titulo); color: var(--gold-300); background: var(--brand-navy); box-shadow: 0 0 0 1px rgb(201 164 95 / .25); }
.app-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.app-name { font: 600 22px/1.15 var(--ab-f-titulo); color: var(--brand-navy); }
.app-desc { color: var(--ink-600); font-size: 13px; line-height: 1.55; }
.app-roles { margin-top: 4px; font: 600 10px var(--ab-f-texto); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-700); }
.app-go { margin-top: auto; padding-top: 12px; font-size: 12px; font-weight: 600; color: var(--brand-navy); display: flex; align-items: center; gap: 6px; }
.app-go i { font-size: 10px; color: var(--gold-600); }
.app-tile:hover .app-go { color: var(--gold-700); }

/* Google Workspace: pasos guiados */
.steps-track { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.steps-track span { flex: 1; min-width: 190px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--stone-200);
  color: var(--ink-600); font-size: 12.5px; font-weight: 500; text-align: center; }
.steps-track span.done { background: var(--ok-bg); border-color: var(--ok-ring); color: var(--ok-text); }
.steps-track span.done::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; margin-right: 8px; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; background: var(--brand-navy); color: var(--gold-300);
  font: 600 17px var(--ab-f-titulo); box-shadow: 0 0 0 1px rgb(201 164 95 / .3); }
.step.disabled { opacity: .55; }
.actions-row { display: flex; gap: 10px; align-items: center; }
.big-number { font: 600 42px var(--ab-f-titulo); color: var(--brand-navy); vertical-align: -5px; margin-right: 6px; font-variant-numeric: lining-nums; }
.advanced summary { cursor: pointer; font-weight: 600; color: var(--ink-900); }
.advanced[open] summary { margin-bottom: 10px; }
.setup-banner { justify-content: flex-start; flex-wrap: wrap; }
.setup-banner .btn { margin-left: auto; }

/* ══════════════════ PÁGINAS DE INGRESO ══════════════════ */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.lado-marca { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px; color: var(--stone-200);
  background: radial-gradient(circle at 50% 35%, rgb(201 164 95 / .14), transparent 65%), var(--brand-navy); }
.lado-marca::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .04;
  background: url("../img/estampado_tropical.svg") repeat; background-size: 360px; filter: grayscale(1) brightness(2); }
.lado-marca > * { position: relative; }
.lado-marca .brand-eyebrow { color: var(--gold-400); }
.lado-marca .auth-box { text-align: center; max-width: 420px; margin: 0 auto; }
.lado-marca img { width: 170px; }
.lado-marca h1 { font: 600 60px/1 var(--ab-f-titulo); letter-spacing: .01em; color: #fff; margin: 18px 0 0; white-space: nowrap; }
.lado-marca h1 em { font-family: var(--ab-f-acento); font-weight: 500; color: var(--gold-300); }
.corona-linea { width: 120px; margin: 24px auto; }
.lado-marca .lead { max-width: 380px; margin: 0 auto; color: var(--stone-300); font-weight: 300; font-size: 15px; line-height: 1.75; }
.marquesina { overflow: hidden; white-space: nowrap; border-block: 1px solid rgb(201 164 95 / .2); margin: 0 -56px 22px; }
.marquesina-pista { display: inline-flex; gap: 40px; padding: 10px 0; animation: marquesina 40s linear infinite; }
.marquesina span { font: 500 10px var(--ab-f-texto); letter-spacing: .18em; text-transform: uppercase; color: var(--stone-400); }
.marquesina em { font: italic 500 15px var(--ab-f-acento); color: var(--gold-400); }
@keyframes marquesina { to { transform: translateX(-50%); } }
.copy-foot { font-size: 11px; color: var(--stone-500); margin: 0; letter-spacing: .06em; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.auth-box { width: 100%; max-width: 390px; animation: aparecer .6s var(--ab-curva) both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth-heading { font: 600 34px/1.15 var(--ab-f-titulo); letter-spacing: .01em; color: var(--brand-navy); margin: 4px 0 8px; }
.auth-panel .muted { font-size: 14px; line-height: 1.65; }
.auth-mobile-brand { display: none; text-align: center; margin-bottom: 28px; }
.auth-mobile-brand img { width: 110px; }
.auth-mobile-brand::after { content: ''; display: block; height: 1px; margin-top: 18px; background: linear-gradient(to right, transparent, rgb(201 164 95 / .7), transparent); }
.separador { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--ink-500); font-size: 12px; }
.separador::before, .separador::after { content: ''; flex: 1; height: 1px; background: var(--stone-200); }
.dev-login .row { display: flex; gap: 8px; }
.dev-login input { flex: 1; }
.dev-login-title { font: 600 10px var(--ab-f-texto); letter-spacing: .16em; text-transform: uppercase; color: var(--warn-text); margin-bottom: 8px; }
.auth-foot { margin-top: 40px; text-align: center; font-size: 11px; color: var(--ink-500); }
.auth-foot i { color: var(--gold-500); }

/* Botón de ingreso con Google (principal de formulario) */
.btn-ab { width: 100%; justify-content: flex-start; gap: 14px; padding: 10px 18px 10px 10px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  background: var(--brand-navy); color: var(--gold-200); border: 0; border-radius: var(--radius-md); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .2); }
.btn-ab:hover { background: var(--brand-navy-mid); color: var(--gold-100); }
.btn-ab span { flex: 1; text-align: left; }
.btn-ab .fa-arrow-right { color: var(--gold-400); transition: transform .2s; }
.btn-ab:hover .fa-arrow-right { transform: translateX(4px); }
.btn-ab-logo { width: 38px; height: 38px; object-fit: contain; padding: 4px; border-radius: var(--radius-md); background: rgb(255 255 255 / .1); }
.btn-ab .btn-google-g { display: inline-flex; align-items: center; justify-content: center; background: #fff !important; flex: 0 0 38px; width: 38px; padding: 0; text-align: center; }
.btn-ab-texto { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.btn-ab-cuenta { display: block; font-size: 11.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--stone-300); word-break: break-all; }
.btn-ab.cargando { pointer-events: none; opacity: .8; cursor: progress; }
.btn-ab.cargando .fa-arrow-right { animation: ab-pulso 1s ease-in-out infinite; }
@keyframes ab-pulso { 50% { opacity: .25; transform: translateX(4px); } }
.otra-cuenta { text-align: center; margin: 12px 0 0; font-size: 12.5px; }
.destino { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 22px; border-radius: var(--radius-lg);
  background: var(--brand-navy); box-shadow: 0 10px 15px -3px rgb(0 0 0 / .2), 0 0 0 1px rgb(201 164 95 / .25); }
.destino .eyebrow { color: var(--gold-400); }
.destino-logo { width: 44px; height: 44px; border-radius: var(--radius-md); display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
  background: rgb(201 164 95 / .15); color: var(--gold-300); font: 600 20px var(--ab-f-titulo); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .4); }
.destino-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.destino-nombre { margin: 2px 0 0; font: 600 22px/1.1 var(--ab-f-titulo); color: #fff; }
.boton-muestra { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px; margin: 10px 0 14px; border-radius: var(--radius-lg); background: var(--stone-50); }
.snippet { display: block; white-space: pre-wrap; padding: 12px 14px; font-size: 11.5px; line-height: 1.6; }

/* Ventana modal */
.modal-fondo { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(21 18 15 / .7); backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 440px; padding: 32px; text-align: center; border-radius: var(--radius-xl); background: #fff; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .4), 0 0 0 1px rgb(201 164 95 / .2); animation: aparecer .4s var(--ab-curva) both; }
.modal-ico { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; font-size: 22px; background: var(--error-bg); color: var(--error-text); box-shadow: inset 0 0 0 1px var(--error-ring); }
.modal p { margin-bottom: 22px; }
.verify-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 6px 0 14px; }
.alert.mismatch { align-items: flex-start; }
.alert.mismatch ol { margin: 8px 0 0; padding-left: 20px; }
.alert.mismatch li { margin-bottom: 6px; }

/* Estado de conexión de la plataforma */
.conexion.pendiente { border-color: rgb(201 164 95 / .45); background: linear-gradient(135deg, #fff, var(--gold-50)); }
.conexion.ok { border-color: var(--ok-ring); }
.conexion .checklist li { flex-wrap: wrap; }

/* Registro de plataformas: preguntas guiadas */
.plataforma-form .pregunta { display: flex; gap: 14px; align-items: flex-start; }
.plataforma-form .pregunta > label, .plataforma-form .pregunta > .campo { flex: 1; }
.plataforma-form .campo { margin-bottom: 18px; }
.campo-titulo { display: block; margin: 0 0 8px; font: 500 14px var(--ab-f-texto); color: var(--ink-800); }
.opciones { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.form label.opcion { flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; padding: 12px 14px; cursor: pointer;
  border: 1px solid var(--stone-200); border-radius: var(--radius-lg); background: #fff; font-weight: 400; color: var(--ink-900); transition: border-color .15s, background-color .15s; }
.form label.opcion:hover { border-color: var(--stone-300); }
.form label.opcion:has(input:checked) { border-color: var(--gold-400); background: var(--gold-50); box-shadow: 0 0 0 1px var(--gold-400); }
.opcion input { margin-top: 3px; }
.opcion small { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-600); }
.resumen-conexion { margin: 4px 0 18px 46px; padding: 14px 16px; border-radius: var(--radius-lg); border: 1px dashed var(--stone-300); background: var(--stone-50); }
.resumen-conexion code { word-break: break-all; }
.paso-kit { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--stone-100); }
.paso-kit:first-of-type { border-top: 0; }
.paso-kit > div { flex: 1; min-width: 0; }
.paso-kit h3 { margin: 4px 0 6px; font: 600 18px var(--ab-f-titulo); letter-spacing: .01em; text-transform: none; color: var(--brand-navy); }

/* Google Workspace */
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub.ellipsis { max-width: 100%; text-transform: none; letter-spacing: 0; }
.stat-value.stat-text { font-size: 26px; margin-top: 20px; }
.stat-value.stat-text.ok { color: var(--ok-text); }
.stat-value.stat-text.pending { color: var(--gold-600); }
details.subsection { border: 1px solid var(--stone-200); border-radius: var(--radius-lg); padding: 12px 16px; margin-top: 14px; background: var(--stone-50); }
details.subsection > summary { cursor: pointer; font-weight: 600; color: var(--ink-900); list-style-position: inside; }
details.subsection > summary i { margin: 0 6px 0 4px; color: var(--gold-600); }
details.subsection[open] > summary { margin-bottom: 12px; }
details.subsection .form-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.sub-title { display: flex; align-items: center; gap: 8px; font: 600 18px var(--ab-f-titulo); margin: 22px 0 10px; color: var(--brand-navy); }
.sub-title i { color: var(--gold-600); font-size: 13px; }
.account-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.account-chips .chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--stone-200); background: #fff; color: var(--ink-600); font-size: 12.5px; text-decoration: none; }
.account-chips .chip strong { color: var(--ink-900); margin-right: 3px; }
.account-chips a.chip:hover { border-color: var(--gold-400); }
.account-chips .chip.ok { border-color: var(--ok-ring); background: var(--ok-bg); }
.account-chips .chip.warn { border-color: var(--warn-ring); background: var(--warn-bg); }
.schedule-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius-lg);
  border: 1px dashed var(--stone-300); background: var(--stone-50); margin-bottom: 8px; }
.schedule-box.ok { border-style: solid; border-color: var(--ok-ring); background: var(--ok-bg); }
.schedule-box p { margin: 0 0 4px; }
.sync-table th, .sync-table td { padding: 9px 8px; }
.sync-table th { white-space: nowrap; }
.sync-table td { font-size: 12px; }
.sync-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sync-table td .ellipsis { max-width: 140px; }

/* Usuarios externos */
details.externo { margin-top: 22px; border-top: 1px solid var(--stone-200); padding-top: 16px; }
details.externo > summary { cursor: pointer; text-align: center; font-weight: 600; font-size: 13px; color: var(--ink-900); list-style: none; }
details.externo > summary::-webkit-details-marker { display: none; }
details.externo > summary span { display: block; font-weight: 400; font-size: 12px; color: var(--ink-600); margin-top: 2px; }
details.externo > summary:hover span { color: var(--gold-700); }
details.externo[open] > summary { margin-bottom: 14px; }
.externo-form { display: flex; flex-direction: column; gap: 12px; }
.externo-form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-800); }
.externo-form .reglas { margin: 0; padding-left: 18px; }
.externo-form .btn-primary { padding: 12px; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; color: var(--gold-200); box-shadow: 0 4px 6px -1px rgb(0 0 0 / .2); }
.externo-form .btn-primary:hover { color: var(--gold-100); }
.activation-box { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius-lg); border: 1px solid rgb(201 164 95 / .4);
  background: var(--gold-50); margin-bottom: 18px; }
.activation-box code.copy { word-break: break-all; white-space: normal; }
.form-narrow { max-width: 760px; }
.actions-row.wrap { flex-wrap: wrap; }

/* Portal del colaborador */
.portal { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.perfil { position: sticky; top: 90px; }
.perfil-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.perfil-nombre { font: 600 21px/1.15 var(--ab-f-titulo); color: var(--brand-navy); margin: 0 0 2px; }
.perfil-correo { margin: 0; word-break: break-all; }
.perfil-datos { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; padding-top: 14px; border-top: 1px solid var(--stone-100); }
.perfil-datos dt { font: 600 10px var(--ab-f-texto); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-600); padding-top: 3px; }
.perfil-datos dd { margin: 0; color: var(--ink-900); font-size: 13px; overflow-wrap: anywhere; }
.perfil-nota { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-lg); background: var(--stone-50); }
.perfil-nota i { color: var(--gold-600); margin-right: 4px; }
.col-plataforma { min-width: 210px; }

/* Mi perfil */
.perfil-hero { display: flex; align-items: center; gap: 24px; }
.perfil-hero h1 { font: 600 32px/1.1 var(--ab-f-titulo); margin: 0 0 4px; }
.perfil-hero .muted { margin: 0 0 12px; }
.perfil-hero-info { min-width: 0; }
.perfil-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.perfil-hero-accion { margin-left: auto; flex-shrink: 0; align-self: flex-start; }
.stat-de { font-size: 20px; color: var(--ink-500); margin-left: 2px; }
.kpi-delta { font-weight: 600; color: var(--ink-600); }
.kpi-delta.up { color: var(--ok-text); }
.kpi-delta.down { color: var(--gold-700); }

/* Mi perfil: actividad diaria. Tarjeta oscura de marca; barras apiladas (SSO abajo, plataformas arriba).
   Colores validados contra el fondo #1d1914 (separación para daltonismo y contraste). */
.actividad { position: relative; overflow: hidden; color: var(--stone-200); border: 1px solid rgb(201 164 95 / .22);
  background: radial-gradient(120% 90% at 100% 0%, rgb(201 164 95 / .14), transparent 55%), linear-gradient(160deg, #262019, #1d1914 55%, #15120f); }
.actividad::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(to right, transparent, rgb(201 164 95 / .8), transparent); }
.actividad-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 18px 32px; margin-bottom: 18px; }
.actividad-eyebrow { margin: 0 0 4px; font: 600 10px var(--ab-f-texto); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-400); }
.actividad-titulo { margin: 0; font: 600 26px/1.1 var(--ab-f-titulo); color: #fff; }
.actividad-titulo em { color: var(--gold-300); }
.actividad-resumen { display: flex; gap: 0; }
.actividad-resumen > div { display: flex; flex-direction: column; padding: 0 20px; border-left: 1px solid rgb(201 164 95 / .2); }
.actividad-resumen > div:first-child { border-left: 0; padding-left: 0; }
.ar-valor { font: 600 28px/1 var(--ab-f-titulo); color: #fff; font-variant-numeric: lining-nums tabular-nums; }
.ar-label { margin-top: 5px; font: 600 9.5px var(--ab-f-texto); letter-spacing: .14em; text-transform: uppercase; color: var(--stone-400); white-space: nowrap; }
.actividad-vacia { margin: 6px 0 0; color: var(--stone-400); }

.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12px;
  color: var(--stone-200); background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); }
.chart-legend strong { color: #fff; font-variant-numeric: tabular-nums; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sw-sso, .bar-sso { background: #b88d34; }
.sw-apps, .bar-apps { background: #4f86e0; }

.chart-act { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.chart-y { position: relative; height: 190px; min-width: 18px; font-size: 10.5px; color: var(--stone-500); text-align: right; font-variant-numeric: tabular-nums; }
.chart-y span { position: absolute; right: 0; transform: translateY(-50%); line-height: 1; }
.chart-plot { position: relative; min-width: 0; }
.chart-grid { position: absolute; inset: 0 0 auto; height: 190px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.chart-grid i { display: block; height: 1px; background: rgb(255 255 255 / .07); }
.chart-grid i:last-child { background: rgb(201 164 95 / .45); }
.chart-bars { position: relative; display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; height: 190px; }
.chart-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-width: 0; padding: 0 1px;
  border-radius: 6px 6px 0 0; outline: none; cursor: default; transition: background-color .15s; }
.chart-col.finde { background: rgb(255 255 255 / .025); }
.chart-col:hover, .chart-col:focus-visible { background: rgb(201 164 95 / .12); }
.chart-col.hoy { background: rgb(201 164 95 / .08); box-shadow: inset 0 0 0 1px rgb(201 164 95 / .35); }
.chart-col .bar { display: block; width: 100%; max-width: 16px; margin: 0 auto; min-height: 3px; transition: filter .15s; }
.chart-col .bar:first-of-type { border-radius: 4px 4px 0 0; }
.chart-col .bar-apps { background: linear-gradient(#6b9bec, #4f86e0); }
.chart-col .bar-sso { background: linear-gradient(#c99d42, #b88d34); }
.chart-col:hover .bar, .chart-col:focus-visible .bar { filter: brightness(1.15); }
.chart-bars:hover .chart-col:not(:hover) .bar { filter: saturate(.55) brightness(.8); }
.chart-x { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; margin-top: 8px; font-size: 10.5px; color: var(--stone-500); }
.chart-x span { white-space: nowrap; overflow: visible; }
.chart-x span:last-child { justify-self: end; color: var(--gold-300); font-weight: 600; }

.chart-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); z-index: 5; min-width: 190px;
  padding: 10px 12px; border-radius: 10px; background: #fff; color: var(--ink-900); box-shadow: 0 12px 28px -6px rgb(0 0 0 / .5);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s, transform .12s; }
.chart-tip.izq { left: 0; transform: translateY(4px); }
.chart-tip.der { left: auto; right: 0; transform: translateY(4px); }
.chart-col:hover .chart-tip, .chart-col:focus-visible .chart-tip { opacity: 1; visibility: visible; transform: translateX(-50%); }
.chart-col:hover .chart-tip.izq, .chart-col:focus-visible .chart-tip.izq,
.chart-col:hover .chart-tip.der, .chart-col:focus-visible .chart-tip.der { transform: none; }
.chart-tip p { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; white-space: nowrap; }
.chart-tip p + p { margin-top: 4px; }
.chart-tip strong { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.chart-tip .ct-fecha { margin-bottom: 8px; font: 600 10px var(--ab-f-texto); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-700); }
.chart-tip .ct-total { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--stone-200); color: var(--ink-600); }

/* Mi perfil: plataformas con acceso */
.mis-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.mi-app { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid var(--stone-200); border-radius: var(--radius-lg); }
.mi-app .app-logo { margin-bottom: 0; flex-shrink: 0; }
.mi-app-info { flex: 1; min-width: 0; }
.mi-app-info p { margin: 0; }
.mi-app-nombre { font: 600 18px/1.2 var(--ab-f-titulo); color: var(--brand-navy); }
.mi-app-uso { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 12.5px; }

/* Colaboradores: selección y acceso en bloque */
.col-check { width: 36px; text-align: center; }
.col-check input { width: 16px; height: 16px; cursor: pointer; }
.masivo { margin-bottom: 16px; }
.m-seleccion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 14px; }
.m-contador { margin-right: 6px; }
.masivo .form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.m-flotante { position: fixed; right: 24px; bottom: 20px; z-index: 20; height: 40px; padding: 0 18px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px;
  background: var(--gold-400); color: var(--brand-navy); font-weight: 600; font-size: 13px; text-decoration: none; box-shadow: 0 10px 25px -5px rgb(0 0 0 / .3); }
.m-flotante:hover { background: var(--gold-300); color: var(--brand-navy); text-decoration: none; }
.m-flotante[hidden] { display: none; }
.masivo select { min-width: 220px; }
.masivo[hidden] { display: none; }

/* Bloques para copiar (prompt, .env, botón) */
.grid-2 > *, .portal > *, .card { min-width: 0; }
.details dd { min-width: 0; overflow-wrap: anywhere; }
.details dd code, .copy { overflow-wrap: anywhere; word-break: break-all; white-space: normal; }
.copy.snippet { white-space: pre-wrap; word-break: normal; overflow-wrap: anywhere; }
pre.snippet { margin: 0; font: 500 11.5px/1.6 var(--ab-f-mono); background: var(--stone-50); border: 1px solid var(--stone-200); border-radius: var(--radius-lg); color: var(--ink-900); }

.prompt-preparacion { margin-bottom: 16px; }
.prompt-preparacion > summary, .plegable > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.prompt-preparacion > summary::-webkit-details-marker, .plegable > summary::-webkit-details-marker { display: none; }
.prompt-preparacion[open] > summary, .plegable[open] > summary { margin-bottom: 12px; }
.zona-peligro > summary { cursor: pointer; color: var(--error-text); font-weight: 600; }
.zona-peligro[open] > summary { margin-bottom: 10px; }

/* Código de verificación por correo */
.codigo-input { font: 600 26px/1.2 var(--ab-f-mono); letter-spacing: .35em; text-align: center; }
.reenviar { margin-top: 14px; text-align: center; }

/* ══════════════════ RESPONSIVO ══════════════════ */
@media (max-width: 1180px) {
  .clock-pill { display: none; }
  .gw-pill span { display: none; }
}
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1023px) {
  .menu-btn { display: grid !important; }
  .ab-header__inner { padding: 0 12px; gap: 10px; }
  .ab-nav { display: none; position: fixed; top: 65px; left: 0; right: 0; z-index: 35; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 12px 14px; background: var(--brand-navy); box-shadow: 0 20px 25px -5px rgb(0 0 0 / .4); border-top: 1px solid rgb(201 164 95 / .2);
    max-height: calc(100vh - 65px); overflow-y: auto; }
  .ab-nav.open { display: flex; }
  .ab-nav .ab-menu-panel { position: static; min-width: 0; margin-top: 4px; box-shadow: none; background: rgb(255 255 255 / .03); }
  .content { padding: 22px 16px 40px; }
  .grid-2, .form-grid { grid-template-columns: 1fr; }
  .auth-split { grid-template-columns: 1fr; }
  .lado-marca { display: none; }
  .auth-mobile-brand { display: block; }
  .auth-panel { align-items: flex-start; padding-top: 40px; }
}
@media (max-width: 900px) { .portal { grid-template-columns: 1fr; } .perfil { position: static; } }
@media (max-width: 700px) {
  .resumen-conexion { margin-left: 0; }
  .plataforma-form .pregunta .step-num { display: none; }
  .perfil-hero { flex-direction: column; text-align: center; }
  .perfil-chips { justify-content: center; }
}
@media (max-width: 600px) {
  .stats { grid-template-columns: 1fr; }
  .details, .details.compact { grid-template-columns: 1fr; }
  .display { font-size: 1.65rem; }
  .sb-brand-sub { display: none; }
  .page-icon { width: 42px; height: 42px; }
  .perfil-hero { flex-wrap: wrap; }
  .perfil-hero-accion { margin-left: 0; }
  .chart-bars { gap: 2px; }
  .actividad-resumen > div { padding: 0 12px; }
  .ar-valor { font-size: 22px; }
  .ar-label { white-space: normal; }
  .chart-x { font-size: 9.5px; gap: 2px; }
  .mis-apps { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
