/**
 * Fijate Tools - Gasta la fortuna de Amancio Ortega
 * Hoja de estilos principal (modo claro y oscuro, responsive y componentes interactivos)
 */

:root {
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Colores tema claro (por defecto) */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-color: #e2e8f0;
  --border-focus: #3b82f6;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --primary: #047857;
  /* Verde esmeralda riqueza */
  --primary-hover: #065f46;
  --primary-light: #ecfdf5;
  --primary-border: #a7f3d0;

  --accent-gold: #b45309;
  --accent-gold-bg: #fef3c7;

  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --danger-light: #fef2f2;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --card-shadow-hover: 0 10px 20px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-page: #0b0f17;
  --bg-surface: #131b26;
  --bg-surface-elevated: #1a2434;
  --bg-subtle: #192333;
  --border-color: #243144;
  --border-focus: #60a5fa;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: #064e3b;
  --primary-border: #047857;

  --accent-gold: #f59e0b;
  --accent-gold-bg: #451a03;

  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: #450a0a;

  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --card-shadow-hover: 0 10px 25px -3px rgba(0, 0, 0, 0.6);
}

/* Base obligatoria */
body {
  font-family: var(--font-main);
  background-color: var(--bg-page);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Ocultación accesible estricta para lectores de pantalla */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

h1,
h2,
h3,
h4,
h5,
h6,
.brand-title,
.section-title,
.hero-title,
.fortune-banner-title {
  font-family: var(--font-heading);
}

.mono {
  font-family: var(--font-mono);
}

/* Layout canónico */
.tool-layout {
  max-width: 1200px;
  margin: 1.5rem auto 3rem;
  padding: 0 1rem;
  box-sizing: border-box;
  flex: 1 0 auto;
}

.tool-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

.tool-main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
}

/* Tarjeta contenedora principal */
.card-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2rem;
}

/* ==========================================================================
   STICKY MONEY BAR COMPACTA (DOCK BAJO APP-HEADER A TOP: 56PX)
   ========================================================================== */
.sticky-fortune-wrapper {
  position: sticky;
  top: 56px;
  z-index: 80;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-bottom: 2px solid var(--primary);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.5rem;
  padding: 0.85rem 1.25rem 0.65rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.fortune-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.fortune-balance-col {
  display: flex;
  flex-direction: column;
}

.fortune-balance-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.fortune-balance-number {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fortune-metrics-col {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.fortune-mini-metric {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.metric-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fortune-actions-col {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(4, 120, 87, 0.2);
}

.btn-primary-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.2s ease;
}

.btn-secondary-action:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--border-focus);
}

.btn-danger-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
  transition: all 0.2s ease;
}

.btn-danger-action:hover {
  background: var(--danger-light);
}

/* Barra de progreso visual */
.fortune-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.fortune-progress-bar {
  height: 100%;
  width: 0.2%;
  background: linear-gradient(90deg, #10b981 0%, #059669 60%, #d97706 85%, #dc2626 100%);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fortune-progress-bar.is-warning {
  background: #dc2626;
}

/* ==========================================================================
   RESUMEN ANALÍTICO / BANNER DE IMPACTO
   ========================================================================== */
.analytics-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.analytics-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
}

.analytics-card-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.analytics-card-val {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.fun-equivalence-card {
  grid-column: 1 / -1;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.fun-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.fun-text {
  font-size: 0.92rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin: 0;
}

/* ==========================================================================
   FILTROS Y BUSCADOR
   ========================================================================== */
.toolbar-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.8rem 1rem 0.8rem 2.75rem;
  font-size: 0.95rem;
  font-family: var(--font-main);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  min-height: 44px;
  outline: none;
  transition: all 0.2s ease;
}

.search-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon-inside {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.categories-pills-wrapper {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 36px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.category-pill:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-focus);
}

.category-pill.is-active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 600;
}

/* ==========================================================================
   REJILLA DE ARTÍCULOS Y DISEÑO DE TARJETAS
   ========================================================================== */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--card-shadow);
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
  border-color: #3b82f6;
}

[data-theme="dark"] .item-card:hover {
  border-color: #38bdf8;
}

.item-card.has-purchases {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--card-shadow);
}

.item-icon-box {
  width: 72px;
  height: 72px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.item-card:hover .item-icon-box {
  transform: scale(1.08);
}

.item-card.has-purchases .item-icon-box {
  background: var(--primary-light);
  border-color: var(--primary-border);
}

.item-category-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.item-title {
  font-family: var(--font-heading);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.35rem 0;
  line-height: 1.35;
  min-height: 2.7em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-price-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.item-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0 0 1.25rem 0;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fila de controles de compra y venta */
.item-controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.65rem;
  align-items: center;
}

.btn-action-sell {
  background: var(--bg-subtle);
  color: var(--danger);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  height: 42px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action-sell:hover:not(:disabled) {
  background: var(--danger);
  color: #ffffff;
}

.btn-action-sell:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-color);
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.qty-input-wrapper {
  position: relative;
  width: 100%;
}

.item-qty-input {
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  height: 42px;
  padding: 0 0.25rem;
  outline: none;
}

.item-qty-input:focus {
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.btn-action-buy {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  height: 42px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-action-buy:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-action-buy:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--bg-subtle);
  border-color: var(--border-color);
  color: var(--text-muted);
  transform: none;
}

/* Fila de chips multiplicadores (+10, +100) */
.item-multipliers-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  margin-bottom: 0.75rem;
}

