/*
 * ============================================
 * UbahPulsa — Reusable Components
 * Buttons, cards, badges, alerts, form inputs,
 * bottom sheet, drawer, toast, etc.
 * ============================================
 */

/* ===== Gradient Buttons ===== */
.btn-gradient-primary {
  background: linear-gradient(135deg, #F5B400 0%, #F39A00 100%);
  box-shadow: 0 8px 30px rgba(245, 180, 0, 0.2);
  color: #fff;
  border: none;
}

.btn-gradient-primary:hover,
.btn-gradient-primary:focus {
  color: #fff;
  box-shadow: 0 10px 35px rgba(245, 180, 0, 0.3);
}

.btn-gradient-primary:active {
  transform: scale(0.98);
  box-shadow: 0 4px 15px rgba(245, 180, 0, 0.15);
}

.btn-gradient-green {
  background: linear-gradient(135deg, #16a34a, #15803d);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
  color: #fff;
  border: none;
}

.btn-gradient-green:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.4);
  color: #fff;
}

/* ===== Header Gradient Wave ===== */
.header-gradient {
  background: linear-gradient(135deg, #2F2F2F 0%, #1A1A1A 100%);
  position: relative;
}

.header-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(245, 180, 0, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

/* ===== Balance Card Glass ===== */
.balance-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.balance-glass::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .03);
}

/* ===== Promo Card ===== */
.promo-gradient {
  background: linear-gradient(135deg, #2F2F2F 0%, #1A1A1A 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== Bottom Sheet ===== */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.bottom-sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 680px;
  margin: 0 auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 1050;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  overflow-y: auto;
}

.bottom-sheet.open {
  transform: translateY(0);
}

/* ===== Drawer Menu ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(2px);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85%;
  background: #fff;
  z-index: 1050;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow-y: auto;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
}

.drawer-menu.open {
  transform: translateX(0);
}

/* ===== Toast Notification ===== */
.toast-notification {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2f2f2f, #1a1a1a);
  border: 1px solid rgba(245, 180, 0, 0.2);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 9999;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  animation: fadeSlide 0.3s ease;
  max-width: 90%;
}

/* ===== Form Focus Ring ===== */
.form-input-focus:focus {
  border-color: #f5b400;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 180, 0, 0.08);
  outline: none;
}

/* ===== Rate Tab Active ===== */
.rate-tab-active {
  background: var(--color-primary-50);
  border-color: var(--color-primary-400);
  color: var(--color-primary-700);
  box-shadow: 0 2px 8px rgba(245, 180, 0, 0.1);
}

/* ===== Invoice / Status Colors ===== */
.status-pending  { background: #fffbeb; }
.status-success  { background: #ecfdf5; }
.status-failed   { background: #fef2f2; }
.status-process  { background: #eff6ff; }
.status-refund   { background: #f5f3ff; }

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-tab {
  flex: 1;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid #e3ecf8;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
}

.filter-tab:hover {
  border-color: #fcd34d;
}

.filter-tab--active {
  background: #f5b400;
  border-color: #f5b400;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 180, 0, 0.2);
}

/* ===== Transaction List ===== */
.trx-list-full {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.transaction-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #f1f5f9;
  transition: background 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.01);
}

.transaction-item:active {
  background: #f4f6fa;
}

.trx-logo-img {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.trx-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.trx-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
}

.trx-detail {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

.trx-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.trx-status {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.trx-status--success { background: #dcfce7; color: #22c55e; }
.trx-status--pending { background: #fef9c3; color: #eab308; }
.trx-status--failed  { background: #fee2e2; color: #ef4444; }
.trx-status--process { background: #fffbeb; color: #d97706; }

.trx-date {
  font-size: 0.62rem;
  color: #94a3b8;
  white-space: nowrap;
}

.trx-arrow {
  font-size: 0.7rem;
  color: #cbd5e1;
  margin-left: 4px;
}

/* ===== Empty State ===== */
.trx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  color: #94a3b8;
}

.trx-empty i {
  font-size: 3rem;
  opacity: 0.5;
}

.trx-empty p {
  font-size: 0.88rem;
  font-weight: 600;
}

/* ===== Info Cards ===== */
.info-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.info-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-card-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.info-card-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

/* ===== Stats Row ===== */
.stats-row {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #fff;
  border-radius: 24px;
  padding: 20px 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  margin-bottom: 22px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-primary-500);
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: #e3ecf8;
}

/* ===== Menu List ===== */
.menu-section {
  margin-bottom: 14px;
}

.menu-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 10px;
  padding-left: 4px;
}

.menu-list {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  transition: background 0.15s;
  border-bottom: 1px solid #f4f6fa;
}

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

.menu-item:active {
  background: #f4f6fa;
}

.menu-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-primary-50);
  color: var(--color-primary-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.menu-item-label {
  flex: 1;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
}

.menu-item-arrow {
  font-size: 0.72rem;
  color: #cbd5e1;
}

/* Danger / Logout */
.menu-item--danger .menu-item-label {
  color: #ef4444;
}

.menu-item-icon--danger {
  background: #fee2e2;
  color: #ef4444;
}

.app-version {
  text-align: center;
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 8px;
  margin-bottom: 10px;
}

/* ===== Bottom Spacer ===== */
.bottom-spacer {
  height: 85px;
}
