/* Client area theme styles */
:root {
  --bg-page: #F5F7FA;
  --surface: #FFFFFF;
  --brand: #7868E6;
  --brand-light: #F0EFFF;
  --text-main: #2D3748;
  --text-sub: #A0AEC0;
  --text-dark: #2D3748;
  --text-muted: #A0AEC0;
  --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.04);
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --accent-indigo: #7868E6;
  --bg-indigo: #F0EFFF;
  --xc-primary: #7868E6;
  --xc-primary-dark: #6554D4;
  --xc-primary-soft: #F0EFFF;
  --xc-text: #2D3748;
  --xc-text-muted: #A0AEC0;
  --xc-border: #E8E6F0;
}

@keyframes xcFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes xcFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
/* 页面切换只用淡入，不做平移，避免割裂感 */
@keyframes xcSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes xcSlideRight {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes xcSoftPop {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes xcDropIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== Auth pages (legacy register/pwreset) ========== */
body.xc-auth {
  margin: 0;
  background: #fff;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei", sans-serif;
  color: var(--xc-text);
}
.xc-auth-wrap { display: flex; min-height: 100vh; width: 100%; }
.xc-auth-visual {
  flex: 1 1 62%;
  min-height: 100vh;
  background: #1a1440 url("/themes/clientarea/xingchen/assets/img/login-bg.jpg") center center / cover no-repeat;
}
.xc-auth-panel {
  flex: 0 0 38%;
  max-width: 480px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
  background: #fff;
  min-height: 100vh;
}
.xc-auth-inner { width: 100%; max-width: 340px; }
.xc-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: 320px;
  height: auto;
  margin: 0 auto 28px;
}
.xc-auth-logo img.is-wide {
  width: auto !important; height: 48px !important; max-width: 240px !important; object-fit: contain; display: block;
}
.xc-auth-logo img.is-mark {
  width: 56px !important; height: 56px !important; border-radius: 14px; object-fit: contain; display: block;
}
.xc-auth-title { font-size: 26px; font-weight: 700; color: var(--xc-text); text-align: center; margin: 0 0 8px; }
.xc-auth-sub { font-size: 14px; color: var(--xc-text-muted); text-align: center; margin: 0 0 32px; }
.xc-field { margin-bottom: 18px; }
.xc-field label { display: block; font-size: 13px; color: var(--xc-text); margin-bottom: 8px; font-weight: 500; }
.xc-field-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.xc-field-head label { margin-bottom: 0; }
.xc-link { color: var(--xc-primary) !important; font-size: 13px; text-decoration: none !important; }
.xc-input, .xc-auth .form-control {
  height: 44px !important; border: 1px solid var(--xc-border) !important; border-radius: 10px !important;
  font-size: 14px; color: var(--xc-text); box-shadow: none !important;
}
.xc-input:focus, .xc-auth .form-control:focus { border-color: var(--xc-primary) !important; }
.xc-pwd-wrap { position: relative; }
.xc-pwd-wrap .form-control { padding-right: 42px; }
.xc-pwd-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--xc-text-muted); cursor: pointer; padding: 0; font-size: 18px;
}
.xc-check {
  display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--xc-text);
  margin: 8px 0 20px; cursor: pointer; user-select: none;
}
.xc-check input { width: 16px; height: 16px; accent-color: var(--xc-primary); }
.xc-btn-primary, .xc-auth .btn-primary {
  display: flex !important; align-items: center; justify-content: center; width: 100%;
  height: 46px !important; background: var(--xc-primary) !important; border: none !important;
  border-radius: 100px !important; color: #fff !important; font-size: 15px !important; font-weight: 600;
}
.xc-btn-primary:hover, .xc-auth .btn-primary:hover { background: var(--xc-primary-dark) !important; }
.xc-auth-footer { text-align: center; margin-top: 28px; font-size: 14px; color: var(--xc-text-muted); }
.xc-auth-footer a { color: var(--xc-primary); font-weight: 500; text-decoration: none; }
.xc-oauth { margin-top: 24px; text-align: center; }
.xc-oauth h5 { font-size: 13px; color: var(--xc-text-muted); margin-bottom: 12px; }
@media (max-width: 991.98px) {
  .xc-auth-visual { display: none; }
  .xc-auth-panel { flex: 1 1 100%; max-width: none; }
}

/* ========== Login page (TierFlow-style split) ========== */
body.tf-login {
  --tf-fg: #0E1216;
  --tf-muted: #667085;
  --tf-border: #E6E8EC;
  --tf-muted-bg: #F4F5F7;
  --tf-primary: #ED6D8F;
  --tf-primary-soft: #E8F0FE;
  background: #fff !important;
  min-height: 100vh;
}
body.tf-login.xc-auth #page-topbar,
body.tf-login.xc-auth .navbar-header,
body.tf-login.xc-auth .vertical-menu,
body.tf-login.xc-auth .footer,
body.tf-login.xc-auth .main-content,
body.tf-login.xc-auth .page-content {
  display: none !important;
}
.tf-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(90deg, var(--tf-muted-bg) 50%, #fff 50%);
}
.tf-vsplit {
  display: none;
  position: fixed;
  inset: 0 auto 0 50%;
  width: 1px;
  background: rgba(14, 18, 22, 0.08);
  pointer-events: none;
  z-index: 1;
}
.tf-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  max-width: 1320px;
  min-height: 96px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 40px);
}
.tf-brand {
  display: flex;
  align-items: center;
  height: 44px;
  max-width: 200px;
  text-decoration: none !important;
}
.tf-brand img.is-wide {
  width: auto !important;
  height: 40px !important;
  max-width: 200px !important;
  max-height: 40px !important;
  object-fit: contain;
  display: block;
  /* 浅底上强制按深色呈现，避免误用白字透明 logo */
  filter: none;
}
.tf-brand img.is-mark {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px;
  object-fit: contain;
  display: block;
}
.tf-top-right {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
}
.tf-top-link {
  color: var(--tf-muted) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}
.tf-top-link:hover { color: var(--tf-primary) !important; }
.tf-top-sep {
  width: 1px;
  height: 14px;
  background: var(--tf-border);
}
.tf-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--tf-fg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.tf-lang-btn:hover { background: var(--tf-muted-bg); }

.tf-main {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  width: 100%;
  max-width: 1320px;
  flex: 1;
  margin: 0 auto;
  padding: 28px clamp(24px, 4vw, 40px) 36px;
  align-items: stretch;
  content: normal;
}
.tf-promo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 90px;
  min-height: 0;
  align-self: stretch;
}
.tf-promo-inner {
  max-width: 460px;
  width: 100%;
  text-align: center;
}
.tf-hero {
  margin: 0;
  font-size: clamp(38px, 3.5vw, 50px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.025em;
  color: var(--tf-fg);
}
.tf-hero-line { display: block; }
.tf-hero em {
  font-style: normal;
  color: var(--tf-primary);
}
.tf-hero-sub {
  margin: 23px auto 0;
  max-width: 420px;
  font-size: 15px;
  line-height: 1.95;
  color: var(--tf-muted);
}
.tf-learn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(230, 232, 236, 0.9);
  font-size: 13px;
  color: var(--tf-muted) !important;
  text-decoration: none !important;
}
.tf-learn:hover { color: var(--tf-primary) !important; }

