:root {
  color-scheme: dark;

  --bg-base: #090b0f;
  --bg-surface: #10151b;
  --bg-elevated: #171d26;
  --bg-hover: #202833;
  --bg-input: #0b0f14;
  --bg-card: #10151b;

  --border: rgba(12, 199, 185, 0.1);
  --border-strong: rgba(12, 199, 185, 0.22);

  --text-primary: #f2f4f8;
  --text-secondary: #d1d5db;
  --text-tertiary: #b0b8c4;
  --text-placeholder: #9ca3af;
  --text-disabled: #5c6472;

  --accent: #0cc7b9;
  --accent-hover: #3dd5c9;
  --accent-deep: #0a9d91;
  --accent-muted: rgba(12, 199, 185, 0.14);
  --accent-text: #041412;

  --magenta: #f457b5;
  --magenta-hover: #f677c6;
  --magenta-muted: rgba(244, 87, 181, 0.16);

  --success: #3ddc97;
  --success-muted: rgba(61, 220, 151, 0.12);
  --warning: #e8b84a;
  --warning-muted: rgba(232, 184, 74, 0.14);
  --danger: #ff5c6c;
  --status-online: #b794f6;
  --status-active: #48bb78;
  --verified: #3b9eff;

  --wts: #f457b5;
  --wtb: #0cc7b9;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.28);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}

[hidden] {
  display: none !important;
}

body {
  background-color: var(--bg-base);
  background-image: linear-gradient(
    180deg,
    #0d1218 0%,
    var(--bg-base) 38%,
    #07090c 100%
  );
}

button,
input,
select {
  font: inherit;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-placeholder);
  opacity: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.app {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 100px;
}

.brand-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
}

.brand-text h1,
.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-text p,
.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-text);
  box-shadow: 0 0 20px rgba(12, 199, 185, 0.28);
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Profile menu (top right) */
.profile-area {
  position: relative;
}

.profile-cluster {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow: hidden;
}

.profile-cluster:hover {
  border-color: var(--border-strong);
}

.profile-cluster:has(.availability-toggle:not([hidden])) {
  gap: 0;
}

.availability-toggle {
  gap: 8px;
  padding: 6px 12px;
  min-height: 40px;
  border: none;
  border-radius: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-tertiary);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.availability-toggle:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.availability-toggle:disabled {
  opacity: 0.6;
  cursor: wait;
}

.availability-toggle .status-dot {
  width: 8px;
  height: 8px;
  background: var(--text-disabled);
  box-shadow: none;
}

.availability-toggle.is-active {
  color: var(--status-active);
  background: rgba(72, 187, 120, 0.08);
}

.availability-toggle.is-active:hover:not(:disabled) {
  color: #68d391;
  background: rgba(72, 187, 120, 0.12);
}

.availability-toggle.is-active .status-dot {
  background: var(--status-active);
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.45);
}

.availability-toggle-label {
  white-space: nowrap;
}

.btn-profile {
  gap: 8px;
  padding: 6px 12px 6px 6px;
  min-height: 40px;
  border: none;
  border-radius: 0;
  background: transparent;
}

.profile-cluster .btn-profile:hover {
  background: var(--bg-hover);
}

.profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 30;
  display: none;
}

.profile-menu.open {
  display: block;
}

.profile-menu-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.profile-menu-header strong {
  display: block;
  font-size: 14px;
}

.profile-menu-header span {
  font-size: 12px;
  color: var(--text-tertiary);
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.profile-menu-item.danger {
  color: var(--danger);
}

.profile-menu-item .inbox-badge {
  position: static;
  display: none;
}

.profile-menu-item .inbox-badge.visible {
  display: inline-flex;
}

/* Page body: stacks home hero or orders content */
.page-body {
  position: relative;
}

/* Home hero: tagline + search fill the first screen */
.home-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.app.view-home .home-hero {
  min-height: calc(100svh - 72px);
  justify-content: center;
  gap: 28px;
}

.app.view-home .home-view {
  padding: 0 20px;
  flex-shrink: 0;
}

.app.view-home .search-bar {
  margin: 0;
  flex-shrink: 0;
}

/* Persistent search bar */
.search-bar {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 12px;
  padding: 0 4px;
}

.search-input-wrap-lg {
  position: relative;
}

.search-input-wrap-lg svg {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.search-clear {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.search-clear:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.search-input-lg {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 14px 44px 14px 46px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input-lg:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.search-input-lg::placeholder {
  color: var(--text-placeholder);
}

/* Home empty state */
.home-view {
  text-align: center;
}

.home-tagline {
  margin: 0;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-secondary);
}

/* Home about + FAQ (scroll below hero) */
.home-info {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 4px 64px;
  border-top: 1px solid var(--border);
}

.home-info-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.home-info-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.home-info-title {
  margin: 0 0 16px;
  font-size: clamp(20px, 3.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

.home-info-lead {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-tertiary);
}

.philosophy-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.philosophy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  transition: border-color 0.15s;
}

.philosophy-card:hover {
  border-color: var(--border-strong);
}

.philosophy-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 14px;
  line-height: 1;
}

.philosophy-card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.philosophy-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-tertiary);
}

