/* ============================================================================
   Radio Tech — AUTH & PROFILE (extinde design system-ul NEON CORPORATE v4)
   Înlocuiește css/style.css + css/members.css pentru paginile din /cont/.
   ========================================================================== */

/* ---------------------------------------------------------------- layout --- */
.auth-page {
  min-height: 100vh;
  background: var(--bg-0);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 100vh;
  padding: 96px 20px 56px;
  margin: 0 auto;
}

.auth-wrap--wide { width: min(100%, 940px); }

.auth-back {
  align-self: flex-start;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: color .18s ease;
}
.auth-back:hover { color: var(--neon); }

/* ----------------------------------------------------------------- card --- */
.auth-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 30px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow-lg);
}

.auth-wrap--wide .auth-card { max-width: 100%; }

.auth-logo {
  width: 168px;
  height: 40px;
  margin: 0 auto 2px;
  display: block;
}

.auth-title {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-0);
  text-align: center;
}

.auth-sub {
  margin: -8px 0 4px;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-2);
  text-align: center;
}

/* ---------------------------------------------------------------- mesaje --- */
.auth-msg {
  margin: 0;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: .855rem;
  line-height: 1.55;
  border: 1px solid var(--line-2);
  background: rgba(148, 163, 184, .08);
  color: var(--text-1);
}
.auth-msg code {
  font-family: var(--mono);
  font-size: .82em;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .08);
  color: var(--neon);
}
.auth-msg--err {
  border-color: rgba(248, 113, 113, .38);
  background: rgba(248, 113, 113, .1);
  color: #fecaca;
}
.auth-msg--ok {
  border-color: rgba(52, 211, 153, .38);
  background: rgba(52, 211, 153, .1);
  color: #bbf7d0;
}
.auth-msg--warn {
  border-color: rgba(251, 191, 36, .38);
  background: rgba(251, 191, 36, .1);
  color: #fde68a;
}

/* --------------------------------------------------------------- google --- */
.gsi-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
}
.gsi-slot > div { max-width: 100%; }
/* GIS injects a fixed-width iframe; clamp it so it can never overflow the card. */
.gsi-slot iframe { max-width: 100%; }

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-0);
  font-weight: 600;
  font-size: .93rem;
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease;
}
.btn-google:hover { border-color: var(--line-strong); background: var(--surface-3); color: var(--text-0); }
.btn-google.is-disabled { opacity: .55; pointer-events: none; }

.auth-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.auth-sep::before,
.auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-sep span { white-space: nowrap; }

/* ------------------------------------------------------------- formulare --- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.pw-wrap { position: relative; display: block; }

.pw-wrap input[type="password"],
.pw-wrap input[type="text"] { padding-right: 46px !important; }

.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  font-size: .95rem;
  line-height: 1;
  cursor: pointer;
  transition: color .16s ease, background .16s ease;
}
.pw-toggle:hover { color: var(--neon); background: rgba(34, 211, 238, .1); }
.pw-toggle.is-on { color: var(--neon); }

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .86rem;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.5;
}
.auth-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--neon);
  cursor: pointer;
}

.auth-submit { width: 100%; margin-top: 4px; }

.auth-foot {
  margin: 0;
  font-size: .86rem;
  text-align: center;
  color: var(--text-2);
}
.auth-foot a { color: var(--neon); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

.auth-perks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .86rem;
  color: var(--text-2);
}
.auth-perks li {
  position: relative;
  padding-left: 22px;
  line-height: 1.55;
}
.auth-perks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--neon-2);
  font-weight: 700;
}

/* ------------------------------------------------------------- profilul --- */
.profile-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  box-shadow: var(--shadow-lg);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(34, 211, 238, .3);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, .08);
}

.profile-avatar--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(34, 211, 238, .34), rgba(163, 230, 53, .28));
  color: #04121a;
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
}

.profile-head > div { min-width: 0; }

.profile-name {
  margin: 0 0 2px;
  font-family: var(--font);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.25;
  word-break: break-word;
}

.profile-email {
  margin: 0;
  font-size: .84rem;
  color: var(--text-3);
  word-break: break-all;
}

.profile-visibility {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-3);
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px solid var(--line-2);
  background: rgba(148, 163, 184, .1);
  color: var(--text-2);
}
.profile-badge--public {
  border-color: rgba(52, 211, 153, .4);
  background: rgba(52, 211, 153, .12);
  color: #bbf7d0;
}
.profile-badge--private {
  border-color: rgba(251, 191, 36, .38);
  background: rgba(251, 191, 36, .1);
  color: #fde68a;
}