.tf-form-col {
  display: flex;
  justify-content: flex-end;
  padding-left: 90px;
  padding-top: 12px;
}
.tf-form-wrap { width: 100%; max-width: 400px; }
.tf-form-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.025em;
  color: var(--tf-fg);
}
.tf-form-sub {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--tf-muted);
}
.tf-tabs {
  display: flex;
  gap: 28px;
  margin: 28px 0 26px;
  padding: 0 !important;
  border: none !important;
  border-bottom: 1px solid #EBECEF !important;
}
.tf-tabs .nav-item { margin: 0; }
.tf-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-bottom: -1px !important;
  padding: 0 0 12px !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  background: transparent !important;
  color: #98A2B3 !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tf-tab:hover { color: var(--tf-fg) !important; }
.tf-tab.active {
  color: var(--tf-primary) !important;
  border-bottom-color: var(--tf-primary) !important;
}

.tf-field { margin-bottom: 22px; }
.tf-field > label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(14, 18, 22, 0.78);
  letter-spacing: 0.01em;
}
.tf-control {
  display: flex;
  align-items: center;
  height: 50px;
  border: 1px solid #E4E7EC;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  overflow: hidden;
}
.tf-control:hover { border-color: #CDD2DA; }
.tf-control:focus-within {
  border-color: var(--tf-primary);
  box-shadow: 0 0 0 3px rgba(237, 109, 143, 0.14);
}
.tf-control .form-control,
.tf-login .tf-control .form-control,
.tf-login .tf-control select.form-control {
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  background: #fff !important;
  background-image: none !important;
  padding: 0 15px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  color: var(--tf-fg) !important;
  -webkit-appearance: none;
  appearance: none;
}
.tf-control .form-control::placeholder {
  color: #98A2B3 !important;
  opacity: 1;
}
/* 干掉浏览器自动填充蓝底/黄底 */
.tf-login .tf-control .form-control:-webkit-autofill,
.tf-login .tf-control .form-control:-webkit-autofill:hover,
.tf-login .tf-control .form-control:-webkit-autofill:focus,
.tf-login .tf-control .form-control:-webkit-autofill:active {
  -webkit-text-fill-color: var(--tf-fg) !important;
  caret-color: var(--tf-fg);
  transition: background-color 99999s ease-in-out 0s;
  box-shadow: 0 0 0 1000px #fff inset !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
}
.tf-control-pwd { position: relative; }
.tf-control-pwd .form-control { padding-right: 46px !important; }
.tf-pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #98A2B3;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.tf-pwd-toggle:hover {
  color: var(--tf-fg);
  background: #F2F4F7;
}
.tf-pwd-toggle i { font-size: 18px; line-height: 1; }
.tf-field-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.tf-muted-link {
  font-size: 12px;
  color: var(--tf-muted) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: color 0.15s ease;
}
.tf-muted-link:hover { color: var(--tf-primary) !important; }
.tf-phone-row { gap: 0; }
.tf-phone-row .tf-phone-code {
  flex: 0 0 118px;
  max-width: 118px;
  padding: 0 10px 0 14px !important;
  border-right: 1px solid #E4E7EC !important;
  border-radius: 0 !important;
  color: #344054 !important;
  font-size: 13px !important;
  background:
    #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2398A2B3' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 10px center !important;
  background-size: 12px !important;
  cursor: pointer;
}
.tf-phone-row .tf-phone-code:focus {
  background-color: #fff !important;
}
.tf-code-row { gap: 0; }
.tf-code-btn {
  flex: 0 0 auto;
  height: 100%;
  padding: 0 16px;
  border: none;
  border-left: 1px solid #E4E7EC;
  background: #F8F9FB;
  color: #344054;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tf-code-btn:hover {
  background: #F2F4F7;
  color: var(--tf-fg);
}
.tf-switch-mode { margin: -4px 0 18px; }
.tf-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--tf-muted);
  cursor: pointer;
  user-select: none;
}
.tf-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tf-check::before {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1px solid #D0D5DD;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(16, 24, 40, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.tf-check:has(input:checked)::before {
  border-color: var(--tf-primary);
  background: var(--tf-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: none;
}
.tf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  margin-top: 26px;
  border: none;
  border-radius: 8px;
  background: var(--tf-fg);
  color: #fff !important;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
  transition: background 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}
.tf-submit:hover {
  background: #1A1F26;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.14);
}
.tf-submit:active { transform: translateY(1px); }
.tf-submit span { font-size: 18px; font-weight: 400; line-height: 1; }
.tf-register {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--tf-muted);
}
.tf-register a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(14, 18, 22, 0.8) !important;
  font-weight: 500;
  text-decoration: none !important;
}
.tf-register a:hover { color: var(--tf-primary) !important; }
.tf-oauth { margin-top: 24px; }
.tf-oauth-sep {
  position: relative;
  text-align: center;
  margin-bottom: 12px;
}
.tf-oauth-sep::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  border-top: 1px solid var(--tf-border);
}
.tf-oauth-sep span {
  position: relative;
  display: inline-block;
  padding: 0 10px;
  background: #fff;
  font-size: 12px;
  color: var(--tf-muted);
  text-transform: uppercase;
}
.tf-oauth-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tf-oauth-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--tf-border);
  border-radius: 999px;
  background: #fff;
  text-decoration: none !important;
  padding: 8px 12px;
}
.tf-oauth-item img { max-height: 22px; }

.tf-foot {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px 20px;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 40px) 20px;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(102, 112, 133, 0.85);
}

/* captcha / custom fields on auth pages */
body.tf-login .form-group {
  margin-bottom: 22px;
}
body.tf-login .form-group > label {
  display: block;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(14, 18, 22, 0.78);
}
body.tf-login .form-group .input-group {
  display: flex;
  align-items: stretch;
  height: 50px;
  border: 1px solid #E4E7EC;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
body.tf-login .form-group .input-group:focus-within {
  border-color: var(--tf-primary);
  box-shadow: 0 0 0 3px rgba(237, 109, 143, 0.14);
}
body.tf-login .form-group .input-group .form-control {
  height: 100% !important;
  border: none !important;
  box-shadow: none !important;
  background: #fff !important;
  padding: 0 15px !important;
  font-size: 14px !important;
}
body.tf-login .form-group .input-group-append {
  display: flex;
  align-items: center;
  margin: 0;
  border-left: 1px solid #E4E7EC;
  background: #F8F9FB;
}
body.tf-login .form-group .input-group-append img {
  height: 100%;
  width: auto !important;
  max-width: 120px;
  object-fit: cover;
  border: none !important;
  cursor: pointer;
}
.tf-textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  padding: 12px 15px !important;
  border: 1px solid #E4E7EC !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  font-size: 14px !important;
  color: var(--tf-fg) !important;
  resize: vertical;
}
.tf-textarea:focus {
  border-color: var(--tf-primary) !important;
  box-shadow: 0 0 0 3px rgba(237, 109, 143, 0.14) !important;
  outline: none !important;
}
.tf-check-agree {
  margin: 8px 0 0;
  align-items: flex-start;
}
.tf-check-agree a {
  color: var(--tf-primary) !important;
  text-decoration: none !important;
}
.tf-check-agree a:hover { text-decoration: underline !important; }
body.tf-login .tf-form-wrap { padding-bottom: 8px; }

/* alerts on login */
body.tf-login .alert {
  position: relative;
  z-index: 5;
  max-width: 1320px;
  margin: 12px auto 0;
  width: calc(100% - clamp(48px, 8vw, 80px));
}

