* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 1fr 70px;
  background: radial-gradient(circle at top, #252016, #080808 60%);
  color: #f2f2f2;
  font-family: "Segoe UI", Arial, sans-serif;
  overflow: hidden;
  cursor: url("/static/cursors/pointer.png"), auto;
}

#main {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  padding: 24px;
  overflow: auto;
}

#sidebar {
  background: linear-gradient(180deg, #17120b, #0c0c0c);
  border-right: 1px solid #3a2a12;
  padding: 18px;
  overflow: hidden;
  position: relative;
  height: 100vh;
}

.brand {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-bottom: -19px;
}

.app-logo {
  width: 260px;
  height: auto;

margin-top: -10px;
  display: block;
}

h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.brand p {
  margin: 0;
  color: #d2c3a0;
  font-size: 10px;
}

.status {
  font-size: 10px;
  color: #e7c76f;
  background: rgba(53, 37, 10, .75);
  border: 1px solid #5a4216;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 12px;
}

.account-panel {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid rgba(190, 145, 65, 0.34);
  border-radius: 10px;
  background: rgba(11, 10, 8, 0.82);
}

.account-login,
.account-summary {
  display: grid;
  gap: 8px;
}

.account-login strong,
.account-summary strong {
  color: #f0d27e;
  font-size: 13px;
}

.account-summary span,
.account-summary small,
.account-login .meta {
  margin: 0;
  color: #b8ad95;
  font-size: 10px;
}

.account-login input,
.admin-form input {
  width: 100%;
  min-height: 34px;
  background: rgba(18, 14, 10, 0.92);
  color: #f2e6c7;
  border: 1px solid rgba(190, 145, 65, 0.52);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.account-login input:focus,
.admin-form input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.14);
}

.account-login button,
.account-actions button,
.admin-header button,
.admin-form button {
  min-height: 32px;
  background: linear-gradient(180deg, #2c2514, #17120b);
  color: #f0d27e;
  border: 1px solid rgba(190, 145, 65, 0.72);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.account-login button:hover,
.account-actions button:hover,
.admin-header button:hover,
.admin-form button:hover {
  border-color: #e3bd61;
  box-shadow: 0 0 10px rgba(214, 168, 79, 0.22);
}

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

.admin-screen {
  padding-bottom: 90px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #d8c79e;
  font-size: 12px;
  font-weight: 800;
}

.admin-form label input {
  width: auto;
  min-height: auto;
}

.admin-table-panel {
  margin-top: 16px;
}

.admin-market-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-market-toolbar select {
  min-width: 180px;
  min-height: 34px;
  background: rgba(18, 14, 10, 0.92);
  color: #f2e6c7;
  border: 1px solid rgba(190, 145, 65, 0.52);
  border-radius: 8px;
  padding: 0 10px;
}

.admin-market-toolbar button {
  min-height: 34px;
  background: linear-gradient(180deg, #2c2514, #17120b);
  color: #f0d27e;
  border: 1px solid rgba(190, 145, 65, 0.72);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.admin-market-overview {
  min-height: 72px;
}

.online-sync-status {
  min-height: 16px;
  color: #d8c79e;
}

body.guest-readonly #main button,
body.guest-readonly #main input,
body.guest-readonly #main select,
body.guest-readonly #main textarea,
body.guest-readonly #main label,
body.guest-readonly #main .market-item-row,
body.guest-readonly #main .item,
body.guest-readonly #results,
body.guest-readonly .search-frame,
body.guest-readonly #marketAdvisor {
  pointer-events: none;
}

body.guest-readonly #main button,
body.guest-readonly #main input,
body.guest-readonly #main select,
body.guest-readonly #main textarea,
body.guest-readonly .search-frame,
body.guest-readonly #results,
body.guest-readonly #marketAdvisor {
  opacity: 0.52;
}

#search {
  width: 100%;
  padding: 13px;

  background: transparent;
  border: none;
  border-radius: 0;
  outline: none;
}

#search:focus {
  border-color: #d2a84b;
  box-shadow: 0 0 0 3px rgba(210, 168, 75, .12);
}

#results {
  margin-top: 32px;
  overflow-y: auto;
  max-height: calc(100vh - 340px);
  padding-right: 4px;
}

.item {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 8px;
  margin-bottom: 6px;
  background: linear-gradient(
  180deg,
  rgba(28,28,28,.95),
  rgba(18,18,18,.95)
);
  border: 1px solid #2d2a22;
  border-radius: 12px;
  cursor: pointer;
}

.item:hover,
.item.active {
  background: linear-gradient(
    180deg,
    rgba(53,40,18,.95),
    rgba(30,22,10,.95)
  );
  border-color: #c99b3c;
  box-shadow: 0 0 18px rgba(201,155,60,.15);
}

.item-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #262626;
  object-fit: contain;
}

.item-icon-wrap {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.foundation-icon-badge {
  position: absolute;
  right: -4px;
  top: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #3fa7ff, #1158c7);
  color: #f3fbff;
  border: 1px solid rgba(189, 231, 255, 0.95);
  box-shadow:
    0 0 8px rgba(63, 167, 255, 0.72),
    0 1px 3px rgba(0, 0, 0, 0.55);
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  pointer-events: none;
}

.item small {
  display: block;
  color: #aaa;
  margin-top: 4px;
}

#sidebar {
  background: linear-gradient(180deg, #17120b, #0c0c0c);
  border-right: 1px solid #3a2a12;
  padding: 18px;
  overflow: hidden;
  position: relative;
  height: auto;
  min-height: 0;
  grid-row: 1;
}

.card,
#viewer {
  min-height: calc(100vh - 48px);
}

.hero,
#viewer {
  max-width: 1800px;
  margin: 0 auto;
}

#viewer h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.meta {
  color: #aaa;
  margin-bottom: 12px;
}

.badge {
  display: inline-block;
  padding: 4px 6px;
  border-radius: 999px;
  background: #2c2514;
  color: #e5c66a;
  font-size: 10px;
  margin-right: 8px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 520px;
  gap: 16px;
  align-items: start;
}

.panel {
  background: rgba(13,13,13,.92);
  border: 1px solid #302817;
  border-radius: 13px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.panel h3 {
  margin-top: 0;
  color: #e8c66d;
}

.hint {
  margin-top: 18px;
  padding: 10px;
  border-radius: 12px;
  background: #221b0d;
  color: #e9c46a;
}

.server-profile-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 14px;
}

.server-profile-control span {
  color: #d8c79e;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-profile-control select,
.server-profile-control button {
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.server-profile-control button {
  cursor: pointer;
}

.server-profile-control button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.server-manager-modal {
  width: min(1120px, 96vw);
}

.server-manager-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(190, 145, 65, 0.2);
}

.server-manager-toolbar button,
.server-manager-actions button {
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.server-manager-toolbar button:hover,
.server-manager-actions button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.admin-import-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8c79e;
  font-size: 11px;
  font-weight: 800;
}

.admin-import-search input {
  width: 220px;
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #f2e6c7;
  border: 1px solid rgba(190, 145, 65, 0.52);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.admin-import-search input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.14);
}

