:root {
  --pro-bg: #07100f;
  --pro-ink: #eef4ea;
  --pro-muted: #9fac9f;
  --pro-soft: rgba(238, 244, 234, 0.08);
  --pro-panel: rgba(13, 22, 20, 0.9);
  --pro-panel-strong: rgba(17, 28, 25, 0.96);
  --pro-line: rgba(204, 183, 112, 0.28);
  --pro-line-strong: rgba(229, 197, 92, 0.68);
  --pro-gold: #e5c55c;
  --pro-gold-soft: #b59746;
  --pro-green: #56d8b2;
  --pro-red: #ff706c;
}

html {
  background: var(--pro-bg);
}

body.front-body {
  color: var(--pro-ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background:
    radial-gradient(circle at 9% 12%, rgba(86, 216, 178, 0.13), transparent 24%),
    radial-gradient(circle at 88% 0%, rgba(229, 197, 92, 0.18), transparent 25%),
    linear-gradient(180deg, rgba(6, 13, 13, 0.74), rgba(6, 13, 13, 0.88)),
    var(--operator-background) center top / cover fixed no-repeat;
}

.front-dashboard-shell {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
}

.front-sidebar {
  grid-template-columns: minmax(300px, 420px) minmax(520px, 1fr) minmax(320px, 460px);
  height: 78px;
  min-height: 78px;
  padding: 0 max(24px, calc((100vw - 1500px) / 2));
  border-bottom: 1px solid var(--pro-line-strong);
  background: rgba(6, 12, 12, 0.86);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.front-sidebar::after {
  width: min(32vw, 520px);
  height: 78px;
  background: linear-gradient(110deg, rgba(63, 74, 55, 0.84), rgba(184, 151, 56, 0.86));
  clip-path: polygon(17% 0, 100% 0, 92% 100%, 0 100%);
}

.front-sidebar .brand {
  gap: 12px;
}

.front-sidebar .brand-mark {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(229, 197, 92, 0.62);
  border-radius: 6px;
  background:
    linear-gradient(145deg, rgba(229, 197, 92, 0.9), rgba(83, 96, 69, 0.92));
  color: #07100f;
}

.front-sidebar h1 {
  max-width: 300px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.front-sidebar .top-nav {
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: center;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.front-sidebar .top-nav > .top-nav-group > a,
.front-sidebar .top-nav > a,
.front-sidebar .top-nav > button {
  gap: 7px;
  min-width: 78px;
  min-height: 42px;
  max-width: 126px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 6px;
  background: rgba(8, 14, 14, 0.22);
  color: rgba(238, 244, 234, 0.72);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.front-sidebar .top-nav > .top-nav-group > a::after,
.front-sidebar .top-nav > a::after,
.front-sidebar .top-nav > button::after {
  display: none;
}

.front-sidebar .top-nav > .top-nav-group > a:hover,
.front-sidebar .top-nav > .top-nav-group > a.is-active,
.front-sidebar .top-nav > a:hover,
.front-sidebar .top-nav > a.is-active,
.front-sidebar .top-nav > button:hover,
.front-sidebar .top-nav > button.is-active {
  border-color: rgba(229, 197, 92, 0.34);
  background: rgba(229, 197, 92, 0.13);
  color: #fff8dc;
}

.front-sidebar .top-nav > a svg,
.front-sidebar .top-nav > button svg,
.front-sidebar .top-nav > .top-nav-group > a svg {
  flex: 0 0 auto;
}

.front-sidebar .top-nav > #tutorialBtn {
  min-width: 98px;
}

.front-sidebar .top-nav > .history-main-link {
  min-width: 96px;
}

.front-sidebar .front-subnav {
  top: calc(100% + 12px);
  min-width: 360px;
  border-color: rgba(229, 197, 92, 0.34);
  background: rgba(8, 14, 14, 0.98);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.44);
}

.front-sidebar .top-nav .top-nav-group > a.is-active + .front-subnav {
  display: none !important;
}

.front-sidebar .top-nav .top-nav-group:hover > .front-subnav,
.front-sidebar .top-nav .top-nav-group:focus-within > .front-subnav {
  display: grid !important;
}

.front-sidebar .top-nav .top-nav-group:hover > a.is-active + .front-profile-subnav,
.front-sidebar .top-nav .top-nav-group:focus-within > a.is-active + .front-profile-subnav {
  display: grid !important;
}

.front-sidebar .top-nav:has(.top-nav-group:hover) .top-nav-group:not(:hover) > .front-subnav,
.front-sidebar .top-nav:has(.top-nav-group:focus-within) .top-nav-group:not(:focus-within) > .front-subnav {
  display: none !important;
}

.front-sidebar-bottom {
  gap: 12px;
}

.front-sidebar-bottom .nav-user {
  min-width: 108px;
  min-height: 42px;
  border-color: rgba(238, 244, 234, 0.72);
  background: rgba(5, 10, 10, 0.28);
}

.front-primary-contact {
  min-width: 158px;
  min-height: 42px;
  border: 1px solid rgba(255, 244, 207, 0.64);
  background: linear-gradient(180deg, #ffe083, #d7a934);
}

.front-dashboard-shell > .view {
  width: min(1500px, calc(100% - 48px));
  padding-top: 28px;
}

.home-market-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border-color: var(--pro-line);
  border-radius: 8px;
  background: rgba(8, 14, 14, 0.74);
  backdrop-filter: blur(10px);
}

.home-market-tabs a {
  position: relative;
  justify-content: flex-start;
  min-height: 58px;
  padding: 0 18px;
  border-color: rgba(238, 244, 234, 0.1);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(238, 244, 234, 0.075), rgba(238, 244, 234, 0.035));
  color: #dce7d8;
  font-size: 15px;
}

.home-market-tabs a::before {
  width: 3px;
  height: 28px;
  border-radius: 99px;
  background: rgba(229, 197, 92, 0.42);
  content: "";
}

.home-market-tabs a:hover,
.home-market-tabs a.is-active {
  border-color: rgba(229, 197, 92, 0.84);
  background:
    linear-gradient(180deg, rgba(229, 197, 92, 0.2), rgba(86, 216, 178, 0.08));
  color: #fff8dc;
  box-shadow: inset 0 0 0 1px rgba(229, 197, 92, 0.16);
}

.front-dashboard-shell .panel,
.front-dashboard-shell .wallet-metric,
.front-dashboard-shell .chaiche-card {
  border: 1px solid var(--pro-line);
  border-radius: 8px;
  background: var(--pro-panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
}

.front-dashboard-shell #hallView .panel,
.front-dashboard-shell #profileView .panel,
.front-dashboard-shell #profileView .wallet-metric {
  background:
    linear-gradient(180deg, rgba(21, 34, 31, 0.96), rgba(8, 15, 14, 0.94));
}

.front-dashboard-shell #hallView .panel-header,
.front-dashboard-shell #hallView .chaiche-head,
.front-dashboard-shell #profileView .panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(229, 197, 92, 0.3);
  background:
    linear-gradient(90deg, rgba(35, 48, 41, 0.98), rgba(11, 18, 17, 0.96));
}

.front-dashboard-shell .panel-title,
.front-dashboard-shell #hallView .chaiche-head h2 {
  color: #fff8dc;
  font-size: 18px;
  font-weight: 900;
}

