:root {
  --terminal-header: #303531;
  --terminal-header-deep: #232923;
  --terminal-blue: #b8aa78;
  --terminal-blue-strong: #d2b45d;
  --terminal-olive: #71805e;
  --terminal-ink: #18232d;
  --terminal-panel: rgba(245, 248, 251, 0.94);
  --terminal-footer: #282b2e;
  --terminal-footer-line: #44494d;
}

html {
  min-height: 100%;
  background: #17222b;
}

body.front-body {
  --operator-background: url("assets/operator-luna.jpg");
  min-height: 100vh;
  background:
    linear-gradient(rgba(20, 30, 38, 0.64), rgba(22, 34, 42, 0.74)),
    var(--operator-background) center top / cover fixed no-repeat;
}

body.front-body[data-operator-bg="weilong"] {
  --operator-background: url("assets/operator-weilong.jpg");
}

body.front-body[data-operator-bg="medic"] {
  --operator-background: url("assets/operator-medic.jpg");
}

body.front-body[data-operator-bg="hacker"] {
  --operator-background: url("assets/operator-hacker.jpg");
}

body.front-body[data-operator-bg="nitrogen"] {
  --operator-background: url("assets/operator-nitrogen.jpg");
}

.front-dashboard-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.front-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(240px, 330px) minmax(460px, 1fr) minmax(250px, 330px);
  align-items: center;
  width: 100%;
  height: 84px;
  min-height: 84px;
  margin: 0;
  padding: 0 64px 0 max(24px, calc((100vw - 1320px) / 2));
  overflow: visible;
  border: 0;
  border-bottom: 4px solid #a49462;
  background:
    linear-gradient(90deg, rgba(21, 27, 22, 0.72), rgba(48, 53, 49, 0.96) 42%, rgba(37, 43, 38, 0.98)),
    var(--terminal-header);
  box-shadow: 0 8px 22px rgba(9, 15, 20, 0.3);
}

.front-sidebar::after {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  width: min(34vw, 530px);
  height: 80px;
  background:
    linear-gradient(110deg, rgba(87, 101, 73, 0.92), rgba(194, 167, 86, 0.9));
  clip-path: polygon(12% 0, 100% 0, 94% 100%, 0 100%);
  content: "";
  pointer-events: none;
}

.front-sidebar .brand,
.front-sidebar .header-actions,
.front-sidebar-bottom {
  position: relative;
  z-index: 1;
}

.front-sidebar .brand {
  display: flex;
  align-items: center;
  width: auto;
  min-width: 0;
  gap: 11px;
}

.front-sidebar .brand-mark {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(145deg, #546244, #c1a25a);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(10, 14, 12, 0.2);
}

.front-sidebar h1 {
  max-width: 230px;
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.front-sidebar .header-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.front-sidebar .top-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
}

.top-nav-group {
  position: relative;
  display: flex;
}

.front-sidebar .top-nav > .top-nav-group > a,
.front-sidebar .top-nav > button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 80px;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.front-sidebar .top-nav > .top-nav-group > a::after,
.front-sidebar .top-nav > button::after {
  position: absolute;
  bottom: 9px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--terminal-blue-strong);
  content: "";
  transform: translateX(-50%);
  transition: width 160ms ease;
}

.front-sidebar .top-nav > .top-nav-group > a:hover,
.front-sidebar .top-nav > .top-nav-group > a.is-active,
.front-sidebar .top-nav > button:hover,
.front-sidebar .top-nav > button.is-active {
  border: 0;
  background: rgba(210, 180, 93, 0.1);
  color: #ffffff;
  box-shadow: none;
}

.front-sidebar .top-nav > .top-nav-group > a:hover::after,
.front-sidebar .top-nav > .top-nav-group > a.is-active::after,
.front-sidebar .top-nav > button:hover::after,
.front-sidebar .top-nav > button.is-active::after {
  width: 18px;
}

.front-sidebar .top-nav svg {
  width: 17px;
  height: 17px;
  color: currentColor;
}

