:root {
  --bg: #0a0515;
  --card: #140a24;
  --card-elevated: #1a1030;
  --border: #2d1b4e;
  --text: #f4f0ff;
  --muted: #9b8ab8;
  --accent: #22d3ee;
  --accent-magenta: #e879f9;
  --accent-lime: #a3e635;
  --accent-orange: #fb923c;
  --accent-violet: #8b5cf6;
  --danger: #f05252;
  --ok: #4ade80;
  --glow-cyan: 0 0 24px rgba(34, 211, 238, 0.35);
  --glow-magenta: 0 0 24px rgba(232, 121, 249, 0.35);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.admin-app {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 232px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #12081f 0%, #0a0515 100%);
  border-right: 1px solid var(--border);
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-radius: 0 20px 20px 0;
}

.admin-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0 0.5rem 0.75rem;
}

.sidebar-logo {
  color: var(--accent);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  width: 100%;
  text-align: center;
}

.sidebar-brand-logo {
  display: block;
  max-width: 100%;
  max-height: 42px;
  object-fit: contain;
  margin: 0 auto 0.35rem;
}

.admin-sidebar-brand--logo .sidebar-logo[hidden] {
  display: none;
}

.brand-login-preview {
  position: relative;
  margin: 0 0 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-height: 200px;
  background: #0a0a12;
}

.brand-login-preview-bg {
  position: absolute;
  inset: 0;
}

.brand-login-preview-bg:not(.has-custom-bg) {
  background: linear-gradient(180deg, rgba(4, 6, 13, 0.88) 0%, rgba(4, 6, 13, 0.78) 100%),
    radial-gradient(ellipse 90% 60% at 50% 20%, rgba(124, 58, 237, 0.25), transparent 55%),
    url("/images/villavonetx-hero.png") center 28% / cover no-repeat;
}

.brand-login-preview-bg.has-custom-bg {
  background-image: linear-gradient(
      180deg,
      rgba(4, 6, 13, 0.82) 0%,
      rgba(4, 6, 13, 0.72) 40%,
      rgba(4, 6, 13, 0.88) 100%
    ),
    var(--brand-bg-image);
  background-size: cover;
  background-position: center 28%;
  background-repeat: no-repeat;
}

.brand-login-preview-card {
  position: relative;
  z-index: 1;
  margin: 2.5rem auto;
  width: min(92%, 280px);
  padding: 1.25rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.92), rgba(4, 6, 13, 0.96));
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.1);
}

.brand-login-preview-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.brand-login-preview-brand strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.03em;
}

.brand-login-preview-brand span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.brand-preview-login-logo {
  display: block;
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.5rem;
  padding: 0.3rem;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid rgba(56, 189, 248, 0.65);
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.95), rgba(124, 58, 237, 0.88));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.brand-login-preview-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-login-preview-fields span {
  display: block;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.client-profiles-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.client-profiles-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.client-profiles-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.client-profile-row {
  display: grid;
  grid-template-columns: 2rem 1fr minmax(90px, 120px) auto minmax(140px, 1fr);
  gap: 0.5rem 0.75rem;
  align-items: end;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.client-profile-row.profile-row--sold {
  border-color: rgba(127, 255, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(127, 255, 0, 0.12);
}

.client-profile-row.profile-row--available {
  border-color: rgba(56, 217, 255, 0.3);
  box-shadow: inset 0 0 0 1px rgba(56, 217, 255, 0.1);
}

.client-profile-num {
  font-weight: 700;
  color: var(--accent-cyan, #67e8f9);
  align-self: center;
  text-align: center;
}

.client-profile-row .field {
  margin: 0;
}

.client-profile-row .field--pin input {
  font-variant-numeric: tabular-nums;
}

.client-profile-status {
  align-self: end;
  margin: 0;
}

.profile-sale-toggles {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding-bottom: 0.15rem;
}

.profile-sale-btn {
  position: relative;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, opacity 0.15s ease, box-shadow 0.15s ease;
}

.profile-sale-btn:hover {
  transform: scale(1.12);
}

.profile-sale-btn--sold {
  background: #7fff00;
}

.profile-sale-btn--available {
  background: #38d9ff;
}

.profile-sale-btn:not(.is-active) {
  opacity: 0.42;
}

.profile-sale-btn--sold.is-active {
  opacity: 1;
  border-color: rgba(127, 255, 0, 0.95);
  box-shadow: 0 0 0 2px rgba(127, 255, 0, 0.35), 0 0 16px rgba(127, 255, 0, 0.55);
}

.profile-sale-btn--available.is-active {
  opacity: 1;
  border-color: rgba(56, 217, 255, 0.95);
  box-shadow: 0 0 0 2px rgba(56, 217, 255, 0.35), 0 0 16px rgba(56, 217, 255, 0.55);
}

.profile-sale-btn::before,
.profile-sale-btn::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  opacity: 0;
  animation: none;
}

.profile-sale-btn--sold.is-active::before,
.profile-sale-btn--sold.is-active::after {
  border: 2px solid rgba(127, 255, 0, 0.55);
}

.profile-sale-btn--available.is-active::before,
.profile-sale-btn--available.is-active::after {
  border: 2px solid rgba(56, 217, 255, 0.55);
}

.profile-sale-btn.is-active::before,
.profile-sale-btn.is-active::after {
  opacity: 1;
  animation: profile-sale-wave 1.6s ease-out infinite;
}

.profile-sale-btn.is-active::after {
  animation-delay: 0.8s;
}

@keyframes profile-sale-wave {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.65;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}

.client-profile-avatar-preview {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 0.35rem;
  border: 1px solid var(--border);
}

.account-state {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.account-state--active {
  color: #a5f3fc;
  background: rgba(56, 217, 255, 0.15);
  border: 1px solid rgba(56, 217, 255, 0.35);
}

.account-state--expired {
  color: #fdba74;
  background: rgba(251, 146, 60, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.35);
}

.admin-table tr.account-row--expired {
  opacity: 0.88;
}

.admin-table tr.account-row--expired td:first-of-type strong {
  color: var(--muted);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.admin-modal[hidden] {
  display: none !important;
}

body.admin-modal-open {
  overflow: hidden;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.admin-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--card-elevated), var(--card));
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55);
}

.admin-modal-dialog--wide {
  max-width: min(720px, 96vw);
}

.admin-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}

.admin-modal-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

.admin-modal-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.admin-modal-scroll {
  overflow: auto;
  padding: 1rem 1.15rem;
  flex: 1;
}

.admin-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border);
}

