:root {
  --bg: #09090d;
  --side: #101013;
  --side-strong: #08090d;
  --panel: rgba(20, 20, 22, 0.9);
  --panel-soft: rgba(30, 28, 35, 0.78);
  --header: rgba(55, 38, 74, 0.86);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(157, 91, 255, 0.45);
  --text: #f7f5fb;
  --muted: #bab4c8;
  --purple: #9b5cff;
  --blue: #3e6bff;
  --cyan: #17c8ff;
  --orange: #ffab16;
  --green: #24d17e;
  --red: #ff405d;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --surface-1: rgba(20, 20, 22, 0.9);
  --surface-2: rgba(16, 16, 19, 0.97);
  --surface-3: rgba(12, 12, 14, 0.88);
  --surface-header: rgba(82, 59, 92, 0.95);
  --surface-row: rgba(38, 38, 39, 0.78);
  --sidebar-gradient: linear-gradient(180deg, #141416, #090a0d);
  --workspace-overlay: linear-gradient(rgba(12, 12, 14, 0.58), rgba(12, 12, 14, 0.78));
}

:root[data-theme="light"] {
  --bg: #f2f1f7;
  --side: #ffffff;
  --side-strong: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(255, 255, 255, 0.85);
  --header: rgba(155, 92, 255, 0.16);
  --line: rgba(20, 20, 30, 0.12);
  --line-strong: rgba(157, 91, 255, 0.45);
  --text: #1c1b24;
  --muted: #656175;
  --shadow: 0 18px 50px rgba(30, 20, 50, 0.12);
  --surface-1: rgba(255, 255, 255, 0.95);
  --surface-2: rgba(255, 255, 255, 0.98);
  --surface-3: rgba(255, 255, 255, 0.9);
  --surface-header: rgba(139, 92, 246, 0.92);
  --surface-row: rgba(255, 255, 255, 0.9);
  --sidebar-gradient: linear-gradient(180deg, #ffffff, #f4f2fa);
  --workspace-overlay: linear-gradient(rgba(255, 255, 255, 0.72), rgba(245, 244, 250, 0.86));
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    var(--workspace-overlay),
    url("./network-bg.png") center / cover no-repeat;
}

.login-card {
  width: min(430px, 100%);
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 34px;
  border: 1px solid rgba(155, 92, 255, 0.38);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: var(--shadow);
}

.login-card h1,
.login-card p {
  margin: 0;
  text-align: center;
}

.login-title {
  margin-top: 48px !important;
}

.login-card p {
  color: var(--muted);
}

.login-form {
  width: 100%;
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--muted);
}

.password-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  min-height: 100vh;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar-gradient);
}

.sidebar-logo {
  padding: 20px 18px 16px;
  display: grid;
  place-items: center;
}

.sidebar-logo img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  background: transparent;
}

