:root {
  --bg: #050817;
  --bg-soft: #0a1130;
  --panel: rgba(13, 21, 54, 0.86);
  --panel-solid: #101936;
  --line: rgba(91, 129, 255, 0.22);
  --text: #f7fbff;
  --muted: #93a5d1;
  --blue: #4c7bff;
  --blue-soft: #2a4fc9;
  --green: #18c993;
  --cyan: #00d6ff;
  --violet: #8a54ff;
  --amber: #f0ad2c;
  --pink: #ff5bb8;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(43, 84, 203, 0.35), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0, 214, 255, 0.22), transparent 24%),
    linear-gradient(180deg, #08102a 0%, #03050f 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", "Helvetica Neue", sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

button {
  font: inherit;
  cursor: pointer;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  padding: 18px 12px 104px;
  overflow: hidden;
}

.ambient {
  position: absolute;
  inset: auto;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.85;
  pointer-events: none;
}

.ambient-a {
  width: 220px;
  height: 220px;
  top: 76px;
  right: -120px;
  background: radial-gradient(circle, rgba(74, 123, 255, 0.48), transparent 70%);
}

.ambient-b {
  width: 180px;
  height: 180px;
  bottom: 40px;
  right: -80px;
  background: radial-gradient(circle, rgba(138, 84, 255, 0.45), transparent 68%);
}

.topbar,
.screen,
.bottom-nav {
  position: relative;
  z-index: 1;
}

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

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 40px;
  line-height: 1;
}

.topbar-tools {
  display: flex;
  gap: 10px;
}

.icon-pill {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(120, 150, 255, 0.22);
  border-radius: 14px;
  background: rgba(9, 16, 38, 0.78);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(9, 26, 78, 0.3);
}

.dot,
.frame,
.gear {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #c4d7ff;
}

.frame {
  border-radius: 3px;
}

.gear {
  border-style: dashed;
}

.screen {
  display: grid;
  gap: 18px;
}

.tab-pane {
  display: none;
  gap: 18px;
}

.tab-pane.active {
  display: grid;
}

.card {
  background: linear-gradient(180deg, rgba(15, 24, 59, 0.92), rgba(11, 16, 34, 0.94));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.balance-card {
  padding: 20px;
  overflow: hidden;
}

.card-header,
.balance-row,
.action-row,
.section-head,
.profile-hero,
.profile-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.section-kicker {
  color: #9ab8ff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 13px;
  font-weight: 700;
}

.mini-badge {
  min-width: 102px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(41, 75, 163, 0.55);
  border: 1px solid rgba(110, 150, 255, 0.3);
  color: #d6e6ff;
  font-size: 12px;
  text-transform: uppercase;
}

.mini-badge strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.balance-row {
  margin: 24px 0 18px;
  align-items: flex-end;
}

.balance-amount {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.muted {
  color: var(--muted);
  max-width: 220px;
  line-height: 1.45;
}

.metric-box {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(16, 30, 72, 0.72);
  border: 1px solid rgba(117, 149, 255, 0.22);
  min-width: 110px;
}

.metric-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.metric-box strong {
  font-size: 26px;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.action-btn {
  border: 0;
  border-radius: 16px;
  padding: 15px 10px;
  font-weight: 700;
  color: white;
  transition: transform 180ms ease, filter 180ms ease;
}

.action-btn:hover,
.nav-item:hover,
.service-card:hover,
.module-card:hover,
.order-card:hover,
.link-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.action-blue {
  background: linear-gradient(135deg, #4f7dff, #3755db);
}

.action-green {
  background: linear-gradient(135deg, #16c88d, #16997a);
}

.action-violet {
  background: linear-gradient(135deg, #8e5dff, #6544f2);
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 18px;
}

.stats-strip article {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 6px 4px;
}

.stats-strip article + article {
  border-left: 1px solid rgba(128, 144, 184, 0.18);
}

.stats-strip span,
.order-card span,
.profile-meta span {
  color: var(--muted);
  font-size: 13px;
}

.stats-strip strong {
  font-size: 22px;
}

.promo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 172, 34, 0.45);
  background: linear-gradient(135deg, rgba(255, 154, 26, 0.26), rgba(85, 26, 105, 0.22));
  box-shadow: var(--shadow);
}

.promo-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffb62a, #ff8d1e);
  color: #221005;
  font-size: 26px;
  font-weight: 800;
}

.promo-card p {
  margin-top: 6px;
  color: #ffe8be;
  line-height: 1.45;
}

.section-head h2 {
  font-size: 32px;
}

.link-btn {
  background: transparent;
  border: 0;
  color: #8bb2ff;
  font-weight: 700;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.service-card,
.module-card,
.order-card {
  background: linear-gradient(180deg, rgba(17, 27, 64, 0.9), rgba(8, 12, 29, 0.92));
  border: 1px solid rgba(83, 111, 208, 0.24);
  border-radius: 24px;
  transition: transform 180ms ease, filter 180ms ease;
}

.service-card {
  padding: 14px 10px 12px;
  text-align: center;
}

.service-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 12px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(7, 16, 43, 0.88);
  border: 1px solid rgba(111, 145, 255, 0.18);
}

.tone-blue {
  color: #8ab0ff;
  box-shadow: 0 0 24px rgba(76, 123, 255, 0.15) inset;
}

.tone-cyan {
  color: #76e9ff;
  box-shadow: 0 0 24px rgba(0, 214, 255, 0.14) inset;
}

.tone-violet {
  color: #c49fff;
  box-shadow: 0 0 24px rgba(138, 84, 255, 0.14) inset;
}

.tone-green {
  color: #74ffc6;
  box-shadow: 0 0 24px rgba(24, 201, 147, 0.16) inset;
}

.tone-amber {
  color: #ffd27d;
  box-shadow: 0 0 24px rgba(240, 173, 44, 0.14) inset;
}

.tone-pink {
  color: #ff8ccf;
  box-shadow: 0 0 24px rgba(255, 91, 184, 0.14) inset;
}

.service-card h3 {
  font-size: 15px;
  margin-bottom: 6px;
}

.service-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  min-height: 34px;
}

.service-card .quick-btn,
.module-card .quick-btn {
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(53, 89, 191, 0.18);
  color: #d9e4ff;
  width: 100%;
}

.module-list,
.orders-panel,
.profile-card {
  padding: 18px;
}

.module-list,
.orders-panel {
  display: grid;
  gap: 14px;
}

.module-card,
.order-card {
  padding: 16px;
}

.module-card h3,
.order-card h3 {
  margin-bottom: 8px;
}

.module-card p,
.order-card p,
.profile-note {
  color: var(--muted);
  line-height: 1.5;
}

.card-topline,
.order-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(40, 69, 152, 0.28);
  border: 1px solid rgba(127, 155, 255, 0.2);
  color: #dbe7ff;
  font-size: 12px;
  text-transform: uppercase;
}

.profile-hero {
  justify-content: flex-start;
  margin-bottom: 18px;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4f7dff, #8d57ff);
  font-size: 28px;
  font-weight: 800;
}

.profile-meta {
  align-items: stretch;
  margin-bottom: 18px;
}

.profile-meta article {
  flex: 1;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(8, 14, 34, 0.72);
  border: 1px solid rgba(99, 130, 229, 0.2);
}

.profile-meta strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 480px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px;
  background: rgba(7, 10, 24, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(103, 137, 240, 0.14);
}

.nav-item {
  min-height: 58px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: transparent;
  color: #8b9aba;
  font-weight: 700;
}

.nav-item.active {
  color: white;
  background: linear-gradient(180deg, rgba(34, 61, 143, 0.42), rgba(16, 25, 55, 0.76));
  border-color: rgba(91, 129, 255, 0.24);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%) translateY(18px);
  width: min(88%, 380px);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(15, 24, 59, 0.94);
  border: 1px solid rgba(91, 129, 255, 0.28);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 10;
}

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

.hidden {
  display: none !important;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 19, 0.76);
  backdrop-filter: blur(8px);
  z-index: 12;
}

