/* =========================================================================
   Wasabi · hoja de estilo única para todas las páginas.
   Mobile first: lo que ves sin media query es el móvil; a partir de 880px
   la navegación pasa de barra inferior a columna lateral.
   ========================================================================= */

:root {
  /* Superficies y texto */
  --bg:            #f4f4f3;
  --surface:       #ffffff;
  --surface-2:     #fafafa;
  --surface-3:     #eeeeec;
  --line:          #e4e4e1;
  --line-strong:   #d1d1cd;
  --text:          #16161a;
  --text-2:        #55555d;
  --text-3:        #87878f;

  /* Acento: la tinta de 2Playbook. El amarillo va aparte, más abajo. */
  --accent:        #17171b;
  --accent-hover:  #000000;
  --accent-soft:   #f0f0ee;
  --accent-line:   #dcdcd7;

  /* Estados */
  --ok:            #3e7549;
  --ok-soft:       #e9f2eb;
  --ok-line:       #c3ddc9;
  --danger:        #bd4b3f;
  --danger-soft:   #fbeceb;
  --warn:          #a9761c;
  --warn-soft:     #fbf2e1;
  --info:          #3d6f96;
  --info-soft:     #e9f1f7;

  /* Marca 2Playbook. El amarillo marca lo elegido y nada más: la sección en la
     que estás, el filtro activo, la pestaña abierta, el campo con el foco y el
     subrayado de un enlace. En pantalla completa sólo manda en el acceso. */
  --pb-ink:         #0d0d0f;
  --pb-yellow:      #ffe100;
  --pb-yellow-2:    #ffd000;
  --pb-yellow-soft: #fff6c2;
  --pb-yellow-line: #ffe375;
  --pb-yellow-ink:  #4a3f00;
  --pb-ring:        rgba(255, 225, 0, .5);
  --pb-red:         #cc2131;

  /* Formas */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --shadow-1: 0 1px 2px rgba(16, 16, 20, .05);
  --shadow-2: 0 4px 16px rgba(16, 16, 20, .08);
  --shadow-3: 0 18px 48px rgba(16, 16, 20, .18);

  --nav-h: 66px;
  --bar-h: 56px;
  --side-w: 236px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p  { margin: 0 0 .8em; }
a  { color: var(--accent); text-decoration: none; }
a:hover {
  text-decoration: underline;
  text-decoration-color: var(--pb-yellow);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- arranque */

.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--accent-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
}
.spinner--sm { width: 15px; height: 15px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ layout */

.app { min-height: 100dvh; }

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Barra superior (móvil) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__title {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.main {
  flex: 1;
  padding: 16px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

/* Navegación inferior (móvil) */
.bottomnav {
  position: fixed;
  z-index: 30;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1;
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-3);
  text-decoration: none;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 3px 0 var(--pb-yellow);
}

.sidebar { display: none; }

/* Columna lateral a partir de tableta */
@media (min-width: 880px) {
  .shell { flex-direction: row; }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 14px 16px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-size: 1.06rem;
  }
  .brand__mark {
    width: 30px; height: 30px;
    border-radius: 5px;
    background: var(--pb-yellow);
    color: var(--pb-ink);
    display: grid;
    place-items: center;
    flex: none;
  }
  .brand__mark svg { width: 17px; height: 17px; }
  .brand__mark { font-weight: 800; font-size: .78rem; letter-spacing: -.02em; }

  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-weight: 500;
    font-size: .93rem;
    text-decoration: none;
  }
  .sidenav a svg { width: 19px; height: 19px; flex: none; }
  .sidenav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
  .sidenav a[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-hover);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--pb-yellow);
  }

  .sideuser {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .sideuser__info { min-width: 0; flex: 1; }
  .sideuser__name {
    font-size: .88rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sideuser__group { font-size: .76rem; color: var(--text-3); }

  .bottomnav { display: none; }
  .topbar {
    height: 68px;
    padding: 0 32px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    position: static;
  }
  .topbar__title { font-size: 1.45rem; }
  .main { padding: 4px 32px 48px; }
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
}

/* ---------------------------------------------------------------- avatares */

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: grid;
  place-items: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex: none;
  border: 1px solid var(--accent-line);
}
.avatar--sm { width: 26px; height: 26px; font-size: .66rem; }
.avatar--muted { background: var(--surface-3); color: var(--text-3); border-color: var(--line); }

/* ---------------------------------------------------------------- botones */

.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .13s ease, border-color .13s ease, opacity .13s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--danger { color: var(--danger); border-color: #e6c4c0; background: var(--surface); }
.btn--danger:hover { background: var(--danger-soft); }

.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }

