/* ==========================================================================
   Gold Currency — sign-in and account pages.
   Loaded after style-v2.css and uses only its tokens. Class names are
   prefixed ap- so nothing here can affect the public marketing pages.
   ========================================================================== */

.ap-section{ padding: 56px 0 76px; }
.ap-narrow{ max-width: 460px; margin-inline: auto; }
.ap-mid{ max-width: 640px; margin-inline: auto; }
.ap-wide{ max-width: 860px; margin-inline: auto; }
.ap-center{ text-align: center; }

/* ---------------- Cards / panels ---------------- */
.ap-card{
  background: var(--parchment-2);
  border: 1px solid var(--line-light);
  border-radius: 8px;
  padding: 34px 32px;
}
.ap-card--dark{
  background: var(--ink);
  color: var(--text-light);
  border-color: var(--line-dark);
}
.ap-card h1, .ap-card h2{ font-size: clamp(24px, 3vw, 30px); }
.ap-card h3{ font-size: 19px; margin-bottom: 10px; }
.ap-sub{ margin-top: 10px; color: var(--text-dim); font-size: 15px; }
.ap-card--dark .ap-sub{ color: var(--text-light-dim); }
.ap-card--dark h1, .ap-card--dark h2, .ap-card--dark h3{ color: var(--text-light); }

/* ---------------- Forms ---------------- */
.ap-card form{ display: grid; gap: 14px; margin-top: 22px; }
.ap-card br{ display: none; }
.ap-card input:not([type="checkbox"]):not([type="hidden"]),
.ap-card select{
  width: 100%;
  background: var(--parchment);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--text-dark);
  font-family: inherit;
  font-size: 15px;
  text-align: start;
}
.ap-card--dark input:not([type="checkbox"]):not([type="hidden"]),
.ap-card--dark select{
  background: var(--ink-2);
  border-color: var(--line-dark);
  color: var(--text-light);
}
.ap-card input:focus, .ap-card select:focus{ outline: none; border-color: var(--gold); }
.ap-card input::placeholder{ color: var(--text-dim); opacity: .75; }
.ap-card--dark input::placeholder{ color: var(--text-light-dim); opacity: .7; }
.ap-card form .btn, .ap-card .btn--block{ width: 100%; }
.ap-card .btn{ cursor: pointer; }
.ap-card .btn--dark{ border-color: var(--line-dark); }

