/* =============================================================
   NNpulsa — "Navy" Design System
   Blue palette, PWA-ready, push notification support.
   ============================================================= */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,900;1,500&display=swap');

:root {
  --bg: #0b0914;
  --bg-2: #131022;
  --surface: rgba(23, 18, 38, 0.65);
  --surface-2: rgba(34, 28, 56, 0.75);

  --text: #ffffff;
  --text-soft: #dcdadd;
  --muted: #8d8a96;
  --muted-2: #676472;

  --primary: #8b5cf6;
  --primary-hover: #a78bfa;
  --primary-glow: #c4b5fd;
  --primary-2: #ec4899;
  --primary-soft: rgba(139, 92, 246, 0.15);

  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.15);

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --noise: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

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

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--text);
  font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 800px 600px at 80% -10%, rgba(139, 92, 246, 0.18), transparent),
    radial-gradient(ellipse 700px 500px at 20% 80%, rgba(6, 182, 212, 0.15), transparent),
    var(--noise);
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

h1, h2, h3, h4 { font-family: 'Playfair Display', 'DM Sans', serif; }
h1 { font-weight: 900; letter-spacing: -0.02em; }
h2 { font-weight: 700; letter-spacing: -0.01em; }
h3 { font-weight: 700; }

.app-container {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  background: transparent;
  border-left: 1px solid rgba(255,255,255,0.02);
  border-right: 1px solid rgba(255,255,255,0.02);
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.25rem 0.6rem 1.25rem;
}

.app-logo { height: 28px; object-fit: contain; }

.chat-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  transition: border-color 0.2s;
}
.chat-badge i { color: #4ade80; font-size: 16px; }
.chat-badge:hover { border-color: var(--primary); }

.greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0.35rem 1.25rem 0.85rem 1.25rem;
}
.greeting-title {
  font-size: 18px;
  font-weight: 800;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  line-height: 1.15;
  color: var(--text);
}
.greeting-title span { color: var(--primary); }
.greeting-sub {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.greeting-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.10);
  color: var(--primary-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.balance-wrapper { padding: 0 1.25rem; margin-top: 4px; }

.balance-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.2) 0%, transparent 40%),
    linear-gradient(155deg, #5b21b6 0%, #8b5cf6 50%, #4338ca 100%);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}
.balance-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.5;
  pointer-events: none;
}

.balance-info { position: relative; z-index: 1; min-width: 0; }

.balance-label {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.balance-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  word-break: break-word;
}

.balance-action {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.btn-icon-circle {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.2s, background 0.2s;
}
.btn-icon-circle:hover { background: rgba(255, 255, 255, 0.28); transform: scale(1.05); }

.action-label { font-size: 10px; font-weight: 700; opacity: 0.85; }

.balance-note { margin-top: 8px; font-size: 10px; line-height: 1.5; color: rgba(255,255,255,0.75); }
.balance-note .warn { color: #ffd0a0; font-weight: 700; }

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 1.25rem 2px 1.25rem;
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  position: relative;
}
.quick-action::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
}
.quick-action:active { transform: scale(0.95); }
.quick-action:hover { border-color: var(--primary); background: var(--surface-2); }

.quick-action-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
  position: relative;
  z-index: 1;
}
.quick-action:nth-child(1) .quick-action-icon { background: rgba(139, 92, 246, 0.15); color: var(--primary); }
.quick-action:nth-child(2) .quick-action-icon { background: rgba(74,222,128,0.14); color: var(--success); }
.quick-action:nth-child(3) .quick-action-icon { background: rgba(56,189,248,0.14); color: var(--accent); }
.quick-action:nth-child(4) .quick-action-icon { background: rgba(180,200,220,0.14); color: var(--text-soft); }

.quick-action-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
  position: relative;
  z-index: 1;
}

.promo-banner {
  margin: 14px 1.25rem;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.promo-banner > div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  padding: 16px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}
.promo-banner > div::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.5;
  pointer-events: none;
}
.promo-banner > div::after {
  content: '\f0e7';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: -10px;
  bottom: -14px;
  font-size: 80px;
  color: rgba(255, 255, 255, 0.04);
  transform: rotate(-12deg);
}

.marquee-wrapper {
  margin: 0 1.25rem 18px 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  position: relative;
}
.marquee-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 10px;
}
.marquee-icon { color: var(--warning); font-size: 13px; flex: 0 0 auto; position: relative; z-index: 1; }
.marquee-content {
  overflow: hidden;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  flex: 1;
  position: relative;
  z-index: 1;
}
.marquee-content span { display: inline-block; animation: marquee 20s linear infinite; }
.marquee-content span b { color: var(--primary); font-weight: 700; }

@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  margin: 4px 1.25rem 14px 1.25rem;
  color: var(--text);
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-strong), transparent);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0 1.25rem 24px 1.25rem;
}

.app-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}
.app-grid-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 18px;
}
.app-grid-item:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--surface-2);
}
.app-grid-item.is-pressed { transform: scale(0.95); opacity: 0.85; }

