.ships-market-page {
  gap: 20px;
}

.ships-market-hero,
.ships-market-toolbar,
.ships-market-statusbar,
.ships-market-pagination {
  display: flex;
  gap: 16px;
}

.ships-market-hero {
  justify-content: space-between;
  align-items: stretch;
}

.ships-market-hero__copy {
  flex: 1 1 620px;
}

.ships-market-hero__copy h1 {
  margin: 0 0 10px;
}

.ships-market-hero__copy p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
  max-width: 860px;
}

.ships-market-hero__info {
  flex: 0 0 320px;
}

.ships-market-tip {
  height: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(184, 145, 77, 0.24);
  background: linear-gradient(180deg, rgba(75, 136, 217, 0.08), rgba(184, 145, 77, 0.08));
}

.ships-market-tip__eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #ecd7ae;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ships-market-tip__content {
  display: grid;
  gap: 12px;
}

.ships-market-tip p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.ships-market-tip__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ships-market-app {
  display: grid;
  gap: 18px;
}

.ships-market-toolbar {
  align-items: end;
  flex-wrap: wrap;
}

.ships-market-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
}

.ships-tab {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.ships-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.03);
}

.ships-tab.is-active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(75,136,217,.22), rgba(75,136,217,.12));
  border-color: rgba(184,145,77,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.ships-market-toolbar__search {
  flex: 1 1 420px;
}

.ships-market-toolbar__actions {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: var(--text-soft);
  font-size: .92rem;
}

.field input,
.field select {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.primary-btn,
.pager-btn,
.page-pill {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: background .18s ease, border-color .18s ease, transform .18s ease, opacity .18s ease;
}

.primary-btn {
  background: linear-gradient(180deg, rgba(75,136,217,.26), rgba(75,136,217,.16));
  border-color: rgba(184,145,77,.34);
}

.primary-btn:hover,
.pager-btn:hover,
.page-pill:hover {
  background: var(--bg-soft);
}

.primary-btn:disabled,
.pager-btn:disabled,
.page-pill:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ships-market-statusbar {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.ships-market-results-meta {
  color: var(--text-soft);
  line-height: 1.5;
  min-height: 24px;
}

.ships-market-hint {
  display: none;
}

.ships-market-statusbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ships-market-loading {
  display: none;
  color: var(--text-soft);
}

.ships-market-loading.is-visible {
  display: inline-flex;
}

.ships-market-toast {
  min-height: 20px;
  font-size: .92rem;
  color: var(--success);
}

.rent-legend {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .83rem;
  font-weight: 700;
  white-space: nowrap;
}

.rent-legend--1 {
  color: #8de0b0;
  background: rgba(99,207,155,.10);
  border-color: rgba(99,207,155,.24);
}

.rent-legend--3 {
  color: #9cc0ff;
  background: rgba(75,136,217,.12);
  border-color: rgba(75,136,217,.26);
}

.rent-legend--7 {
  color: #f0d182;
  background: rgba(184,145,77,.14);
  border-color: rgba(184,145,77,.28);
}

.rent-legend--empty {
  color: var(--text-muted);
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.08);
}

.ships-market-table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,0.02);
}

.ships-market-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
}

.ships-market-table thead th {
  padding: 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
}

.ships-market-table tbody td {
  padding: 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  vertical-align: top;
  text-align: center;
}

.ships-market-table tbody tr:hover {
  background: rgba(255,255,255,.02);
}

.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}

.sort-btn:hover {
  background: rgba(255,255,255,.03);
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  color: var(--text-muted);
  font-size: .78rem;
}

.sort-btn.is-active .sort-indicator {
  color: var(--gold);
}

.ships-market-col-price,
.ships-market-col-price-short {
  text-align: center;
}

.ships-market-cell-center {
  text-align: center;
}

.ship-id {
  display: grid;
  gap: 6px;
}

.ship-id--center {
  justify-items: center;
}

.ship-id__manufacturer {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ship-id__manufacturer--center {
  justify-content: center;
}

.ship-id__code {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(75,136,217,.12);
  color: #b9d0ff;
  font-weight: 700;
  font-size: .8rem;
}

.ship-id__name {
  color: var(--text-soft);
}

.ship-id__ship {
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.locations-stack,
.rent-locations-stack {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.locations-stack--grid {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 10px;
  align-items: start;
  justify-items: stretch;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: 100%;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(184,145,77,.14);
  background: rgba(255,255,255,.02);
  color: var(--text-soft);
  font-size: .83rem;
  text-align: center;
}

.rent-card {
  display: grid;
  gap: 8px;
  width: min(100%, 380px);
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(184,145,77,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.015));
  justify-items: center;
}

.rent-card__place {
  font-weight: 700;
  text-align: center;
}

.rent-card__prices {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.rent-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
  font-size: .82rem;
  font-weight: 700;
}

.rent-badge small {
  color: inherit;
  opacity: .92;
  font-size: .75rem;
}

.rent-badge--1 {
  color: #8de0b0;
  background: rgba(99,207,155,.10);
  border-color: rgba(99,207,155,.24);
}

.rent-badge--3 {
  color: #9cc0ff;
  background: rgba(75,136,217,.12);
  border-color: rgba(75,136,217,.26);
}

.rent-badge--7 {
  color: #f0d182;
  background: rgba(184,145,77,.14);
  border-color: rgba(184,145,77,.28);
}

.rent-badge--empty {
  color: var(--text-muted);
}

.price-stack {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
}

.price-stack strong {
  font-size: .98rem;
}

.price-stack small {
  color: var(--text-muted);
  font-size: .74rem;
}

.price-stack--empty strong,
.ships-market-empty {
  color: var(--text-muted);
}

.ships-market-empty {
  text-align: center;
  padding: 26px 14px;
}

.ships-market-pagination {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.ships-market-pagination__meta {
  color: var(--text-soft);
}

.ships-market-pagination__inner,
.ships-market-pages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-pill {
  min-width: 42px;
  padding: 0 12px;
}

.page-pill.is-active {
  background: linear-gradient(180deg, rgba(75,136,217,.22), rgba(75,136,217,.12));
  border-color: rgba(184,145,77,.28);
}

.page-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: var(--text-muted);
}

@media (max-width: 1120px) {
  .ships-market-hero {
    flex-direction: column;
  }

  .ships-market-hero__info {
    flex: 1 1 auto;
  }

  .locations-stack--grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

@media (max-width: 860px) {
  .ships-market-toolbar,
  .ships-market-statusbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ships-market-toolbar__actions {
    justify-content: space-between;
  }

  .locations-stack--grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ships-market-app {
    padding: 18px;
  }

  .ships-market-tabs {
    width: 100%;
  }

  .ships-tab {
    flex: 1 1 0;
  }

  .ships-market-table {
    min-width: 920px;
  }

  .ships-market-tip__legend {
    gap: 6px;
  }
}

/* ===== Constructeur aligné à gauche uniquement ===== */

/* Header */
.ships-market-table thead th:first-child {
  text-align: left;
}

.ships-market-table thead th:first-child .sort-btn {
  justify-content: flex-start;
  text-align: left;
}

/* Cellules */
.ships-market-table tbody td:first-child {
  text-align: left;
}

/* Contenu interne */
.ship-id--center {
  justify-items: start;
}

.ship-id__manufacturer--center {
  justify-content: flex-start;
}

.ship-id__ship {
  text-align: inherit;
}