.front-sidebar .front-subnav {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 60;
  display: none;
  grid-template-columns: repeat(2, minmax(138px, 1fr));
  width: max-content;
  min-width: 310px;
  gap: 5px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(184, 170, 120, 0.45);
  border-radius: 6px;
  background: rgba(38, 43, 37, 0.98);
  box-shadow: 0 16px 35px rgba(7, 12, 16, 0.35);
  transform: translateX(-50%);
}

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

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

.front-sidebar .front-subnav a {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #bdc8d0;
  font-size: 12px;
  box-shadow: none;
}

.front-sidebar .front-subnav a:hover,
.front-sidebar .front-subnav a.is-active {
  border: 0;
  background: rgba(184, 170, 120, 0.16);
  color: #ffffff;
  box-shadow: inset 3px 0 0 var(--terminal-blue);
}

.front-sidebar-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
  gap: 9px;
  margin: 0;
}

.front-sidebar-bottom .nav-user {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 104px;
  min-height: 42px;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(12, 17, 15, 0.42);
  color: #ffffff;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(210, 180, 93, 0.24);
}

.front-sidebar-bottom .nav-user svg {
  grid-row: auto;
  width: 17px;
  height: 17px;
  color: #ffffff;
}

.front-sidebar-bottom .nav-user span {
  display: none;
}

.front-sidebar-bottom .nav-user strong {
  color: #ffffff;
  font-size: 13px;
}

.front-primary-contact {
  display: grid;
  grid-template-columns: auto auto;
  width: auto;
  min-width: 142px;
  min-height: 42px;
  gap: 0 7px;
  align-content: center;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: #f4c95d;
  box-shadow: 0 8px 18px rgba(10, 14, 12, 0.18);
}

.front-primary-contact svg {
  grid-row: span 2;
  align-self: center;
  width: 17px;
  height: 17px;
  color: #171d18;
}

.front-primary-contact span,
.front-primary-contact em {
  display: none;
}

.front-primary-contact strong {
  color: #121712;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.front-dashboard-shell > .view {
  flex: 1 0 auto;
  width: min(1480px, calc(100% - 44px));
  min-width: 0;
  margin: 0 auto;
  padding: 24px 0 0;
}

.front-dashboard-shell > .view:not(.is-active) {
  display: none;
}

.front-dashboard-shell > .view.is-active {
  display: block;
}

.home-market-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(184, 170, 120, 0.4);
  border-radius: 8px;
  background: rgba(19, 27, 25, 0.86);
  box-shadow: 0 15px 42px rgba(7, 16, 24, 0.2);
}

.home-market-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(184, 170, 120, 0.24);
  border-radius: 6px;
  background: rgba(238, 232, 206, 0.06);
  color: rgba(232, 236, 221, 0.82);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.home-market-tabs a:hover,
.home-market-tabs a.is-active {
  border-color: rgba(210, 180, 93, 0.82);
  background:
    linear-gradient(180deg, rgba(210, 180, 93, 0.24), rgba(113, 128, 94, 0.2));
  color: #fff8dc;
}

.home-market-tabs svg {
  width: 17px;
  height: 17px;
  color: var(--terminal-blue-strong);
}

.front-dashboard-shell .panel,
.front-dashboard-shell .wallet-metric,
.front-dashboard-shell .chaiche-card {
  border-color: rgba(184, 170, 120, 0.38);
  background:
    linear-gradient(180deg, rgba(236, 239, 232, 0.95), rgba(220, 226, 216, 0.9));
  box-shadow: 0 15px 42px rgba(7, 16, 24, 0.24);
}

.front-dashboard-shell #hallView .panel {
  overflow: hidden;
  border-color: rgba(184, 170, 120, 0.48);
  background:
    linear-gradient(180deg, rgba(32, 41, 36, 0.96), rgba(20, 28, 27, 0.94));
  color: #edf1e8;
}

.front-dashboard-shell #hallView .panel-header,
.front-dashboard-shell #hallView .chaiche-head {
  border-bottom-color: rgba(184, 170, 120, 0.34);
  background:
    linear-gradient(90deg, rgba(44, 55, 45, 0.96), rgba(25, 34, 32, 0.98));
}