@media (min-width: 992px) {
  .tf-vsplit { display: block; }
}
@media (max-width: 991.98px) {
  .tf-shell { background: #fff; }
  .tf-top { min-height: 72px; }
  .tf-main {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-top: 28px;
    padding-bottom: 48px;
  }
  .tf-promo { display: none; }
  .tf-form-col {
    justify-content: center;
    padding-left: 0;
    width: 100%;
  }
  .tf-foot { justify-content: center; text-align: center; }
}

/* ========== App shell ========== */
body.xc-app {
  background: var(--bg-page) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-bottom: 64px;
}

body.xc-app #page-topbar,
body.xc-app .navbar-header,
body.xc-app .vertical-menu,
body.xc-app .footer,
body.xc-app .page-title-box {
  display: none !important;
  pointer-events: none !important;
}

body.xc-app .main-content {
  margin-left: 0 !important;
  /* 禁止 z-index：否则内部 .modal 会被关进低层叠上下文，body 上的 .modal-backdrop 永远盖住弹窗 */
  position: relative;
}

body.xc-app .page-content {
  padding: 0 !important;
  margin-top: 0 !important;
}

body.xc-app .container-fluid {
  padding: 0 !important;
  max-width: none;
  margin: 0;
}

body.xc-app .card {
  border: 1px solid rgba(0,0,0,0.04) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-soft) !important;
}

body.xc-app .btn-primary {
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  border-radius: 999px !important;
}

/* ========== Top bar ========== */
.xc-topbar {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1100;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  border-bottom: 1px solid #f3f4f6;
  overflow: visible;
}

/*
 * Bootstrap 提示/确认框（须配合 footer 把 .modal 挂到 body）
 * 高于 topbar(1100) / 抽屉(12000) / 命令面板(13000)
 */
body.xc-app .modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 19990 !important;
  background-color: #000 !important;
}
body.xc-app .modal-backdrop.fade { opacity: 0 !important; }
body.xc-app .modal-backdrop.show { opacity: 0.5 !important; }
body.xc-app .modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 20000 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
body.xc-app .modal.show { display: block !important; }
body.xc-app .modal .modal-dialog {
  position: relative;
  z-index: 1;
}
body.xc-app .modal .modal-content {
  position: relative;
  z-index: 2;
  background: #fff !important;
  pointer-events: auto !important;
}
body.xc-app.modal-open .xc-topbar,
body.xc-app.modal-open .xc-nav-drop,
body.xc-app.modal-open .dropdown-menu,
body.xc-app.modal-open .xc-subnav,
body.xc-app.modal-open .xc-drawer-mask,
body.xc-app.modal-open .xc-cmd,
body.xc-app.modal-open .xc-preview-layer {
  z-index: 1000 !important;
}
body.xc-app.modal-open .xc-drawer-mask,
body.xc-app.modal-open .xc-cmd,
body.xc-app.modal-open .xc-preview-layer {
  pointer-events: none !important;
}

.xc-topbar-inner {
  position: relative;
  height: 64px;
  padding: 0 24px;
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.xc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 280px;
  min-width: 0;
  flex-shrink: 0;
  text-decoration: none !important;
  color: #1f2937 !important;
  transition: opacity 0.2s ease;
}
/* 后台横版 logo：限高，宽度自适应，不再旁挂公司名 */
.xc-brand-logo.is-wide {
  width: auto !important;
  height: 42px !important;
  max-width: 260px !important;
  max-height: 42px !important;
  border-radius: 0;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
/* 无后台 logo 时的方标 */
.xc-brand-logo.is-mark {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.xc-brand:hover .xc-brand-logo { opacity: 0.92; }
.xc-brand span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xc-search {
  flex: 1;
  max-width: 560px;
  position: relative;
  margin: 0 auto;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--bg-page);
  color: #9ca3af;
  cursor: pointer;
  text-align: left;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.xc-search:hover {
  background: #EEF0F4;
  box-shadow: 0 0 0 1px rgba(120, 104, 230, 0.18);
}
.xc-search i.ph-magnifying-glass {
  font-size: 18px;
  color: #9ca3af;
  flex-shrink: 0;
}
.xc-search-placeholder {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  color: #9ca3af;
  font-weight: 400;
}
.xc-search-kbd {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #E5E7EB;
  font-size: 11px;
  color: #9ca3af;
  flex-shrink: 0;
}

/* ========== Command palette ========== */
body.xc-cmd-open { overflow: hidden; }
.xc-cmd {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 24px;
}
.xc-cmd[hidden] { display: none !important; }
.xc-cmd-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.xc-cmd-panel {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: xcCmdIn 0.18s ease;
}
@keyframes xcCmdIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.xc-cmd-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #F1F2F4;
}
.xc-cmd-ico { font-size: 20px; color: #9CA3AF; flex-shrink: 0; }
.xc-cmd-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: #111827;
  line-height: 1.4;
}
.xc-cmd-input::placeholder { color: #9CA3AF; }
.xc-cmd-esc {
  flex-shrink: 0;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #E5E7EB;
  background: #F9FAFB;
  color: #6B7280;
  font-size: 11px;
  line-height: 22px;
  cursor: pointer;
}
.xc-cmd-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 4px;
}
.xc-cmd-scope {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #E5E7EB;
  border-radius: 999px;
  background: #fff;
  color: #6B7280;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.xc-cmd-scope:hover { border-color: #D1D5DB; color: #111827; }
.xc-cmd-scope.is-on {
  border-color: transparent;
  background: var(--brand-light);
  color: var(--brand);
}
.xc-cmd-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 12px;
  -webkit-overflow-scrolling: touch;
}
.xc-cmd-group {
  padding: 10px 10px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #9CA3AF;
  text-transform: uppercase;
}
.xc-cmd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: #111827 !important;
  transition: background 0.12s ease;
}
.xc-cmd-item:hover,
.xc-cmd-item.is-active {
  background: #F5F6F8;
}
.xc-cmd-item.is-primary.is-active,
.xc-cmd-item.is-primary:hover {
  background: var(--brand-light);
}
.xc-cmd-item-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F3F4F6;
  color: #6B7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xc-cmd-item.is-primary .xc-cmd-item-ico {
  background: rgba(120, 104, 230, 0.12);
  color: var(--brand);
}
.xc-cmd-item-ico i { font-size: 18px; }
.xc-cmd-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.xc-cmd-item-text strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xc-cmd-item-text small {
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xc-cmd-item-go {
  font-size: 14px;
  color: #D1D5DB;
  flex-shrink: 0;
}
.xc-cmd-item.is-active .xc-cmd-item-go { color: var(--brand); }
.xc-cmd-empty {
  padding: 36px 16px;
  text-align: center;
  color: #9CA3AF;
  font-size: 14px;
}
.xc-cmd-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid #F1F2F4;
  background: #FAFAFB;
  color: #9CA3AF;
  font-size: 11px;
}
.xc-cmd-foot kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin-right: 2px;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  font-family: inherit;
  color: #6B7280;
  text-align: center;
}

.xc-nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #6b7280;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  padding: 0;
  flex-shrink: 0;
}
.xc-nav-toggle:hover { background: #F3F4F6; color: #374151; }

.xc-drawer-head { display: none; }
.xc-drawer-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  z-index: 11900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.xc-drawer-close {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  border-radius: 8px;
  color: #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}
.xc-drawer-close:hover { background: #F3F4F6; color: #374151; }
body.xc-nav-lock { overflow: hidden; }

.xc-top-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  width: auto;
  min-width: 180px;
  justify-content: flex-end;
  flex-shrink: 0;
  color: #6b7280;
}
.xc-top-actions .xc-action,
.xc-top-actions > .xc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.xc-top-actions .xc-action-user {
  margin-left: 10px;
}

.xc-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #6b7280 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  text-decoration: none !important;
  font-size: 20px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
  padding: 0;
  box-shadow: none;
}
.xc-icon-btn i.ph {
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
}
.xc-icon-btn:hover,
.xc-icon-btn:focus {
  color: #374151 !important;
  background: #F3F4F6;
  outline: none;
  transform: none;
  box-shadow: none;
}
.xc-icon-btn:active {
  background: #EBEBEF;
}

.xc-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid #fff;
}