.server-manager-table-wrap {
  min-height: 260px;
  overflow: auto;
  border-bottom: 1px solid rgba(190, 145, 65, 0.2);
}

.server-manager-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.server-manager-table th,
.server-manager-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(190, 145, 65, 0.12);
  text-align: left;
  white-space: nowrap;
}

.server-manager-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #17120b;
  color: #caa45a;
  font-size: 10px;
  text-transform: uppercase;
}

.server-manager-table td {
  color: #e8d6a3;
}

.server-manager-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.server-active-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-left: 8px;
  padding: 0 8px;
  border: 1px solid rgba(112, 193, 97, 0.35);
  border-radius: 999px;
  background: rgba(47, 92, 37, 0.36);
  color: #9ee083;
  font-size: 10px;
  font-weight: 900;
}

.app-log-modal {
  width: min(980px, 96vw);
}

.app-log-list {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  overflow: auto;
}

.app-log-entry {
  border: 1px solid rgba(190, 145, 65, 0.2);
  border-radius: 8px;
  background: rgba(18, 14, 10, 0.78);
  padding: 10px;
}

.app-log-entry div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.app-log-entry strong {
  color: #e8c66d;
  font-size: 12px;
}

.app-log-entry span {
  color: #b8ad95;
  font-size: 10px;
}

.app-log-entry pre {
  margin: 0;
  color: #e8d6a3;
  font-size: 11px;
  line-height: 1.35;
  white-space: pre-wrap;
}

#craftQty {
  background: #151515;
  color: #fff;
  border: 1px solid #4a3a1b;
  border-radius: 10px;
  padding: 8px;
  width: 96px;
}

.qty-label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tree ul {
  list-style: none;
  padding-left: 22px;
  margin: 8px 0;
  position: relative;
}

.tree-node {
  position: relative;
  margin: 8px 0;
}

.tree-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #1d1d1d, #121212);
  border: 1px solid #3b3323;
  border-radius: 14px;
  padding: 8px 11px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.tree-card:hover {
  border-color: #c99b3c;
}

.tree-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: #f5f5f5;
}

.tree-item-qty {
  color: #f4c542;
  font-weight: 800;
}

.tree-children {
  border-left: 2px solid #3a2f1b;
  margin-left: 14px;
}

.raw-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid #252525;
}

.price {
  font-size: 23px;
  color: #9ee37d;
  font-weight: 800;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 18px;
}

.item-header .item-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 52px;
  border-radius: 14px;
}

.item-header h2 {
  margin: 0 0 8px;
}
.item-header {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 20%, rgba(210,168,75,.18), transparent 32%),
    linear-gradient(135deg, rgba(36,28,14,.96), rgba(13,13,13,.96));
  border-color: #5a4216;
}

.item-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.04), transparent 45%);
  pointer-events: none;
}

.item-header .item-icon {
  background: #111;
  border: 1px solid #6a4b18;
  box-shadow: 0 0 24px rgba(210,168,75,.25);
}

.item-header h2 {
  font-size: 26px;
  letter-spacing: .2px;
}

.badge {
  border: 1px solid rgba(229,198,106,.25);
}
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.tab {
  background: #171717;
  border: 1px solid #3b3323;
  color: #c9c9c9;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 10px;
}

.tab:hover {
  border-color: #c99b3c;
}

.tab.active {
  background: #2a2112;
  border-color: #d2a84b;
  color: #f0d27e;
}

.raw-row span {
  color: #b8ad95;
}

.raw-row .sell-price-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.crafting-sell-price-buttons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.crafting-sell-price-buttons button {
  min-width: 42px;
  height: 24px;
  border: 1px solid rgba(190, 145, 65, 0.48);
  border-radius: 7px;
  background: rgba(18, 14, 10, 0.9);
  color: #cdbf9e;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.crafting-sell-price-buttons button:hover,
.crafting-sell-price-buttons button.active {
  color: #f7e7ad;
  border-color: #d6a84f;
  background: rgba(80, 55, 16, 0.88);
  box-shadow:
    0 0 0 1px rgba(214, 168, 79, 0.28),
    0 0 10px rgba(214, 168, 79, 0.35);
}

.raw-row b {
  color: #f0d27e;
  font-weight: 800;
}

.panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel h3::before {
  content: "◆";
  color: #d2a84b;
  font-size: 10px;
}

.price {
  text-shadow: 0 0 18px rgba(158, 227, 125, .25);
}

.panel {
  transition: border-color .15s ease, box-shadow .15s ease;
}

.panel:hover {
  border-color: #5d4318;
  box-shadow: 0 0 24px rgba(201,155,60,.08);
}
.panel:hover {
  border-color: #5d4318;
  box-shadow: 0 0 24px rgba(201,155,60,.08);
}

/* PASTE HERE */

.set-piece {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  margin-bottom: 6px;
  background: linear-gradient(180deg, rgba(28,28,28,.95), rgba(18,18,18,.95));
  border: 1px solid #2d2a22;
  border-radius: 12px;
  cursor: pointer;
}

.set-piece:hover {
  border-color: #c99b3c;
  background: linear-gradient(180deg, rgba(53,40,18,.95), rgba(30,22,10,.95));
}

.set-piece-checkbox {
  width: 15px;
  height: 15px;
  accent-color: #d2a84b;
}

.set-piece small {
  display: block;
  color: #aaa;
  margin-top: 4px;
}
.expand-title,
.expand-title * {
  cursor: url("/static/cursors/hand.png"), pointer !important;
  user-select: none;
}

.expand-title span {
  color: #f0d27e;
  margin-left: 6px;
}

.collapsed-section {
  display: none;
}

.collapsed-section.open {
  display: block;
}
.refined-details {
  margin-left: 20px;
  margin-top: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border-left: 2px solid rgba(240,210,126,.4);
}

.clickable-raw {
  cursor: pointer;
}

.clickable-raw:hover {
  background: rgba(240,210,126,.05);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);

  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;

  background: none;
  width: auto;
  height: auto;
  padding: 0;
}

.nav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 88px;
  height: 62px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #b8b8b8;
  font-size: 10px;
  padding: 0;
}

.nav-btn img {
  width: 22px !important;
height: 22px !important;
max-width: 22px !important;
max-height: 22px !important;
  object-fit: contain;
  display: block;
  margin: 0 auto 4px;
}

.nav-btn.active {
  color: #ffd36a;
}

.nav-btn.active img {
  filter: drop-shadow(0 0 8px rgba(255, 211, 106, .35));
}

.crafting-filter-nav {
  position: fixed;
  left: 35px;
  bottom: 590px;

  display: flex;
  gap: 8px;

  background: none;
  width: auto;
  height: auto;
  padding: 0;
  pointer-events: none;
}

.crafting-filter-nav .tab {
  width: 48px;
  height: 38px;
  padding: 5px;
  display: grid;
  place-items: center;
background: transparent;
border: none;
box-shadow: none;
pointer-events: auto;
}

