:root {
  --bg: #191511;
  --bg-deep: #0f0d0b;
  --panel: #2f261d;
  --panel-dark: #211b15;
  --paper: #d8c4a1;
  --paper-bright: #f1dfbd;
  --paper-muted: #ab916b;
  --red: #9c2f23;
  --red-bright: #c84b35;
  --orange: #d17a2c;
  --yellow: #e2b45f;
  --green: #7ba05b;
  --gray: #756758;
  --ink: #251b14;
  --white: #fff6e4;
  --shadow: rgba(0, 0, 0, 0.45);
  --radius: 10px;
  color-scheme: dark;
  font-family:
    "Trebuchet MS",
    "Arial Narrow",
    Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at 10% -10%, rgba(185, 71, 42, 0.25), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(229, 151, 60, 0.18), transparent 26rem),
    linear-gradient(180deg, #2a2119 0%, var(--bg) 36%, var(--bg-deep) 100%);
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--paper-bright);
}

button,
input,
select {
  font: inherit;
}

.item-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(105, 56, 34, 0.35);
  text-underline-offset: 3px;
}

.item-link:hover {
  text-decoration-color: currentColor;
}

.page-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding: 26px 18px 60px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 181, 0.18);
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(135deg, rgba(56, 44, 34, 0.92), rgba(26, 20, 15, 0.96)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 8px);
  box-shadow: 0 20px 60px var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -45% 45%;
  height: 260px;
  background: radial-gradient(circle, rgba(196, 76, 47, 0.36), transparent 68%);
  transform: rotate(-12deg);
}

.hero__topline,
.hero__content {
  position: relative;
  z-index: 1;
}

.hero__topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 231, 181, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.stamp {
  letter-spacing: 0.22em;
  color: var(--yellow);
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.server-status {
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.server-status--online {
  background: rgba(123, 160, 91, 0.18);
  color: #b9e48e;
  border: 1px solid rgba(123, 160, 91, 0.45);
}

.server-status--offline {
  background: rgba(156, 47, 35, 0.18);
  color: #ffb09e;
  border: 1px solid rgba(156, 47, 35, 0.45);
}

.hero__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: end;
  padding: 36px 34px 42px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 900;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  color: var(--white);
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.88;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.35);
}

h2 {
  color: var(--white);
  font-size: 32px;
  line-height: 1;
}

h3 {
  color: var(--white);
  font-size: 23px;
}

.hero__lead {
  max-width: 660px;
  color: var(--paper);
  font-size: 18px;
  line-height: 1.55;
}

.weekly-overview h1 {
  font-size: clamp(38px, 6vw, 72px);
  margin-bottom: 22px;
}

.weekly-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.weekly-summary > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 231, 181, 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.weekly-summary span,
.weekly-summary strong {
  display: block;
}