.xc-top-divider {
  width: 1px;
  height: 18px;
  background: #e5e7eb;
  margin: 0 6px;
}

.xc-lang-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.xc-user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
}
.xc-user-trigger:focus { outline: none; }
.xc-avatar-ring {
  position: relative;
  display: inline-flex;
  width: 32px;
  height: 32px;
}
.xc-avatar-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EDE9FE;
  color: #7C6BEA;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  user-select: none;
  box-shadow: none;
  transition: background 0.15s ease;
}
.xc-user-trigger:hover .xc-avatar-letter {
  background: #E4DEFF;
  transform: none;
  box-shadow: none;
}
.xc-avatar-online {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3B82F6;
  border: 2px solid #fff;
}
.xc-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 16px;
  flex-shrink: 0;
}

.xc-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--xc-border);
  background: #fff;
  cursor: pointer;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}
.xc-user-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* 顶栏下拉：语言 / 用户（覆盖 global.css .dropdown-menu{min-width:5rem!important}） */
.xc-drop-menu.dropdown-menu {
  width: 240px !important;
  min-width: 240px !important;
  max-width: none !important;
  padding: 8px;
  margin-top: 10px !important;
  border: 1px solid #F1F0F5;
  border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(45, 42, 80, 0.18);
  background: #fff;
  z-index: 3100;
}
.xc-lang-menu.dropdown-menu {
  width: 168px !important;
  min-width: 168px !important;
  padding: 6px;
}
.xc-user-menu.dropdown-menu {
  width: 248px !important;
  min-width: 248px !important;
  padding: 0;
  overflow: hidden;
}
.xc-user-menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
}
.xc-user-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.xc-user-menu-meta strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.xc-user-menu-meta span {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.3;
  white-space: nowrap;
}
.xc-drop-group { padding: 4px 8px; }
.xc-drop-divider {
  height: 1px;
  background: #F1F0F5;
  margin: 4px 0;
}
.xc-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-main) !important;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.xc-drop-item i.ph {
  font-size: 18px;
  color: #8B8FA3;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}
.xc-drop-item:hover {
  background: #F7F6FB;
  color: var(--brand) !important;
}
.xc-drop-item:hover i.ph { color: var(--brand); }
.xc-drop-menu .dropdown-item { display: none; }

/* ========== Sub nav ========== */
.xc-subnav {
  max-width: 1600px;
  margin: 0 auto;
  padding: 6px 24px 16px;
  min-height: 60px;
  height: auto;
  display: flex;
  align-items: center;
  overflow: visible;
}

.xc-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  overflow: visible;
  scrollbar-width: none;
}
.xc-nav-links::-webkit-scrollbar { display: none; }

.xc-nav-item { position: relative; flex-shrink: 0; z-index: 1; }
.xc-nav-item.open,
.xc-nav-item:hover { z-index: 1200; }

.xc-nav-link {
  height: 40px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280 !important;
  text-decoration: none !important;
  border-radius: 12px;
  white-space: nowrap;
  transition: color 0.25s ease, background 0.25s ease, transform 0.3s var(--ease-spring), box-shadow 0.3s ease;
}
.xc-nav-link i.ph { font-size: 18px; transition: transform 0.3s var(--ease-spring); }
.xc-nav-link .xc-nav-caret {
  font-size: 12px;
  color: #9ca3af;
  transition: transform 0.3s var(--ease-spring);
}
.xc-nav-link:hover {
  color: var(--brand) !important;
  transform: translateY(-1px);
}
.xc-nav-link:hover i.ph { transform: scale(1.08); }
.xc-nav-link.active,
.xc-nav-item.is-active > .xc-nav-link {
  background: var(--brand-light) !important;
  color: var(--brand) !important;
  padding: 0 16px;
  box-shadow: 0 4px 14px rgba(120, 104, 230, 0.12);
}
.xc-nav-link.active i.ph,
.xc-nav-item.is-active > .xc-nav-link i.ph {
  color: var(--brand) !important;
}
.xc-nav-item.open > .xc-nav-link { color: var(--brand) !important; }
.xc-nav-item.open > .xc-nav-link .xc-nav-caret { transform: rotate(180deg); }