.front-dashboard-shell #hallView .panel-title,
.front-dashboard-shell #hallView .chaiche-head h2 {
  color: #fff8dc;
}

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

.front-dashboard-shell #hallView .chaiche-head p,
.front-dashboard-shell #hallView .material-summary,
.front-dashboard-shell #hallView .chaiche-tag-row,
.front-dashboard-shell #hallView .chaiche-body p {
  color: rgba(226, 232, 214, 0.72);
}

.front-dashboard-shell #hallView .search,
.front-dashboard-shell #hallView .compact-select {
  border-color: rgba(184, 170, 120, 0.32);
  background: rgba(9, 16, 15, 0.64);
  color: #edf1e8;
}

.front-dashboard-shell #hallView .search input,
.front-dashboard-shell #hallView .compact-select {
  color: #edf1e8;
}

.front-dashboard-shell #hallView .search input::placeholder {
  color: rgba(226, 232, 214, 0.48);
}

.front-dashboard-shell #hallView .sort-tabs {
  border-bottom-color: rgba(184, 170, 120, 0.25);
  background: rgba(12, 19, 18, 0.72);
}

.front-dashboard-shell #hallView .sort-tabs button {
  border-color: rgba(184, 170, 120, 0.34);
  background: rgba(238, 232, 206, 0.06);
  color: rgba(226, 232, 214, 0.76);
}

.front-dashboard-shell #hallView .sort-tabs button:hover,
.front-dashboard-shell #hallView .sort-tabs button.is-active {
  border-color: rgba(210, 180, 93, 0.76);
  background: rgba(210, 180, 93, 0.18);
  color: #fff8dc;
}

.front-dashboard-shell #hallView .intel-board {
  background: rgba(11, 18, 17, 0.5);
}

.front-dashboard-shell #hallView .intel-board thead {
  background: rgba(184, 170, 120, 0.13);
}

.front-dashboard-shell #hallView .intel-board tr {
  border-color: rgba(184, 170, 120, 0.18);
  background: rgba(237, 241, 232, 0.04);
}

.front-dashboard-shell #hallView .intel-board tr:hover,
.front-dashboard-shell #hallView .intel-board tr:focus {
  border-color: rgba(210, 180, 93, 0.56);
  background: rgba(210, 180, 93, 0.1);
}

.front-dashboard-shell #hallView .chaiche-card {
  border-color: rgba(184, 170, 120, 0.28);
  background:
    linear-gradient(180deg, rgba(34, 43, 39, 0.95), rgba(17, 24, 23, 0.96));
}

.front-dashboard-shell #hallView .chaiche-cover {
  background:
    linear-gradient(135deg, rgba(210, 180, 93, 0.28), rgba(113, 128, 94, 0.2)),
    linear-gradient(90deg, rgba(19, 29, 27, 0.48), rgba(8, 13, 12, 0.88));
}

.front-dashboard-shell #hallView .chaiche-card-horizontal .chaiche-price {
  border-left-color: rgba(184, 170, 120, 0.2);
}

.front-dashboard-shell #hallView .chaiche-price strong,
.front-dashboard-shell #hallView .chaiche-table-wrap td strong {
  color: #f0c66b;
}

.front-dashboard-shell #hallView .button.primary,
.front-dashboard-shell #hallView .chaiche-price .button {
  border-color: rgba(210, 180, 93, 0.72);
  background: linear-gradient(180deg, #d3b45d, #9c8542);
  color: #101514;
}

.front-dashboard-shell #profileView .panel,
.front-dashboard-shell #profileView .wallet-metric {
  overflow: hidden;
  border-color: rgba(184, 170, 120, 0.46);
  background:
    linear-gradient(180deg, rgba(34, 43, 39, 0.96), rgba(20, 28, 27, 0.94));
  color: #edf1e8;
}

.front-dashboard-shell #profileView .panel-header {
  border-bottom-color: rgba(184, 170, 120, 0.34);
  background:
    linear-gradient(90deg, rgba(44, 55, 45, 0.96), rgba(25, 34, 32, 0.98));
}