.client-edit-account-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 0.75rem;
}

.client-edit-meta {
  margin: 0 0 0.75rem;
}

.client-profiles-block--modal {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.admin-modal .field input,
.admin-modal .field input[type='file'] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
}

@media (max-width: 720px) {
  .client-profile-row {
    grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: stretch;
  }

  .client-profile-num {
    grid-row: 1 / span 3;
    align-self: start;
    padding-top: 0.35rem;
  }

  .client-profile-row > .field:not(.client-profile-status):not(.field--pin):not(.field--avatar) {
    grid-column: 2 / 3;
    grid-row: 1;
  }

  .client-profile-row .field--pin {
    grid-column: 3 / 4;
    grid-row: 1;
  }

  .client-profile-status {
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .profile-sale-toggles {
    flex-direction: row;
    justify-content: center;
  }

  .client-profile-row .field--avatar {
    grid-column: 2 / 4;
    grid-row: 3;
  }

  .client-edit-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-modal .client-profile-row {
    grid-template-columns: 2.25rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
  }
}

.sidebar-user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin: 0 0.35rem 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(20, 10, 36, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  text-align: center;
}

.sidebar-user-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin: 0;
  width: 100%;
  min-width: 0;
}

.sidebar-user-trophy {
  font-size: 1.05rem;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-credits {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.topbar-credits.is-empty {
  border-color: rgba(248, 113, 113, 0.45);
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.topbar-credits-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.demo-seller-limit-banner {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  background: rgba(251, 146, 60, 0.1);
  color: #fed7aa;
}

body.panel-role-seller .seller-hide-hint {
  display: none !important;
}

#demo-minutes-label {
  display: none !important;
}

body.panel-role-admin #demo-minutes-label {
  display: block !important;
}

.sidebar-credits-line,
.sidebar-credits-pill {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.3;
}

.sidebar-credits-line.is-empty,
.sidebar-credits-pill.is-empty {
  color: #fca5a5;
}

.sidebar-role-pill {
  display: none !important;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.35rem 0.25rem;
  border-radius: 2px;
}

.credit-alert {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 82, 82, 0.45);
  background: rgba(240, 82, 82, 0.1);
  color: #fecaca;
  font-size: 0.88rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.admin-sidebar-nav button {
  background: rgba(20, 10, 36, 0.5);
  border: 1px solid transparent;
  color: var(--muted);
  text-align: left;
  padding: 0.55rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-sidebar-nav button.is-active {
  color: var(--accent-magenta);
  background: rgba(232, 121, 249, 0.14);
  border-color: rgba(232, 121, 249, 0.35);
  box-shadow: inset 3px 0 0 var(--accent-magenta), 0 0 16px rgba(232, 121, 249, 0.12);
}

.admin-sidebar-nav button:hover {
  color: var(--text);
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.3);
}

.admin-sidebar-nav button:disabled,
.admin-sidebar-nav button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.admin-sidebar-nav button.nav-rclone.is-active {
  background: rgba(61, 126, 255, 0.15);
  color: var(--accent);
}

.nav-group-label {
  margin: 0.65rem 0.5rem 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(155, 138, 184, 0.75);
}

.admin-sidebar-nav button.nav-sub {
  padding-left: 1.1rem;
  font-size: 0.86rem;
}

.admin-sidebar-nav button.nav-sub::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border);
  margin-right: 0.45rem;
  vertical-align: middle;
  opacity: 0.8;
}

