/* High Alch page layout */
.alch-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.alch-control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.alch-controls label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }

.alch-controls input[type="number"] {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-family: inherit;
  width: 90px;
  outline: none;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.alch-controls input[type="number"]:focus { border-color: var(--blue); }
.alch-controls input[type="number"]::-webkit-outer-spin-button,
.alch-controls input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Segmented button group (replaces selects) */
.alch-btn-group { display: flex; }
.alch-btn-group button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 4px 10px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  margin-left: -1px;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  position: relative;
}
.alch-btn-group button:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.alch-btn-group button:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.alch-btn-group button.active { border-color: var(--blue); color: var(--blue); background: rgba(96,165,250,0.08); z-index: 1; }
.alch-btn-group button:not(.active):hover { color: var(--text); background: var(--border); }

.alch-summary {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.alch-stat {
  flex: 1;
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.alch-stat:last-child { border-right: none; }
.alch-stat-label { font-size: 10px; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 4px; }
.alch-stat-value { font-size: 18px; font-weight: 700; }

/* Table */
.alch-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.alch-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.alch-table th {
  text-align: left;
  color: var(--muted);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.alch-table th:hover { color: var(--text); }
.alch-table th.sorted { color: var(--blue); }
.sort-arrow { font-size: 9px; margin-left: 3px; opacity: 0.8; }
.alch-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.alch-table tr:last-child td { border-bottom: none; }
.alch-table tr:hover td { background: rgba(96,165,250,0.04); }

.alch-item-cell { display: flex; align-items: center; gap: 8px; }
.alch-item-name { text-transform: capitalize; font-weight: 500; }

.badge-f2p {
  background: rgba(74,222,128,0.15);
  color: var(--green);
  border: 1px solid rgba(74,222,128,0.3);
  border-radius: 3px;
  font-size: 9px;
  padding: 1px 5px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.profit-highlight {
  font-weight: 700;
  font-size: 14px;
}

.tier-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.tier-dot.high     { background: var(--green); }
.tier-dot.medium   { background: var(--blue); }
.tier-dot.low      { background: var(--gold); }
.tier-dot.illiquid { background: var(--muted); }

@media (max-width: 800px) {
  .alch-controls { flex-direction: column; align-items: stretch; }
  .alch-summary { flex-direction: column; }
}