.weekly-summary span {
  color: var(--paper-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.weekly-summary strong {
  margin-top: 5px;
  color: var(--yellow);
  font-size: 18px;
  overflow-wrap: anywhere;
}

.current-stock-title {
  margin: 20px 0 10px;
  font-size: 20px;
  text-transform: uppercase;
}

.current-stock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 9px;
}

.current-stock-grid > div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(255, 231, 181, 0.13);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.current-stock-grid span,
.current-stock-grid strong,
.current-stock-grid small {
  display: block;
}

.current-stock-grid span {
  color: var(--paper-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.current-stock-grid strong {
  margin-top: 5px;
  color: var(--yellow);
  font-size: 16px;
}

.current-stock-grid small {
  margin-top: 4px;
  color: var(--paper-muted);
  overflow-wrap: anywhere;
}

.hero__card {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(15, 13, 11, 0.72);
  border: 1px solid rgba(255, 231, 181, 0.16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.32);
}

.hero__card-label {
  display: block;
  color: var(--paper-muted);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 8px;
}

.hero__card strong {
  display: block;
  color: var(--yellow);
  font-size: 22px;
  margin-bottom: 8px;
}

.hero__card p {
  margin: 0;
  color: var(--paper);
}

.login-card {
  align-self: stretch;
}

.login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 12px 0 8px;
}

.login-card small {
  color: var(--paper-muted);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
  border: 1px solid rgba(255, 231, 181, 0.1);
}

.tab {
  cursor: pointer;
  color: var(--paper);
  border: 0;
  background: linear-gradient(#3a2d22, #241c16);
  border-bottom: 3px solid rgba(0, 0, 0, 0.4);
  padding: 12px 16px;
  border-radius: 7px;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.tab:hover,
.tab.is-active {
  color: var(--white);
  background: linear-gradient(#b6432f, #7f251d);
}

.layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.sidebar,
.content-panel {
  min-width: 0;
}

.side-card,
.content-panel {
  border: 1px solid rgba(255, 231, 181, 0.15);
  background:
    linear-gradient(180deg, rgba(52, 41, 31, 0.98), rgba(31, 24, 18, 0.98)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 7px);
  border-radius: var(--radius);
  box-shadow: 0 14px 38px var(--shadow);
}

.side-card {
  padding: 18px;
  margin-bottom: 14px;
}

.side-card h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.side-card--note {
  background:
    linear-gradient(180deg, rgba(153, 47, 35, 0.34), rgba(48, 37, 28, 0.98)),
    var(--panel);
}

.side-card p {
  color: var(--paper);
  line-height: 1.45;
}

.filter-stack {
  display: grid;
  gap: 9px;
}

.filter-check {
  display: flex;
  grid-template-columns: none;
  gap: 9px;
  align-items: center;
  color: var(--paper);
  cursor: pointer;
}

.filter-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--red-bright);
}

.bot-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 231, 181, 0.1);
}

.bot-row small {
  display: block;
  color: var(--paper-muted);
  margin-top: 2px;
  word-break: break-all;
}

.bot-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.bot-dot--green {
  color: var(--green);
  background: var(--green);
}

.bot-dot--amber {
  color: var(--yellow);
  background: var(--yellow);
}

.button {
  cursor: pointer;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(#d76f3d, #982c22);
  color: var(--white);
  padding: 12px 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 0 rgba(0, 0, 0, 0.32);
}

.button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.button--wide {
  width: 100%;
  margin-top: 10px;
}

.button--small {
  padding: 9px 12px;
  font-size: 12px;
}

.button--dark {
  background: linear-gradient(#4d3d2f, #2a2119);
}

.content-panel {
  padding: 18px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

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

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

.subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.subtab {
  cursor: pointer;
  border: 1px solid rgba(255, 231, 181, 0.14);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--paper);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.subtab.is-active,
.subtab:hover {
  background: var(--red);
  color: var(--white);
}

.notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(209, 122, 44, 0.15);
  border: 1px solid rgba(209, 122, 44, 0.28);
  color: var(--paper-bright);
}

.currency-listing-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius);
  color: var(--ink);
  background: rgba(229, 207, 169, 0.96);
  border: 1px solid rgba(80, 54, 35, 0.6);
}

.currency-listing-panel h3,
.currency-listing-panel p {
  margin: 0 0 8px;
}

.currency-listing-panel .header-actions {
  flex-shrink: 0;
}

.post-card,
.trade-card,
.empty-card,
.table-card,
.queue-card,
.log-feed,
.settings-grid {
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(229, 207, 169, 0.98), rgba(191, 164, 121, 0.98)),
    var(--paper);
  color: var(--ink);
  border: 1px solid rgba(80, 54, 35, 0.6);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 212, 0.42),
    0 12px 32px rgba(0, 0, 0, 0.28);
}

.post-card {
  padding: 24px;
  margin-bottom: 16px;
}

.post-card--featured {
  border-left: 8px solid var(--red);
}

.post-card__date {
  margin-bottom: 10px;
  color: #70472d;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.post-card h2,
.trade-card h3,
.queue-card h3 {
  color: #3a2116;
}

.post-card p,
.post-card li {
  line-height: 1.55;
}

.trade-list {
  display: grid;
  gap: 12px;
}

.trade-card {
  padding: 18px;
}

.empty-card {
  padding: 22px;
  color: var(--ink);
}

.empty-card h3 {
  color: #3a2116;
}

.trade-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.trade-card__meta {
  color: #6e5137;
  font-size: 13px;
  font-weight: 800;
}

.trade-card__partner {
  margin-bottom: 0;
  color: #6e5137;
  font-weight: 800;
}

.trade-card__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.item-box {
  padding: 12px;
  border-radius: 8px;
  background: rgba(72, 48, 31, 0.12);
  border: 1px solid rgba(72, 48, 31, 0.18);
}

.item-box strong {
  display: block;
  margin-bottom: 6px;
  text-transform: uppercase;
  font-size: 12px;
  color: #6e3a25;
}

.item-name {
  margin: 4px 0;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
}

.item-name span,
.item-name small {
  display: block;
}

.item-price {
  margin-top: 2px;
  color: #5f4630;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.item-price--missing {
  color: #9c2f23;
}

.quality-unique {
  color: #7d6d00;
}

.quality-strange {
  color: #cf6a32;
}

.quality-unusual {
  color: #8650ac;
}

.quality-vintage {
  color: #476291;
}

.quality-genuine {
  color: #4d7455;
}

.quality-collectors {
  color: #aa0000;
}

.quality-haunted {
  color: #38f3ab;
}

.quality-pure {
  color: #4a7f9f;
}

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

.link-button {
  display: inline-flex;
  align-items: center;
  border-radius: 7px;
  padding: 9px 12px;
  background: rgba(58, 33, 22, 0.14);
  color: #3a2116;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pill--green {
  color: #efffe4;
  background: #57733c;
}

.pill--amber {
  color: #311f10;
  background: #e3a648;
}

.pill--gray {
  color: #fff7e8;
  background: #706456;
}

.pill--red {
  color: #fff2e8;
  background: #9c2f23;
}

.bot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.bot-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff7e8;
  background: #706456;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bot-badge--scalper {
  color: #49132f;
  background: #f39ac8;
  border: 1px solid #c94e8d;
}

