:root {
  --bg: #edf2fb;
  --bg-deep: #dfe8fb;
  --bg-soft: #f8fbff;
  --surface: rgba(255, 255, 255, 0.52);
  --surface-strong: rgba(255, 255, 255, 0.72);
  --surface-soft: rgba(255, 255, 255, 0.34);
  --line: rgba(255, 255, 255, 0.58);
  --line-deep: rgba(150, 167, 208, 0.28);
  --text: #15203d;
  --text-soft: #5f6d90;
  --text-faint: #8b97b5;
  --primary: #ff667f;
  --primary-strong: #ff4d72;
  --primary-soft: rgba(255, 102, 127, 0.12);
  --green: #2ac982;
  --green-soft: rgba(42, 201, 130, 0.14);
  --amber: #f3a336;
  --amber-soft: rgba(243, 163, 54, 0.14);
  --danger: #f35d78;
  --danger-soft: rgba(243, 93, 120, 0.14);
  --shadow: 0 24px 60px rgba(48, 74, 128, 0.16);
  --shadow-soft: 0 12px 28px rgba(73, 93, 140, 0.12);
  --radius: 28px;
  --radius-md: 22px;
  --radius-sm: 18px;
  --font: "SF Pro Display", "SF Pro Text", "PingFang SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --app-height: 100vh;
  --glass-blur: blur(26px) saturate(180%);
}

.form-error {
  color: var(--danger-strong);
  font-size: 13px;
  background: var(--danger-soft);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  text-align: center;
}
.form-error.hidden {
  display: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: var(--app-height);
}

body {
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at 14% 18%, rgba(139, 183, 255, 0.44), transparent 28%),
    radial-gradient(circle at 82% 24%, rgba(255, 173, 199, 0.34), transparent 26%),
    radial-gradient(circle at 74% 76%, rgba(192, 171, 255, 0.28), transparent 24%),
    linear-gradient(180deg, #f7faff 0%, #eef3ff 42%, #e6edfb 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    radial-gradient(circle at center top, rgba(255, 255, 255, 0.55), transparent 42%);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: var(--app-height);
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.mobile-app {
  width: min(100%, 460px);
  min-height: var(--app-height);
  height: var(--app-height);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12));
  box-shadow: 0 30px 90px rgba(34, 56, 102, 0.2);
}

.mobile-app::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(115, 170, 255, 0.2), transparent 24%),
    radial-gradient(circle at 88% 28%, rgba(255, 152, 190, 0.2), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.12));
  pointer-events: none;
}

.app-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.login-overlay {
  position: fixed;
  top: 0;
  left: 50%;
  width: min(100%, 460px);
  height: var(--app-height);
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(121, 174, 255, 0.24), transparent 26%),
    radial-gradient(circle at 80% 72%, rgba(196, 164, 255, 0.18), transparent 24%),
    linear-gradient(180deg, rgba(244, 248, 255, 0.9), rgba(232, 239, 252, 0.82));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.orb-left {
  width: 240px;
  height: 240px;
  left: -72px;
  top: 132px;
  background: radial-gradient(circle, rgba(116, 170, 255, 0.5), rgba(116, 170, 255, 0));
}

.orb-right {
  width: 220px;
  height: 220px;
  right: -36px;
  bottom: 112px;
  background: radial-gradient(circle, rgba(202, 152, 255, 0.34), rgba(202, 152, 255, 0));
}

.login-card,
.hero-card,
.card,
.profile-header,
.topup-banner,
.metric-card,
.order-card,
.faq-item,
.modal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-soft);
}

.login-card {
  width: calc(100% - 48px);
  max-width: 348px;
  padding: 30px 24px 22px;
  border-radius: 32px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-card::before,
.hero-card::before,
.card::before,
.profile-header::before,
.order-card::before,
.modal-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.login-card h2 {
  margin: 16px 0 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--text-soft);
  line-height: 1.55;
}

.login-spinner {
  width: 62px;
  height: 62px;
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.6), 0 10px 20px rgba(95, 118, 164, 0.12);
  position: relative;
}

.login-spinner::before {
  content: "";
  position: absolute;
  inset: 15px;
  border: 3px solid rgba(187, 201, 233, 0.9);
  border-top-color: #6990ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(207, 216, 236, 0.72);
  overflow: hidden;
}

.progress-bar {
  width: 30%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7bd0ff, #7296ff);
  animation: progressPulse 1.4s ease-in-out infinite;
}

.login-bot {
  position: absolute;
  bottom: 22px;
  color: rgba(48, 65, 102, 0.8);
  z-index: 1;
  font-size: 14px;
}

