/* ==================================================
  ACCOUNT PAGE
================================================== */
.account-sections{
  padding:.7rem 0 1rem;
}

.waiver-alert{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:.7rem .9rem;
  margin-bottom:1rem;
  border-radius:14px;
  background:rgba(255,206,107,.14);
  border:1px solid rgba(255,206,107,.45);
  color:var(--text);
  font-weight:600;
}

.waiver-alert__copy{
  max-width:700px;
}

.participant-card{
  color:var(--text);
  display:grid;
  gap:.65rem;
}

.participant-card--overview{
  padding:.9rem 1rem;
  gap:.75rem;
}

.participant-card--overview .participant-card__identity{
  gap:.7rem;
}

.participant-card--overview .profile-photo--hero .profile-photo__preview{
  width:120px;
  height:120px;
  font-size:2.35rem;
}

.participant-card--overview .participant-name{
  font-size:1.28rem;
  line-height:1.2;
}

.participant-card--overview .participant-name-row{
  gap:.6rem;
  justify-content:space-between;
  align-items:flex-start;
}

.participant-card--overview .participant-edit-link{
  font-size:.84rem;
  font-weight:600;
  white-space:nowrap;
}

.participant-card--overview .participant-details{
  margin-top:.18rem;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.5rem 1rem;
}

.participant-card--overview .participant-detail{
  gap:.06rem;
  font-size:.9rem;
}

.participant-card--overview .detail-label{
  font-size:.72rem;
  letter-spacing:.02em;
  text-transform:none;
}

.participant-card--overview .detail-value{
  font-size:.93rem;
  line-height:1.2;
}

.participant-card--overview .tiny-badge{
  margin-left:.45rem;
  padding:.12rem .42rem;
  font-size:.64rem;
}

.participant-card--overview .participant-actions{
  gap:.45rem;
  padding-top:.55rem;
  border-top:1px solid var(--line-muted);
  justify-content:flex-end;
}

.participant-card--overview .participant-actions .btn-secondary{
  background:transparent;
  color:var(--text-200);
  border:1px solid var(--line-muted);
  box-shadow:none;
  border-radius:10px;
}

.participant-card--overview .participant-actions .btn-secondary:hover{
  background:rgba(255,255,255,.05);
  color:var(--text);
  border-color:var(--line);
  box-shadow:none;
}

.participant-card--overview .participant-actions .btn-secondary:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;
}

.participant-card--overview .participant-actions .btn-secondary.btn-compact{
  height:32px;
  font-size:.78rem;
  padding:.38rem .68rem;
}

.participant-card--overview .participant-actions #logoutBtn{
  margin-left:.25rem;
  color:#ff9f94;
  border-color:transparent;
  background:transparent;
  padding-left:.45rem;
  padding-right:.2rem;
}

.participant-card--overview .participant-actions #logoutBtn:hover{
  color:#ffc0b8;
  background:transparent;
  border-color:transparent;
}

.participant-card--overview .participant-actions svg{
  width:15px;
  height:15px;
}

@media (max-width: 980px){
  .participant-card--overview .participant-details{
    grid-template-columns:1fr;
  }
}

.participant-card.is-editing{
  outline:1px solid color-mix(in srgb, var(--link) 55%, transparent);
  box-shadow:
    0 20px 45px rgba(0,0,0,.4),
    0 0 0 3px color-mix(in srgb, var(--link) 18%, transparent);
}

.participant-card__identity{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:.65rem;
  align-items:start;
}

.participant-meta{
  width:100%;
  display:grid;
  gap:.2rem;
}

.profile-photo--hero .profile-photo__preview{
  width:56px;
  height:56px;
  font-size:1.2rem;
  border-color:var(--line);
}

.participant-details{
  margin-top:.15rem;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.45rem .85rem;
}

.participant-detail{
  display:grid;
  gap:.08rem;
  padding:0;
  border:0;
  font-size:.9rem;
}

.detail-label{
  color:var(--text-200);
  font-size:.76rem;
  letter-spacing:.02em;
  text-transform:uppercase;
}

.detail-value{
  font-weight:600;
  text-align:left;
  max-width:100%;
  overflow-wrap:anywhere;
}

.tiny-badge{
  display:inline-flex;
  align-items:center;
  margin-left:.5rem;
  padding:.15rem .5rem;
  border-radius:999px;
  font-size:.7rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  background:rgba(122,223,156,.18);
  color:#4b8261;
  border:1px solid rgba(122,223,156,.45);
}

.tiny-badge.is-muted{
  background:rgba(255,255,255,.08);
  color:var(--text-200);
  border-color:var(--line-muted);
}