.front-dashboard-shell .panel-title svg,
.front-dashboard-shell #hallView .chaiche-head h2 svg {
  color: var(--pro-gold);
}

.front-dashboard-shell #hallView .filters,
.front-dashboard-shell #profileView .filters {
  gap: 10px;
}

.front-dashboard-shell #hallView input,
.front-dashboard-shell #hallView select,
.front-dashboard-shell #hallView .search,
.front-dashboard-shell #profileView input,
.front-dashboard-shell #profileView select,
.front-dashboard-shell #profileView textarea,
.front-dashboard-shell #profileView .search {
  min-height: 40px;
  border: 1px solid rgba(86, 216, 178, 0.24);
  border-radius: 5px;
  background: rgba(4, 10, 10, 0.78);
  color: #eef4ea;
}

.front-dashboard-shell #hallView input:focus,
.front-dashboard-shell #hallView select:focus,
.front-dashboard-shell #profileView input:focus,
.front-dashboard-shell #profileView select:focus,
.front-dashboard-shell #profileView textarea:focus {
  border-color: rgba(229, 197, 92, 0.72);
  box-shadow: 0 0 0 2px rgba(229, 197, 92, 0.16);
}

.sort-tabs {
  gap: 9px;
  padding: 12px 18px;
  border-bottom-color: rgba(229, 197, 92, 0.18);
  background: rgba(5, 10, 10, 0.66);
}