.crafting-filter-nav .tab img {
  width: 48px;
  height: 38px;
  object-fit: contain;
  pointer-events: none;
}
.crafting-filter-nav .tab img {
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
  object-fit: contain;
  opacity: 1 !important;
  visibility: visible !important;
}
.crafting-filter-nav .tab:hover .cat-icon,
.crafting-filter-nav .tab.active .cat-icon {
  filter:
    drop-shadow(0 0 2px rgba(255, 210, 120, 0.7))
    drop-shadow(0 0 4px rgba(255, 180, 50, 0.5));
}

.cat-icon {
  display: block;
  width: 28px;
  height: 28px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  pointer-events: none;
}
.hidden {
  display: none !important;
}

.app-bottom-bar {
  grid-column: 1 / -1;
  grid-row: 2;

  height: 64px;

  background-image: url("/static/ui/Bottom Bar.png");
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: 100% 100%;

  pointer-events: none;
  z-index: 9980;
}

.bottom-nav,
.crafting-filter-nav {
  z-index: 9999;
}

.home-screen {
  min-height: calc(100vh - 48px);
}

.home-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.home-backup-panel {
  width: min(420px, 100%);
  margin-left: auto;
}

.home-backup-panel h3 {
  margin-top: 0;
}

.inventory-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(190, 145, 65, 0.18);
  border-radius: 8px;
  background: rgba(13, 11, 8, 0.45);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.inventory-tile {
  background: linear-gradient(180deg, rgba(28,28,28,.95), rgba(14,14,14,.95));
  border: 1px solid rgba(190, 145, 65, 0.22);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  min-height: 132px;
  display: grid;
  grid-template-rows: 42px minmax(32px, auto) auto;
  align-items: center;
  gap: 7px;
}

.inventory-tile-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto;
  border-radius: 5px;
  background: #262626;
}

.inventory-tile-name {
  min-height: 32px;
  color: #f2f2f2;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-tile-qty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
  color: #d2c3a0;
  font-size: 10px;
  font-weight: 800;
}

.inventory-tile-qty input {
  width: 64px;
  height: 28px;
  margin-top: 0;
  padding: 5px;
  text-align: center;
  background: #111;
  color: #f0d27e;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
}

button,
.tab,
.item,
.set-item,
.inventory-section-title,
.inventory-filter-btn {
  cursor: url("/static/cursors/hand.png"), pointer !important;
}

.search-frame {
  position: relative;

  width: 100%;
  height: 64px;

  background-image: url("/static/ui/search-bar.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  display: flex;
  align-items: center;

  margin-bottom: 10px;
}

.search-frame input {
  width: calc(100% - 190px);

  margin-left: 30px;
  margin-right: 90px;

  background: transparent;
  border: none;
  outline: none;

  color: #f6d88a;

  font-size: 10px;
  font-weight: 600;
}

.search-frame input::placeholder {
  color: rgba(246, 216, 138, 0.65);
}

.inventory-section-search {
  height: 38px;
  min-width: 170px;

  background-image: url("/static/ui/search-bar.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  background-color: transparent;
  border: none;
  outline: none;

margin-left: 0px;

  padding: 0 44px 0 104px;

  color: #f6d88a;
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

.inventory-section-search::placeholder {
  color: rgba(246, 216, 138, 0.65);
}

.inventory-filter-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.inventory-filter-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: none;
}

.inventory-filter-btn img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.inventory-filter-btn.active img {
  transform: scale(1.08);

  filter:
    drop-shadow(0 0 4px rgba(255, 211, 106, .9))
    drop-shadow(0 0 10px rgba(255, 211, 106, .6));
}

.adena-panel {
  width: 400px;
  height: 64px;

  background-image: url("/static/ui/Adena Badge.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  display: flex;
  align-items: center;

  margin: 18px 0 22px;
  padding-left: 116px;
}

.adena-panel-icon {
  display: none;
}

.adena-panel-title {
  color: #f6d88a;
  font-size: 15px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

.adena-panel input {
  width: 176px;
  margin-top: 32px;

 text-align: right;

  background: transparent;
  border: none;
  outline: none;

  color: #f6d88a;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,.9);
}

.adena-panel input::-webkit-outer-spin-button,
.adena-panel input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.adena-panel input {
  appearance: textfield;
}

.adena-panel input {
  transform: translateY(-15px);
}

.inventory-screen {
  padding-bottom: 90px;
}

.inventory-page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.inventory-page-title h2 {
  margin-bottom: 4px;
}

.inventory-header-row {
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(190, 145, 65, 0.18);
  border-radius: 8px;
  background: rgba(13, 11, 8, 0.45);
}

.inventory-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  cursor: url("/static/cursors/hand.png"), pointer !important;
}

.inventory-section-header small {
  color: #b8ad95;
  font-size: 11px;
  font-weight: 800;
}

.inventory-section-title {
  margin: 0;
}

.inventory-section-title span {
  color: #f0d27e;
  min-width: 14px;
  display: inline-block;
}

.inventory-section-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.inventory-row.complete {
  border-left: 3px solid #6fe36f;
  background: rgba(60, 150, 60, 0.08);
}

.inventory-row.missing {
  border-left: 3px solid #e36f6f;
  background: rgba(150, 60, 60, 0.08);
}

.inventory-row.complete small {
  color: #8ff08f;
}

.inventory-row.missing small {
  color: #ff9a9a;
}

.requirement-complete {
  color: #7fe67f;
}

.requirement-missing {
  color: #ff9a9a;
}

.requirement-empty {
  color: #b8b8b8;
}

.requirement-complete span {
  color: #7fe67f;
}

.requirement-missing span {
  color: #ff9a9a;
}

.requirement-empty span {
  color: #b8b8b8;
}

.requirement-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirement-item-main .item-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 34px;
}

.requirement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;

  padding: 8px;
  margin-bottom: 6px;

  border-radius: 10px;
  border: 1px solid rgba(255, 215, 100, .08);
}

.requirement-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirement-text strong {
  display: block;
}

.requirement-have-line {
  font-size: 10px;
  color: #cfc2a2;
}

.recipe-learned-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: #d8f2c5;
  font-size: 10px;
  font-weight: 800;
}

.recipe-learned-control input {
  width: 14px;
  height: 14px;
  accent-color: #74c65b;
}

.requirement-price-source {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: #b8ad95;
  font-size: 10px;
}

.price-source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.price-source-badge.manual {
  color: #f0d27e;
  background: rgba(214, 168, 79, 0.14);
  border: 1px solid rgba(214, 168, 79, 0.35);
}

.price-source-badge.import {
  color: #8fc7ff;
  background: rgba(85, 160, 240, 0.12);
  border: 1px solid rgba(85, 160, 240, 0.32);
}

.price-source-badge.mapped {
  color: #9ee083;
  background: rgba(86, 178, 82, 0.12);
  border: 1px solid rgba(86, 178, 82, 0.32);
}

.price-source-badge.server {
  color: #e5c66a;
  background: rgba(229, 198, 106, 0.1);
  border: 1px solid rgba(229, 198, 106, 0.28);
}

.price-source-badge.saved {
  color: #d8c79e;
  background: rgba(216, 199, 158, 0.1);
  border: 1px solid rgba(216, 199, 158, 0.24);
}