.participant-name{
  margin:0;
  font-size:1.4rem;
}

.participant-name-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.6rem;
}

.participant-edit-link{
  margin-left:0;
  appearance:none;
  border:none;
  background:transparent;
  color:var(--link);
  font-weight:650;
  font-size:.9rem;
  line-height:1.1;
  padding:0;
  cursor:pointer;
  transition:color .12s ease;
}

.participant-edit-link:hover{
  color:var(--link-hover);
  text-decoration:underline;
  text-underline-offset:2px;
}

.participant-edit-link:focus-visible{
  color:var(--link-hover);
  outline:2px solid var(--focus-ring);
  outline-offset:3px;
  border-radius:6px;
}

.profile-edit-inline__title{
  color:var(--text-200);
  font-size:.84rem;
  letter-spacing:.02em;
  font-weight:700;
}


.participant-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  align-items:center;
  gap:.4rem;
}

.status-row{
  display:flex;
  flex-wrap:wrap;
  gap:.1rem;
}

.participant-actions .btn-secondary.btn-compact{
  font-size:.8rem;
  line-height:1;
  height:34px;
  padding:.45rem .75rem;
}

.btn-row--nowrap{
  flex-wrap:nowrap;
  gap:.6rem;
  overflow-x:auto;
}

.profile-edit-inline .btn-row--nowrap{
  position:relative;
  z-index:3;
  isolation:isolate;
  overflow-y:visible;
  padding-top:.25rem;
  margin-top:-.25rem;
}

.btn-row--nowrap .btn-secondary{
  background:rgba(16,16,16,.85);
  color:#f2f2f2;
  border-color:var(--line);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

.btn-row--nowrap .btn-secondary:hover{
  background:rgba(22,22,22,.95);
  color:#ffffff;
  border-color:var(--line-strong);
}

.btn-row--nowrap .btn-secondary:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;
}

.btn-row--nowrap .btn-secondary.btn-save{
  background:rgba(122,223,156,.2);
  color:#e9ffef;
  border-color:rgba(122,223,156,.58);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

.btn-row--nowrap .btn-secondary.btn-save:hover{
  background:rgba(122,223,156,.3);
  color:#ffffff;
  border-color:rgba(122,223,156,.75);
}

.btn-row--nowrap .btn-secondary.btn-cancel{
  background:rgba(255,107,94,.2);
  color:#ffe5e1;
  border-color:rgba(255,107,94,.58);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

.btn-row--nowrap .btn-secondary.btn-cancel:hover{
  background:rgba(255,107,94,.3);
  color:#ffffff;
  border-color:rgba(255,107,94,.75);
}

.participant-actions .btn-secondary{
  background:rgba(16,16,16,.85);
  color:#f2f2f2;
  border-color:var(--line);
  box-shadow:0 4px 12px rgba(0,0,0,.35);
}

.participant-actions .btn-secondary:hover{
  background:rgba(22,22,22,.95);
  color:#ffffff;
  border-color:var(--line-strong);
}

.participant-actions .btn-secondary:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;
}

.participant-actions .btn-danger{
  color:#ff6b5e;
  border-color:transparent;
  background:transparent;
  box-shadow:none;
}

.participant-actions .btn-danger:hover{
  background:transparent;
  color:#ff8b80;
  border-color:transparent;
  box-shadow:none;
}


.profile-photo{
  margin-top:1.5rem;
  display:grid;
  gap:1.25rem;
  align-items:center;
  position:relative;
}

.profile-photo--hero{
  margin-top:0;
}

.profile-edit-inline{
  margin-top:0;
  display:grid;
  gap:.75rem;
}

.profile-edit-inline .field label{
  color:#f3f3f3;
}

.profile-edit-inline .field input{
  background:rgba(10,10,10,.85);
  color:#f3f3f3;
  border-color:var(--line);
}

.profile-edit-inline .field input::placeholder{
  color:rgba(255,255,255,.5);
}

.profile-edit-inline .field input:focus{
  outline:none;
  border-color:var(--line-strong);
  box-shadow:0 0 0 2px rgba(255,255,255,.1);
}

.profile-edit-inline .field input:disabled{
  background:rgba(10,10,10,.55);
  color:rgba(255,255,255,.55);
  border-color:var(--line-muted);
}

.profile-photo__preview{
  position:relative;
  width:96px;
  height:96px;
  border-radius:999px;
  background:rgba(255,255,255,.05);
  border:1px solid var(--line-muted);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:1.2rem;
  color:var(--text-200);
  overflow:hidden;
  cursor:pointer;
  padding:0;
}

.profile-photo__preview.has-photo{
  border-color:var(--line);
}

.profile-photo__preview:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:3px;
}

