/* ── RESET ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale
}

img {
  max-width: 100%;
  height: auto;
  display: block
}

a {
  color: inherit;
  text-decoration: none
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none
}

input,
select,
textarea {
  font-family: inherit
}

ul {
  list-style: none
}

/* ── VARIABLES ── */
:root {
  --bg: #1e0550;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.03);
  --surface-3: rgba(255, 255, 255, 0.05);
  --glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --border-h: rgba(255, 255, 255, 0.18);
  --accent: #8A0BD2;
  --accent-deep: #4a0c85;
  --accent-soft: #b44bf0;
  --accent-bright: #9b2de0;
  --accent-glow: rgba(138, 11, 210, 0.4);
  --yellow-brand: #FFD60A;
  --yellow-soft: #FFE873;
  --gradient-purple: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 55%, var(--accent-soft) 100%);
  --orange: #f97316;
  --green: #22c55e;
  --green-soft: #4ade80;
  --red: #ef4444;
  --blue: #3b82f6;
  --yellow: #f59e0b;
  --pink: #ec4899;
  --text: #ffffff;
  --text-soft: #f3edff;
  --muted: #9b8ec4;
  --panel: rgba(255, 255, 255, 0.04);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --sidebar-w: 260px;
  --header-h: 70px;
  --bg-main:
    radial-gradient(circle, rgba(255, 255, 255, 0.10) 1px, transparent 1.5px),
    radial-gradient(circle at 30% 8%, rgba(255, 214, 10, 0.12) 0%, transparent 32%),
    radial-gradient(circle at 40% 25%, rgba(180, 75, 240, 0.55) 0%, transparent 45%),
    radial-gradient(circle at 92% 10%, rgba(138, 11, 210, 0.6) 0%, transparent 42%),
    radial-gradient(circle at 94% 90%, rgba(255, 214, 10, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 55% 95%, rgba(138, 11, 210, 0.55) 0%, transparent 48%),
    radial-gradient(circle at 65% 55%, rgba(196, 100, 255, 0.3) 0%, transparent 38%),
    linear-gradient(160deg, #3a0e86 0%, #26095f 24%, #170542 50%, #0d0221 100%);
  --bg-size: 26px 26px, auto, auto, auto, auto, auto, auto, auto;
}

/* ── BODY ── */
body {
  background: #1e0550;
  background-image: var(--bg-main);
  background-size: var(--bg-size);
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
}

/* ── ANIMATIONS ── */
@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .55
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0
  }

  100% {
    background-position: 200% 0
  }
}

@keyframes pulseIcon {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .6
  }
}

/* LAYOUT: SIDEBAR + MAIN */

.admin-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* SIDEBAR */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1), 1px 0 0 rgba(255, 255, 255, 0.05) inset;
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
  transition: transform .3s var(--ease);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(138, 11, 210, 0.25);
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.08), transparent);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain
}

.sidebar-brand {
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  display: none;
  margin-left: auto;
  color: var(--muted);
  padding: 6px;
  border-radius: 8px;
  transition: all .2s;
}

.sidebar-close:hover {
  color: var(--text);
  background: rgba(138, 11, 210, 0.15)
}

/* ── Sidebar Nav ── */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem .6rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 4px
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .6rem .85rem;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .25s var(--ease);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(138, 11, 210, 0.12);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.3), rgba(155, 45, 224, 0.18));
  border: 1px solid rgba(138, 11, 210, 0.35);
  box-shadow: 0 0 20px rgba(138, 11, 210, 0.2), 0 4px 12px rgba(138, 11, 210, 0.1);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  border-radius: 0 3px 3px 0;
  background: var(--accent-soft);
}

.nav-item svg,
.nav-item iconify-icon {
  flex-shrink: 0;
  opacity: .75
}

.nav-item:hover svg,
.nav-item.active svg,
.nav-item:hover iconify-icon,
.nav-item.active iconify-icon {
  opacity: 1
}

.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(138, 11, 210, 0.3);
}

/* ── Sidebar Footer ── */
.sidebar-footer {
  padding: .75rem .6rem;
  border-top: 1px solid rgba(138, 11, 210, 0.25);
  background: var(--panel);
}

/* SIDEBAR OVERLAY (mobile) */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(4px);
  z-index: 199;
}

.sidebar-overlay.active {
  display: block
}

/* MAIN CONTENT */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: calc(100% - var(--sidebar-w));
  max-width: calc(100vw - var(--sidebar-w));
}

/* HEADER */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
  min-height: var(--header-h);
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.header-title h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-breadcrumb {
  font-size: .78rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* ── Menu Toggle (hidden on desktop) ── */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  color: var(--text);
  transition: all .2s;
}

.menu-toggle:hover {
  background: rgba(138, 11, 210, 0.15)
}

/* ── Admin/User Info ── */
.admin-info {
  display: flex;
  align-items: center;
  gap: .6rem
}

.admin-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(138, 11, 210, 0.3);
}

.admin-details {
  display: flex;
  flex-direction: column
}

.admin-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text)
}

.admin-role {
  font-size: .72rem;
  color: var(--muted)
}

/* ── Logout Button ── */
.btn-logout {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.08);
  transition: all .25s var(--ease);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

/* ── Header Clock ── */
.header-clock {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  background: rgba(138, 11, 210, 0.08);
  border: 1px solid rgba(138, 11, 210, 0.2);
  padding: .35rem .85rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--accent-soft);
  transition: all .25s;
}

.header-clock:hover {
  border-color: rgba(138, 11, 210, 0.4);
  background: rgba(138, 11, 210, 0.12);
  box-shadow: 0 4px 16px var(--accent-glow);
  transform: translateY(-2px);
}

.header-clock svg {
  animation: pulseIcon 2s ease-in-out infinite
}

/* SECTIONS */

.section {
  display: none;
  padding: 1.25rem 1rem 1.25rem 1.25rem;
  animation: fadeUp .35s var(--ease) both;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

.section.active {
  display: block
}

/* PANELS */

.panel {
  background: linear-gradient(155deg, rgba(138, 11, 210, 0.22) 0%, rgba(180, 75, 240, 0.08) 45%, rgba(255, 255, 255, 0.03) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138, 11, 210, 0.3);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .3s var(--ease);
}

.panel:hover {
  border-color: rgba(138, 11, 210, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 24px rgba(138, 11, 210, 0.08);
}

.panel+.panel:not(.cp-editor-panel) {
  margin-top: 1.1rem
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid rgba(138, 11, 210, 0.15);
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.06), transparent);
  flex-wrap: wrap;
  gap: .75rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.panel-title svg,
.panel-title iconify-icon {
  color: var(--accent-soft);
  opacity: .8
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.panel-body {
  padding: 1.1rem
}

/* STATS GRID */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
  margin-bottom: 1.1rem;
}

.stats-grid>.stat-card {
  min-height: 0;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138, 11, 210, 0.18);
  border-radius: var(--radius);
  transition: all .3s var(--ease);
}

.stat-card:hover {
  border-color: rgba(138, 11, 210, 0.4);
  transform: translateY(-4px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.purple {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.2), rgba(138, 11, 210, 0.08));
  color: var(--accent-soft)
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.08));
  color: var(--green)
}

.stat-icon.blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.08));
  color: var(--blue)
}

.stat-icon.orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.08));
  color: var(--orange)
}

.stat-icon.pink {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(236, 72, 153, 0.08));
  color: var(--pink)
}

.stat-icon.yellow {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
  color: var(--yellow)
}

.stat-info {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--text), var(--accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: .78rem;
  color: var(--muted);
  white-space: nowrap
}

.stat-sublabel {
  font-size: .72rem;
  color: var(--muted);
  opacity: .7
}

/* REVENUE STATS (Patreon / payments) */

.revenue-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.revenue-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
  transition: all .3s;
}

.revenue-stat-card:hover {
  border-color: rgba(138, 11, 210, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 11, 210, 0.1);
}

.revenue-stat-card.highlight {
  border-color: rgba(138, 11, 210, 0.35);
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.15), rgba(138, 11, 210, 0.05));
}

.revenue-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.15), rgba(138, 11, 210, 0.05));
}

.revenue-icon.total {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.25), rgba(155, 45, 224, 0.1));
  color: var(--accent-soft);
}

.revenue-info {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.revenue-label {
  font-size: .75rem;
  color: var(--muted)
}

.revenue-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text)
}

.revenue-secondary {
  font-size: .72rem;
  color: var(--muted);
  opacity: .7
}

.revenue-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  padding: 0 1.25rem 1.25rem;
}

.revenue-subtitle {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .75rem 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.revenue-by-plan,
.revenue-chart-container {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

/* ── Plan stats bars ── */
.plan-stats {
  padding: .5rem 0
}

.tier-loading {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
  font-size: .85rem
}

.tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .45rem .75rem;
  margin: .35rem 0;
  background: rgba(138, 11, 210, 0.07);
  border-radius: 8px;
  gap: .5rem
}

.tier-name {
  flex: 1;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tier-count {
  font-size: .82rem;
  color: var(--muted);
  white-space: nowrap;
  margin: 0 .5rem
}

.tier-income {
  font-size: .85rem;
  font-weight: 700;
  color: #a78bfa;
  white-space: nowrap
}

/* ── Summary box ── */
.patreon-summary-box {
  background: rgba(138, 11, 210, 0.06);
  border: 1px solid rgba(138, 11, 210, 0.15);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
  border-bottom: none
}

.summary-row.total {
  border-top: 1px solid var(--border-h);
  padding-top: .75rem;
  margin-top: .25rem;
}

.summary-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--muted);
}

.summary-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text)
}

.summary-value.highlight {
  color: var(--accent-soft);
  font-size: 1rem
}

/* ── Recent payments ── */
.recent-payments {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
}

/* CHARTS GRID */

.charts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.charts-grid>.panel {
  margin-top: 0 !important;
}