.bot-badge--sniper {
  color: #173719;
  background: #9bd184;
  border: 1px solid #4f913f;
}

.table-number-input {
  width: 82px;
  min-width: 70px;
}

.current-price-cell > div + div {
  margin-top: 6px;
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(72, 48, 31, 0.18);
  text-align: left;
}

th {
  color: #693822;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.muted {
  color: #8c7152;
}

.queue-grid {
  display: grid;
  gap: 14px;
}

.queue-card {
  padding: 18px;
}

.queue-card p {
  color: #6a4d34;
}

.price-row,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 900;
  color: #5a321f;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(58, 33, 22, 0.35);
  border-radius: 7px;
  background: rgba(255, 247, 225, 0.72);
  color: #2c1c13;
  padding: 10px 11px;
  outline: none;
}

input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(156, 47, 35, 0.18);
}

select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(156, 47, 35, 0.18);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
}

.toolbar select,
.toolbar label {
  min-width: 150px;
}

.toolbar label {
  color: var(--paper);
  font-size: 12px;
}

.history-import {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid rgba(229, 207, 169, 0.22);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.16);
}

.history-import__heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.history-import__heading h3 {
  margin: 0 0 10px;
}

.history-import__status {
  padding: 8px 10px;
  border-radius: 7px;
  background: rgba(52, 122, 70, 0.25);
  font-size: 12px;
  text-align: right;
}

.history-import__status--alert {
  background: rgba(156, 47, 35, 0.35);
}

.history-import .toolbar {
  margin-bottom: 10px;
}

.history-import .notice ul {
  margin: 8px 0 0;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

#gladiatorSummary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

#gladiatorRows td {
  vertical-align: top;
}

#gladiatorRows td > small {
  margin-top: 5px;
  max-width: 250px;
  overflow-wrap: anywhere;
}

.summary-card {
  padding: 14px;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(229, 207, 169, 0.98), rgba(191, 164, 121, 0.98));
  color: var(--ink);
}

.summary-card strong,
.summary-card span,
td small {
  display: block;
}

.summary-card strong {
  color: var(--red);
  font-size: 28px;
}

.inline-prices,
.mini-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 6px;
}

.inline-prices input,
.mini-price-grid input {
  min-width: 65px;
  padding: 7px;
}

.review-item {
  margin-top: 8px;
  padding: 9px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.2);
}

.review-item__summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sale-item-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.sale-item-heading h3 {
  margin: 0;
}

.review-item__summary > div:not(.item-thumbnail) {
  min-width: 0;
}

.review-item__summary strong,
.review-item__summary small {
  display: block;
}

.review-item__summary small {
  margin-top: 3px;
  color: #5f4630;
}

.item-thumbnail-frame {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  position: relative;
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(57, 48, 40, 0.92), rgba(30, 27, 24, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
}

.item-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-thumbnail--base {
  z-index: 1;
}

.item-thumbnail--effect {
  z-index: 2;
  pointer-events: none;
}

.item-thumbnail--empty {
  opacity: 0.25;
}

.trade-side-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(72, 48, 31, 0.25);
}

.trade-side-total span {
  color: #6e5137;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.trade-side-total strong {
  margin: 0;
  color: #3a2116;
  text-align: right;
  text-transform: none;
  font-size: 15px;
}

.is-hidden {
  display: none !important;
}

