/* =========================================================
   法务通 · 律师工作台
   Dependency-free stylesheet
   ========================================================= */

:root {
  --ink: #0d2026;
  --ink-2: #27424a;
  --ink-3: #3c565e;
  --muted: #60757c;
  --muted-2: #8b9ba0;
  --teal: #0f766e;
  --teal-strong: #0b5d56;
  --teal-deep: #093f3b;
  --teal-soft: #e9f7f4;
  --teal-line: #c8e8e1;
  --bg: #f5f8f7;
  --surface: #ffffff;
  --surface-2: #fbfdfc;
  --line: #e2eae8;
  --line-strong: #cfdbd8;
  --success: #067647;
  --success-soft: #ecfdf3;
  --success-line: #abefc6;
  --warning: #a15c07;
  --warning-soft: #fffaeb;
  --warning-line: #fedf89;
  --danger: #b42318;
  --danger-strong: #912018;
  --danger-soft: #fef3f2;
  --danger-line: #fecdca;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --info-line: #b2ddff;
  --shadow-sm: 0 1px 2px rgba(13, 32, 38, 0.05);
  --shadow-md: 0 16px 40px -18px rgba(13, 32, 38, 0.22);
  --shadow-lg: 0 32px 80px -24px rgba(9, 42, 40, 0.32);
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue",
    Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

a {
  color: var(--teal);
  text-decoration: none;
}

a:hover {
  color: var(--teal-strong);
}

img,
svg {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

::selection {
  background: #b7e6dd;
  color: var(--teal-deep);
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  color: #fff;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
}

.nowrap {
  white-space: nowrap;
}

/* =========================================================
   Spinner & buttons
   ========================================================= */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border: 2px solid rgba(15, 118, 110, 0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-xs {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

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

.btn {
  --btn-bg: #fff;
  --btn-color: var(--ink);
  --btn-border: var(--line-strong);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  transition: background-color 0.16s ease, border-color 0.16s ease,
    color 0.16s ease, box-shadow 0.16s ease, transform 0.06s ease;
}

.btn:hover {
  color: var(--btn-color);
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  --btn-bg: var(--teal);
  --btn-color: #fff;
  --btn-border: var(--teal);
  box-shadow: 0 1px 2px rgba(9, 63, 59, 0.22);
}

.btn-primary:hover {
  --btn-bg: var(--teal-strong);
  --btn-border: var(--teal-strong);
}

.btn-outline {
  --btn-bg: #fff;
  --btn-color: var(--ink-2);
  --btn-border: var(--line-strong);
}

.btn-outline:hover {
  --btn-bg: #f6faf9;
  --btn-border: #b9cbc7;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-color: var(--muted);
  --btn-border: transparent;
}

.btn-ghost:hover {
  --btn-bg: #eef4f2;
  --btn-color: var(--ink-2);
}

.btn-danger {
  --btn-bg: var(--danger);
  --btn-color: #fff;
  --btn-border: var(--danger);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-sm .icon {
  width: 15px;
  height: 15px;
}

.btn-lg {
  height: 48px;
  padding: 0 22px;
  font-size: 15px;
  border-radius: 11px;
}

.btn-block {
  width: 100%;
}

.btn.is-loading,
.btn:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-outline .btn-spinner,
.btn-ghost .btn-spinner {
  border-color: rgba(15, 118, 110, 0.22);
  border-top-color: var(--teal);
}

.btn.is-loading .btn-spinner {
  display: inline-block;
}

.btn.is-loading {
  pointer-events: none;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  background: #eef4f2;
  color: var(--ink);
}

.icon-btn .icon {
  width: 18px;
  height: 18px;
}

.inline-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.inline-link:hover {
  color: var(--teal-strong);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
}

.text-link .icon {
  width: 14px;
  height: 14px;
}

.text-link:hover .icon {
  transform: translateX(2px);
}

/* =========================================================
   Forms
   ========================================================= */

.field {
  margin-bottom: 18px;
}

.field > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
}

.field-hint {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.45;
}

input,
textarea,
select {
  width: 100%;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
textarea,
select {
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease;
}

textarea {
  height: auto;
  padding: 12px 14px;
  line-height: 1.65;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #9dadaa;
}

input:hover:not(:disabled),
textarea:hover:not(:disabled),
select:hover:not(:disabled) {
  border-color: #b9cbc7;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

input:disabled,
textarea:disabled,
select:disabled {
  background: #f3f6f5;
  color: var(--muted-2);
  cursor: not-allowed;
}

input.is-invalid,
textarea.is-invalid,
select.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.09);
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.input-shell {
  display: flex;
  align-items: center;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-shell:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.input-shell.has-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.09);
}

.input-shell .input-prefix {
  flex: 0 0 auto;
  padding: 0 12px 0 14px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.input-shell input {
  height: 100%;
  min-width: 0;
  padding: 0 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.input-shell input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.code-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.code-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.send-code-btn {
  flex: 0 0 128px;
  width: 128px;
  height: 46px;
  font-size: 13px;
  padding: 0 8px;
}

.password-row {
  position: relative;
}

.password-row input {
  padding-right: 62px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-width: 44px;
  height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.password-toggle:hover {
  background: #eef4f2;
  color: var(--ink-2);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 2px 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"].is-invalid {
  outline: 2px solid var(--danger);
  outline-offset: 1px;
}

.field-terms {
  margin-top: 2px;
  margin-bottom: 16px;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--danger-strong);
  font-size: 13px;
  line-height: 1.55;
}

.form-alert .icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

/* =========================================================
   Boot screen
   ========================================================= */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
}

.boot-screen .brand-mark {
  margin-bottom: 4px;
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 400;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

/* =========================================================
   Auth / login
   ========================================================= */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.94fr);
  min-height: 100vh;
  background: var(--bg);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  overflow: hidden;
  padding: clamp(32px, 5vw, 64px) clamp(32px, 6vw, 88px);
  background:
    radial-gradient(900px 600px at 110% -10%, rgba(52, 211, 190, 0.22), transparent 62%),
    radial-gradient(700px 500px at -20% 110%, rgba(13, 148, 136, 0.26), transparent 60%),
    linear-gradient(155deg, #0a2426 0%, #0c3433 48%, #0d4b45 100%);
  color: #fff;
}

.auth-aside::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.035),
    0 0 0 140px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 62%);
  opacity: 0.28;
  pointer-events: none;
}

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

.auth-aside-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand-name {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.35;
}

.auth-brand-sub {
  color: rgba(230, 250, 246, 0.58);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.auth-brand-name-dark {
  color: var(--ink);
}

.auth-brand-sub-dark {
  color: var(--muted);
}

.auth-copy {
  max-width: 520px;
  margin-top: auto;
  padding-top: 40px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #b9ece3;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.auth-copy h1 {
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.auth-lead {
  max-width: 420px;
  margin-top: 22px;
  color: rgba(226, 247, 243, 0.68);
  font-size: 14.5px;
  line-height: 1.85;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 8px;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(235, 251, 248, 0.82);
  font-size: 13.5px;
}

.auth-point-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid rgba(178, 240, 230, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #9fe4d8;
}

.auth-point-icon .icon {
  width: 13px;
  height: 13px;
}

.auth-aside-foot {
  margin-top: auto;
  padding-top: 24px;
  color: rgba(226, 247, 243, 0.38);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  background:
    radial-gradient(600px 380px at 100% 0%, rgba(15, 118, 110, 0.055), transparent 70%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 448px;
  padding: clamp(26px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 60px -30px rgba(13, 42, 40, 0.28), var(--shadow-sm);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  margin-bottom: 26px;
}

.auth-card-head h2 {
  font-size: 26px;
  letter-spacing: -0.02em;
}

.auth-card-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13.5px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin: 26px 0 22px;
  padding: 4px;
  border-radius: 11px;
  background: #f1f5f4;
}

.auth-tab {
  flex: 1 1 0;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease,
    box-shadow 0.15s ease;
}

.auth-tab:hover {
  color: var(--ink-2);
}

.auth-tab.is-active {
  background: #fff;
  color: var(--teal-strong);
  box-shadow: 0 1px 2px rgba(13, 32, 38, 0.1);
}

.auth-footnote {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.6;
  text-align: center;
}

.terms-version {
  margin-top: 6px;
  color: #aab7b4;
  font-size: 11px;
  text-align: center;
}

.terms-version span {
  font-family: var(--mono);
}

/* =========================================================
   Brand
   ========================================================= */

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--teal);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 6px rgba(9, 63, 59, 0.2);
}

.brand-mark-invert {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  color: #d9f7f1;
}

.brand-mark-lg {
  width: 52px;
  height: 52px;
  flex-basis: 52px;
  border-radius: 15px;
  font-size: 26px;
}

/* =========================================================
   App shell
   ========================================================= */

.shell {
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  color: var(--ink);
}

.brand:hover {
  color: var(--ink);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.35;
}

.brand-sub {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 12px 12px 7px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--ink-3);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.nav a .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: color 0.14s ease;
}

.nav a:hover {
  background: #f2f7f5;
  color: var(--ink);
}

.nav a:hover .icon {
  color: var(--ink-3);
}

.nav a.is-active {
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-weight: 600;
}

.nav a.is-active .icon {
  color: var(--teal);
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
}

.sidebar-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--muted);
}

