/* =========================================================
   Revomart Identity — Account / Login shell
   Paths: /account/account.css
   Neutral master-brand layer above Trust / Marketplace.
   ========================================================= */

:root {
  --ac-ink: #121820;
  --ac-muted: #5c6b7a;
  --ac-line: #e4e9ef;
  --ac-paper: #f7f8fa;
  --ac-surface: #ffffff;
  --ac-navy: #0e1a2b;
  --ac-navy-soft: #1a2b40;
  --ac-accent: #8a7340;
  --ac-accent-soft: #f4efe4;
  --ac-danger: #9b2c2c;
  --ac-danger-bg: #fdecec;
  --ac-max: 720px;
  --ac-sans: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ac-serif: "IBM Plex Serif", "Songti SC", "Noto Serif SC", Georgia, serif;
}

body.account-page {
  margin: 0;
  color: var(--ac-ink);
  background:
    radial-gradient(900px 420px at 8% -12%, rgba(138, 115, 64, 0.08), transparent 55%),
    linear-gradient(180deg, #f3f5f8 0%, var(--ac-paper) 220px, #f7f8fa 100%);
  font-family: var(--ac-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.trust-hidden { display: none !important; }

/* ---------- Neutral Identity header ---------- */
.ri-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 248, 250, 0.92);
  border-bottom: 1px solid rgba(228, 233, 239, 0.95);
  backdrop-filter: blur(10px);
}

.ri-header-inner {
  width: min(100% - 40px, 960px);
  margin: 0 auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.ri-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ac-navy);
  flex: 0 0 auto;
}

.ri-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 0;
  display: block;
  background: none;
  border: 0;
  padding: 0;
  object-fit: contain;
}

.ri-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.ri-brand-text strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ac-navy);
}

.ri-brand-text span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ac-muted);
}

.ri-header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.ri-identity-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ac-accent);
}

.ri-header-email {
  font-size: 13px;
  color: var(--ac-muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ri-logout-btn,
.ri-text-action {
  appearance: none;
  border: 1px solid var(--ac-line);
  background: var(--ac-surface);
  color: var(--ac-navy);
  border-radius: 8px;
  height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.ri-logout-btn:hover,
.ri-text-action:hover {
  border-color: #c9b48a;
  background: #fff;
}

.ac-wrap {
  width: min(100% - 40px, var(--ac-max));
  margin: 0 auto;
  padding: 40px 0 88px;
}

.ac-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ac-accent);
}

.ac-hero {
  padding-bottom: 8px;
}

.ac-hero h1,
.ac-login-card h1 {
  margin: 0;
  font-family: var(--ac-serif);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  color: var(--ac-navy);
  line-height: 1.22;
}

.ac-lead {
  margin: 14px 0 0;
  max-width: 34em;
  font-size: 16px;
  color: var(--ac-muted);
  line-height: 1.65;
}

.ac-state {
  padding: 48px 8px;
  text-align: center;
  color: var(--ac-muted);
}

.ac-state-error h2 {
  margin: 0 0 8px;
  color: var(--ac-navy);
  font-size: 22px;
}

.ac-primary-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ac-navy);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.ac-section {
  margin-top: 40px;
  padding-top: 4px;
}

.ac-section-products {
  margin-top: 48px;
}

.ac-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ac-line);
}

.ac-section-head h2 {
  margin: 0;
  font-family: var(--ac-serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ac-navy);
}

.ac-section-head p {
  margin: 0;
  font-size: 14px;
  color: var(--ac-muted);
}

.ac-dl {
  display: grid;
  grid-template-columns: minmax(96px, 140px) minmax(0, 1fr);
  gap: 12px 16px;
  margin: 16px 0 0;
  padding: 18px;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
  background: var(--ac-surface);
}

.ac-dl dt {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ac-muted);
}

.ac-dl dd {
  margin: 0;
  font-size: 15px;
  color: var(--ac-ink);
  word-break: break-word;
}