.sort-tabs button {
  min-height: 36px;
  border: 1px solid rgba(238, 244, 234, 0.16);
  border-radius: 5px;
  background: rgba(238, 244, 234, 0.04);
  color: rgba(238, 244, 234, 0.74);
}

.sort-tabs button:hover,
.sort-tabs button.is-active {
  border-color: rgba(229, 197, 92, 0.78);
  background: rgba(229, 197, 92, 0.16);
  color: #fff8dc;
}

.intel-board,
#profileView .table-wrap,
.chaiche-grid {
  background: rgba(4, 10, 10, 0.4);
}

.intel-board table,
#profileView table {
  border-collapse: separate;
  border-spacing: 0;
}

.intel-board thead,
#profileView thead {
  background: rgba(5, 10, 10, 0.94);
}

.intel-board th,
#profileView th {
  color: #bff9e7;
  font-size: 12px;
}

.intel-board tr,
#profileView tbody tr {
  border-color: rgba(229, 197, 92, 0.15);
  background: rgba(238, 244, 234, 0.055);
}

.intel-board tr:hover,
#profileView tbody tr:hover {
  background: rgba(229, 197, 92, 0.11);
}

.intel-board td,
#profileView td {
  color: #edf4ea;
}

.chaiche-card {
  border-color: rgba(229, 197, 92, 0.25);
  background: rgba(11, 18, 17, 0.9);
}

.chaiche-cover {
  background:
    linear-gradient(135deg, rgba(229, 197, 92, 0.24), rgba(86, 216, 178, 0.1)),
    linear-gradient(90deg, rgba(10, 19, 17, 0.3), rgba(4, 10, 10, 0.9));
}

.button.primary,
#profileView .button.primary,
#hallView .button.primary {
  border-color: rgba(255, 232, 145, 0.74);
  border-radius: 5px;
  background: linear-gradient(180deg, #f3d46b, #b88c2e);
  color: #07100f;
  font-weight: 900;
}

.button.ghost,
#profileView .button.ghost,
#profileView .icon-only,
#hallView .icon-only {
  border-color: rgba(238, 244, 234, 0.16);
  border-radius: 5px;
  background: rgba(238, 244, 234, 0.05);
  color: #eaf2e7;
}

.button.ghost:hover,
#profileView .button.ghost:hover,
#profileView .icon-only:hover,
#hallView .icon-only:hover {
  border-color: rgba(229, 197, 92, 0.68);
  color: #fff8dc;
}

#profileView .compact-publish {
  padding: 14px;
}

#profileView .compact-form {
  gap: 10px;
}

#profileView label {
  color: #b8c9bd;
  font-size: 12px;
  font-weight: 800;
}

#profileView .mine-posts-panel .panel-header {
  min-height: 72px;
}

#profileView .mine-posts-panel td {
  height: 50px;
}

#profileView .mine-posts-panel .row-actions .icon-only {
  background: rgba(4, 10, 10, 0.68);
}

.site-footer {
  background:
    linear-gradient(180deg, rgba(14, 18, 18, 0.98), rgba(7, 10, 10, 1)) !important;
}

.site-footer-main {
  width: min(1220px, calc(100% - 64px));
}

.site-footer-column > strong,
.site-footer-brand .dev-logo span {
  color: #fff8dc;
}

.site-footer-brand .dev-logo svg,
.site-footer-brand .dev-logo strong,
.site-footer-column a:hover,
.site-footer-column button:hover {
  color: var(--pro-gold);
}

.site-footer-code > span {
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
}

@media (max-width: 1120px) {
  .front-sidebar {
    grid-template-columns: minmax(220px, 300px) minmax(420px, 1fr) minmax(110px, 230px);
    padding-inline: 18px;
  }

  .front-sidebar .top-nav > .top-nav-group > a,
  .front-sidebar .top-nav > button {
    min-width: 74px;
    padding-inline: 9px;
    font-size: 13px;
  }
}

@media (max-width: 760px) {
  .front-sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .front-sidebar .top-nav {
    padding: 4px;
  }

  .front-dashboard-shell > .view {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  .home-market-tabs {
    grid-template-columns: 1fr;
  }

  .home-market-tabs a {
    min-height: 48px;
  }
}