.multipliers-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.btn-multi-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-multi-chip:hover:not(:disabled) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-multi-chip:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Badge inferior de subtotal gastado */
.item-subtotal-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  margin-top: auto;
}

.item-subtotal-badge.is-empty {
  opacity: 0.4;
}

.item-subtotal-val {
  font-weight: 700;
  color: var(--text-primary);
}

.items-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

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

.empty-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
}

.empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   MODAL DE TICKET ESTILO ZARA / INDITEX
   ========================================================================== */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.custom-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.custom-modal-backdrop.is-active .custom-modal-dialog {
  transform: translateY(0);
}

.custom-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.custom-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.custom-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
}

.custom-modal-close:hover {
  background: var(--bg-subtle);
  color: var(--text-primary);
}

.custom-modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.custom-modal-footer {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}

/* Apariencia de papel térmico del ticket */
.receipt-paper {
  background: #faf8f5;
  color: #111827;
  border: 1px solid #e2ded5;
  border-radius: 4px;
  padding: 1.75rem 1.5rem;
  font-family: var(--font-main);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.receipt-header {
  text-align: center;
}

.receipt-brand-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.receipt-brand-sub {
  font-size: 0.75rem;
  color: #4b5563;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.receipt-cif {
  font-size: 0.7rem;
  color: #6b7280;
}

.receipt-separator-dashed {
  border-top: 1.5px dashed #9ca3af;
  margin: 1rem 0;
}

.receipt-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #374151;
  margin-bottom: 0.25rem;
}

.receipt-items-list {
  max-height: 260px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.ticket-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  border-bottom: 1px dotted #e5e7eb;
}

.ticket-item-desc {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.ticket-item-qty {
  font-weight: 700;
  color: #111827;
}

.ticket-item-name {
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-item-total {
  font-weight: 700;
  white-space: nowrap;
}

.receipt-totals {
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.receipt-total-row {
  display: flex;
  justify-content: space-between;
  color: #374151;
}

.receipt-total-row.is-grand-total {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  padding: 0.35rem 0;
  border-top: 1px solid #111827;
  border-bottom: 1px solid #111827;
  margin: 0.25rem 0;
}

.receipt-total-row.is-balance {
  font-weight: 700;
  color: #047857;
  font-size: 0.95rem;
}

.receipt-verdict-box {
  background: #eef2f6;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
  margin: 1.25rem 0;
}

.receipt-verdict-badge {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #1e3a8a;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.receipt-verdict-text {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.4;
}

.receipt-barcode-box {
  text-align: center;
  margin: 1.25rem 0 0.5rem;
}

.receipt-barcode-bars {
  height: 40px;
  background: repeating-linear-gradient(90deg,
      #111827,
      #111827 2px,
      transparent 2px,
      transparent 4px,
      #111827 4px,
      #111827 7px,
      transparent 7px,
      transparent 9px,
      #111827 9px,
      #111827 10px,
      transparent 10px,
      transparent 13px);
  width: 220px;
  margin: 0 auto 0.4rem;
}

.receipt-barcode-digits {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #111827;
}

.receipt-footer-text {
  text-align: center;
  font-size: 0.68rem;
  color: #6b7280;
  line-height: 1.4;
  margin-top: 1rem;
}

/* ==========================================================================
   TOAST DE NOTIFICACIONES
   ========================================================================== */
.app-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

.app-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   GUÍA EXPLICATIVA Y ACORDEÓN FAQ
   ========================================================================== */
.guide-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.guide-hero-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
}

.guide-hero-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.1rem 1.25rem;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   RESPONSIVE DESIGN (MÓVIL Y TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
  .fortune-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .fortune-metrics-col {
    justify-content: space-between;
  }

  .fortune-actions-col {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .tool-layout {
    margin: 1rem auto 2rem;
    padding: 0 0.75rem;
  }

  .sticky-fortune-wrapper {
    top: 56px;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
  }

  .fortune-balance-number {
    font-size: 1.6rem;
  }

  .fortune-actions-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    width: 100%;
  }

  .btn-primary-action,
  .btn-secondary-action,
  .btn-danger-action {
    width: 100%;
    margin-left: 0;
    font-size: 0.8rem;
    padding: 0.45rem 0.6rem;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .custom-modal-footer {
    flex-direction: column;
  }

  .custom-modal-footer button {
    width: 100%;
  }
}