/* WiK Codex — Members dashboard styles.
   Black & Gold Luxury: follows the V2 palette tokens
   (--wik-bg #070807, --wik-gold-primary #D6AA4F, --wik-gold-highlight #F3D27A).
   Page-only file: shared header/table styles come from the linked V2 sheets. */

.members-main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

.members-intro {
  padding: 1.6rem 0 1.2rem;
}
.members-intro .section-kicker {
  color: var(--wik-gold-primary, #D6AA4F);
}
.members-page-title {
  font-size: clamp(1.6rem, 6vw, 2.3rem);
  letter-spacing: -.02em;
  line-height: 1.12;
  margin-top: .45rem;
}
.members-page-text {
  color: #C8C8C4;
  margin-top: .5rem;
  font-size: .92rem;
}

/* Summary band: alliance vitals */
.members-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(242, 242, 242, .08);
  border: 1px solid rgba(242, 242, 242, .08);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.2rem;
}
.members-summary-cell {
  background: rgba(7, 8, 7, .92);
  padding: .9rem 1rem;
}
.members-summary-cell .ms-label {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(200, 200, 196, .82);
}
.members-summary-cell .ms-value {
  margin-top: .3rem;
  font-size: .95rem;
  font-weight: 600;
  color: #F2F2F2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.members-summary-cell .ms-value.is-gold {
  color: var(--wik-gold-highlight, #F3D27A);
}
@media (min-width: 620px) {
  .members-summary { grid-template-columns: repeat(4, 1fr); }
}

/* Search */
.members-search {
  margin-top: 1.3rem;
}
.members-search input {
  width: 100%;
  background: rgba(242, 242, 242, .05);
  border: 1px solid rgba(242, 242, 242, .14);
  border-radius: 10px;
  color: #F2F2F2;
  padding: .8rem 1rem;
  font-size: .95rem;
}
.members-search input:focus {
  outline: 2px solid var(--wik-gold-primary, #D6AA4F);
  outline-offset: 1px;
  border-color: transparent;
}
.members-search input::placeholder { color: rgba(200, 200, 196, .55); }

/* Detail card (growth history) */
.members-detail {
  margin-top: 1.1rem;
  border: 1px solid rgba(214, 170, 79, .35);
  border-radius: 12px;
  background: rgba(214, 170, 79, .06);
  padding: 1rem 1.1rem 1.15rem;
}
.members-detail[hidden] { display: none; }
.members-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.members-detail-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--wik-gold-highlight, #F3D27A);
  letter-spacing: .02em;
}
.members-detail-close {
  background: none;
  border: none;
  color: rgba(200, 200, 196, .8);
  font-size: .8rem;
  cursor: pointer;
  padding: .3rem .5rem;
  border-radius: 8px;
}
.members-detail-close:hover { color: #F2F2F2; }
.members-detail-list {
  margin-top: .8rem;
  border-top: 1px solid rgba(242, 242, 242, .1);
}
.members-detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .8rem;
}
.members-detail-stats .chip {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  border: 1px solid rgba(242, 242, 242, .14);
  border-radius: 99px;
  padding: .28rem .7rem;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}
.members-detail-stats .chip .c-k {
  color: rgba(200, 200, 196, .72);
  font-size: .64rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.members-detail-stats .chip .c-v { font-weight: 600; }
.members-detail-row {
  display: flex;
  justify-content: space-between;
  gap: .8rem;
  padding: .55rem 0;
  border-bottom: 1px solid rgba(242, 242, 242, .08);
  font-size: .82rem;
}
.members-detail-row .md-date { color: rgba(200, 200, 196, .75); font-variant-numeric: tabular-nums; }
.members-detail-row .md-power { font-variant-numeric: tabular-nums; color: #F2F2F2; font-weight: 600; }
.members-detail-row .md-delta { font-variant-numeric: tabular-nums; min-width: 5.5rem; text-align: right; }
.md-delta.is-up { color: #7BC98F; }
.md-delta.is-down { color: #D98E5B; }
.md-delta.is-flat { color: rgba(200, 200, 196, .55); }
.members-detail-empty {
  margin-top: .7rem;
  color: rgba(200, 200, 196, .75);
  font-size: .85rem;
}

/* Roster table */
.members-table-wrap {
  margin-top: 1.1rem;
  border: 1px solid rgba(242, 242, 242, .1);
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.members-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
  table-layout: fixed;
}
.members-table th {
  background: rgba(7, 8, 7, .98);
  text-align: right;
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(200, 200, 196, .72);
  font-weight: 500;
  padding: .55rem .45rem;
  border-bottom: 1px solid rgba(214, 170, 79, .35);
  white-space: nowrap;
}
.members-table th:first-child, .members-table td:first-child { text-align: left; }
.members-table th:nth-child(2), .members-table td:nth-child(2) { text-align: left; }
.members-table th:nth-child(2) { width: 38%; }
.members-table td {
  padding: .5rem .45rem;
  border-bottom: 1px solid rgba(242, 242, 242, .07);
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #E8E8E4;
  white-space: nowrap;
}
.members-table td:first-child { color: rgba(200, 200, 196, .6); width: 2.2rem; }
.members-table td.m-name {
  text-align: left;
  letter-spacing: -.01em;
  overflow: hidden;
  text-overflow: ellipsis;
}
.members-table tbody tr { cursor: pointer; transition: background .15s ease; }
.members-table tbody tr:hover, .members-table tbody tr:focus-visible { background: rgba(214, 170, 79, .08); }
.members-table tbody tr.is-selected { background: rgba(214, 170, 79, .14); }
.members-table tbody tr.is-top td:first-child { color: var(--wik-gold-highlight, #F3D27A); font-weight: 600; }
.members-table .num { font-variant-numeric: tabular-nums; }

@media (max-width: 430px) {
  .members-table th:nth-child(3), .members-table td:nth-child(3),
  .members-table th:nth-child(6), .members-table td:nth-child(6) { display: none; }
}

/* Weekly recognition */
.members-weekly {
  margin-top: 1.3rem;
}
.members-weekly-trigger {
  width: 100%;
  background: rgba(214, 170, 79, .06);
  border: 1px solid rgba(214, 170, 79, .45);
  color: var(--wik-gold-highlight, #F3D27A);
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.members-weekly-trigger:hover, .members-weekly-trigger:focus-visible {
  background: rgba(214, 170, 79, .14);
  border-color: var(--wik-gold-primary, #D6AA4F);
  box-shadow: 0 4px 14px rgba(214, 170, 79, .18);
  outline: none;
}
.members-weekly-trigger:disabled { opacity: .55; cursor: wait; }
.members-weekly-hint {
  margin-top: .5rem;
  color: rgba(200, 200, 196, .55);
  font-size: .72rem;
  text-align: center;
}
.members-weekly-loading, .members-weekly-nodata {
  margin-top: .8rem;
  font-size: .82rem;
  color: rgba(200, 200, 196, .8);
  text-align: center;
}
.members-weekly-loading[hidden], .members-weekly-nodata[hidden] { display: none; }
.members-weekly-panel { margin-top: 1rem; }
.members-weekly-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wik-gold-highlight, #F3D27A);
}
.weekly-window {
  font-size: .7rem;
  font-weight: 400;
  color: rgba(200, 200, 196, .6);
  margin-left: .4rem;
}
.weekly-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .7rem;
  margin-top: .7rem;
}
@media (min-width: 620px) {
  .weekly-grid { grid-template-columns: repeat(3, 1fr); }
}
.weekly-card {
  border: 1px solid rgba(214, 170, 79, .25);
  border-radius: 12px;
  background: rgba(214, 170, 79, .05);
  padding: .85rem .95rem;
}
.weekly-cat {
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(200, 200, 196, .72);
  margin-bottom: .55rem;
}
.weekly-list { list-style: none; }
.weekly-list li {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  padding: .4rem 0;
  border-bottom: 1px solid rgba(242, 242, 242, .07);
  font-size: .82rem;
}
.weekly-list li:last-child { border-bottom: none; }
.weekly-list .w-rank { color: rgba(200, 200, 196, .55); width: 1.1rem; }
.weekly-list .w-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.weekly-list .w-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.weekly-list li.is-gold .w-name, .weekly-list li.is-gold .w-value { color: var(--wik-gold-highlight, #F3D27A); }
.w-value.is-up { color: #7BC98F; }
.weekly-stalling {
  margin-top: .9rem;
  border: 1px dashed rgba(242, 242, 242, .15);
  border-radius: 10px;
  padding: .6rem .95rem;
}
.weekly-stalling summary {
  cursor: pointer;
  font-size: .76rem;
  color: rgba(200, 200, 196, .75);
}
.weekly-stalling-none { font-size: .78rem; color: #7BC98F; padding-top: .4rem; }

/* States */
.members-state {
  margin-top: 1.3rem;
  border: 1px dashed rgba(242, 242, 242, .18);
  border-radius: 12px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  color: rgba(200, 200, 196, .8);
  font-size: .9rem;
}
.members-state[hidden] { display: none; }
.members-state.is-error { border-color: rgba(217, 142, 91, .45); }
.members-state strong { display: block; color: #F2F2F2; font-size: .98rem; margin-bottom: .35rem; }
.members-hint {
  margin-top: .9rem;
  color: rgba(200, 200, 196, .6);
  font-size: .76rem;
  text-align: center;
}
