/* ===========================================================
   BLACKSTOCK · CENTRO CLIENTES · WORKSPACE
   v3 · 2026-05 · editorial / premium / calm
   Loaded after /client.css (which holds tokens + base + buttons)
   =========================================================== */

/* ──────────────────────────────────────────────────────────── */
/* APP SHELL  ·  sidebar + main                                 */
/* ──────────────────────────────────────────────────────────── */

.bs-app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Mobile top bar (hidden on desktop) ──────────────────── */
.bs-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 14px 18px;
  background: rgba(6, 6, 7, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-hair);
}
.bs-topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.bs-topbar__menu {
  width: 40px;
  height: 40px;
  border-radius: var(--r-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}
.bs-topbar__menu:hover { background: var(--surface-2); }
.bs-topbar__menu svg { width: 18px; height: 18px; }

/* ──────────────────────────────────────────────────────────── */
/* SIDEBAR                                                      */
/* ──────────────────────────────────────────────────────────── */

.bs-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
  padding: var(--s-7) 22px;
  border-right: 1px solid var(--line-hair);
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
}

.bs-sidebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.bs-sidebar__brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: transparent;
}
.bs-sidebar__brand-mark img,
.bs-sidebar__brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.bs-sidebar__brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.bs-sidebar__brand-name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: -0.015em;
  color: var(--text);
}
.bs-sidebar__brand-sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 4px;
}

/* ── Section label ─────────────────────────────────────────── */
.bs-sidebar__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 0 10px;
  margin: 0 0 var(--s-2);
}

/* ── Nav ───────────────────────────────────────────────────── */
.bs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bs-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-2);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.bs-nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bs-nav-link.is-active,
.bs-nav-link[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
}
.bs-nav-link.is-active::before,
.bs-nav-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 18px;
  background: var(--acid);
  border-radius: 1px;
}
.bs-nav-link svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.6;
  flex-shrink: 0;
  color: var(--text-3);
  transition: color var(--t-base) var(--ease);
}
.bs-nav-link:hover svg,
.bs-nav-link.is-active svg,
.bs-nav-link[aria-current="page"] svg {
  color: var(--text);
}
.bs-nav-link.is-active svg {
  color: var(--acid);
}

.bs-sidebar__section {
  display: flex;
  flex-direction: column;
}

.bs-sidebar__spacer { flex: 1; }

/* ── Account block ─────────────────────────────────────────── */
.bs-account {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-hair);
  border-radius: var(--r-3);
  background: var(--surface);
}
.bs-account__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.bs-account__avatar {
  width: 30px;
  height: 30px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.bs-account__main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.bs-account__name {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text);
  letter-spacing: -0.005em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-account__sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bs-account__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--line-hair);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.bs-account__meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.bs-account__meta-row strong {
  color: var(--text-2);
  font-weight: 500;
}

/* ── Footer ────────────────────────────────────────────────── */
.bs-sidebar__foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bs-side-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 10px;
  border-radius: var(--r-2);
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.bs-side-action:hover {
  background: var(--surface-2);
  color: var(--text);
}
.bs-side-action svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.6;
  color: var(--text-3);
  flex-shrink: 0;
}
.bs-side-action:hover svg { color: var(--text); }

/* Variante destacada — botón "Ir al panel" (acceso principal al panel.blackstock.es) */
.bs-side-action--primary {
  background: rgba(214, 255, 77, 0.08);
  border: 1px solid rgba(214, 255, 77, 0.22);
  color: var(--text);
  font-weight: 600;
  margin-bottom: 6px;
  box-shadow: inset 0 0 0 1px rgba(214, 255, 77, 0.05);
}
.bs-side-action--primary svg {
  color: #D6FF4D;
}
.bs-side-action--primary:hover {
  background: rgba(214, 255, 77, 0.14);
  border-color: rgba(214, 255, 77, 0.35);
  color: var(--text);
}
.bs-side-action--primary:hover svg { color: #D6FF4D; }

.bs-side-danger {
  margin-top: 4px;
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: rgba(248, 113, 113, 0.5);
  cursor: pointer;
  border-radius: var(--r-2);
  transition: color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.bs-side-danger:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.06);
}

/* ──────────────────────────────────────────────────────────── */
/* MAIN                                                         */
/* ──────────────────────────────────────────────────────────── */

.bs-main {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.bs-page {
  max-width: 1180px;
  padding: var(--s-9) var(--s-9) var(--s-10);
}

.bs-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-6);
  align-items: end;
  padding-bottom: var(--s-7);
  margin-bottom: var(--s-8);
  border-bottom: 1px solid var(--line-hair);
}