.charts-grid>.panel:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.chart-container {
  min-height: 200px;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-loading {
  color: var(--muted);
  font-size: .85rem
}

/* TABLES */

.table-responsive {
  overflow-x: auto;
  padding: 0 0 .5rem;
}

.table,
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  table-layout: auto;
}

.table thead th,
.data-table thead th {
  padding: .75rem .65rem;
  text-align: left;
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--accent-soft);
  border-bottom: 2px solid rgba(138, 11, 210, 0.2);
  white-space: nowrap;
  background: var(--glass, rgba(255, 255, 255, 0.04));
  backdrop-filter: blur(12px);
}

.table thead th:last-child,
.data-table thead th:last-child {
  width: 1%;
}

.table tbody td,
.data-table tbody td {
  padding: .7rem .65rem;
  border-bottom: 1px solid rgba(138, 11, 210, 0.1);
  color: var(--text-soft);
  vertical-align: middle;
}

.table tbody td:last-child {
  white-space: nowrap;
  padding-right: .5rem;
  width: 1%;
}

/* Table-actions layout */
.table-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}

.table tbody tr:hover,
.data-table tbody tr:hover {
  background: rgba(138, 11, 210, 0.08);
}

.table-empty,
.text-center {
  text-align: center;
  padding: 2rem !important;
  color: var(--muted);
}

/* CARDS GRID (mobile alternative to tables) */

.cards-grid {
  display: none
}

/* BUTTONS */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .55rem 1.15rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  transition: all .25s var(--ease);
  white-space: nowrap;
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn-sm {
  padding: .4rem .85rem;
  font-size: .78rem
}

.btn-primary {
  background: #fff;
  color: var(--accent-deep);
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--yellow-soft);
  color: #1e0550;
  transform: translateY(-1px);
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--accent-soft);
  border: 1px solid var(--border-h);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(138, 11, 210, 0.12);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(138, 11, 210, 0.08);
  color: var(--text-soft);
  border: 1px solid rgba(138, 11, 210, 0.2);
}

.btn-secondary:hover {
  border-color: rgba(138, 11, 210, 0.35);
  background: rgba(138, 11, 210, 0.15);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.15);
}

.btn-success {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.btn-success:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.15);
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .3px;
  border: 1px solid transparent;
}

.badge-purple {
  background: rgba(138, 11, 210, 0.2);
  color: var(--accent-soft);
  border-color: rgba(138, 11, 210, 0.3)
}

.badge-green,
.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3)
}

.badge-orange,
.badge-warning {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange);
  border-color: rgba(249, 115, 22, 0.3)
}

.badge-red,
.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3)
}

.badge-blue,
.badge-basico {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3)
}

.badge-info {
  background: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3)
}

.badge-free {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3)
}

.badge-premium {
  background: rgba(138, 11, 210, 0.2);
  color: var(--accent-soft);
  border-color: rgba(138, 11, 210, 0.3)
}

.badge-elite {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3)
}

/* FORMS */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem
}

.form-group-full {
  grid-column: 1/-1
}

.form-label,
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: .4rem;
}

.form-input,
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: .7rem .95rem;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .85rem;
  transition: all .3s;
  outline: none;
}

.form-input:focus,
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 11, 210, 0.15);
  background: var(--panel);
}

.form-input::placeholder,
.form-control::placeholder,
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: .6
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239b8ec4' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

small {
  font-size: .75rem;
  color: var(--muted);
  display: block;
  margin-top: .25rem
}

/* SEARCH BOX */

.search-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: rgba(138, 11, 210, 0.06);
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: 999px;
  padding: .4rem .85rem;
  transition: all .25s;
  width: 220px;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(138, 11, 210, 0.15);
  background: var(--panel);
}

.search-box svg {
  color: var(--muted);
  flex-shrink: 0
}

.search-box input {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: .82rem;
  outline: none;
  width: 100%;
  min-width: 120px;
}

.search-box input::placeholder {
  color: var(--muted);
  opacity: .6
}

/* Search results dropdown */
.search-results {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  max-height: 200px;
  overflow-y: auto;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* UPLOAD ZONES */

.upload-container {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.upload-form-panel {
  flex: 1
}

.upload-preview-panel {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
}

.upload-zone {
  border: 2px dashed rgba(138, 11, 210, 0.3);
  border-radius: var(--radius-lg);
  background: rgba(138, 11, 210, 0.04);
  transition: all .3s;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(138, 11, 210, 0.08);
  box-shadow: 0 0 24px rgba(138, 11, 210, 0.1);
}

.upload-zone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 2rem;
  min-height: 160px;
  color: var(--muted);
  text-align: center;
}

.upload-zone-content svg {
  opacity: .5
}

.upload-zone-content span {
  font-size: .85rem;
  font-weight: 500
}

.upload-zone-content small {
  font-size: .75rem
}

.upload-zone-preview,
.upload-zone-file {
  display: none;
  padding: 1rem;
}

.upload-zone-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.upload-zone-file {
  display: none;
  align-items: center;
  gap: .75rem;
}

.file-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent-soft);
}

.file-info {
  display: flex;
  flex-direction: column;
  min-width: 0
}

.file-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.file-size {
  font-size: .72rem;
  color: var(--muted)
}

/* ── Preview Card ── */
.preview-card {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all .3s;
}

.preview-card:hover {
  border-color: rgba(138, 11, 210, 0.4);
  box-shadow: 0 12px 32px rgba(138, 11, 210, 0.15);
}

.preview-image {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .75rem;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.preview-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  object-fit: contain;
}

.preview-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .25rem .65rem;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.preview-badge.free {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green)
}

.preview-badge.premium {
  background: rgba(249, 115, 22, 0.2);
  color: var(--orange)
}

.preview-info {
  padding: 1rem
}

.preview-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .25rem
}

.preview-category {
  font-size: .78rem;
  color: var(--muted);
  margin: 0
}

.preview-meta {
  display: flex;
  justify-content: space-between;
  margin-top: .5rem;
  font-size: .78rem;
  color: var(--muted);
}

/* ── Progress bar ── */
.progress-container {
  margin-top: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 4px;
  transition: width .3s;
}

.progress-text {
  font-size: .75rem;
  font-weight: 600;
  color: var(--accent-soft);
  min-width: 35px;
  text-align: right
}

/* FORMAT CHECKBOXES */

.fmt-chk {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(138, 11, 210, 0.15);
  background: rgba(138, 11, 210, 0.06);
  color: var(--text-soft);
  font-size: .82rem;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.fmt-chk:hover {
  border-color: var(--border-h);
  background: var(--surface-2)
}

.fmt-chk input[type="checkbox"] {
  accent-color: var(--accent);
  width: 14px;
  height: 14px;
  margin: 0;
}

.formato-checks {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  min-height: 44px;
  padding: 5px 0;
}

/* MEMBERSHIP STATS */

.membership-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.membership-stat-card {
  text-align: center;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(138, 11, 210, 0.15);
  transition: all .3s;
}

.membership-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.membership-stat-card.basico {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.03));
  border-color: rgba(59, 130, 246, 0.25);
}

.membership-stat-card.premium {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.03));
  border-color: rgba(249, 115, 22, 0.25);
}

.membership-stat-card.elite {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.12), rgba(138, 11, 210, 0.03));
  border-color: rgba(138, 11, 210, 0.25);
}

.membership-plan {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px
}

.membership-count {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  margin: .25rem 0
}

.membership-label {
  font-size: .72rem;
  color: var(--muted)
}

/* EMPTY STATE */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  background: rgba(138, 11, 210, 0.03);
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(138, 11, 210, 0.15);
}

.empty-icon {
  margin: 0 auto 1rem;
  opacity: .4
}

.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: .5rem
}

.empty-state p {
  font-size: .85rem;
  color: var(--muted);
  max-width: 400px;
  margin: 0 auto 1.25rem
}

/* TOAST CONTAINER */

.toast-container {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  padding: .75rem 1.25rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  animation: fadeUp .3s var(--ease);
  max-width: 400px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.toast.success {
  background: rgba(34, 197, 94, 0.18);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3)
}

.toast.error {
  background: rgba(239, 68, 68, 0.18);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3)
}

/* MODAL */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-content {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.25);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(138, 11, 210, 0.15);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(138, 11, 210, 0.2);
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.06), transparent);
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.modal-close {
  color: var(--muted);
  padding: 6px;
  border-radius: 999px;
  transition: all .2s;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(138, 11, 210, 0.1)
}

.modal-content form {
  padding: 1.5rem
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* USER DASHBOARD — SPECIFIC STYLES */

/* ── New designs grid ── */
.new-designs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 220px));
  gap: 1rem;
}

/* ── Catalog-style cards in dashboard ── */
.design-card-mini {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), border-color .3s;
  text-decoration: none;
}

.design-card-mini:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.24);
}

.design-card-mini .card-image-link {
  display: block;
  text-decoration: none;
}

.design-card-mini .card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: rgba(255, 255, 255, 0.03);
}

.design-card-mini .card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.design-card-mini:hover .card-image img {
  transform: scale(1.05)
}

.design-card-mini .card-content {
  padding: .85rem .95rem .65rem;
  position: relative;
  z-index: 1;
  background: rgba(245, 243, 255, 0.04);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.design-card-mini .card-title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: rgba(212, 200, 240, 0.95);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.design-card-mini .card-title-link {
  color: inherit;
  text-decoration: none;
  transition: color .3s
}

.design-card-mini:hover .card-title-link {
  color: #fff
}

.design-card-mini .card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  padding: 0 .95rem .75rem;
  position: relative;
  z-index: 1;
  margin-top: auto;
}

.design-card-mini .card-category {
  color: var(--muted);
  font-size: .72rem;
  background: rgba(138, 11, 210, 0.08);
  padding: .2rem .55rem;
  border-radius: 6px;
  border: 1px solid rgba(138, 11, 210, 0.1);
}