.app-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.06);
}
.app-grid-item:hover .app-icon-box { transform: scale(1.06); }

.icon-blue   { background: linear-gradient(160deg, rgba(120,170,255,0.2), rgba(120,170,255,0.05)); color: #9dc2ff; }
.icon-orange { background: linear-gradient(160deg, rgba(255,150,100,0.2), rgba(255,150,100,0.05)); color: #ffaa70; }
.icon-green  { background: linear-gradient(160deg, rgba(74,222,128,0.2), rgba(74,222,128,0.05)); color: #5ee8aa; }
.icon-purple { background: linear-gradient(160deg, rgba(180,140,255,0.2), rgba(180,140,255,0.05)); color: #c49bff; }
.icon-red    { background: linear-gradient(160deg, rgba(255,120,120,0.2), rgba(255,120,120,0.05)); color: #ff9d9d; }
.icon-warning{ background: linear-gradient(160deg, rgba(255,180,60,0.2), rgba(255,180,60,0.05)); color: #ffd166; }

.app-grid-label {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  color: var(--text-soft);
  position: relative;
  z-index: 1;
}

.trx-list { display: flex; flex-direction: column; gap: 10px; }

.trx-item {
  display: block;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.trx-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 16px;
}
.trx-item:hover { border-color: rgba(139, 92, 246, 0.4); transform: translateY(-1px); }

.trx-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  position: relative;
  z-index: 1;
}
.trx-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trx-status {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
}
.trx-status.success { background: rgba(74,222,128,0.14); color: var(--success); }
.trx-status.pending { background: rgba(251,191,36,0.14); color: var(--warning); }
.trx-status.failed  { background: rgba(248,113,113,0.14); color: var(--danger); }

.trx-item-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  position: relative;
  z-index: 1;
}
.trx-item-target { color: var(--muted); font-weight: 500; }
.trx-item-price { color: var(--text); font-weight: 800; }

.app-bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 456px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 999;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  flex: 1;
  cursor: pointer;
  padding: 6px 0;
  border-radius: 14px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.nav-item i { font-size: 19px; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); }
.nav-item:hover { color: var(--text-soft); }

.nav-fab-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-fab {
  position: absolute;
  top: -28px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 2px solid var(--bg);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  cursor: pointer;
  transition: transform 0.2s;
}
.nav-fab:hover { transform: scale(1.06); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.6);
  filter: brightness(1.06);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-soft);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }

.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}

.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control::placeholder { color: var(--muted-2); }
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-control:hover { border-color: var(--border-strong); }

.alert {
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid transparent;
}
.alert-danger  { background: rgba(248,113,113,0.1);  border-color: rgba(248,113,113,0.2); color: #ffaaaa; }
.alert-success { background: rgba(74,222,128,0.1);  border-color: rgba(74,222,128,0.2); color: #5ee8aa; }
.alert-primary { background: rgba(139, 92, 246, 0.1);  border-color: rgba(139, 92, 246, 0.2); color: var(--primary); }
.alert-warning { background: rgba(251,191,36,0.1);   border-color: rgba(251,191,36,0.2);  color: #ffd166; }

.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.3);
}
.glass-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 18px;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.p-4 { padding: 1rem; }

.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.4rem;
  background: rgba(11, 9, 20, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-success { background: rgba(74,222,128,0.14); color: var(--success); }
.badge-pending { background: rgba(251,191,36,0.14); color: var(--warning); }
.badge-failed  { background: rgba(248,113,113,0.14); color: var(--danger); }

.list-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.list-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 14px;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 18, 0.75);
  backdrop-filter: blur(4px);
  z-index: 2147483000;
  align-items: center;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.modal-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  opacity: 0.4;
  pointer-events: none;
  border-radius: 22px;
}

/* PWA install prompt */
.pwa-install-banner {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  z-index: 1000;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.pwa-install-banner[hidden] { display: none !important; }
.pwa-install-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary); display: grid; place-items: center; color: #fff; font-size: 18px; flex: 0 0 40px; }
.pwa-install-text { flex: 1; font-size: 12px; font-weight: 600; color: var(--text); line-height: 1.4; }
.pwa-install-btn { flex: 0 0 auto; padding: 8px 14px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; border: none; cursor: pointer; }
.pwa-install-dismiss { flex: 0 0 auto; width: 28px; height: 28px; border: none; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }

@media (min-width: 700px) and (max-width: 1023px) {
  .app-container { max-width: 860px; }
  .app-bottom-nav { max-width: 836px; }
  .app-header { padding-left: 2rem; padding-right: 2rem; }
  .balance-wrapper, .quick-actions, .app-grid { padding-left: 2rem; padding-right: 2rem; }
  .promo-banner, .marquee-wrapper, .section-title, .greeting-row { margin-left: 2rem; margin-right: 2rem; }
}

