:root {
  --pc-sidebar: 256px;
  --pc-topbar: 68px;
  --pc-bg: #111416;
  --pc-panel: #181c1f;
  --pc-line: rgba(255,255,255,.09);
  --pc-gold: #d9b86d;
  --pc-mint: #60d2b0;
}

body {
  background:
    radial-gradient(circle at 72% -10%, rgba(50,113,99,.22), transparent 36%),
    var(--pc-bg);
}

.desktop-shell { min-height: 100vh; }
.desktop-sidebar, .desktop-topbar { display: none; }

.site-loading {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 9px; background: #171a1c; color: #f5f5f2;
}
.loading-mark {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(145deg,#e3c47c,#9d7734); color: #171a1c;
  font-size: 26px; font-weight: 900; box-shadow: 0 14px 40px rgba(217,184,109,.2);
}
.site-loading strong { margin-top: 10px; font-size: 16px; }
.site-loading small { color: #858c8b; }

@media (min-width: 900px) {
  html, body { min-width: 1024px; background: var(--pc-bg); }
  body { overflow: hidden; }
  #app { display: contents; }
  .desktop-shell { display: grid; grid-template-columns: var(--pc-sidebar) 1fr; min-height: 100vh; color: #eee; }

  .desktop-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 220; display: flex; width: var(--pc-sidebar);
    flex-direction: column; padding: 28px 18px 22px; border-right: 1px solid var(--pc-line);
    background: rgba(16,19,21,.94); backdrop-filter: blur(24px);
  }
  .brand-block {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 10px 28px;
    border: 0; border-bottom: 1px solid var(--pc-line); background: transparent; color: #fff; text-align: left;
  }
  .brand-symbol {
    display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px;
    background: linear-gradient(145deg,#e6ca86,#9d7734); color: #17191a; font-size: 20px; font-weight: 900;
  }
  .brand-block strong, .brand-block small { display: block; }
  .brand-block strong { font-size: 17px; letter-spacing: .12em; }
  .brand-block small { margin-top: 3px; color: #717977; font-size: 8px; letter-spacing: .18em; }

  .desktop-sidebar .tab-bar {
    position: static !important; transform: none !important; display: flex !important; width: auto !important;
    max-width: none !important; height: auto !important; flex-direction: column; align-items: stretch;
    gap: 8px; margin-top: 28px; padding: 0; border: 0; background: transparent; box-shadow: none;
  }
  .desktop-sidebar .tab-item {
    position: relative; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: 23px 18px;
    align-items: center; justify-content: start; width: 100%; min-height: 66px; padding: 11px 12px;
    gap: 0 8px; border: 1px solid transparent; border-radius: 13px; background: transparent;
    color: #8d9492; text-align: left; transition: .2s ease;
  }
  .desktop-sidebar .tab-item i { grid-row: 1 / 3; margin: 0; font-size: 17px; text-align: center; }
  .desktop-sidebar .tab-item span { color: inherit; font-size: 14px; font-weight: 700; }
  .desktop-sidebar .tab-item small { color: #5e6664; font-size: 10px; }
  .desktop-sidebar .tab-item:hover { background: rgba(255,255,255,.035); color: #ddd; }
  .desktop-sidebar .tab-item.active {
    border-color: rgba(217,184,109,.18); background: linear-gradient(100deg,rgba(217,184,109,.14),rgba(217,184,109,.035));
    color: var(--pc-gold);
  }
  .desktop-sidebar .tab-item.active::before {
    content: ""; position: absolute; left: -19px; width: 3px; height: 30px; border-radius: 0 4px 4px 0; background: var(--pc-gold);
  }
  .desktop-sidebar .tab-item.active small { color: #9a8d6c; }
  .desktop-sidebar .badge { top: 11px; right: 12px; }
  .sidebar-trust {
    display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 14px;
    border: 1px solid var(--pc-line); border-radius: 13px; background: rgba(255,255,255,.025); color: var(--pc-mint);
  }
  .sidebar-trust i { font-size: 20px; }
  .sidebar-trust strong, .sidebar-trust span { display: block; }
  .sidebar-trust strong { color: #d8dcdb; font-size: 12px; }
  .sidebar-trust span { margin-top: 2px; color: #666e6c; font-size: 9px; }

  .desktop-workspace { grid-column: 2; min-width: 0; }
  .desktop-topbar {
    position: fixed; top: 0; right: 0; left: var(--pc-sidebar); z-index: 190; display: flex; height: var(--pc-topbar);
    align-items: center; justify-content: space-between; padding: 0 34px; border-bottom: 1px solid var(--pc-line);
    background: rgba(17,20,22,.82); color: #8d9592; font-size: 12px; backdrop-filter: blur(22px);
  }
  .live-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: #49c899; box-shadow: 0 0 0 5px rgba(73,200,153,.1); }
  .topbar-actions { display: flex; gap: 8px; }
  .topbar-actions button {
    height: 36px; padding: 0 14px; border: 1px solid var(--pc-line); border-radius: 9px;
    background: rgba(255,255,255,.025); color: #b4bbb8; font-size: 12px;
  }
  .topbar-actions button:hover { border-color: rgba(217,184,109,.35); color: #fff; }
  .topbar-actions .login-chip { border-color: rgba(96,210,176,.22); color: #72d8b9; }
  .topbar-actions i { margin-right: 6px; }

  .main-content {
    height: 100vh; margin: 0 !important; padding-top: var(--pc-topbar); overflow-y: auto;
    background: transparent !important; scrollbar-width: thin; scrollbar-color: #3b4240 transparent;
  }
  .main-content > .page:not(.desktop-auth-page) { width: min(1240px, calc(100% - 72px)); min-height: calc(100vh - var(--pc-topbar)); margin: 0 auto; }
  .catalog-page { max-width: none !important; padding: 34px 0 64px !important; background: transparent !important; }
  .catalog-page .hero-carousel {
    height: min(34vw, 385px); margin: 0 0 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.1);
    border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
  }
  .catalog-page .carousel-slide { min-height: 100%; }
  .catalog-page .hero-text { font-size: clamp(23px,2.4vw,40px); text-shadow: 0 3px 22px rgba(0,0,0,.65); }
  .carousel-arrow { opacity: .72; }
  .carousel-arrow:hover { opacity: 1; transform: translateY(-50%) scale(1.06); }

  .catalog-tax-notice { height: 38px; margin: 0 0 22px; border-color: rgba(217,184,109,.14); border-radius: 10px; background: rgba(217,184,109,.055) !important; }
  .catalog-quick-actions {
    grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 42px; padding: 16px;
    border-color: var(--pc-line); border-radius: 16px; background: rgba(255,255,255,.025) !important;
  }
  .catalog-quick-action { min-height: 96px; flex-direction: row; justify-content: center; gap: 13px; border-radius: 12px; font-size: 13px; transition: .2s ease; }
  .catalog-quick-action:hover { background: rgba(255,255,255,.045); transform: translateY(-2px); }
  .catalog-quick-action img { width: 48px; height: 48px; }
  .catalog-intro { margin-bottom: 20px; align-items: center; }
  .catalog-intro h1 { font-size: 30px; letter-spacing: -.03em; }
  .catalog-intro p { font-size: 12px; }
  .catalog-kicker { color: var(--pc-gold); letter-spacing: .12em; }
  .catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 20px !important; }
  .catalog-card { border-radius: 16px; transition: transform .24s ease,border-color .24s ease,box-shadow .24s ease; }
  .catalog-card:hover { transform: translateY(-6px); border-color: rgba(217,184,109,.32); box-shadow: 0 22px 45px rgba(0,0,0,.34); }
  .catalog-image { aspect-ratio: 1.65/1; }
  .catalog-image-error { position: absolute; inset: 0; opacity: 0; transition: opacity .2s ease; }
  .catalog-body { padding: 18px; }
  .catalog-title-row h2 { font-size: 17px; }
  .catalog-body > p { min-height: 42px; margin: 12px 0 16px; font-size: 13px; }
  .catalog-action { padding-top: 14px; border-top: 1px solid var(--pc-line); }
  .catalog-action strong { color: var(--pc-gold) !important; font-size: 21px; }
  .catalog-action button { height: 36px; padding: 0 14px; border-radius: 9px; background: #326f63; }

  .messages-page, .profile-page, .orders-page, .wallet-page, .recruit-page, .complaints-page,
  .service-detail, .order-form, .customer-service-page { padding: 34px 0 60px !important; background: transparent !important; }
  .message-page-toolbar, .profile-header, .profile-notice, .profile-menu, .profile-wallet-card,
  .order-card, .wallet-balance-card, .wallet-bonus-section, .wallet-history-section, .wallet-rules-section,
  .recruit-banner, .recruit-gender-tabs, .recruit-tier-card, .service-detail-info, .order-form-card, .service-summary {
    max-width: 980px; margin-right: auto !important; margin-left: auto !important;
  }
  .message-item { border-radius: 14px; }
  .profile-header { min-height: 180px; border-radius: 20px; overflow: hidden; }
  .profile-menu { border-radius: 16px; overflow: hidden; }
  .logout-btn { max-width: 980px; margin: 22px auto !important; }
  .back-header {
    position: sticky !important; top: 0 !important; width: 100%; max-width: 980px; margin: 0 auto 24px !important;
    border: 1px solid var(--pc-line); border-radius: 13px; background: rgba(28,32,34,.92) !important; backdrop-filter: blur(18px);
  }
  .back-header + div { margin-top: 0 !important; }
  .modal-content { max-width: 520px; max-height: 86vh; border-radius: 18px; }
  .modal-content .modal-header h3 { color: #26302d; }
  .toast { bottom: 30px; }

  .desktop-auth-page {
    position: fixed; inset: 0; z-index: 300; width: 100% !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important;
  }
  .desktop-login-panel { grid-template-columns: minmax(0,1.25fr) minmax(420px,.75fr); }
  .desktop-login-intro {
    align-items: flex-start;
    padding: clamp(64px, 8vh, 96px) clamp(72px, 8vw, 144px);
    background:
      radial-gradient(circle at 18% 18%,rgba(217,184,109,.16),transparent 28%),
      linear-gradient(145deg,#111719,#163330);
  }
  .desktop-brand-mark {
    width: 64px; height: 64px; flex: 0 0 64px; border-radius: 19px;
    background: linear-gradient(145deg,#efd38d,#c89d48); color: #142421;
    font-size: 31px; box-shadow: 0 16px 36px rgba(0,0,0,.24);
  }
  .desktop-eyebrow {
    margin-top: 30px; color: #d9deda; font-size: 13px; font-weight: 600;
    letter-spacing: .3em; opacity: .82;
  }
  .desktop-login-intro h1 {
    margin: 14px 0 20px; max-width: 680px; color: #fff;
    font-size: clamp(40px, 3.15vw, 56px); font-weight: 760; line-height: 1.14;
    letter-spacing: -.045em;
  }
  .desktop-login-intro p {
    max-width: 620px; color: rgba(237,243,240,.72);
    font-size: 17px; line-height: 1.85; letter-spacing: .01em;
  }
  .desktop-login-features {
    display: flex; flex-wrap: wrap; gap: 10px; margin-top: 42px;
    color: rgba(246,248,247,.88); font-size: 13px;
  }
  .desktop-login-features span {
    display: inline-flex; height: 40px; align-items: center; gap: 8px;
    padding: 0 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px;
    background: rgba(255,255,255,.045);
  }
  .desktop-login-features i { margin: 0; color: var(--pc-gold); font-size: 14px; }
  .desktop-qr-card { background: #f2f3ef; }
}

@media (min-width: 900px) and (max-width: 1280px) {
  .desktop-login-intro { padding-right: 64px; padding-left: 64px; }
  .desktop-login-intro h1 { font-size: 42px; }
  .desktop-login-intro p { max-width: 520px; font-size: 15px; }
}

@media (min-width: 1500px) {
  :root { --pc-sidebar: 278px; }
  .main-content > .page:not(.desktop-auth-page) { width: min(1320px, calc(100% - 96px)); }
  .catalog-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; }
}

@media (max-width: 899px) {
  .desktop-workspace { display: contents; }
  .desktop-sidebar { display: contents; }
  .brand-block, .sidebar-trust, .desktop-topbar, .tab-item small { display: none; }
  .desktop-sidebar .tab-bar { display: flex; }
  .desktop-sidebar .tab-item { border: 0; background: transparent; }
}