.design-card-mini .badge {
  font-size: .65rem !important;
  padding: .2rem .55rem !important;
  font-weight: 700;
  border-radius: 6px;
  letter-spacing: .02em;
}

.badge-purple {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.35), rgba(180, 75, 240, 0.18));
  color: #c77dff;
  border: 1px solid rgba(138, 11, 210, 0.3);
}

.badge-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(74, 222, 128, 0.15));
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.design-card-skeleton {
  height: 200px;
  background: var(--surface);
  border-radius: var(--radius);
  animation: shimmer 1.5s infinite;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
}

/* ── Purchases ── */
.purchases-header-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap
}

.purchases-filter-group {
  display: flex;
  gap: .5rem
}

.purchases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.purchases-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.purchase-stat-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem;
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
}

.purchase-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.purchase-stat-icon.purple {
  background: rgba(138, 11, 210, 0.15);
  color: var(--accent-soft)
}

.purchase-stat-icon.green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green)
}

.purchase-stat-icon.orange {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange)
}

.purchase-stat-content {
  display: flex;
  flex-direction: column
}

.purchase-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text)
}

.purchase-stat-label {
  font-size: .72rem;
  color: var(--muted)
}

.noxbot-install-guide {
  margin-top: 1.25rem;
  padding: 1.1rem;
  border: 1px solid rgba(138, 11, 210, .2);
  border-radius: var(--radius-lg);
  background: rgba(138, 11, 210, .045);
}

.noxbot-install-guide-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.noxbot-install-guide-head > iconify-icon {
  color: var(--accent-soft);
  font-size: 1.35rem;
  margin-top: .15rem;
}

.noxbot-install-guide h3 {
  margin: 0;
  color: var(--text);
  font-size: .98rem;
}

.noxbot-install-guide p {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .78rem;
}

.noxbot-install-guide ol {
  margin: .85rem 0;
  padding-left: 1.2rem;
  color: var(--text);
  font-size: .82rem;
  line-height: 1.65;
}

.noxbot-admin-help {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--green);
  font-size: .8rem;
  font-weight: 600;
}

.noxbot-admin-help iconify-icon { font-size: 1rem; }

/* ── Historial de Transacciones ── */
.transactions-section {
  margin-top: 1.5rem;
}

.transactions-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .75rem;
}

.transactions-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
}

.transactions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
  white-space: nowrap;
}

.transactions-table th,
.transactions-table td {
  padding: .65rem .9rem;
  text-align: left;
}

.transactions-table thead th {
  background: var(--panel);
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid rgba(138, 11, 210, 0.12);
}

.transactions-table tbody tr {
  border-bottom: 1px solid rgba(138, 11, 210, 0.08);
}

.transactions-table tbody tr:last-child {
  border-bottom: none;
}

.transactions-table tbody td {
  color: var(--text);
}

.transactions-empty-msg {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  padding: 1rem;
}

.tx-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff6b00, #ff8f3d);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  appearance: none;
  white-space: nowrap;
}

.tx-download-btn:hover {
  background: linear-gradient(135deg, #ff8000, #ffa65d);
}

.tx-download-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* ── Patreon Section ── */
.patreon-notice {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: rgba(249, 104, 84, 0.08);
  border: 1px solid rgba(249, 104, 84, 0.2);
  border-radius: var(--radius-lg);
}

.patreon-notice-icon {
  flex-shrink: 0;
  color: #f96854;
  padding-top: 2px
}

.patreon-notice-content {
  font-size: .82rem;
  color: var(--text-soft)
}

.patreon-notice-content strong {
  color: var(--text)
}

.patreon-notice-content p {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: .78rem
}

.patreon-notice-content a {
  color: #f96854;
  text-decoration: underline
}

.patreon-section {
  margin-bottom: 1.25rem
}

.patreon-loading {
  text-align: center;
  padding: 2rem;
  color: var(--muted)
}

.patreon-card {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.15);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.patreon-card.connected {
  text-align: left
}

.patreon-content {
  margin-bottom: 1rem
}

.patreon-content h3 {
  margin: .5rem 0 .25rem;
  font-size: 1rem;
  color: var(--text)
}

.patreon-content p {
  font-size: .82rem;
  color: var(--muted)
}

.btn-patreon-connect {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: 999px;
  background: #f96854;
  color: #fff;
  font-weight: 600;
  font-size: .85rem;
  transition: all .3s;
  box-shadow: 0 4px 16px rgba(249, 104, 84, 0.25);
}

.btn-patreon-connect:hover {
  background: #e05842;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 104, 84, 0.35);
}

.patreon-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .75rem
}

.patreon-status-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .85rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green)
}

.status-text {
  color: var(--green)
}

.patreon-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .25rem
}

.patreon-info p {
  font-size: .82rem;
  color: var(--muted);
  margin: 0
}

.patreon-status-message {
  margin: .75rem 0;
  font-size: .82rem;
  color: var(--muted)
}

.patreon-tier {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .85rem;
  margin: .75rem 0;
  background: rgba(138, 11, 210, 0.08);
  border-radius: 999px;
}

.tier-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text)
}

.tier-amount {
  font-size: .85rem;
  color: var(--accent-soft);
  font-weight: 600
}

.patreon-plan {
  font-size: .82rem;
  color: var(--muted);
  margin: .5rem 0
}

.patreon-meta {
  font-size: .72rem;
  color: var(--muted);
  margin: .75rem 0
}

.btn-disconnect {
  display: inline-flex;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.06);
  transition: all .3s;
  margin-top: .5rem;
}

.btn-disconnect:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* ── Benefits Card ── */
.benefits-card {
  background: rgba(138, 11, 210, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(138, 11, 210, 0.25);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(138, 11, 210, 0.12), inset 0 0 20px rgba(138, 11, 210, 0.03);
}

.benefits-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.benefits-plan-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.2), rgba(138, 11, 210, 0.06));
  border: 1px solid rgba(138, 11, 210, 0.3);
  color: var(--accent-soft);
  font-weight: 600;
  font-size: .85rem;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.5rem
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-soft);
}

.benefit-item.inactive {
  opacity: .4
}

.btn-upgrade-plan {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-deep);
  font-weight: 600;
  font-size: .85rem;
  transition: all .3s;
  margin-top: 1.25rem;
}

.btn-upgrade-plan:hover {
  background: var(--yellow-soft);
  color: #1e0550;
  transform: translateY(-2px);
}

/* ── Requests limit info ── */
.requests-limit-info {
  margin-bottom: 1.25rem
}

.limit-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.1), rgba(138, 11, 210, 0.03));
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
}

.limit-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(138, 11, 210, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-soft);
  flex-shrink: 0;
}

.limit-content {
  display: flex;
  flex-direction: column
}

.limit-plan {
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent-soft)
}

.limit-text {
  font-size: .78rem;
  color: var(--muted)
}

/* ── Upload zone mini (request image) ── */
.upload-zone-mini {
  border: 2px dashed rgba(138, 11, 210, 0.25);
  border-radius: var(--radius-lg);
  background: rgba(138, 11, 210, 0.04);
  cursor: pointer;
  overflow: hidden;
  transition: all .3s;
}

.upload-zone-mini:hover {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(138, 11, 210, 0.1);
}

.upload-zone-mini .upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}

.upload-zone-mini .upload-preview {
  position: relative;
  padding: .5rem;
}

.upload-zone-mini .upload-preview img {
  max-height: 200px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  margin: 0 auto;
}

.remove-image {
  position: absolute;
  top: .75rem;
  right: .75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

.remove-image:hover {
  background: var(--red)
}

.image-name {
  display: block;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
  margin-top: .25rem;
}

/* ── Help section ── */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.help-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1.5rem;
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.15);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all .3s;
}

.help-card:hover {
  border-color: rgba(138, 11, 210, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(138, 11, 210, 0.15);
}

.help-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-icon.whatsapp {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366
}

.help-icon.email {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue)
}

.help-card h3 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin: 0
}

.help-card p {
  font-size: .75rem;
  color: var(--muted);
  margin: 0
}

/* ── FAQ ── */
.faq-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .75rem
}

.faq-item {
  background: rgba(18, 6, 40, 0.85);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius);
  margin-bottom: .5rem;
  overflow: hidden;
}

.faq-item summary {
  padding: .75rem 1rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background .2s;
}

.faq-item summary::-webkit-details-marker {
  display: none
}

.faq-item summary::before {
  content: '▸ ';
  color: var(--accent-soft)
}

.faq-item[open] summary::before {
  content: '▾ '
}

.faq-item summary:hover {
  background: rgba(138, 11, 210, 0.08)
}

.faq-item p {
  padding: 0 1rem 1rem;
  font-size: .82rem;
  color: var(--muted);
}

/* ── Gift form ── */
.gift-form {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.08), rgba(249, 115, 22, 0.06));
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.gift-form h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-soft);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.gift-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: end;
}

/* ── Stats mini (download summary) ── */
.stats-mini {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.1), rgba(138, 11, 210, 0.03));
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.stats-mini-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.stats-mini-grid>div {
  display: flex;
  flex-direction: column
}

.stats-mini-grid strong {
  font-weight: 700;
  color: var(--text)
}

.stats-mini-grid small {
  font-size: .72rem;
  color: var(--muted)
}

/* ── Spinner ── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}

/* ── Status badges inline ── */
.status-active,
.status-activo {
  color: var(--green)
}

.status-inactive,
.status-inactivo {
  color: var(--red)
}

.status-pending,
.status-pendiente {
  color: var(--yellow)
}

/* ── Text utilities ── */
.text-muted {
  color: var(--muted);
  font-size: .78rem
}

.text-primary {
  color: var(--accent-soft)
}

.mb-2 {
  margin-bottom: .75rem
}

.mt-section {
  margin-top: 1.5rem
}

.mb-section {
  margin-bottom: 1.5rem
}

/* ── Header title wrapper ── */
.header-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

