/* ─────────────────────────────────────────────────────────────
   Capraseo — account page (account.html)
   Profile, active sessions, sign-in history, team members.
   ───────────────────────────────────────────────────────────── */

.center.center-scroll {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 36px 40px;
  overflow-y: auto;
  gap: 24px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #f3f3f5;
}
.page-head p {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Generic card */
/* Card — refined material with the same lit-from-above depth as the
   sidebar: a subtle vertical luminance gradient overlay layered above
   the panel base, and slightly stronger inner top + bottom rims. */
.card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0) 60%),
    var(--panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    inset 0 -1px 0 rgba(0,0,0,0.18),
    0 12px 36px -16px rgba(0,0,0,0.55);
  overflow: hidden;
  /* Inside the .center.center-scroll flex column, cards must keep their
     natural height. With overflow:hidden their min-content size is 0, so
     default flex-shrink:1 collapses each card to header-only. */
  flex-shrink: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #e8e8ea;
  letter-spacing: -0.005em;
}
.card-head .card-sub {
  font-size: 12px;
  color: var(--muted-2);
  margin-top: 2px;
}
.card-body { padding: 18px 20px; }

/* Profile card */
.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}
.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #36363e, #1a1a1d);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 500;
  color: #e8e8ea;
  flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.profile-info .name {
  font-size: 15px;
  font-weight: 500;
  color: #f3f3f5;
  letter-spacing: -0.01em;
}
.profile-info .meta {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}
.profile-plan {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  margin-top: 8px;
  background: rgba(230, 196, 122, 0.08);
  border: 1px solid rgba(230, 196, 122, 0.18);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px 0 4px;
}
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.field input {
  height: 38px;
  padding: 0 12px;
  background: rgba(22,22,25,0.55);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font: 400 13.5px 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.field input:focus {
  border-color: rgba(255,255,255,0.22);
  background: rgba(28,28,32,0.7);
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
}

/* Tables (sessions, history, team) */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.12);
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: rgba(200,200,210,0.85);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(255,255,255,0.015); }

.tbl .row-primary {
  color: #f3f3f5;
  font-weight: 500;
}
.tbl .row-secondary {
  color: var(--muted-2);
  font-size: 12px;
  margin-top: 2px;
}
.tbl .col-action { text-align: right; width: 1%; white-space: nowrap; }
.tbl .col-tight { width: 1%; white-space: nowrap; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.badge-current {
  color: #b8e6f5;
  background: rgba(99, 102, 241, 0.10);
  border-color: rgba(99, 102, 241, 0.28);
}
.badge-success {
  color: #b8e6f5;
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.18);
}
.badge-warn {
  color: #ffe1a8;
  background: rgba(230, 196, 122, 0.06);
  border-color: rgba(230, 196, 122, 0.22);
}
.badge-danger {
  color: #ffc4c4;
  background: rgba(255, 122, 122, 0.06);
  border-color: rgba(255, 122, 122, 0.22);
}
.badge-muted {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.role-pill.role-owner { color: #f3f3f5; background: rgba(255,255,255,0.07); }
.role-pill.role-admin { color: #d8d8de; }
.role-pill.role-member { color: var(--muted); }

.danger-zone {
  border-color: rgba(255, 122, 122, 0.18);
}
.danger-zone .card-head {
  border-bottom-color: rgba(255, 122, 122, 0.12);
}
.danger-zone .card-head h2 { color: #ffc4c4; }

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
}
.danger-row .copy { color: var(--muted); font-size: 13px; }
.danger-row .copy strong { color: #f3f3f5; font-weight: 500; display: block; margin-bottom: 2px; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .center.center-scroll { padding: 0 18px 28px; }
  .page-head { flex-direction: column; align-items: stretch; }
}

/* ── Publication (WordPress) card ─────────────────────────────── */
.wp-loading { font-size: 13px; color: var(--muted-2); }

.wp-note {
  margin-bottom: 14px;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  border: 1px solid var(--line);
  color: var(--muted);
}
.wp-note[data-kind="ok"] {
  color: #b8e6f5;
  background: rgba(99, 102, 241,0.08);
  border-color: rgba(99, 102, 241,0.28);
}
.wp-note[data-kind="err"] {
  color: #ffc9c9;
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.28);
}

.wp-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
}
.wp-field { display: flex; flex-direction: column; gap: 5px; }
.wp-label { font-size: 12px; color: var(--muted); }
.wp-field input {
  height: 36px;
  padding: 0 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 9px;
  color: var(--text);
  font: 400 13px 'Inter', sans-serif;
  transition: border-color 160ms ease;
}
.wp-field input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.28);
}
.wp-form-row { margin-top: 2px; }
.wp-error {
  font-size: 12.5px;
  color: #ffc9c9;
}

.wp-guide {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.wp-guide > summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
}
.wp-guide > summary:hover { color: var(--text); }
.wp-guide[open] > summary { color: var(--text); margin-bottom: 10px; }
.wp-guide-intro {
  margin: 0 0 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.wp-guide-intro strong { color: #f3f3f5; font-weight: 500; }
.wp-guide-steps {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}
.wp-guide-steps strong { color: #f3f3f5; font-weight: 500; }
.wp-guide-steps code {
  font-size: 11.5px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
}
.wp-guide-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-2);
}

.wp-logo {
  background: linear-gradient(135deg, #3858e9, #1e3aa8);
  color: #fff;
}
.wp-conn-row { padding-top: 6px; padding-bottom: 6px; }
/* The status pill reflects verification, not just "connected" — recolour
   the dot per data-kind (verified=green, error=red, unverified=amber). */
.wp-conn-row .conn-status[data-kind="unverified"] { color: #e6c47a; }
.wp-conn-row .conn-status[data-kind="unverified"]::before {
  background: #e6c47a;
  box-shadow: 0 0 0 3px rgba(230,196,122,0.16);
}
.wp-conn-row .conn-status[data-kind="error"] { color: #ffc9c9; }
.wp-conn-row .conn-status[data-kind="error"]::before {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.18);
}

/* ── Publishing summary (compact card on /domain/) ───────────── */
.pub-summary-card .card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.pub-summary-card .card-head .btn { flex-shrink: 0; }
.pub-method-list { display: flex; flex-direction: column; }
.pub-method-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pub-method-row:first-child { padding-top: 4px; }
.pub-method-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.hook-logo {
  background: linear-gradient(135deg, #6d5cff, #4733c9);
  color: #fff;
}
/* Status pill colours per setup/verification state. */
.pub-method-row .conn-status[data-kind="verified"] { color: #b8e6f5; }
.pub-method-row .conn-status[data-kind="verified"]::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241,0.18);
}
.pub-method-row .conn-status[data-kind="unverified"] { color: #e6c47a; }
.pub-method-row .conn-status[data-kind="unverified"]::before {
  background: #e6c47a;
  box-shadow: 0 0 0 3px rgba(230,196,122,0.16);
}
.pub-method-row .conn-status[data-kind="error"] { color: #ffc9c9; }
.pub-method-row .conn-status[data-kind="error"]::before {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.18);
}
.pub-method-row .conn-status[data-kind="off"] { color: var(--muted-2); }
@media (max-width: 560px) {
  .pub-summary-card .card-head { flex-direction: column; align-items: stretch; }
  .pub-method-row { grid-template-columns: 40px 1fr; }
  .pub-method-row .conn-right { grid-column: 1 / -1; justify-content: flex-end; }
}