.admin-sidebar-nav button.nav-sub.is-active::before {
  background: var(--accent-magenta);
  box-shadow: 0 0 8px var(--accent-magenta);
}

.admin-sidebar-nav button.nav-sub.is-active {
  color: var(--text);
}

.admin-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 5, 21, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.admin-topbar-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.accounts-forms {
  align-items: stretch;
}

/* Páginas de alta de cuentas */
.account-page h1 {
  margin: 0;
  font-size: 1.45rem;
}

.account-hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(26, 16, 48, 0.95), rgba(10, 5, 21, 0.6));
}

.account-hero--client {
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: var(--glow-cyan);
}

.account-hero--demo {
  border-color: rgba(251, 146, 60, 0.35);
  box-shadow: 0 0 24px rgba(251, 146, 60, 0.2);
}

.account-hero--seller {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.25);
}

.account-hero-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.account-hero-lead {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.account-form-card {
  width: 100%;
  max-width: none;
  padding: 1.35rem 1.5rem;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--card-elevated), var(--card));
  box-sizing: border-box;
}

.account-form .form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .account-form .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .account-form .field--short {
    max-width: none;
  }
}
@media (min-width: 1100px) {
  .account-form .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.account-form .field {
  display: block;
  margin: 0;
}

.account-form .field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.account-form .field input {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.account-form .field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

.account-form .field--short {
  max-width: 10rem;
}

.account-form-note {
  margin: 0.75rem 0 0;
}

.seller-validity-block {
  margin-top: 1.15rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid rgba(34, 211, 238, 0.4);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.1), rgba(88, 28, 135, 0.12));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.08);
}

.seller-validity-block-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.seller-validity-block-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.seller-validity-block-head strong {
  display: block;
  font-size: 0.95rem;
  color: #67e8f9;
  margin-bottom: 0.25rem;
}

.seller-validity-block-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.seller-validity-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.seller-validity-preset {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 92, 246, 0.45);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.seller-validity-preset:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.12);
}

.seller-validity-preset.is-active {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.22);
  color: #a5f3fc;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.2);
}

.seller-validity-field {
  max-width: 12rem;
}

.seller-validity-preview {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e9d5ff;
}