.profile-photo__hint{
  position:absolute;
  left:50%;
  bottom:6px;
  transform:translate(-50%, 6px);
  padding:.2rem .55rem;
  border-radius:999px;
  background:rgba(0,0,0,.6);
  color:#fff;
  font-size:.65rem;
  letter-spacing:.02em;
  opacity:0;
  transition:opacity .2s ease, transform .2s ease;
}

.profile-photo__preview:hover .profile-photo__hint,
.profile-photo__preview:focus-visible .profile-photo__hint{
  opacity:1;
  transform:translate(-50%, 0);
}

.profile-photo__preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}

.profile-photo__preview.has-photo img{
  display:block;
}

.btn-pill{
  border-radius:999px;
}

.btn-danger{
  color:#ff6b5e;
  border-color:transparent;
  background:transparent;
  box-shadow:none;
}

.btn-danger:hover{
  background:transparent;
  color:#ff8b80;
  border-color:transparent;
  box-shadow:none;
}

.profile-photo__controls{
  display:grid;
  gap:.6rem;
  justify-items:start;
  position:absolute;
  left:112px;
  top:0;
}

.profile-photo__controls[hidden]{
  display:none;
}

.profile-photo__camera[hidden],
.profile-photo__backdrop[hidden]{
  display:none;
}

.profile-photo__menu{
  display:grid;
  gap:.15rem;
  padding:.4rem;
  min-width:176px;
  border-radius:14px;
  border:1px solid var(--line-muted);
  background:
    linear-gradient(180deg, rgba(30,30,30,.98), rgba(12,12,12,.98));
  box-shadow:
    0 18px 40px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.profile-photo__menu .btn-secondary{
  width:100%;
  justify-content:flex-start;
  gap:.5rem;
  padding:.55rem .7rem;
  border:none;
  border-radius:10px;
  background:transparent;
  color:#f3f3f3;
  font-size:.9rem;
  letter-spacing:.01em;
  box-shadow:none;
}

.profile-photo__menu .is-hidden{
  display:none;
}

.profile-photo__menu .btn-secondary:hover{
  background:rgba(255,255,255,.08);
}

.profile-photo__menu .btn-secondary.btn-save{
  background:rgba(63,186,109,.22);
  color:#e7ffef;
}

.profile-photo__menu .btn-secondary.btn-save:hover{
  background:rgba(63,186,109,.34);
}

.profile-photo__menu .btn-secondary.btn-cancel{
  background:rgba(221,88,74,.2);
  color:#ffe7e4;
}

.profile-photo__menu .btn-secondary.btn-cancel:hover{
  background:rgba(221,88,74,.32);
}

.profile-photo__menu .btn-secondary:focus-visible{
  outline:2px solid var(--focus-ring);
  outline-offset:2px;
}

.profile-photo__menu #removePhotoBtn{
  color:#ffb3a8;
}

.profile-photo__camera{
  position:fixed;
  inset:0;
  display:grid;
  place-items:center;
  z-index:60;
  padding:1.5rem;
}

.profile-photo__backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  backdrop-filter:blur(2px);
  z-index:50;
}

.profile-photo__camera-card{
  width:min(360px, 90vw);
  padding:1rem;
  border-radius:16px;
  border:1px solid var(--line);
  background:rgba(12,12,12,.98);
  box-shadow:0 24px 60px rgba(0,0,0,.6);
}

.profile-photo__camera-title{
  font-size:.95rem;
  font-weight:600;
  color:#f1f1f1;
  margin-bottom:.6rem;
}

.profile-photo__camera video{
  width:100%;
  height:auto;
  border-radius:10px;
  display:block;
  background:#000;
}

.profile-photo__camera-actions{
  display:flex;
  gap:.4rem;
  margin-top:.5rem;
}

.profile-photo__camera-actions .btn-secondary{
  flex:1;
  justify-content:center;
  padding:.5rem .7rem;
  border-radius:10px;
  border:1px solid var(--line-muted);
  background:rgba(255,255,255,.04);
  color:#f2f2f2;
  font-size:.85rem;
  letter-spacing:.01em;
  box-shadow:none;
}

.profile-photo__camera-actions .btn-secondary:hover{
  background:rgba(255,255,255,.1);
}

.profile-photo__camera-actions #capturePhotoBtn{
  background:rgba(122,223,156,.14);
  border-color:rgba(122,223,156,.4);
  color:#d8f6e2;
}

.profile-photo__camera-actions #cancelCameraBtn{
  background:rgba(255,179,165,.12);
  border-color:rgba(255,179,165,.35);
  color:#ffd1c8;
}

