:root {
  color-scheme: dark;
  --bg: #151718;
  --panel: #1d2021;
  --panel2: #25292a;
  --line: #34393a;
  --text: #eeefeb;
  --muted: #a6adaa;
  --accent: #65c7b8;
  --yellow: #e4bd73;
  --green: #65c7b8;
  --red: #f29a98;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 8px;
  padding: 9px 14px;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #343a39;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary,
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #09221f;
  font-weight: 650;
}
button.ghost {
  background: transparent;
}
.danger {
  color: var(--red);
}
input,
select,
textarea {
  background: #191c1d;
  border: 1px solid #454d4b;
  border-radius: 7px;
  color: var(--text);
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
label {
  font-size: 12px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}
textarea {
  resize: vertical;
  min-height: 80px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.2px;
  font-weight: 600;
  margin-bottom: 18px;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
p {
  color: var(--muted);
  margin-bottom: 16px;
}
small {
  color: var(--muted);
  font-size: 12px;
}
.layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  padding: 30px 18px;
  display: flex;
  flex-direction: column;
  background: #191c1d;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.8px;
}
.brand img {
  height: 34px;
  width: 34px;
}
.brand:hover {
  text-decoration: none;
}
.brand-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 2px;
  margin: 8px 0 38px 45px;
  text-transform: uppercase;
}
.nav {
  display: grid;
  gap: 7px;
}
.nav a {
  color: #a6adaa;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  font-weight: 500;
}
.nav a:hover {
  background: #252a29;
  color: #eeefeb;
  text-decoration: none;
}
.nav a.active {
  background: #233934;
  color: var(--accent);
}
.nav-icon {
  font-size: 17px;
  width: 21px;
  text-align: center;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 18px 12px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.private-mark {
  color: var(--accent);
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.content {
  min-width: 0;
}
.topbar {
  height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 38px;
  border-bottom: 1px solid var(--line);
  gap: 14px;
}
.breadcrumb {
  color: var(--muted);
  font-size: 12px;
}
.breadcrumb span {
  color: var(--text);
  margin-left: 10px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.connection {
  font-size: 12px;
  color: var(--muted);
}
.connection:before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 100%;
  background: var(--yellow);
  margin-right: 8px;
}
.main {
  max-width: 1580px;
  margin: 0 auto;
  padding: 32px 38px 40px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 25px;
}
.eyebrow {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 600;
}
.subtle {
  color: var(--muted);
  font-size: 13px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 550;
  padding: 4px 8px;
  border: 1px solid #3f3b2b;
  border-radius: 6px;
  color: var(--yellow);
  background: #28251f;
  white-space: normal;
  vertical-align: middle;
}
.badge.green {
  background: #142d26;
  border-color: #254b3b;
  color: var(--green);
}
.badge.cyan {
  background: #142c30;
  border-color: #244b50;
  color: var(--accent);
}
.badge.neutral {
  background: #282c2d;
  border-color: #404846;
  color: #b5bfba;
}
.badge.red {
  background: #301f25;
  border-color: #55343c;
  color: var(--red);
}
.banner {
  border: 1px solid #51432d;
  background: #211e19;
  border-radius: 6px;
  padding: 18px 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 25px;
}
.banner-icon {
  color: var(--yellow);
  font-size: 21px;
  line-height: 1.3;
}
.banner strong {
  color: #ead3a7;
  font-size: 13px;
}
.banner p {
  font-size: 12px;
  color: #b5ab99;
  margin: 5px 0 0;
}
.banner.info {
  border-color: #25464c;
  background: #112429;
}
.banner.info strong {
  color: var(--accent);
}
.grid {
  display: grid;
  gap: 18px;
}
.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 25px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 23px;
  min-width: 0;
}
.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 15px;
}
.metric-value {
  font-size: 33px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.15;
}
.metric-foot {
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}
.metric-value.green {
  color: var(--green);
}
.metric-value.yellow {
  color: var(--yellow);
}
.metric-value.cyan {
  color: var(--accent);
}
.two-col {
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  margin-bottom: 22px;
}
.equal-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.card-head h2 {
  margin: 0;
}
.status-line {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.status-line:first-of-type {
  border-top: 0;
}
.status-title {
  font-size: 13px;
  font-weight: 550;
}
.status-meta {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}
.right {
  text-align: right;
}
.mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
}
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  border-left: 1px solid #444e49;
  margin-left: 5px;
  padding: 0 0 22px 20px;
  position: relative;
  font-size: 13px;
}
.timeline li:before {
  content: "";
  position: absolute;
  left: -4px;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px var(--panel);
}
.timeline li:last-child {
  padding-bottom: 0;
}
.timeline small {
  display: block;
  margin-top: 4px;
}
.progress-row {
  margin: 17px 0;
}
.progress-row span {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  gap: 15px;
  margin-bottom: 8px;
}
progress {
  width: 100%;
  height: 6px;
  appearance: none;
  border: 0;
  border-radius: 20px;
  display: block;
  overflow: hidden;
  background: #343a38;
}
progress::-webkit-progress-bar {
  background: #343a38;
}
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 20px;
}
progress::-moz-progress-bar {
  background: var(--accent);
}
.notice {
  font-size: 12px;
  color: var(--muted);
  border-left: 2px solid #46554c;
  padding-left: 13px;
  margin: 18px 0;
}
.filters {
  padding: 20px;
  margin-bottom: 20px;
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.filter-grid .wide {
  grid-column: span 2;
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 17px;
}
.filter-actions .push {
  margin-left: auto;
}
.pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.pill {
  border-radius: 7px;
  font-size: 12px;
  padding: 8px 12px;
}
.pill.selected {
  border-color: var(--accent);
  background: #233934;
  color: var(--accent);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  min-width: 630px;
}
th {
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  background: #202424;
  padding: 13px 15px;
  white-space: nowrap;
}
td {
  padding: 17px 15px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
tbody tr:hover {
  background: #25292a;
}
.item-name {
  font-size: 13px;
  color: var(--text);
  font-weight: 550;
  display: block;
  max-width: 450px;
}
.item-meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}
.skin-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: inline-grid;
  place-items: center;
  background: #2b3330;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 19px;
  border: 1px solid #404e49;
}
.skin-cell {
  display: flex;
  gap: 12px;
  align-items: center;
}
.number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 550;
}
.yellow {
  color: var(--yellow);
}
.green {
  color: var(--green);
}
.cyan {
  color: var(--accent);
}
.pagination {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  font-size: 12px;
  color: var(--muted);
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.empty {
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed #444c48;
  border-radius: 6px;
  background: #191d1b;
}
.empty-icon {
  font-size: 28px;
  color: var(--accent);
  margin-bottom: 13px;
}
.empty h3 {
  font-size: 16px;
  margin: 0 0 9px;
}
.empty p {
  max-width: 580px;
  margin: 0 auto 18px;
  font-size: 13px;
}
.empty button {
  margin: 4px;
}
.footnote {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 30px;
  color: #a6adaa;
  font-size: 11px;
}
.loading {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}
.loading-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 100%;
  background: var(--accent);
  animation: pulse 1.3s infinite;
  margin-right: 8px;
}
.initial {
  padding: 80px;
  text-align: center;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 430px;
  padding: 34px;
  background: #1d2021;
  border: 1px solid #2b3d4b;
  border-radius: 8px;
  box-shadow: 0 30px 90px #0005;
}
.login-card .brand {
  margin-bottom: 34px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card form {
  display: grid;
  gap: 18px;
  margin-top: 25px;
}
.login-note {
  margin-top: 24px;
  font-size: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.error-box {
  background: #301f25;
  border: 1px solid #55343c;
  border-radius: 8px;
  padding: 13px;
  margin-bottom: 18px;
  color: #f4b0ad;
  font-size: 13px;
}
.mobile-toggle {
  display: none;
}
details {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #191d1b;
}
summary {
  cursor: pointer;
  padding: 13px 16px;
  font-size: 12px;
  color: #c3ccc7;
}
details > div,
details > pre {
  margin: 0;
  padding: 4px 16px 16px;
}
pre {
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 450px;
  overflow: auto;
}
.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.kv {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.kv dt {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 5px;
}
.kv dd {
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.link-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 12px;
}
.link-tools button,
.link-tools a {
  font-size: 11px;
}
.button {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 12px;
}
.button:hover {
  background: #343c38;
  text-decoration: none;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .wide {
  grid-column: span 3;
}
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.small-button {
  padding: 5px 9px;
  font-size: 11px;
}
.asset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.asset-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.asset-head h3 {
  margin: 0;
}
.asset-data {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  font-size: 12px;
}
.asset-data small {
  display: block;
  margin-bottom: 4px;
}
.planner-input {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.planner-input small {
  display: block;
}
.result-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.result-item {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.result-item .card-head {
  margin-bottom: 10px;
}
.price-input {
  max-width: 160px;
}
#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  max-width: 450px;
  background: #1a3b37;
  color: #c5fff1;
  padding: 13px 20px;
  border: 1px solid #3c796e;
  border-radius: 9px;
  box-shadow: 0 10px 40px #0005;
  z-index: 100;
  display: none;
}
#toast.show {
  display: block;
  animation: enter 0.2s ease-out;
}
.tabs-note {
  font-size: 11px;
  margin-top: 8px;
  color: var(--muted);
}
.space-top {
  margin-top: 24px;
}
.break {
  overflow-wrap: anywhere;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@keyframes pulse {
  50% {
    opacity: 0.3;
  }
}
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 1500px) {
  .main {
    padding-top: 40px;
  }
  .metrics {
    gap: 22px;
  }
  .card {
    padding: 26px;
  }
}
@media (max-width: 1150px) {
  .layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .sidebar {
    padding: 25px 13px;
  }
  .brand {
    font-size: 20px;
  }
  .main {
    padding: 25px;
  }
  .topbar {
    padding: 0 25px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .asset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 800px) {
  .layout {
    display: block;
  }
  .sidebar {
    display: none;
    position: fixed;
    z-index: 40;
    width: 240px;
    box-shadow: 20px 0 80px #000a;
  }
  .sidebar.open {
    display: flex;
  }
  .mobile-toggle {
    display: inline-block;
    padding: 6px 10px;
  }
  .topbar {
    height: 62px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: #151718f5;
  }
  .top-actions {
    gap: 9px;
  }
  .connection {
    display: none;
  }
  .main {
    padding: 24px 20px;
  }
  .equal-col {
    grid-template-columns: 1fr;
  }
  .page-head {
    gap: 12px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .details-grid {
    grid-template-columns: 1fr 1fr;
  }
  .filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-grid .wide {
    grid-column: span 2;
  }
  .brand-sub {
    margin-bottom: 28px;
  }
  .breadcrumb {
    font-size: 11px;
  }
}
@media (max-width: 600px) {
  .main {
    padding: 22px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-head {
    display: block;
  }
  .page-head > .badge {
    margin-top: 8px;
  }
  .metrics {
    gap: 10px;
  }
  .card {
    padding: 18px;
  }
  .metric-value {
    font-size: 28px;
  }
  .metric-label {
    font-size: 11px;
  }
  .metric-foot {
    font-size: 10px;
  }
  .banner {
    padding: 15px;
    gap: 11px;
  }
  .filter-grid {
    gap: 12px;
  }
  .filter-actions .push {
    margin-left: 0;
  }
  .details-grid,
  .asset-grid {
    grid-template-columns: 1fr;
  }
  .table-wrap {
    border: 0;
    overflow: visible;
  }
  table {
    min-width: 0;
    display: block;
  }
  thead {
    display: none;
  }
  tbody {
    display: grid;
    gap: 12px;
  }
  tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
    padding: 15px;
    gap: 14px;
  }
  td {
    padding: 0;
    border: 0;
    min-width: 0;
  }
  td:before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-bottom: 5px;
  }
  td:first-child {
    grid-column: 1 / -1;
  }
  td:first-child:before {
    display: none;
  }
  .item-name {
    max-width: 100%;
    font-size: 13px;
  }
  .skin-icon {
    width: 34px;
    height: 34px;
  }
  .pagination {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
  .footnote {
    flex-direction: column;
    gap: 8px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .wide {
    grid-column: span 1;
  }
  .login-card {
    padding: 27px;
  }
  .page-head .row-actions {
    margin-top: 15px;
  }
  .card-head {
    flex-wrap: wrap;
  }
  .status-line {
    gap: 10px;
  }
  .status-meta {
    font-size: 10px;
  }
  .planner-input {
    align-items: flex-start;
  }
  .price-input {
    max-width: 120px;
  }
  .filter-grid .wide {
    grid-column: span 2;
  }
  h1 {
    font-size: 26px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.sidebar-close {
  position: absolute;
  top: 30px;
  right: 8px;
  padding: 4px 8px;
  font-size: 18px;
  line-height: 1;
}
/* Shared workbench tokens and components. Rarity is confined to the item edge. */
:root {
  --space-1: 6px;
  --space-2: 12px;
  --space-3: 20px;
  --space-4: 32px;
  --radius: 6px;
  --surface-inset: #191c1d;
  --control-height: 42px;
  --heading-tracking: -0.035em;
}
h1,
h2,
h3 {
  letter-spacing: var(--heading-tracking);
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 650;
}
h2 {
  font-size: 18px;
}
h3 {
  font-size: 14px;
}
p {
  color: var(--muted);
}
.main {
  max-width: 1520px;
  padding: 32px;
}
.card {
  box-shadow: none;
  padding: 22px;
}
.topbar {
  height: 64px;
  padding: 0 32px;
}
.sidebar {
  padding: 26px 14px;
}
.nav a {
  font-size: 13px;
  padding: 11px 10px;
}
.brand {
  font-size: 21px;
}
.brand-sub {
  letter-spacing: 1.5px;
  margin-bottom: 30px;
}
.secondary-nav {
  margin-top: 38px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  gap: 2px;
}
.secondary-nav a {
  font-size: 12px;
  font-weight: 400;
  padding: 8px 12px;
}
.sidebar-bottom {
  font-size: 11px;
}
.breadcrumb span {
  color: var(--muted);
}
.eyebrow {
  letter-spacing: 1.4px;
  margin-bottom: 8px;
}
.page-head p {
  max-width: 760px;
}
.metric-value {
  font-size: 28px;
}
.notice {
  font-size: 12px;
  background: transparent;
}
.badge {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
}
.login-screen {
  background: var(--bg);
}
.login-card {
  width: min(430px, calc(100vw - 60px));
  padding: 38px;
  box-shadow: none;
  background: var(--panel);
  border-color: var(--line);
}
.login-card .eyebrow {
  margin-top: 32px;
}
.login-card h1 {
  font-size: 34px;
  line-height: 1.2;
  margin: 18px 0;
}
.login-card p {
  line-height: 1.7;
}
.steam-button {
  width: 100%;
  margin-top: 18px;
  min-height: 46px;
}
.admin-login {
  border: 0;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding: 0;
  border-radius: 0;
}
.admin-login summary {
  font-size: 12px;
  color: var(--muted);
  padding: 18px 0;
}
.admin-login form {
  margin-top: 6px;
}
.login-note {
  font-size: 11px;
}
.workbench-intro {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}
.import-strip,
.search-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
}
.import-strip > div,
.search-progress > div {
  flex: 1;
}
.import-strip strong,
.search-progress strong {
  display: block;
  font-size: 14px;
}
.import-strip small,
.search-progress small {
  display: block;
  margin-top: 4px;
}
.overview-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 24px 0;
}
.overview-stats a {
  padding: 0 24px;
  border-right: 1px solid var(--line);
  color: var(--text);
}
.overview-stats a:first-child {
  padding-left: 0;
}
.overview-stats a:last-child {
  border: 0;
}
.overview-stats strong {
  display: block;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 550;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.overview-stats span {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin-top: 8px;
}
.opportunity-summary {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.opportunity-summary strong {
  display: block;
  font-size: 28px;
}
.opportunity-summary span {
  font-size: 12px;
}
.opportunity-summary p {
  margin-left: auto;
  max-width: 340px;
  font-size: 12px;
}
.step-number {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 14px;
}
.freshness-notice {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
}
.freshness-notice a {
  white-space: nowrap;
  margin-left: auto;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  border-radius: 50%;
  flex: none;
}
.empty {
  padding: 32px 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: left;
}
.empty-icon {
  display: none;
}
.empty h3 {
  font-size: 18px;
}
.empty p {
  max-width: 680px;
  margin-left: 0;
}
.compact-filters {
  margin: 18px 0;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.compact-filters .filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}
.advanced-filters {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  margin-top: 12px;
}
.advanced-filters summary {
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
}
.advanced-filters .filter-grid {
  margin-top: 12px;
}
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.chip {
  font-size: 11px;
  padding: 5px 9px;
  background: var(--panel);
  border-color: var(--line);
  border-radius: 4px;
}
.selection-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 12px;
  color: var(--muted);
}
.selection-bar button {
  font-size: 12px;
}
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.inventory-item {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 2px solid #7e8884;
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}
.inventory-item.rarity-industrial-grade {
  border-top-color: #75a6c4;
}
.inventory-item.rarity-mil-spec-grade {
  border-top-color: #7184d4;
}
.inventory-item.rarity-restricted {
  border-top-color: #a783c6;
}
.inventory-item.rarity-classified {
  border-top-color: #c77ca1;
}
.inventory-item.rarity-covert {
  border-top-color: #ce7775;
}
.item-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-inset);
  color: #71847b;
}
.item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 200px;
  padding: 12px;
}
.item-thumb > span {
  font-size: 30px;
  opacity: 0.6;
}
.item-thumb.small {
  width: 76px;
  height: 58px;
  flex: none;
  border-radius: 4px;
}
.item-thumb.small img {
  padding: 4px;
}
.inventory-item-body {
  padding: 14px;
}
.inventory-item h3 {
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.inventory-item .item-meta {
  font-size: 11px;
  line-height: 1.6;
}
.asset-values {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.asset-values .badge {
  font-size: 10px;
}
.asset-select {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--panel);
  z-index: 1;
}
.asset-select input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  margin: 0;
}
.asset-evidence {
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.asset-evidence summary {
  font-size: 11px;
  padding: 10px 0;
}
.asset-evidence p {
  font-size: 11px;
  overflow-wrap: anywhere;
}
.inventory-item .row-actions {
  gap: 6px;
}
.inventory-item button {
  font-size: 11px;
}
.inventory-list {
  grid-template-columns: 1fr;
}
.inventory-list .inventory-item {
  display: flex;
  align-items: center;
}
.inventory-list .item-thumb {
  width: 160px;
  flex: none;
  align-self: stretch;
  height: auto;
  min-height: 140px;
}
.inventory-list .inventory-item-body {
  flex: 1;
}
.inventory-list .asset-values {
  justify-content: flex-start;
  gap: 40px;
}
.personal-results {
  display: grid;
  gap: 24px;
}
.personal-result {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.personal-result .card-head {
  align-items: center;
  margin-bottom: 18px;
}
.personal-result .eyebrow {
  font-size: 9px;
}
.personal-result h2 {
  margin: 0;
}
.basket-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
}
.basket-input {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 8px;
}
.basket-input > div:last-child {
  min-width: 0;
}
.basket-input strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.basket-input small {
  display: block;
  font-size: 11px;
}
.basket-arrow {
  align-self: center;
  color: var(--accent);
  font-size: 24px;
}
.missing-input {
  border: 1px dashed var(--line);
  padding: 12px;
  border-radius: 4px;
  margin-top: 12px;
}
.missing-input strong,
.missing-input small {
  display: block;
}
.missing-input strong {
  font-size: 12px;
}
.missing-input small {
  font-size: 11px;
  margin-top: 5px;
}
.outcome-distribution h3 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  margin-top: 0;
}
.outcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.outcome-row > div {
  min-width: 0;
}
.outcome-row strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.outcome-row small {
  display: block;
  font-size: 11px;
}
.outcome-row > span {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.financial-line {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin: 12px 0;
}
.financial-line small {
  display: block;
  font-size: 11px;
}
.financial-line strong {
  display: block;
  margin: 6px 0;
  font-size: 16px;
  font-weight: 550;
}
.personal-result > details {
  border: 0;
  padding: 0;
  background: transparent;
}
.personal-result > details > summary {
  padding: 10px 0;
  font-size: 12px;
}
.personal-result .row-actions {
  justify-content: space-between;
}
.personal-result .row-actions small {
  font-size: 10px;
}
.account-card {
  max-width: 780px;
}
.search-progress {
  border-bottom: 1px solid var(--line);
  padding-top: 0;
}
.sale-price-block .metric-value {
  font-size: 22px;
}
.result-item .details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.footnote {
  font-size: 10px;
}
.main > details > summary {
  font-size: 12px;
}
.filter-actions {
  flex-wrap: wrap;
}
.break,
dd {
  overflow-wrap: anywhere;
}
@media (min-width: 1600px) {
  .main {
    padding: 40px 48px;
  }
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}
@media (max-width: 1100px) {
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .overview-stats a {
    padding: 0 16px;
  }
  .financial-line {
    grid-template-columns: 1fr 1fr;
  }
  .financial-line > div:last-child {
    grid-column: 1/-1;
  }
  .personal-result .row-actions {
    justify-content: flex-start;
  }
  .opportunity-summary {
    gap: 24px;
  }
  .opportunity-summary p {
    max-width: 250px;
  }
}
@media (max-width: 800px) {
  .main {
    padding: 24px 20px;
  }
  .page-head {
    flex-wrap: wrap;
    gap: 14px;
  }
  .sidebar {
    z-index: 10;
  }
  .topbar {
    background: var(--bg);
    padding: 0 20px;
  }
  .compact-filters .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
  .compact-filters .wide {
    grid-column: 1/-1;
  }
  .basket-flow {
    grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
    gap: 10px;
  }
  .financial-line {
    gap: 14px;
  }
  .opportunity-summary {
    flex-wrap: wrap;
  }
  .opportunity-summary p {
    max-width: none;
    margin: 0;
  }
  .overview-stats a {
    padding: 0 14px;
  }
  .overview-stats strong {
    font-size: 30px;
  }
  .inventory-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .inventory-item-body {
    padding: 12px;
  }
  .item-thumb {
    height: 120px;
  }
}
@media (max-width: 620px) {
  .main {
    padding: 22px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .page-head h1 {
    font-size: 27px;
  }
  .page-head p {
    font-size: 12px;
  }
  .import-strip {
    flex-wrap: wrap;
    gap: 12px;
  }
  .import-strip > div {
    flex-basis: 100%;
  }
  .import-strip button {
    font-size: 12px;
  }
  .overview-stats {
    grid-template-columns: 1fr 1fr;
    row-gap: 24px;
  }
  .overview-stats a {
    padding: 0 14px;
  }
  .overview-stats a:nth-child(odd) {
    padding-left: 0;
  }
  .overview-stats a:nth-child(even) {
    border: 0;
  }
  .overview-stats strong {
    font-size: 32px;
  }
  .overview-stats span {
    font-size: 11px;
  }
  .inventory-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .inventory-item-body {
    padding: 10px;
  }
  .inventory-item h3 {
    font-size: 12px;
  }
  .item-thumb {
    height: 110px;
  }
  .inventory-item .item-meta {
    font-size: 10px;
  }
  .asset-values {
    font-size: 11px;
    display: block;
    margin: 10px 0;
  }
  .asset-values > span {
    display: block;
    margin-top: 6px;
  }
  .inventory-item .row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .inventory-item .small-button {
    padding: 8px 4px;
  }
  .selection-bar {
    flex-wrap: wrap;
  }
  .selection-bar button {
    width: 100%;
  }
  .basket-flow {
    grid-template-columns: 1fr;
    padding-top: 0;
  }
  .basket-arrow {
    transform: rotate(90deg);
    justify-self: center;
    height: 24px;
  }
  .personal-result {
    padding: 16px;
  }
  .personal-result .card-head {
    align-items: flex-start;
    gap: 10px;
  }
  .personal-result h2 {
    font-size: 16px;
  }
  .personal-result .card-head > .badge {
    max-width: 100px;
  }
  .outcome-row strong {
    font-size: 12px;
  }
  .financial-line {
    grid-template-columns: 1fr;
  }
  .financial-line > div:last-child {
    grid-column: auto;
  }
  .financial-line > div {
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
  }
  .financial-line > div:last-child {
    border: 0;
    padding: 0;
  }
  .personal-result .row-actions {
    display: block;
  }
  .personal-result .row-actions button {
    width: 100%;
  }
  .personal-result .row-actions small {
    display: block;
    margin-top: 10px;
  }
  .inventory-list .item-thumb {
    width: 90px;
  }
  .inventory-list .asset-values {
    display: flex;
    gap: 16px;
  }
  .inventory-list .inventory-item .row-actions {
    display: flex;
  }
  .inventory-list .asset-select {
    left: 6px;
    top: 6px;
  }
  .freshness-notice {
    align-items: flex-start;
    line-height: 1.6;
  }
  .freshness-notice .status-dot {
    margin-top: 6px;
  }
  .freshness-notice a {
    display: none;
  }
  .login-card {
    padding: 28px 24px;
  }
  .login-card h1 {
    font-size: 30px;
  }
  .card {
    padding: 18px;
  }
  .result-item .details-grid {
    grid-template-columns: 1fr;
  }
  .result-item {
    padding: 12px 0;
  }
  .footnote {
    line-height: 1.7;
  }
  .filter-grid .wide {
    grid-column: 1/-1;
  }
  .filter-actions .push {
    display: none;
  }
  .search-progress {
    align-items: flex-start;
  }
  .search-progress small {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Second visual review: stable action widths, precise values in details, bounded rows. */
.page-head > .button,
.page-head > button {
  flex: none;
  white-space: nowrap;
}
#asset-editor {
  scroll-margin-top: 82px;
}
.asset-values > span:first-child {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, monospace;
  font-size: 11px;
}
@media (max-width: 1000px) {
  .page-head {
    flex-wrap: wrap;
  }
  .page-head > div {
    flex-basis: 100%;
  }
  .overview-stats span {
    line-height: 1.45;
  }
}
@media (max-width: 620px) {
  .inventory-item .small-button {
    min-height: 40px;
    font-size: 12px;
  }
  .inventory-item h3 {
    font-size: 13px;
  }
  .asset-values {
    font-size: 12px;
  }
  .inventory-item .item-meta {
    font-size: 11px;
  }
  .inventory-item .asset-values > span:first-child {
    font-size: 11px;
  }
}
/* Import feedback stays in the existing workbench layout. */
.import-result {
  margin: 0 0 14px;
}
.import-result p {
  margin: 7px 0;
  color: inherit;
}
.import-result small {
  display: block;
  line-height: 1.7;
}

/* Bounded inventory file form; keep its native file/checkbox controls compact. */
#inventory-file-form {
  display: grid;
  gap: 12px;
  max-width: 48rem;
}
#inventory-file-form label {
  display: grid;
  gap: 6px;
}
#inventory-file-form label:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
#inventory-file-form input[type="checkbox"] {
  width: auto;
  flex: 0 0 auto;
  margin-top: 3px;
}
#inventory-file-form input[type="file"] {
  width: 100%;
  min-width: 0;
}
#inventory-file-form button {
  justify-self: start;
}
#inventory-file-error:empty {
  display: none;
}

/* Separate evidence-based axes and explicit price scenarios, within existing basket surfaces. */
.personal-economics {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
}
.economics-axes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.economics-axes section {
  min-width: 0;
}
.economics-axes p,
.personal-scenario p {
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
.economic-evidence,
.personal-scenario {
  margin-top: 14px;
}
.scenario-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.4fr) minmax(100px, 0.6fr);
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.scenario-price-row > div,
.scenario-price-row label {
  min-width: 0;
  overflow-wrap: anywhere;
}
.scenario-price-row strong {
  font-size: 12px;
}
.scenario-price-row small {
  display: block;
  color: var(--muted);
}
.scenario-result-box {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
}
.scenario-error {
  margin-top: 10px;
  color: #f4b0ad;
  overflow-wrap: anywhere;
}
@media (max-width: 1050px) {
  .economics-axes {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 650px) {
  .scenario-price-row {
    grid-template-columns: 1fr;
  }
}

.reference-note {
  grid-column: 1 / -1;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.economic-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#personal-filters .filter-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.65fr) minmax(
      0,
      1.3fr
    ) auto;
}
#personal-filters .wide {
  grid-column: auto;
}
@media (max-width: 1050px) {
  #personal-filters .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #personal-filters .wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 650px) {
  #personal-filters .filter-grid {
    grid-template-columns: 1fr;
  }
}