/* ── Panel Tabs ── */
.panel-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.panel-tabs .btn {
  position: relative
}

.panel-tabs .btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tab-content {
  display: none
}

.tab-content.active {
  display: block
}

/* ── Revenue grid variants ── */
.revenue-stats-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr)
}

/* ── Descarga resumen ── */
.descarga-resumen-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center
}

.descarga-resumen-grid>div {
  display: flex;
  flex-direction: column
}

.descarga-resumen-grid small {
  display: block;
  color: var(--muted);
  font-size: .72rem
}

.descarga-resumen-grid strong {
  font-weight: 700;
  color: var(--text)
}

/* ── Payment preview ── */
.payment-preview {
  padding: 1.25rem
}

.payment-preview h3 {
  margin: 0 0 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text)
}

.payment-preview-row {
  margin-bottom: 1rem
}

.payment-preview-row small {
  color: var(--muted);
  font-size: .78rem
}

.payment-preview-row p {
  margin: 0;
  font-weight: 500;
  color: var(--text)
}

.payment-preview-row .amount {
  font-size: 1.2rem
}

/* ── Form select sm ── */
.form-select-sm {
  padding: .3rem .6rem;
  font-size: .82rem;
  min-width: 120px;
}

/* ── Modal content widths ── */
.modal-content.modal-sm {
  max-width: 450px
}

.modal-content.modal-md {
  max-width: 500px
}

/* SWEETALERT2 CUSTOM THEME */

.swal2-popup.swal-popup-custom {
  border-radius: var(--radius-lg) !important;
  border: 1px solid rgba(138, 11, 210, 0.25) !important;
  box-shadow: none !important;
}

.swal2-title.swal-title-custom {
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 1.2rem !important
}

.swal2-html-container.swal-text-custom {
  color: #94a3b8 !important;
  font-size: .9rem !important;
  line-height: 1.6 !important
}

.swal2-html-container.swal-text-custom code {
  background: #2d2d44 !important;
  padding: .25rem .5rem !important;
  border-radius: 4px !important;
  color: var(--accent-soft) !important
}

.swal2-confirm.swal-confirm-custom {
  border-radius: 999px !important;
  font-weight: 600 !important;
  padding: .65rem 1.5rem !important;
  font-size: .9rem !important;
  background: #8B5CF6 !important;
  border: none !important;
  transition: all .2s !important
}

.swal2-confirm.swal-confirm-custom:hover {
  transform: translateY(-2px) !important;
  box-shadow: none !important;
  background: #7c3aed !important
}

.swal2-cancel.swal-cancel-custom {
  border-radius: 999px !important;
  font-weight: 600 !important;
  padding: .65rem 1.5rem !important;
  font-size: .9rem !important;
  background: #374151 !important;
  border: none !important;
  transition: all .2s !important
}

.swal2-cancel.swal-cancel-custom:hover {
  background: #4b5563 !important;
  transform: translateY(-2px) !important
}

.swal2-icon.swal-icon-custom {
  border-color: rgba(138, 11, 210, 0.5) !important;
  width: 60px !important;
  height: 60px !important;
  font-size: 1.8rem !important;
  margin: 1rem auto !important
}

.swal2-icon.swal2-warning.swal-icon-custom {
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fbbf24 !important
}

.swal2-icon.swal2-error.swal-icon-custom {
  border-color: rgba(239, 68, 68, 0.5) !important
}

.swal2-icon.swal2-success.swal-icon-custom {
  border-color: rgba(34, 197, 94, 0.5) !important
}

.swal2-icon.swal2-question.swal-icon-custom {
  border-color: rgba(138, 11, 210, 0.5) !important;
  color: var(--accent-soft) !important
}

.swal2-actions {
  gap: .75rem !important
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

::-webkit-scrollbar-track {
  background: transparent
}

::-webkit-scrollbar-thumb {
  background: rgba(138, 11, 210, 0.25);
  border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(138, 11, 210, 0.4)
}

/* RESPONSIVE */

/* ── TABLET (≤1024px) ── */
@media(max-width:1024px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    max-width: 85vw;
  }

  .sidebar.active,
  .sidebar.open {
    transform: translateX(0)
  }

  .sidebar-close {
    display: flex
  }

  .menu-toggle {
    display: flex
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100vw
  }

  .upload-container {
    grid-template-columns: 1fr
  }

  .revenue-details-grid {
    grid-template-columns: 1fr
  }

  .header {
    padding: .75rem 1rem
  }

  .admin-details {
    display: none
  }
}

/* ── MOBILE (≤768px) ── */
@media(max-width:768px) {

  /* Layout general */
  .section {
    padding: .6rem .4rem
  }

  body {
    font-size: 15px
  }

  /* ── Header ── */
  .header {
    padding: .5rem .65rem;
    min-height: auto;
    gap: .4rem;
  }

  .header-left {
    gap: .4rem;
    min-width: 0;
    flex: 1
  }

  .header-title {
    gap: .35rem;
    flex-wrap: nowrap;
    overflow: hidden
  }

  .header-title h1 {
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .header-breadcrumb {
    display: none
  }

  .header-clock {
    font-size: .68rem;
    padding: .2rem .45rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .header-clock svg {
    width: 12px;
    height: 12px
  }

  .header-actions {
    gap: .4rem;
    flex-shrink: 0
  }

  .admin-avatar {
    width: 30px;
    height: 30px;
    font-size: .7rem
  }

  .btn-logout {
    padding: .35rem .55rem;
    font-size: .72rem;
    gap: .3rem
  }

  .btn-logout span {
    display: none
  }

  .menu-toggle {
    width: 36px;
    height: 36px
  }

  /* ── Stats grid ── */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem
  }

  .stats-grid-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .5rem
  }

  .stat-card {
    padding: .7rem .75rem;
    gap: .5rem
  }

  .stat-value {
    font-size: 1.05rem
  }

  .stat-icon {
    width: 34px;
    height: 34px
  }

  .stat-icon svg,
  .stat-icon iconify-icon {
    width: 17px;
    height: 17px
  }

  .stat-label {
    font-size: .68rem
  }

  .stat-sublabel {
    font-size: .62rem
  }

  /* ── Revenue stats ── */
  .revenue-stats-grid {
    grid-template-columns: 1fr 1fr;
    padding: .6rem;
    gap: .5rem;
  }

  .revenue-stat-card {
    padding: .6rem;
    gap: .4rem
  }

  .revenue-icon {
    width: 32px;
    height: 32px
  }

  .revenue-icon svg {
    width: 16px;
    height: 16px
  }

  .revenue-value {
    font-size: .95rem
  }

  .revenue-label {
    font-size: .65rem
  }

  .revenue-secondary {
    font-size: .62rem
  }

  .revenue-details-grid {
    grid-template-columns: 1fr;
    padding: 0 .6rem .6rem;
    gap: .6rem;
  }

  .revenue-by-plan,
  .revenue-chart-container {
    padding: .7rem
  }

  /* ── Charts ── */
  .charts-grid {
    grid-template-columns: 1fr;
    gap: .6rem
  }

  .charts-grid>.panel:last-child:nth-child(odd) {
    grid-column: auto
  }

  .chart-container {
    min-height: 140px;
    padding: .6rem
  }

  .chart-line-container {
    height: 150px
  }

  .chart-axis-labels {
    margin-top: .4rem
  }

  .chart-axis-label {
    font-size: .58rem
  }

  /* ── Panels ── */
  .panel-header {
    padding: .65rem .75rem;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
  }

  .panel-title {
    font-size: .85rem;
    gap: .35rem
  }

  .panel-title svg,
  .panel-title iconify-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0
  }

  .panel-actions {
    width: 100%;
    flex-wrap: wrap;
    gap: .35rem;
    justify-content: flex-start;
  }

  .panel-body {
    padding: .75rem
  }

  .panel+.panel:not(.cp-editor-panel) {
    margin-top: 1rem
  }

  .mt-section {
    margin-top: 1rem
  }

  .mb-section {
    margin-bottom: 1rem
  }

  /* Search box responsivo */
  .panel-actions .search-box {
    width: 100%;
    order: -1;
  }

  .search-box {
    padding: .35rem .65rem
  }

  .search-box input {
    min-width: 0;
    font-size: .78rem
  }

  /* Select filters en panel-actions */
  .panel-actions .form-select-sm {
    min-width: 0;
    flex: 1;
    font-size: .72rem;
    padding: .3rem .4rem;
  }

  /* Botones en panel-actions más compactos */
  .panel-actions .btn {
    font-size: .7rem;
    padding: .3rem .55rem;
  }

  .panel-actions .btn svg {
    width: 13px;
    height: 13px
  }

  /* ── Membership stats ── */
  .membership-stats {
    grid-template-columns: repeat(3, 1fr);
    padding: .6rem;
    gap: .4rem;
  }

  .membership-stat-card {
    padding: .6rem .4rem
  }

  .membership-count {
    font-size: 1.3rem
  }

  .membership-plan {
    font-size: .6rem;
    letter-spacing: .2px
  }

  .membership-label {
    font-size: .6rem
  }

  /* ── Gift form ── */
  .gift-form {
    padding: .85rem;
    margin-bottom: 1rem
  }

  .gift-form h3 {
    font-size: .85rem;
    margin-bottom: .6rem
  }

  .gift-form-grid {
    grid-template-columns: 1fr;
    gap: .6rem;
  }

  /* ── Upload/Preview ── */
  .upload-container {
    grid-template-columns: 1fr;
    gap: .75rem
  }

  .upload-preview-panel {
    position: static
  }

  .preview-image {
    min-height: 160px
  }

  .upload-zone-content {
    padding: 1rem;
    min-height: 100px;
    gap: .5rem
  }

  .upload-zone-content span {
    font-size: .78rem
  }

  /* ── Forms ── */
  .form-row {
    grid-template-columns: 1fr;
    gap: .6rem
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: .75rem
  }

  .form-group {
    margin-bottom: .6rem
  }

  .form-label,
  .form-group label {
    font-size: .75rem
  }

  .form-input,
  .form-control,
  .form-select,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="url"],
  input[type="date"],
  textarea,
  select {
    padding: .55rem .7rem;
    font-size: .8rem;
  }

  .form-actions {
    flex-direction: column;
    gap: .4rem;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center
  }

  .formato-checks {
    gap: .3rem
  }

  .fmt-chk {
    padding: .3rem .6rem;
    font-size: .75rem
  }

  /* ── Tabs ── */
  .panel-tabs {
    padding: .25rem;
    gap: .2rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .tab-btn {
    padding: .35rem .65rem;
    font-size: .7rem;
    flex: 1;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  .tab-btn svg {
    width: 13px;
    height: 13px
  }

  /* ── New designs grid ── */
  .new-designs-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 160px));
    gap: .6rem
  }

  /* ── Patreon summary ── */
  .patreon-summary-box {
    padding: .6rem
  }

  .summary-row {
    padding: .3rem 0
  }

  .summary-label {
    font-size: .72rem;
    gap: .25rem
  }

  .summary-label svg {
    width: 13px;
    height: 13px
  }

  .summary-value {
    font-size: .78rem
  }

  /* ── Revenue cols-2 ── */
  .revenue-stats-grid.cols-2 {
    grid-template-columns: 1fr 1fr
  }

  /* ── Empty state ── */
  .empty-state {
    padding: 1.5rem .6rem
  }

  .empty-state h3 {
    font-size: .9rem
  }

  .empty-state p {
    font-size: .78rem
  }

  /* ── Toast ── */
  .toast-container {
    right: .4rem;
    left: .4rem;
    top: .4rem
  }

  .toast {
    max-width: 100%;
    font-size: .75rem;
    padding: .6rem 1rem
  }

  /* ── Modals ── */
  .modal {
    padding: .5rem
  }

  .modal-content {
    max-width: 100%;
    margin: 0;
    max-height: 88vh;
    border-radius: var(--radius);
  }

  .modal-header {
    padding: .85rem
  }

  .modal-header h3 {
    font-size: .9rem
  }

  .modal-body {
    padding: .85rem
  }

  .modal-footer {
    padding: .65rem .85rem
  }

  .modal-content form {
    padding: .85rem
  }

  .modal-lg .modal-content {
    max-width: 100%
  }

  .modal-confirm-box {
    padding: 1.25rem;
    max-width: 90vw
  }

  .modal-confirm-title {
    font-size: 1rem
  }

  .modal-confirm-message {
    font-size: .8rem;
    margin-bottom: 1rem
  }

  /* ── Download summary ── */
  .descarga-resumen-grid {
    flex-direction: column;
    gap: .5rem;
  }

  .stats-mini {
    padding: .6rem
  }

  .stats-mini-grid {
    gap: .75rem
  }

  /* ── Plan stats ── */
  .plan-stats {
    padding: .2rem 0
  }

  /* ── Security IP monospace ── */
  #seguridad-ip .table tbody td:first-child {
    font-size: .65rem
  }

  /* ── Ref image thumb ── */
  .ref-image-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px
  }

  /* ── Payment preview ── */
  .payment-preview {
    padding: .75rem
  }

  .payment-preview h3 {
    font-size: .9rem;
    margin-bottom: 1rem
  }

  /* ── Solicitud detail ── */
  .solicitud-detail .detail-row {
    font-size: .8rem
  }

  .solicitud-detail .detail-image img {
    max-height: 160px
  }

  /* ── Table design (for small inline) ── */
  .table-design {
    gap: .4rem
  }

  .table-thumb {
    width: 38px;
    min-height: 38px;
    max-height: 56px;
    border-radius: 8px
  }

  .table-design-name {
    font-size: .78rem;
    max-width: 140px
  }

  .table-design-slug {
    font-size: .65rem;
    max-width: 140px
  }

  /* ── Recent payments ── */
  .recent-payments {
    padding-top: .85rem
  }

  .revenue-subtitle {
    font-size: .82rem;
    gap: .35rem
  }

  /* ── SweetAlert on mobile ── */
  .swal2-popup.swal-popup-custom {
    width: 90vw !important;
    padding: 1.25rem !important;
  }

  .swal2-title.swal-title-custom {
    font-size: 1.15rem !important
  }

  .swal2-html-container.swal-text-custom {
    font-size: .88rem !important
  }

  /* ── Btn-action smaller ── */
  .table-actions .btn-action {
    font-size: .62rem;
    padding: .2rem .4rem
  }
}