.ac-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.ac-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.ac-action {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
  background: var(--ac-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease;
}

.ac-action:hover:not(.is-disabled):not(:disabled) {
  border-color: #c9b48a;
}

.ac-action strong {
  display: block;
  font-size: 16px;
  color: var(--ac-navy);
  margin-bottom: 4px;
}

.ac-action span {
  display: block;
  font-size: 14px;
  color: var(--ac-muted);
  line-height: 1.55;
}

.ac-action.is-disabled {
  opacity: 0.72;
  cursor: default;
  background: var(--ac-paper);
}

.ac-action-btn {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.ac-action-danger {
  border-color: rgba(155, 44, 44, 0.28);
  background: var(--ac-danger-bg);
}

.ac-action-danger:hover:not(:disabled) {
  border-color: rgba(155, 44, 44, 0.45);
}

.ac-action-danger strong {
  color: var(--ac-danger);
}

/* P5.B — product status cards (neutral Account only) */
.ac-product-card {
  cursor: default;
}

.ac-product-card:hover {
  border-color: var(--ac-line);
}

.ac-inline-link,
.ac-product-actions a {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ac-navy);
  text-decoration: none;
}

.ac-inline-link:hover,
.ac-product-actions a:hover {
  text-decoration: underline;
}

.ac-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.ac-product-grid {
  gap: 12px;
}

/* Login */
.ac-login-card {
  max-width: 480px;
  margin: 24px auto 0;
  padding: 28px 28px 32px;
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  background: var(--ac-surface);
}

.ac-form {
  margin-top: 24px;
}

.ac-field {
  margin-bottom: 16px;
}

.ac-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-navy);
}

.ac-field input {
  width: 100%;
  box-sizing: border-box;
  height: 48px;
  padding: 0 13px;
  border: 1px solid var(--ac-line);
  border-radius: 8px;
  background: #fbfcfd;
  font-family: var(--ac-sans);
  font-size: 16px;
  color: var(--ac-ink);
}

.ac-field input:focus {
  outline: 2px solid rgba(138, 115, 64, 0.35);
  border-color: var(--ac-accent);
  background: #fff;
}

.ac-primary {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: var(--ac-navy);
  color: #fff;
  font-family: var(--ac-sans);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.ac-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ac-message {
  min-height: 22px;
  margin: 0 0 10px;
  font-size: 14px;
  color: var(--ac-muted);
}

.ac-message.is-error { color: var(--ac-danger); }
.ac-message.is-muted { color: var(--ac-muted); }

.ac-pending-empty {
  margin: 0;
  font-size: 14px;
  color: var(--ac-muted);
}

.ac-pending-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ac-pending-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--ac-line);
  border-radius: 10px;
  background: var(--ac-surface);
}

.ac-pending-card strong {
  font-size: 15px;
  color: var(--ac-navy);
}

.ac-pending-meta,
.ac-pending-num {
  font-size: 13px;
  color: var(--ac-muted);
}

.ac-pending-cta {
  margin-top: 8px;
  align-self: flex-start;
  font-size: 14px;
  font-weight: 700;
  color: var(--ac-accent);
  text-decoration: none;
}

.ac-pending-cta:hover {
  text-decoration: underline;
}

.ac-footer-links {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--ac-line);
  text-align: center;
  font-size: 14px;
  color: var(--ac-muted);
}

.ac-footer-links a {
  color: var(--ac-accent);
  font-weight: 700;
  text-decoration: none;
}

.ac-footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .ri-header-inner {
    width: min(100% - 28px, 960px);
    min-height: 58px;
  }

  .ri-brand-mark {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .ri-brand-text strong {
    font-size: 16px;
  }

  .ri-identity-label {
    display: none;
  }

  .ri-header-email {
    max-width: 120px;
  }

  .ac-wrap {
    width: min(100% - 28px, var(--ac-max));
    padding: 28px 0 72px;
  }

  .ac-login-card { padding: 22px 18px 26px; }
  .ac-dl { grid-template-columns: 1fr; gap: 4px 0; }
  .ac-dl dt { margin-top: 8px; }
}