.ap-terms{
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--text-light-dim);
}
.ap-terms input[type="checkbox"]{ width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--gold-bright); }
.ap-terms a, .ap-link{ color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.ap-forgot{ text-align: center; font-size: 14px; margin-top: 4px; }
.ap-card:not(.ap-card--dark) .ap-link{ color: var(--bronze); }

.ap-label{ font-size: 14px; font-weight: 700; color: var(--text-dim); }
.ap-card--dark .ap-label{ color: var(--text-light-dim); }

/* ---------------- Dashboard tiles ---------------- */
.ap-tiles{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.ap-tile{
  background: var(--ink); color: var(--text-light);
  border: 1px solid var(--line-dark); border-radius: 6px;
  padding: 24px 22px;
}
.ap-tile span{ display: block; font-size: 13.5px; color: var(--text-light-dim); }
.ap-tile b{ display: block; margin-top: 8px; font-size: 26px; font-weight: 800; color: var(--gold-bright); }
.ap-tile--wide b{ font-size: 32px; }
.ap-actions{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.ap-actions--center{ justify-content: center; }
.btn--outline{
  border-color: var(--line-light); color: var(--text-dark); background: transparent;
}
.btn--outline:hover{ border-color: var(--gold); color: var(--bronze); }

/* ---------------- Table ---------------- */
.ap-table td, .ap-table th{ white-space: nowrap; }
.status-paid{ color: var(--up); font-weight: 700; }
.status-pending{ color: var(--bronze); font-weight: 700; }
.status-failed{ color: var(--down); font-weight: 700; }

/* ---------------- Notifications ---------------- */
.ap-notices{ display: grid; gap: 14px; }
.ap-notice{
  background: var(--parchment-2); border: 1px solid var(--line-light);
  border-inline-start: 4px solid var(--line-light);
  border-radius: 6px; padding: 16px 20px; color: var(--text-dim); font-size: 15.5px;
}
.ap-notice.unread{ border-inline-start-color: var(--gold-bright); color: var(--text-dark); font-weight: 700; }

/* ---------------- Settings panels ---------------- */
.ap-stack{ display: grid; gap: 22px; }
.ap-panel .ap-status{ margin: 6px 0 16px; color: var(--text-dim); }
.ap-panel .ap-status strong{ color: var(--text-dark); }
.ap-panel form, .ap-panel .ap-fields{ display: grid; gap: 14px; margin-top: 12px; }
.ap-panel p{ color: var(--text-dim); }
.ap-panel .btn{ margin-top: 14px; }
.ap-panel .ap-fields + .btn{ margin-top: 18px; }

/* ---------------- Buy / sell / delivery ---------------- */
.ap-price{
  font-size: clamp(26px, 4vw, 36px); font-weight: 800; color: var(--gold-bright);
  margin: 6px 0 4px;
}
.ap-motto{ color: var(--text-light-dim); font-size: 15px; margin-top: 8px; }
.ap-chips{ display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 6px; }
.ap-chips button{
  padding: 10px 18px; border-radius: var(--radius);
  background: transparent; color: var(--text-light);
  border: 1px solid var(--line-dark); font-weight: 700; font-size: 14.5px;
  transition: border-color var(--speed), color var(--speed), background var(--speed);
}
.ap-chips button:hover, .ap-chips button:focus-visible{ border-color: var(--gold-bright); color: var(--gold-bright); }
.ap-total{
  margin: 22px 0 8px; padding: 16px 18px; border-radius: 6px;
  background: rgba(212,175,55,0.08); border: 1px solid var(--line-dark);
  font-weight: 700; color: var(--text-light);
}
.ap-field{ display: grid; gap: 8px; margin-top: 16px; }
.ap-field label{ font-size: 14px; font-weight: 700; color: var(--text-light-dim); }
.ap-pay{ display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding: 0; list-style: none; }
.ap-pay li{
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-dark); color: var(--text-light-dim);
}
.ap-refresh{
  background: transparent; border: none; color: var(--gold-bright);
  font-weight: 700; font-size: 14px; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px;
}
.ap-ship{ font-size: 20px; color: var(--gold-bright); font-weight: 700; margin-top: 18px; }

/* ---------------- News ---------------- */
.ap-news{ display: grid; gap: 22px; }
.ap-news article{ padding-bottom: 22px; border-bottom: 1px solid var(--line-light); }
.ap-news article:last-child{ border-bottom: none; }
.ap-news h3{ font-size: 20px; }
.ap-news .date{ margin-top: 4px; font-size: 13px; color: var(--bronze); font-weight: 700; }
.ap-news p{ margin-top: 10px; color: var(--text-dim); }

/* ---------------- Invite ---------------- */
.ap-copybox{
  display: flex; gap: 10px; align-items: stretch; margin-top: 12px;
}
.ap-copybox input{ flex: 1; min-width: 0; }
.ap-copybox .btn{ width: auto; margin-top: 0; }
.ap-steps{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ap-step{
  background: var(--parchment); border: 1px solid var(--line-light);
  border-radius: 6px; padding: 24px 22px;
}
.ap-step .n{
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--bronze); color: var(--bronze);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 14px;
}
.ap-step h4{ font-size: 16.5px; margin-bottom: 6px; }
.ap-step p{ font-size: 14.5px; color: var(--text-dim); }
.ap-msg{ font-size: 14px; min-height: 20px; margin-top: 10px; color: var(--up); }

@media (max-width: 980px){
  .ap-tiles{ grid-template-columns: 1fr 1fr; }
  .ap-steps{ grid-template-columns: 1fr; }
}
@media (max-width: 560px){
  .ap-section{ padding: 40px 0 56px; }
  .ap-card{ padding: 26px 20px; }
  .ap-tiles{ grid-template-columns: 1fr; }
  .ap-copybox{ flex-direction: column; }
  .ap-copybox .btn{ width: 100%; }
}

/* Signed-in header carries six links, so it collapses to the burger earlier than the public one. */
.nav__links--app{ gap: 18px; }
@media (max-width: 1180px){
  .nav__links--app{ display: none; }
  .nav__burger{ display: flex; }
}

@media (max-width: 560px){
  .nav__actions--app > .btn{ display: none; }
  .nav__actions{ gap: 10px; }
}

/* ==========================================================================
   Phase 2: PHP account pages (dashboard, orders, savings, account, messages)
   ========================================================================== */
.ap-card textarea{
  width: 100%;
  background: var(--parchment);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 13px 14px;
  color: var(--text-dark);
  font-family: inherit; font-size: 15px; text-align: start; resize: vertical;
}
.ap-card--dark textarea{ background: var(--ink-2); border-color: var(--line-dark); color: var(--text-light); }
.ap-card textarea:focus{ outline: none; border-color: var(--gold); }
.ap-card textarea::placeholder{ color: var(--text-dim); opacity: .75; }
.ap-card--dark textarea::placeholder{ color: var(--text-light-dim); opacity: .7; }

.ap-flash{
  padding: 14px 16px; border-radius: 6px; font-size: 15px; font-weight: 600; margin-bottom: 18px;
  border: 1px solid transparent;
}
.ap-flash--ok{ background: rgba(78,122,81,.16); border-color: rgba(78,122,81,.5); color: #9bd39f; }
.ap-flash--err{ background: rgba(163,75,60,.16); border-color: rgba(163,75,60,.5); color: #e6a396; }
.ap-card:not(.ap-card--dark) .ap-flash--ok{ color: #2f5c33; }
.ap-card:not(.ap-card--dark) .ap-flash--err{ color: #8a3524; }

.ap-note{ margin-top: 14px; font-size: 13.5px; color: var(--text-dim); line-height: 1.6; }
.ap-card--dark .ap-note{ color: var(--text-light-dim); }
.ap-h2{ font-size: 22px; margin: 38px 0 14px; }
.ap-empty{
  padding: 26px 20px; text-align: center; color: var(--text-dim);
  border: 1px dashed var(--line-light); border-radius: 6px;
}
.ap-two{ display: grid; grid-template-columns: 1.15fr 1fr; gap: 26px; align-items: start; }
.ap-list{ margin: 6px 0 0; padding-inline-start: 22px; display: grid; gap: 12px; color: var(--text-dim); font-size: 15px; line-height: 1.65; }
.ap-price-row{
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--line-dark); font-size: 15px; color: var(--text-light-dim);
}
.ap-price-row b{ color: var(--gold-bright); font-size: 20px; }
.ap-card--dark form .ap-label{ margin-top: 6px; }
.ap-kv{ margin: 0; display: grid; gap: 0; }
.ap-kv > div{ display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-light); }
.ap-kv dt{ color: var(--text-dim); font-size: 14px; }
.ap-kv dd{ margin: 0; font-weight: 700; text-align: end; overflow-wrap: anywhere; }
.ap-notice{ display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ap-notice__main{ flex: 1; min-width: 180px; }
.ap-notice__date{ font-size: 13px; color: var(--text-dim); font-weight: 400; }
.ap-total b{ color: var(--gold-bright); }
@media (max-width: 980px){ .ap-two{ grid-template-columns: 1fr; } }

.ap-flash--info{ background: rgba(212,175,55,.12); border-color: rgba(212,175,55,.45); color: var(--gold-bright); }
.ap-card:not(.ap-card--dark) .ap-flash--info{ color: #7a5c18; }

/* ---------------- Accepted payment methods (information only, not clickable) ---------------- */
.ap-accept{ margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-dark); }
.ap-accept__label{ font-size: 13px; font-weight: 700; color: var(--text-light-dim); letter-spacing: .04em; text-transform: uppercase; }
.ap-accept__list{ display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.ap-accept__list li{
  display: flex; align-items: center; justify-content: center;
  height: 42px; min-width: 64px; padding: 0 14px;
  border: 1px solid var(--line-dark); border-radius: 6px;
  color: var(--text-light-dim);
  pointer-events: none; user-select: none; cursor: default;
}
.ap-accept__list svg{ display: block; height: 22px; width: auto; max-width: 64px; fill: currentColor; }
.ap-accept__list li[title="American Express"] svg{ height: 32px; }
.ap-accept__list li[title="Apple Pay"] svg{ height: 28px; }
.ap-accept__list li[title="Mastercard"] svg{ height: 26px; }

/* Gold price freshness line */
.ap-updated{ margin: 6px 0 0; font-size: 12.5px; color: var(--text-light-dim); }

/* Buy price / Sell price / Market price box */
.ap-prices{ margin: 0 0 6px; }
.ap-prices__row{ display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--line-dark); border-radius: 8px; }
.ap-prices__row b{ font-size: 20px; white-space: nowrap; }
.ap-prices__label small{ display: block; margin-top: 2px; font-size: 12.5px; color: var(--text-light-dim); }
.ap-prices__row--active{ border-color: var(--gold-bright); background: rgba(212,175,55,.08); }
.ap-prices__row--active b{ color: var(--gold-bright); }
.ap-prices__row--market{ border-style: dashed; color: var(--text-light-dim); }
.ap-prices__row--market b{ font-size: 16px; }
.ap-prices__why{ margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-light-dim); }
.ap-prices__why strong{ color: var(--text-light); }
.ap-tile b{ overflow-wrap: anywhere; }
.ap-price-row + .ap-prices{ margin-top: 14px; }
