:root {
  --bg: #000;
  --card: #1a1a1a;
  --card2: #242424;
  --line: #333;
  --text: #fff;
  --muted: #999;
  --accent: #d32f2f;
  --gold: #ffd700;
  --radius: 12px;
  --max-w: 430px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; background: #111; color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
body { display: flex; justify-content: center; overflow: hidden; }
#app {
  width: 100%; max-width: var(--max-w);
  height: 100vh; height: 100dvh;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.page { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.page-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 52px; padding: 0 10px 0 6px; flex-shrink: 0;
  background: #0d0d0d; border-bottom: 1px solid var(--line);
  z-index: 20;
}
.header .back {
  width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.06); color: #fff;
  font-size: 20px; font-weight: 300; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.header .back:active { background: rgba(255,255,255,.12); }
.header h1 {
  font-size: 15px; font-weight: 600; flex: 1; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  padding: 0 4px;
}
.lang-switch {
  display: flex; background: #1f1f1f; border-radius: 20px; padding: 3px;
  border: 1px solid #333; flex-shrink: 0;
}
.lang-switch button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 700; padding: 6px 10px;
  border-radius: 16px; cursor: pointer; transition: all .2s;
  letter-spacing: .02em;
}
.lang-switch button.active {
  background: linear-gradient(135deg, #e53935, #b71c1c);
  color: #fff; box-shadow: 0 2px 8px rgba(211,47,47,.45);
}

.banner-wrap {
  margin: 10px 12px 12px;
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  background: #0d0d0d;
}
.banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.menu-card {
  margin: 0 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.menu-item {
  display: flex; align-items: center; padding: 14px 14px;
  cursor: pointer; border-radius: var(--radius);
  background: linear-gradient(145deg, #222 0%, #1a1a1a 100%);
  border: 1px solid #2a2a2a;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.menu-item:active {
  transform: scale(.98);
  border-color: rgba(211,47,47,.35);
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.menu-item .icon {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; margin-right: 12px;
  background: rgba(0,0,0,.25); border-radius: 10px;
}
.menu-item .icon-img {
  width: 32px; height: 32px; object-fit: contain;
  display: block;
}
.menu-item .icon-fallback { font-size: 20px; }
.menu-item .label { flex: 1; font-size: 14px; font-weight: 500; line-height: 1.35; }
.menu-item .arrow {
  width: 22px; height: 22px; opacity: .55; flex-shrink: 0;
  background: url('/user-support/assets/img/icons/chevron-right.png') center/contain no-repeat;
}

.tips {
  margin: 4px 12px 16px; padding: 14px;
  background: rgba(255,255,255,.04); border-radius: var(--radius);
  border: 1px solid #2a2a2a;
}
.tips h3 { font-size: 14px; margin-bottom: 8px; font-weight: 700; }
.tips p { font-size: 12px; color: var(--muted); line-height: 1.55; }

.footer-bar {
  flex-shrink: 0;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, #000 85%, rgba(0,0,0,.95));
  border-top: 1px solid #1f1f1f;
}
.btn-progress, .btn-primary, .btn-sm {
  width: 100%; height: 50px; border: 0; border-radius: 25px;
  background: linear-gradient(135deg, #ef5350 0%, #c62828 50%, #b71c1c 100%);
  color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(198,40,40,.45), inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .15s, box-shadow .15s;
  letter-spacing: .02em;
}
.btn-progress:active, .btn-primary:active, .btn-sm:active {
  transform: scale(.98);
  box-shadow: 0 2px 8px rgba(198,40,40,.4);
}
.btn-primary:disabled, .btn-progress:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { height: 44px; font-size: 14px; margin-top: 12px; }

.form-page { padding: 12px 16px 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 8px; }
.field label .req { color: var(--accent); margin-right: 4px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px; border-radius: 8px; border: 0;
  background: var(--card); color: #fff; font-size: 14px;
}
.field textarea { min-height: 90px; resize: vertical; }
.field .pw-wrap { position: relative; }
.field .pw-wrap input { padding-right: 44px; }
.field .pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 18px;
}

.upload-box {
  width: 80px; height: 80px; border-radius: 8px; background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; border: 1px dashed #444; overflow: hidden; position: relative;
}
.upload-box img.preview {
  width: 100%; height: 56px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; display: block;
}
.upload-box.has-preview { flex-direction: column; align-items: stretch; height: auto; min-height: 80px; padding: 8px; }
.upload-box.has-preview input[type=file] { position: relative; opacity: 1; height: 32px; width: 100%; }
.upload-box span { font-size: 11px; color: var(--muted); margin-top: 4px; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.tabs {
  display: flex; gap: 8px; margin: 12px;
  padding: 4px; background: #1a1a1a; border-radius: 12px;
}
.tabs button {
  flex: 1; padding: 10px 8px; background: transparent; border: 0;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
  border-radius: 8px; transition: all .2s;
}
.tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #ef5350, #b71c1c);
  box-shadow: 0 2px 8px rgba(198,40,40,.35);
}

.summary { padding: 12px; font-size: 12px; color: var(--muted); }
.summary .total { color: var(--gold); font-weight: 700; }

.tx-card {
  margin: 0 12px 12px; padding: 14px; background: var(--card); border-radius: var(--radius);
}
.tx-card .time { color: var(--accent); font-size: 13px; margin-bottom: 6px; }
.tx-card .order { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tx-card .order .copy { cursor: pointer; color: #f48fb1; }
.tx-card .meta { margin-top: 8px; font-size: 13px; }
.tx-card .meta .amt { color: var(--gold); }
.tx-card .status { margin-top: 6px; font-size: 13px; }
.progress-list { padding: 12px 12px 24px; }
.ticket {
  background: var(--card); border-radius: var(--radius); padding: 14px; margin-bottom: 10px;
}
.ticket .top { display: flex; justify-content: space-between; align-items: center; }
.ticket .type { font-weight: 600; font-size: 14px; }
.ticket .st { font-size: 12px; padding: 3px 8px; border-radius: 999px; }
.ticket .st.Pending, .ticket .st.Processing { background: #3d2a00; color: #ffb74d; }
.ticket .st.Approved { background: #1b3d1b; color: #81c784; }
.ticket .st.Rejected { background: #3d1b1b; color: #e57373; }
.ticket .date { font-size: 11px; color: var(--muted); margin-top: 6px; }
.ticket .reply { margin-top: 8px; font-size: 12px; color: #ccc; background: #111; padding: 8px; border-radius: 8px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }
.toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.9); color: #fff; padding: 10px 16px; border-radius: 8px;
  font-size: 13px; z-index: 100; max-width: 90%; text-align: center;
}
.hidden { display: none !important; }
.loading { text-align: center; padding: 40px; color: var(--muted); }

#app > .loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; min-height: 100dvh;
}