.profile-photo__menu .profile-photo__status{
  padding:.2rem .4rem .45rem;
  font-size:.8rem;
  min-height:1.2rem;
  color:#e0e0e0;
}

.profile-photo__menu .profile-photo__status:empty{
  display:none;
}

.profile-photo__menu .profile-photo__status.form-msg--success{
  color:#7adf9c;
}

.profile-photo__menu .profile-photo__status.form-msg--error{
  color:#ffb3a5;
}

.account-tabs{
  margin-top:0;
}

.account-tabs .console-tab{
  gap:.45rem;
}

.account-panel{
  margin-top:1rem;
  display:grid;
  gap:1rem;
  min-width:0;
}

.account-panel[hidden]{
  display:none;
}

.account-panel .grid,
.account-panel .card{
  min-width:0;
}

.account-table-wrap{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
}

.account-table{
  width:100%;
  border-collapse:collapse;
  min-width:520px;
}

.account-table th,
.account-table td{
  padding:.7rem .6rem;
  border-bottom:1px solid var(--line-muted);
  text-align:left;
  vertical-align:middle;
}

.account-table th{
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--text-200);
}

.account-table td{
  font-size:.95rem;
  overflow-wrap:anywhere;
}

.account-table tbody tr:last-child td{
  border-bottom:none;
}

.account-waiver-row{
  margin-bottom:.5rem;
}

.account-waiver-badge{
  cursor:pointer;
}

.account-waiver-badge--signed{
  background:rgba(122,223,156,.17);
  border-color:rgba(122,223,156,.46);
}

.account-waiver-badge--pending{
  background:rgba(255,206,107,.15);
  border-color:rgba(255,206,107,.45);
}

.account-waiver-badge--expired{
  background:rgba(255,107,94,.15);
  border-color:rgba(255,107,94,.45);
}

.account-progress-controls{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:.8rem;
}

.account-progress-controls label{
  display:grid;
  gap:.3rem;
}

.account-stat-card{
  padding:.85rem;
}

.account-stat-value{
  margin:0;
  font-size:1rem;
  font-weight:700;
}

.account-waiver-items{
  display:grid;
  gap:.6rem;
}

.account-waiver-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.7rem;
  padding:.7rem .8rem;
  border:1px solid var(--line-muted);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}

@media (max-width: 700px){
  .account-tabs .console-tab{
    gap:0;
    min-width:42px;
    min-height:42px;
    padding:.5rem .6rem .45rem;
    font-size:.8rem;
  }

  .account-tabs .tab-text{
    max-width:0;
    opacity:0;
    transform:translateX(-2px);
    transition:max-width .2s ease, opacity .15s ease, transform .15s ease;
  }

  .account-tabs .console-tab.is-active .tab-text{
    max-width:170px;
    margin-left:.4rem;
    opacity:1;
    transform:translateX(0);
  }
}

@media (max-width: 720px){
  .waiver-alert{ flex-direction:column; align-items:flex-start; }
  .profile-photo__controls{ position:static; }
  .participant-card__identity{ grid-template-columns:1fr; justify-items:start; }
  .profile-photo--hero .profile-photo__preview{ width:64px; height:64px; }
  .participant-details{ grid-template-columns:1fr; gap:.35rem; }
  .participant-card--overview{ padding:.82rem .85rem; }
  .participant-card--overview .participant-card__identity{
    grid-template-columns:1fr;
    align-items:start;
    gap:.55rem;
  }
  .participant-card--overview .profile-photo{
    margin-top:0;
    justify-self:start;
  }
  .participant-card--overview .profile-photo--hero .profile-photo__preview{
    width:112px;
    height:112px;
  }
  .participant-card--overview .participant-meta{
    gap:.28rem;
  }
  .participant-card--overview .participant-name{
    font-size:1.14rem;
    line-height:1.18;
  }
  .participant-card--overview .participant-name-row{
    justify-content:flex-start;
    align-items:flex-start;
    flex-direction:column;
    gap:.2rem;
  }
  .participant-card--overview .participant-edit-link{
    font-size:.8rem;
    font-weight:600;
  }
  .participant-card--overview .participant-details{
    margin-top:.08rem;
    grid-template-columns:1fr;
  }
  .participant-card--overview .participant-actions{
    justify-content:flex-start;
    gap:.35rem;
  }
  .participant-card--overview .participant-actions #logoutBtn{
    margin-left:0;
  }
  .account-progress-controls{ grid-template-columns:1fr; }
  .account-table{ min-width:0; }
  .account-waiver-item{ align-items:flex-start; flex-direction:column; }
}
