/* =========================================
   WALLET PAGE — Modern Redesign
   MoovTur · 2026 
   ========================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
  --primary: #00bace;
  --primary-dark: #0098a8;
  --primary-light: rgba(0, 186, 206, 0.12);
  --primary-glow: rgba(0, 186, 206, 0.35);
  --text-dark: #111827;
  --text-mid: #374151;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg: #f0f4f8;
  --bg-card: #ffffff;
  --border: rgba(229, 231, 235, 0.8);
  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --purple: #8b5cf6;
  --purple-bg: rgba(139, 92, 246, 0.1);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ---- Base ---- */
body {
  background-color: var(--bg);
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Page Entry Animation ---- */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scalePop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* =========================================
   WALLET CONTAINER
   ========================================= */
.wallet-container {
  max-width: 620px;
  margin: 0 auto;
  padding: 80px 20px 60px;
  min-height: 100vh;
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ---- Back Button ---- */
.wallet-back-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  margin-bottom: 15px;
  letter-spacing: 0.01em;
}

.wallet-back-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
  transform: translateX(-3px);
}

/* =========================================
   BALANCE CARD
   ========================================= */
.balance-card {
  background: linear-gradient(145deg, #00bace 0%, #007a8a 55%, #005c6a 100%);
  color: white;
  padding: 32px 28px 28px;
  border-radius: var(--radius-lg);
  box-shadow:
    0 20px 60px var(--primary-glow),
    0 4px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: scalePop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Decorative blobs */
.balance-card::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -40px;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.balance-card::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -50px;
  width: 260px;
  height: 260px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

/* Floating coin icon decoration */
.balance-card-deco {
  position: absolute;
  top: 22px;
  right: 24px;
  font-size: 52px;
  opacity: 0.08;
  animation: float 4s ease-in-out infinite;
  z-index: 0;
  pointer-events: none;
}

.balance-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
  position: relative;
  z-index: 2;
}

.btn-icon {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  font-size: 14px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.1);
}

.balance-value {
  font-size: 46px;
  font-weight: 800;
  margin: 12px 0 20px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
  z-index: 2;
  letter-spacing: -1px;
  line-height: 1;
}

.balance-value .currency {
  font-size: 22px;
  font-weight: 600;
  opacity: 0.8;
  letter-spacing: 0;
}

.balance-value .value.hidden {
  filter: blur(12px);
  user-select: none;
  cursor: default;
  transition: filter 0.4s ease;
}

.balance-value .value:not(.hidden) {
  filter: blur(0);
  transition: filter 0.4s ease;
}

.balance-info {
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: relative;
  z-index: 2;
  letter-spacing: 0.02em;
}

.balance-info i {
  color: #ffd700;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
}

/* Future Balance Card */
.future-balance-card {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  color: white;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.25);
  animation: scalePop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.future-balance-card .balance-header {
  margin-bottom: 4px;
  opacity: 0.9;
}

.future-balance-card .balance-value {
  font-size: 32px;
  margin: 4px 0 12px;
}

.future-balance-card .balance-info {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  font-size: 11px;
}

/* =========================================
   QUICK ACTIONS
   ========================================= */
.quick-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 32px;
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
  max-width: 130px;
  padding: 20px 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.action-btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  background: var(--primary-light);
}

.action-btn:hover .icon-box {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 24px var(--primary-glow);
  transform: scale(1.1);
}

