/* ===== Auth page ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-cn);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: var(--space-2xl);
  letter-spacing: 0.02em;
}

.auth-logo-icon { font-size: 2rem; }

.auth-card {
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ink-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 400px;
}

/* ── Tab switcher ── */
.auth-tabs {
  display: flex;
  background: var(--paper-alt);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-full);
  padding: 4px;
  margin-bottom: var(--space-2xl);
  gap: 4px;
}

.auth-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  background: transparent;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-cn);
}

.auth-tab.is-active {
  background: var(--yellow);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-ink-sm);
}

/* ── Form ── */
.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-form-group { margin-bottom: var(--space-lg); }

.auth-label {
  display: block;
  font-family: var(--font-cn);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-en), var(--font-cn);
  color: var(--ink);
  background: var(--paper);
  box-sizing: border-box;
  outline: none;
  box-shadow: var(--shadow-ink-sm);
  transition: box-shadow var(--transition-fast), background var(--transition-fast);
}

.auth-input:focus {
  background: var(--card);
  box-shadow: var(--shadow-ink);
}

.auth-error {
  display: none;
  margin-top: var(--space-md);
  padding: 10px 14px;
  background: var(--danger-pale);
  border: var(--border-w) solid var(--danger);
  border-radius: var(--radius-md);
  box-shadow: 2px 2px 0 var(--danger);
  font-family: var(--font-cn);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--danger);
}

.auth-error.is-visible { display: block; }

.auth-submit {
  width: 100%;
  margin-top: var(--space-lg);
  padding: 13px;
  background: var(--primary);
  color: #fff;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-full);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-cn);
  cursor: pointer;
  box-shadow: var(--shadow-ink);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.auth-submit:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-ink-sm);
}

.auth-submit:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ===== Profile page ===== */
.profile-page {
  min-height: 100vh;
}

.profile-body {
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* ── User card ── */
.profile-user-card {
  background: var(--yellow);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ink);
  padding: var(--space-2xl);
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-ink-sm);
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-cn);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-username {
  font-family: var(--font-cn);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.profile-since {
  font-size: 0.82rem;
  color: var(--ink);
  opacity: 0.7;
  margin-top: 4px;
}

/* ── Info cards ── */
.profile-section-title {
  font-family: var(--font-cn);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
  padding-left: var(--space-xs);
  text-transform: uppercase;
}

.profile-card {
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-ink);
  padding: var(--space-xl);
}

.profile-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.profile-card-label {
  font-family: var(--font-cn);
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-card-value {
  font-family: var(--font-cn);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.profile-no-set {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
}

.profile-progress-bar {
  width: 100%;
  height: 12px;
  background: var(--paper-alt);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-md);
}

.profile-progress-fill {
  height: 100%;
  background: var(--primary);
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 5px,
    rgba(255,255,255,0.25) 5px, rgba(255,255,255,0.25) 10px
  );
  transition: width 0.6s ease;
}

.profile-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: var(--space-xs);
}

/* ── Danger button ── */
.btn-danger {
  background: var(--danger-pale);
  color: var(--danger);
  border-color: var(--danger);
  box-shadow: 4px 4px 0 var(--danger);
}

.btn-danger:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--danger);
}

.btn-danger:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* ── Header user chip ── */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 5px 12px 5px 5px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-full);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.875rem;
  font-family: var(--font-cn);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-ink-sm);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.user-chip:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
  color: var(--ink);
}

.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-family: var(--font-cn);
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