.bs-page-head__main {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.bs-page-head__title {
  font-family: var(--font-sans);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.0;
  color: var(--text);
}
.bs-page-head__title em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.bs-page-head__sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.6;
  max-width: 60ch;
}

.bs-page-head__actions {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.bs-page-head__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--text-3);
  text-align: right;
}

.bs-content {
  display: flex;
  flex-direction: column;
  gap: var(--s-9);
}

.bs-section {
  display: flex;
  flex-direction: column;
  gap: var(--s-6);
}

/* ──────────────────────────────────────────────────────────── */
/* ANNOUNCEMENT                                                 */
/* ──────────────────────────────────────────────────────────── */

.announcement {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-6);
  border: 1px solid var(--acid-line);
  background: linear-gradient(180deg, rgba(214, 255, 77, 0.04), transparent 110%);
  border-radius: var(--r-4);
}
.announcement__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-2);
  background: var(--acid-soft);
  color: var(--acid);
  flex-shrink: 0;
}
.announcement__icon svg { width: 14px; height: 14px; stroke-width: 1.7; }
.announcement__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.announcement__head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.announcement__head .acc-eyebrow { color: var(--acid); font-weight: 500; }
.announcement__msg {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
}

/* ──────────────────────────────────────────────────────────── */
/* SECTION HEADER (in-page)                                     */
/* ──────────────────────────────────────────────────────────── */

.bs-sect-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line-hair);
}
.bs-sect-head__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-4);
}
.bs-sect-head__title {
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}
.bs-sect-head__title em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}
.bs-sect-head__copy {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.55;
  max-width: 60ch;
}

/* ──────────────────────────────────────────────────────────── */
/* STATS · inline editorial row                                  */
/* ──────────────────────────────────────────────────────────── */

.bs-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--line-hair);
  border-bottom: 1px solid var(--line-hair);
}
.bs-stats__cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: var(--s-5) var(--s-4);
  border-right: 1px solid var(--line-hair);
  position: relative;
}
.bs-stats__cell:last-child { border-right: 0; }
.bs-stats__cell-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.bs-stats__cell-value {
  font-family: var(--font-sans);
  font-feature-settings: "tnum";
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.bs-stats__cell--accent .bs-stats__cell-value { color: var(--acid); }
.bs-stats__cell--muted .bs-stats__cell-value { color: var(--text-2); }

/* Big primary stat (single dominant) */
.bs-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: var(--s-7) 0;
}
.bs-hero-stat__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}
.bs-hero-stat__value {
  font-family: var(--font-sans);
  font-feature-settings: "tnum";
  font-size: clamp(56px, 9vw, 96px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.92;
  color: var(--text);
}
.bs-hero-stat__value em {
  font-style: normal;
  font-family: inherit;
  font-weight: inherit;
  color: inherit;
}

/* ──────────────────────────────────────────────────────────── */
/* LICENCIA · vincular                                          */
/* ──────────────────────────────────────────────────────────── */

.link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: end;
}
.link-form input {
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.link-form button { height: 44px; }

/* ──────────────────────────────────────────────────────────── */
/* LICENCIAS · cards                                             */
/* ──────────────────────────────────────────────────────────── */

.licenses-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.license-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-5);
  padding: var(--s-5) var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-4);
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.license-card:hover {
  border-color: var(--line);
  background: var(--surface-2);
}

.license-card__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.license-card__top {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.license-card__key {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}
.license-card__plan {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: -0.005em;
}

.license-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px var(--s-5);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.license-card__meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.license-card__meta-row strong {
  color: var(--text-2);
  font-weight: 500;
}
.license-meta-note {
  grid-column: 1 / -1;
  color: var(--warn);
}

.license-card__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  align-self: center;
  min-width: 140px;
}
.license-card__actions .btn { width: 100%; }

/* Empty state */
.licenses-empty {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  padding: var(--s-7);
  border: 1px dashed var(--line);
  border-radius: var(--r-4);
  background: var(--surface);
}
.licenses-empty__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-2);
  background: var(--surface-3);
  color: var(--text-3);
  flex-shrink: 0;
}
.licenses-empty__mark svg { width: 22px; height: 22px; }
.licenses-empty__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.licenses-empty__body strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.licenses-empty__body p {
  font-size: 13.5px;
  color: var(--text-3);
  margin: 0;
}

/* ──────────────────────────────────────────────────────────── */
/* TABLES (leaderboard / affiliate)                              */
/* ──────────────────────────────────────────────────────────── */