.profile-badge-link {
  font-size: .8rem;
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
}
.profile-badge-link:hover { text-decoration: underline; }

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: 10px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(24, 34, 52, .55);
}

.profile-stat__val {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-0);
}

.profile-stat__lbl {
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.profile-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  overflow: hidden;
}

.profile-progress__bar {
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width .5s ease;
}

.profile-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.profile-subtitle {
  margin: 0;
  font-family: var(--font);
  font-size: 1.02rem;
  font-weight: 650;
  color: var(--text-0);
}

.profile-hint {
  margin: 0;
  font-size: .8rem;
  line-height: 1.55;
  color: var(--text-3);
}
.profile-hint strong { color: var(--text-2); }

.profile-form { display: flex; flex-direction: column; gap: 14px; }

.profile-form .field textarea,
.profile-form .field input[type="date"] {
  width: 100%;
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(4, 7, 13, .55);
  color: var(--text-0);
  font-size: .9rem;
  font-family: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.profile-form .field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.profile-form .field textarea:focus,
.profile-form .field input[type="date"]:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}

.profile-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.profile-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .86rem;
  color: var(--text-2);
  cursor: pointer;
  line-height: 1.5;
}
.profile-check input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--neon);
  cursor: pointer;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.profile-actions form { margin: 0; }

.profile-empty {
  padding: 26px 18px;
  text-align: center;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line-2);
  background: rgba(148, 163, 184, .045);
  color: var(--text-3);
  font-size: .875rem;
}

/* ------------------------------------------------------------- activitate --- */
.activity-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: .87rem;
}
.activity-item:last-child { border-bottom: 0; }

.activity-item__label { flex: 1 1 auto; min-width: 0; color: var(--text-1); }

.activity-item__meta {
  flex: 0 0 auto;
  font-size: .76rem;
  color: var(--text-3);
  white-space: nowrap;
}

.activity-item__pts {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: .8rem;
  font-weight: 700;
  color: var(--neon-2);
  white-space: nowrap;
}

/* --------------------------------------------------------- profil public --- */
.member-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.member-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  font-size: .78rem;
  color: var(--text-3);
}

.member-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, .3);
  background: rgba(34, 211, 238, .1);
  color: #a5f3fc;
  font-size: .72rem;
  font-weight: 600;
}

.member-card__bio {
  margin: 0;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--text-1);
  white-space: pre-wrap;
  word-break: break-word;
}
.member-card__bio--empty { color: var(--text-3); font-style: italic; }

.member-card__link { font-size: .82rem; color: var(--text-3); }
.member-card__link a { color: var(--neon); font-weight: 600; }
.member-card__link a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- top membri --- */
.top-members__list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.top-member {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.top-member:last-child { border-bottom: 0; }

.top-member__rank {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(148, 163, 184, .12);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
}
.top-member:nth-child(1) .top-member__rank { background: rgba(163, 230, 53, .18); color: var(--neon-2); }
.top-member:nth-child(2) .top-member__rank { background: rgba(34, 211, 238, .16); color: var(--neon); }
.top-member:nth-child(3) .top-member__rank { background: rgba(244, 114, 182, .16); color: var(--neon-3); }

.top-member__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-2);
}
.top-member__avatar--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, rgba(34, 211, 238, .3), rgba(163, 230, 53, .26));
  color: #04121a;
  font-size: .8rem;
  font-weight: 700;
}

.top-member__link {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text-1);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-member__link:hover { color: var(--neon); }

.top-member__name { display: block; overflow: hidden; text-overflow: ellipsis; }

.top-member__pts {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  color: var(--neon-2);
  white-space: nowrap;
}

.top-members__empty {
  padding: 20px 16px;
  text-align: center;
  font-size: .85rem;
  color: var(--text-3);
}

.top-members__cta { padding-top: 12px; text-align: center; font-size: .84rem; }
.top-members__cta a { color: var(--neon); font-weight: 600; }
.top-members__cta a:hover { text-decoration: underline; }

/* ------------------------------------------------------------- responsive --- */
@media (max-width: 560px) {
  .auth-wrap { padding: 82px 15px 44px; }
  .auth-card { padding: 24px 20px; gap: 14px; }
  .profile-card { padding: 20px 17px; }
  .profile-avatar { width: 56px; height: 56px; flex-basis: 56px; }
  .profile-name { font-size: 1.12rem; }
  .field-row { grid-template-columns: 1fr; }
  .auth-submit { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-progress__bar,
  .pw-toggle,
  .auth-back { transition: none; }
}