.price-source-badge.none {
  color: #ff9a9a;
  background: rgba(255, 110, 110, 0.1);
  border: 1px solid rgba(255, 110, 110, 0.24);
}

.requirement-have-input {
  width: 46px;
  margin: 0 4px;
}

.requirement-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.requirement-qty {
  color: #f0d27e;
  font-weight: 900;
}

.requirement-status {
  font-size: 12px;
  font-weight: 900;
}

.requirement-row.complete .requirement-status {
  color: #69d76b;
}

.requirement-row.missing .requirement-status {
  color: #e36f6f;
}

.custom-recipe-editor {
  display: grid;
  gap: 12px;
}

.custom-recipe-section {
  border-top: 1px solid rgba(190, 145, 65, 0.18);
  padding-top: 10px;
}

.custom-recipe-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.custom-recipe-section h4 {
  margin: 0 0 8px;
  color: #e8c66d;
  font-size: 13px;
}

.custom-recipe-rows {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.custom-recipe-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 74px auto;
  gap: 6px;
  align-items: center;
}

.custom-recipe-row input {
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 12px;
  outline: none;
}

.custom-recipe-row input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.18);
}

.custom-recipe-section button,
.custom-recipe-actions button,
.copy-server-recipe-btn {
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.custom-recipe-section button:hover,
.custom-recipe-actions button:hover,
.copy-server-recipe-btn:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.custom-recipe-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.custom-recipe-summary {
  gap: 10px;
}

.custom-recipe-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.custom-recipe-summary-grid div {
  min-height: 48px;
  padding: 8px;
  background: rgba(18, 14, 10, 0.72);
  border: 1px solid rgba(190, 145, 65, 0.22);
  border-radius: 8px;
}

.custom-recipe-summary-grid span,
.custom-recipe-summary-grid b {
  display: block;
}

.custom-recipe-summary-grid span {
  color: #b8ad95;
  font-size: 10px;
  font-weight: 800;
}

.custom-recipe-summary-grid b {
  margin-top: 4px;
  color: #f0d27e;
  font-size: 18px;
}

.custom-recipe-validation {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.4;
}

.custom-recipe-validation.ok {
  color: #9ee083;
  background: rgba(86, 178, 82, 0.1);
  border: 1px solid rgba(86, 178, 82, 0.26);
}

.custom-recipe-validation.warn {
  color: #f1c977;
  background: rgba(214, 168, 79, 0.1);
  border: 1px solid rgba(214, 168, 79, 0.32);
}

.custom-recipe-validation strong {
  display: block;
  margin-bottom: 4px;
}

.custom-recipe-validation ul {
  margin: 0;
  padding-left: 16px;
}

.custom-recipe-validation li + li {
  margin-top: 2px;
}

.crafting-cost-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.crafting-cost-panel h3 {
  margin-top: 0;
  margin-bottom: 0;
}

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

.crafting-price-view-select,
.recalculate-craft-btn {
  height: 30px;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.crafting-price-view-select {
  min-width: 96px;
}

.crafting-price-view-select:hover,
.recalculate-craft-btn:hover,
.crafting-cost-panel.is-stale .recalculate-craft-btn {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.crafting-cost-stale-note {
  display: none;
  margin-bottom: 8px;
  padding: 7px 9px;
  border: 1px solid rgba(214, 168, 79, 0.3);
  border-radius: 8px;
  background: rgba(214, 168, 79, 0.09);
  color: #f0d27e;
  font-size: 11px;
  font-weight: 800;
}

.crafting-cost-panel.is-stale .crafting-cost-stale-note {
  display: block;
}

.market-advisor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.market-advisor-header h3 {
  margin: 0;
}

.market-advisor-show-btn {
  height: 30px;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.market-advisor-show-btn:hover:not(:disabled) {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-advisor-show-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.copy-server-recipe-btn {
  width: auto;
  margin-left: 8px;
}

.copy-recipe-modal {
  width: min(720px, 94vw);
}

.copy-recipe-toolbar {
  padding: 14px 16px 8px;
}

.copy-recipe-toolbar input {
  width: 100%;
  height: 36px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
}

.copy-recipe-toolbar input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.18);
}

.copy-recipe-target-list {
  display: grid;
  gap: 8px;
  padding: 8px 16px 16px;
  overflow: auto;
}

.copy-recipe-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  text-align: left;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.35);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: pointer;
}

.copy-recipe-target:hover {
  border-color: #d6a84f;
  box-shadow: 0 0 10px rgba(214, 168, 79, 0.18);
}

.copy-recipe-target strong,
.copy-recipe-target small {
  display: block;
}

.copy-recipe-target strong {
  color: #f0d27e;
  font-size: 13px;
}

.copy-recipe-target small {
  margin-top: 3px;
  color: #b8ad95;
  font-size: 11px;
}

.copy-recipe-target em {
  flex: 0 0 auto;
  color: #9ee083;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.copy-recipe-empty {
  padding: 18px;
  color: #b8ad95;
  border: 1px dashed rgba(190, 145, 65, 0.3);
  border-radius: 8px;
  text-align: center;
}

.item.active {
  border-color: #d7a72f;
  background: linear-gradient(180deg, rgba(90,65,20,.8), rgba(20,18,14,.95));
  box-shadow: 0 0 14px rgba(220, 170, 60, .35);
}

#dbStatus {
  display: none;
}

#results::-webkit-scrollbar {
  width: 10px;
}

#results::-webkit-scrollbar-track {
  background: rgba(10, 8, 5, 0.8);
  border: 1px solid rgba(120, 85, 30, 0.45);
  border-radius: 999px;
}

#results::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    #d7a84a,
    #6b4514
  );
  border-radius: 999px;
  border: 1px solid #2a1a08;
}

#results::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    #f0c96a,
    #8a5a1a
  );
}

/* Global Lineage2 Scrollbars */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 8, 5, 0.85);

  border: 1px solid rgba(120, 85, 30, 0.4);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    #d8aa4a,
    #8d5f1b,
    #5b3910
  );

  border-radius: 999px;
  border: 1px solid #2a1a08;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(
    180deg,
    #f0ca6a,
    #b57b26,
    #734615
  );
}

::-webkit-scrollbar-corner {
  background: transparent;
}

.requirement-have-input {
  all: unset;

  width: 56px;
  height: 32px;

  background: rgba(12,12,12,.95);
  border: 1px solid rgba(190,140,50,.55);
  border-radius: 10px;

  color: #f6d88a;
  text-align: center;
  font-weight: 700;
}

.inventory-header-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.inventory-reset-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;
}

.inventory-export-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(190, 140, 50, 0.72);
  border-radius: 8px;
  background: rgba(30, 24, 14, 0.92);
  color: #f6d88a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.inventory-export-btn:hover {
  border-color: #f0d27e;
  color: #fff1bf;
  box-shadow: 0 0 8px rgba(255, 210, 120, 0.28);
}

.inventory-reset-btn img {
  width: 144px;
  height: auto;
  display: block;
}

.inventory-reset-btn:hover img {
  filter:
    brightness(1.08)
    drop-shadow(0 0 8px rgba(255, 210, 120, 0.45));
}

.inventory-reset-btn:active img {
  transform: translateY(1px);
}