.front-dashboard-shell #profileView .panel-title {
  color: #fff8dc;
}

.front-dashboard-shell #profileView .panel-title svg {
  color: var(--terminal-blue-strong);
}

.front-dashboard-shell #profileView .summary-line,
.front-dashboard-shell #profileView label,
.front-dashboard-shell #profileView small,
.front-dashboard-shell #profileView .muted {
  color: rgba(226, 232, 214, 0.72);
}

.front-dashboard-shell #profileView .panel-body,
.front-dashboard-shell #profileView .compact-publish {
  background: rgba(12, 19, 18, 0.4);
}

.front-dashboard-shell #profileView input,
.front-dashboard-shell #profileView select,
.front-dashboard-shell #profileView textarea,
.front-dashboard-shell #profileView .search {
  border-color: rgba(184, 170, 120, 0.34);
  background: rgba(8, 14, 13, 0.72);
  color: #edf1e8;
}

.front-dashboard-shell #profileView input::placeholder,
.front-dashboard-shell #profileView textarea::placeholder {
  color: rgba(226, 232, 214, 0.48);
}

.front-dashboard-shell #profileView select option {
  background: #141c1b;
  color: #edf1e8;
}

.front-dashboard-shell #profileView .button.primary {
  border-color: rgba(210, 180, 93, 0.74);
  background: linear-gradient(180deg, #d3b45d, #9c8542);
  color: #101514;
}

.front-dashboard-shell #profileView .button.ghost,
.front-dashboard-shell #profileView .icon-only {
  border-color: rgba(184, 170, 120, 0.34);
  background: rgba(8, 14, 13, 0.62);
  color: #edf1e8;
}

.front-dashboard-shell #profileView .button.ghost:hover,
.front-dashboard-shell #profileView .icon-only:hover {
  border-color: rgba(210, 180, 93, 0.68);
  color: #fff8dc;
}

.front-dashboard-shell #profileView .table-wrap {
  background: rgba(9, 16, 15, 0.54);
}

.front-dashboard-shell #profileView table {
  color: #edf1e8;
}

.front-dashboard-shell #profileView thead,
.front-dashboard-shell #profileView th {
  background: rgba(10, 16, 15, 0.92);
  color: #cdeee6;
}

.front-dashboard-shell #profileView tbody tr {
  border-color: rgba(184, 170, 120, 0.18);
  background: rgba(237, 241, 232, 0.08);
}

.front-dashboard-shell #profileView tbody tr:nth-child(even) {
  background: rgba(237, 241, 232, 0.05);
}

.front-dashboard-shell #profileView tbody tr:hover {
  background: rgba(210, 180, 93, 0.12);
}

.front-dashboard-shell #profileView td {
  color: #edf1e8;
}

.front-dashboard-shell #profileView td strong,
.front-dashboard-shell #profileView .mine-title strong {
  color: #fff8dc;
}

.front-dashboard-shell #profileView .badge,
.front-dashboard-shell #profileView .status,
.front-dashboard-shell #profileView .tag {
  border-color: rgba(184, 170, 120, 0.28);
  background: rgba(210, 180, 93, 0.16);
  color: #fff8dc;
}

.front-dashboard-shell .hall-layout,
.front-dashboard-shell .profile-layout {
  grid-template-columns: 1fr;
}

.front-dashboard-shell .hall-side-nav.home-side-nav,
.front-dashboard-shell .profile-side-nav {
  display: none;
}

.front-dashboard-shell .fixed-statusbar.site-footer {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  min-height: 0;
  margin: 34px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--terminal-footer);
  box-shadow: 0 -8px 26px rgba(7, 13, 18, 0.2);
  backdrop-filter: none;
}

.site-footer-main {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, minmax(110px, 0.72fr)) 1.35fr;
  align-items: start;
  gap: 30px;
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 28px;
}

.site-footer-brand {
  display: grid;
  gap: 12px;
}

.site-footer-brand .dev-logo {
  display: inline-grid;
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 0 7px;
  color: #ffffff;
}

