/* Crewing Portal — дополнительно к ../styles.css */

/* Узкий экран: без горизонтального «уезда» (flex body + min-content + сетки + code) */
body.crew-page {
  overflow-x: clip;
}

body.crew-page .site-root {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.crew-page .site-header {
  min-width: 0;
  max-width: 100%;
}

body.crew-page .logo-mark {
  min-width: 0;
}

.site-main.crew-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
}

body.crew-page .crew-hero p,
body.crew-page .crew-panel,
body.crew-page .crew-note,
body.crew-page .referral-box {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.crew-page code {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.88em;
}

.crew-hero {
  text-align: center;
  padding: 28px 16px 20px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, rgba(255, 204, 102, 0.12) 0, transparent 55%);
  border: 1px solid rgba(255, 204, 102, 0.2);
  margin-bottom: 22px;
}

.crew-hero h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  margin: 0 0 10px;
  letter-spacing: 0.06em;
}

.crew-hero p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.5;
}

.crew-section {
  margin-bottom: 28px;
}

.crew-section h2 {
  font-size: 1.05rem;
  color: var(--accent-gold-soft);
  margin: 0 0 14px;
  letter-spacing: 0.04em;
}

.crew-panel {
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  background: radial-gradient(circle at top left, #181b2c 0, #050713 88%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.crew-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.crew-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.crew-form-grid input,
.crew-form-grid select {
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 19, 0.9);
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.filter-grid select,
.filter-grid input {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  padding: 8px 10px;
  font-size: 13px;
}

.availability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.av-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  background: rgba(5, 7, 19, 0.6);
}

.lamp-on {
  color: #69d28c;
  font-size: 12px;
}

.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.results-table th {
  color: var(--accent-gold-soft);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.thumb {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  background: #111;
}

.status-ready {
  color: #69d28c;
}
.status-soon {
  color: #f0c87a;
}

.doc-ok {
  font-size: 11px;
}
.doc-warn {
  color: #f0c87a;
}
.doc-bad {
  color: #ff5c5c;
}

.crew-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  padding: 12px;
  border-left: 3px solid var(--border-gold-soft);
  background: rgba(255, 204, 102, 0.06);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 12px;
}

.referral-box {
  border-radius: var(--radius-lg);
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 204, 102, 0.1), transparent 60%);
  border: 1px solid rgba(255, 204, 102, 0.25);
  max-width: 100%;
  min-width: 0;
}

.leader-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin-top: 10px;
}

.leader-table {
  width: 100%;
  min-width: 0;
  font-size: 13px;
}
.leader-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.crew-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(5, 7, 19, 0.8);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.crew-btn:hover {
  border-color: var(--border-gold-soft);
}

@media (max-width: 768px) {
  .crew-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .availability-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
