/* ====== BRACKET WEB - MOBILE FIRST ====== */

:root {
  --bg: #0d0a14;
  --bg-card: #17121f;
  --bg-input: #1e1729;
  --bg-hover: #281f36;
  --border: #342745;
  --border-focus: #a855f7;
  --text: #f3eefb;
  --text-secondary: #c4b5d9;
  --text-muted: #7c6b94;
  --accent: #a855f7;
  --accent-hover: #c084fc;
  --accent-soft: rgba(168, 85, 247, 0.15);
  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.1);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --danger: #f472b6;
  --danger-bg: rgba(244, 114, 182, 0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow: 0 2px 12px rgba(0,0,0,0.3);
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:active { color: var(--accent-hover); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ====== NAVBAR ====== */

.navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  height: 56px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-brand a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  padding: 8px;
}

.nav-brand a svg { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav-link:active {
  background: var(--bg-hover);
  color: var(--accent);
}

.nav-admin { color: var(--accent); }
.nav-logout { color: var(--text-muted); }

/* ====== CONTAINER ====== */

.container {
  padding: 16px 16px 80px 16px;
  max-width: 480px;
  margin: 0 auto;
}

/* ====== PAGE HEADER ====== */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.page-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 1;
}

.back-link {
  display: flex;
  align-items: center;
  color: var(--text-secondary);
  padding: 4px;
}

.credits-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* ====== BUTTONS ====== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  -webkit-appearance: none;
}

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

.btn-primary:active { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-outline:active { background: var(--accent-soft); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-danger:active { background: var(--danger); color: #fff; }

.btn-success { background: var(--success-bg); color: var(--success); }
.btn-warning { background: var(--warning-bg); color: var(--warning); }

.btn-disabled {
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn-full { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 0.95rem; }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-xs { padding: 5px 10px; font-size: 0.75rem; border-radius: var(--radius-sm); }

.btn-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.btn-icon:active { color: var(--text); background: var(--bg-hover); }
.btn-icon.btn-danger:active { color: var(--danger); }
.btn-icon.btn-copy { color: var(--accent); padding: 4px; }

.inline-form { display: inline; }

/* ====== FORMS ====== */

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.label-note {
  font-weight: 400;
  color: var(--accent);
  text-transform: none;
  margin-left: 8px;
}

.file-input {
  padding: 10px !important;
  font-size: 0.85rem !important;
}

.current-image {
  margin-bottom: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 120px;
}

.current-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ====== ALERTS ====== */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }
.alert-success { background: var(--success-bg); color: var(--success); }

/* ====== AUTH PAGES ====== */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 85dvh;
  padding: 20px 0;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-header h2 {
  margin-top: 12px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ====== HOME PAGE ====== */

.home-page {
  text-align: center;
  padding-top: 24px;
  position: relative;
}

/* Glow de fondo */
.home-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 340px;
  max-width: 90vw;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.22) 0%, transparent 65%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 5s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.home-hero {
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.home-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 24px;
  perspective: 800px;
}

/* Anillo giratorio alrededor del logo */
.logo-ring {
  position: absolute;
  width: 224px;
  height: 224px;
  max-width: 70vw;
  max-height: 70vw;
  border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-right-color: rgba(192, 132, 252, 0.5);
  animation: ringSpin 6s linear infinite;
  pointer-events: none;
}

@keyframes ringSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.home-logo {
  width: 200px;
  height: 200px;
  max-width: 62vw;
  max-height: 62vw;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 0 0 2px rgba(168, 85, 247, 0.35),
    0 12px 40px rgba(168, 85, 247, 0.28),
    0 20px 60px rgba(0, 0, 0, 0.55);
  animation: logoLevitate 4s ease-in-out infinite;
  will-change: transform;
}

@keyframes logoLevitate {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow:
      0 0 0 2px rgba(168, 85, 247, 0.35),
      0 12px 40px rgba(168, 85, 247, 0.28),
      0 20px 60px rgba(0, 0, 0, 0.55);
  }
  50% {
    transform: translateY(-16px) scale(1.02);
    box-shadow:
      0 0 0 2px rgba(168, 85, 247, 0.5),
      0 24px 55px rgba(168, 85, 247, 0.38),
      0 34px 80px rgba(0, 0, 0, 0.45);
  }
}

.home-logo-wrap::after {
  content: "";
  position: absolute;
  bottom: -16px;
  width: 130px;
  height: 18px;
  background: radial-gradient(ellipse, rgba(168, 85, 247, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: logoShadow 4s ease-in-out infinite;
  z-index: -1;
}

@keyframes logoShadow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(0.8); opacity: 0.3; }
}

/* Badge premium */
.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.home-page h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(168, 85, 247, 0.3);
}

.home-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 24px;
  font-weight: 500;
}

.home-subtitle .accent-text {
  color: var(--accent);
  font-weight: 700;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
}