.craft-btn {
  width: 96px;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.craft-btn img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.craft-btn {
  transition: all 0.15s ease;
}

.craft-btn:hover img {
  filter:
    brightness(1.1)
    drop-shadow(0 0 4px rgba(255, 210, 100, 0.7));
}

.craft-btn:active {
  transform: translateY(1px);
}

.marketplace-layout {
  display: grid;
  grid-template-columns: 620px 1fr;
  gap: 16px;
  margin-top: 0px;
}

.marketplace-left,
.market-details-header {
  position: relative;
}

#marketSearch {
  width: 100%;
  margin-bottom: 12px;
}

#marketItemList {
  max-height: 440px;
  overflow-y: auto;
}

.market-selected-item {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 5px;
}

.market-enchant-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid rgba(69, 150, 255, 0.35);
  border-radius: 8px;
  background: rgba(8, 18, 34, 0.52);
}

.market-enchant-selector span {
  color: #b9d9ff;
  font-size: 12px;
  font-weight: 900;
}

.market-enchant-selector select {
  min-width: 120px;
  height: 30px;
  background: rgba(12, 16, 24, 0.95);
  color: #e7f2ff;
  border: 1px solid rgba(90, 170, 255, 0.72);
  border-radius: 8px;
  padding: 0 8px;
  font-weight: 800;
}

.market-selected-item .item-icon {
  width: 42px;
  height: 42px;
}

.market-list-price {
  display: block;
  margin-top: 3px;
  opacity: 0.8;
}

.market-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.market-item-row:hover {
  background: rgba(255,255,255,0.05);
}

.market-item-row.active {
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.35);
}

.profit-positive {
  color: #7ed957 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(126,217,87,.25);
}

.profit-negative {
  color: #ff7070 !important;
  font-weight: 800;
  text-shadow: 0 0 8px rgba(255,112,112,.25);
}

.profit-neutral {
  color: #d9c28a !important;
  font-weight: 700;
}

.marketplace-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.marketplace-controls input,
.marketplace-controls select {
  width: 100%;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  outline: none;
}

.marketplace-controls input::placeholder {
  color: rgba(232, 214, 163, 0.55);
}

.marketplace-controls input:focus,
.marketplace-controls select:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.25);
}

.marketplace-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.marketplace-filter-row select {
  min-width: 0;
}

.market-item-row {
  display: grid;
  grid-template-columns: 42px 1fr 120px;
  align-items: center;
  gap: 8px;
}

.market-item-info strong {
  display: block;
}

.market-item-info small {
  color: #aaa;
}

.market-item-price {
  text-align: right;
}

.market-item-price strong {
  color: #f0d27e;
  font-size: 10px;
}

.market-item-price small {
  display: block;
  color: #9f9274;
  font-size: 10px;
}

.market-list-header {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 8px;

  padding: 0 6px 6px;
  margin-bottom: 6px;

  border-bottom: 1px solid rgba(190,145,65,.25);

  color: #caa45a;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.market-list-header-price {
  text-align: right;
}

.market-sort-btn {
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 4px 6px;

  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: right;

  cursor: pointer;
}

.market-sort-btn:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-import-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.market-import-modal {
  width: min(1280px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: rgba(13, 13, 13, 0.98);
  border: 1px solid rgba(190, 145, 65, 0.72);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.market-file-import-modal {
  width: min(560px, 94vw);
}

.market-import-header,
.market-import-footer,
.market-import-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
}

.market-import-header {
  justify-content: space-between;
  border-bottom: 1px solid rgba(190, 145, 65, 0.25);
}

.market-import-header h3 {
  margin: 0 0 4px;
  color: #e8c66d;
}

.market-import-header .meta {
  margin: 0;
}

.market-import-close,
.market-import-actions button,
.market-import-footer button {
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.market-import-close {
  width: 32px;
  height: 32px;
  padding: 0;
  text-transform: uppercase;
}

.market-import-close:hover,
.market-import-actions button:hover,
.market-import-footer button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-import-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 16px 0;
}

.market-import-summary span {
  padding: 5px 8px;
  border: 1px solid rgba(229, 198, 106, 0.25);
  border-radius: 999px;
  background: #2c2514;
  color: #e5c66a;
  font-size: 10px;
  font-weight: 800;
}

.market-import-filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 16px 12px;
}

.market-import-filter-group button,
.market-import-edit-cell button {
  border: 1px solid rgba(190, 145, 65, 0.45);
  border-radius: 8px;
  background: rgba(18, 14, 10, 0.92);
  color: #d8c8a8;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.market-import-filter-group button {
  padding: 7px 10px;
}

.market-import-filter-group button span {
  margin-left: 5px;
  color: #f0d27e;
}

.market-import-filter-group button:hover,
.market-import-filter-group button.is-active,
.market-import-edit-cell button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.22);
}

.market-file-dropzone {
  display: grid;
  gap: 10px;
  margin: 16px;
  padding: 28px 18px;
  border: 1px dashed rgba(229, 198, 106, 0.58);
  border-radius: 8px;
  background: rgba(24, 21, 15, 0.94);
  color: #d8c8a8;
  text-align: center;
}

.market-file-dropzone.is-dragging {
  border-color: #f0d27e;
  background: rgba(42, 34, 18, 0.98);
  box-shadow: inset 0 0 18px rgba(240, 210, 126, 0.14);
}

.market-file-dropzone strong {
  color: #f0d27e;
  font-size: 18px;
}

.market-file-dropzone span {
  color: #b8ad95;
  font-size: 13px;
}

.market-file-dropzone input[type="file"] {
  width: min(360px, 100%);
  justify-self: center;
  color: #e8d6a3;
}

.market-file-dropzone input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.market-file-dropzone input[type="file"]::file-selector-button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
}

.market-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  border: 1px solid rgba(229, 198, 106, 0.65);
  border-radius: 50%;
  color: #f0d27e;
  background: rgba(18, 14, 10, 0.95);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
  outline: none;
  text-transform: none;
}

.market-help:hover,
.market-help:focus {
  border-color: #f0d27e;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-import-actions {
  padding-top: 10px;
  padding-bottom: 10px;
}

.market-import-table-wrap {
  min-height: 220px;
  overflow: auto;
  border-top: 1px solid rgba(190, 145, 65, 0.2);
  border-bottom: 1px solid rgba(190, 145, 65, 0.2);
}

.market-import-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.market-import-table th,
.market-import-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(190, 145, 65, 0.12);
  text-align: left;
  white-space: nowrap;
}

.market-import-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #17120b;
  color: #caa45a;
  font-size: 10px;
  text-transform: uppercase;
}

.market-import-table td {
  color: #e8d6a3;
}

.market-import-table input[type="text"],
.market-import-table input[type="number"],
.market-import-table input:not([type]) {
  width: 150px;
  min-width: 90px;
  padding: 6px 8px;
  border: 1px solid rgba(190, 145, 65, 0.38);
  border-radius: 6px;
  background: rgba(8, 7, 5, 0.92);
  color: #f5e7bd;
}

.market-import-edit-cell {
  display: flex;
  gap: 6px;
}

