/* Member portal (/app). Uses the site's dark theme and stays usable at 360px. */

.member-topbar .inner { max-width: 1100px; }
.member-top-links { align-items: center; gap: 12px; }
.member-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-elev);
}
.member-lang-switch button {
  min-width: 40px;
  min-height: 36px;
  padding: 4px 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: .8em;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.member-lang-switch button.active { background: var(--accent); color: #1a1303; }
.member-lang-switch button:hover:not(.active) { color: var(--text); }
.member-user { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .9em; }
.member-user .member-avatar { width: 30px; height: 30px; }
.member-logout {
  min-height: 40px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  font: inherit;
  cursor: pointer;
}
.member-logout:hover { color: var(--text); }
.member-main { max-width: 1100px; padding-top: 28px; }
.member-loading { color: var(--text-dim); text-align: center; }
.member-hero { max-width: 620px; margin: 50px auto; text-align: center; }
.member-hero h1 { margin: 14px 0 10px; font-size: clamp(1.6em, 4vw, 2.3em); }
.member-lead { max-width: 570px; margin: 0 auto 26px; color: var(--text-dim); font-size: 1.08em; }
.sign-in-icon { width: 112px; height: 112px; border-radius: 22px; border: 2px solid var(--accent); }
.member-signin { min-height: 46px; }
.member-alert, .member-note {
  margin: 14px 0;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(225, 75, 75, .5);
  background: rgba(225, 75, 75, .09);
  color: #f0a2a2;
}
.member-note { border-color: rgba(200, 155, 60, .45); background: rgba(200, 155, 60, .08); color: var(--text-dim); }
.member-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.member-server-label { display: block; margin-bottom: 5px; color: var(--text-dim); font-size: .85em; font-weight: 600; }
.member-selector { min-width: min(100%, 350px); }
.member-server-select { width: 100%; min-height: 44px; }
/* Dark native controls (the option list follows color-scheme). */
.member-server-select, .lane-select { color-scheme: dark; }
.member-reload { min-height: 44px; }
.member-server-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
}
.member-server-copy { display: flex; flex-direction: column; min-width: 0; }
.member-server-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-server-copy small { color: var(--text-dim); font-family: "JetBrains Mono", Consolas, monospace; font-size: .78em; }
.server-icon, .member-avatar { width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover; }
.server-icon.placeholder, .member-avatar.placeholder {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-dim);
  font-weight: 700;
}
.member-badge, .count-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-dim);
  font-size: .78em;
  line-height: 1.45;
}
.member-badge.main-badge { color: var(--accent); border-color: rgba(200, 155, 60, .5); }
.member-badge.via-app { margin-left: auto; color: var(--accent); border-color: rgba(200, 155, 60, .5); white-space: nowrap; }
.member-card {
  margin: 0 0 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.member-card h1, .member-card h2, .member-card h3 { margin: 0; }
.member-card h1 { font-size: 1.35em; }
.member-card h2 { color: var(--text-dim); font-size: .86em; letter-spacing: .03em; text-transform: uppercase; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.member-card .btn { min-height: 40px; }
.member-card .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.member-card .btn.loading { cursor: progress; opacity: .65; }
.member-card .btn.danger { background: var(--danger); color: #fff; }
.member-card .btn.danger:hover:not(:disabled) { background: #c83c3c; color: #fff; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.profile-grid > div { min-width: 0; }
.profile-grid h2 { margin-bottom: 9px; }
.profile-rank-block, .profile-account-block, .profile-lobby-block, .profile-lanes-block { padding: 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elev); }
.profile-main-account { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-account-label { width: 100%; display: flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: .84em; }
.profile-main-account code { overflow-wrap: anywhere; font-size: 1.04em; }
.rank-summary, .lobby-summary { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.rank-summary > div, .lobby-summary > div { display: flex; flex-direction: column; min-width: 0; }
.rank-summary small, .lobby-summary small { color: var(--text-dim); }
.rank-emblem { width: 72px; height: 72px; object-fit: contain; flex: none; }
.rank-emblem.small { width: 56px; height: 56px; }
.empty-rank { min-height: 72px; }
.profile-account-block .opgg-link { display: inline-block; margin-top: 13px; }
.profile-lanes-block { grid-column: 1 / -1; }
.lane-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lane-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-dim); }
.lane-chip.main { border-color: var(--accent); color: var(--text); }
.lane-icon { width: 25px; height: 25px; object-fit: contain; }
.copy-button { min-height: 36px !important; padding: 6px 10px; font-size: .82em; }
.refresh-button { white-space: nowrap; }
.opgg-link { font-weight: 600; }
.muted { color: var(--text-dim); }
.small { font-size: .84em; }
.empty-profile { text-align: center; }
.empty-profile p { margin: 8px 0 0; color: var(--text-dim); }
.champions-card .card-heading { margin-bottom: 8px; }
.champions-card > p { margin: 0; }
.champions-card > .champions-summary { margin-bottom: 12px; font-size: .9em; overflow-wrap: anywhere; }
.champion-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.champion-table th { padding: 0 10px 8px; color: var(--text-dim); font-size: .76em; font-weight: 600; letter-spacing: .03em; text-align: right; text-transform: uppercase; white-space: nowrap; }
.champion-table td { padding: 8px 10px; border-top: 1px solid var(--border); text-align: right; vertical-align: middle; }
.champion-table th:first-child, .champion-table td:first-child { padding-left: 0; text-align: left; }
.champion-table th:last-child, .champion-table td:last-child { padding-right: 0; }
.champion-table td strong { display: block; }
.champion-table td small { display: block; color: var(--text-dim); font-size: .8em; white-space: nowrap; }
.champion-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.champion-name { font-weight: 600; overflow-wrap: anywhere; }
.champion-icon { width: 40px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; }
.champion-icon.placeholder { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text-dim); font-size: .8em; font-weight: 700; }
.accounts-card .card-heading { margin-bottom: 12px; }
.account-list { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); }
.account-row-main { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; }
.account-row-main strong { overflow-wrap: anywhere; }
.account-row-main small { width: 100%; }
.account-row-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; flex: none; }
.danger-outline { border-color: rgba(225, 75, 75, .5) !important; color: #ed8b8b !important; background: transparent; }
.danger-outline:hover { border-color: var(--danger) !important; background: rgba(225, 75, 75, .12); color: #fff !important; }
.link-form { padding-top: 14px; border-top: 1px solid var(--border); }
.link-form > label { display: block; margin-bottom: 6px; font-weight: 600; }
.link-fields { display: flex; gap: 8px; }
.riot-id-input, .lane-select, .member-server-select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev); color: var(--text); font: inherit; }
.riot-id-input:focus, .lane-select:focus, .member-server-select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-submit { white-space: nowrap; }
.field-hint { margin: 6px 0 0; color: var(--text-dim); font-size: .82em; }
.pending-panel { display: flex; gap: 18px; margin-top: 18px; padding: 16px; border: 1px solid rgba(200, 155, 60, .5); border-radius: 9px; background: rgba(200, 155, 60, .07); }
.pending-icon { flex: none; }
.starter-icon { width: 112px; height: 112px; border-radius: 8px; object-fit: cover; }
.pending-content { min-width: 0; }
.pending-content h3 { margin-bottom: 3px; }
.pending-content p { margin: 3px 0; }
.pending-content ol { margin: 10px 0 10px 20px; padding: 0; color: var(--text-dim); }
.pending-expiry { min-height: 25px; color: var(--accent); font-weight: 600; }
.verify-button { margin-top: 3px; }
.lanes-card > p { margin: 4px 0 16px; }
.lanes-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.lanes-form label { display: flex; flex-direction: column; gap: 5px; color: var(--text-dim); font-size: .9em; font-weight: 600; }
.danger-card { border-color: rgba(225, 75, 75, .4); }
.danger-card h2 { color: #ed8b8b; }
.danger-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--border); }
.danger-action:first-of-type { margin-top: 10px; }
.danger-action p { margin: 3px 0 0; font-size: .88em; }
.danger-action .btn { flex: none; }
.empty-state { max-width: 620px; margin: 70px auto; padding: 38px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-card); text-align: center; }
.empty-state h1 { margin: 0 0 10px; }
.empty-state p { margin: 0 auto 24px; color: var(--text-dim); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 50; display: flex; flex-direction: column; gap: 8px; max-width: min(460px, calc(100vw - 40px)); }
.toast { padding: 10px 14px; border: 1px solid var(--border); border-left: 4px solid #3ba55d; border-radius: 10px; background: var(--bg-elev); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); animation: member-toast-in .18s ease; transition: opacity .4s ease; }
.toast.error { border-left-color: var(--danger); }
.toast.leaving { opacity: 0; }
@keyframes member-toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 700px) {
  nav.topbar .inner { padding: 10px 14px; gap: 9px; }
  nav.topbar .brand { gap: 6px; font-size: .9em; }
  nav.topbar .brand img { width: 26px; height: 26px; }
  .member-top-links { gap: 7px; }
  .member-user span { display: none; }
  .member-main { padding: 20px 14px 60px; }
  .member-hero { margin: 32px auto; }
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-lanes-block { grid-column: auto; }
  .card-heading { align-items: flex-start; flex-direction: column; }
  .card-heading .card-actions { width: 100%; justify-content: flex-start; }
  .card-actions .btn { flex: 1 1 auto; }
  .account-row { align-items: flex-start; flex-direction: column; }
  .account-row-actions { justify-content: flex-start; width: 100%; }
  .link-fields { flex-wrap: wrap; }
  .link-submit { width: 100%; }
  .pending-panel { flex-direction: column; }
  .starter-icon { width: 96px; height: 96px; }
  .lanes-form { grid-template-columns: 1fr; }
  .danger-action { align-items: stretch; flex-direction: column; }
  .danger-action .btn { width: 100%; }
  .toasts { right: 14px; bottom: 14px; left: 14px; max-width: none; }
  /* Champion rows: name on top, the four stats labelled underneath. */
  .champion-table thead { display: none; }
  .champion-table, .champion-table tbody { display: block; }
  .champion-table tr { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, .8fr); gap: 6px 10px; padding: 10px 0; border-top: 1px solid var(--border); }
  .champion-table td { padding: 0 !important; border: 0; text-align: left !important; }
  .champion-table td:first-child { grid-column: 1 / -1; }
  .champion-table td[data-label]::before { content: attr(data-label); display: block; color: var(--text-dim); font-size: .7em; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
  .champion-icon { width: 36px; height: 36px; }
}
@media (max-width: 390px) {
  .member-server-summary { align-items: flex-start; flex-wrap: wrap; }
  .member-badge.via-app { margin-left: 54px; }
  .profile-card, .accounts-card, .champions-card, .lanes-card, .danger-card { padding: 15px; }
  .copy-button { width: 100%; }
  .profile-main-account code { max-width: 100%; }
}
