/* ================================================================
   J.S. Blackbelt Academy — StudentRegistration.css
   Student Registration · Login · Forgot Password
   Matches styles.css design tokens exactly:
     --black / --dark / --surface / --surface-2 / --border
     --red / --red-dark / --gold / --white / --muted
     --font-display (Bebas Neue) / --font-body (Barlow)
================================================================ */

/* ── Page wrapper ── */
.auth-page {
  min-height: 100svh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--dark);
}

/* ── Main content area ── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1.25rem 5rem;
  position: relative;
  overflow: hidden;
}

/* Diagonal stripe background — matches site hero aesthetic */
.auth-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 8% 40%, rgba(200,16,46,.09) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 92% 70%, rgba(201,145,10,.04) 0%, transparent 60%),
    repeating-linear-gradient(
      -48deg,
      transparent 0px, transparent 34px,
      rgba(255,255,255,.014) 34px, rgba(255,255,255,.014) 35px
    );
  pointer-events: none;
  z-index: 0;
}

/* ════════════════════════════════════════════════════════════════
   AUTH CARD
════════════════════════════════════════════════════════════════ */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 740px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 6px;
  box-shadow:
    0 32px 80px rgba(0,0,0,.7),
    0 0 0 1px rgba(255,255,255,.03);
  overflow: hidden;
  animation: cardIn .5s cubic-bezier(.22,1,.36,1) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.988); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

/* ════════════════════════════════════════════════════════════════
   TABS
════════════════════════════════════════════════════════════════ */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  padding: 1rem 1.25rem;
  background: var(--black);
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: color var(--ease), border-color var(--ease), background var(--ease);
}
.tab-btn i { font-size: .85rem; }

.tab-btn.active {
  background: var(--surface);
  color: var(--white);
  border-bottom-color: var(--red);
}
.tab-btn:hover:not(.active) {
  color: rgba(244,242,237,.65);
  background: rgba(255,255,255,.025);
}

/* ════════════════════════════════════════════════════════════════
   CARD HEADER
════════════════════════════════════════════════════════════════ */
.auth-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem 2rem 0;
}
.auth-logo {
  width: 46px; height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.auth-eyebrow {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .22rem;
}
.auth-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--white);
}
.auth-title span { color: var(--red); }

/* ════════════════════════════════════════════════════════════════
   FORM PANELS
════════════════════════════════════════════════════════════════ */
.auth-body {
  padding: 1.75rem 2rem 2rem;
}

.form-panel { display: none; }
.form-panel.active { display: block; }

/* ════════════════════════════════════════════════════════════════
   SECTION HEADER BLOCKS (Account Info / Student Info dividers)
════════════════════════════════════════════════════════════════ */
.section-header-block {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: .85rem 1rem;
  background: var(--black);
  border-left: 3px solid var(--red);
  border-radius: 0 4px 4px 0;
  margin-bottom: 1.25rem;
}
.section-block-icon {
  width: 34px; height: 34px;
  background: rgba(200,16,46,.12);
  border: 1px solid rgba(200,16,46,.28);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: .95rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.section-block-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.1;
}
.section-block-sub {
  font-size: .67rem;
  color: var(--muted);
  margin-top: .28rem;
  letter-spacing: .03em;
}
.section-block-sub em {
  font-style: normal;
  color: var(--gold);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   FIELD GRID
════════════════════════════════════════════════════════════════ */
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (min-width: 520px) {
  .field-row.col2 { grid-template-columns: 1fr 1fr; }
  .field-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* Labels */
.field label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: .28rem;
  flex-wrap: wrap;
}
.field label .req {
  color: var(--red);
  font-size: .8rem;
  line-height: 1;
}

/* USERNAME badge on email label */
.badge-username {
  display: inline-block;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--gold);
  background: rgba(201,145,10,.12);
  border: 1px solid rgba(201,145,10,.28);
  border-radius: 2px;
  padding: .1rem .35rem;
  line-height: 1.5;
  vertical-align: middle;
}

/* ════════════════════════════════════════════════════════════════
   INPUTS & SELECTS
════════════════════════════════════════════════════════════════ */
.field input,
.field select {
  width: 100%;
  padding: .7rem .95rem;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 400;
  color: var(--white);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
  line-height: 1.4;
}

.field input::placeholder { color: rgba(122,125,138,.4); }

.field input:focus,
.field select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,.15);
}

/* Readonly age — gold tint to signal it's calculated */
.field input[readonly] {
  background: var(--surface-2);
  color: var(--gold);
  border-color: rgba(201,145,10,.32);
  font-weight: 700;
  letter-spacing: .05em;
  cursor: default;
}
.field input[readonly]:focus {
  box-shadow: none;
  border-color: rgba(201,145,10,.32);
}

/* Select dropdown arrow */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '\f078';
  font-family: FontAwesome;
  font-size: .58rem;
  color: var(--muted);
  position: absolute;
  right: .95rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.select-wrap select {
  padding-right: 2.4rem;
  cursor: pointer;
}
.select-wrap select option {
  background: var(--black);
  color: var(--white);
}

/* ════════════════════════════════════════════════════════════════
   PASSWORD FIELD
════════════════════════════════════════════════════════════════ */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.9rem; }

.pw-eye {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: .95rem;
  padding: .3rem;
  line-height: 1;
  transition: color var(--ease);
}
.pw-eye:hover { color: var(--white); }