.account-form .form-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.btn-lg {
  padding: 0.65rem 1.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.card--table-dropdown {
  overflow: visible;
}

.card--table-dropdown .admin-table--active-viewers {
  overflow: visible;
}

.admin-table--active-viewers td:last-child {
  overflow: visible;
  position: relative;
  vertical-align: middle;
}

.admin-table--active-viewers tr.viewer-actions-row-open {
  position: relative;
  z-index: 30;
}

.admin-table--active-viewers tr.viewer-actions-row-open td {
  overflow: visible;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.accounts-list-section {
  width: 100%;
}

.accounts-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.accounts-search-wrap {
  flex: 1 1 280px;
  min-width: 200px;
}

.accounts-search {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 0.92rem;
}

.accounts-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.accounts-toolbar-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.accounts-bulk {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
}

.demo-expires-time {
  font-weight: 600;
  color: var(--accent-cyan, #67e8f9);
  font-variant-numeric: tabular-nums;
}

.admin-table--accounts .col-actions {
  min-width: 220px;
}

.accounts-table-wrap {
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
}

.admin-table--accounts {
  width: 100%;
  min-width: 1100px;
  font-size: 0.86rem;
}

.admin-table--accounts th,
.admin-table--accounts td {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
}

.admin-table--accounts thead th {
  background: rgba(20, 10, 36, 0.9);
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.admin-table--accounts tbody tr:hover td {
  background: rgba(139, 92, 246, 0.06);
}

.col-vigencia {
  font-weight: 600;
  white-space: nowrap;
}

.vigencia-ok { color: var(--ok); }
.vigencia-warn { color: var(--accent-orange); }
.vigencia-today { color: var(--accent-orange); }
.vigencia-expired { color: #fca5a5; }
.vigencia-perm { color: var(--muted); font-weight: 500; }

.badge-account {
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(163, 230, 53, 0.15);
  color: var(--accent-lime);
}

.badge-demo {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 180, 50, 0.2);
  color: #ffb432;
}

.badge-seller {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(61, 126, 255, 0.2);
  color: var(--accent);
}

/* bloque movil viejo eliminado */

.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #0d1320;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-brand { display: flex; align-items: center; gap: 0.5rem; }
.admin-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(61, 126, 255, 0.2);
  color: var(--accent);
}
.admin-badge--muted {
  background: rgba(139, 155, 184, 0.15);
  color: var(--muted);
}

.admin-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; flex: 1; }
.admin-nav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.admin-nav button.is-active,
.admin-nav button:hover {
  color: var(--text);
  border-color: var(--border);
  background: var(--card);
}
.admin-nav button.nav-rclone {
  border-color: rgba(61, 126, 255, 0.45);
  color: var(--accent);
}
.admin-nav button.nav-rclone.is-active {
  background: rgba(61, 126, 255, 0.15);
}

.admin-top-actions { display: flex; gap: 0.5rem; margin-left: auto; }

.admin-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 1.5rem 1.5rem 3rem;
  box-sizing: border-box;
}

.admin-section {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.admin-section h1 { margin: 0 0 0.5rem; font-size: 1.5rem; }

.account-page,
.accounts-list-section,
.dash-pro {
  width: 100%;
  max-width: none;
}

.card,
.card--table,
.accounts-table-wrap {
  width: 100%;
  box-sizing: border-box;
}
.admin-lead { color: var(--muted); margin: 0 0 1.5rem; }
.hint { color: var(--muted); font-size: 0.9rem; }
.hint code { color: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.card--highlight {
  border-color: rgba(61, 126, 255, 0.35);
  background: linear-gradient(180deg, rgba(61, 126, 255, 0.08), var(--card));
}
.steps-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.steps-list li { margin-bottom: 0.35rem; }
.rclone-examples code { font-size: 0.8rem; }
.card h2, .card h3 { margin-top: 0; font-size: 1rem; }

.admin-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
  width: 100%;
}
.admin-grow { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .admin-columns {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }
  .admin-columns .admin-grow {
    grid-column: 2;
    min-width: 0;
  }
}

/* Series: 3 columnas en pantallas anchas */
@media (min-width: 1200px) {
  #sec-series .admin-columns {
    grid-template-columns: minmax(200px, 240px) minmax(0, 1fr) minmax(0, 1fr);
  }
  #sec-series .admin-columns .card:first-child {
    grid-column: 1;
    grid-row: 1 / -1;
  }
  #sec-series .admin-columns .admin-grow:nth-of-type(2) {
    grid-column: 2;
  }
  #sec-series .admin-columns .admin-grow:nth-of-type(3) {
    grid-column: 3;
  }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.stat-card strong { display: block; font-size: 2rem; color: var(--accent); }

.admin-form label { display: block; margin-bottom: 0.75rem; font-size: 0.85rem; color: var(--muted); }
.admin-form input,
.admin-form textarea,
.admin-form select,
.inline-form input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0e17;
  color: var(--text);
}
.admin-form textarea { font-family: ui-monospace, monospace; font-size: 0.8rem; }
.form-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.form-row label { flex: 1; min-width: 120px; }
.inline-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.inline-form input { flex: 1; margin: 0; }
.check-label { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--muted); }
.check-label--inline {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-size: 0.85rem;
}

.check-label--highlight {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(61, 126, 255, 0.35);
  background: rgba(61, 126, 255, 0.08);
  margin-bottom: 0.5rem;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0.75rem 0;
}
.bulk-toolbar .btn-sm { font-size: 0.8rem; padding: 0.35rem 0.65rem; }

.admin-table .col-check { width: 2.25rem; text-align: center; }
.admin-table .col-check input { cursor: pointer; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); font-size: 0.8rem; padding: 0.25rem 0.5rem; }
.file-btn { cursor: pointer; }

.admin-list { list-style: none; padding: 0; margin: 0; }
.admin-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.admin-list button {
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  flex: 1;
  padding: 0.25rem;
}
.admin-list li.is-active button { color: var(--accent); font-weight: 600; }