.market-import-edit-cell button {
  padding: 6px 8px;
}

.market-import-action {
  max-width: 340px;
  display: grid;
  gap: 3px;
  white-space: normal;
}

.market-import-action strong {
  color: #f0d27e;
  font-size: 11px;
  font-weight: 900;
}

.market-import-action span {
  color: #b8ad95;
  font-size: 11px;
  line-height: 1.3;
}

.market-import-action.mapped strong,
.market-import-action.ready strong {
  color: #9ee083;
}

.market-import-action.server strong {
  color: #e5c66a;
}

.market-import-action.blocked strong {
  color: #ff8a5c;
}

.market-import-action.muted strong,
.market-import-action.muted span {
  color: rgba(232, 214, 163, 0.55);
}

.market-mapping-modal {
  width: min(1320px, 96vw);
}

.market-mapping-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid rgba(190, 145, 65, 0.12);
  border-bottom: 1px solid rgba(190, 145, 65, 0.2);
  background: rgba(23, 18, 11, 0.55);
}

.market-mapping-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.market-mapping-filter-group button {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 14, 10, 0.92);
  color: #d8c79e;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.market-mapping-filter-group button span {
  color: #f0d27e;
  font-size: 10px;
}

.market-mapping-filter-group button:hover,
.market-mapping-filter-group button.is-active {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.22);
}

.market-mapping-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-mapping-search span {
  color: #d8c79e;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.market-mapping-search input {
  width: min(280px, 62vw);
  height: 30px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  outline: none;
}

.market-mapping-search input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.18);
}

.market-mapping-table-wrap {
  min-height: 260px;
  overflow: auto;
  border-bottom: 1px solid rgba(190, 145, 65, 0.2);
}

.market-mapping-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.market-mapping-table th,
.market-mapping-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(190, 145, 65, 0.12);
  text-align: left;
  white-space: nowrap;
}

.market-mapping-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #17120b;
  color: #caa45a;
  font-size: 10px;
  text-transform: uppercase;
}

.market-mapping-table td {
  color: #e8d6a3;
}

.market-mapping-empty {
  color: #b8ad95 !important;
  text-align: center !important;
  padding: 28px 10px !important;
}

.market-mapping-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.market-mapping-actions input {
  width: 180px;
  height: 28px;
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.55);
  border-radius: 8px;
  padding: 0 8px;
  font-size: 11px;
  outline: none;
}

.market-mapping-actions input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.18);
}

.market-mapping-actions button {
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.market-mapping-actions button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-recipe-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.market-recipe-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.market-recipe-status.attached {
  color: #9ee083;
  background: rgba(86, 178, 82, 0.12);
  border: 1px solid rgba(86, 178, 82, 0.32);
}

.market-recipe-status.none {
  color: #b8ad95;
  background: rgba(216, 199, 158, 0.08);
  border: 1px solid rgba(216, 199, 158, 0.18);
}

.market-recipe-tools button {
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.market-recipe-tools button:hover {
  color: #f0d27e;
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.market-import-table tr.is-blocked td {
  color: rgba(232, 214, 163, 0.48);
}

.market-import-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #d6a84f;
}

.market-import-status {
  display: inline-block;
  min-width: 74px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  text-align: center;
}

.market-import-status.ready {
  color: #7ed957;
  background: rgba(126, 217, 87, 0.12);
  border: 1px solid rgba(126, 217, 87, 0.25);
}

.market-import-status.blocked {
  color: #ff8a5c;
  background: rgba(255, 138, 92, 0.1);
  border: 1px solid rgba(255, 138, 92, 0.22);
}

.market-import-status.unmatched {
  color: #d8c79e;
  background: rgba(216, 199, 158, 0.1);
  border: 1px solid rgba(216, 199, 158, 0.24);
}

.market-import-footer {
  justify-content: flex-end;
}

.market-import-footer .market-import-confirm {
  background: linear-gradient(
    180deg,
    rgba(214, 168, 79, 0.95),
    rgba(120, 80, 25, 0.95)
  );
  color: #111;
  border-color: #d6a84f;
}

.market-price-editor {
  display: flex;
  gap: 0px;
  align-items: flex-start;

  margin-top: 15px;
}

.market-manual-input-header {
  margin-top: 14px;
}

.market-manual-input-header h3 {
  margin: 0;
  color: #e8c66d;
  font-size: 13px;
}

.market-price-editor label {
  width: 100px;
  flex: 0 0 160px;
}

.market-price-editor label {
  display: flex;
  flex-direction: column;
  gap: 1px;

  color: #d8c79e;
  font-size: 10px;
  font-weight: 700;
}

.market-price-editor input {
  background: rgba(18, 14, 10, 0.92);
  color: #f0d27e;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 2px 4px;

  font-size: 10px;
  font-weight: 800;
  outline: none;
}

.market-price-editor input {
  width: 130px;
  padding: 6px 8px;
}

.market-price-editor input:focus {
  border-color: #d6a84f;
  box-shadow: 0 0 0 2px rgba(214, 168, 79, 0.25);
}

.market-price-editor input[readonly] {
  opacity: 0.75;
}

.market-manual-save-btn {
  align-self: flex-end;
  height: 29px;
  padding: 0 14px;
  background: linear-gradient(
    180deg,
    rgba(214, 168, 79, 0.95),
    rgba(120, 80, 25, 0.95)
  );
  color: #111;
  border: 1px solid #d6a84f;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.market-manual-save-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 8px rgba(214, 168, 79, 0.25);
}

.marketplace-right .raw-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 7px 0;
  border-bottom: 1px solid rgba(190,145,65,.12);
}

.marketplace-right .raw-row span {
  color: #d8c79e;
  font-size: 10px;
  font-weight: 600;
}

.marketplace-right .raw-row b {
  color: #f0d27e;
  font-size: 13px;
  font-weight: 800;
}

.market-divider {
  height: 1px;
  margin: 8px 0;

  background: linear-gradient(
    to right,
    transparent,
    rgba(190,145,65,.5),
    transparent
  );
}

.market-summary-panel {
  padding: 12px 20px;
  min-width: 400px;
}

.market-summary-panel h3 {
  font-size: 18px;
}

.market-summary-panel .price {
  font-size: 28px;
  font-weight: 700;
}

.market-advisor-panel {
  background: rgba(13,13,13,.94);
  border: 1px solid rgba(190,145,65,.55);
  border-radius: 14px;
  padding: 10px;
}

.market-advisor-panel h3 {
  margin: 0 0 12px;
  color: #e8c66d;
  font-size: 13px;
}

.market-advisor-panel {
  max-height: 520px;
  overflow-y: auto;
}

.advisor-craft-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;

  padding: 5px;
  margin-bottom: 6px;

  border: 1px solid rgba(190,145,65,.25);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(26,22,15,.95), rgba(10,10,10,.95));

  cursor: pointer;
}

.advisor-craft-row:hover {
  border-color: #d6a84f;
  box-shadow: 0 0 12px rgba(214,168,79,.18);
}

.advisor-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: linear-gradient(180deg, #d6a84f, #7b541c);
  color: #111;
  font-weight: 900;
}

