*{box-sizing:border-box;margin:0;padding:0}
html{ height:100%; }
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:#f1f4f9;
  color:#1e293b;
  min-height:100%;
  /* Fixed space reserved for the floating header/footer bars, so page
     content never slides underneath them and never causes the bars
     themselves to resize/reflow based on content length. */
  padding-top:calc(64px + env(safe-area-inset-top));
  padding-bottom:calc(74px + env(safe-area-inset-bottom));
}
a{text-decoration:none;color:inherit}
.container{max-width:480px;margin:0 auto;padding:14px}

/* ===== TOPBAR (fixed, full-viewport-width bar; inner content matches
   the same centered column width as the page below it) ===== */
.topbar-fixed{
  position:fixed; top:0; left:0; right:0; z-index:200;
  background:#fff; box-shadow:0 2px 10px rgba(30,41,59,.06);
  padding-top:env(safe-area-inset-top);
}
.topbar{
  max-width:480px; margin:0 auto;
  height:64px; box-sizing:border-box;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 18px;
}
.topbar .icon-btn{
  width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:#eef2ff;color:#3b5bfd;flex:none;
}
.topbar .icon-btn svg{width:20px;height:20px;flex:none}
.topbar .icon-btn.danger{background:#fee2e2;color:#ef4444}
.topbar .brand{font-weight:800;font-size:19px;color:#3b5bfd;letter-spacing:-.3px}

/* ===== PROFILE CARD ===== */
.profile-card{
  background:linear-gradient(135deg,#3b5bfd,#5b7cff);
  border-radius:18px;padding:20px;margin-bottom:14px;color:#fff;
  display:flex;align-items:center;gap:14px;
  box-shadow:0 8px 20px rgba(59,91,253,.25);
}
.profile-card .avatar{
  width:52px;height:52px;border-radius:50%;background:rgba(255,255,255,.25);
  display:flex;align-items:center;justify-content:center;flex:none;
  border:2px solid rgba(255,255,255,.5);
}
.profile-card .avatar svg{width:28px;height:28px}
.profile-card .username{font-weight:800;font-size:16.5px}
.profile-card .phone{font-size:13px;opacity:.85;margin-top:2px}

/* ===== CARD ===== */
.card{
  background:#fff;border-radius:18px;padding:18px;margin-bottom:14px;
  box-shadow:0 2px 10px rgba(30,41,59,.06);
}
.card-title{font-size:13px;font-weight:700;color:#64748b;letter-spacing:.3px;text-transform:uppercase;margin-bottom:10px}
.divider{border:none;border-top:1px dashed #e2e8f0;margin:12px 0}
.row-between{display:flex;align-items:center;justify-content:space-between;gap:10px}
.label-sm{font-size:11.5px;color:#94a3b8;text-transform:uppercase;letter-spacing:.3px}
.value-lg{font-size:16px;font-weight:700;margin-top:2px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:11px 20px;border-radius:12px;font-weight:700;font-size:14px;
  border:none;cursor:pointer;text-decoration:none;
}
.btn-block{width:100%}
.btn-sm{padding:8px 16px;font-size:12.5px;flex:none}
.btn-primary{background:#3b5bfd;color:#fff}
.btn-primary:active{background:#2f4fe0}
.btn-success{background:#16a34a;color:#fff}
.btn-danger{background:#ef4444;color:#fff}
.btn-outline{background:#fff;color:#3b5bfd;border:1.5px solid #3b5bfd}
.btn-light{background:#f1f4f9;color:#334155}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ===== BANNERS ===== */
.banner-warn{
  background:#fff8e1;color:#92700c;border-radius:14px;padding:12px 16px;
  margin-bottom:14px;font-weight:700;font-size:14px;text-align:center;
}
.banner-info{
  background:#fff8e1;color:#7a5c05;border-radius:16px;padding:16px 18px;margin-bottom:14px;
  font-size:13.5px;line-height:1.7;
}
.banner-info b{color:#5c4404}
.banner-support{
  background:linear-gradient(135deg,#1e293b,#334155);border-radius:18px;padding:18px;
  margin-bottom:14px;color:#fff;position:relative;overflow:hidden;
}
.banner-support .title{font-weight:800;font-size:16px;line-height:1.3;margin-bottom:4px}
.banner-support .sub{font-size:12px;opacity:.7;margin-bottom:12px}
.banner-support .btn{background:#f97316}

/* ===== MENU GRID ===== */
.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.menu-item{
  background:#fff;border-radius:16px;padding:20px 10px;text-align:center;
  box-shadow:0 2px 10px rgba(30,41,59,.06);
}
.menu-item .icon{
  width:46px;height:46px;border-radius:50%;background:#eef2ff;color:#3b5bfd;
  display:flex;align-items:center;justify-content:center;margin:0 auto 10px;
}
.menu-item .icon svg{width:22px;height:22px}
.menu-item .label{font-size:13.5px;font-weight:700;color:#334155}

/* ===== BOTTOM NAV (fixed, full-viewport-width bar; inner content
   matches the same centered column width as everything above it) ===== */
.bottom-nav{
  position:fixed;bottom:0;left:0;right:0;background:#fff;
  box-shadow:0 -4px 20px rgba(30,41,59,.08);
  padding-bottom:env(safe-area-inset-bottom);
  z-index:100;
}
.bottom-nav-inner{
  max-width:480px; margin:0 auto;
  height:64px; box-sizing:border-box;
  display:flex;
}
.bottom-nav a{
  flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  color:#94a3b8;font-size:11px;font-weight:600;position:relative;
}
.bottom-nav a svg{width:22px;height:22px;flex:none}
.bottom-nav a.active{color:#3b5bfd}
.bottom-nav a .dot{
  position:absolute;width:8px;height:8px;background:#ef4444;border-radius:50%;
  top:2px;right:calc(50% - 18px);
}

/* ===== FORMS ===== */
.form-group{margin-bottom:14px}
.form-group label{display:block;font-size:13px;font-weight:600;color:#475569;margin-bottom:6px}
.form-group input,.form-group select,.form-group textarea{
  width:100%;padding:12px 14px;border-radius:12px;border:1.5px solid #e2e8f0;
  font-size:14.5px;background:#fff;color:#1e293b;
}
.form-group input:focus,.form-group select:focus{border-color:#3b5bfd;outline:none}

/* ===== MODAL ===== */
.modal-overlay{
  position:fixed;inset:0;background:rgba(15,23,42,.6);z-index:998;
  display:none;align-items:flex-end;justify-content:center;
}
.modal-overlay.open{display:flex}
.modal-box{
  background:#fff;width:100%;max-width:480px;max-height:88vh;overflow-y:auto;
  border-radius:20px 20px 0 0;
}
@media(min-width:520px){
  .modal-overlay{align-items:center}
  .modal-box{border-radius:20px;max-height:85vh}
}
.modal-head{
  background:#3b5bfd;color:#fff;padding:18px;text-align:center;font-weight:800;font-size:16px;
  position:sticky;top:0;
}
.modal-body{padding:20px}

.badge{display:inline-block;padding:5px 12px;border-radius:20px;font-size:11.5px;font-weight:700}
.badge-warn{background:#fff3cd;color:#92700c}
.badge-success{background:#dcfce7;color:#15803d}
.badge-danger{background:#fee2e2;color:#b91c1c}

.pm-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.pm-item{
  border:1.5px solid #e2e8f0;border-radius:14px;padding:16px 8px;text-align:center;
  font-weight:700;font-size:13px;color:#3b5bfd;cursor:pointer;
}
.pm-item:active{background:#f1f4f9}

.empty-state{text-align:center;padding:40px 20px;color:#94a3b8;font-size:13.5px}

.spinner{
  width:22px;height:22px;border:3px solid #e2e8f0;border-top:3px solid #3b5bfd;
  border-radius:50%;animation:spin .8s linear infinite;margin:0 auto;
}
@keyframes spin{to{transform:rotate(360deg)}}

.alert{padding:12px 16px;border-radius:12px;font-size:13.5px;margin-bottom:14px}
.alert-success{background:#dcfce7;color:#15803d}
.alert-danger{background:#fee2e2;color:#b91c1c}
.pay-method-panel{display:none}