.bs-table-wrap {
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--line-hair);
  border-radius: var(--r-4);
  background: var(--surface);
}
.bs-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.bs-table th,
.bs-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line-hair);
  font-size: 13.5px;
  vertical-align: middle;
}
.bs-table th {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-4);
  background: var(--bg);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--line);
}
.bs-table tbody tr:last-child td { border-bottom: 0; }
.bs-table tbody tr {
  transition: background var(--t-base) var(--ease);
}
.bs-table tbody tr:hover {
  background: var(--surface-2);
}
.bs-table tbody tr.is-current {
  background: rgba(214, 255, 77, 0.035);
}
.bs-table tbody tr.is-current:hover {
  background: rgba(214, 255, 77, 0.06);
}

.bs-table .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  letter-spacing: 0;
  color: var(--text-2);
}
.bs-table .num--strong { color: var(--text); font-weight: 500; }

.leaderboard-rank {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-size: 14px;
  font-weight: 500;
  color: var(--text-3);
  width: 70px;
}
.leaderboard-rank.is-podium { color: var(--acid); font-weight: 600; }

.leaderboard-name,
.affiliate-name {
  font-weight: 500;
  color: var(--text);
  font-size: 14px;
}
.leaderboard-note,
.affiliate-note {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.leaderboard-pill {
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--acid-soft);
  border: 1px solid var(--acid-line);
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Empty row helper */
.bs-table-empty td {
  padding: var(--s-7) var(--s-5);
  text-align: center;
  color: var(--text-3);
  font-size: 13.5px;
}

/* ──────────────────────────────────────────────────────────── */
/* AFFILIATE                                                     */
/* ──────────────────────────────────────────────────────────── */

.affiliate-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-hair);
  border-bottom: 1px solid var(--line-hair);
}
.affiliate-summary__cell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--s-5) var(--s-4);
  border-right: 1px solid var(--line-hair);
}
.affiliate-summary__cell:last-child { border-right: 0; }
.affiliate-summary__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.affiliate-summary__value {
  font-family: var(--font-sans);
  font-feature-settings: "tnum";
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}
.affiliate-summary__cell--accent .affiliate-summary__value { color: var(--acid); }

.affiliate-share {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: end;
}
.affiliate-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s-2);
}
.affiliate-link-row input {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.affiliate-share .field input[readonly] {
  font-family: var(--font-mono);
}

/* ──────────────────────────────────────────────────────────── */
/* WHITELIST                                                     */
/* ──────────────────────────────────────────────────────────── */

.whitelist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--s-7);
  align-items: start;
}

.whitelist-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.whitelist-form-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.whitelist-form textarea {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0;
}

.whitelist-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.whitelist-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border: 1px solid var(--line-hair);
  border-radius: var(--r-3);
  background: var(--surface);
  transition: border-color var(--t-base) var(--ease), background var(--t-base) var(--ease);
}
.whitelist-card:hover {
  border-color: var(--line);
  background: var(--surface-2);
}
.whitelist-card__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.whitelist-card__head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.whitelist-card__head h3 {
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.whitelist-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--s-4);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.whitelist-card .resource-link {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  word-break: break-all;
  transition: color var(--t-base) var(--ease), text-decoration-color var(--t-base) var(--ease);
}
.whitelist-card .resource-link:hover {
  color: var(--acid);
  text-decoration-color: var(--acid);
}
.whitelist-card__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex-shrink: 0;
}
.whitelist-empty {
  padding: var(--s-7) var(--s-6);
  border: 1px dashed var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  font-size: 13.5px;
  color: var(--text-3);
  text-align: center;
}

/* ──────────────────────────────────────────────────────────── */
/* MODAL DELETE                                                  */
/* ──────────────────────────────────────────────────────────── */

.danger-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.danger-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-2);
  margin-top: var(--s-2);
}
.danger-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: var(--s-4);
  border: 1px solid rgba(248, 113, 113, 0.18);
  background: rgba(248, 113, 113, 0.04);
  border-radius: var(--r-3);
  font-size: 13.5px;
  color: var(--text-2);
}
.danger-copy strong { color: #fca5a5; font-weight: 500; }

/* ──────────────────────────────────────────────────────────── */
/* DRAWER (mobile)                                               */
/* ──────────────────────────────────────────────────────────── */

.bs-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  visibility: hidden;
}
.bs-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}
.bs-drawer__back {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}
.bs-drawer.is-open .bs-drawer__back { opacity: 1; }

.bs-drawer__panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: min(320px, 88vw);
  background: var(--bg);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  transition: transform 320ms var(--ease);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bs-drawer.is-open .bs-drawer__panel { transform: translateX(0); }