/* ── SMALL MOBILE (≤480px) ── */
@media(max-width:480px) {
  .section {
    padding: .4rem .3rem
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: .35rem
  }

  .stat-card {
    padding: .55rem .6rem;
    gap: .4rem
  }

  .stat-value {
    font-size: .95rem
  }

  .stat-icon {
    width: 28px;
    height: 28px
  }

  .stat-icon svg,
  .stat-icon iconify-icon {
    width: 14px;
    height: 14px
  }

  .stat-label {
    font-size: .62rem
  }

  /* Revenue */
  .revenue-stats-grid {
    grid-template-columns: 1fr;
    padding: .4rem;
    gap: .35rem
  }

  .revenue-stats-grid.cols-2 {
    grid-template-columns: 1fr
  }

  /* Membership */
  .membership-stats {
    gap: .3rem;
    padding: .4rem
  }

  .membership-stat-card {
    padding: .4rem .25rem
  }

  .membership-count {
    font-size: 1rem
  }

  .membership-plan {
    font-size: .55rem
  }

  .membership-label {
    font-size: .55rem
  }

  /* Header */
  .header {
    padding: .35rem .5rem;
    gap: .3rem
  }

  .header-title h1 {
    font-size: .75rem
  }

  .header-clock {
    font-size: .6rem;
    padding: .15rem .35rem
  }

  .menu-toggle {
    width: 32px;
    height: 32px
  }

  .admin-avatar {
    width: 28px;
    height: 28px;
    font-size: .65rem
  }

  /* Charts */
  .chart-line-container {
    height: 120px
  }

  .chart-container {
    min-height: 120px;
    padding: .4rem
  }

  /* Panels */
  .panel-header {
    padding: .5rem .6rem;
    gap: .35rem
  }

  .panel-title {
    font-size: .78rem
  }

  .panel-body {
    padding: .5rem
  }

  .panel+.panel:not(.cp-editor-panel) {
    margin-top: .75rem
  }

  .mt-section {
    margin-top: .75rem
  }

  /* Tabs */
  .tab-btn {
    padding: .28rem .4rem;
    font-size: .65rem
  }

  /* Buttons */
  .btn {
    padding: .38rem .7rem;
    font-size: .72rem
  }

  .btn-sm {
    padding: .28rem .5rem;
    font-size: .68rem
  }

  .panel-actions .btn {
    font-size: .65rem;
    padding: .25rem .45rem
  }

  /* Upload */
  .upload-zone-content {
    padding: .75rem;
    min-height: 85px
  }

  /* Cards-grid max-height ajuste */
  .cards-grid {
    max-height: 55vh
  }
}

/* ADDITIONAL KEYFRAMES */

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px)
  }

  to {
    opacity: 1;
    transform: translateX(0)
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.85)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

/* MODAL SYSTEM (.modal class) */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex
}

.modal .modal-content {
  animation: slideUp .3s var(--ease)
}

.modal-body {
  padding: 1.5rem
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-lg .modal-content {
  max-width: 800px
}

/* BTN-ACTION */

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 500;
  transition: all .25s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
  background: rgba(138, 11, 210, 0.1);
  color: var(--accent-soft);
  white-space: nowrap;
}

.btn-action:hover {
  background: rgba(138, 11, 210, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(138, 11, 210, 0.15);
}

.btn-action.delete {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-action.delete:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-action.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.2);
}

.btn-action.success:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
}

.btn-action.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--yellow);
  border-color: rgba(245, 158, 11, 0.2);
}

.btn-action.warning:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-action.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
  border-color: rgba(59, 130, 246, 0.2);
}

.btn-action.info:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
}

.btn-action.collab {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(167, 139, 250, 0.2));
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.3);
}

.btn-action.collab:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.35), rgba(167, 139, 250, 0.35));
  border-color: rgba(139, 92, 246, 0.5);
}

.btn-action-icon {
  padding: .4rem .5rem;
}

/* BTN-ICON */

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  transition: all .25s var(--ease);
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-icon:hover {
  color: var(--text);
  background: rgba(138, 11, 210, 0.1);
  border-color: rgba(138, 11, 210, 0.2);
}

/* TAB-BTN (pill tabs - override panel-tabs) */

.panel-tabs {
  display: flex;
  gap: .35rem;
  padding: .35rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 9999px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 9999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .25s var(--ease);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(138, 11, 210, 0.1);
}

.tab-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(138, 11, 210, 0.3);
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  opacity: .7
}

.tab-btn.active svg {
  opacity: 1
}

/* TABLE-DESIGN */

.table-design {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.table-thumb {
  width: 48px;
  height: auto;
  min-height: 48px;
  max-height: 72px;
  border-radius: 10px;
  object-fit: contain;
  background: rgba(138, 11, 210, 0.06);
  border: 1px solid rgba(138, 11, 210, 0.2);
  flex-shrink: 0;
}

.table-design-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.table-design-name {
  font-weight: 600;
  font-size: .85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

.table-design-slug {
  display: block;
  font-size: .72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}

/* MODAL-CONFIRM */

.modal-confirm {
  display: none
}

.modal-confirm.active {
  display: block
}

.modal-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 1rem;
  animation: fadeIn .2s ease;
}

.modal-confirm-box {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.25);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  animation: slideUp .3s var(--ease);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 60px rgba(138, 11, 210, 0.15);
}

.modal-confirm-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.modal-confirm-icon.danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red)
}

.modal-confirm-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--yellow)
}

