/* Shell da página: wrapper central, cabeçalho, tab-bar, card de conteúdo. */

.page-wrap {
  min-height: 100vh;
  padding: 22px 12px 60px;
}

.page-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px 12px;
  flex-wrap: wrap;
}

.page-eyebrow {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--text-3);
  text-transform: uppercase;
}

.page-title {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--wine-dark);
  line-height: 1.05;
}

.status-live {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 5px;
  font-size: 13px;
  color: var(--text-2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* Tab-bar */
.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  background: var(--wine);
  padding: 4px 4px 0;
  border-radius: var(--radius) var(--radius) 0 0;
}

.tab {
  padding: 10px 16px 9px;
  font-family: "Barlow Semi Condensed", Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 255, 255, .10);
  color: #f0d9da;
}

.tab--active {
  background: var(--surface-2);
  color: var(--wine-dark);
}

.content-card {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 18px;
}

/* Modo embed (online.php?embed=1 - bloco do TinyPortal via iframe, ver .embed-compact em
   online.php): sem .page-header acima, reduz o respiro do topo que só fazia sentido com o
   cabeçalho grande presente. */
body.page-embed .page-wrap {
  padding-top: 10px;
}

/* Card do piloto (sidebar da aba Logbook) */
.sidebar-card {
  flex: 1 1 220px;
  max-width: 280px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.sidebar-card__header {
  height: 104px;
  background: linear-gradient(140deg, var(--wine-dark), #2a0507);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-card__patch {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px solid rgba(226, 185, 107, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sidebar-card__patch img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-card__body {
  padding: 14px 16px 18px;
}

.sidebar-card__name {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.sidebar-card__real-name {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.sidebar-card__rank {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
}

.rank-bars {
  display: flex;
  gap: 3px;
}

.rank-bars span {
  width: 9px;
  height: 22px;
  background: linear-gradient(90deg, #c9cdd2, #8d939a);
  border: 1px solid #6f757c;
  display: block;
}

.rank-badge {
  height: 24px;
  width: auto;
  flex: none;
}

.sidebar-card__rank-label {
  font-family: "Barlow Semi Condensed", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  color: #5e5853;
  text-transform: uppercase;
}

.sidebar-card__divider {
  height: 1px;
  background: #eee7e2;
  margin: 16px 0 12px;
}

.sidebar-card__facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.fact-row__value {
  color: var(--text);
  font-weight: 600;
}

.fact-row__value--wine {
  color: var(--wine);
}

/* Grids reutilizados por várias abas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.cards-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.sparkline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.section-title {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--wine-dark);
  letter-spacing: .02em;
}

.page-section-title {
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--wine-dark);
}

.page-section-subtitle {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
}
