/* auth.css — dedicated login / register pages only */

.page-auth {
  --page: #f3f5f8;
  --card: #ffffff;
  --ink: #192333;
  --ink-soft: #303b4a;
  --muted: #657082;
  --muted-2: #9aa4b4;
  --border: #e4e8ef;
  --teal: #4F46E5;
  --teal-h: #4338CA;
  --purple: #7b2ba0;
  --soft: #ecebff;
  --serif: system-ui, "Georgia", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(1200px 800px at 10% -10%, #eef2ff 0%, transparent 60%),
    radial-gradient(1200px 800px at 110% 10%, #ecfeff 0%, transparent 60%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page-auth *,
.page-auth *::before,
.page-auth *::after {
  box-sizing: border-box;
}

.page-auth a {
  color: inherit;
  text-decoration: none;
}

.page-auth svg {
  display: block;
}

.page-auth .ico {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 40px;
}

.auth-page-logo {
  display: inline-flex;
  margin-bottom: 24px;
}

.auth-page-logo img {
  height: 42px;
  width: auto;
}

.auth-panel {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(18, 26, 38, .12);
  padding: 32px 32px 26px;
}

.auth-head {
  text-align: center;
  margin-bottom: 22px;
}

.auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(150deg, var(--teal), var(--purple));
  box-shadow: 0 8px 22px rgba(79, 70, 229, .32);
}

.auth-mark .ico {
  width: 26px;
  height: 26px;
}

.auth-head h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}

.auth-head p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
}

.auth-alert {
  font-size: 12.5px;
  color: #b42318;
  background: rgba(210, 59, 59, .08);
  border: 1px solid rgba(210, 59, 59, .2);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 14px;
}

.auth-success {
  font-size: 12.5px;
  color: #166534;
  background: rgba(22, 163, 74, .08);
  border: 1px solid rgba(22, 163, 74, .25);
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 14px;
}

.auth-notice {
  font-size: 12.5px;
  color: #856404;
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 10px;
  padding: 10px 13px;
  margin-bottom: 14px;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.auth-field label .auth-forgot {
  float: right;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--teal);
}

.auth-field label .auth-forgot:hover {
  text-decoration: underline;
}

.auth-field input {
  width: 100%;
  font-size: 14px;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  outline: none;
  font-family: inherit;
  background: #fff;
}

.auth-field input::placeholder {
  color: var(--muted-2);
}

.auth-field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.auth-pass {
  position: relative;
}

.auth-pass input {
  padding-right: 42px;
}

.auth-eye {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
}

.auth-eye:hover {
  color: var(--ink-soft);
  background: var(--page);
}

.auth-eye .ico {
  width: 17px;
  height: 17px;
}

.auth-captcha {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
  min-height: 78px;
}

.auth-terms {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 16px;
}

.auth-terms a {
  color: var(--teal);
  font-weight: 600;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 2px;
  background: var(--teal);
  color: #fff;
  border: none;
  cursor: pointer;
  height: 46px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
}

.auth-submit:hover {
  background: var(--teal-h);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.auth-actions .auth-submit,
.auth-actions .auth-submit-secondary {
  margin-top: 0;
}

.auth-submit-secondary {
  width: 100%;
  justify-content: center;
  background: #475569;
  color: #fff;
  border: none;
  cursor: pointer;
  height: 46px;
  border-radius: 11px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
}

.auth-submit-secondary:hover {
  background: #334155;
}

@media (max-width: 380px) {
  .auth-actions {
    grid-template-columns: 1fr;
  }
}

.auth-foot {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-foot a {
  color: var(--teal);
  font-weight: 700;
}

.auth-foot a:hover {
  text-decoration: underline;
}

.auth-back {
  margin-top: 18px;
  text-align: center;
}

.auth-back a {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.auth-back a:hover {
  color: var(--ink);
}

/* Register password strength */
.rg-strength-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
}

.rg-strength-bar {
  display: flex;
  gap: 4px;
  flex: 1;
}

.rg-seg {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: #e2e8f0;
  transition: background 0.3s;
}

.rg-strength-label {
  font-size: 0.72rem;
  font-weight: 600;
  min-width: 44px;
  text-align: right;
}

.rg-req-list {
  list-style: none;
  padding: 10px 12px;
  margin: 6px 0 0;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rg-req-list li {
  font-size: 0.78rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rg-req-list li.rg-pass {
  color: #16a34a;
}

.rg-match-hint {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 5px;
  min-height: 18px;
}

.rg-match-ok {
  color: #16a34a;
}

.rg-match-err {
  color: #dc2626;
}

@media (max-width: 480px) {
  .auth-panel {
    padding: 24px 20px 20px;
    border-radius: 16px;
  }

  .auth-page-logo img {
    height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel {
    animation: none;
  }
}