.sidebar-credits {
  min-height: 88px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.sidebar-credits span {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.sidebar-credits strong {
  color: var(--green);
  font-size: 1.55rem;
  line-height: 1;
}

.nav-list {
  display: grid;
  gap: 8px;
  padding: 26px 8px;
}

.nav-item {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 16px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 800;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(164, 93, 255, 0.62);
  background: linear-gradient(135deg, rgba(156, 83, 255, 0.62), rgba(54, 74, 171, 0.58));
  color: #fff;
}

.nav-item-danger {
  color: var(--red);
}

.nav-item-danger:hover {
  border-color: rgba(255, 64, 93, 0.62);
  background: rgba(255, 64, 93, 0.16);
  color: var(--red);
}

.workspace {
  min-width: 0;
  min-height: 100vh;
  background:
    var(--workspace-overlay),
    url("./network-bg.png") center / cover fixed no-repeat;
}

.topbar {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}

.menu-button,
.icon-button {
  width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  font-weight: 900;
  font-size: 1rem;
}

.topbar-spacer {
  flex: 1;
}

.account-badge {
  display: grid;
  gap: 1px;
}

.account-badge strong {
  font-size: 0.9rem;
}

.account-badge span {
  color: var(--muted);
  font-size: 0.78rem;
}

.balance-pill {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.balance-pill strong {
  min-width: 54px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: #0ac39f;
}

.panel-section,
.stats-grid {
  width: min(1080px, calc(100vw - 244px));
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(118px, 1fr));
  gap: 30px;
  padding-top: 18px;
}

.stats-grid article {
  min-height: 96px;
  display: grid;
  place-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-1);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.stats-grid article.stat-card-warn {
  border-color: rgba(255, 171, 22, 0.55);
  background: rgba(255, 171, 22, 0.1);
  box-shadow: 0 0 0 1px rgba(255, 171, 22, 0.35), 0 14px 42px rgba(0, 0, 0, 0.12);
}

.stats-grid article.stat-card-danger {
  border-color: rgba(255, 64, 93, 0.65);
  background: rgba(255, 64, 93, 0.12);
  box-shadow: 0 0 0 2px rgba(255, 64, 93, 0.5), 0 14px 42px rgba(0, 0, 0, 0.12);
  animation: stat-card-pulse 1.6s ease-in-out infinite;
}

@keyframes stat-card-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(255, 64, 93, 0.5), 0 14px 42px rgba(0, 0, 0, 0.12); }
  50% { box-shadow: 0 0 0 4px rgba(255, 64, 93, 0.25), 0 14px 42px rgba(0, 0, 0, 0.12); }
}

.stats-grid strong {
  color: var(--cyan);
  font-size: 1.35rem;
}

.stats-grid article:nth-child(2) strong {
  color: #00d0aa;
}

.stats-grid article:nth-child(4) strong {
  color: var(--orange);
}

.stats-grid article:nth-child(5) strong {
  color: var(--red);
}

.stats-grid span {
  color: var(--muted);
  font-size: 0.82rem;
}

.panel-section {
  padding: 34px 0 42px;
}

.section-banner,
.hero-panel,
.create-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(108, 82, 255, 0.38);
  border-radius: 8px 8px 0 0;
  padding: 18px 20px;
  background: linear-gradient(100deg, rgba(82, 47, 102, 0.92), rgba(27, 35, 82, 0.92));
}

.hero-panel {
  border-radius: 8px;
}

.section-banner h1,
.hero-panel h1,
.create-heading h1 {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(1.8rem, 4vw, 2.35rem);
}

.section-banner p,
.hero-panel p {
  margin: 5px 0 0;
  color: var(--muted);
}

.eyebrow,
label span {
  margin: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.credit-strip {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: var(--surface-row);
  color: var(--text);
}

.scope-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.scope-tab {
  min-height: 38px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-weight: 800;
  font-size: 0.85rem;
}

.scope-tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
}

.live-header-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auto-refresh-toggle {
  min-height: 31px;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.auto-refresh-toggle.on {
  background: linear-gradient(135deg, #26d982, #12a968);
  box-shadow: 0 0 16px rgba(38, 217, 130, 0.28);
}

.auto-refresh-toggle.off {
  background: linear-gradient(135deg, #6b7280, #3f4652);
}

.live-tools-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.72rem;
  font-weight: 900;
}

.scope-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.28);
}

.credit-strip strong {
  color: var(--text);
}

.filters-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 320px);
  gap: 30px;
  margin: 32px 0 24px;
}

label {
  display: grid;
  gap: 9px;
}

.checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  width: auto;
}

.checkbox-field span {
  text-transform: none;
  font-size: 0.82rem;
  letter-spacing: normal;
}

.form-note code {
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  font-family: monospace;
}

.brand-logo-preview {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--line);
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
  outline: none;
  padding: 10px 13px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

select option {
  color: #121216;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(155, 92, 255, 0.9);
  box-shadow: 0 0 0 3px rgba(155, 92, 255, 0.18);
}

.primary-button,
.warning-button,
.success-button,
.danger-button,
.secondary-button,
.ghost-button {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 9px 15px;
  color: #fff;
  font-weight: 900;
}