.link-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  text-align: left;
}
.admin-table tr.is-active-row .link-btn { font-weight: 600; text-decoration: underline; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.admin-table td.url { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  max-width: 320px;
  z-index: 100;
}
.toast.ok { border-color: var(--ok); }
.toast.err { border-color: var(--danger); }

/* --- Dashboard estilo panel neón ---------------------------------------- */
.dash-pro .admin-lead.dash-lead {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.dash-gauges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.dash-gauge-card {
  background: linear-gradient(145deg, var(--card-elevated), var(--card));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 0.75rem 1rem;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-gauge-card:hover {
  transform: translateY(-2px);
}

.dash-gauge-card.accent-cyan { box-shadow: var(--glow-cyan); border-color: rgba(34, 211, 238, 0.35); }
.dash-gauge-card.accent-magenta { box-shadow: var(--glow-magenta); border-color: rgba(232, 121, 249, 0.35); }
.dash-gauge-card.accent-lime { box-shadow: 0 0 24px rgba(163, 230, 53, 0.25); border-color: rgba(163, 230, 53, 0.35); }
.dash-gauge-card.accent-orange { box-shadow: 0 0 24px rgba(251, 146, 60, 0.3); border-color: rgba(251, 146, 60, 0.4); }
.dash-gauge-card.accent-violet { box-shadow: 0 0 24px rgba(139, 92, 246, 0.3); border-color: rgba(139, 92, 246, 0.4); }
.dash-gauge-card.accent-pink { box-shadow: 0 0 24px rgba(244, 114, 182, 0.3); border-color: rgba(244, 114, 182, 0.4); }

.dash-gauge {
  --pct: 70;
  --ring: var(--accent);
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 0.65rem;
}

.dash-gauge-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.dash-gauge-ring circle {
  fill: none;
  stroke-width: 3.2;
}

.dash-gauge-ring .track {
  stroke: rgba(255, 255, 255, 0.08);
}

.dash-gauge-ring .fill {
  stroke: var(--ring);
  stroke-linecap: round;
  stroke-dasharray: 100 100;
  stroke-dashoffset: calc(100 - var(--pct));
  filter: drop-shadow(0 0 6px var(--ring));
  transition: stroke-dashoffset 0.6s ease;
}

.dash-gauge-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
}

.dash-gauge-label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.dash-gauge-sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Control de ventas (inicio) */
.dash-pro .dash-lead {
  margin-bottom: 0.85rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.dash-sales {
  position: relative;
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.35rem 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background:
    radial-gradient(ellipse 80% 55% at 100% 0%, rgba(34, 211, 238, 0.1), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(232, 121, 249, 0.08), transparent 50%),
    linear-gradient(165deg, rgba(22, 12, 42, 0.97) 0%, rgba(8, 5, 18, 0.99) 100%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 60px rgba(34, 211, 238, 0.06);
  overflow: hidden;
}

.dash-sales::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #8b5cf6 45%, #e879f9 100%);
  opacity: 0.85;
}

.dash-sales-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.dash-sales-kicker {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #22d3ee;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.25);
}

.dash-sales-title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff 0%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-sales-sub {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 38rem;
}

.dash-sales-date-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  color: #e9d5ff;
  white-space: nowrap;
  background: rgba(88, 28, 135, 0.25);
  border: 1px solid rgba(167, 139, 250, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.dash-sales-block-label {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(155, 138, 184, 0.95);
}

.dash-sales-block-label--credits {
  margin-top: 1.15rem;
  color: rgba(232, 121, 249, 0.9);
}

.dash-sales-accounts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.25rem;
}

.dash-sales-acc-card {
  position: relative;
  padding: 0.85rem 0.55rem 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.28);
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dash-sales-acc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.dash-sales-acc-icon {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.9;
}

.dash-sales-acc-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.dash-sales-acc-card > span:last-child {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--muted);
}

.dash-sales-acc-card--sellers {
  border-color: rgba(139, 92, 246, 0.35);
  background: linear-gradient(160deg, rgba(88, 28, 135, 0.22), rgba(0, 0, 0, 0.2));
}
.dash-sales-acc-card--sellers strong { color: #c4b5fd; }

.dash-sales-acc-card--clients-active {
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(160deg, rgba(34, 211, 238, 0.12), rgba(0, 0, 0, 0.2));
}
.dash-sales-acc-card--clients-active strong { color: #22d3ee; }

.dash-sales-acc-card--clients-expired {
  border-color: rgba(251, 146, 60, 0.3);
  background: linear-gradient(160deg, rgba(251, 146, 60, 0.1), rgba(0, 0, 0, 0.2));
}
.dash-sales-acc-card--clients-expired strong { color: #fb923c; }

.dash-sales-acc-card--demos-active {
  border-color: rgba(232, 121, 249, 0.35);
  background: linear-gradient(160deg, rgba(232, 121, 249, 0.12), rgba(0, 0, 0, 0.2));
}
.dash-sales-acc-card--demos-active strong { color: #e879f9; }

.dash-sales-acc-card--demos-expired {
  border-color: rgba(148, 163, 184, 0.25);
  background: linear-gradient(160deg, rgba(71, 85, 105, 0.2), rgba(0, 0, 0, 0.2));
}
.dash-sales-acc-card--demos-expired strong { color: #94a3b8; }

.dash-sales-periods {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1.15rem;
}

.dash-sales-period-card {
  position: relative;
  padding: 1rem 0.65rem 0.85rem;
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  background: linear-gradient(165deg, rgba(46, 16, 78, 0.45), rgba(10, 6, 20, 0.85));
  text-align: center;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-sales-period-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(232, 121, 249, 0.6), transparent);
  opacity: 0.6;
}

.dash-sales-period-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(88, 28, 135, 0.25);
}

.dash-sales-period-card--today {
  border-color: rgba(34, 211, 238, 0.45);
  background: linear-gradient(165deg, rgba(34, 211, 238, 0.14), rgba(88, 28, 135, 0.35));
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.15);
}

.dash-sales-period-card--today .dash-sales-period-credits {
  color: #67e8f9;
  text-shadow: 0 0 20px rgba(34, 211, 238, 0.45);
}

.dash-sales-period-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.dash-sales-period-credits {
  display: block;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #e879f9;
}

.dash-sales-period-sub {
  display: block;
  font-size: 0.68rem;
  color: rgba(155, 138, 184, 0.9);
  margin-top: 0.35rem;
}

.dash-sales-recent {
  padding: 1rem 1rem 0.35rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.dash-sales-recent-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dash-sales-recent-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.dash-sales-recent-hint {
  font-size: 0.75rem;
  color: var(--muted);
}

.dash-sales-recent .dash-table-wrap {
  margin: 0 -0.25rem;
  border-radius: 10px;
  overflow: hidden;
}

#dash-sales-recent-table thead {
  background: linear-gradient(180deg, rgba(45, 27, 78, 0.9), rgba(20, 10, 36, 0.95));
}

#dash-sales-recent-table thead th {
  padding: 0.65rem 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  border-bottom: 1px solid rgba(139, 92, 246, 0.35);
}

#dash-sales-recent-table tbody td {
  padding: 0.7rem 0.75rem;
  font-size: 0.84rem;
  border-bottom: 1px solid rgba(45, 27, 78, 0.45);
}

#dash-sales-recent-table tbody tr:hover td {
  background: rgba(139, 92, 246, 0.08);
}

.dash-sales-td-date {
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.dash-sales-tipo {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
}

.dash-sales-tipo--alta {
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.dash-sales-tipo--renovacion {
  color: #f0abfc;
  background: rgba(232, 121, 249, 0.12);
  border: 1px solid rgba(232, 121, 249, 0.28);
}

.dash-sales-cred-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.82rem;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

@media (max-width: 1100px) {
  .dash-sales-accounts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dash-sales {
    padding: 1rem;
    border-radius: 16px;
  }
  .dash-sales-accounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-sales-periods {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dash-sales-head {
    flex-direction: column;
  }
  .dash-sales-date-pill {
    align-self: flex-start;
  }
}

.dash-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  width: 100%;
}

@media (max-width: 960px) {
  .dash-panels { grid-template-columns: 1fr; }
}

.dash-panel {
  background: linear-gradient(160deg, var(--card-elevated) 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  min-height: 200px;
}

.dash-panel--alert {
  border-color: rgba(251, 146, 60, 0.45);
  box-shadow: 0 0 32px rgba(251, 146, 60, 0.08);
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dash-panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
}

.dash-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent-magenta);
  border: 1px solid rgba(232, 121, 249, 0.3);
}

.dash-pill--warn {
  background: rgba(251, 146, 60, 0.15);
  color: var(--accent-orange);
  border-color: rgba(251, 146, 60, 0.4);
}

.dash-table-wrap {
  max-height: 280px;
  overflow: auto;
}

.dash-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom-color: rgba(139, 92, 246, 0.25);
}

.dash-table tr.row-warn td {
  background: rgba(251, 146, 60, 0.06);
}

.dash-table .days-urgent {
  color: var(--accent-orange);
  font-weight: 700;
}

.card {
  background: var(--card);
}

hr { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }

.active-viewers-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1rem;
}