.btn--sm { padding: 6px 10px; font-size: .83rem; }
.btn--icon { padding: 7px; border-radius: var(--r-sm); }
.btn--icon svg { width: 18px; height: 18px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------- tarjetas */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card__body { padding: 16px; }
.card__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__head h2 { flex: 1; min-width: 0; }

/* -------------------------------------------------------------- cabeceras */

.pagehead {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.pagehead__text { flex: 1; min-width: 0; }
.pagehead__sub { color: var(--text-3); font-size: .86rem; margin-top: 2px; }

.section-title {
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 22px 0 9px;
}

/* --------------------------------------------------------------- filtros */

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .toolbar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .toolbar .search { max-width: 320px; }
}

.search { position: relative; flex: 1; min-width: 0; }
.search svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-3);
  pointer-events: none;
}
.search input { padding-left: 34px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: .83rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: var(--surface-3); }
.chip[aria-pressed="true"] {
  background: var(--pb-yellow-soft);
  border-color: var(--pb-yellow-line);
  color: var(--pb-yellow-ink);
  font-weight: 600;
}

/* --------------------------------------------------------------- listados */

.list { display: flex; flex-direction: column; gap: 8px; }

.row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  text-decoration: none;
}
a.row:hover, button.row:hover { border-color: var(--line-strong); text-decoration: none; }
button.row { cursor: pointer; }