.xc-nav-drop {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  z-index: 3000;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.22s var(--ease-out), transform 0.28s var(--ease-spring), visibility 0.22s;
}
.xc-nav-drop-inner {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.12);
  border: 1px solid #f3f4f6;
  padding: 8px;
}
.xc-nav-item.open > .xc-nav-drop {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.xc-nav-drop a {
  display: block !important;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  color: var(--text-main) !important;
  font-size: 13px !important;
  text-decoration: none !important;
  opacity: 0;
  transform: translateX(-6px);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.25s var(--ease-spring), opacity 0.25s ease, transform 0.25s var(--ease-out);
}
.xc-nav-item.open > .xc-nav-drop a {
  opacity: 1;
  transform: translateX(0);
}
.xc-nav-item.open > .xc-nav-drop a:nth-child(1) { transition-delay: 0.02s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(2) { transition-delay: 0.04s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(3) { transition-delay: 0.06s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(4) { transition-delay: 0.08s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(5) { transition-delay: 0.1s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(6) { transition-delay: 0.12s; }
.xc-nav-item.open > .xc-nav-drop a:nth-child(n+7) { transition-delay: 0.14s; }
.xc-nav-drop a:hover,
.xc-nav-drop a.active {
  background: var(--brand-light) !important;
  color: var(--brand) !important;
  padding-left: 16px !important;
}

/* ========== Page wrap ========== */
.xc-main {
  max-width: 1600px !important;
  margin: 0 auto !important;
  padding: 28px 24px 32px !important;
}

body.xc-app.xc-dash-page .xc-main {
  padding-top: 28px !important;
}

.xc-page-inner {
  background: var(--surface);
  border: 1px solid #f3f4f6;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  /* 内页切换：仅轻微淡入，无位移 */
  animation: xcFadeIn 0.28s ease both;
}

body.xc-app.xc-dash-page .xc-page-inner {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.xc-footer {
  max-width: 1600px;
  margin: 8px auto 0;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ========== Dashboard ========== */
.xc-dash {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.xc-hero-row {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 24px;
  animation: xcFadeIn 0.35s ease both;
}
.xc-quick-card {
  transition: border-color 0.25s ease, transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}
.xc-quick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(45, 42, 80, 0.08);
}
.xc-panel,
.xc-poster {
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}
.xc-panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(45, 42, 80, 0.06);
}
.xc-poster:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}
.xc-prod-item {
  transition: background 0.25s ease, transform 0.25s var(--ease-out), padding-left 0.25s ease;
  border-radius: 10px;
}
.xc-prod-item:hover {
  background: rgba(245, 247, 250, 0.8);
  transform: translateX(2px);
}
.xc-act-item {
  transition: transform 0.25s var(--ease-out);
}
.xc-act-item:hover {
  transform: translateX(3px);
}
.xc-act-item:hover .xc-act-dot {
  transform: scale(1.15);
}
.xc-act-dot {
  transition: transform 0.3s var(--ease-spring);
}

.xc-hero-banner {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-soft);
  height: 220px;
  background-size: cover;
  background-position: center;
}
.xc-hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.6) 45%, transparent 100%);
}
.xc-hero-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.xc-hero-greet {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #4b5563;
}
.xc-hero-greet i { font-size: 18px; }
.xc-hero-greet .text-amber { color: #eab308; }
.xc-hero-greet .text-orange { color: #f97316; }
.xc-hero-greet .text-indigo { color: #6366f1; }
.xc-hero-title {
  font-size: 30px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
  line-height: 1.25;
}
.xc-hero-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 8px 0 0;
}
.xc-hero-line {
  width: 32px;
  height: 2px;
  background: #d1d5db;
  margin-top: 16px;
}

.xc-user-card {
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 220px;
}
.xc-user-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none !important;
  color: inherit !important;
  cursor: pointer;
}
.xc-user-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid #f9fafb;
  flex-shrink: 0;
  background: var(--brand-light);
}
.xc-user-card-meta { flex: 1; min-width: 0; }
.xc-user-card-meta h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.xc-user-tag {
  font-size: 10px;
  background: #f3f4f6;
  color: #6b7280;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 400;
}
.xc-user-card-meta p {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9ca3af;
}
.xc-user-card-arrow {
  color: #d1d5db;
  font-size: 16px;
  transition: color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.xc-user-card-head:hover .xc-user-card-arrow {
  color: var(--brand);
  transform: translateX(4px);
}

.xc-balance-block { margin-top: 12px; }
.xc-balance-label { font-size: 12px; color: #6b7280; margin: 0 0 4px; }
.xc-balance-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.xc-balance-amount {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.1;
}
.xc-btn-recharge {
  background: var(--brand);
  color: #fff !important;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: background 0.2s ease;
  white-space: nowrap;
}
.xc-btn-recharge:hover { background: rgba(120, 104, 230, 0.9); color: #fff !important; }

.xc-user-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f9fafb;
}
.xc-stat {
  text-align: center;
  text-decoration: none !important;
  color: inherit !important;
  flex: 1;
}
.xc-stat-label { font-size: 12px; color: #9ca3af; margin: 0 0 2px; }
.xc-stat-val {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}
.xc-stat-val span { font-size: 12px; font-weight: 400; color: #6b7280; }

/* Quick cards */
.xc-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  animation: xcFadeIn 0.35s ease 0.05s both;
}

.xc-quick-card {
  background: #fff;
  border-radius: var(--radius-2xl);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid transparent;
  transition: border-color 0.2s ease;
  min-height: 180px;
  display: block;
}
.xc-quick-card:hover { border-color: rgba(120, 104, 230, 0.1); }
.xc-quick-card.qc-orange:hover { border-color: rgba(249, 115, 22, 0.12); }
.xc-quick-card.qc-teal:hover { border-color: rgba(20, 184, 166, 0.12); }
.xc-quick-card.qc-blue:hover { border-color: rgba(59, 130, 246, 0.12); }

.xc-glow-blob {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  filter: blur(30px);
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}
.qc-brand .xc-glow-blob { background: rgba(120, 104, 230, 0.2); }
.qc-orange .xc-glow-blob { background: rgba(251, 146, 60, 0.2); }
.qc-teal .xc-glow-blob { background: rgba(45, 212, 191, 0.2); }
.qc-blue .xc-glow-blob { background: rgba(96, 165, 250, 0.2); }

.xc-quick-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.xc-quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  transition: transform 0.25s var(--ease);
}
.xc-quick-card:hover .xc-quick-icon { transform: scale(1.1); }
.qc-brand .xc-quick-icon { background: var(--brand-light); color: var(--brand); }
.qc-orange .xc-quick-icon { background: #fff7ed; color: #f97316; }
.qc-teal .xc-quick-icon { background: #f0fdfa; color: #14b8a6; }
.qc-blue .xc-quick-icon { background: #eff6ff; color: #3b82f6; }

.xc-quick-inner h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
}
.xc-quick-inner p {
  font-size: 14px;
  color: #9ca3af;
  margin: 0 0 24px;
  flex: 1;
}
.xc-quick-link {
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s ease;
}
.xc-quick-card:hover .xc-quick-link { gap: 8px; }
.qc-brand .xc-quick-link { color: var(--brand); }
.qc-orange .xc-quick-link { color: #f97316; }
.qc-teal .xc-quick-link { color: #14b8a6; }
.qc-blue .xc-quick-link { color: #3b82f6; }

/* Bottom: products + activity + poster */
.xc-bottom-grid {
  display: grid;
  grid-template-columns: 5fr 4fr 3fr;
  gap: 24px;
  align-items: stretch;
  animation: xcFadeIn 0.35s ease 0.08s both;
}

.xc-panel {
  background: #fff;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(229, 231, 235, 0.6);
  padding: 24px 24px 20px;
}

.xc-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}
.xc-panel-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.xc-panel-head h3,
.xc-panel-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  letter-spacing: 0.02em;
}
.xc-panel-title span {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}
.xc-panel-more {
  font-size: 12px;
  color: #6366f1 !important;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.xc-panel-more:hover { color: #4f46e5 !important; }

/* Product list — minimal */
.xc-prod-list { display: flex; flex-direction: column; }
.xc-prod-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
  text-decoration: none !important;
  color: inherit !important;
}
.xc-prod-item:last-child { border-bottom: none; }
.xc-prod-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
  font-size: 20px;
}
.xc-prod-info { flex: 1; min-width: 0; }
.xc-prod-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 2px;
}
.xc-prod-desc {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xc-prod-status {
  width: 96px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 13px;
  color: #10b981;
}
.xc-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}
.xc-status-dot.xc-dot-muted { background: #d1d5db; }
.xc-status-muted { color: #9ca3af !important; }
.xc-prod-date {
  width: 96px;
  text-align: right;
  font-size: 13px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  flex-shrink: 0;
}
.xc-prod-more {
  width: 32px;
  text-align: right;
  flex-shrink: 0;
  color: #d1d5db;
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  cursor: pointer;
  text-decoration: none !important;
}
.xc-prod-item:hover .xc-prod-more,
.xc-prod-more:hover { color: #6b7280; }

/* Activity timeline — minimal */
.xc-act-list { position: relative; }
.xc-act-line {
  position: absolute;
  left: 7px;
  top: 24px;
  bottom: 24px;
  width: 1px;
  background: #f3f4f6;
}
.xc-act-item {
  display: flex;
  align-items: stretch;
  text-decoration: none !important;
  color: inherit !important;
}
.xc-act-node {
  width: 32px;
  padding-top: 22px;
  display: flex;
  justify-content: flex-start;
  position: relative;
  z-index: 1;
  background: #fff;
  flex-shrink: 0;
}
.xc-act-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #8b5cf6;
  background: #fff;
  box-sizing: border-box;
}
.xc-act-body {
  flex: 1;
  padding: 16px 0;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.xc-act-item.is-last .xc-act-body { border-bottom: none; }
.xc-act-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.xc-act-top h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xc-act-top span {
  font-size: 12px;
  color: #9ca3af;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  flex-shrink: 0;
}
.xc-act-desc {
  font-size: 12px;
  color: #9ca3af;
}

/* Poster card */
.xc-poster {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  position: relative;
  background-size: cover;
  background-position: center;
  min-height: 320px;
  text-decoration: none !important;
  display: block;
}
.xc-poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 45%, transparent 100%);
  transition: background 0.45s ease;
}
.xc-poster:hover .xc-poster-mask {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.28) 45%, transparent 100%);
}
.xc-poster-body {
  position: relative;
  z-index: 1;
  padding: 24px;
  height: 100%;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.xc-poster-quote {
  text-align: center;
  padding-top: 32px;
}
.xc-poster-quote p {
  margin: 0;
  color: rgba(255,255,255,0.95);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  font-size: 18px;
  letter-spacing: 0.2em;
  line-height: 1.7;
}
.xc-poster-quote span {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.xc-poster-btn {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 128px;
  transition: background 0.25s ease, color 0.25s ease;
}
.xc-poster:hover .xc-poster-btn {
  background: #fff;
  color: #111827;
}

/* Compat aliases for older class names used elsewhere */
.glass-nav { display: none; }
.action-tag {
  padding: 8px 16px;
  background: var(--bg-page);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-main) !important;
  text-decoration: none !important;
}
.xc-svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Responsive */
@media (max-width: 1200px) {
  .xc-hero-row { grid-template-columns: 1fr; }
  .xc-user-card { height: auto; }
  .xc-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .xc-bottom-grid { grid-template-columns: 1fr; }
  .xc-poster { min-height: 260px; }
}

@media (max-width: 767.98px) {
  .xc-topbar { position: sticky; top: 0; z-index: 1100; }
  .xc-topbar-inner {
    height: 56px;
    min-height: 56px;
    flex-wrap: nowrap;
    padding: 0 12px;
    gap: 8px;
  }
  .xc-brand { width: auto; gap: 8px; }
  .xc-brand { max-width: 180px; }
  .xc-brand-logo.is-wide { height: 34px !important; max-width: 170px !important; max-height: 34px !important; }
  .xc-brand-logo.is-mark { width: 34px !important; height: 34px !important; border-radius: 9px; }
  .xc-brand span { font-size: 16px; }
  .xc-nav-toggle { display: inline-flex; order: -1; margin-right: 2px; }

  .xc-search { display: none; }
  .xc-cmd {
    padding: 8vh 12px 16px;
    align-items: flex-start;
  }
  .xc-cmd-panel {
    max-height: min(84vh, 720px);
    border-radius: 16px;
  }
  .xc-cmd-foot { display: none; }

  .xc-top-actions { width: auto; min-width: 0; gap: 0; margin-left: auto; }
  .xc-top-actions .xc-action-lang { display: none; }
  .xc-top-actions .xc-action-user { margin-left: 4px; }
  .xc-user-menu.dropdown-menu {
    width: min(248px, calc(100vw - 24px)) !important;
    min-width: min(248px, calc(100vw - 24px)) !important;
    right: 0 !important;
    left: auto !important;
  }
  .xc-top-divider { display: none; }

  .xc-drawer-mask { display: block; }
  .xc-topbar.nav-open .xc-drawer-mask {
    opacity: 1;
    pointer-events: auto;
  }
  .xc-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #F1F0F5;
    flex-shrink: 0;
  }
  .xc-drawer-brand { width: auto; }
  .xc-drawer-brand span { color: var(--brand); }

  .xc-subnav {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 82vw);
    max-width: 300px;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    z-index: 12000;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
    overflow: hidden;
  }
  .xc-topbar.nav-open .xc-subnav { transform: translateX(0); }

  .xc-nav-links {
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 12px 24px;
  }
  .xc-nav-item { width: 100%; z-index: auto; }
  .xc-nav-item:hover,
  .xc-nav-item.open { z-index: auto; }
  .xc-nav-link {
    width: 100%;
    height: 46px;
    justify-content: flex-start;
    gap: 12px;
    padding: 0 14px !important;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4B5563 !important;
  }
  .xc-nav-link i.ph { font-size: 20px; color: #9CA3AF; }
  .xc-nav-link .xc-nav-caret {
    margin-left: auto;
    font-size: 14px;
    transform: rotate(-90deg);
  }
  .xc-nav-item.open > .xc-nav-link .xc-nav-caret { transform: rotate(0deg); }
  .xc-nav-link.active,
  .xc-nav-link:hover {
    background: var(--brand-light) !important;
    color: var(--brand) !important;
    box-shadow: none;
    transform: none;
  }
  .xc-nav-link.active i.ph,
  .xc-nav-link:hover i.ph { color: var(--brand); }
  .xc-nav-item.open > .xc-nav-link { color: var(--brand) !important; }

  .xc-nav-drop {
    position: static;
    padding: 0 0 4px;
    transform: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, opacity 0.2s ease;
  }
  .xc-nav-drop-inner {
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 2px 0 6px 34px;
    border-radius: 0;
  }
  .xc-nav-drop a {
    height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #6B7280 !important;
  }
  .xc-nav-item.open > .xc-nav-drop {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    max-height: 480px;
    transform: none;
  }
  .xc-nav-item.open > .xc-nav-drop a {
    opacity: 1;
    transform: none;
  }

  .xc-page-wrap .page-content { padding-top: 0 !important; }
  .xc-main { padding: 14px 12px 24px !important; }
  .xc-page-inner {
    padding: 14px;
    border-radius: 14px;
  }
  body.xc-app .page-title-box {
    padding: 4px 0 12px !important;
    margin-bottom: 4px !important;
  }
  body.xc-app .page-title-box h4 { font-size: 16px !important; }

  .xc-hero-row { gap: 12px; }
  .xc-hero-banner { height: 168px; border-radius: 16px; }
  .xc-hero-title { font-size: 22px; }
  .xc-hero-content { padding: 20px; }
  .xc-user-card { border-radius: 16px; }
  .xc-quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .xc-quick-card { border-radius: 14px; min-height: 0; }
  .xc-quick-inner { padding: 16px; }
  .xc-quick-inner h3 { font-size: 15px; }
  .xc-quick-inner p {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .xc-bottom-grid { gap: 12px; }
  .xc-panel { border-radius: 14px; padding: 14px; }
  .xc-prod-date { display: none; }
  .xc-prod-status { width: auto; }
  .xc-prod-item { grid-template-columns: 40px 1fr auto auto; gap: 10px; padding: 10px 0; }
  .xc-footer { flex-direction: column; gap: 6px; text-align: center; padding: 12px 16px 28px; }

  #xcSpinner { top: 64px; right: 12px; }
  .xc-preview-layer { top: 56px; padding: 14px 12px 28px; }
}

/* ========== SPA progress + spinner ========== */
#xcProgress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 10000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#xcProgress.is-active { opacity: 1; }
#xcProgress .xc-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(120, 104, 230, 0.15), var(--brand) 40%, #a78bfa 100%);
  box-shadow: 0 0 10px rgba(120, 104, 230, 0.45);
  border-radius: 0 2px 2px 0;
  transition: width 0.25s var(--ease-out), opacity 0.3s ease;
}

#xcSpinner {
  position: fixed;
  top: 78px;
  right: 28px;
  z-index: 10000;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.9);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-spring);
}
#xcSpinner.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.xc-spinner-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(120, 104, 230, 0.18);
  border-top-color: var(--brand);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 24px rgba(45, 42, 80, 0.1);
  animation: xcSpin 0.7s linear infinite;
}
@keyframes xcSpin {
  to { transform: rotate(360deg); }
}