.advisor-info strong {
  display: block;
  color: #f2f2f2;
  font-size: 10px;
  line-height: 1.2;
}

.advisor-status,
.advisor-missing {
  display: block;
  margin-top: 2px;
  font-size: 10px;
}

.advisor-craft-row.ready .advisor-status {
  color: #7ed957;
}

.advisor-craft-row.missing .advisor-status {
  color: #ff8a5c;
}

.advisor-missing {
  color: #d8c79e;
}

.advisor-profit {
  grid-column: 1 / -1;
  text-align: right;
  margin-top: 1px;
}

.advisor-profit span {
  display: block;
  color: #9f9274;
  font-size: 10px;
}

.advisor-profit b {
  color: #7ed957;
  font-size: 10px;
  font-weight: 900;
}
.marketplace-header-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.market-header-stats {
  display: flex;
  gap: 9px;
  margin-left: auto;
}

.marketplace-header-row .market-summary-panel {
  width: 190px;
  margin: 0;
  padding: 2px 10px;
}

.marketplace-header-row .market-summary-panel h3 {
  margin: 0;
  font-size: 10px;
  line-height: 1.1;
}

.marketplace-header-row .market-summary-panel .price {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.1;
}

.market-craft-btn {
  background: linear-gradient(
    180deg,
    rgba(214,168,79,.95),
    rgba(120,80,25,.95)
  );

  color: #111;
  font-weight: 900;

  border: none;
  border-radius: 8px;

  padding: 6px 14px;

  cursor: pointer;
}

.market-craft-btn:hover {
  filter: brightness(1.08);
}

.market-craft-btn-image {
  width: 96px;
  height: 38px;

  position: absolute;
  top: -8px;
  right: 0;

  background-image: url("/static/ui/Craft%20Button.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  border: none;
  background-color: transparent;

  cursor: pointer;

  transition: transform 0.12s ease,
              filter 0.12s ease;
}

.market-craft-btn-image:hover {
  filter:
    brightness(1.08)
    drop-shadow(0 0 8px rgba(255, 210, 120, .45));
}

.market-craft-btn-image:active {
  transform: translateY(1px);
}

.requirement-market-btn {
  background: rgba(18, 14, 10, 0.92);
  color: #e8d6a3;
  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.requirement-market-btn:hover {
  color: #f0d27e;
  border-color: #d6a84f;
}

.requirement-market-btn {
  width: 28px;
  height: 28px;

  display: grid;
  place-items: center;

  background: rgba(18, 14, 10, 0.92);
  color: #f0d27e;

  border: 1px solid rgba(190, 145, 65, 0.7);
  border-radius: 8px;

  font-size: 12px;
  padding: 0;

  cursor: pointer;
}

.requirement-market-btn:hover {
  border-color: #d6a84f;
  box-shadow: 0 0 8px rgba(214,168,79,.25);
}

.requirement-market-btn-image {
  width: 28px;
  height: 28px;

  flex-shrink: 0;

  border: none;
  cursor: pointer;
  background-color: transparent;

  background-image: url("/static/ui/Marketplace%20Icon.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  margin-right: 8px;

  filter:
    drop-shadow(0 0 3px rgba(240, 210, 126, 0.45));

  transition:
    transform 0.12s ease,
    filter 0.12s ease;
}

.requirement-market-btn-image:hover {
  transform: scale(1.12);

  filter:
    brightness(1.15)
    drop-shadow(0 0 6px rgba(240, 210, 126, 0.75))
    drop-shadow(0 0 12px rgba(240, 210, 126, 0.45));
}

.app-bottom-bar {
  border-top: 1px solid rgba(214, 168, 79, 0.55);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 120, 0.18),
    0 -8px 22px rgba(0, 0, 0, 0.45);
}

.bottom-nav {
  height: 60px;
  gap: 0;
}

.nav-btn {
  position: relative;
  width: 120px;
  height: 64px;

  border-left: 1px solid rgba(214, 168, 79, 0.18);
  border-right: 1px solid rgba(0, 0, 0, 0.55);
}

.nav-btn::before,
.nav-btn::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 1px;

  background: linear-gradient(
    to bottom,
    transparent,
    rgba(214, 168, 79, 0.55),
    transparent
  );

  opacity: 0.25;
}

.nav-btn::before {
  left: 0;
}

.nav-btn::after {
  right: 0;
}

.nav-btn.active {
  color: #ffd36a;

  background: linear-gradient(
    180deg,
    rgba(214, 168, 79, 0.16),
    rgba(80, 50, 10, 0.28),
    rgba(0, 0, 0, 0)
  );
}

.nav-btn.active::before,
.nav-btn.active::after {
  opacity: 1;
  box-shadow:
    0 0 8px rgba(255, 210, 100, 0.65),
    0 0 16px rgba(255, 170, 50, 0.35);
}

.nav-btn.active img {
  filter:
    brightness(1.15)
    drop-shadow(0 0 8px rgba(255, 211, 106, 0.55));
}

.market-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 16px;
  height: 16px;

  margin-left: 6px;

  border: 1px solid rgba(240, 210, 126, 0.45);
  border-radius: 50%;

  color: #f0d27e;
  font-size: 10px;
  font-weight: 700;

  cursor: help;

  background: rgba(240, 210, 126, 0.08);

  box-shadow:
    0 0 4px rgba(240, 210, 126, 0.25);

  transition:
    transform .12s ease,
    box-shadow .12s ease;
}

.market-help:hover {
  transform: scale(1.08);

  box-shadow:
    0 0 8px rgba(240, 210, 126, 0.45);
}

.market-help {
  position: relative;
}

.market-help:hover::after {
  content: attr(data-help);

  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);

  width: 176px;
  padding: 8px 10px;

  background: rgba(12, 10, 6, 0.98);
  border: 1px solid rgba(240, 210, 126, 0.65);
  border-radius: 8px;

  color: #f0d27e;
  font-size: 10px;
  line-height: 1.3;
  font-weight: 600;

  z-index: 99999;
  pointer-events: none;
}

.market-header-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketplace-header-row {
  margin-bottom: 4px;
}

.marketplace-header-row h2 {
  margin-bottom: 2px !important;
}

.marketplace-header-row .meta {
  margin-bottom: 0 !important;
}

.adena-ok {
  color: #7ed957 !important;
  font-weight: 900;
}

.adena-missing {
  color: #ff7070 !important;
  font-weight: 900;
  text-shadow: 0 0 8px rgba(255,112,112,.25);
}	

/* Compact 80% final overrides */
body {
  grid-template-columns: 300px 1fr;
  grid-template-rows: 1fr 70px;
  font-size: 14px;
}

#main {
  padding: 12px;
}

#viewer,
.hero {
  max-width: 1800px;
}

.panel {
  padding: 10px;
  border-radius: 13px;
}

.item {
  padding: 8px;
  margin-bottom: 6px;
  gap: 9px;
}

.item-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.item-icon-wrap {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.item-header .item-icon,
.market-selected-item .item-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.item-header .item-icon-wrap,
.market-selected-item .item-icon-wrap {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

.item-header h2,
#viewer h2 {
  font-size: 24px;
}

.grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 16px;
}