.modal-confirm-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green)
}

.modal-confirm-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue)
}

.modal-confirm-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 .5rem;
}

.modal-confirm-message {
  font-size: .85rem;
  color: var(--muted);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.modal-confirm-actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
}

.modal-confirm-actions .btn-confirm-cancel {
  padding: .55rem 1.5rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  background: rgba(138, 11, 210, 0.08);
  color: var(--text-soft);
  border: 1px solid rgba(138, 11, 210, 0.2);
  cursor: pointer;
  transition: all .25s var(--ease);
}

.modal-confirm-actions .btn-confirm-cancel:hover {
  border-color: rgba(138, 11, 210, 0.35);
  background: rgba(138, 11, 210, 0.15);
}

.modal-confirm-actions .btn-confirm-ok {
  padding: .55rem 1.5rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  background: #fff;
  color: var(--accent-deep);
  border: none;
  cursor: pointer;
  transition: all .3s var(--ease);
  box-shadow: none;
}

.modal-confirm-actions .btn-confirm-ok:hover {
  background: var(--yellow-soft);
  color: #1e0550;
  transform: translateY(-2px);
  box-shadow: none;
}

.modal-confirm-actions .btn-confirm-ok.danger {
  background: linear-gradient(135deg, var(--red), #dc2626);
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.modal-confirm-actions .btn-confirm-ok.danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* CARD-ITEM */

.card-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
  transition: all .25s var(--ease);
}

.card-item:hover {
  border-color: rgba(138, 11, 210, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(138, 11, 210, 0.12);
}

.card-item+.card-item {
  margin-top: .5rem
}

.card-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(138, 11, 210, 0.1);
  color: var(--accent-soft);
}

.card-item-content {
  flex: 1;
  min-width: 0
}

.card-item-title {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-item-subtitle {
  font-size: .75rem;
  color: var(--muted)
}

.card-item-actions {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}

/* MOBILE-CARD */

.mobile-card {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: var(--radius-lg);
  padding: .85rem 1rem;
  transition: all .25s var(--ease);
}

.mobile-card:hover {
  border-color: rgba(138, 11, 210, 0.25)
}

.mobile-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: .5rem;
  gap: .5rem;
}

.mobile-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mobile-card-id {
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: rgba(138, 11, 210, 0.1);
  color: var(--accent-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.mobile-card-body {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .25rem 0;
  font-size: .82rem;
}

.mobile-card-label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 500;
}

.mobile-card-value {
  color: var(--text-soft);
  font-weight: 500;
  font-size: .82rem;
  text-align: right;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-card-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.mobile-card-actions .btn-action {
  flex: 1;
  min-width: 80px;
  padding: .6rem .75rem;
  font-size: .85rem;
  text-align: center;
  justify-content: center;
}

/* BADGES EXTENDED */

.badge-secondary {
  background: rgba(107, 114, 128, 0.2);
  color: #9CA3AF;
  border-color: rgba(107, 114, 128, 0.3)
}

/* PLAN STAT ROW */

.plan-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  transition: all .25s var(--ease);
}

.plan-stat-row:hover {
  background: rgba(138, 11, 210, 0.1)
}

.plan-info {
  display: flex;
  align-items: center;
  gap: .75rem
}

.plan-badge {
  padding: .35rem .75rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.plan-badge.basico {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff
}

.plan-badge.premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff
}

.plan-badge.vip {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: #fff
}

.plan-count {
  font-size: .8rem;
  color: var(--muted)
}

.plan-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem
}

.plan-usd {
  font-weight: 600;
  color: var(--green)
}

.plan-pen {
  font-size: .8rem;
  color: var(--muted)
}

/* CHART SYSTEM */

.chart-panel {
  min-height: 350px
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  gap: .5rem;
  padding: .5rem 0;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 60px;
}

.chart-bar {
  width: 100%;
  max-width: 40px;
  background: linear-gradient(180deg, var(--accent), rgba(138, 11, 210, 0.4));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: all .3s ease;
  position: relative;
}

.chart-bar:hover {
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 15px rgba(138, 11, 210, 0.5);
}

.chart-bar-value {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .7rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}

.chart-bar-item:hover .chart-bar-value {
  opacity: 1
}

.chart-bar-label {
  margin-top: .5rem;
  font-size: .65rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.chart-total {
  text-align: right;
  font-size: .8rem;
  color: var(--muted);
  margin-bottom: .5rem;
  padding-right: .5rem;
}

.chart-total strong {
  color: var(--text);
  font-size: 1rem
}

.chart-donut-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0;
}

.chart-donut-svg {
  width: 140px;
  height: 140px;
  flex-shrink: 0
}

.chart-donut-svg path {
  transition: transform .2s, filter .2s;
  transform-origin: center;
  cursor: pointer;
}

.chart-donut-svg path:hover {
  transform: scale(1.05);
  filter: brightness(1.2)
}

.chart-donut-total {
  font-family: inherit
}

.chart-legend {
  display: flex;
  flex-direction: column;
  gap: .5rem
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem
}

.chart-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0
}

.chart-legend-label {
  color: var(--muted);
  flex: 1
}

.chart-legend-value {
  color: var(--text);
  font-weight: 600
}

/* HORIZONTAL BARS */

.horizontal-bars-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: .5rem 0;
  width: 100%
}

.horizontal-bar-row {
  display: flex;
  align-items: center;
  gap: 1rem
}

.horizontal-bar-label {
  min-width: 140px;
  font-size: .9rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.horizontal-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .75rem
}

.horizontal-bar {
  height: 28px;
  border-radius: 6px;
  transition: width .5s ease;
  min-width: 4px;
}

.horizontal-bar-value {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  min-width: 36px
}

/* Top 10 Categorías expanded */
.chart-categorias-expanded {
  min-height: auto;
  padding: 1.5rem 2rem;
  display: block;
}

.chart-categorias-expanded .horizontal-bars-wrapper {
  gap: 1.1rem;
}

.chart-categorias-expanded .horizontal-bar-row {
  gap: 1.25rem;
}

.chart-categorias-expanded .horizontal-bar-label {
  min-width: 160px;
  font-size: .95rem;
}

.chart-categorias-expanded .horizontal-bar {
  height: 32px;
  border-radius: 8px;
}

.chart-categorias-expanded .horizontal-bar-value {
  font-size: 1rem;
  font-weight: 700;
}

/* REQUEST SYSTEM */

.requests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.request-card {
  background: var(--panel);
  border: 1.5px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all .3s var(--ease);
}

.request-card:hover {
  border-color: rgba(138, 11, 210, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(138, 11, 210, 0.15);
}

.request-card.has-image {
  display: flex;
  gap: 1.25rem
}

.request-card .request-image {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(138, 11, 210, 0.3);
}

.request-card .request-image a {
  display: block;
  width: 100%;
  height: 100%
}

.request-card .request-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}

.request-card .request-image:hover img {
  transform: scale(1.05)
}

.request-card .request-content {
  flex: 1;
  min-width: 0
}

.request-card:not(.has-image) .request-content {
  width: 100%
}

/* CATALOG CARD */

.catalog-card {
  background: var(--panel);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(138, 11, 210, 0.12);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all .3s var(--ease);
  will-change: transform;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 0;
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.14),
    0 0 0 2px rgba(138, 11, 210, 0.3);
}

.catalog-card .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .5rem .75rem;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.08), rgba(59, 130, 246, 0.08));
  border-bottom: 1px solid rgba(138, 11, 210, 0.2);
  margin: 0;
  height: auto;
}

.catalog-card .card-label {
  display: block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: rgba(245, 243, 255, 0.7);
  text-transform: uppercase;
}

.catalog-card .card-image {
  position: relative;
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.05), rgba(59, 130, 246, 0.05));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-card .card-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform .3s;
}

.catalog-card:hover .card-image img {
  transform: scale(1.03)
}