.row__main { flex: 1; min-width: 0; }
.row__title {
  font-weight: 600;
  font-size: .96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__title--done { text-decoration: line-through; color: var(--text-3); }
.row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: .82rem;
  color: var(--text-3);
}
.row__meta strong { color: var(--text-2); font-weight: 550; }
.row__side { display: flex; align-items: center; gap: 6px; flex: none; }
.row__actions { display: flex; gap: 2px; flex: none; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--ok      { background: var(--ok-soft);     color: var(--ok); border-color: var(--ok-line); }
.badge--info    { background: var(--info-soft);   color: var(--info); }
.badge--warn    { background: var(--warn-soft);   color: var(--warn); }
.badge--danger  { background: var(--danger-soft); color: var(--danger); }
.badge--muted   { background: var(--surface-3);   color: var(--text-3); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.prio { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- formularios */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.field__hint { font-size: .78rem; color: var(--text-3); margin-top: 5px; }
.field__error { font-size: .78rem; color: var(--danger); margin-top: 5px; font-weight: 500; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .93rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 78px; line-height: 1.45; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2387878f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--pb-ring);
}
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }

.field-row { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 560px) {
  .field-row { flex-direction: row; gap: 12px; }
  .field-row > .field { flex: 1; }
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .92rem;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }

/* ----------------------------------------------------------------- modales */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(16, 16, 20, .42);
  backdrop-filter: blur(2px);
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal__sheet {
  background: var(--surface);
  width: 100%;
  max-height: 92dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  animation: rise .22s cubic-bezier(.22, .9, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes rise { from { transform: translateY(22px); opacity: .6; } }

.modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { flex: 1; min-width: 0; font-size: 1.02rem; }
.modal__body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal__foot .btn { flex: 1; }

@media (min-width: 620px) {
  .modal { align-items: center; padding: 24px; }
  .modal__sheet { max-width: 520px; border-radius: var(--r-lg); max-height: 86dvh; }
  .modal__foot { border-radius: 0 0 var(--r-lg) var(--r-lg); justify-content: flex-end; }
  .modal__foot .btn { flex: none; min-width: 108px; }
  .modal__sheet--wide { max-width: 640px; }
}

/* ------------------------------------------------------------------ avisos */

.toasts {
  position: fixed;
  z-index: 80;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 880px) {
  .toasts { left: auto; right: 24px; bottom: 24px; width: 380px; }
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: .89rem;
  box-shadow: var(--shadow-2);
  animation: rise .2s ease;
  pointer-events: auto;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.toast--ok    { background: #2f6b3d; }
.toast--error { background: #9c3a30; }
.toast--warn  { background: #8a5c12; }
.toast__hint { display: block; opacity: .82; font-size: .82rem; margin-top: 2px; }

/* --------------------------------------------------------------- vacíos */

.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.empty h3 { color: var(--text-2); margin-bottom: 5px; }
.empty p { font-size: .88rem; margin-bottom: 14px; }

.loading { display: grid; place-items: center; padding: 42px; }

.alert {
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: .87rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: #edc9c4; }
.alert--info  { background: var(--info-soft);   color: var(--info); }
.alert--warn  { background: var(--warn-soft);   color: var(--warn); }
.alert strong { display: block; margin-bottom: 2px; }

/* --------------------------------------------------------------- métricas */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.stat__n { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.stat__k { font-size: .77rem; color: var(--text-3); margin-top: 2px; }

.deflist { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .deflist { grid-template-columns: repeat(2, 1fr); } }
.deflist div { min-width: 0; }
.deflist dt { font-size: .77rem; color: var(--text-3); margin-bottom: 1px; }
.deflist dd { margin: 0; font-size: .92rem; font-weight: 500; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- utilidad */

.stack     { display: flex; flex-direction: column; gap: 8px; }
.inline    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer    { flex: 1; }
.muted     { color: var(--text-3); }
.small     { font-size: .84rem; }
.mono      { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.center    { text-align: center; }
.hidden    { display: none !important; }
.nowrap    { white-space: nowrap; }
.mt-2      { margin-top: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.load-more { display: grid; place-items: center; padding: 14px 0 4px; }

/* ------------------------------------------------------------------ login */
/* La única pantalla con la imagen del medio: negro, amarillo y un titular
   grande, como en 2playbook.com. Móvil: escenario arriba y formulario debajo.
   A partir de 880px, dos columnas. Sólo afecta al login: fuera de .login la
   aplicación sigue siendo verde wasabi. */

.login {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--pb-ink);
}

.login__stage {
  position: relative;
  overflow: hidden;
  min-height: 48vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}
.login__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.login__pitch {
  position: relative;
  padding: 30px 18px 20px;
  margin-top: auto;
}
.login__kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 9px;
  background: var(--pb-yellow);
  color: var(--pb-ink);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.login__claim {
  margin: 0;
  font-size: clamp(2rem, 10vw, 2.7rem);
  line-height: .98;
  font-weight: 800;
  letter-spacing: -.02em;
  text-transform: uppercase;
}
.login__claim span { display: block; color: var(--pb-yellow); }
.login__sub {
  position: relative;
  margin: 14px 0 0;
  max-width: 44ch;
  color: #c8c8cf;
  font-size: .9rem;
}

.login__ticker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 3px solid var(--pb-yellow);
  background: rgba(13, 13, 15, .7);
}
.login__ticker li {
  padding: 9px 12px;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8f8f99;
}
.login__ticker li + li { border-left: 1px solid rgba(255, 255, 255, .1); }

.login__panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--surface);
  padding: 28px 18px 34px;
}
.login__box { width: 100%; max-width: 380px; }

.login__brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
}
.login__mark {
  width: 42px; height: 42px;
  border-radius: 3px;
  background: var(--pb-yellow);
  color: var(--pb-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -.03em;
}
.login__name { display: flex; flex-direction: column; line-height: 1.2; }
.login__name b { font-size: 1.02rem; font-weight: 800; letter-spacing: -.02em; }
.login__name em { font-style: normal; font-size: .77rem; color: var(--text-3); }

/* El formulario toma el gesto de la marca: etiquetas en versalita y botón
   amarillo con texto negro. */
.login .field > label {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-2);
}
.login input[type=email],
.login input[type=password] {
  border-radius: 3px;
  padding: 12px;
  font-size: .95rem;
}
.login .btn--primary {
  border-radius: 3px;
  padding: 13px 16px;
  background: var(--pb-yellow);
  border-color: var(--pb-yellow);
  color: var(--pb-ink);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.login .btn--primary:hover {
  background: var(--pb-yellow-2);
  border-color: var(--pb-yellow-2);
}
.login .btn--primary .spinner {
  border-color: rgba(13, 13, 15, .25);
  border-top-color: var(--pb-ink);
}

.login__foot {
  margin: 18px 0 0;
  text-align: center;
  font-size: .76rem;
  color: var(--text-3);
}

@media (min-width: 620px) {
  .login__pitch { padding: 40px 34px 26px; }
  .login__ticker li { padding: 10px 16px; font-size: .68rem; }
  .login__panel { padding: 40px 34px; }
}

@media (min-width: 880px) {
  .login { flex-direction: row; }
  .login__stage { flex: 1 1 auto; min-height: 100dvh; }
  .login__pitch { padding: 48px 48px 30px; }
  .login__claim { font-size: clamp(2.7rem, 4.4vw, 3.9rem); }
  .login__sub { font-size: .98rem; }
  .login__panel {
    flex: 0 0 430px;
    justify-content: center;
    padding: 40px 50px;
  }
}

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

/* ------------------------------------------------- navegación con secciones */
/* Móvil primero: la barra inferior lleva lo de siempre y un botón que abre la
   hoja con todas las secciones. En pantalla ancha la hoja no existe. */

.bottomnav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 1; height: var(--nav-h); border: 0; background: none;
  font: inherit; font-size: .68rem; color: var(--text-3); cursor: pointer;
}
.bottomnav button svg { width: 22px; height: 22px; }

.navsheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column;
  background: var(--surface);
}
.navsheet__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.navsheet__list {
  flex: 1; overflow-y: auto;
  padding: 10px 10px calc(env(safe-area-inset-bottom) + 20px);
}
.navsheet__list a {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; border-radius: var(--r-sm);
  color: var(--text); font-size: .92rem;
}
.navsheet__list a svg { width: 19px; height: 19px; flex: none; color: var(--text-3); }
.navsheet__list a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent-hover);
  box-shadow: inset 3px 0 0 var(--pb-yellow);
}
.navsheet__list a[aria-current="page"] svg { color: var(--accent); }

.sidenav__group {
  padding: 14px 10px 5px;
  font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-3);
}
.sidenav__group:first-child { padding-top: 4px; }

@media (min-width: 880px) {
  .navsheet { display: none; }
  .sidenav { overflow-y: auto; }
}

/* --------------------------------------------------------- piezas del CMS */

/* Rejilla de tarjetas: contadores, fichas de autor, planes, integraciones. */
.grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 620px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 620px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* Etiqueta de tag. La verde es la que ya tiene pareja en Intelligence. */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  font-size: .76rem; color: var(--text-2); white-space: nowrap;
}
.tag--linked { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }

/* La ficha que manda de una lista: la firma principal de un artículo, su
   categoría principal. Amarillo porque es lo elegido, como todo lo elegido. */
.tag--main {
  border-color: var(--pb-yellow-line);
  background: var(--pb-yellow-soft);
  color: var(--pb-yellow-ink);
  font-weight: 600;
}
.tag__note {
  font-size: .64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: .7;
}

/* El editor visual del cuerpo (Jodit). Su hoja se carga después que ésta, así
   que para que sus bordes y sus fondos sean los nuestros no queda otra que
   pesar más que ella. Es la única excepción; ver 0009-el-editor-es-jodit.
   Los selectores no cuelgan de .editor porque Jodit no se mete dentro de ese
   div: se pone al lado y deja el original escondido. */
.jodit-container:not(.jodit_inline) {
  border-color: var(--line-strong) !important;
  border-radius: var(--r-sm) !important;
  background: var(--surface) !important;
  font-family: var(--font) !important;
}
.jodit-toolbar__box:not(:empty):not(:empty) {
  background: var(--surface-2) !important;
  border-radius: var(--r-sm) var(--r-sm) 0 0 !important;
}
.jodit-workplace, .jodit-wysiwyg { background: var(--surface) !important; color: var(--text); }
.jodit-status-bar { background: var(--surface-2) !important; color: var(--text-3) !important; }
.jodit-ui-button:hover:not([disabled]) { background: var(--surface-3) !important; }
.jodit-toolbar-button__button.jodit-ui-button_active,
.jodit-ui-button_active { background: var(--pb-yellow-soft) !important; color: var(--pb-yellow-ink) !important; }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; line-height: 1; }

/* Punto de color de una sección. */
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* Pestañas dentro de una página. */
.tabs {
  display: flex; gap: 2px; overflow-x: auto;
  border-bottom: 1px solid var(--line); margin-bottom: 14px;
}
.tabs button {
  border: 0; background: none; font: inherit; cursor: pointer;
  padding: 9px 13px; white-space: nowrap;
  color: var(--text-2); border-bottom: 2px solid transparent;
}
.tabs button[aria-selected="true"] {
  color: var(--accent-hover);
  border-bottom-color: var(--pb-yellow);
  font-weight: 700;
}

/* Fila de ajuste con interruptor a la derecha. */
.switchrow {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.switchrow:last-child { border-bottom: 0; }
.switchrow__main { flex: 1; min-width: 0; }
.switchrow__title { display: block; font-weight: 500; }
.switchrow__hint { display: block; font-size: .8rem; color: var(--text-3); margin-top: 2px; }

/* Barra de progreso sencilla. */
.meter { height: 7px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ok); }
.meter--warn > span { background: var(--warn); }

/* Rejilla de fotos de una galería. */
.thumbs { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 620px) { .thumbs { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 880px) { .thumbs { grid-template-columns: repeat(4, 1fr); } }
.thumb { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.thumb img { display: block; width: 100%; height: 108px; object-fit: cover; background: var(--surface-3); }
.thumb__body { padding: 8px 9px; font-size: .78rem; }
.thumb__caption { display: block; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb__tools { display: flex; gap: 4px; margin-top: 6px; }

/* Tabla con desbordamiento propio: sólo donde una lista apilada no sirve. */
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); }
.table tbody tr:last-child td { border-bottom: 0; }

/* Bloque de texto preformateado: etiquetas GPT, JSON-LD, robots.txt. */
.code {
  margin: 0; padding: 12px; overflow-x: auto;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface-2); font-size: .78rem; line-height: 1.5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

/* Un icono que apunta al otro lado: se reutiliza el mismo símbolo girado. */
.flip { transform: scaleX(-1); }