.bs-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-hair);
}
.bs-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: var(--r-2);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.bs-drawer__close:hover { background: var(--surface-2); }
.bs-drawer__close svg { width: 16px; height: 16px; }

.bs-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}

/* ──────────────────────────────────────────────────────────── */
/* FEATURES STRIP (footer of panel)                              */
/* ──────────────────────────────────────────────────────────── */

.features-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line-hair);
  border-bottom: 1px solid var(--line-hair);
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5);
  border-right: 1px solid var(--line-hair);
}
.feature-card:last-child { border-right: 0; }
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-2);
  background: var(--surface-2);
  color: var(--text-2);
  flex-shrink: 0;
}
.feature-icon svg { width: 15px; height: 15px; stroke-width: 1.6; }
.feature-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-body strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.feature-body p {
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.45;
  margin: 0;
}

/* ──────────────────────────────────────────────────────────── */
/* RESPONSIVE                                                    */
/* ──────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .bs-page { padding: var(--s-8) var(--s-7) var(--s-9); }

  .bs-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bs-stats__cell:nth-child(3n) { border-right: 0; }
  .bs-stats__cell:nth-child(3) { border-right: 0; }
  .bs-stats__cell:nth-child(-n+3) { border-bottom: 1px solid var(--line-hair); }

  .affiliate-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affiliate-summary__cell:nth-child(2) { border-right: 0; }
  .affiliate-summary__cell:nth-child(-n+2) { border-bottom: 1px solid var(--line-hair); }

  .whitelist-grid { grid-template-columns: 1fr; gap: var(--s-6); }

  .features-strip { grid-template-columns: 1fr; }
  .feature-card { border-right: 0; border-bottom: 1px solid var(--line-hair); }
  .feature-card:last-child { border-bottom: 0; }
}

@media (max-width: 880px) {
  .bs-app {
    grid-template-columns: 1fr;
  }
  .bs-sidebar { display: none; }
  .bs-topbar { display: flex; }

  .bs-page { padding: var(--s-6) 22px var(--s-9); }

  .bs-page-head {
    grid-template-columns: 1fr;
    gap: var(--s-5);
  }
  .bs-page-head__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .bs-page { padding: var(--s-5) 18px var(--s-8); }

  .bs-page-head__title { font-size: 36px; }

  .bs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bs-stats__cell { border-right: 1px solid var(--line-hair); border-bottom: 1px solid var(--line-hair); }
  .bs-stats__cell:nth-child(2n) { border-right: 0; }
  .bs-stats__cell:nth-last-child(-n+2) { border-bottom: 0; }

  .license-card {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
  .license-card__actions {
    flex-direction: row;
    min-width: 0;
  }
  .license-card__actions .btn { flex: 1; }

  .affiliate-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .affiliate-share { grid-template-columns: 1fr; }
  .affiliate-link-row { grid-template-columns: 1fr; }

  .link-form { grid-template-columns: 1fr; }
  .link-form button { width: 100%; }

  .whitelist-card {
    flex-direction: column;
    align-items: stretch;
  }
  .whitelist-card__actions { justify-content: flex-end; }
}

@media (max-width: 420px) {
  .affiliate-summary { grid-template-columns: 1fr; }
  .affiliate-summary__cell { border-right: 0; border-bottom: 1px solid var(--line-hair); }
  .affiliate-summary__cell:last-child { border-bottom: 0; }
}

/* ──────────────────────────────────────────────────────────── */
/* LEGACY SHIM · keep old IDs working                            */
/* ──────────────────────────────────────────────────────────── */

/* The old JS adds .status-dot inline span — restyle softly */
#account-status .status-dot,
.bs-account .status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acid);
  margin: 0 6px 1px 0;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(214, 255, 77, 0.45);
  animation: bsLivePulse 2.4s ease-in-out infinite;
}

/* ── Filter tabs (clasificación: 24h / 7d / 30d) ───────────────────────── */
.bs-filter-tabs {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  margin: 0 0 18px;
  border: 1px solid var(--line-hair);
  border-radius: var(--r-pill);
  background: var(--surface);
}
.bs-filter-tab {
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.bs-filter-tab:hover { color: var(--text); }
.bs-filter-tab.is-active {
  background: var(--acid);
  color: #060607;
  font-weight: 600;
}
/* Highlight active period column in table */
.bs-table th.is-active-period {
  color: var(--acid);
}
.bs-table td.is-active-period {
  color: var(--text);
  font-weight: 600;
}