.sidebar-note .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--teal);
}

.sidebar-note strong {
  display: block;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
}

.sidebar-note p {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.main-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 13px clamp(18px, 4vw, 40px);
  border-bottom: 1px solid rgba(226, 234, 232, 0.82);
  background: rgba(245, 248, 247, 0.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.topbar-title {
  min-width: 0;
}

.eyebrow {
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.topbar-title h1 {
  margin-top: 1px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 13px;
  font-weight: 700;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.user-meta strong {
  max-width: 140px;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta span {
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.view {
  width: 100%;
  max-width: 1240px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  padding: clamp(20px, 3.2vw, 38px) clamp(18px, 4vw, 40px) 56px;
}

/* =========================================================
   Shared surfaces
   ========================================================= */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: clamp(18px, 2.4vw, 24px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 2.4vw, 24px);
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
  font-size: 15.5px;
  font-weight: 700;
}

.card-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.card-body {
  padding: clamp(18px, 2.4vw, 24px);
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-heading h2 {
  font-size: 23px;
  letter-spacing: -0.02em;
}

.page-heading p {
  max-width: 620px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.page-heading-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.section-title h3 {
  font-size: 15.5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.85;
}

.badge-neutral {
  border-color: #e0e7e5;
  background: #f4f7f6;
  color: #5c6e73;
}

.badge-success {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  border-color: var(--warning-line);
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-danger {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: var(--info);
}

.badge-teal {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.65;
}

.alert .icon {
  width: 17px;
  height: 17px;
  margin-top: 2px;
}

.alert strong {
  display: block;
  margin-bottom: 1px;
  color: var(--ink-2);
  font-size: 13px;
}

.alert p {
  color: inherit;
}

.alert-error {
  border-color: var(--danger-line);
  background: var(--danger-soft);
  color: var(--danger-strong);
}

.alert-error strong {
  color: var(--danger-strong);
}

.alert-warning {
  border-color: var(--warning-line);
  background: var(--warning-soft);
  color: #7a4a08;
}

.alert-warning strong {
  color: #7a4a08;
}

.alert-info {
  border-color: var(--info-line);
  background: var(--info-soft);
  color: #175cd3;
}

.alert-info strong {
  color: #175cd3;
}

.alert-success {
  border-color: var(--success-line);
  background: var(--success-soft);
  color: #05603a;
}

.alert-success strong {
  color: #05603a;
}

.alert-actions {
  margin-top: 8px;
}

.alert-actions .btn {
  height: 32px;
  font-size: 12.5px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 46px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted-2);
}

.empty-icon .icon {
  width: 22px;
  height: 22px;
}

.empty strong {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

.empty p {
  max-width: 360px;
  font-size: 12.5px;
  line-height: 1.7;
}

.empty .btn {
  margin-top: 8px;
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #eef3f2 25%, #f8fbfa 37%, #eef3f2 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

.skeleton-line {
  height: 12px;
}

.skeleton-line-lg {
  height: 30px;
}

.skeleton-card {
  height: 128px;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* =========================================================
   Overview
   ========================================================= */

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-intro h2 {
  margin-top: 4px;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.page-intro p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.quick-actions {
  display: flex;
  gap: 8px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px 18px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.stat-card:hover {
  border-color: #d3e0dd;
  box-shadow: 0 8px 24px -18px rgba(13, 32, 38, 0.3);
}

.stat-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--teal-line);
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
}

.stat-icon .icon {
  width: 17px;
  height: 17px;
}

.stat-value {
  min-height: 42px;
  margin-top: 14px;
  color: var(--ink);
  font-size: clamp(25px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-value small {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

.stat-sub {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.stat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #edf2f1;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.recent-card {
  min-width: 0;
  overflow: hidden;
}

.quick-card {
  padding: 20px;
}

.quick-card h3 {
  margin-bottom: 4px;
  font-size: 15.5px;
}

.quick-card > p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.quick-list {
  display: flex;
  flex-direction: column;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 4px;
  border-top: 1px solid #eef3f2;
  color: var(--ink-2);
}

.quick-link:first-child {
  border-top: 0;
}

.quick-link:hover {
  color: var(--teal-strong);
}

.quick-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  background: #f2f7f6;
  color: var(--muted);
}

.quick-link:hover .quick-link-icon {
  background: var(--teal-soft);
  color: var(--teal);
}

.quick-link-icon .icon {
  width: 15px;
  height: 15px;
}

.quick-link-text {
  flex: 1;
  min-width: 0;
}

.quick-link-text strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}

.quick-link-text span {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 11px;
}

.quick-link > .icon {
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

/* =========================================================
   Tables
   ========================================================= */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.data-table th {
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 20px;
  border-bottom: 1px solid #eef3f2;
  color: var(--ink-3);
  font-size: 13px;
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr[data-order-id] {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.data-table tbody tr[data-order-id]:hover {
  background: #f7fbfa;
}

.data-table tbody tr[data-order-id]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: -2px;
}

.td-main {
  color: var(--ink);
  font-weight: 600;
}

.td-sub {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.td-amount {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.td-date {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.td-actions {
  text-align: right;
  white-space: nowrap;
}

.table-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--teal);
  font-size: 12.5px;
  font-weight: 600;
}

.table-link:hover {
  color: var(--teal-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.amount-pos {
  color: var(--success);
}

.amount-neg {
  color: var(--danger);
}

.row-product {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fdfefe;
  flex-wrap: wrap;
}

.pager-info {
  color: var(--muted);
  font-size: 12px;
}

.pager-info strong {
  color: var(--ink-2);
  font-weight: 600;
}

.pager-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pager-btn:hover {
  border-color: #b9cbc7;
  background: #f8fbfa;
  color: var(--ink);
}

.pager-btn .icon {
  width: 14px;
  height: 14px;
}

.pager-btn.is-disabled,
.pager-btn.is-disabled:hover {
  border-color: var(--line);
  background: #f7f9f8;
  color: #b3c0bd;
  cursor: not-allowed;
}

.pager-page {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding: 0 3px;
}

/* =========================================================
   Wallet
   ========================================================= */

.wallet-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid #124f49;
  border-radius: var(--radius);
  background:
    radial-gradient(700px 300px at 105% -20%, rgba(45, 212, 191, 0.24), transparent 64%),
    linear-gradient(140deg, #0b2b2d 0%, #0c3f3b 58%, #0f5a52 100%);
  color: #fff;
  box-shadow: 0 20px 45px -28px rgba(9, 63, 59, 0.7);
}

.wallet-hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255, 255, 255, 0.035),
    0 0 0 92px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

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

.wallet-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(223, 248, 243, 0.68);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.wallet-label .icon {
  width: 15px;
  height: 15px;
}

.wallet-balance {
  margin-top: 8px;
  color: #fff;
  font-size: clamp(34px, 4.2vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.wallet-balance small {
  margin-left: 6px;
  color: rgba(223, 248, 243, 0.6);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.wallet-sub {
  margin-top: 7px;
  color: rgba(223, 248, 243, 0.62);
  font-size: 12px;
}

.wallet-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  text-align: right;
}

.wallet-tier {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(165, 243, 230, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c9f4ec;
  font-size: 11.5px;
  font-weight: 600;
}

.wallet-tier .icon {
  width: 13px;
  height: 13px;
}

.wallet-side .btn {
  --btn-bg: rgba(255, 255, 255, 0.1);
  --btn-color: #fff;
  --btn-border: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(4px);
}

.wallet-side .btn:hover {
  --btn-bg: rgba(255, 255, 255, 0.16);
  --btn-color: #fff;
}

.wallet-table-card {
  overflow: hidden;
}

.wallet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ledger-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-3);
  font-size: 11.5px;
  white-space: nowrap;
}

/* =========================================================
   Recharge
   ========================================================= */

.recharge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.recharge-form-card {
  padding: clamp(20px, 2.6vw, 26px);
}

.money-input {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.money-input:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.money-input > span {
  color: var(--muted);
  font-size: 24px;
  font-weight: 500;
}

.money-input input {
  height: 100%;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: none;
}

.money-input input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.money-input input::placeholder {
  color: #c2cecb;
  font-weight: 500;
}

.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.amount-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.14s ease, background-color 0.14s ease,
    color 0.14s ease;
}

.amount-chip:hover {
  border-color: var(--teal-line);
  background: #f7fbfa;
  color: var(--teal-strong);
}

.amount-chip.is-active {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-weight: 600;
}

.pay-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pay-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.pay-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.pay-option-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.14s ease, background-color 0.14s ease,
    box-shadow 0.14s ease;
}

.pay-option:hover .pay-option-body {
  border-color: #b9cbc7;
}

.pay-option input:checked + .pay-option-body {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 0 0 1px var(--teal);
}

.pay-option input:focus-visible + .pay-option-body {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pay-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.pay-logo-wechat {
  background: #07a854;
}

.pay-logo-alipay {
  background: #1677ff;
}

.pay-name {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
}

.pay-name small {
  display: block;
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 400;
}

.radio-mark {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.pay-option input:checked + .pay-option-body .radio-mark {
  border-color: var(--teal);
}

.pay-option input:checked + .pay-option-body .radio-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--teal);
}

.recharge-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.6;
}

.recharge-note .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.pay-card {
  overflow: hidden;
}

.pay-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.pay-card-head h3 {
  font-size: 14.5px;
}

.pay-card-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.pay-card-body {
  padding: 20px;
}

.pay-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}

.pay-amount-label {
  color: var(--muted);
  font-size: 12px;
}

.pay-amount {
  color: var(--ink);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 18px 0 14px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  background:
    linear-gradient(180deg, #fbfdfc, #f7fbfa);
  text-align: center;
}

.qr-box img {
  display: block;
  width: 196px;
  height: 196px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.qr-caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.qr-caption .spinner {
  width: 12px;
  height: 12px;
  border-width: 1.5px;
}

.pay-meta {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 12px;
}

.pay-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 11.5px;
}

.pay-meta-row span:last-child {
  color: var(--ink-3);
  text-align: right;
  overflow-wrap: anywhere;
}

.pay-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.pay-actions .btn {
  width: 100%;
}

.pay-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px 12px;
  text-align: center;
}

.pay-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 2px;
  border: 1px solid var(--success-line);
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
}

.pay-success-icon .icon {
  width: 26px;
  height: 26px;
}

.pay-success h3 {
  font-size: 18px;
}

.pay-success p {
  color: var(--muted);
  font-size: 12.5px;
}

.pay-success .pay-amount {
  margin: 4px 0 2px;
}

.pay-recent-card {
  overflow: hidden;
}

.recharge-status-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #f6faf9;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.recharge-status-note .spinner {
  width: 13px;
  height: 13px;
  margin-top: 2px;
  border-width: 1.5px;
}

/* =========================================================
   Verification
   ========================================================= */

.verify-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding: clamp(20px, 2.8vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(500px 240px at 100% 0%, rgba(15, 118, 110, 0.06), transparent 70%),
    #fff;
  box-shadow: var(--shadow-sm);
}

.verify-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border: 1px solid var(--teal-line);
  border-radius: 18px;
  background: var(--teal-soft);
  color: var(--teal);
}

.verify-icon .icon {
  width: 28px;
  height: 28px;
}

.verify-copy {
  flex: 1;
  min-width: 0;
}

.verify-copy h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 20px;
  letter-spacing: -0.015em;
}

.verify-copy p {
  margin-top: 6px;
  max-width: 640px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.detail-card {
  overflow: hidden;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  padding: 4px 24px 20px;
}

.detail-item {
  padding: 14px 0;
  border-bottom: 1px solid #eef3f2;
}

.detail-item dt {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.detail-item dd {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.detail-item .badge {
  margin-top: 1px;
}

.verify-note {
  margin-top: 20px;
}

/* =========================================================
   Products
   ========================================================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 22px;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  border-color: #d3e0dd;
  box-shadow: 0 16px 34px -24px rgba(13, 32, 38, 0.34);
}

.product-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.product-head h3 {
  font-size: 16px;
  letter-spacing: -0.01em;
}

.product-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.product-price {
  flex: 0 0 auto;
  color: var(--teal-strong);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.product-price small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
}

.product-desc {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafcfb;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.tag-teal {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.material-box {
  margin-top: auto;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
}

.material-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.material-box p {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.material-box ul {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 16px;
  list-style: disc;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef3f2;
}

/* =========================================================
   Orders
   ========================================================= */

.orders-card {
  overflow: hidden;
}

.orders-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.filters {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 31px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}

.filter-chip:hover {
  background: #f2f7f5;
  color: var(--ink-2);
}

.filter-chip.is-active {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-weight: 600;
}

.filter-count {
  color: var(--muted-2);
  font-size: 11.5px;
}

.order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.order-detail-head p {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

.order-detail-amount {
  margin-top: 6px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 11px 0;
  border-bottom: 1px solid #eef3f2;
  font-size: 13px;
}

.detail-row:last-child {
  border-bottom: 0;
}

.detail-row dt {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12.5px;
}

.detail-row dd {
  min-width: 0;
  color: var(--ink-2);
  text-align: right;
  overflow-wrap: anywhere;
}

.detail-footnote {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.65;
}

/* =========================================================
   Chat
   ========================================================= */

.chat-shell {
  position: relative;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  height: calc(100vh - 168px);
  height: calc(100dvh - 168px);
  min-height: 540px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.conv-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #fbfdfc;
}

.conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 13px;
  border-bottom: 1px solid var(--line);
}

.conv-head h2 {
  font-size: 13.5px;
  font-weight: 700;
}

.conv-new {
  height: 30px;
  padding: 0 9px;
  font-size: 11.5px;
  border-radius: 7px;
  gap: 4px;
}

.conv-new .icon {
  width: 13px;
  height: 13px;
}

.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  min-height: 0;
}

.conv-item {
  display: block;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-3);
  text-align: left;
  transition: background-color 0.13s ease, border-color 0.13s ease;
}

.conv-item:hover {
  background: #f1f7f5;
}

.conv-item.is-active {
  border-color: var(--teal-line);
  background: var(--teal-soft);
}

.conv-item:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.conv-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-item.is-active .conv-title {
  color: var(--teal-strong);
}

.conv-time {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.conv-empty {
  padding: 34px 16px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.7;
  text-align: center;
}

.conv-scrim {
  display: none;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #fff;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.chat-title {
  min-width: 0;
}

.chat-title h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-title p {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.chat-title .status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(6, 118, 71, 0.12);
}

.conv-toggle {
  display: none;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 24px 14px;
  scroll-behavior: smooth;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 30px 10px;
  text-align: center;
}

.chat-welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  border: 1px solid var(--teal-line);
  border-radius: 18px;
  background: var(--teal-soft);
  color: var(--teal);
}

.chat-welcome-icon .icon {
  width: 27px;
  height: 27px;
}

.chat-welcome h2 {
  font-size: 19px;
  letter-spacing: -0.015em;
}

.chat-welcome p {
  max-width: 380px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
}

.prompt-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.prompt-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11.5px;
  transition: border-color 0.14s ease, color 0.14s ease,
    background-color 0.14s ease;
}

.prompt-chip:hover {
  border-color: var(--teal-line);
  background: var(--teal-soft);
  color: var(--teal-strong);
}

.msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 100%;
  margin-bottom: 20px;
  animation: msg-in 0.16s ease-out;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.msg-user {
  justify-content: flex-end;
}

.msg-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  max-width: min(78%, 760px);
  min-width: 0;
}

.msg-user .msg-body {
  align-items: flex-end;
}

.msg-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  margin-top: 2px;
  border: 1px solid var(--teal-line);
  border-radius: 9px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 10px;
  font-weight: 700;
}

.bubble {
  max-width: 100%;
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.msg-assistant .bubble {
  border: 1px solid var(--line);
  border-top-left-radius: 4px;
  background: #f8fbfa;
  color: var(--ink-2);
}

.msg-user .bubble {
  border-bottom-right-radius: 4px;
  background: var(--teal);
  color: #fff;
}

.msg.is-streaming .bubble::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 1.05em;
  margin-left: 3px;
  border-radius: 2px;
  background: var(--teal);
  vertical-align: -2px;
  animation: cursor-blink 1s steps(2, start) infinite;
}

@keyframes cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.msg-meta {
  padding: 0 3px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  max-width: 100%;
  margin-bottom: 1px;
  padding: 3px 9px;
  border: 1px solid var(--teal-line);
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-strong);
  font-size: 10.5px;
  line-height: 1.6;
}

.tool-chip.is-done {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
}

.tool-chip .spinner {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}

.tool-chip .icon {
  width: 11px;
  height: 11px;
}

.msg-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: -4px 0 18px 39px;
  padding: 9px 12px;
  border: 1px solid var(--danger-line);
  border-radius: 9px;
  background: var(--danger-soft);
  color: var(--danger-strong);
  font-size: 11.5px;
  line-height: 1.6;
  animation: msg-in 0.16s ease-out;
}

.msg-error .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.chat-loading {
  display: flex;
  flex-direction: column;
  gap: 13px;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 18px;
}

.chat-loading .skeleton {
  height: 44px;
}

.chat-loading .skeleton:nth-child(1) {
  width: 62%;
  align-self: flex-end;
}

.chat-loading .skeleton:nth-child(2) {
  width: 84%;
}

.chat-loading .skeleton:nth-child(3) {
  width: 52%;
  align-self: flex-end;
}

.chat-composer {
  padding: 10px 16px 2px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.composer-input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  max-height: 160px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.65;
  resize: none;
  overflow-y: auto;
}

.composer-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.composer-send {
  height: 46px;
  min-width: 72px;
  padding: 0 15px;
  flex: 0 0 auto;
}

.chat-hint {
  padding: 5px 2px 9px;
  color: #a3b1ae;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: center;
}

.chat-hint kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fbfa;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--muted);
}

.chat-fatal {
  max-width: 520px;
  margin: 40px auto;
}

/* =========================================================
   Modal
   ========================================================= */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 24, 27, 0.48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.16s ease;
}

.modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 540px;
  max-height: min(86vh, 760px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.18s ease-out;
}

.modal.modal-wide {
  max-width: 620px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 16px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.modal-body {
  overflow-y: auto;
  padding: 20px 22px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 18px 18px;
}

.modal-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 36px 10px;
  color: var(--muted);
  font-size: 12px;
}

.legal-copy {
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.85;
}

.legal-copy h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 14px;
}

.legal-copy h3:first-child {
  margin-top: 0;
}

.legal-copy p {
  margin: 6px 0;
}

.legal-copy ul {
  margin: 6px 0;
  padding-left: 18px;
  list-style: disc;
}

.legal-copy .legal-note {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
}

/* =========================================================
   Toasts
   ========================================================= */

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(370px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: #0d2429;
  color: #eef8f6;
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: 0 16px 36px -18px rgba(7, 24, 27, 0.6);
  pointer-events: auto;
  animation: toast-in 0.2s ease-out;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.toast-icon {
  display: inline-flex;
  margin-top: 1px;
  color: #7dd3c7;
}

.toast-icon .icon {
  width: 15px;
  height: 15px;
}

.toast-msg {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.toast-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: -1px -2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: rgba(238, 248, 246, 0.5);
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.toast-close .icon {
  width: 12px;
  height: 12px;
}

.toast-success .toast-icon {
  color: #6ce9a6;
}

.toast-error {
  background: #2a1215;
  border-color: rgba(254, 205, 202, 0.16);
}

.toast-error .toast-icon {
  color: #fda29b;
}

.toast-warning {
  background: #2a1e0b;
  border-color: rgba(254, 223, 137, 0.16);
}

.toast-warning .toast-icon {
  color: #fec84b;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-card {
    display: flex;
    flex-direction: column;
  }

  .stat-grid {
    gap: 12px;
  }
}

@media (max-width: 960px) {
  .auth {
    display: block;
    min-height: 100vh;
  }

  .auth-aside {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 32px 18px;
  }

  .auth-mobile-brand {
    display: flex;
  }

  .shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: auto;
    padding: 9px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 rgba(13, 32, 38, 0.02);
  }

  .brand {
    flex: 0 0 auto;
    gap: 8px;
    padding: 0 4px 0 0;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
    font-size: 17px;
  }

  .brand-name {
    font-size: 14.5px;
  }

  .brand-sub {
    display: none;
  }

  .nav {
    flex: 1;
    flex-direction: row;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-label,
  .sidebar-foot {
    display: none;
  }

  .nav a {
    gap: 6px;
    padding: 8px 9px;
    font-size: 12.5px;
    white-space: nowrap;
  }

  .nav a .icon {
    width: 16px;
    height: 16px;
  }

  .topbar {
    position: static;
    min-height: 64px;
    padding: 11px 18px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }

  .view {
    min-height: 0;
    padding: 20px 18px 44px;
  }

  .chat-shell {
    height: calc(100vh - 178px);
    height: calc(100dvh - 178px);
    min-height: 500px;
    grid-template-columns: 1fr;
  }

  .conv-panel {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 6;
    width: min(84%, 320px);
    border-right: 1px solid var(--line);
    box-shadow: 20px 0 40px -24px rgba(13, 32, 38, 0.4);
    transform: translateX(-102%);
    transition: transform 0.2s ease;
  }

  .chat-shell.conv-open .conv-panel {
    transform: none;
  }

  .conv-toggle {
    display: inline-flex;
  }

  .conv-scrim {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    border: 0;
    background: rgba(7, 24, 27, 0.34);
  }

  .chat-shell.conv-open .conv-scrim {
    display: block;
  }

  .chat-scroll {
    padding: 20px 18px 10px;
  }
}

@media (max-width: 720px) {
  .stat-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .stat-card {
    padding: 18px;
  }

  .stat-value {
    min-height: 0;
  }

  .recharge-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .verify-hero {
    align-items: flex-start;
    gap: 14px;
  }

  .verify-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 14px;
  }

  .verify-icon .icon {
    width: 22px;
    height: 22px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 2px 18px 16px;
  }

  .detail-grid .detail-item:last-child {
    border-bottom: 0;
  }

  .page-intro {
    align-items: flex-start;
  }

  .page-intro h2 {
    font-size: 22px;
  }

  .user-meta strong {
    max-width: 96px;
  }

  .orders-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pager {
    justify-content: center;
  }

  .pager-info {
    width: 100%;
    text-align: center;
  }

  .chat-head {
    padding: 11px 14px;
  }

  .chat-title h2 {
    font-size: 13px;
  }

  .chat-scroll {
    padding: 18px 14px 8px;
  }

  .msg-body {
    max-width: 84%;
  }

  .chat-composer {
    padding: 9px 11px 2px;
  }

  .chat-hint {
    font-size: 10px;
  }

  .modal-root {
    padding: 0;
    align-items: end;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    animation: sheet-in 0.2s ease-out;
  }

  .modal-foot {
    border-radius: 0;
  }
}

@keyframes sheet-in {
  from {
    transform: translateY(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 560px) {
  .topbar {
    gap: 10px;
    padding: 10px 14px;
  }

  .topbar-title .eyebrow {
    display: none;
  }

  .topbar-title h1 {
    font-size: 17px;
  }

  .user-chip {
    gap: 6px;
    padding: 3px 8px 3px 3px;
  }

  .avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 12px;
  }

  .user-meta strong {
    max-width: 72px;
    font-size: 11.5px;
  }

  .user-meta span {
    font-size: 9.5px;
  }

  #logout-btn {
    width: 34px;
    padding: 0;
    gap: 0;
  }

  #logout-btn .btn-text {
    display: none;
  }

  .view {
    padding: 16px 14px 40px;
  }

  .auth-panel {
    padding: 22px 14px;
  }

  .auth-card {
    padding: 24px 20px;
    border-radius: 18px;
  }

  .auth-card-head h2 {
    font-size: 23px;
  }

  .form-alert {
    font-size: 12.5px;
  }

  .auth-tabs {
    margin: 22px 0 20px;
  }

  .wallet-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .wallet-side {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .wallet-side .btn {
    height: 34px;
    font-size: 12px;
  }

  .pay-options {
    grid-template-columns: minmax(0, 1fr);
  }

  .chat-shell {
    height: calc(100vh - 166px);
    height: calc(100dvh - 166px);
    min-height: 440px;
    border-radius: 13px;
  }

  .chat-welcome {
    padding: 18px 4px;
  }

  .chat-welcome-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .chat-welcome h2 {
    font-size: 17px;
  }

  .bubble {
    font-size: 13.5px;
  }

  .msg-error {
    margin-left: 0;
  }

  .chat-hint {
    display: none;
  }

  .chat-composer {
    padding-bottom: 9px;
  }

  .toast-region {
    right: 16px;
    bottom: 16px;
  }

  .page-heading-actions {
    width: 100%;
  }

  .quick-actions {
    width: 100%;
  }

  .quick-actions .btn {
    flex: 1;
  }

  .stat-foot {
    margin-top: 12px;
  }

  .verify-copy h2 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