@media (min-width: 1024px) {
  html, body { min-height: 100%; }
  .app-container {
    width: calc(100% - 260px);
    max-width: none;
    min-height: 100vh;
    margin: 0 0 0 260px;
    padding-bottom: 48px !important;
    border: none;
  }
  .app-header { width: 100%; max-width: 1400px; margin: 0 auto; padding: 24px 30px 16px; }
  .app-logo { height: 38px; }
  .chat-badge { padding: 8px 16px; font-size: 13px; }

  .app-bottom-nav {
    top: 0; bottom: 0; left: 0; transform: none;
    width: 260px; max-width: none; height: 100vh;
    flex-direction: column; justify-content: flex-start; align-items: stretch;
    gap: 6px; padding: 28px 16px; border-radius: 0; border: none;
    border-right: 1px solid var(--border);
    background: var(--bg-2);
    box-shadow: 8px 0 40px rgba(0,0,0,0.3);
    overflow-y: auto;
  }
  .app-bottom-nav::before {
    content: 'NNpulsa';
    display: block;
    padding: 4px 14px 26px;
    color: var(--text);
    font-size: 22px;
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.02em;
  }
  .nav-item {
    flex: none; width: 100%; min-height: 48px;
    flex-direction: row; justify-content: flex-start; gap: 13px;
    padding: 0 14px; border-radius: 12px; font-size: 13px;
  }
  .nav-item:hover,
  .nav-item.active { color: var(--primary); background: var(--primary-soft); }
  .nav-item i { width: 22px; font-size: 18px; text-align: center; }
  .nav-fab-wrapper { display: none; }
}

/* =============================================================
   ANIMATIONS
   ============================================================= */

@view-transition { navigation: auto; }

@keyframes nnpFadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.greeting-row, .balance-wrapper, .quick-actions { animation: nnpFadeUp .45s ease-out both; }
.balance-wrapper    { animation-delay: .05s; }
.quick-actions      { animation-delay: .1s; }
.promo-banner       { animation: nnpFadeUp .45s .15s ease-out both; }
.marquee-wrapper    { animation: nnpFadeUp .4s  .18s ease-out both; }
.section-title      { animation: nnpFadeUp .4s  .2s  ease-out both; }
.app-grid           { animation: nnpFadeUp .45s .22s ease-out both; }

.app-grid-item:nth-child(1) { animation: nnpFadeUp .4s .24s ease-out both; }
.app-grid-item:nth-child(2) { animation: nnpFadeUp .4s .28s ease-out both; }
.app-grid-item:nth-child(3) { animation: nnpFadeUp .4s .32s ease-out both; }
.app-grid-item:nth-child(4) { animation: nnpFadeUp .4s .36s ease-out both; }
.app-grid-item:nth-child(5) { animation: nnpFadeUp .4s .30s ease-out both; }
.app-grid-item:nth-child(6) { animation: nnpFadeUp .4s .34s ease-out both; }
.app-grid-item:nth-child(7) { animation: nnpFadeUp .4s .38s ease-out both; }

@keyframes nnpShimmer {
  0%   { left: -60%; }
  100% { left: 120%; }
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 60%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transform: skewX(-20deg);
  z-index: 2;
  animation: nnpShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes nnpBalancePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.02); }
}
.balance-amount { animation: nnpBalancePulse 3s ease-in-out infinite; }

@keyframes nnpFabPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4); }
  50%      { box-shadow: 0 8px 36px rgba(139, 92, 246, 0.7), 0 0 0 8px rgba(139, 92, 246, 0.15); }
}
.nav-fab { animation: nnpFabPulse 2.5s ease-in-out infinite; }

.quick-action:hover .quick-action-icon { animation: nnpBounce .4s ease-out; }
@keyframes nnpBounce {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-6px); }
  60%      { transform: translateY(-2px); }
}

.trx-item:nth-child(1) { animation: nnpFadeUp .35s .1s ease-out both; }
.trx-item:nth-child(2) { animation: nnpFadeUp .35s .15s ease-out both; }
.trx-item:nth-child(3) { animation: nnpFadeUp .35s .2s ease-out both; }
.trx-item:nth-child(4) { animation: nnpFadeUp .35s .25s ease-out both; }
.trx-item:nth-child(5) { animation: nnpFadeUp .35s .3s ease-out both; }

#section-transaksi, #section-akun { animation: nnpFadeUp .35s ease-out both; }

.btn-primary {
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width .6s, height .6s;
}
.btn-primary:active::after { width: 300px; height: 300px; }

.app-grid-item:hover .app-icon-box i { animation: nnpWiggle .5s ease-out; }
@keyframes nnpWiggle {
  0%, 100% { transform: rotate(0); }
  25%      { transform: rotate(-8deg); }
  75%      { transform: rotate(8deg); }
}

@keyframes nnpSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: none; }
}
.alert { animation: nnpSlideDown .3s ease-out both; }

@keyframes nnpStatusPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .7; }
}
.trx-status.pending { animation: nnpStatusPulse 2s ease-in-out infinite; }

@keyframes nnpSkeleton {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200px 100%;
  animation: nnpSkeleton 1.5s ease-in-out infinite;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}