.action-sheet {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 460px);
  max-height: calc(100vh - 36px);
  padding: 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 23, 58, 0.98), rgba(8, 12, 28, 0.98));
  border: 1px solid rgba(100, 132, 232, 0.26);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  z-index: 13;
  overflow: auto;
}

.sheet-header,
.sheet-card-header,
.key-value,
.field-inline,
.inline-actions,
.history-card-top,
.history-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.sheet-close,
.secondary-btn,
.ghost-btn,
.danger-btn,
.primary-btn {
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 700;
}

.sheet-close,
.ghost-btn {
  background: rgba(43, 69, 149, 0.18);
  color: #dce7ff;
}

.secondary-btn {
  min-width: 92px;
  background: rgba(76, 123, 255, 0.22);
  color: white;
}

.primary-btn {
  width: 100%;
  background: linear-gradient(135deg, #4f7dff, #3651cf);
  color: white;
}

.danger-btn {
  background: rgba(255, 86, 106, 0.16);
  color: #ffd3da;
}

.sheet-card,
.sheet-balance,
.sheet-result,
.history-card,
.bank-option {
  background: rgba(10, 18, 45, 0.82);
  border: 1px solid rgba(104, 135, 240, 0.2);
  border-radius: 20px;
}

.sheet-card,
.sheet-balance,
.sheet-result,
.sheet-history,
.sheet-form {
  margin-top: 16px;
}

.sheet-card,
.sheet-balance,
.sheet-result,
.history-card {
  padding: 16px;
}

.sheet-card p,
.sheet-result p,
.field-note,
.history-card p {
  margin-top: 8px;
}

.sheet-balance strong {
  font-size: 28px;
}

.sheet-form {
  display: grid;
  gap: 14px;
}

.field-label {
  display: block;
  font-size: 13px;
  color: #aac2fb;
  font-weight: 700;
}

.field-input,
.field-picker {
  width: 100%;
  border: 1px solid rgba(104, 135, 240, 0.22);
  border-radius: 16px;
  background: rgba(7, 13, 32, 0.82);
  color: white;
  padding: 14px 16px;
}

.field-input:disabled {
  opacity: 0.8;
  color: #dce7ff;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-inline {
  display: grid;
  grid-template-columns: 1fr auto;
}

.field-note {
  color: var(--muted);
  line-height: 1.45;
}

.sheet-result-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}