.catalog-card .card-content {
  padding: .75rem .85rem .5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.catalog-card .card-title {
  margin: 0;
  font-size: .95rem;
  line-height: 1.25;
  font-weight: 600;
  color: #f5f3ff;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}

.catalog-card .card-price-container {
  padding: 0 .85rem .75rem;
  margin-top: .5rem;
  flex-shrink: 0;
}

.catalog-card .card-price-large {
  display: block;
  width: 100%;
  text-align: center;
  padding: .75rem 1.2rem;
  border-radius: 14px;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  border: none;
  letter-spacing: .02em;
  transition: all .3s var(--ease);
  cursor: pointer;
}

.catalog-card .card-price-premium {
  background: linear-gradient(135deg, #ff6b00, #ff8f3d);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.25), 0 2px 8px rgba(255, 107, 0, 0.15);
}

.catalog-card .card-price-premium:hover {
  background: linear-gradient(135deg, #ff8000, #ffa65d);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.35), 0 3px 10px rgba(255, 107, 0, 0.2);
}

.catalog-card .card-price-free {
  background: #fff;
  color: var(--accent-deep);
  box-shadow: none;
}

.catalog-card .card-price-free:hover {
  background: var(--yellow-soft);
  color: #1e0550;
  transform: translateY(-2px);
  box-shadow: none;
}

.catalog-card .card-download-btn {
  background: linear-gradient(135deg, #ff6b00, #ff8f3d);
  box-shadow: 0 4px 20px rgba(255, 107, 0, 0.25), 0 2px 8px rgba(255, 107, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  position: relative;
  z-index: 5;
  color: #fff;
  border: none;
  cursor: pointer;
  appearance: none;
}

.catalog-card .card-download-btn:hover {
  background: linear-gradient(135deg, #ff8000, #ffa65d);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 0, 0.35), 0 3px 10px rgba(255, 107, 0, 0.2);
}

.catalog-card .card-download-btn:disabled {
  opacity: .7;
  cursor: not-allowed
}

.catalog-card .card-download-free {
  background: linear-gradient(135deg, #22c55e, #4ade80) !important;
  box-shadow: none !important;
}

.catalog-card .card-download-free:hover {
  background: linear-gradient(135deg, #16a34a, #22c55e) !important;
  box-shadow: none !important;
}

.catalog-card .card-download-premium {
  background: linear-gradient(135deg, #ff6b00, #ff8f3d) !important;
  box-shadow: none !important;
}

.catalog-card .card-download-premium:hover {
  background: linear-gradient(135deg, #ff8000, #ffa65d) !important;
  box-shadow: none !important;
}

.catalog-card .card-download-gift {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.25), 0 2px 8px rgba(168, 85, 247, 0.15);
}

.catalog-card .card-download-gift:hover {
  background: linear-gradient(135deg, #9333ea, #a855f7);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.35), 0 3px 10px rgba(168, 85, 247, 0.2);
}

.catalog-card .card-price-pending {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25), 0 2px 8px rgba(245, 158, 11, 0.15);
  color: #78350f;
  font-size: .85rem;
}

.catalog-card .card-link-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

/* MEMBERSHIP CARD (full page) */

.membership-card {
  background: var(--panel);
  border: 1px solid rgba(138, 11, 210, 0.2);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.membership-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(138, 11, 210, 0.1), transparent 70%);
  animation: pulse 3s ease-in-out infinite;
}

.membership-card.premium {
  border-color: rgba(255, 215, 0, 0.3)
}

.membership-card.premium::before {
  background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent 70%);
}

.membership-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: rgba(138, 11, 210, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.membership-card.premium .membership-badge {
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
}

.membership-card h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .5rem;
}

.membership-card p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* IP SECURITY */

.ip-link {
  color: var(--accent-soft);
  text-decoration: none;
  font-family: 'Roboto Mono', monospace;
  font-size: .9rem;
  padding: .125rem .5rem;
  background: rgba(138, 11, 210, 0.1);
  border-radius: 4px;
  transition: all .2s;
}

.ip-link:hover {
  background: rgba(138, 11, 210, 0.25);
  color: #fff
}

.row-blocked {
  background: rgba(239, 68, 68, 0.08) !important
}

.row-blocked:hover {
  background: rgba(239, 68, 68, 0.12) !important
}

.row-suspicious {
  background: rgba(245, 158, 11, 0.08) !important
}

.row-suspicious:hover {
  background: rgba(245, 158, 11, 0.12) !important
}

/* SOURCE STATS */

.source-stats {
  display: flex;
  gap: 1rem
}

.source-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: rgba(138, 11, 210, 0.06);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(138, 11, 210, 0.1);
}

.source-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.source-icon.paypal {
  background: rgba(0, 119, 181, 0.15);
  color: #0077b5
}

.source-icon.yape {
  background: rgba(131, 47, 152, 0.15);
  color: #832f98
}

/* STAT-MINI */

.stat-mini {
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.1), rgba(180, 75, 240, 0.05));
  border: 1.5px solid rgba(180, 75, 240, 0.3);
  border-radius: 12px;
  padding: 1.75rem;
  text-align: center;
  transition: all .3s var(--ease);
}

.stat-mini:hover {
  border-color: rgba(180, 75, 240, 0.6);
  background: linear-gradient(135deg, rgba(138, 11, 210, 0.15), rgba(180, 75, 240, 0.1));
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(138, 11, 210, 0.2);
}

.stat-mini .stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .75rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.stat-mini .stat-label {
  display: block;
  font-size: .95rem;
  color: #a5a3c7;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.stat-icon.red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.05));
  color: #EF4444;
}

.stat-icon.cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(8, 145, 178, 0.05));
  color: #06B6D4;
}

/* TEXT UTILITIES */

.text-success {
  color: var(--green)
}

.text-danger {
  color: var(--red) !important;
  font-weight: 600
}

.text-warning {
  color: var(--yellow) !important;
  font-weight: 500
}

.text-info {
  color: var(--blue)
}

.hidden {
  display: none !important
}

/* DESIGN THUMBNAIL */

.design-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(138, 11, 210, 0.2);
}

.design-name-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color .2s;
}

.design-name-link:hover {
  color: var(--accent-soft)
}

/* ACTIVITY */

.activity-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.activity-desc {
  font-size: .8rem;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.activity-badge {
  font-size: .65rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* STAGGER ANIMATIONS */

.sidebar .nav-item {
  animation: fadeInLeft .3s ease-out both;
}

.sidebar .nav-item:nth-child(1) {
  animation-delay: .05s
}

.sidebar .nav-item:nth-child(2) {
  animation-delay: .08s
}

.sidebar .nav-item:nth-child(3) {
  animation-delay: .11s
}

.sidebar .nav-item:nth-child(4) {
  animation-delay: .14s
}

.sidebar .nav-item:nth-child(5) {
  animation-delay: .17s
}

.sidebar .nav-item:nth-child(6) {
  animation-delay: .2s
}

.sidebar .nav-item:nth-child(7) {
  animation-delay: .23s
}

.sidebar .nav-item:nth-child(8) {
  animation-delay: .26s
}

.data-table tbody tr {
  animation: fadeUp .25s ease-out both;
  transition: background .2s, transform .2s;
}

.data-table tbody tr:nth-child(1) {
  animation-delay: .05s
}

.data-table tbody tr:nth-child(2) {
  animation-delay: .08s
}

.data-table tbody tr:nth-child(3) {
  animation-delay: .11s
}

.data-table tbody tr:nth-child(4) {
  animation-delay: .14s
}

.data-table tbody tr:nth-child(5) {
  animation-delay: .17s
}

.data-table tbody tr:hover {
  transform: translateX(3px);
  background: rgba(138, 11, 210, 0.08);
}

.stat-card {
  animation: scaleIn .3s ease-out both
}

.stat-card:nth-child(1) {
  animation-delay: .1s
}

.stat-card:nth-child(2) {
  animation-delay: .15s
}

.stat-card:nth-child(3) {
  animation-delay: .2s
}

.stat-card:nth-child(4) {
  animation-delay: .25s
}

.form-group {
  animation: fadeUp .25s ease-out both
}

.form-group:nth-child(1) {
  animation-delay: .05s
}

.form-group:nth-child(2) {
  animation-delay: .08s
}

.form-group:nth-child(3) {
  animation-delay: .11s
}

.form-group:nth-child(4) {
  animation-delay: .14s
}

.form-group:nth-child(5) {
  animation-delay: .17s
}

/* MOBILE-CARD RESPONSIVE OVERRIDES */

@media(min-width:769px) {
  .cards-grid {
    display: none !important
  }

  .table-responsive {
    display: block !important
  }
}

@media(max-width:768px) {
  .table-responsive {
    display: none !important
  }

  .cards-grid {
    display: flex !important;
    flex-direction: column;
    gap: .4rem;
    padding: .2rem;
    max-height: 60vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-card {
    padding: .6rem .7rem;
    margin-bottom: 0;
    border-radius: 10px;
  }

  .mobile-card-header {
    margin-bottom: .3rem;
    gap: .3rem;
    flex-wrap: wrap;
  }

  .mobile-card-title {
    font-size: .88rem;
    line-height: 1.2
  }

  .mobile-card-id {
    font-size: .62rem;
    padding: .15rem .35rem
  }

  .mobile-card-body {
    gap: .15rem
  }

  .mobile-card-row {
    font-size: .78rem;
    padding: .15rem 0
  }

  .mobile-card-label {
    font-size: .72rem
  }

  .mobile-card-value {
    font-size: .78rem;
    max-width: 55%
  }

  .mobile-card-actions {
    margin-top: .35rem;
    padding-top: .35rem;
    gap: .3rem;
    flex-wrap: wrap;
  }

  .mobile-card-actions .btn-action {
    padding: .35rem .5rem;
    font-size: .72rem;
    min-width: auto;
    flex: 0 1 auto;
  }

  .mobile-card .badge {
    font-size: .62rem;
    padding: .15rem .35rem
  }

  /* Ref thumb en cards */
  .mobile-card .ref-image-thumb {
    width: 36px;
    height: 36px;
    border-radius: 6px
  }

  .requests-grid {
    grid-template-columns: 1fr
  }

  .request-card.has-image {
    flex-direction: column
  }

  .request-card .request-image {
    width: 100%;
    height: 120px
  }

  .design-thumbnail {
    width: 36px;
    height: 36px
  }

  .source-stats {
    flex-direction: column;
    gap: .4rem
  }

  .catalog-card .card-content {
    padding: .5rem .6rem .35rem
  }

  .catalog-card .card-title {
    font-size: .82rem
  }

  .catalog-card .card-price-large {
    font-size: .95rem;
    padding: .5rem .85rem
  }

  /* Card items (top designs, downloads lists) */
  .card-item {
    padding: .6rem .7rem;
    gap: .5rem
  }

  .card-item-icon {
    width: 34px;
    height: 34px
  }

  .card-item-title {
    font-size: .78rem
  }

  .card-item-subtitle {
    font-size: .68rem
  }
}

@media(max-width:480px) {
  .cards-grid {
    max-height: 55vh;
    gap: .3rem
  }

  .mobile-card {
    padding: .45rem .55rem;
    border-radius: 8px
  }

  .mobile-card-title {
    font-size: .82rem
  }

  .mobile-card-row {
    font-size: .72rem
  }

  .mobile-card-label {
    font-size: .68rem
  }

  .mobile-card-value {
    font-size: .72rem
  }

  .mobile-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .25rem
  }

  .mobile-card-actions .btn-action {
    flex: 1;
    padding: .3rem .35rem;
    font-size: .65rem;
  }

  .request-card .request-image {
    height: 100px
  }

  .card-item {
    padding: .45rem .55rem;
    gap: .4rem
  }

  .card-item-icon {
    width: 28px;
    height: 28px
  }
}

/* ADMIN PANEL IMPROVEMENTS */

/* Tabla thead sticky */
.table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(70, 15, 140, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Panel principal: expandir solo en secciones con tabla única */
#usuarios>.panel:first-child,
#administradores>.panel:first-child,
#disenos>.panel:first-child,
#solicitudes>.panel:first-child,
#pagos-paypal>.panel:first-child,
#regalos>.panel:first-child {
  min-height: calc(100vh - var(--header-h) - 4rem);
  display: flex;
  flex-direction: column;
}

#usuarios>.panel:first-child>.table-responsive,
#administradores>.panel:first-child>.table-responsive,
#disenos>.panel:first-child>.table-responsive,
#solicitudes>.panel:first-child>.table-responsive,
#pagos-paypal>.panel:first-child>.table-responsive,
#regalos>.panel:first-child>.table-responsive {
  flex: 1;
}

#usuarios>.panel:first-child>.cards-grid,
#administradores>.panel:first-child>.cards-grid,
#disenos>.panel:first-child>.cards-grid,
#solicitudes>.panel:first-child>.cards-grid,
#pagos-paypal>.panel:first-child>.cards-grid,
#regalos>.panel:first-child>.cards-grid {
  flex: 1;
}

/* Table responsive: scroll vertical interno para tablas largas */
.table-responsive {
  overflow-x: auto;
  overflow-y: auto;
  max-height: calc(100vh - 280px);
  scrollbar-width: thin;
  scrollbar-color: rgba(138, 11, 210, 0.3) transparent;
}

.table-responsive::-webkit-scrollbar {
  width: 6px;
  height: 6px
}

.table-responsive::-webkit-scrollbar-track {
  background: transparent
}

.table-responsive::-webkit-scrollbar-thumb {
  background: rgba(138, 11, 210, 0.3);
  border-radius: 3px
}

/* Acciones más compactas */
.table-actions .btn-action {
  font-size: .68rem;
  padding: .25rem .5rem;
}

/* Stats grid 4 col solo para grids con 4 cards */
@media(min-width:1400px) {
  .stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Panel header flex wrap */
.panel-header {
  flex-wrap: wrap;
  gap: .75rem;
}

.panel-actions {
  flex-wrap: wrap;
  gap: .5rem;
}

/* Filas de tabla con transición */
.table tbody tr {
  transition: background .2s ease;
}

/* Badge super admin especial */
.badge-super-admin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(234, 88, 12, 0.2));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 700;
}