.topbar,
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 12px;
  position: sticky;
  top: 0;
  z-index: 12;
  background: linear-gradient(180deg, rgba(242, 246, 255, 0.88), rgba(242, 246, 255, 0.56));
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.topbar h1,
.admin-header h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.topbar p,
.admin-header p,
.section-title p,
.eyebrow,
.muted {
  margin: 4px 0 0;
  color: var(--text-soft);
}

.profile-header p {
  font-size: 13px;
  color: #55627d;
  background: rgba(255, 255, 255, 0.5);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  margin: 6px auto 0;
  display: inline-block;
}

.topbar p {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.52);
  font-size: 13px;
}

.screen {
  display: none;
  padding: 16px 16px 126px;
  min-height: 100%;
  animation: screenFade 0.22s ease;
}

.screen.active {
  display: block;
}

.hero-card,
.card,
.profile-header,
.topup-banner,
.metric-card,
.order-card {
  border-radius: var(--radius);
  position: relative;
}

.hero-card {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hero-card .hero-stats {
  display: flex;
  flex: 1;
  align-items: center;
  position: relative;
}

.hero-card .hero-stats .stat-item {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-card .hero-stats::after {
  content: "";
  width: 1px;
  height: 24px;
  background: var(--line);
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.hero-card .eyebrow,
.profile-summary .eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
}

.hero-card strong,
.profile-summary strong,
.profile-header h2 {
  display: block;
  font-size: 20px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: #1f2b4c;
  font-weight: 700;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 4px 14px;
}

.section-title h2,
.card h2,
.card h3 {
  margin: 0;
  font-size: 31px;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-title p {
  font-size: 14px;
}

.accent-bar {
  width: 7px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5777, #ff97a8);
  box-shadow: 0 8px 18px rgba(255, 95, 124, 0.3);
}

.card {
  padding: 18px;
  margin-bottom: 16px;
}

.card > * {
  position: relative;
  z-index: 1;
}

.field-note {
  margin: -2px 0 10px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 163, 177, 0.26);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.32);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.55;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.label-row label {
  margin-bottom: 0;
}

.help-toggle {
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.34);
  color: var(--text-soft);
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.help-toggle.active {
  color: var(--primary-strong);
  border-color: rgba(255, 118, 147, 0.4);
  background: rgba(255, 255, 255, 0.56);
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: rgba(31, 43, 76, 0.85);
  font-weight: 600;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.42);
  color: var(--text);
  border-radius: 20px;
  padding: 16px 18px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.44);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-faint);
}

input:focus,
textarea:focus {
  border-color: rgba(255, 118, 147, 0.56);
  box-shadow: 0 0 0 4px rgba(255, 103, 128, 0.09), 0 12px 24px rgba(81, 104, 152, 0.08);
  transform: translateY(-1px);
}

input:disabled {
  background: rgba(255, 255, 255, 0.24);
  color: #8a96af;
  cursor: not-allowed;
}

.suffix {
  font-weight: 700;
  color: #374054;
}

.icon-button,
.pill-button,
.quick-chip {
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 10px 22px rgba(84, 103, 148, 0.08);
  cursor: pointer;
  color: var(--text);
}

.icon-button {
  min-width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
}

.copy-target {
  position: relative;
  min-width: 46px;
  width: 46px;
  padding: 0;
  color: transparent;
}

.copy-target::before,
.copy-target::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 14px;
  border: 1.8px solid #97a2b8;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
}

.copy-target::before {
  transform: translate(2px, -2px);
}

.copy-target::after {
  transform: translate(-2px, 2px);
}

.copy-target:active::before,
.copy-target:active::after,
.copy-target:hover::before,
.copy-target:hover::after {
  border-color: #7f8aa1;
}

.pill-button {
  padding: 0 18px;
  min-height: 44px;
  font-weight: 700;
}

#nav-topup,
#profile-topup {
  background: linear-gradient(180deg, rgba(255, 111, 141, 0.96), rgba(255, 93, 127, 0.92));
  color: #fff;
  border-color: rgba(255, 160, 184, 0.42);
  box-shadow: 0 16px 32px rgba(255, 93, 127, 0.24);
}

.payment-grid,
.quick-grid,
.metrics-grid,
.admin-grid.two-col {
  display: grid;
  gap: 12px;
}

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

.payment-card {
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(18px) saturate(175%);
  -webkit-backdrop-filter: blur(18px) saturate(175%);
  padding: 18px 16px 16px;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42), 0 12px 28px rgba(70, 92, 142, 0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.payment-card.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 224, 231, 0.64));
  border-color: rgba(255, 112, 144, 0.4);
  box-shadow: 0 20px 36px rgba(255, 103, 132, 0.14);
  transform: translateY(-2px);
}

.payment-card strong,
.payment-card small {
  display: block;
}

.payment-card strong {
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -0.03em;
}