.admin-table--active-viewers .content-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.viewer-actions {
  position: relative;
  display: inline-block;
}

.viewer-actions-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 7.5rem;
  padding: 0.42rem 0.65rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  background: linear-gradient(165deg, rgba(46, 16, 78, 0.55), rgba(10, 6, 20, 0.9));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.viewer-actions-trigger:hover,
.viewer-actions.is-open .viewer-actions-trigger {
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.12);
}

.viewer-actions-chevron {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.15s ease;
}

.viewer-actions.is-open .viewer-actions-chevron {
  transform: rotate(-135deg) translateY(1px);
}

.viewer-actions-menu {
  position: absolute;
  top: calc(100% + 6px);
  bottom: auto;
  right: 0;
  z-index: 100;
  min-width: 100%;
  width: max-content;
  max-width: min(16rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border-radius: 10px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(165deg, rgba(22, 12, 42, 0.98), rgba(8, 5, 18, 0.98));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 24px rgba(139, 92, 246, 0.12);
}

.viewer-actions-menu.is-drop-up {
  top: auto;
  bottom: calc(100% + 6px);
}

.viewer-actions-menu[hidden] {
  display: none !important;
}

.viewer-actions-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.viewer-actions-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.viewer-actions-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1;
  flex-shrink: 0;
}

