/* ============================================================
   AUTH — Page-specific styles
   ============================================================ */

/* Override: links are accent on auth page */
a { color: var(--accent-2); text-decoration: none }
a:hover { text-decoration: underline }

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* PANEL LEFT - BRAND */
.side {
  position: relative;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.side::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  top: -180px;
  right: -160px;
}
.side::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  bottom: -140px;
  left: -100px;
}
.side__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  position: relative;
  z-index: 1;
}
.side__brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .18);
  display: grid;
  place-items: center;
  font-size: .95rem;
}
.side__quote {
  position: relative;
  z-index: 1;
  max-width: 440px;
}
.side__quote p {
  font-size: var(--step-2);
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 22px;
}
.side__who { display: flex; align-items: center; gap: 12px }
.side__who .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.side__who b {
  display: block;
  font-size: var(--step--1);
}
.side__who span { font-size: .78rem; opacity: .85 }
.side__stats {
  display: flex;
  gap: 28px;
  position: relative;
  z-index: 1;
}
.side__stats b {
  display: block;
  font-size: var(--step-2);
  font-weight: 800;
}
.side__stats span { font-size: .78rem; opacity: .85 }

/* PANEL RIGHT - FORM */
.formside {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.authbox { width: 100%; max-width: 400px }
.authbox__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.back-home {
  font-size: var(--step--1);
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 6px;
}
.back-home:hover { color: var(--text); text-decoration: none }

.tabs {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 26px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 9px;
  border-radius: 7px;
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--text-2);
}
.tab[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.authbox h1 {
  font-size: var(--step-2);
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0 0 6px;
}
.authbox .sub {
  color: var(--muted);
  font-size: var(--step--1);
  margin: 0 0 24px;
}

.field { margin-bottom: 16px }
.field label {
  display: block;
  font-size: var(--step--1);
  font-weight: 700;
  margin-bottom: 6px;
}
.field .input-wrap { position: relative }
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--step-0);
}
.field input:focus { border-color: var(--accent) }
.field input.has-icon { padding-left: 40px }
.field .input-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.field .toggle-pw {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  padding: 4px;
}
.field .toggle-pw:hover { color: var(--text) }
.field .err {
  display: none;
  color: var(--danger);
  font-size: .76rem;
  margin-top: 6px;
}
.field.is-invalid input { border-color: var(--danger) }
.field.is-invalid .err { display: block }

.pw-strength { display: flex; gap: 5px; margin-top: 8px }
.pw-strength i {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--surface-3);
}
.pw-strength.s1 i:nth-child(1) { background: var(--danger) }
.pw-strength.s2 i:nth-child(-n+2) { background: #E6A23C }
.pw-strength.s3 i:nth-child(-n+3) { background: var(--ok) }
.pw-strength.s4 i { background: var(--ok) }
.pw-hint {
  font-size: .72rem;
  color: var(--muted);
  margin-top: 5px;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: var(--step--1);
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}
.check input { accent-color: var(--accent) }
.row-between a { font-weight: 600 }

/* Auth button overrides */
.authbox .btn {
  width: 100%;
}
.btn--primary[disabled] { opacity: .6; cursor: not-allowed }
.btn--primary .spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn--primary.is-loading .spinner { display: inline-block }
.btn--primary.is-loading .lbl { opacity: .85 }
@keyframes spin { to { transform: rotate(360deg) } }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: .78rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.oauth-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--step--1);
}
.oauth-btn:hover {
  border-color: var(--text);
  background: var(--surface-2);
}

.switch-line {
  text-align: center;
  font-size: var(--step--1);
  color: var(--text-2);
}
.switch-line button {
  color: var(--accent-2);
  font-weight: 700;
}
.switch-line button:hover { text-decoration: underline }

.terms-note {
  text-align: center;
  font-size: .74rem;
  color: var(--muted);
  margin-top: 18px;
}

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr }
  .side { display: none }
  .formside { padding: 32px 20px }
  .field input { font-size: 16px }
  .toggle-pw {
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
  }
  .oauth-btn {
    padding: 14px 10px;
    min-height: 44px;
  }
  .tab {
    padding: 12px;
    min-height: 44px;
  }
  .btn {
    min-height: 44px;
  }
  .back-home {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 0;
  }
}
