:root {
  --bg: #eef2fb;
  --card: #ffffff;
  --text: #182035;
  --muted: #6d7891;
  --line: #dbe2f0;
  --primary: #ff6666;
  --primary-strong: #ff4a4a;
  --primary-soft: #ffe6e6;
  --green: #23c788;
  --shadow: 0 14px 32px rgba(35, 49, 83, 0.08);
  --radius: 24px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at top, #f8fbff 0, #eef2fb 45%, #e7edf8 100%);
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 18px 12px;
}

.mobile-app {
  width: min(100%, 460px);
  min-height: calc(100vh - 36px);
  background: linear-gradient(180deg, #f8fbff 0, #eef2fb 35%, #edf2fb 100%);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  padding-bottom: 92px;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #f8fbff 0, #eef2fb 50%, #eef2fb 100%);
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.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: 220px;
  height: 220px;
  left: -70px;
  top: 130px;
  background: radial-gradient(circle, rgba(113, 168, 255, 0.45), rgba(113, 168, 255, 0));
}

.orb-right {
  width: 220px;
  height: 220px;
  right: -40px;
  bottom: 120px;
  background: radial-gradient(circle, rgba(191, 137, 255, 0.35), rgba(191, 137, 255, 0));
}

.login-card {
  width: calc(100% - 44px);
  max-width: 340px;
  padding: 28px 24px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 40px rgba(35, 49, 83, 0.12);
  text-align: center;
  position: relative;
  z-index: 1;
}

.login-card h2 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.login-spinner {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(170, 185, 220, 0.25), 0 8px 18px rgba(65, 84, 123, 0.08);
  position: relative;
}

.login-spinner::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 3px solid #dfe7f8;
  border-top-color: #5a7ef7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.progress-track {
  height: 5px;
  border-radius: 999px;
  background: #dfe3ec;
  overflow: hidden;
}

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

.login-bot {
  position: absolute;
  bottom: 16px;
  color: #394661;
  z-index: 1;
}

.topbar,
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 18px 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
}

.topbar h1,
.admin-header h1 {
  margin: 0;
  font-size: 18px;
}

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

.screen {
  display: none;
  padding: 16px;
}

.screen.active {
  display: block;
}

.hero-card,
.card,
.profile-header,
.topup-banner,
.metric-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  background: linear-gradient(135deg, #fff1f1, #ffffff);
  border: 1px solid #ffd6d6;
}

.hero-card strong,
.profile-summary strong,
.profile-header h2 {
  display: block;
  font-size: 20px;
  color: var(--primary-strong);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 2px 12px;
}

.section-title h2,
.card h2,
.card h3 {
  margin: 0;
}

.accent-bar {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary-strong), #ff9494);
}

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

.field-note {
  margin: -4px 0 10px;
  padding: 12px 14px;
  border: 1px solid #ffd8d8;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  color: #6c7a95;
  font-size: 13px;
  line-height: 1.5;
}

.help-dot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid #cbd6ea;
  color: #5b6784;
  font-size: 12px;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
  color: #45506a;
}

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

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 14px 16px;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: #ff9d9d;
  box-shadow: 0 0 0 4px rgba(255, 102, 102, 0.08);
}

input:disabled {
  background: #f3f6fb;
  color: #8a96af;
  cursor: not-allowed;
}

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

.icon-button,
.pill-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  min-width: 42px;
  height: 42px;
  cursor: pointer;
}

.pill-button {
  padding: 0 16px;
  border-color: #ffd1d1;
}

.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 var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
}

.payment-card.active {
  background: var(--primary-soft);
  border-color: #ff8d8d;
}

.payment-card strong,
.payment-card small {
  display: block;
  margin-top: 6px;
}

.payment-icon {
  font-size: 24px;
}

.rules-card ul {
  margin: 0;
  padding-left: 18px;
  color: #44516b;
}

.suggestion-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.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: 10px;
}

.suggestion-title {
  justify-content: flex-start;
}

.green-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #26c76f;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e3f7e8;
  color: #2ca65c;
  font-size: 12px;
}

.suggestion-processing {
  margin-top: 12px;
  color: #ff6d6d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-ring {
  width: 12px;
  height: 12px;
  border: 2px solid #f7c3c3;
  border-top-color: #ff6666;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

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

.suggestion-body strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.suggestion-body p {
  margin: 0 0 6px;
  color: #55627d;
}

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 20px;
  padding: 16px 18px;
  background: linear-gradient(180deg, #ffa6b1, #f58f9a);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(245, 143, 154, 0.25);
}

.primary-button.small {
  padding: 14px;
  margin-top: 6px;
}

.bottom-nav {
  position: absolute;
  inset: auto 0 0;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(195, 205, 226, 0.7);
  backdrop-filter: blur(10px);
}

.tab {
  border: 0;
  background: transparent;
  padding: 14px 10px 18px;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  color: var(--primary-strong);
  font-weight: 700;
}

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

.order-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow);
}

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

.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

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

.status-pill.processing {
  background: #fff2d7;
  color: #c88400;
}

.status-pill.failed {
  background: #ffe7ea;
  color: #dc4d66;
}

.profile-header {
  text-align: center;
  padding: 26px 20px;
  background: radial-gradient(circle at center top, #dfe8f5 0, #eff4fb 55%, #f9fbff 100%);
}

.avatar {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f7d487, #cc2222);
  color: #fff6bd;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 12px 24px rgba(204, 34, 34, 0.22);
}

.profile-summary .info-row,
.menu-item,
.table-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.menu-item {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(21, 27, 40, 0.35);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(100%, 460px);
  max-height: 90vh;
  overflow: auto;
  background: #f4f7fd;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.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.15), transparent 35%), linear-gradient(135deg, #c91414, #f14141);
}

.topup-banner h4,
.topup-banner p {
  margin: 8px 0 0;
}

.mini-logo {
  width: 54px;
  height: 54px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.18);
}

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

.quick-chip,
.metric-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  text-align: center;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 16px;
  margin: 0 18px 12px;
}

.faq-item strong {
  display: block;
}

.faq-item p {
  margin-bottom: 0;
  color: #536078;
}

.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%);
  }
}

@media (max-width: 480px) {
  .hero-card,
  .payment-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .mobile-app {
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
  }
}