.viewer-actions-item--pause .viewer-actions-icon {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

.viewer-actions-item--pause:hover {
  background: rgba(251, 191, 36, 0.12);
  color: #fde68a;
}

.viewer-actions-item--stop .viewer-actions-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.viewer-actions-item--stop:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.viewer-actions-item--message .viewer-actions-icon {
  background: rgba(34, 211, 238, 0.12);
  color: #67e8f9;
}

.viewer-actions-item--message:hover {
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
}

.badge-status {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
}

.badge-status--play {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.badge-status--pause {
  background: rgba(251, 191, 36, 0.2);
  color: #fcd34d;
}

.badge-status--idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--muted);
}

.sellers-lineage-card {
  margin-top: 1.25rem;
}

.sellers-bulk {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.sellers-lineage-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.admin-table--sellers code.seller-pwd {
  font-size: 0.85rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--accent-cyan, #22d3ee);
}

/* ===== MÓVIL HAMBURGUESA ===== */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #1a0a2e;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 998;
}
.sidebar-overlay.is-open { display: block; }

@media (max-width: 768px) {
  .hamburger-btn { display: flex; }
  .admin-sidebar {
    position: fixed !important;
    left: -260px !important;
    top: 0;
    height: 100vh;
    z-index: 999;
    transition: left 0.28s cubic-bezier(.4,0,.2,1);
    width: 232px;
    overflow-y: auto;
  }
  .admin-sidebar.is-open { left: 0 !important; }
  .admin-shell { width: 100% !important; }
  .admin-topbar {
    padding-left: 0.5rem;
    gap: 0.5rem;
  }
  .admin-app {
    display: block !important;
  }
}

/* ===== MÓVIL: tablas scrollables ===== */
/* Vendedor con vigencia vencida — panel congelado */
body.seller-panel-frozen .admin-shell,
body.seller-panel-frozen .admin-sidebar,
body.seller-panel-frozen .admin-topbar {
  visibility: hidden;
  pointer-events: none;
}

.seller-frozen-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(4, 2, 12, 0.92);
  backdrop-filter: blur(8px);
}

.seller-frozen-overlay[hidden] {
  display: none !important;
}

.seller-frozen-card {
  max-width: 420px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: 18px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: linear-gradient(160deg, rgba(20, 12, 40, 0.98), rgba(8, 5, 18, 0.99));
  text-align: center;
  box-shadow: 0 0 48px rgba(34, 211, 238, 0.12);
}

.seller-frozen-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.seller-frozen-card h2 {
  margin: 0 0 0.65rem;
}

.seller-frozen-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-actions--seller {
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Carátulas sin póster */
.posters-missing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
}

.posters-missing-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.posters-tab-count {
  display: inline-block;
  min-width: 1.25rem;
  margin-left: 0.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.75rem;
  font-weight: 700;
}

.posters-missing-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ok);
}

.posters-missing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.posters-missing-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(192, 38, 211, 0.35);
  background: rgba(20, 10, 35, 0.85);
  box-shadow: 0 0 20px rgba(109, 40, 217, 0.12);
}

