/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ─── */
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cs-background);
  color: var(--cs-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Page wrapper ─── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(124,58,237,0.22), transparent),
    var(--cs-background);
}

/* ─── Card ─── */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
}

/* ─── Logo ─── */
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
}

/* ─── Header ─── */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--cs-text-muted);
}

/* ─── Form groups ─── */
.auth-form .cs-form-group {
  margin-bottom: 16px;
}

/* ─── Password field wrapper ─── */
.pw-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.forgot-link {
  background: none;
  border: none;
  font-size: 12px;
  color: #7c3aed;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: opacity 0.15s;
}
.forgot-link:hover { opacity: 0.75; }

.input-wrap {
  position: relative;
}
.input-wrap .cs-input {
  padding-right: 40px;
}
.show-pass-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--cs-text-muted);
  display: flex;
  align-items: center;
  transition: color 0.15s;
}
.show-pass-btn:hover { color: var(--cs-text); }

/* ─── Error / success ─── */
.auth-error {
  padding: 10px 14px;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: var(--cs-radius, 8px);
  color: #ef4444;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.auth-success {
  padding: 10px 14px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: var(--cs-radius, 8px);
  color: #22c55e;
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ─── Loading button state ─── */
.cs-button .btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── OAuth section ─── */
.oauth-section {
  margin-top: 24px;
}
.oauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--cs-text-muted);
}
.oauth-divider::before,
.oauth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cs-border);
}

.oauth-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.oauth-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  background: var(--cs-surface);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius, 8px);
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}
.oauth-btn:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.2);
}
.oauth-btn .oauth-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oauth-btn .oauth-label { flex: 1; text-align: left; }

/* ─── Footer ─── */
.auth-.auth-footer a {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }
.auth-footer + .auth-.logo { font-size:18px;font-weight:800;background:linear-gradient(135deg,#7c3aed,#0ea5e9);-webkit-background-clip:text;-webkit-text-fill-color:transparent;text-decoration:none; }
.nav-right { display:flex;align-items:center;gap:6px;flex-wrap:wrap; }
.nav-more-wrap { position:relative; }
.nav-more-menu { position:absolute;right:0;top:calc(100% + 8px);min-width:200px;max-height:70vh;overflow-y:auto;background:var(--cs-surface);border:1px solid var(--cs-border);border-radius:8px;box-shadow:0 12px 40px rgba(0,0,0,0.35);padding:8px 0;z-index:300; }
.nav-more-menu[hidden] { display:none; }
.nav-more-menu a { display:block;padding:8px 16px;font-size:13px;color:var(--cs-text-muted);text-decoration:none; }
.nav-more-menu a:hover { background:rgba(124,58,237,0.1);color:var(--cs-text); }