.site-footer-brand .dev-logo svg {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  color: var(--terminal-blue);
}

.site-footer-brand .dev-logo span {
  color: #ffffff;
  font-size: 18px;
  line-height: 1;
}

.site-footer-brand .dev-logo strong {
  color: var(--terminal-blue);
  font-size: 11px;
  line-height: 1;
}

.site-footer-brand p {
  margin: 0;
  color: #8f989f;
  font-size: 12px;
  line-height: 1.5;
}

.site-footer-column {
  display: grid;
  gap: 10px;
}

.site-footer-column > strong {
  margin-bottom: 5px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
}

.site-footer-column a,
.site-footer-column span,
.site-footer-column button {
  justify-self: start;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #a7afb5;
  font: inherit;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
}

.site-footer-column a:hover,
.site-footer-column button:hover {
  color: var(--terminal-blue);
}

.site-footer-codes {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
}

.site-footer-code {
  display: grid;
  justify-items: center;
  gap: 9px;
}

.site-footer-code > span {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  border: 6px solid #ffffff;
  background: #ffffff;
  color: #1d2932;
}

.site-footer-code img {
  display: block;
  width: 86px;
  height: 86px;
  object-fit: cover;
}

.site-footer-code svg {
  width: 62px;
  height: 62px;
  stroke-width: 1.45;
}

.site-footer-code strong {
  color: #ffffff;
  font-size: 12px;
}

.site-footer-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(1220px, calc(100% - 48px));
  min-height: 64px;
  margin: 0 auto;
  border-top: 1px dashed var(--terminal-footer-line);
  color: #8d969c;
  font-size: 11px;
  text-align: center;
}

.site-footer-meta a {
  color: #aeb6bb;
  text-decoration: none;
}

.site-footer-meta a:hover {
  color: var(--terminal-blue);
}

@media (max-width: 1060px) {
  .front-sidebar {
    grid-template-columns: minmax(200px, 250px) minmax(380px, 1fr) minmax(110px, 180px);
    padding-inline: 18px;
  }

  .front-sidebar h1 {
    font-size: 14px;
  }

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

  .front-primary-contact {
    display: none;
  }

  .site-footer-main {
    grid-template-columns: 1.2fr repeat(2, 1fr);
  }

  .site-footer-codes {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  body.front-body {
    background-position: 62% top;
  }

  .front-sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    height: auto;
    min-height: 0;
    gap: 10px;
    padding: 12px;
    border-bottom-width: 3px;
  }

  .front-sidebar::after {
  width: 42%;
  height: 70px;
}

  .front-sidebar .brand-mark {
    width: 38px;
    height: 38px;
  }

  .front-sidebar h1 {
    max-width: 180px;
    font-size: 13px;
  }

  .front-sidebar .header-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .front-sidebar .header-actions::-webkit-scrollbar {
    display: none;
  }

  .front-sidebar .top-nav {
    justify-content: flex-start;
    min-width: max-content;
  }

  .front-sidebar .top-nav > .top-nav-group > a,
  .front-sidebar .top-nav > button {
    min-width: auto;
    min-height: 42px;
    padding-inline: 12px;
  }

  .front-sidebar .front-subnav {
    display: none !important;
  }

  .front-sidebar-bottom {
    grid-column: 2;
    grid-row: 1;
  }

  .front-sidebar-bottom .nav-user {
    min-width: 88px;
    min-height: 38px;
    padding-inline: 10px;
  }

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

  .home-market-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-market-tabs a {
    min-height: 42px;
    font-size: 13px;
  }

  .site-footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 18px;
    width: calc(100% - 32px);
    padding-block: 28px;
  }

  .site-footer-brand,
  .site-footer-codes {
    grid-column: 1 / -1;
  }

  .site-footer-codes {
    justify-content: flex-start;
  }

  .site-footer-meta {
    flex-direction: column;
    gap: 5px;
    width: calc(100% - 32px);
    padding-block: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .front-sidebar .top-nav a::after,
  .front-sidebar .top-nav button::after {
    transition: none;
  }
}