.qr-box {
  display: grid;
  place-items: center;
  background: white;
  border-radius: 20px;
  min-height: 140px;
  padding: 10px;
}

.qr-box img {
  width: 100%;
  height: auto;
  display: block;
}

.sheet-result-meta {
  display: grid;
  gap: 12px;
}

.key-value {
  align-items: baseline;
}

.key-value span {
  color: var(--muted);
  font-size: 13px;
}

.key-value strong {
  text-align: right;
  word-break: break-word;
}

.inline-actions {
  margin-top: 14px;
}

.selected-bank-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.selected-bank-chip img,
.bank-option img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 999px;
  background: white;
  padding: 2px;
}

.bank-picker-menu {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
}

.bank-option {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  color: white;
}

.bank-option div {
  display: grid;
  gap: 4px;
}

.bank-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chip-soft {
  background: rgba(84, 133, 255, 0.16);
}

.history-card {
  margin-top: 12px;
}

.history-card strong {
  display: block;
  margin-top: 12px;
}

.history-card-bottom {
  margin-top: 10px;
  color: #dce7ff;
  font-size: 13px;
}

.reveal {
  animation: rise 480ms ease both;
}

.delay-1 {
  animation-delay: 60ms;
}

.delay-2 {
  animation-delay: 120ms;
}

.delay-3 {
  animation-delay: 180ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 400px) {
  .action-row,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .sheet-result-grid,
  .field-inline {
    grid-template-columns: 1fr;
  }

  .section-head h2 {
    font-size: 26px;
  }

  .balance-amount {
    font-size: 40px;
  }
}
