/* ==========================================================================
   aczh.dev — Account page
   --------------------------------------------------------------------------
   House rules this file obeys (see UI_STANDARDIZATION_GUIDELINES.md):

   - No block-start padding anywhere. The header offset belongs to
     `--aczh-header-pad-top`, which /responsive.css applies to `body`.
   - The gutter is set through `--pad-inline` / `--pad-block` so the shared
     sheet's notch safe-area insets keep working.
   - No `.aczh-badge`. Claims like "100% Private" do not belong in a nav bar.
   ========================================================================== */

:root {
  --pad-inline: clamp(0.85rem, 3vw, 1.75rem);
  --pad-block: clamp(1rem, 3vh, 2rem);
}

.account-shell {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vh, 1.75rem);
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.account-hero {
  text-align: center;
  padding-block-end: clamp(0.25rem, 1vh, 0.75rem);
}

.account-hero h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.2;
}

/* The single most important sentence on the page, so it gets the strongest
   treatment short of the headline itself. */
.optional-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: clamp(0.85rem, 2vh, 1.25rem) auto 0;
  max-width: 580px;
  padding: 0.85rem 1.05rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  color: #14532d;
  font-size: clamp(0.85rem, 1.1vw, 0.925rem);
  line-height: 1.55;
  text-align: left;
}

.optional-callout svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #16a34a;
}

.optional-callout a {
  color: #15803d;
  font-weight: 600;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */

.account-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.5vw, 1.75rem);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.account-card h2 {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.account-card > p {
  font-size: clamp(0.85rem, 1.1vw, 0.9rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Provider buttons ─────────────────────────────────────────────────────── */

.provider-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.provider-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1.1rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-family: inherit;
  font-size: clamp(0.9rem, 1.2vw, 0.975rem);
  font-weight: 650;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.provider-btn:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.provider-btn svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.provider-btn .provider-note {
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.or-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.35rem 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ── Tabs ─────────────────────────────────────────────────────────────────── */

.auth-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.28rem;
  background: var(--surface-muted);
  border-radius: 9999px;
  margin-bottom: 1.15rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: clamp(0.85rem, 1.1vw, 0.9rem);
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab[aria-selected='true'] {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* ── Forms ────────────────────────────────────────────────────────────────── */

.field {
  margin-bottom: 0.95rem;
}

.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.field input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.field-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.primary-btn {
  width: 100%;
  padding: 0.78rem 1.2rem;
  background: var(--color-primary);
  border: none;
  border-radius: 9999px;
  font-family: inherit;
  font-size: clamp(0.9rem, 1.2vw, 0.975rem);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.primary-btn:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.secondary-btn {
  padding: 0.62rem 1.1rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  color: var(--text-primary);
  border-color: #cbd5e1;
}

.danger-btn {
  padding: 0.62rem 1.1rem;
  background: var(--surface-card);
  border: 1px solid #fecaca;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 650;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s ease;
}

.danger-btn:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}

.danger-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
}

/* ── Messages ─────────────────────────────────────────────────────────────── */

.form-message {
  margin-top: 0.9rem;
  padding: 0.72rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.55;
  display: none;
}

.form-message.is-visible {
  display: block;
}

.form-message.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.form-message.is-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #14532d;
}

.form-message.is-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.form-message a {
  font-weight: 650;
}

/* ── Verification banner ──────────────────────────────────────────────────── */

.verify-banner {
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 1.05rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.55;
}

.verify-banner.is-visible {
  display: flex;
}

.verify-banner svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: #d97706;
}

/* ── Signed-in summary ────────────────────────────────────────────────────── */

.identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem;
  background: var(--surface-muted);
  border-radius: var(--radius-md);
  margin-bottom: 1.1rem;
}

.identity-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-primary);
  overflow: hidden;
}

.identity-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.identity-text {
  min-width: 0;
}

.identity-email {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.identity-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.85rem;
}

.meta-list dt {
  color: var(--text-muted);
}

.meta-list dd {
  margin: 0;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.section-divider {
  height: 1px;
  background: var(--border-subtle);
  border: none;
  margin: 1.25rem 0;
}

.danger-zone h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 0.3rem;
}

/* ── What we store ────────────────────────────────────────────────────────── */

.store-list {
  list-style: none;
  padding: 0;
  margin: 0.9rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.store-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.store-list svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--text-muted);
}

.store-list strong {
  color: var(--text-primary);
  font-weight: 650;
}

@media (max-width: 420px) {
  .meta-list {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .meta-list dd {
    margin-bottom: 0.4rem;
  }

  .btn-row > button {
    flex: 1 1 auto;
  }
}