.payment-card small {
  margin-top: 6px;
  color: var(--text-soft);
  line-height: 1.45;
}

.payment-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  font-size: 0;
}

.payment-card[data-settlement="FREE"] .payment-icon::before {
  content: "🎁";
  font-size: 20px;
}

.payment-card[data-settlement="BALANCE"] .payment-icon::before {
  content: "💳";
  font-size: 19px;
}

.suggestion-card {
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  padding: 11px 12px;
  margin-bottom: 14px;
}

.suggestion-card.collapsed .suggestion-body,
.suggestion-card.collapsed .suggestion-processing {
  display: none;
}

.suggestion-head,
.suggestion-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.suggestion-title {
  justify-content: flex-start;
  font-weight: 700;
  font-size: 13px;
}

.green-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #29ca80;
  box-shadow: 0 0 0 4px rgba(41, 202, 128, 0.14);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: #2ca65c;
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.52);
}

.suggestion-processing {
  margin-top: 8px;
  color: var(--primary-strong);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.loading-ring {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(247, 195, 195, 0.84);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.suggestion-body {
  margin-top: 8px;
}

.suggestion-body strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.suggestion-body p {
  margin: 0 0 4px;
  color: #55627d;
  font-size: 12px;
  line-height: 1.45;
}

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 22px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #ff9bb0, #f97895);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  box-shadow: 0 18px 36px rgba(244, 112, 139, 0.3);
  cursor: pointer;
  transition: all 0.25s ease;
  position: sticky;
  bottom: 12px;
  z-index: 10;
}

.primary-button:disabled {
  background: rgba(200, 200, 200, 0.8);
  color: #888;
  box-shadow: none;
  cursor: not-allowed;
}

#submit-order {
  margin-top: 18px;
}

.primary-button.small {
  padding: 15px 18px;
  margin-top: 8px;
}

.bottom-nav {
  flex-shrink: 0;
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 14px calc(env(safe-area-inset-bottom, 0px) + 8px);
  background: linear-gradient(180deg, rgba(242, 246, 255, 0.48), rgba(242, 246, 255, 0.84));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}

.tab {
  background: transparent;
  border: 0;
  min-height: 50px;
  padding: 6px 10px 4px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  border-radius: 16px;
  transition: all 0.25s ease;
}

.tab::before {
  font-size: 18px;
  line-height: 1;
}

#tab-energy::before {
  content: "⚡";
}

#tab-orders::before {
  content: "📋";
}

#tab-profile::before {
  content: "👤";
}

.tab.active {
  color: var(--primary-strong);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stack {
  display: grid;
  gap: 14px;
}

.order-card {
  border-radius: 26px;
  padding: 20px;
  position: relative;
  background: rgba(255, 255, 255, 0.45);
}

.order-card > * {
  position: relative;
  z-index: 1;
}

.order-header,
.summary-row,
.info-row,
.table-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.order-header {
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding-bottom: 12px;
}

.order-header strong {
  font-size: 16px;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: #1f2b4c;
}

.summary-row {
  margin-bottom: 12px;
  align-items: center;
}

.summary-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}

.summary-type {
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 600;
}

.info-row,
.table-row {
  font-size: 13px;
  color: var(--text-soft);
  padding: 10px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
  align-items: center;
}

.info-row:last-child,
.table-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-row span:last-child,
.table-row span:last-child {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-pill {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.54);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.status-pill.completed {
  background: var(--green-soft);
  color: #1f9e61;
}

.status-pill.processing {
  background: var(--amber-soft);
  color: #b67813;
}

.status-pill.failed {
  background: var(--danger-soft);
  color: #d24c6b;
}

.profile-header {
  text-align: center;
  padding: 32px 20px 24px;
  overflow: hidden;
  border-radius: 28px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
  position: relative;
}

.profile-header::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: -54px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6), transparent 70%);
}

.profile-header > * {
  position: relative;
  z-index: 1;
}

.avatar {
  width: 92px;
  height: 92px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 247, 199, 0.84), transparent 26%),
    linear-gradient(135deg, #f7d487, #d73f5b 52%, #9432ff);
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 22px 40px rgba(160, 68, 125, 0.24);
  border: 2px solid rgba(255, 255, 255, 0.64);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.avatar.has-image {
  background-color: rgba(255, 255, 255, 0.7);
}

.profile-summary {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 26px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
}

.profile-summary .summary-row {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.menu-list {
  background: rgba(255, 255, 255, 0.45);
  border-radius: 26px;
  padding: 8px 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 24px rgba(149, 157, 165, 0.1);
}

.profile-summary .info-row,
.menu-item {
  padding: 16px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
}

.profile-summary .info-row:last-child,
.menu-item:last-child {
  border-bottom: none;
}

.menu-item {
  width: 100%;
  background: transparent;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: #1f2b4c;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
}

.menu-item span:last-child {
  color: #a0aabf;
  font-size: 14px;
}

.menu-item span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.menu-item span:first-child::before {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  opacity: 0.92;
  font-size: 18px;
}

#menu-topup span:first-child::before {
  content: "💳";
}

#menu-support span:first-child::before {
  content: "💬";
}