.posters-missing-preview {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.posters-missing-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.posters-missing-ph {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.posters-missing-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.posters-missing-title {
  font-size: 0.9rem;
  line-height: 1.25;
  color: #f4f0ff;
}

.posters-missing-cat {
  font-size: 0.75rem;
  color: var(--muted);
}

.posters-missing-url,
.posters-missing-file {
  width: 100%;
  font-size: 0.8rem;
}

.posters-missing-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .posters-missing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 768px) {
  .accounts-table-wrap,
  .dash-table-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding-bottom: 0.35rem;
  }
  .admin-table--accounts,
  .dash-table {
    min-width: 640px;
  }
  .dash-sales-recent .dash-table {
    min-width: 520px;
  }
  .dash-gauges {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
  }
  .admin-main {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}

.player-home-loading,
.player-home-empty {
  margin: 0.5rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  background: rgba(0, 0, 0, 0.25);
}

.player-home-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.35rem 0 0.75rem;
}

.player-featured-live-card--empty {
  opacity: 0.85;
}

.player-top10-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  min-height: 2.5rem;
}

.player-top10-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.player-featured-live-slots {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.player-featured-live-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem 1.25rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(15, 18, 32, 0.95), rgba(8, 10, 18, 0.98));
  border: 1px solid rgba(124, 58, 237, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  overflow: visible;
}

.player-featured-live-card-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.15rem;
}

.player-featured-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.45rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-magenta));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.player-featured-live-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.player-featured-live-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.player-featured-live-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}

.player-featured-live-preview[hidden] {
  display: none !important;
}

.player-featured-live-preview-ph {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.player-featured-live-preview-wrap:has(.player-featured-live-preview:not([hidden])) .player-featured-live-preview-ph {
  display: none;
}

.player-featured-live-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.player-featured-live-field-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.player-featured-live-logo-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.player-featured-live-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px dashed rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.player-featured-live-upload:hover {
  border-color: rgba(56, 189, 248, 0.75);
  background: rgba(56, 189, 248, 0.14);
}

.player-featured-live-upload-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-cyan, #38bdf8);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}

.player-featured-live-upload-icon::before {
  content: 'IMG';
}

.player-featured-live-upload-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.82rem;
  color: var(--text);
}

.player-featured-live-upload-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

.player-featured-live-file {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
}

.player-featured-live-url-row {
  display: block;
}

.player-featured-live-url-row .player-featured-live-icon {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.85rem;
}

.player-featured-live-channel-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.channel-search-picker {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.channel-search-picker-selected-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.channel-search-picker-selected-row[hidden] {
  display: none !important;
}

.channel-search-picker-selected {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.32);
  line-height: 1.35;
  word-break: break-word;
}

.channel-search-picker-clear {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
}

.channel-search-picker-clear:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.28);
  border-color: rgba(239, 68, 68, 0.55);
}

.channel-search-picker-search-row {
  display: flex;
  min-width: 0;
}

.channel-search-picker-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 0.85rem;
}

.channel-search-picker-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.15);
}

.channel-search-picker-list {
  position: relative;
  width: 100%;
  max-height: 11rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.3rem;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(8, 12, 22, 0.98);
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.45) transparent;
}

.channel-search-picker-list[hidden] {
  display: none !important;
}

.channel-search-picker-list::-webkit-scrollbar {
  width: 8px;
}

.channel-search-picker-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.4);
}

.channel-search-picker-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.35;
  cursor: pointer;
  font-family: inherit;
}

.channel-search-picker-option:hover,
.channel-search-picker-option:focus-visible {
  background: rgba(56, 189, 248, 0.14);
  outline: none;
}

.channel-search-picker-empty {
  margin: 0.4rem 0.55rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 560px) {
  .player-featured-live-card {
    grid-template-columns: 1fr;
  }

  .player-featured-live-preview-wrap {
    width: 72px;
    height: 72px;
    justify-self: start;
  }

  .channel-search-picker-selected-row {
    flex-direction: column;
  }

  .channel-search-picker-clear {
    width: 100%;
  }
}

.player-top10-num {
  font-weight: 700;
  min-width: 1.5rem;
  color: var(--accent-magenta);
}

.player-home-select {
  flex: 1;
  min-width: 0;
  display: block;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0e17;
  color: var(--text);
  font-size: 0.88rem;
}

.player-trends-picks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.35rem 0.75rem;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.player-trend-pick {
  font-size: 0.88rem;
}

.settings-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.hero-trailers-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-trailer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.hero-trailer-item-main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.hero-trailer-today-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(229, 9, 20, 0.25);
  color: #ff6b6b;
}

.hero-trailer-yt-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(255, 0, 0, 0.2);
  color: #ff8a8a;
}

.hero-trailer-or {
  margin: 0.25rem 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}