/* ---------- Global Account gateway (/account/account.html) ---------- */
body.account-page:not(.account-login-page) {
  background: var(--ac-paper);
}

.ac-global-header-inner {
  width: min(100% - 48px, 1080px);
}

.ac-global {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  padding: 40px 0 32px;
}

.ac-intro h1 {
  margin: 0;
  font-family: var(--ac-serif);
  font-size: 32px;
  font-weight: 650;
  color: var(--ac-navy);
  letter-spacing: -0.02em;
}

.ac-intro p {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--ac-muted);
  line-height: 1.6;
}

.ac-id-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.04);
}

.ac-id-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(145deg, #243652, #0e1a2b);
  color: #e8d7a8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}

.ac-id-copy {
  min-width: 0;
}

.ac-id-name {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  color: var(--ac-navy);
  word-break: break-word;
}

.ac-id-meta {
  margin: 5px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--ac-muted);
  word-break: break-all;
}

.ac-products-block {
  margin-top: 40px;
}

.ac-block-head h2,
.ac-secure-block h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  color: var(--ac-navy);
}

.ac-block-head p {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--ac-muted);
}

.ac-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.ac-product {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px 22px 20px;
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14, 26, 43, 0.04);
}

.ac-product-eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--ac-accent);
}

.ac-product h3 {
  margin: 8px 0 0;
  font-size: 23px;
  font-weight: 600;
  color: var(--ac-navy);
}

.ac-product-desc {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ac-muted);
  flex: 1;
}

.ac-product-status {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  color: var(--ac-muted);
}

#ac-marketplace-actions {
  width: 100%;
}

.ac-product-cta,
.ac-marketplace-actions a,
#ac-marketplace-actions a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  margin-top: 20px;
  padding: 0 18px;
  border-radius: 12px;
  background: var(--ac-navy);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1;
}

.ac-product-cta::after,
.ac-marketplace-actions a::after,
#ac-marketplace-actions a::after {
  content: "→";
  margin-left: 12px;
  font-weight: 600;
}

.ac-product-cta:hover,
.ac-marketplace-actions a:hover,
#ac-marketplace-actions a:hover {
  background: var(--ac-navy-soft);
  color: #fff;
}

.ac-product-cta:focus-visible,
.ac-marketplace-actions a:focus-visible,
#ac-marketplace-actions a:focus-visible {
  outline: 2px solid var(--ac-accent);
  outline-offset: 2px;
  color: #fff;
}

.ac-secure-block {
  margin-top: 40px;
}

.ac-rows {
  margin-top: 14px;
  background: var(--ac-surface);
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  overflow: hidden;
}

.ac-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--ac-line);
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ac-ink);
  text-align: left;
  box-sizing: border-box;
}

.ac-row:last-child {
  border-bottom: 0;
}

.ac-row span {
  color: var(--ac-ink);
}

.ac-row b {
  font-weight: 400;
  font-size: 13px;
  color: var(--ac-muted);
  text-align: right;
  word-break: break-all;
}

.ac-row i {
  font-style: normal;
  color: #c0c8d2;
}

.ac-row-btn {
  cursor: pointer;
}

.ac-row-btn:hover {
  background: #fafbfc;
}

.ac-row-danger span {
  color: var(--ac-danger);
}

.ac-end {
  width: min(100% - 48px, 1080px);
  margin: 0 auto;
  padding: 8px 0 48px;
}

.ac-end p {
  margin: 0;
  font-size: 12px;
  color: var(--ac-muted);
}

@media (max-width: 800px) {
  .ac-products {
    grid-template-columns: 1fr;
  }

  .ac-global,
  .ac-global-header-inner,
  .ac-end {
    width: min(100% - 28px, 1080px);
  }

  .ac-intro h1 {
    font-size: 28px;
  }

  .ac-id-card {
    align-items: flex-start;
  }
}