.icon-box {
  width: 52px;
  height: 52px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn span {
  font-size: 13px;
  color: var(--text-mid);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* =========================================
   STATEMENT SECTION
   ========================================= */
.statement-section {
  animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

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

.statement-section h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.3px;
}

.statement-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.transaction-list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

/* Empty / Loading state */
.loading-text {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.loading-text::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Transaction Item ---- */
.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.transaction-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--primary-light);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.transaction-item:hover::before {
  opacity: 1;
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  transform: none;
}

.transaction-item:active {
  transform: scale(0.99);
}

.trans-left {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.trans-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.transaction-item:hover .trans-icon {
  transform: scale(1.08);
}

/* Icon bg presets - applied via JS inline style */
.trans-icon.icon-in {
  background: var(--success-bg);
  color: var(--success);
}
.trans-icon.icon-out {
  background: #f3f4f6;
  color: var(--text-mid);
}
.trans-icon.icon-pending {
  background: var(--warning-bg);
  color: var(--warning);
}
.trans-icon.icon-bonus {
  background: var(--primary-light);
  color: var(--primary);
}
.trans-icon.icon-refund {
  background: var(--purple-bg);
  color: var(--purple);
}

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

.trans-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trans-info p {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.trans-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  margin-left: 12px;
}

.trans-amount {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.3px;
}

.trans-chevron {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.transaction-item:hover .trans-chevron {
  opacity: 1;
  transform: translateX(2px);
}

.amount-in {
  color: var(--success);
}
.amount-out {
  color: var(--text-dark);
}
.amount-pending {
  color: var(--warning);
}

/* Status inline tags */
.status-pending {
  color: var(--warning);
  font-weight: 600;
}
.status-completed {
  color: var(--success);
  font-weight: 600;
}
.status-cancelled {
  color: var(--danger);
  font-weight: 600;
}

/* =========================================
   MODALS — Shared base
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 14, 22, 0.65) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-content {
  background: var(--bg-card) !important;
  border-radius: 28px 28px 0 0 !important;
  box-shadow: 0 -8px 60px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  border-bottom: none !important;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(40px);
  opacity: 0;
  transition:
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.3s ease;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Pull handle */
.modal-content::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  margin: 14px auto 0;
}

/* Scrollbar inside modal */
.modal-content::-webkit-scrollbar {
  width: 4px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
}
.modal-content::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 4px;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: #f3f4f6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background: #e5e7eb;
  transform: scale(1.1);
}

.modal-header {
  padding: 20px 24px 4px;
  position: relative;
}

.modal-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

.modal-body {
  padding: 16px 24px 24px;
}

/* ---- Form Inputs ---- */
.input-group-modal {
  margin-bottom: 18px;
}

.input-group-modal label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.modal-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  color: var(--text-dark);
  background: #fafafa;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.modal-input:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px var(--primary-light);
}

.modal-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

/* ---- Primary Button ---- */
.btn-pay {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
  box-shadow: 0 6px 24px var(--primary-glow);
  margin-top: 8px;
  position: relative;
  overflow: hidden;
}

.btn-pay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.4s ease,
    height 0.4s ease,
    opacity 0.4s ease;
  opacity: 0;
}

.btn-pay:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px var(--primary-glow);
}

.btn-pay:active::after {
  width: 300px;
  height: 300px;
  opacity: 0;
}

/* =========================================
   RECEIPT / COMPROVANTE MODAL
   ========================================= */
.receipt-details {
  background: #f9fafb;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
  font-size: 14px;
}

.receipt-row:last-child {
  margin-bottom: 0;
}

.receipt-row span:first-child {
  color: var(--text-light);
  font-weight: 500;
  flex-shrink: 0;
}

.receipt-row span:last-child {
  font-weight: 600;
  color: var(--text-dark);
  text-align: right;
  max-width: 60%;
}

.receipt-divider {
  height: 1px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0,
    var(--border) 6px,
    transparent 6px,
    transparent 12px
  );
  margin: 16px 0;
}

.receipt-row.total {
  font-size: 19px;
  margin-bottom: 0;
}

.receipt-row.total span:first-child {
  color: var(--text-mid);
  font-weight: 700;
}

.receipt-row.total span:last-child {
  color: var(--primary);
  font-weight: 800;
}

/* Status badges */
.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}
.status-badge.completed {
  background: var(--success-bg);
  color: var(--success);
}
.status-badge.cancelled {
  background: var(--danger-bg);
  color: var(--danger);
}

/* =========================================
   INFO MODALS (success / suspended)
   ========================================= */
.info-modal-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto 20px;
  font-size: 28px;
  position: relative;
}

.info-modal-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: pulse-ring 1.8s ease-out infinite;
}

.info-modal-icon.success {
  background: var(--success-bg);
  color: var(--success);
}
.info-modal-icon.success::after {
  border: 2px solid var(--success);
}

.info-modal-icon.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.info-modal-icon.danger::after {
  border: 2px solid var(--danger);
}

.info-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: -0.4px;
}

.info-modal-text {
  color: var(--text-light);
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 28px;
  font-weight: 500;
  padding: 0 8px;
}

.btn-pay-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.3);
}

.btn-pay-danger:hover {
  box-shadow: 0 10px 32px rgba(239, 68, 68, 0.4);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-content {
    border-radius: 24px !important;
    max-width: 480px;
    transform: scale(0.95) translateY(0);
  }

  .modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
  }
}

@media (max-width: 480px) {
  .wallet-container {
    padding: 90px 16px 50px;
  }

  .balance-card {
    padding: 26px 20px 22px;
  }

  .balance-value {
    font-size: 38px;
  }

  .action-btn {
    padding: 16px 10px;
    gap: 8px;
  }

  .icon-box {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .transaction-item {
    padding: 16px;
  }

  .trans-info h4 {
    font-size: 13px;
  }

  .trans-amount {
    font-size: 14px;
  }
}