/* Strength meter */
.pw-strength {
  display: flex;
  gap: 4px;
  margin-top: .35rem;
}
.strength-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background .3s;
}
.strength-bar.weak   { background: #e0264a; }
.strength-bar.fair   { background: var(--gold); }
.strength-bar.strong { background: #4caf88; }

.pw-hint {
  font-size: .67rem;
  color: var(--muted);
  margin-top: .25rem;
  min-height: 1em;
  letter-spacing: .02em;
}

/* ════════════════════════════════════════════════════════════════
   RANK BELT SWATCH PREVIEW
════════════════════════════════════════════════════════════════ */
.rank-preview {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: .4rem;
  min-height: 18px;
}
.rank-swatch {
  width: 14px; height: 14px;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255,255,255,.15);
  transition: background .25s;
}
.rank-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .25s;
}

/* ════════════════════════════════════════════════════════════════
   VALIDATION STATES
════════════════════════════════════════════════════════════════ */
.field.has-error input,
.field.has-error select {
  border-color: #e0264a !important;
  box-shadow: 0 0 0 3px rgba(224,38,74,.14) !important;
}
.field.has-ok input,
.field.has-ok select {
  border-color: #4caf88 !important;
}

.field-msg {
  font-size: .68rem;
  min-height: 1em;
  display: none;
  letter-spacing: .01em;
}
.field.has-error .field-msg { display: block; color: #e0264a; }
.field.has-ok    .field-msg { display: block; color: #4caf88; }

/* ════════════════════════════════════════════════════════════════
   ALERT BANNERS
════════════════════════════════════════════════════════════════ */
.alert {
  display: none;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .87rem;
  line-height: 1.55;
  margin-bottom: 1.2rem;
  border-left: 3px solid;
  animation: fadeUp .28s ease both;
}
.alert.show { display: flex; }

.alert-success {
  background: rgba(76,175,136,.1);
  border-color: #4caf88;
  color: #6fcfaa;
}
.alert-error {
  background: rgba(224,38,74,.1);
  border-color: #e0264a;
  color: #f27;
}
.alert-info {
  background: rgba(201,145,10,.1);
  border-color: var(--gold);
  color: var(--gold);
}
.alert i { flex-shrink: 0; margin-top: .15rem; }

/* ════════════════════════════════════════════════════════════════
   SUBMIT BUTTON
════════════════════════════════════════════════════════════════ */
.btn-submit {
  width: 100%;
  margin-top: 1.5rem;
  padding: .9rem 1.5rem;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  position: relative;
  transition: background var(--ease), border-color var(--ease),
              transform .15s, box-shadow var(--ease);
}
.btn-submit:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200,16,46,.45);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading spinner inside button */
.spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.btn-submit.loading .spinner { display: block; }
.btn-submit.loading .btn-label { opacity: 0; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════
   FORGOT PASSWORD LINK & SWITCH HINT
════════════════════════════════════════════════════════════════ */
.forgot-link {
  display: inline-block;
  margin-top: .55rem;
  font-size: .78rem;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--ease);
}
.forgot-link:hover { color: var(--red); }

.auth-switch {
  text-align: center;
  margin-top: 1.1rem;
  font-size: .83rem;
  color: var(--muted);
}
.auth-switch button {
  background: none;
  border: none;
  color: var(--red);
  font-weight: 600;
  font-size: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  transition: color var(--ease);
}
.auth-switch button:hover { color: var(--white); }

/* ════════════════════════════════════════════════════════════════
   STUDENT CARDS
════════════════════════════════════════════════════════════════ */
.student-card {
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  transition: border-color var(--ease);
}
.student-card:focus-within {
  border-color: rgba(200,16,46,.4);
}

.student-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .7rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.student-card-title {
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: .55rem;
}
.student-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: var(--red);
  border-radius: 50%;
  font-size: .65rem;
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
  flex-shrink: 0;
}

.btn-remove-student {
  background: none;
  border: 1px solid rgba(224,38,74,.3);
  color: rgba(224,38,74,.7);
  border-radius: 3px;
  font-size: .7rem;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .28rem .65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.btn-remove-student:hover {
  background: rgba(224,38,74,.1);
  color: #f27;
  border-color: #f27;
}

.student-card-body { padding: 1rem; }

/* ── Add student button ── */
.btn-add-student {
  width: 100%;
  padding: .75rem 1rem;
  background: transparent;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .06em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1.2rem;
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.btn-add-student:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(200,16,46,.04);
}
.btn-add-student i { font-size: 1rem; }

/* ════════════════════════════════════════════════════════════════
   SUCCESS SCREEN (after signup)
════════════════════════════════════════════════════════════════ */
.success-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
  gap: 1.2rem;
}
.success-screen.show { display: flex; }

.success-icon-wrap {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(200,16,46,.1);
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--red);
  animation: popIn .45s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes popIn {
  from { transform: scale(.4); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}

.success-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1;
}
.success-title span { color: var(--red); }

.success-desc {
  font-size: .9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  max-width: 360px;
}
.success-email-tag {
  color: var(--gold);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════════ */
@media (max-width: 520px) {
  .auth-main    { padding: 1.5rem .75rem 4rem; }
  .auth-header  { padding: 1.25rem 1.25rem 0; }
  .auth-body    { padding: 1.25rem 1.25rem 1.5rem; }
  .tab-btn      { font-size: .88rem; letter-spacing: .1em; padding: .85rem .75rem; }
  .success-screen { padding: 2.5rem 1rem; }
  .student-card-body { padding: .85rem .75rem; }
}

/* ── Re-use site fadeUp animation if not already in scope ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