.manual-transaction {
  display: grid;
  grid-template-columns: 130px minmax(240px, 2fr) 100px 110px minmax(190px, 1fr) minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.manual-transaction label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.manual-transaction input,
.manual-transaction select {
  width: 100%;
}

@media (max-width: 1180px) {
  .manual-transaction { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .manual-transaction { grid-template-columns: 1fr; }
}

.manual-price-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.manual-price-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 90px 90px;
  align-items: end;
  gap: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(72, 48, 31, 0.15);
}

.manual-price-row label {
  font-size: 10px;
  color: #5a321f;
}

.manual-price-row input {
  width: 100%;
  min-width: 0;
  padding: 7px;
}

.trade-status {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 5px;
}

.trade-status small {
  color: #6e5137;
  font-weight: 800;
}

.trade-reason {
  padding: 9px 11px;
  border-radius: 7px;
  background: rgba(194, 119, 54, 0.12);
  color: #5b3825;
  font-size: 13px;
  font-weight: 700;
}

.item-box h4 {
  margin: 0 0 8px;
  color: #6e3a25;
  text-transform: uppercase;
  font-size: 12px;
}

.service-strategy-panel {
  display: none;
}

.service-strategy-panel.is-active {
  display: block;
}

.review-item > strong,
.review-item > small {
  display: block;
}

.review-item > small {
  margin: 3px 0 8px;
  color: #5f4630;
}

.mini-price-grid label {
  font-size: 10px;
  color: #5a321f;
}

.strategy-settings > .notice {
  margin-bottom: 14px;
}

#authyExtra {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

#authyExtra select {
  width: 100%;
}

.log-feed,
.settings-grid {
  padding: 14px;
}

.log-line {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid rgba(72, 48, 31, 0.14);
}

.log-line:last-child {
  border-bottom: 0;
}

.log-line span {
  font-weight: 900;
  text-transform: uppercase;
}

.log-line p {
  margin: 0;
}

.log-line--warn span {
  color: #a86416;
}

.log-line--info span {
  color: #425f86;
}

.log-line--danger span {
  color: #9c2f23;
}

.settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #decba8, #bfa279);
  color: var(--ink);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

.modal__panel h2 {
  color: #3a2116;
}

.modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(58, 33, 22, 0.15);
  color: #3a2116;
  cursor: pointer;
  font-size: 22px;
}