#menu-faq span:first-child::before {
  content: "❔";
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(26, 34, 56, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(100%, 460px);
  max-height: 90vh;
  overflow: auto;
  border-radius: 30px;
  position: relative;
}

.modal-card > * {
  position: relative;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.topup-banner {
  margin: 0 18px 18px;
  padding: 24px 20px;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(135deg, #d32029, #e53935);
}

.topup-banner h4 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
}

.topup-banner p {
  margin: 0;
  font-size: 13px;
  opacity: 0.9;
  line-height: 1.4;
}

.mini-logo {
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.36);
}

.quick-grid {
  grid-template-columns: repeat(5, 1fr);
  margin-bottom: 14px;
}

.topup-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px 24px;
}

.topup-header-bar h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.topup-header-bar .icon-button {
  background: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 1px solid rgba(0,0,0,0.05);
}

.topup-input-card {
  margin-top: -20px;
}

.row-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.row-layout::-webkit-scrollbar {
  display: none;
}

.row-layout .quick-btn {
  flex: 0 0 auto;
  width: 60px;
  padding: 10px 0;
}

.warning-card {
  background: #fffdf5;
  border-color: rgba(255, 171, 0, 0.2);
}

.warning-title {
  color: #d48806;
  font-weight: 600;
  margin: 0 0 12px;
  font-size: 14px;
}

.warning-list {
  margin: 0;
  padding: 0 0 0 16px;
  color: #666;
  font-size: 13px;
  line-height: 1.6;
}

.warning-list li {
  margin-bottom: 6px;
}

.countdown-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.countdown-timer {
  background: #d32029;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 16px;
  font-weight: bold;
  letter-spacing: 2px;
}

.qr-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.qr-info-left {
  flex: 1;
}

.highlight-text {
  font-size: 28px;
  color: #d32029;
  display: block;
  margin: 4px 0 12px;
}

.qr-info-right {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.qr-placeholder {
  width: 120px;
  height: 120px;
  background: #fff;
  border: 1px solid #eee;
  padding: 4px;
}

.qr-hint {
  font-size: 11px;
  color: #999;
  margin: 8px 0 0;
}

.address-card {
  margin-bottom: 12px;
}

.address-copy-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 12px;
}

.mono-text {
  font-family: monospace;
  word-break: break-all;
  font-size: 13px;
  color: #333;
  line-height: 1.4;
}

.history-list {
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 12px;
}

.history-id {
  color: #666;
  font-family: monospace;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}

.status-timeout {
  background: #fff1f0;
  color: #cf1322;
}

.status-badge.completed {
  background: var(--green-soft);
  color: #1f9e61;
}

.status-badge.processing {
  background: var(--amber-soft);
  color: #b67813;
}

.history-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
}

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

.history-label {
  color: #999;
}

.history-value {
  color: #333;
}

.history-amount {
  font-weight: bold;
  font-size: 15px;
}

.quick-chip,
.metric-card {
  padding: 12px;
  text-align: center;
  color: var(--text);
}

.faq-item {
  padding: 16px 16px;
  margin: 0 18px 12px;
  border-radius: 22px;
}

.faq-item strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.faq-item p {
  margin: 0;
  color: #536078;
  line-height: 1.6;
}

.admin-body {
  padding: 24px;
}

.admin-layout {
  max-width: 1320px;
  margin: 0 auto;
}

.metrics-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 18px 0;
}

.admin-grid.two-col {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.table-like {
  display: grid;
  gap: 8px;
}

.table-like.compact .table-row {
  font-size: 13px;
}

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

@keyframes progressPulse {
  0% {
    transform: translateX(-10%);
  }
  50% {
    transform: translateX(150%);
  }
  100% {
    transform: translateX(260%);
  }
}

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

@media (max-width: 480px) {
  .quick-grid:not(.row-layout) {
    grid-template-columns: 1fr;
  }

  .section-title h2,
  .card h2,
  .card h3 {
    font-size: 27px;
  }

  .mobile-app {
    width: 100%;
    height: var(--app-height);
    border-radius: 0;
  }

}

@media (min-width: 481px) {
  .app-shell {
    padding: 18px 12px;
  }

  .mobile-app {
    min-height: calc(var(--app-height) - 36px);
    height: calc(var(--app-height) - 36px);
    border-radius: 30px;
  }

  .login-overlay {
    top: 18px;
    height: calc(var(--app-height) - 36px);
  }
}