.home-faq-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}

.faq-item[open] {
  border-color: var(--border-strong);
}

.faq-item summary {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-tertiary);
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.2s, background 0.15s;
}

.faq-item[open] summary::after {
  content: "−";
  background: var(--accent-muted);
  color: var(--accent);
}

.faq-item summary:hover {
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-tertiary);
}

.faq-item p strong {
  color: var(--text-secondary);
  font-weight: 600;
}

@media (max-width: 600px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 0 0 32px;
  color: var(--text-tertiary);
  font-size: 15px;
  line-height: 1.6;
}

.hero-search {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  text-align: left;
}

.autocomplete-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font: inherit;
  border-bottom: 1px solid var(--border);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: var(--bg-hover);
}

.autocomplete-item-thumb {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px solid var(--border);
  object-fit: cover;
  flex-shrink: 0;
}

.autocomplete-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.autocomplete-item-name {
  font-weight: 500;
}

.autocomplete-item-cat {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.autocomplete-empty {
  padding: 16px;
  color: var(--text-tertiary);
  font-size: 13px;
}

/* Item page */
.orders-view {
  animation: fadeIn 0.2s ease;
}

.item-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 0 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.item-image-ring {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  padding: 3px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 0 28px rgba(12, 199, 185, 0.35);
  overflow: hidden;
  cursor: default;
  transition: transform 0.15s, box-shadow 0.15s;
  display: block;
  font: inherit;
  color: inherit;
}

.item-image-ring--custom {
  cursor: zoom-in;
}

.item-image-ring--custom:hover {
  transform: scale(1.04);
  box-shadow: 0 0 36px rgba(12, 199, 185, 0.45);
}

.item-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
  pointer-events: none;
}

.item-banner-text {
  min-width: 0;
}