/* IPs en security con monospace */
#seguridad-ip .table tbody td:first-child {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: .75rem;
  color: var(--orange);
}

/* Chart line container mejorado */
.chart-line-container {
  position: relative;
  height: 200px;
  padding: .5rem 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(138, 11, 210, 0.03);
}

.chart-line-svg {
  width: 100%;
  height: 100%;
}

.chart-line-path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-area {
  fill: url(#lineGradient);
  opacity: .3;
}

.chart-line-dot {
  fill: var(--accent);
  stroke: var(--bg);
  stroke-width: 2;
  cursor: pointer;
  transition: all .2s ease;
}

.chart-line-dot:hover {
  r: 6;
  fill: var(--accent-soft);
}

.chart-axis-labels {
  display: flex;
  justify-content: space-between;
  margin-top: .75rem;
  padding: 0 .25rem;
  gap: .25rem;
}

.chart-axis-label {
  font-size: .65rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* REF-IMAGE-THUMB (Solicitudes) */

.ref-image-thumb {
  display: inline-block;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid rgba(138, 11, 210, 0.3);
  transition: all .3s ease;
  background: rgba(138, 11, 210, 0.06);
  position: relative;
  flex-shrink: 0;
}

.ref-image-thumb:hover {
  border-color: var(--accent-soft);
  transform: scale(1.8);
  box-shadow: 0 8px 30px rgba(138, 11, 210, 0.4);
  z-index: 50;
}

.ref-image-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

/* SOLICITUD DETAIL (Modal) */

.solicitud-detail {
  text-align: left;
  color: var(--text-soft);
}

.solicitud-detail .detail-row {
  margin-bottom: .4rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

.solicitud-detail .detail-row:last-child {
  border-bottom: none;
}

.solicitud-detail strong {
  color: var(--accent-soft);
  display: inline;
  margin-right: .5rem;
  font-size: .85rem;
}

.solicitud-detail .detail-image img {
  max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(138, 11, 210, 0.2);
  margin-top: .3rem;
}

.solicitud-detail .detail-url a {
  color: var(--accent-soft);
  word-break: break-all;
}

.solicitud-detail .detail-url a:hover {
  color: var(--accent-bright);
}

/* ── NOX BOT: aviso de nueva versión ── */
.noxbot-update-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.25rem;
  padding: 16px 18px;
  border: 1px solid rgba(255, 214, 10, .55);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 214, 10, .14), rgba(138, 11, 210, .12));
  animation: noxbot-update-in .35s ease-out;
}
.noxbot-update-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffd60a;
  color: #2e0a4a;
  font-size: 1.35rem;
}
.noxbot-update-text { flex: 1; min-width: 0; }
.noxbot-update-text strong { display: block; font-size: 1rem; }
.noxbot-update-text p { margin: 4px 0 0; font-size: .85rem; line-height: 1.5; opacity: .85; }
.noxbot-update-btn { flex: 0 0 auto; white-space: nowrap; }
.nav-badge.noxbot-update-badge { background: #ffd60a; color: #2e0a4a; font-size: .62rem; box-shadow: none; white-space: nowrap; }
@keyframes noxbot-update-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .noxbot-update-banner { flex-wrap: wrap; }
  .noxbot-update-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .noxbot-update-banner { animation: none; } }
body.mc-flat .mc-nav .nav-badge.noxbot-update-badge,
body .nav-item .nav-badge.noxbot-update-badge { background: #ffd60a !important; color: #2e0a4a !important; }

/* ── NOX BOT: licencia y equipos (igual que "Mi cuenta" de la macro) ── */
.noxbot-account { display: grid; gap: 14px; margin-top: 1.25rem; }
.noxbot-account:empty { display: none; }
.noxbot-account-card {
  padding: 18px;
  border: 1px solid rgba(138, 11, 210, .25);
  border-radius: var(--radius-lg);
  background: rgba(138, 11, 210, .06);
}
.noxbot-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.noxbot-account-kicker { font-size: .7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; opacity: .7; }
.noxbot-account-head h3 { margin: 4px 0 0; font-size: 1.15rem; }
.noxbot-account-expiry { text-align: right; }
.noxbot-account-expiry small { display: block; margin-top: 2px; font-size: .78rem; opacity: .75; }
.noxbot-days { font-size: 1.35rem; font-weight: 800; }
.noxbot-days.ok { color: #22c55e; }
.noxbot-days.warn { color: #f59e0b; }
.noxbot-days.danger { color: #ef4444; }
.noxbot-account-devices { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(138, 11, 210, .2); }
.noxbot-devices-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.noxbot-devices-title span { font-size: .8rem; font-weight: 700; opacity: .8; }
.noxbot-devices-help { margin: 4px 0 12px; font-size: .82rem; opacity: .75; }
.noxbot-device {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; margin-top: 8px; border-radius: 10px;
  background: rgba(0, 0, 0, .18); border: 1px solid transparent;
}
.noxbot-device.in-use { border-color: rgba(34, 197, 94, .45); }
.noxbot-device-info { min-width: 0; }
.noxbot-device-info strong { display: block; font-size: .92rem; overflow-wrap: anywhere; }
.noxbot-device-info small { display: block; margin-top: 2px; font-size: .75rem; opacity: .7; }
.noxbot-device-live { margin-left: 6px; color: #22c55e; font-size: .68rem; font-weight: 800; letter-spacing: .5px; }
.noxbot-device-empty { margin: 0; font-size: .85rem; opacity: .75; }
.noxbot-release-btn {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(239, 68, 68, .55); background: transparent; color: #f87171;
  font: 700 .78rem/1 inherit; font-family: inherit;
}
.noxbot-release-btn:hover { background: rgba(239, 68, 68, .12); }
.noxbot-release-btn:disabled { opacity: .6; cursor: wait; }
html[data-theme="light"] .noxbot-device { background: rgba(138, 11, 210, .05); }
@media (max-width: 560px) {
  .noxbot-account-expiry { text-align: left; }
  .noxbot-device { flex-wrap: wrap; }
  .noxbot-release-btn { width: 100%; justify-content: center; }
}

/* ── NOX BOT: celebración de nueva versión (confeti + brillo) ── */
.noxbot-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 99999; overflow: hidden; }
.noxbot-confetti i { position: absolute; top: -24px; left: var(--x); display: block; opacity: 0;
  animation: noxbot-fall var(--d) var(--delay) cubic-bezier(.2,.6,.4,1) forwards; }
@keyframes noxbot-fall {
  0% { transform: translate(0,-24px) rotate(0); opacity: 1; }
  100% { transform: translate(var(--sx), 106vh) rotate(var(--rot)); opacity: .9; }
}
.noxbot-update-banner { position: relative; overflow: hidden; }
.noxbot-update-banner.celebrate { animation: noxbot-pop .6s cubic-bezier(.2,1.3,.4,1); }
@keyframes noxbot-pop {
  0% { transform: scale(.96); } 50% { transform: scale(1.02); } 100% { transform: scale(1); }
}
.noxbot-update-banner::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg); pointer-events: none;
  animation: noxbot-shine 2.4s ease-in-out 1.2s 2;
}
@keyframes noxbot-shine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
.noxbot-update-icon iconify-icon { animation: noxbot-sparkle 1.8s ease-in-out infinite; }
@keyframes noxbot-sparkle {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.18) rotate(-8deg); }
  60% { transform: scale(1.08) rotate(8deg); }
}
@media (prefers-reduced-motion: reduce) {
  .noxbot-confetti { display: none; }
  .noxbot-update-banner.celebrate, .noxbot-update-banner::after, .noxbot-update-icon iconify-icon { animation: none !important; }
}