.app-logo {
  width: 260px;
}

.search-frame {
  height: 80px;
}

.crafting-filter-nav {
  top: 220px;
  bottom: auto;
  height: 40px;
}

.crafting-filter-nav .tab,
.crafting-filter-nav .tab img {
  width: 40px !important;
  height: 40px !important;
  max-width: 40px !important;
  max-height: 40px !important;
}

.inventory-grid {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.inventory-tile {
  padding: 10px;
  border-radius: 8px;
}

.inventory-tile-icon {
  width: 42px;
  height: 42px;
}

.inventory-tile-name,
.item small,
.meta {
  font-size: 12px;
}

.inventory-tile-qty {
  font-size: 10px;
}

.craft-btn,
.market-craft-btn-image {
  width: 96px;
  height: 38px;
}

.marketplace-layout {
  grid-template-columns: minmax(300px, 500px) minmax(0, 1fr);
  gap: 12px;
}

#marketItemList {
  max-height: 440px;
}

.market-item-row {
  grid-template-columns: 32px 1fr 92px;
  gap: 8px;
  padding: 4px 6px;
}

.market-item-price strong,
.marketplace-right .raw-row span,
.marketplace-right .raw-row b {
  font-size: 13px;
}

.market-summary-panel {
  padding: 6px 10px;
  min-width: 300px;
}

.marketplace-header-row .market-summary-panel {
  width: 190px;
  padding: 2px 8px;
}

.marketplace-header-row .market-summary-panel h3 {
  font-size: 12px;
}

.marketplace-header-row .market-summary-panel .price {
  font-size: 16px;
}

.market-advisor-panel {
  max-height: 520px;
  padding: 10px;
}

.nav-btn {
  width: 120px;
  height: 64px;
}

.nav-btn img {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
}

.app-bottom-bar {
  height: 80px;
}

.market-price-history-panel {
  margin-top: 10px;
}

.market-price-history-panel h3 {
  margin-bottom: 8px;
}

.market-line-chart-wrap {
  position: relative;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(190, 145, 65, 0.28);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(45, 80, 120, 0.08), transparent 45%),
    rgba(6, 8, 10, 0.55);
}

.market-line-chart {
  width: 100%;
  height: 220px;
  display: block;
}

.market-chart-grid-line {
  stroke: rgba(180, 190, 200, 0.12);
  stroke-width: 1;
}

.market-chart-grid-line.vertical {
  stroke: rgba(180, 190, 200, 0.08);
}

.market-chart-axis-label,
.market-chart-x-label {
  fill: rgba(210, 200, 180, 0.75);
  font-size: 12px;
}

.market-chart-line {
  fill: none;
  stroke: #4ea1ff;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 5px rgba(78, 161, 255, 0.55));
}

.market-chart-point {
  fill: #101820;
  stroke: #4ea1ff;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(78, 161, 255, 0.65));
  cursor: pointer;
}

.market-chart-point.selected {
  fill: #f0d27e;
  stroke-width: 2.6;
  filter:
    drop-shadow(0 0 5px rgba(240, 210, 126, 0.8))
    drop-shadow(0 0 12px rgba(240, 210, 126, 0.35));
}

.market-chart-range-tabs {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 6px;
}

.market-chart-range-tabs button {
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(190, 145, 65, 0.35);
  color: #c9bea4;
  border-radius: 6px;
  padding: 4px 10px;
  font-weight: 700;
}

.market-chart-range-tabs button.active {
  color: #f0d27e;
  border-color: rgba(240, 210, 126, 0.75);
  background: rgba(70, 50, 18, 0.55);
}

.market-chart-line.min {
  stroke: #7ed957;
}

.market-chart-line.avg {
  stroke: #4ea1ff;
}

.market-chart-line.max {
  stroke: #ff7070;
}

.market-chart-point.min {
  stroke: #7ed957;
}

.market-chart-point.avg {
  stroke: #4ea1ff;
}

.market-chart-point.max {
  stroke: #ff7070;
}

.market-chart-legend {
  fill: rgba(240, 210, 126, 0.82);
  font-weight: 700;
}

.market-history-samples {
  margin-top: 12px;
  border-top: 1px solid rgba(190, 145, 65, 0.2);
  padding-top: 10px;
}

.market-history-samples-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.market-history-samples-header h4 {
  margin: 0;
  color: #e8c66d;
  font-size: 13px;
}

.market-history-samples-header span {
  color: #b8ad95;
  font-size: 11px;
  font-weight: 700;
}

.market-history-samples-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.market-history-samples-tools button,
.market-history-delete-btn {
  background: rgba(61, 18, 13, 0.92);
  color: #ffd0b0;
  border: 1px solid rgba(255, 120, 80, 0.45);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.market-history-samples-tools button:hover,
.market-history-delete-btn:hover {
  color: #ffe2ce;
  border-color: rgba(255, 150, 100, 0.8);
  box-shadow: 0 0 8px rgba(255, 120, 80, 0.22);
}

.market-history-sample-table-wrap {
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(190, 145, 65, 0.18);
  border-radius: 8px;
}

.market-history-sample-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.market-history-sample-table th,
.market-history-sample-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(190, 145, 65, 0.12);
  text-align: left;
  white-space: nowrap;
}

.market-history-sample-table th {
  position: sticky;
  top: 0;
  background: #17120b;
  color: #caa45a;
  font-size: 10px;
  text-transform: uppercase;
}

.market-history-sample-table td {
  color: #e8d6a3;
}

.market-history-sort-btn {
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.market-history-sort-btn:hover,
.market-history-sort-btn.active {
  color: #f0d27e;
}

.market-reset-panel {
  display: grid;
  place-items: center;
}

.market-reset-btn {
  width: 100%;
  height: 34px;

  background: linear-gradient(180deg, rgba(90, 32, 22, .95), rgba(35, 10, 8, .95));
  color: #ffd0b0;

  border: 1px solid rgba(255, 120, 80, .55);
  border-radius: 8px;

  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;

  cursor: pointer;
}

.market-reset-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 10px rgba(255, 90, 60, .35);
}

.marketplace-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.market-reset-btn {
  width: auto;
  height: 26px;

  padding: 0 10px;

  font-size: 11px;
  font-weight: 700;

  border-radius: 6px;
}

.market-import-btn {
  width: auto;
  height: 26px;

  padding: 0 10px;

  background: linear-gradient(
    180deg,
    rgba(55, 75, 35, .95),
    rgba(18, 35, 12, .95)
  );

  color: #d8ffb8;

  border: 1px solid rgba(140, 220, 90, .55);
  border-radius: 6px;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;

  cursor: pointer;
}

.market-import-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 10px rgba(140, 220, 90, .35);
}

.market-backup-btn,
.app-data-actions button {
  width: auto;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(
    180deg,
    rgba(55, 55, 80, .95),
    rgba(20, 20, 42, .95)
  );
  color: #d8ddff;
  border: 1px solid rgba(140, 155, 230, .55);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.market-backup-btn:hover,
.app-data-actions button:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 10px rgba(140, 155, 230, .35);
}

.app-data-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