.primary-button {
  background: linear-gradient(135deg, var(--purple), var(--blue));
}

.warning-button {
  color: #3b2500;
  background: linear-gradient(135deg, #ffc32c, #ff9700);
  box-shadow: inset 0 0 0 3px rgba(123, 65, 255, 0.55);
}

.success-button {
  background: linear-gradient(135deg, #26d982, #12a968);
}

.danger-button {
  background: linear-gradient(135deg, #ff405d, #e22f4d);
}

.secondary-button,
.ghost-button {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
}

.table-panel,
.create-card,
.tool-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-1);
  box-shadow: var(--shadow);
}

.client-table {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.scroll-load-wrap {
  max-height: 480px;
  overflow-y: auto;
}

.info-note {
  margin-bottom: 14px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(23, 200, 255, 0.08);
  color: var(--text);
}

.info-note p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

.info-note p + p {
  margin-top: 8px;
}

.info-note strong {
  color: var(--text);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

.seller-table,
.live-table,
.credit-history-table,
.upcoming-table {
  min-width: 0;
}

.licenses-table {
  min-width: 940px;
}

th {
  padding: 14px 13px;
  background: var(--surface-header);
  color: #f1e9fb;
  text-align: left;
  font-size: 0.9rem;
}

td {
  padding: 14px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-row);
  color: var(--text);
  vertical-align: middle;
}

td strong {
  display: block;
}

td small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.code-pill {
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-weight: 900;
  padding: 0;
}

.live-content {
  display: grid;
  gap: 4px;
  min-width: 190px;
}

.live-content strong {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-content-type {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(23, 200, 255, 0.16);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-content-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.whatsapp-link {
  border: 0;
  background: transparent;
  color: #00dc97;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0;
  text-decoration: none;
}

.whatsapp-link:hover {
  text-decoration: underline;
}

.status,
.time-pill {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 900;
}

.status.active,
.status.ok,
.time-pill.ok {
  color: #dfffee;
  background: rgba(36, 209, 126, 0.72);
}

.status.used {
  color: #fff;
  background: rgba(100, 96, 112, 0.85);
}

.status.paused,
.status.warn,
.time-pill.warn {
  color: #ffe9ba;
  background: rgba(255, 171, 22, 0.3);
}

.status.expired,
.time-pill.danger {
  color: #ffd8de;
  background: rgba(255, 64, 93, 0.44);
}

.status.deleted {
  color: #cbd2dc;
  background: rgba(140, 150, 165, 0.35);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.square-action {
  width: 36px;
  min-height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 36px;
}

.mini-button {
  min-height: 30px;
  border: 0;
  border-radius: 7px;
  padding: 5px 10px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.mini-button.ok {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  color: var(--text);
}

.mini-button.warn {
  color: #3b2500;
  background: linear-gradient(135deg, #ffc32c, #ff9700);
}

.mini-button.danger {
  background: linear-gradient(135deg, #ff405d, #e22f4d);
}

.square-action:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.square-action .action-icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.square-action.success {
  background: linear-gradient(135deg, #24d17e, #12a866);
}

.square-action.reminder {
  background: linear-gradient(135deg, #3aa0ff, #1c6fd8);
}

.reminder-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  background: linear-gradient(135deg, #3aa0ff, #1c6fd8);
}

.reminder-button .action-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
}

.app-scope-field {
  display: grid;
  gap: 8px;
  margin: 5px 0;
}

.app-scope-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-scope-actions {
  display: flex;
  gap: 12px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.app-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.app-chip {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.app-chip.active {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-color: transparent;
  color: #fff;
}

.square-action.neutral {
  background: linear-gradient(135deg, #575757, #363636);
}

.square-action.danger {
  background: linear-gradient(135deg, #ff405d, #d82343);
}

.square-action.warning-square {
  color: #271700;
  background: linear-gradient(135deg, #ffc32c, #ff9700);
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--orange);
  color: #251600;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.create-card {
  width: min(720px, 100%);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: 0 20px 20px;
}

.create-heading {
  margin: 0 -20px 4px;
  justify-content: center;
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.device-limits-field {
  display: grid;
  gap: 9px;
}

.device-limits-row {
  display: flex;
  gap: 10px;
}

.device-limit-item {
  flex: 1;
  display: grid;
  gap: 6px;
}

.device-limit-item span {
  font-size: 0.7rem;
}

.device-limits-field small {
  color: var(--muted);
  font-size: 0.72rem;
}

.block-choice-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.block-choice {
  display: grid;
  gap: 4px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-3);
  color: var(--text);
}

.block-choice:hover {
  border-color: rgba(155, 92, 255, 0.7);
}

.block-choice strong {
  font-size: 0.92rem;
}

.block-choice small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.live-content-summary {
  margin-bottom: 14px;
}

.live-content-summary .eyebrow {
  margin: 0 0 8px;
}

.credits-note,
.form-error,
.form-note {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
}

.form-error {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.tool-panel,
.table-panel:not(.client-table) {
  padding: 18px;
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.upcoming-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upcoming-search {
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
}

.stacked-actions {
  align-items: center;
}

.toast {
  position: fixed;
  z-index: 9500; /* por encima de las ventanas (modal-overlay = 80): si no, el mensaje de error queda escondido atras */
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.install-banner {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--text);
  box-shadow: var(--shadow);
}

.install-banner.hidden {
  display: none;
}

.install-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.install-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.install-banner-text strong {
  font-size: 0.92rem;
}

.install-banner-text span {
  color: var(--muted);
  font-size: 0.78rem;
}

.install-banner .primary-button {
  flex-shrink: 0;
  padding: 8px 14px;
  min-height: 34px;
}

.install-banner .modal-close {
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .install-banner {
    flex-wrap: wrap;
  }

  .install-banner-text {
    order: 1;
    width: calc(100% - 52px);
  }

  .install-banner .primary-button {
    order: 3;
    width: 100%;
  }
}

.login-rules-banner {
  display: block;
  width: 100%;
  max-width: 460px;
  margin: 16px auto 0;
  border-radius: 12px;
}

.rules-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
  padding: 20px 24px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0f1c 0%, #0d1526 55%, #170a10 100%);
  border: 1px solid rgba(255, 59, 59, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 59, 59, 0.08), 0 12px 30px rgba(0, 0, 0, 0.35);
}

.rules-strip-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: #ff3b3b;
  background: radial-gradient(circle, rgba(255, 59, 59, 0.18) 0%, rgba(255, 59, 59, 0) 70%);
  filter: drop-shadow(0 0 8px rgba(255, 59, 59, 0.6));
}

.rules-strip-body {
  flex: 1 1 auto;
  min-width: 0;
}

.rules-strip-title {
  margin: 0 0 8px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.rules-strip-title-hot {
  display: block;
  font-size: 1.3rem;
  background: linear-gradient(90deg, #ff5a5a, #ff8a8a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rules-strip-title-sub {
  display: block;
  font-size: 1.3rem;
  color: #e8ecf1;
}

.rules-strip-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 900px;
}

.rules-strip-text .hot {
  color: #ffd23f;
}

.rules-strip-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.rules-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 320px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 59, 59, 0.08);
  border: 1px solid rgba(255, 59, 59, 0.35);
  font-size: 0.86rem;
  color: #e8ecf1;
  line-height: 1.4;
}

.rules-alert strong {
  color: #ff6b6b;
}

.rules-alert-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff3b3b;
  color: #1a0505;
  font-weight: 900;
  font-size: 0.8rem;
}

.rules-strip-brand {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  color: #cfe0ff;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

@media (max-width: 860px) {
  .rules-strip {
    flex-wrap: wrap;
  }

  .rules-strip-brand {
    display: none;
  }
}

.rules-card {
  width: min(720px, 100%);
  background: transparent;
  border: none;
  box-shadow: none;
  position: relative;
}

.rules-card .modal-body {
  padding: 0;
  gap: 0;
}

.rules-banner-img {
  display: block;
  width: 100%;
  border-radius: 16px;
}

.rules-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0d1520;
  border: 1px solid var(--line);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.62);
}

.modal-card {
  width: min(500px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.wide-modal {
  width: min(560px, 100%);
}

.modal-header {
  min-height: 62px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-3);
}

.modal-header h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.25;
}

.modal-close {
  width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 1.25rem;
  font-weight: 900;
}

.modal-body {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-body small {
  color: var(--muted);
}

.lineage-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lineage-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.lineage-node-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-1);
}

.lineage-node-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

.lineage-tag {
  color: var(--cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.68rem;
}

.lineage-arrow {
  color: var(--muted);
  font-size: 1.1rem;
  padding: 2px 0;
}

.modal-row {
  display: flex;
  gap: 12px;
}

.modal-row > label {
  flex: 1;
  min-width: 0;
}

.modal-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.split-actions {
  justify-content: space-between;
}

.info-box {
  padding: 13px 16px;
  border-radius: 10px;
  background: #3398dc;
  color: #fff;
  line-height: 1.45;
}

.modal-credit {
  margin: 0;
  border-radius: 10px;
}

.share-card {
  text-align: center;
}

.share-body {
  justify-items: center;
}

.share-code {
  display: block;
  color: var(--orange);
  font-size: 2.65rem;
  letter-spacing: 3px;
  line-height: 1;
}

.share-body p {
  margin: 0;
  font-weight: 800;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.share-actions a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

@media (max-width: 980px) {
  .dashboard-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 220px;
    transform: translateX(-104%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }

  .dashboard-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .panel-section,
  .stats-grid {
    width: min(100% - 28px, 1080px);
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .content-grid,
  .filters-row,
  .live-tools-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-wrap: wrap;
  }

  .topbar-spacer {
    display: none;
  }

  .balance-pill {
    margin-left: auto;
  }

  .section-banner,
  .hero-panel,
  .create-heading {
    display: grid;
  }

  .banner-actions,
  .banner-actions button {
    width: 100%;
  }

  .split,
  .stats-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Modo mantenimiento (pantalla que se tapa sobre el panel + aviso para el admin) */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(1000px 600px at 15% 10%, rgba(155, 92, 255, 0.22), transparent 60%),
    radial-gradient(900px 600px at 90% 90%, rgba(62, 107, 255, 0.2), transparent 60%), #09090d;
  color: #f7f5fb;
}

.maintenance-card {
  width: min(520px, 100%);
  text-align: center;
  padding: 30px 28px 26px;
  background: rgba(20, 20, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
}

.maintenance-logo {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 6px;
  object-fit: contain;
}

.maintenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 171, 22, 0.12);
  border: 1px solid rgba(255, 171, 22, 0.4);
  color: #ffab16;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.maintenance-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffab16;
  animation: maintenance-pulse 1.6s ease-in-out infinite;
}

.maintenance-card h1 {
  margin: 18px 0 10px;
  font-size: 26px;
  line-height: 1.25;
}

.maintenance-message {
  margin: 0 auto;
  max-width: 400px;
  color: #bab4c8;
  font-size: 16px;
  line-height: 1.55;
  white-space: pre-line;
}

.maintenance-bar {
  width: 180px;
  height: 4px;
  margin: 26px auto 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.maintenance-bar::after {
  content: "";
  display: block;
  width: 40%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #9b5cff, #17c8ff);
  animation: maintenance-slide 1.6s ease-in-out infinite;
}

@keyframes maintenance-pulse {
  50% { opacity: 0.35; }
}

@keyframes maintenance-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .maintenance-dot,
  .maintenance-bar::after { animation: none; }
}

body.maintenance-on::after {
  content: "MANTENIMIENTO ACTIVO";
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 9000;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 24px rgba(255, 64, 93, 0.35);
  pointer-events: none;
}

/* Busqueda de cuentas (2026-09-20): texto resaltado, cuenta buscada y grupos */
mark.search-hit {
  background: rgba(255, 171, 22, 0.3);
  color: inherit;
  border-radius: 5px;
  padding: 1px 4px;
  box-shadow: 0 0 0 1px rgba(255, 171, 22, 0.6);
  font-weight: 800;
}

:root[data-theme="light"] mark.search-hit {
  background: rgba(255, 171, 22, 0.34);
  box-shadow: 0 0 0 1px rgba(200, 125, 0, 0.6);
}

tr.group-row td {
  padding: 9px 13px;
  background: var(--header);
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

tr.group-row .group-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

tr.group-row .group-count {
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(155, 92, 255, 0.3);
  letter-spacing: 0;
}

tr.user-match td {
  background: linear-gradient(0deg, rgba(155, 92, 255, 0.22), rgba(155, 92, 255, 0.22)), var(--surface-row);
  border-bottom: 1px solid var(--line-strong);
}

tr.user-match td:first-child {
  box-shadow: inset 4px 0 0 var(--purple);
}

tr.user-dependent td:first-child,
tr.user-similar td:first-child {
  box-shadow: inset 3px 0 0 rgba(155, 92, 255, 0.35);
}

.match-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Cuenta recien guardada: destello verde y etiqueta */
@keyframes userUpdatedFlash {
  from { box-shadow: inset 0 0 0 100vmax rgba(36, 209, 126, 0.4); }
  to { box-shadow: inset 0 0 0 100vmax rgba(36, 209, 126, 0); }
}

tr.user-updated td {
  animation: userUpdatedFlash 2.8s ease-out 1;
}

.updated-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(36, 209, 126, 0.85);
  color: #04140b;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Barra "Servidor" (solo admin) en En Vivo y Canales */
.server-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface-1);
}

.server-strip.hidden {
  display: none !important;
}

.server-strip-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 4px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text);
}

.server-strip-title em {
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  font-size: 0.72rem;
}

.server-strip-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(36, 209, 126, 0.18);
}

.server-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-row);
}

.server-chip span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.server-chip strong {
  font-size: 0.95rem;
  color: var(--green);
}

.server-chip.chip-warn {
  border-color: rgba(255, 171, 22, 0.55);
}

.server-chip.chip-warn strong {
  color: var(--orange);
}

.server-chip.chip-danger {
  border-color: rgba(255, 64, 93, 0.6);
  background: rgba(255, 64, 93, 0.14);
}

.server-chip.chip-danger strong {
  color: var(--red);
}

.server-strip-more {
  margin-left: auto;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
}

.server-strip-more:hover {
  background: rgba(155, 92, 255, 0.18);
}

/* Mensaje de acceso de una cuenta reseller (con contrasena), para copiar */
.share-message {
  margin: 10px 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-row);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 45vh;
  overflow: auto;
  user-select: text;
}

/* Avisos del admin a resellers */
.ann-list { display: grid; gap: 14px; padding: 16px; }
.ann-card { border: 1px solid var(--line); border-radius: 14px; background: var(--surface-row); padding: 14px 16px; }
.ann-card.unread { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.ann-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.ann-card-head strong { display: block; font-size: 1.02rem; }
.ann-card-head small { color: var(--muted); }
.ann-card-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ann-meta { color: var(--muted); font-size: 0.85rem; }
.ann-text { line-height: 1.5; overflow-wrap: anywhere; }
.ann-text a { color: var(--cyan); }
.ann-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.ann-images img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; background: var(--surface-3); }
.ann-popup-card { max-width: 560px; }
.ann-popup-card .modal-body { max-height: 60vh; overflow-y: auto; display: grid; gap: 12px; }
.ann-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.ann-thumb { position: relative; width: 96px; height: 96px; }
.ann-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.ann-thumb button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; background: var(--red); color: #fff; line-height: 1; font-size: 14px; }
.ann-picker { display: grid; gap: 8px; }
.ann-picker-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 2px; }
.ann-pick { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.ann-pick:hover { background: var(--surface-row); }
.ann-pick input { width: auto; flex: none; }
.ann-pick small { color: var(--muted); margin-left: auto; }
.ann-pick span { text-transform: none; letter-spacing: 0; font-weight: 600; }
.ann-images img { aspect-ratio: 3 / 2; }
.app-chip.active::before { content: "\2713\00a0"; }
.app-chip:not(.active) { border-style: dashed; opacity: 0.8; }

/* Suspension de un reseller con aviso */
.login-suspended { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255, 64, 93, 0.55); background: rgba(255, 64, 93, 0.12); line-height: 1.45; }
.login-suspended strong { display: block; font-size: 1.05rem; color: var(--red); margin-bottom: 6px; }
.login-suspended p { margin: 6px 0; overflow-wrap: anywhere; }
.login-suspended small { color: var(--muted); }
.suspension-note { display: block; margin-top: 4px; max-width: 220px; color: var(--red); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suspend-phrases { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.suspend-phrase { border: 1px dashed var(--line-strong); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 12px; font-size: 0.82rem; cursor: pointer; }
.suspend-phrase:hover { background: var(--panel-soft); }
.login-suspended { text-align: left; }
.login-suspended a { color: var(--cyan); }
.login-suspended strong { display: inline; font-size: inherit; color: inherit; margin: 0; }
.login-suspended-text { overflow-wrap: anywhere; }
.login-suspended .ann-images { margin-top: 10px; }
.login-suspended small { display: block; margin-top: 10px; }
.login-suspended-foot { font-size: 0.86rem; color: var(--muted); }
#suspendUserModal .modal-card { max-width: 640px; }
#suspendUserModal .modal-body { max-height: 70vh; overflow-y: auto; display: grid; gap: 12px; }
.suspend-section { display: grid; gap: 8px; }
.suspend-label { font-weight: 700; }
.suspend-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.suspend-check input { width: auto; flex: none; }
.suspend-check span { text-transform: none; letter-spacing: 0; font-weight: 500; }

/* Error dentro de una ventana (ej. demo sin creditos suficientes) */
.modal-error {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.16);
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.modal-error.hidden {
  display: none;
}

/* Aviso "Procesando..." mientras una accion que cambia algo espera al servidor (ver busyStart en app.js) */
.busy-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 10, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.busy-overlay.show {
  opacity: 1;
  pointer-events: auto;
  cursor: progress;
}
.busy-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: min(86vw, 360px);
  padding: 24px 32px;
  border-radius: 16px;
  background: var(--surface-2, #101013);
  border: 1px solid var(--line-strong, rgba(157, 91, 255, 0.45));
  box-shadow: var(--shadow, 0 22px 70px rgba(0, 0, 0, 0.42));
  color: var(--text, #f7f5fb);
  text-align: center;
}
.busy-card strong {
  font-size: 18px;
}
.busy-sub {
  color: var(--muted, #bab4c8);
  font-size: 13px;
  line-height: 1.35;
}
.busy-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid var(--line, rgba(255, 255, 255, 0.1));
  border-top-color: var(--purple, #9b5cff);
  animation: busy-spin 0.8s linear infinite;
}
@keyframes busy-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .busy-spinner {
    animation-duration: 2.4s;
  }
}

/* Cartel en el centro de la pantalla (showNoticeModal en app.js) */
.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(6, 6, 10, 0.7);
  backdrop-filter: blur(2px);
}
.notice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(92vw, 420px);
  padding: 26px 28px 22px;
  border-radius: 16px;
  background: var(--surface-2, #101013);
  border: 1px solid var(--line-strong, rgba(157, 91, 255, 0.45));
  box-shadow: var(--shadow, 0 22px 70px rgba(0, 0, 0, 0.42));
  color: var(--text, #f7f5fb);
  text-align: center;
}
.notice-card strong {
  font-size: 19px;
}
.notice-card p {
  margin: 0;
  color: var(--text, #f7f5fb);
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.notice-card .primary-button {
  margin-top: 6px;
  min-width: 140px;
}
.notice-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 176, 32, 0.16);
  border: 2px solid #ffb020;
  color: #ffb020;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