.item-banner-title {
  margin: 0;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

.item-banner-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.item-banner-category {
  margin: 0;
  font-size: 13px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item-banner-market-price {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.item-banner-market-price::before {
  content: "·";
  margin-right: 10px;
  color: var(--text-tertiary);
}

.item-banner-description {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.item-banner-description::before {
  content: "·";
  margin-right: 10px;
  color: var(--text-tertiary);
}

.orders-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.orders-nav-tab {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: default;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-group-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.tab[data-type="wts"].active,
.tab[data-listing-type="wts"].active {
  background: var(--magenta-muted);
  color: var(--wts);
}

.tab[data-type="wtb"].active,
.tab[data-listing-type="wtb"].active {
  background: var(--accent-muted);
  color: var(--wtb);
}

.col-type {
  width: 36px;
  padding-left: 10px !important;
}

.type-tag {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 4px;
  border-radius: 4px;
  text-align: center;
}

.type-tag-wts {
  background: var(--magenta-muted);
  color: var(--wts);
}

.type-tag-wtb {
  background: var(--accent-muted);
  color: var(--wtb);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-empty {
  padding: 32px 16px;
}

.filter-bar {
  margin: 0 0 8px;
  padding: 0;
}

.filter-bar-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 2px 0 4px;
}

.filter-bar-scroll::-webkit-scrollbar {
  display: none;
}

.filter-segment-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.filter-pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.filter-pill:hover {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--text-secondary);
}

.filter-pill.active {
  background: var(--accent-muted);
  border-color: rgba(12, 199, 185, 0.35);
  color: var(--accent);
}

.filter-pill-seg {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.filter-pill-seg.active[data-type="wts"] {
  background: var(--magenta-muted);
  border-color: rgba(244, 87, 181, 0.35);
  color: var(--wts);
}

.filter-pill-seg.active[data-type="wtb"] {
  background: var(--accent-muted);
  border-color: rgba(12, 199, 185, 0.35);
  color: var(--wtb);
}

.filter-pill-icon {
  font-size: 11px;
  line-height: 1;
}

.filter-pill-caret {
  font-size: 10px;
  opacity: 0.65;
  margin-left: 1px;
}

.filter-station-popover-wrap {
  position: relative;
  flex-shrink: 0;
}

.filter-station-popover {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-station-search {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}

.filter-station-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}

.filter-station-search::placeholder {
  color: var(--text-placeholder);
}

.filter-station-popover .filter-station-selected {
  margin-bottom: 6px;
}

.filter-station-popover .autocomplete-list-compact {
  position: static;
  display: block;
  margin-top: 6px;
  min-width: 0;
  max-height: min(280px, 45vh);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* FAB */
.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(12, 199, 185, 0.35);
  z-index: 25;
  transition: transform 0.15s, background 0.15s;
}

.fab:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.field input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
}

.field input:focus {
  border-color: var(--accent);
}

.phone-input {
  display: flex;
  align-items: stretch;
}

.phone-input .phone-prefix {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--text-secondary);
  font-size: inherit;
  user-select: none;
}

.phone-input input {
  flex: 1;
  min-width: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.auth-switch {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.auth-switch button {
  border: none;
  background: none;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.auth-switch button:hover {
  color: var(--accent-hover);
}

.listing-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.listing-form {
  gap: 16px;
}

.listing-item-search {
  position: relative;
}

.listing-item-search .autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-tertiary);
  text-transform: none;
  letter-spacing: 0;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.mrt-line-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mrt-line-tab {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.mrt-line-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mrt-line-tab.active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent);
}

.listing-station-selected {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.station-option,
.day-option {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-secondary);
  user-select: none;
  transition: border-color 0.15s, background 0.15s;
}

.day-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.day-option-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.day-option:not(.selected) .day-option-times {
  opacity: 0.45;
  pointer-events: none;
}

.day-time-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.day-time-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.day-time-select {
  display: block;
  min-width: 0;
}

.day-time-select select {
  width: 100%;
  min-width: 5.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 28px 8px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.day-time-select select:focus {
  border-color: var(--accent);
}

.weekly-hours-host {
  margin-top: 4px;
}

.weekly-hours-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weekly-hours-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weekly-preset-btn {
  font-size: 12px;
}

.weekly-hours-mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.field .weekly-hours-mode input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  accent-color: var(--accent);
  cursor: pointer;
}

.weekly-hours-same {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weekly-hours-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  gap: 10px;
  max-width: 320px;
}

.weekly-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.weekly-day-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  padding: 8px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.weekly-day-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekly-day-chip.selected {
  border-color: rgba(12, 199, 185, 0.45);
  background: var(--accent-muted);
  color: var(--text-primary);
}

.weekly-day-chip:hover {
  border-color: var(--border-strong);
}

.weekly-hours-custom .day-option-times {
  grid-template-columns: 1fr;
}

@media (max-width: 520px) {
  .weekly-hours-times {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

.station-option:hover,
.day-option:hover {
  border-color: var(--border-strong);
}

.station-option input,
.day-option input {
  accent-color: var(--accent);
}

.station-option.selected,
.day-option.selected {
  border-color: rgba(12, 199, 185, 0.45);
  background: var(--accent-muted);
  color: var(--text-primary);
}

.station-option.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.day-option-disabled {
  opacity: 0.55;
}

.day-option-disabled .day-option-label {
  cursor: not-allowed;
}

.day-option-unavailable {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-tertiary);
  grid-column: 1 / -1;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}

@media (max-width: 520px) {
  .day-grid {
    grid-template-columns: 1fr;
  }

  .field-row {
    grid-template-columns: 1fr;
  }
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 32px 8px 12px;
  border-radius: var(--radius);
  cursor: pointer;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  font-size: 11px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-text);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
  font-weight: 600;
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-inbox {
  position: relative;
}

.inbox-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.inbox-badge.visible {
  display: flex;
}

/* Search + filters (WFM style) */
.search-panel {
  display: none;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.search-input-wrap {
  flex: 1;
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 12px 10px 38px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.search-input::placeholder {
  color: var(--text-placeholder);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.tab-group {
  display: flex;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
}

.tab {
  padding: 6px 16px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}

.tab.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
}

.filter-chip label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.filter-chip input,
.filter-chip select {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
}

.filter-chip input {
  width: 64px;
}

.filter-chip-input input {
  width: 110px;
  min-width: 80px;
  caret-color: var(--text-primary);
}

.filter-chip input::placeholder {
  color: var(--text-placeholder);
}

.filter-input-wrap {
  position: relative;
}

.filter-station-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-station-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 3px 7px;
  border: none;
  border-radius: 999px;
  background: var(--accent-muted);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.filter-station-chip:hover {
  filter: brightness(1.08);
}

.filter-station-chip-x {
  font-size: 12px;
  opacity: 0.75;
}

.autocomplete-list-compact {
  min-width: 180px;
}

.filter-chip select {
  cursor: pointer;
  padding-right: 4px;
}

.toggle-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 13px;
  user-select: none;
  transition: all 0.15s;
}

.toggle-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.toggle-chip.active {
  background: var(--success-muted);
  border-color: rgba(61, 220, 151, 0.3);
  color: var(--success);
}

.toggle-chip input {
  display: none;
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-tertiary);
  font-size: 12px;
}

.results-meta strong {
  color: var(--text-secondary);
}

/* Order list */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.order-list-header,
.order-card {
  display: grid;
  grid-template-columns: 36px minmax(140px, 1.6fr) 80px 110px 80px minmax(100px, 1fr) 120px 96px;
  align-items: center;
  column-gap: 8px;
  padding: 12px 14px;
}

.order-list-header {
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.order-list-header > span:last-child {
  text-align: right;
}

.order-list-body {
  display: flex;
  flex-direction: column;
}

.order-card {
  border-top: 1px solid var(--border);
  transition: background 0.12s;
  background: rgba(255, 255, 255, 0.015);
}

.order-card:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.order-card:hover {
  background: var(--bg-hover);
}

.order-card.trader-active .trader-link {
  color: var(--status-active);
}

.order-card.trader-active .trader-link:hover {
  color: #68d391;
}

.order-card.trader-inactive {
  opacity: 0.58;
  filter: grayscale(0.3);
}

.order-card.trader-inactive:hover {
  opacity: 0.72;
  filter: grayscale(0.15);
}

.order-card.trader-inactive .trader-link,
.order-card.trader-inactive .oc-price,
.order-card.trader-inactive .oc-qty,
.order-card.trader-inactive .oc-updated,
.order-card.trader-inactive .station-chip {
  color: var(--text-tertiary);
}

.order-card.trader-inactive .status-dot {
  background: var(--text-disabled);
  box-shadow: none;
}

.oc-action {
  text-align: right;
  justify-self: end;
}

.oc-updated {
  color: var(--text-tertiary);
  font-size: 12px;
}

.oc-stations-mobile {
  display: none;
}

.stations-desktop {
  display: inline;
}

.station-list {
  display: none;
}

.order-own-label {
  color: var(--text-disabled);
  font-size: 12px;
}

.order-list-empty {
  grid-column: 1 / -1;
}

.trader-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-disabled);
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--status-online);
  box-shadow: 0 0 8px rgba(183, 148, 246, 0.55);
}

.status-dot.active {
  background: var(--status-active);
  box-shadow: 0 0 8px rgba(72, 187, 120, 0.45);
}

.trader-status-active {
  color: var(--status-active);
}

.trader-name {
  font-weight: 500;
  color: var(--accent);
}

.trader-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-tertiary);
}

.trader-status {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--status-online);
}