/* 切换时不隐藏正文，避免白屏；仅顶栏进度条 + 右上角转圈提示 */
body.xc-spa-loading {
  cursor: progress;
}

/* ========== Details skeleton preview ========== */
@keyframes xcShimmerMove {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.xc-shimmer {
  background: linear-gradient(90deg, #eef1f6 0%, #f7f8fb 45%, #eef1f6 90%);
  background-size: 200% 100%;
  animation: xcShimmerMove 1.2s ease-in-out infinite;
}

.xc-preview-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 120px;
  bottom: 0;
  z-index: 9500;
  background: var(--bg-page);
  padding: 28px 24px 40px;
  overflow: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.xc-preview-layer.is-active {
  opacity: 1;
  pointer-events: auto;
}
.xc-preview-layer .xc-skel-details {
  max-width: 1600px;
  margin: 0 auto;
}

.xc-details-page {
  position: relative;
  min-height: 480px;
}
.xc-skel-details {
  width: 100%;
}
.xc-skel-details.is-hide {
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.xc-details-real {
  transition: opacity 0.3s ease;
}
.xc-details-real.is-show {
  opacity: 1 !important;
}
.xc-details-page.is-ready .xc-skel-details {
  position: absolute;
  inset: 0;
}

.xc-skel-card,
.xc-details-card {
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.xc-skel-block {
  padding: 28px 40px 8px;
}
.xc-skel-block + .xc-skel-block {
  border-top: 1px solid #f3f4f6;
  margin-top: 8px;
  padding-top: 24px;
}
.xc-skel-heading {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 18px;
}
.xc-skel-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
}
.xc-skel-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.xc-skel-field.xc-skel-full { grid-column: 1 / -1; }
.xc-skel-empty { visibility: hidden; }
.xc-skel-label {
  font-size: 13px;
  color: #4b5563;
  font-weight: 500;
}
.xc-skel-input {
  display: block;
  height: 38px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}
.xc-skel-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
}
.xc-skel-box {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
  flex-shrink: 0;
}
.xc-skel-check-text {
  font-size: 13px;
  color: #6b7280;
}
.xc-skel-btn {
  display: block;
  width: 120px;
  height: 38px;
  border-radius: 999px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.xc-details-card .card-body {
  padding: 28px 40px !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}
.xc-details-card .card-body + .card-body {
  border-top: 1px solid #f3f4f6;
}
.xc-details-card .card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
}
.xc-details-card .form-control {
  border-radius: 8px !important;
  border-color: #e5e7eb !important;
  height: 38px;
}
.xc-details-card .btn-primary {
  border-radius: 999px !important;
  padding-left: 28px;
  padding-right: 28px;
  background: var(--brand) !important;
  border-color: var(--brand) !important;
}

/* ========== Tickets abstract skeleton ========== */
.xc-tickets-page { position: relative; min-height: 360px; }
.xc-skel-tickets.is-hide {
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.xc-tickets-page.is-ready .xc-skel-tickets {
  position: absolute;
  inset: 0;
}
.xc-tickets-real {
  transition: opacity 0.28s ease;
}
.xc-tickets-real.is-show { opacity: 1 !important; }

.xc-skel-tickets-card {
  padding: 20px 20px 16px;
  min-height: 420px;
}
.xc-skel-tickets-toolbar {
  margin-bottom: 16px;
}
.xc-skel-pill {
  display: inline-block;
  width: 112px;
  height: 34px;
  border-radius: 999px;
}
.xc-skel-table {
  border: 1px solid #eef0f4;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.xc-skel-thead {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: #f6f7fb;
  border-bottom: 1px solid #eef0f4;
}
.xc-skel-th {
  display: block;
  height: 12px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.xc-skel-tbody { padding: 6px 0 10px; }
.xc-skel-tr {
  display: grid;
  grid-template-columns: 1fr 2.4fr 1.2fr 1.2fr 0.9fr 0.9fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
}
.xc-skel-tr:last-child { border-bottom: none; }
.xc-skel-td {
  display: block;
  height: 12px;
  border-radius: 6px;
  width: 72%;
}
.xc-skel-td.w-lg { width: 88%; }
.xc-skel-td.w-sm { width: 48%; }
.xc-skel-tickets-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding: 0 4px;
}
.xc-skel-foot-left {
  display: block;
  width: 64px;
  height: 12px;
  border-radius: 6px;
}
.xc-skel-foot-right {
  display: block;
  width: 96px;
  height: 28px;
  border-radius: 8px;
}

@media (max-width: 767.98px) {
  .xc-preview-layer { top: 112px; padding: 16px; }
  .xc-skel-row { grid-template-columns: 1fr; }
  .xc-skel-empty { display: none; }
  .xc-skel-block { padding: 20px 16px 4px; }
  .xc-details-card .card-body { padding: 20px 16px !important; }
  .xc-skel-tr { grid-template-columns: 1fr 1fr; }
  .xc-skel-tr .xc-skel-td:nth-child(n+3) { display: none; }
  .xc-skel-thead .xc-skel-th:nth-child(n+3) { display: none; }
}

@media (max-width: 767.98px) {
  #xcSpinner { top: 70px; right: 16px; }
}

/* ========== Addfunds / 充值 ========== */
.xc-af-page { animation: xcFadeIn 0.35s var(--ease) both; }
.xc-af-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.xc-af-balance.card,
.xc-af-main.card {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  background: var(--surface);
}
.xc-af-balance {
  padding: 28px 24px;
  text-align: left;
}
.xc-af-balance-label {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-sub);
}
.xc-af-balance-value {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.xc-af-balance-value span {
  font-size: 18px;
  font-weight: 600;
  margin-left: 4px;
  color: var(--text-main);
}
.xc-af-balance-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-sub);
}
.xc-af-main .card-body { padding: 28px 32px 32px; }
.xc-af-title {
  margin: 0 0 28px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}
.xc-af-section { margin-bottom: 28px; }
.xc-af-section-last { margin-bottom: 0; }
.xc-af-label {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}
.xc-af-gateways {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.xc-af-gw { cursor: pointer; }
.xc-af-page .addfunds-payment {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  min-height: 52px;
  padding: 10px 20px;
  margin: 0;
  border: 1.5px solid var(--xc-border);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.xc-af-page .addfunds-payment:hover {
  border-color: var(--xc-primary);
}
.xc-af-page .addfunds-payment.active {
  border-color: var(--xc-primary);
  background: var(--xc-primary-soft);
  box-shadow: 0 0 0 1px rgba(120, 104, 230, 0.15);
}
.xc-af-page .addfunds-payment img {
  height: 28px;
  max-width: 110px;
  object-fit: contain;
}
.xc-af-gw-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}
.xc-af-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.xc-af-quick-btn {
  min-width: 88px;
  height: 40px;
  padding: 0 18px;
  border: 1.5px solid #34D399;
  border-radius: 8px;
  background: #fff;
  color: #10B981;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.xc-af-quick-btn:hover {
  background: #ECFDF5;
}
.xc-af-quick-btn.is-active {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}
.xc-af-custom {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.xc-af-input.form-control {
  flex: 1;
  height: 46px !important;
  border: 1px solid var(--xc-border) !important;
  border-radius: 10px !important;
  font-size: 14px;
  box-shadow: none !important;
  background: #fff;
}
.xc-af-input.form-control:focus {
  border-color: var(--xc-primary) !important;
  box-shadow: 0 0 0 3px rgba(120, 104, 230, 0.12) !important;
}
.xc-af-submit.btn,
.xc-af-page .pay-now-btn {
  flex: 0 0 auto;
  min-width: 96px;
  height: 46px;
  padding: 0 28px;
  border: none;
  border-radius: 10px;
  background: var(--xc-primary) !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 46px;
  box-shadow: none;
}
.xc-af-submit.btn:hover,
.xc-af-page .pay-now-btn:hover {
  background: var(--xc-primary-dark) !important;
  color: #fff !important;
}
.xc-af-tip {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--text-sub);
}

@media (max-width: 991.98px) {
  .xc-af-layout { grid-template-columns: 1fr; }
  .xc-af-balance { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 20px 22px; }
  .xc-af-balance-label { margin: 0; width: 100%; }
  .xc-af-balance-value { margin: 0; font-size: 28px; }
  .xc-af-balance-hint { margin: 0; }
}
@media (max-width: 575.98px) {
  .xc-af-main .card-body { padding: 22px 18px 24px; }
  .xc-af-custom { flex-direction: column; }
  .xc-af-submit.btn { width: 100%; }
  .xc-af-quick-btn { flex: 1 1 calc(50% - 12px); min-width: 0; }
}

/* 减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  .xc-topbar,
  .xc-brand,
  .xc-search,
  .xc-top-actions,
  .xc-nav-item,
  .xc-nav-links > .xc-nav-link,
  .xc-main,
  .xc-page-inner,
  .xc-hero-row,
  .xc-quick-grid,
  .xc-bottom-grid,
  .xc-dash,
  body.xc-app:not(.xc-dash-page) .xc-page-inner .card,
  body.xc-app:not(.xc-dash-page) .xc-page-inner > .row > [class*="col-"],
  body.xc-app .page-title-box {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .xc-nav-drop,
  .xc-nav-drop a,
  .xc-quick-card,
  .xc-panel,
  .xc-poster,
  .xc-prod-item,
  .xc-act-item,
  .xc-icon-btn,
  .xc-nav-link {
    transition: none !important;
  }
  .xc-spinner-ring { animation: none !important; }
  .xc-page-wrap { transition: none !important; }
}

/* ========== Ticket submit ========== */
.xc-ticket-submit { display: flex; flex-direction: column; gap: 18px; }
.xc-ticket-hero {
  border-radius: 20px;
  background: linear-gradient(135deg, #F3F0FF 0%, #F7F8FC 55%, #EEF6FF 100%);
  border: 1px solid rgba(120, 104, 230, 0.08);
  padding: 36px 28px;
}
.xc-ticket-hero-inner { max-width: 720px; }
.xc-ticket-hero-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand);
  text-transform: uppercase;
}
.xc-ticket-hero-title {
  margin: 0;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  color: #1F2937;
  line-height: 1.35;
}
.xc-ticket-hero-sub {
  margin: 10px 0 0;
  font-size: 14px;
  color: #6B7280;
  line-height: 1.7;
}
.xc-ticket-dept-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.xc-ticket-dept {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 148px;
  padding: 18px 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #EEF0F4;
  text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.xc-ticket-dept:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  border-color: rgba(120, 104, 230, 0.22);
}
.xc-ticket-dept-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.xc-ticket-dept.tone-blue .xc-ticket-dept-ico { background: #E8F1FF; color: #3B82F6; }
.xc-ticket-dept.tone-teal .xc-ticket-dept-ico { background: #E6FAF7; color: #14B8A6; }
.xc-ticket-dept.tone-amber .xc-ticket-dept-ico { background: #FFF4E5; color: #F59E0B; }
.xc-ticket-dept.tone-green .xc-ticket-dept-ico { background: #EAF8EF; color: #22C55E; }
.xc-ticket-dept.tone-slate .xc-ticket-dept-ico { background: #F3F4F6; color: #6B7280; }
.xc-ticket-dept-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}
.xc-ticket-dept-desc {
  font-size: 12px;
  color: #9CA3AF;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.xc-ticket-help { display: flex; flex-direction: column; gap: 14px; }
.xc-ticket-help-card,
.xc-ticket-tip {
  background: #fff;
  border: 1px solid #EEF0F4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.xc-ticket-help-card { padding: 8px 8px 4px; }
.xc-ticket-help-title {
  margin: 0;
  padding: 14px 16px 8px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.xc-ticket-faq-item { border-top: 1px solid #F3F4F6; }
.xc-ticket-faq-item:first-child { border-top: none; }
.xc-ticket-faq-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}
.xc-ticket-faq-btn i {
  color: #9CA3AF;
  transition: transform 0.2s ease;
}
.xc-ticket-faq-btn:not(.collapsed) i { transform: rotate(180deg); color: var(--brand); }
.xc-ticket-faq-body {
  padding: 0 16px 14px;
  color: #6B7280;
  font-size: 13px;
  line-height: 1.75;
}
.xc-ticket-faq-body p { margin: 0 0 8px; }
.xc-ticket-faq-body p:last-child { margin-bottom: 0; }
.xc-ticket-tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.xc-ticket-tip { padding: 18px 18px 14px; }
.xc-ticket-tip h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.xc-ticket-tip ul {
  margin: 0;
  padding-left: 18px;
  color: #6B7280;
  font-size: 13px;
  line-height: 1.8;
}

/* ========== Account shell ========== */
.xc-account-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.xc-account-nav {
  position: sticky;
  top: 132px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: #fff;
  border: 1px solid #EEF0F4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.xc-account-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: #6B7280 !important;
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.xc-account-nav-item i { font-size: 17px; }
.xc-account-nav-item:hover {
  background: #F5F6F8;
  color: #111827 !important;
}
.xc-account-nav-item.is-on {
  background: var(--brand);
  color: #fff !important;
}
.xc-account-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.xc-account-profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #EEF0F4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.xc-account-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #9B8CF0);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.xc-account-profile-meta { flex: 1; min-width: 0; }
.xc-account-profile-meta h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.xc-account-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.xc-account-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
}
.xc-account-muted {
  margin: 0;
  font-size: 12px;
  color: #9CA3AF;
}
.xc-account-profile-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand) !important;
  text-decoration: none !important;
}
.xc-details-page .xc-details-card {
  border: 1px solid #EEF0F4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  overflow: hidden;
}
.xc-details-page .xc-details-card .card-body {
  padding: 22px 22px 8px;
  border-top: 1px solid #F3F4F6;
}
.xc-details-page .xc-details-card .card-body:first-child { border-top: none; }
.xc-details-page .xc-details-card .card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

/* account pages: soften legacy security blue header */
.xc-account-shell .security-header.bg-primary {
  background: linear-gradient(135deg, #7868E6 0%, #6A5AE0 100%) !important;
  border-radius: 16px;
  border: none;
  overflow: hidden;
}
.xc-account-shell > .xc-account-main > .card,
.xc-account-shell .xc-account-main > .card {
  border: 1px solid #EEF0F4;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.xc-account-shell .nav-tabs {
  border-bottom: 1px solid #EEF0F4;
}
.xc-account-shell .nav-tabs .nav-link {
  border: none;
  color: #6B7280;
  font-weight: 500;
  border-radius: 8px 8px 0 0;
}
.xc-account-shell .nav-tabs .nav-link.active {
  color: var(--brand);
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--brand);
}

@media (max-width: 1199.98px) {
  .xc-ticket-dept-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
  .xc-account-shell { grid-template-columns: 1fr; }
  .xc-account-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .xc-account-nav-item { flex: 0 0 auto; white-space: nowrap; }
  .xc-ticket-tips { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .xc-ticket-hero { padding: 24px 18px; border-radius: 16px; }
  .xc-ticket-dept-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .xc-account-profile-card { flex-wrap: wrap; }
}
@media (max-width: 575.98px) {
  .xc-ticket-dept-grid { grid-template-columns: 1fr; }
}