.home-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(40, 31, 54, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: rgba(168, 85, 247, 0.4);
}

.feature-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.feature-text h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Stats */
.home-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.stat-num {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ====== PRODUCTS GRID ====== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.product-card:active { border-color: var(--accent); }

.product-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-input);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-info {
  padding: 10px;
}

.product-title {
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.product-stock {
  font-size: 0.7rem;
  color: var(--success);
  font-weight: 500;
}

.product-stock.out-of-stock {
  color: var(--danger);
}

/* ====== CART ====== */

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.qty-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
}

.qty-btn:active { background: var(--bg-hover); }
.qty-btn:disabled { color: var(--text-muted); }

.qty-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 600;
}

.total-amount {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 1.1rem;
}

/* ====== PROFILE ====== */

.profile-section {
  margin-bottom: 20px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.profile-avatar {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.profile-avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-upload-btn {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 26px;
  height: 26px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  border: 2px solid var(--bg-card);
}

.profile-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.profile-email {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.profile-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

/* ====== PURCHASE LIST ====== */

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

.purchase-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.purchase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.purchase-product {
  font-weight: 600;
  font-size: 0.85rem;
}

.purchase-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

.purchase-data {
  margin-bottom: 6px;
}

.data-content {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.data-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
  word-break: break-all;
}

.purchase-date {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ====== SUCCESS PAGE ====== */

.success-page {
  text-align: center;
  padding-top: 30px;
}

.success-icon {
  margin-bottom: 14px;
}

.success-page h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.success-total {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.purchased-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.purchased-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.purchased-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.purchased-product { font-weight: 600; font-size: 0.85rem; }
.purchased-price { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }

.purchased-message {
  font-size: 0.8rem;
  color: var(--success);
  background: var(--success-bg);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.purchased-data { margin-top: 6px; }

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

.success-actions .btn { flex: 1; }

/* ====== ERROR PAGE ====== */

.error-page {
  text-align: center;
  padding-top: 60px;
}

.error-page h2 {
  margin: 14px 0 8px;
  font-size: 1.25rem;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

/* ====== EMPTY STATE ====== */

.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-state.small { padding: 24px 16px; }

.empty-state p {
  color: var(--text-muted);
  margin: 12px 0 16px;
  font-size: 0.9rem;
}

/* ====== PRODUCT DETAIL ====== */

.product-detail { padding-top: 8px; }

.product-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  margin-bottom: 18px;
}

.detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
}

.detail-info h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.detail-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 6px;
}

.detail-extra {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.detail-price {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.detail-stock {
  font-size: 0.85rem;
  color: var(--success);
  font-weight: 500;
}

.detail-stock.out-of-stock { color: var(--danger); }

/* ====== ADMIN ====== */

.admin-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
}

.stat-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  color: var(--text);
  transition: all var(--transition);
}

.admin-menu-item:active {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.admin-menu-item span { flex: 1; font-weight: 500; font-size: 0.9rem; }

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

.admin-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
}

.admin-item-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
}

.admin-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-item-info {
  flex: 1;
  min-width: 0;
}

.admin-item-info h4 {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-item-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.admin-item-meta .divider { color: var(--text-muted); }
.status-active { color: var(--success); }
.status-inactive { color: var(--danger); }

.admin-item-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.admin-form {
  margin-top: 4px;
}

/* ====== ADMIN USERS ====== */

.user-item {
  flex-wrap: wrap;
}

.user-info-block {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.user-avatar-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info-block h4 {
  font-size: 0.85rem;
  font-weight: 600;
}

.user-email-sm {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.user-credits-sm {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.credits-form {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.credits-input {
  width: 80px;
  padding: 6px 8px !important;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.credits-btns {
  display: flex;
  gap: 3px;
}

/* ====== PURCHASE LOG (ADMIN) ====== */

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

.log-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.log-product { font-weight: 600; font-size: 0.85rem; }
.log-price { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }

.log-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.log-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.log-row svg { flex-shrink: 0; margin-top: 1px; }

.log-data {
  font-family: var(--font-mono);
  color: var(--text);
  word-break: break-all;
}

/* ====== FOOTER ====== */

.footer {
  text-align: center;
  padding: 16px;
  padding-bottom: 72px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ====== UTILITIES ====== */

.copied-toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: #000;
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 700;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 1.5s forwards;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copied-toast svg {
  flex-shrink: 0;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ====== CART BADGE (navbar) ====== */
.nav-cart-link {
  position: relative;
}

.nav-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  padding: 0 2px;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.6), 0 1px 2px rgba(0,0,0,0.5);
  animation: cartPulse 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes cartPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.75;
  }
}

/* Animación al agregar un item (bump) */
.nav-cart-badge.bump {
  animation: cartBump 0.4s ease;
}

@keyframes cartBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}