.price-cell {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--magenta);
}

.price-cell-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-cell .unit-price {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--magenta);
}

.price-cell .price-sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.qty-cell-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.qty-stack-icon {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

@media (min-width: 769px) {
  .qty-stack-icon {
    display: none;
  }
}

.qty-cell .qty-main {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.qty-cell-bulk .qty-bulk-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qty-cell .qty-sub {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.oc-rep-mobile {
  display: none;
}

.field label.bulk-trade-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: normal;
  cursor: pointer;
  margin-bottom: 8px;
}

.field label.bulk-trade-toggle input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--magenta);
  cursor: pointer;
}

.item-cell .item-name {
  font-weight: 500;
}

.item-cell .item-cat {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-wts {
  background: var(--magenta-muted);
  color: var(--wts);
}

.badge-wtb {
  background: var(--accent-muted);
  color: var(--wtb);
}

.badge-verified {
  background: var(--accent-muted);
  color: var(--accent);
}

.badge-expired {
  background: var(--warning-muted);
  color: var(--warning);
}

.verified-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--verified);
  vertical-align: middle;
  margin-left: 4px;
  line-height: 0;
}

.verified-tick svg {
  display: block;
}

.stations-cell {
  color: var(--text-secondary);
  font-size: 13px;
}

.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--text-tertiary);
}

.empty-state p {
  margin: 8px 0 0;
  font-size: 13px;
}

/* Inbox drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

.drawer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  margin: 0;
  font-size: 16px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
}

.inbox-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.inbox-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.inbox-item-title {
  font-weight: 600;
  color: var(--text-primary);
}

.inbox-item-time {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.inbox-message {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0 0 8px;
}

.inbox-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.inbox-actions {
  display: flex;
  gap: 8px;
}

/* Inbox button in header */
.btn-inbox {
  position: relative;
  padding: 8px 10px;
}

.btn-inbox svg {
  display: block;
}

/* Trade message highlights */
.trade-highlight-item {
  color: var(--success);
  font-weight: 600;
}

.trade-highlight-price {
  color: var(--magenta);
  font-weight: 600;
  font-family: var(--mono);
}

/* Reputation (Warframe.market-style) */
.reputation-cell {
  white-space: nowrap;
}