.authy-input {
  margin: 8px 0 10px;
  font-size: 28px;
  text-align: center;
  letter-spacing: 0.25em;
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(440px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 10px;
  background: #2b2119;
  color: var(--white);
  border: 1px solid rgba(255, 231, 181, 0.18);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast--success {
  border-color: rgba(123, 160, 91, 0.55);
}

.toast--warn {
  border-color: rgba(226, 180, 95, 0.6);
}

.toast--danger {
  border-color: rgba(200, 75, 53, 0.7);
}

@media (max-width: 920px) {
  .hero__content,
  .layout {
    grid-template-columns: 1fr;
  }

  .hero__content {
    padding: 28px 22px 32px;
  }

  .settings-grid,
  .summary-grid,
  #gladiatorSummary,
  .price-row,
  .trade-card__columns {
    grid-template-columns: 1fr;
  }

  .manual-price-row {
    grid-template-columns: 1fr 1fr;
  }

  .manual-price-row small {
    grid-column: 1 / -1;
  }

  .currency-listing-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .currency-listing-panel .header-actions,
  .currency-listing-panel .button {
    width: 100%;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .page-shell {
    padding: 10px 8px 32px;
  }

  .hero__topline {
    padding: 11px 13px;
  }

  .hero__content {
    gap: 16px;
    padding: 22px 14px 20px;
  }

  .weekly-overview h1 {
    font-size: 38px;
    margin-bottom: 16px;
  }

  .weekly-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-summary strong {
    font-size: 15px;
  }

  .tabs,
  .subtabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tab,
  .subtab {
    flex: 0 0 auto;
  }

  .layout {
    gap: 10px;
    margin-top: 10px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .side-card {
    margin: 0;
    padding: 12px;
  }

  .side-card h2 {
    font-size: 16px;
  }

  .content-panel,
  .trade-card,
  .queue-card {
    padding: 12px;
  }

  .panel-header,
  .trade-card__top {
    display: grid;
  }

  .trade-status {
    justify-items: start;
  }

  .header-actions,
  .trade-actions {
    width: 100%;
  }

  .trade-actions .button,
  .trade-actions .link-button {
    flex: 1 1 130px;
    justify-content: center;
  }

  .toolbar select,
  .toolbar label {
    min-width: 100%;
  }

  .modal__panel {
    max-height: calc(100vh - 20px);
    overflow-y: auto;
  }
}

@media (max-width: 1100px) and (max-height: 650px) and (orientation: landscape) {
  .page-shell {
    max-width: none;
    padding: 8px 12px 26px;
  }

  .hero__topline {
    padding: 8px 14px;
  }

  .hero__content {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 14px;
    padding: 15px 18px 17px;
  }

  .weekly-overview h1 {
    font-size: 34px;
    margin-bottom: 10px;
  }

  .weekly-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .weekly-summary > div {
    padding: 7px 9px;
  }

  .weekly-summary strong {
    font-size: 14px;
  }

  .login-card {
    padding: 12px;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 8px;
    padding: 6px;
  }

  .layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 10px;
    margin-top: 10px;
  }

  .sidebar {
    display: block;
  }

  .side-card {
    padding: 12px;
    margin-bottom: 8px;
  }

  .content-panel {
    padding: 12px;
  }

  .trade-card__columns,
  .price-row {
    grid-template-columns: 1fr 1fr;
  }

  .modal__panel {
    max-height: calc(100vh - 16px);
    overflow-y: auto;
  }
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(43, 35, 27, 0.2);
  border-radius: 8px;
  background: rgba(255, 250, 238, 0.72);
}

.pagination:empty {
  display: none;
}

.pagination__summary {
  white-space: nowrap;
  color: var(--paper-muted);
}

.pagination__controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination__controls label {
  display: grid;
  gap: 3px;
  min-width: 90px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pagination__controls select,
.pagination__controls input {
  min-height: 34px;
  width: 100%;
}

.pagination__controls input {
  max-width: 88px;
}

@media (max-width: 720px) {
  .pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination__summary {
    white-space: normal;
  }

  .pagination__controls {
    justify-content: flex-start;
  }
}

.logs-table {
  min-width: 0;
  table-layout: fixed;
}

.logs-table th,
.logs-table td {
  vertical-align: top;
  padding: 10px 7px;
  overflow-wrap: anywhere;
}

.logs-table th {
  font-size: 10px;
  line-height: 1.2;
}

.logs-table th:nth-child(1) { width: 8%; }
.logs-table th:nth-child(2) { width: 22%; }
.logs-table th:nth-child(3) { width: 7%; }
.logs-table th:nth-child(4),
.logs-table th:nth-child(5),
.logs-table th:nth-child(8),
.logs-table th:nth-child(9) { width: 7%; }
.logs-table th:nth-child(6) { width: 12%; }
.logs-table th:nth-child(7) { width: 10%; }
.logs-table th:nth-child(10) { width: 10%; }
.logs-table th:nth-child(11) { width: 8%; }

.logs-table .pill {
  max-width: 100%;
  padding: 4px 7px;
  font-size: 10px;
  white-space: normal;
}

.logs-table td:nth-child(2) {
  min-width: 0;
}

.logs-table td:nth-child(2) small {
  display: block;
  margin-top: 5px;
  white-space: normal;
}

.logs-table input[type="number"] {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
}

.logs-table .button--small {
  width: 100%;
  padding: 8px 5px;
  font-size: 10px;
}

.log-actions {
  display: grid;
  gap: 5px;
}

.log-row--auto_lower { background: rgba(243, 154, 200, 0.14); }
.log-row--sell_order { background: rgba(235, 157, 58, 0.16); }
.log-row--hit_ceiling { background: rgba(202, 76, 58, 0.15); }
.log-row--delete_prices { background: rgba(132, 34, 28, 0.2); }
.log-row--manual_anchor { background: rgba(104, 164, 79, 0.15); }
.log-row--sell_listing_below_buy_price { background: rgba(180, 47, 47, 0.18); }
.log-row--lower_sell_listing { background: rgba(72, 156, 102, 0.16); }
.log-row--sell_listing_over_3_percent { background: rgba(214, 126, 38, 0.18); }

.sale-values {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sale-linker {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(159, 106, 45, 0.4);
  border-radius: 8px;
  background: rgba(235, 160, 74, 0.1);
}

.sale-linker__search {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 8px;
}

.sale-linker select {
  width: 100%;
}

@media (max-width: 720px) {
  .sale-values,
  .sale-linker__search {
    grid-template-columns: 1fr;
  }
}

.pill--log-auto_lower { color: #45132d; background: #f39ac8; }
.pill--log-sell_order { color: #3b230d; background: #eba04a; }
.pill--log-hit_ceiling { color: #fff5ed; background: #b84a37; }
.pill--log-delete_prices { color: #fff5ed; background: #7f251f; }
.pill--log-manual_anchor { color: #173719; background: #9bd184; }
.pill--log-sell_listing_below_buy_price { color: #fff; background: #a92f2f; }
.pill--log-lower_sell_listing { color: #12351e; background: #8fd2a6; }
.pill--log-sell_listing_over_3_percent { color: #3d2308; background: #e6a252; }

@media (max-width: 1050px) {
  .logs-table {
    min-width: 980px;
  }
}