.reputation {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.reputation-score {
  font-variant-numeric: tabular-nums;
}

.reputation-face {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.reputation-face svg {
  width: 100%;
  height: 100%;
  display: block;
}

.reputation.rep-zero {
  color: var(--text-disabled);
}

.reputation.rep-good {
  color: #7ee787;
}

.reputation.rep-great {
  color: var(--accent);
}

.profile-menu-header .reputation {
  margin-top: 4px;
}

/* Image lightbox */
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
}

.image-lightbox.open {
  display: flex;
}

.image-lightbox-content {
  position: relative;
  max-width: min(520px, 92vw);
  max-height: min(520px, 88vh);
  animation: lightboxZoom 0.2s ease;
  cursor: default;
}

.image-lightbox-content img {
  width: 100%;
  height: 100%;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px rgba(12, 199, 185, 0.35),
    0 0 60px rgba(12, 199, 185, 0.25);
}

.image-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.image-lightbox-close:hover {
  background: var(--bg-hover);
}

@keyframes lightboxZoom {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Chat view inside drawer */
.drawer-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.drawer-chat:not([hidden]) {
  display: flex;
}

/* Premium page */
.premium-view {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.premium-page-header {
  text-align: center;
  margin-bottom: 28px;
}

.premium-page-title {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.premium-page-lead {
  margin: 0;
  font-size: 15px;
  color: var(--text-secondary);
}

.premium-status {
  max-width: 480px;
  margin: 0 auto 28px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  text-align: center;
}

.premium-status-title {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 4px;
}

.premium-status-plan {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.premium-status-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.premium-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: stretch;
}

.premium-plan-card {
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.premium-plan-card.current {
  border-color: var(--magenta);
  box-shadow: 0 0 0 1px rgba(255, 0, 128, 0.15);
}

.premium-plan-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  text-align: center;
}

.premium-plan-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.premium-plan-price {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  color: var(--magenta);
}

.premium-plan-features {
  flex: 1;
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.premium-plan-card .btn {
  width: 100%;
  margin-top: auto;
}

.premium-demo-hint {
  margin: 24px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* User profile page */
.profile-view {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 64px;
}

.profile-hero {
  background: linear-gradient(
    135deg,
    rgba(12, 199, 185, 0.06) 0%,
    color-mix(in srgb, var(--bg-elevated) 92%, transparent) 45%,
    rgba(244, 87, 181, 0.04) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0;
  overflow: hidden;
}

.profile-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  background: color-mix(in srgb, var(--bg-base) 55%, transparent);
}

.profile-hero-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.profile-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-muted);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 26px;
  font-weight: 700;
  flex-shrink: 0;
  border: 2px solid var(--border-strong);
}

.profile-hero-info {
  min-width: 0;
}

.profile-hero-name {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.profile-hero-name .verified-tick {
  margin-left: 0;
}

.profile-hero-name .verified-tick svg {
  width: 20px;
  height: 20px;
}

.profile-hero-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.profile-hero-stats {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.profile-hero-rep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  text-align: center;
}

.profile-hero-rep-badge {
  font-size: 28px;
}

.profile-hero-rep-badge .reputation {
  font-size: 28px;
  gap: 8px;
}

.profile-hero-rep-badge .reputation-face {
  width: 28px;
  height: 28px;
}

.profile-hero-rep-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.profile-nav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-top: 0;
}

.profile-nav-tab {
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.profile-nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.profile-orders-content {
  padding-top: 20px;
}

.profile-orders-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.profile-meetup-section {
  margin-bottom: 24px;
}

.profile-meetup-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.profile-meetup-title {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.profile-meetup-lead {
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.weekly-hours-custom .day-option-label span {
  min-width: 5.5rem;
}

.profile-expired-section {
  margin-top: 28px;
}

.profile-expired-banner {
  margin-bottom: 16px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: var(--warning);
  background: var(--warning-muted);
  border-top: 1px solid rgba(232, 184, 74, 0.25);
  border-bottom: 1px solid rgba(232, 184, 74, 0.25);
  border-radius: var(--radius);
}

.profile-orders-column {
  min-width: 0;
}

.profile-column-title {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.profile-column-wts {
  background: var(--magenta-muted);
  color: var(--wts);
}

.profile-column-wtb {
  background: var(--accent-muted);
  color: var(--wtb);
}

.profile-order-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}

.profile-order-card:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.profile-order-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg-input);
  flex-shrink: 0;
}

.profile-order-body {
  flex: 1;
  min-width: 0;
}

.profile-order-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-order-title-row .profile-order-name {
  flex: 1;
  min-width: 0;
}

.profile-order-title-row .badge-expired {
  flex-shrink: 0;
}

.profile-order-section-title {
  margin: 12px 0 4px;
  padding-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.profile-order-section-title.profile-order-section-expired {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  color: var(--warning);
}

.profile-order-name {
  display: block;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  color: var(--accent);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.profile-order-name:hover {
  color: var(--accent-hover);
}

.profile-order-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.profile-order-price {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.profile-order-card.wts .profile-order-price {
  color: var(--wts);
}

.profile-order-card.wtb .profile-order-price {
  color: var(--wtb);
}

.profile-hero-stats strong {
  color: var(--text-primary);
}

.profile-stat-wts {
  color: var(--wts);
}

.profile-stat-wtb {
  color: var(--wtb);
}

.profile-order-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.profile-reviews-content {
  padding: 0 24px 32px;
}

.profile-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}

.profile-review-card {
  padding: 16px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.profile-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.profile-review-author {
  font-weight: 600;
  font-size: 14px;
}

.profile-review-date {
  font-size: 12px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.profile-review-trade {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.profile-review-comment {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.profile-review-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.review-input {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  resize: vertical;
}

.review-input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-pending-actions .submit-review-btn {
  align-self: stretch;
}

.trader-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.trader-link .verified-tick {
  margin-left: 0;
}

.trader-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .profile-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
  }

  .profile-hero-rep {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }

  .profile-orders-grid {
    grid-template-columns: 1fr;
  }
}

.meetup-address-field {
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.meetup-address-text {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

.meetup-address-field .field-hint {
  margin: 0;
}

.listing-location-tabs {
  margin-bottom: 12px;
}

.chat-back-btn {
  margin-right: 4px;
}

.drawer-header h2 {
  flex: 1;
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.drawer-title-wrap h2 {
  margin: 0;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.report-user-btn {
  flex-shrink: 0;
  color: var(--danger);
  font-size: 12px;
  padding: 4px 8px;
}

.report-user-btn:hover {
  background: rgba(232, 93, 108, 0.12);
}

.leave-review-btn {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 12px;
  padding: 4px 8px;
}

.leave-review-btn:hover:not(:disabled) {
  background: rgba(12, 199, 185, 0.12);
}

.leave-review-btn.review-submitted {
  color: var(--success);
  opacity: 0.85;
}

.leave-review-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.chat-review-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(12, 199, 185, 0.08);
  border: 1px solid rgba(12, 199, 185, 0.22);
}

.chat-review-prompt-text {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.chat-review-prompt .btn {
  flex-shrink: 0;
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  resize: vertical;
  min-height: 72px;
}

textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-header-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
}

.chat-header-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.chat-status {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.chat-status-pending {
  background: var(--warning-muted);
  color: var(--warning);
}

.chat-status-accepted {
  background: var(--success-muted);
  color: var(--success);
}

.chat-status-locked {
  background: var(--warning-muted);
  color: var(--warning);
}

.chat-status-completed {
  background: var(--success-muted);
  color: var(--success);
}

.chat-status-disputed {
  background: rgba(255, 92, 108, 0.14);
  color: var(--danger);
}

.chat-status-declined,
.chat-status-expired {
  background: rgba(140, 150, 165, 0.16);
  color: var(--text-secondary, #8c96a5);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-bubble-mine {
  align-self: flex-end;
  background: var(--accent-muted);
  color: var(--text-primary);
  border-bottom-right-radius: 4px;
}

.chat-bubble-theirs {
  align-self: flex-start;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-bottom-left-radius: 4px;
}

.chat-bubble-system {
  align-self: center;
  background: var(--success-muted);
  color: var(--success);
  font-size: 12px;
  text-align: center;
  max-width: 95%;
}

.chat-bubble-time {
  font-size: 10px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.chat-compose {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.chat-compose input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius);
  outline: none;
  font: inherit;
}

.chat-compose input:focus {
  border-color: var(--accent);
}

.conversation-item {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.conversation-item:hover {
  background: var(--bg-hover);
}

.conversation-item-unread {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.conversation-item-unread:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.conversation-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--danger, #e5484d);
  vertical-align: middle;
  flex-shrink: 0;
}

.conversation-unread-label {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--danger, #e5484d);
  background: color-mix(in srgb, var(--danger, #e5484d) 12%, transparent);
}

.conversation-item-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-weight: 600;
  color: var(--text-primary);
}

.conversation-item-preview-unread {
  color: var(--text-primary);
  font-weight: 500;
}

.remove-chat-btn {
  color: var(--text-tertiary);
}

.remove-chat-btn:hover {
  color: var(--danger, #e5484d);
}

.conversation-item-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.conversation-item-time {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.conversation-item-preview {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-item-deal {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.chat-pending-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
  width: 100%;
}

.chat-action-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.chat-action-success {
  color: var(--success);
}

.chat-pending-actions[hidden] {
  display: none;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal {
  width: min(480px, 100%);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.modal-lg {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.modal-lg .modal-body {
  overflow-y: auto;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
}

.modal-header p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field > label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.field select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
}

.field select:focus {
  border-color: var(--accent);
}

.message-preview {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.message-preview .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.message-preview p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 360px;
  padding: 14px 18px;
  background: var(--bg-elevated);
  border: 1px solid rgba(61, 220, 151, 0.35);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: var(--shadow);
  z-index: 70;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast-action {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 768px) {
  .fab span {
    display: none;
  }

  .fab {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .filter-row {
    gap: 8px;
  }

  .app.view-home .home-view {
    width: 100%;
  }

  .app.view-home .search-bar {
    padding: 0 20px;
  }

  .search-bar {
    margin-bottom: 8px;
  }

  .item-banner {
    padding: 8px 0 8px;
    margin-bottom: 0;
    gap: 12px;
  }

  .orders-nav-tab {
    padding: 6px 0;
    font-size: 11px;
  }

  .filter-bar {
    margin-bottom: 4px;
  }

  .filter-bar-scroll {
    gap: 5px;
    padding: 0 0 2px;
  }

  .filter-pill {
    padding: 4px 10px;
    font-size: 11px;
  }

  .results-meta {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .item-image-ring {
    width: 64px;
    height: 64px;
  }

  .item-banner-title {
    font-size: 18px;
  }

  .table-card {
    background: transparent;
    border: none;
    overflow: visible;
  }

  .order-list-header {
    display: none;
  }

  .order-list-body {
    gap: 6px;
  }

  .order-card {
    position: relative;
    grid-template-columns: 22px 1fr auto;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "type trader price"
      "type trader qty"
      "type stations stations"
      "type updated action";
    gap: 0;
    padding: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    border-top: 1px solid var(--border);
    overflow: hidden;
  }

  .order-card:nth-child(even),
  .order-card:hover {
    background: var(--bg-surface);
  }

  .order-card.trader-inactive {
    opacity: 0.65;
    filter: grayscale(0.25);
  }

  .oc-type {
    grid-area: type;
    grid-row: 1 / -1;
    width: 22px;
    height: 0;
    overflow: visible;
    align-self: start;
    padding: 0 !important;
  }

  .order-card .type-tag {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 22px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    border-radius: 0;
    line-height: 1;
  }

  .order-card.wts .type-tag {
    background: var(--magenta-muted);
    color: var(--wts);
  }

  .order-card.wtb .type-tag {
    background: var(--accent-muted);
    color: var(--wtb);
  }

  .oc-trader {
    grid-area: trader;
    min-width: 0;
    padding: 7px 0 5px 8px;
  }

  .order-card .trader-cell {
    gap: 7px;
    align-items: flex-start;
  }

  .order-card .status-dot {
    width: 7px;
    height: 7px;
    margin-top: 4px;
  }

  .oc-rep {
    display: none;
  }

  .oc-rep-mobile {
    display: inline-flex;
  }

  .oc-rep-mobile .reputation {
    font-size: 11px;
  }

  .order-card .trader-meta {
    margin-top: 1px;
    gap: 5px;
  }

  .order-card .badge-row {
    margin-top: 2px;
  }

  .oc-price {
    grid-area: price;
    text-align: right;
    align-self: start;
    padding: 7px 10px 0 8px;
  }

  .oc-price .unit-price {
    font-size: 17px;
    line-height: 1.1;
  }

  .oc-price .price-sub {
    font-size: 10px;
    margin-top: 1px;
  }

  .oc-price .price-cell-inner {
    align-items: flex-end;
  }

  .oc-qty {
    grid-area: qty;
    text-align: right;
    align-self: start;
    padding: 1px 10px 5px 8px;
  }

  .oc-qty .qty-cell-inner {
    justify-content: flex-end;
  }

  .oc-qty .qty-cell-inner::before {
    content: "Qty: ";
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .oc-qty .qty-cell-bulk::before {
    content: none;
  }

  .oc-qty .qty-cell-bulk .qty-main::before {
    content: "Qty: ";
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .oc-qty .qty-main {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
  }

  .oc-qty .qty-cell-bulk .qty-main {
    color: var(--text-primary);
  }

  .oc-qty .qty-bulk-inner {
    align-items: flex-end;
  }

  .oc-qty .qty-sub {
    font-size: 10px;
    margin-top: 1px;
  }

  .oc-qty .qty-stack-icon {
    display: none;
  }

  .oc-stations {
    grid-area: stations;
    display: block;
    padding: 4px 10px 5px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }

  .stations-desktop {
    display: none;
  }

  .station-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0;
    width: 100%;
  }

  .station-chip {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0.01em;
  }

  .station-chip + .station-chip::before {
    content: "·";
    margin: 0 5px;
    color: var(--text-disabled);
    font-weight: 700;
  }

  .oc-updated {
    grid-area: updated;
    font-size: 10px;
    align-self: center;
    text-align: left;
    padding: 5px 0 7px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
  }

  .oc-action {
    grid-area: action;
    text-align: right;
    align-self: center;
    padding: 5px 10px 7px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: none;
  }

  .order-card .trade-btn {
    min-width: 0;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
  }

  .order-own-label {
    font-size: 10px;
  }

  .order-card .trader-link {
    font-size: 13px;
    line-height: 1.25;
    word-break: break-word;
  }

  .premium-plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .premium-plans {
    grid-template-columns: 1fr;
  }
}

/* Admin dashboard */
.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-header h1 {
  margin: 0;
  font-size: 22px;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

.admin-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.admin-panel-header h2 {
  margin: 0;
  font-size: 14px;
}

.admin-list {
  max-height: 70vh;
  overflow-y: auto;
}

.admin-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.admin-list-item:hover,
.admin-list-item.active {
  background: var(--bg-hover);
}

.admin-list-item-title {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}

.admin-list-item-meta {
  font-size: 12px;
  color: var(--text-tertiary);
}

.admin-detail {
  padding: 16px;
  max-height: 70vh;
  overflow-y: auto;
}

.admin-detail-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-tertiary);
}

.admin-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}

.admin-meta-grid dt {
  color: var(--text-tertiary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-meta-grid dd {
  margin: 2px 0 0;
}

.admin-chat-log {
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-chat-msg {
  font-size: 12px;
  line-height: 1.45;
}

.admin-chat-msg-system {
  color: var(--text-tertiary);
  text-align: center;
  font-style: italic;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.status-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-pill-pending {
  background: var(--warning-muted);
  color: var(--warning);
}

.status-pill-upheld {
  background: rgba(232, 93, 108, 0.18);
  color: var(--danger);
}

.status-pill-dismissed {
  background: var(--bg-hover);
  color: var(--text-tertiary);
}

.status-pill-completed {
  background: rgba(61, 220, 151, 0.12);
  color: var(--status-active);
}

.status-pill-declined {
  background: rgba(232, 93, 108, 0.18);
  color: var(--danger);
}

.status-pill-reported {
  background: rgba(232, 184, 74, 0.18);
  color: var(--warning);
}

.strike-badge {
  color: var(--danger);
  font-weight: 600;
}

.profile-order-card.inactive {
  opacity: 0.55;
  filter: grayscale(0.35);
}

.profile-order-card.inactive .profile-order-thumb {
  opacity: 0.7;
}

.profile-order-expiry {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.profile-order-card.inactive .profile-order-expiry {
  color: var(--warning);
}

.profile-order-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.profile-order-cooldown {
  font-size: 12px;
  color: var(--text-tertiary);
  margin: 4px 0 0;
}

.profile-order-action-refresh:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-order-action {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.profile-order-action-refresh {
  color: var(--accent);
}

.profile-order-action-refresh:hover {
  color: var(--accent-hover);
}

.profile-order-action-edit {
  color: color-mix(in srgb, var(--accent) 55%, var(--danger));
}

.profile-order-action-edit:hover {
  color: color-mix(in srgb, var(--accent-hover) 55%, var(--danger));
}

.profile-order-action-cancel {
  color: var(--danger);
}

.profile-order-action-cancel:hover {
  color: #ff7a87;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.admin-login-card {
  width: min(100%, 380px);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.admin-login-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}

.admin-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.admin-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: -1px;
  padding: 10px 14px;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  border-bottom-color: var(--accent);
  color: var(--text-primary);
}

.admin-tab-panel[hidden] {
  display: none;
}

.admin-item-orders-notice {
  background: var(--warning-muted);
  border: 1px solid var(--warning);
  border-radius: var(--radius);
  margin-bottom: 12px;
  padding: 12px;
}

.admin-panel-spaced {
  margin-top: 20px;
}

.admin-panel-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-search-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  width: 140px;
}

.admin-search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.admin-search-wrap {
  position: relative;
}

.admin-search-input-wide {
  width: 220px;
}

.admin-user-autocomplete-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}

.admin-list-item.user-highlight {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.admin-item-list .admin-list-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
}

.admin-item-thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.admin-item-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-tertiary);
}

.admin-item-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-item-form .field textarea {
  min-height: 72px;
  resize: vertical;
  width: 100%;
}

.admin-item-preview {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg-input);
  border: 1px solid var(--border);
}

.admin-item-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-item-preview-empty {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  background: var(--bg-input);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 8px;
}

.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.admin-table th {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--bg-input);
}

.admin-table tbody tr:hover {
  background: var(--bg-hover);
}

.admin-table-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.admin-table-time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
