/* ============================================================
   Wessex Mint Live — Account shell
   Shared styles for Account hub + sub-pages.
   Reuses tokens from each page; only defines net-new component
   classes that don't exist elsewhere.
   ============================================================ */

/* Tokens used: --bg-base, --bg-panel, --bg-panel-2, --gold,
   --gold-bright, --gold-soft, --blue, --red, --green, --line,
   --line-strong, --serif, --sans, --pad-x, --max-w, --focus,
   --text, --text-mute, --text-dim */

/* ── Account hub (mobile index) ───────────────────────── */
.acct-page-title { padding: 28px var(--pad-x) 24px; max-width: var(--max-w); margin: 0 auto; display: flex; align-items: center; gap: 16px; }
.acct-page-title .av { width: 48px; height: 48px; border-radius: 50%; background: var(--gold-soft); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 20px; }
.acct-page-title .nm { font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.1; }
.acct-page-title .em { font-size: 13px; color: var(--text-mute); margin-top: 4px; }

.acct-list { max-width: var(--max-w); margin: 0 auto; }
.acct-list-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 14px var(--pad-x); border-top: 1px solid var(--line); color: var(--text); text-decoration: none; transition: background .12s; }
.acct-list-row:hover { background: var(--bg-panel-2); }
.acct-list-row:last-child { border-bottom: 1px solid var(--line); }
.acct-list-row svg.ic { width: 20px; height: 20px; stroke: var(--text-mute); stroke-width: 1.6; fill: none; flex-shrink: 0; }
.acct-list-row .lbl { flex: 1; font-size: 14px; }
.acct-list-row .hint { font-size: 12px; color: var(--text-mute); }
.acct-list-row .chev { width: 14px; height: 14px; stroke: var(--text-mute); stroke-width: 1.6; fill: none; }
.acct-list-row.danger { color: var(--red); }
.acct-list-row.danger svg.ic { stroke: var(--red); }
.acct-list-divider { height: 8px; }

.acct-foot { text-align: center; padding: 40px var(--pad-x); color: var(--text-mute); font-size: 12px; line-height: 1.7; }
.acct-foot a { color: var(--gold); }

/* ── Account shell (sub-page two-column on desktop) ──── */
.acct-shell { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad-x) 64px; display: grid; grid-template-columns: 240px 1fr; gap: 40px; }
.acct-side { padding-top: 28px; position: sticky; top: 80px; align-self: start; }
.acct-side-h { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-mute); margin: 0 0 12px; padding: 0 14px; }
.acct-side a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: var(--text); text-decoration: none; font-size: 13px; border-left: 3px solid transparent; transition: background .12s, border-color .12s; }
.acct-side a svg { width: 16px; height: 16px; stroke: var(--text-mute); stroke-width: 1.6; fill: none; }
.acct-side a:hover { background: var(--bg-panel-2); }
.acct-side a.active { background: var(--bg-panel); border-left-color: var(--gold); font-weight: 500; }
.acct-side a.active svg { stroke: var(--gold); }
.acct-side .sep { height: 1px; background: var(--line); margin: 8px 14px; }
.acct-side a.danger { color: var(--red); }
.acct-side a.danger svg { stroke: var(--red); }

.acct-main { padding: 28px 0; max-width: 720px; }
.acct-main h1 { font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: .2px; margin: 0 0 6px; }
.acct-main .sublede { color: var(--text-mute); font-size: 13px; line-height: 1.6; margin: 0 0 28px; }

/* Mobile back row */
.acct-back { display: none; }

/* ── Cards ────────────────────────────────────────────── */
.acct-card { background: var(--bg-panel); border: 1px solid var(--line); padding: 18px 20px; margin-bottom: 14px; }
.acct-card h3 { font-family: var(--serif); font-size: 18px; font-weight: 400; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.acct-card .desc { font-size: 13px; color: var(--text-mute); line-height: 1.6; margin: 0 0 14px; }
.acct-card .field-row { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 8px 0; font-size: 13px; }
.acct-card .field-row .l { color: var(--text-mute); font-size: 12px; letter-spacing: .5px; }
.acct-card .field-row .v { color: var(--text); }
.acct-card .row-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

.acct-link { color: var(--gold); font-size: 13px; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }
.acct-link:hover { color: var(--gold-bright); }
.acct-link-danger { color: var(--red); font-size: 12px; background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit; }

.acct-mini-btn { background: transparent; color: var(--text); border: 1px solid var(--line-strong); padding: 7px 12px; font-size: 12px; cursor: pointer; border-radius: 2px; font-family: inherit; }
.acct-mini-btn:hover { border-color: var(--text); }
.acct-mini-btn.primary { background: var(--gold); color: #1a1a1c; border-color: var(--gold); }
.acct-mini-btn.primary:hover { background: var(--gold-bright); border-color: var(--gold-bright); }

/* ── Notifications: switch + notify-row ──────────────── */
.notify-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.notify-row:last-child { border-bottom: 0; }
.notify-row .text { flex: 1; }
.notify-row .text .lbl { font-size: 14px; line-height: 1.4; color: var(--text); }
.notify-row .text .sub { font-size: 12px; color: var(--text-mute); margin-top: 4px; line-height: 1.5; }
.notify-row .switch { flex-shrink: 0; }

.switch { position: relative; display: inline-block; width: 38px; height: 22px; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--line-strong); border-radius: 999px; transition: background .15s; }
.switch .slider::before { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .slider { background: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:focus-visible + .slider { outline: var(--focus); outline-offset: 2px; }

/* ── Payment methods cards ────────────────────────────── */
.pm-card { background: var(--bg-panel); border: 1px solid var(--line); padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; position: relative; }
.pm-brand { width: 44px; height: 28px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 3px; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #1a1a1c; }
.pm-brand--visa { background: linear-gradient(135deg, #1a1f71 0%, #2a3186 100%); color: #fff; font-style: italic; }
.pm-brand--mc { background: #fff; color: #1a1a1c; position: relative; padding: 0; }
.pm-brand--mc::before, .pm-brand--mc::after { content: ''; position: absolute; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; }
.pm-brand--mc::before { background: #eb001b; left: 8px; }
.pm-brand--mc::after { background: #f79e1b; left: 18px; mix-blend-mode: multiply; }
.pm-brand--amex { background: #006fcf; color: #fff; }
.pm-brand--paypal { background: #003087; color: #009cde; font-style: italic; }
.pm-info { flex: 1; min-width: 0; }
.pm-info .l1 { font-size: 14px; font-weight: 500; }
.pm-info .l2 { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.pm-default-pill { background: var(--gold-soft); color: #fff; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; flex-shrink: 0; }
.pm-actions { position: relative; }
.pm-action-btn { background: transparent; border: 0; width: 32px; height: 32px; cursor: pointer; color: var(--text-mute); border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; }
.pm-action-btn:hover { background: var(--bg-panel-2); color: var(--text); }
.pm-action-btn svg { width: 4px; height: 16px; }
.pm-popover { position: absolute; top: 100%; right: 0; margin-top: 4px; background: var(--bg-panel); border: 1px solid var(--line-strong); border-radius: 4px; min-width: 160px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.5); display: none; }
.pm-popover.show { display: block; }
.pm-popover button { display: block; width: 100%; text-align: left; background: transparent; border: 0; padding: 10px 14px; font-size: 13px; color: var(--text); cursor: pointer; font-family: inherit; }
.pm-popover button:hover { background: var(--bg-panel-2); }
.pm-popover button.danger { color: var(--red); }

.pm-add { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text); border: 1px dashed var(--line-strong); padding: 14px 18px; font-size: 13px; cursor: pointer; font-family: inherit; width: 100%; justify-content: center; transition: border-color .15s, color .15s; margin-top: 6px; }
.pm-add:hover { border-color: var(--gold); color: var(--gold); }
.pm-add svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.8; fill: none; }

.pm-empty { text-align: center; padding: 56px 24px; background: var(--bg-panel); border: 1px solid var(--line); }
.pm-empty .ic { width: 40px; height: 40px; margin: 0 auto 16px; color: var(--text-mute); }
.pm-empty .ic svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.4; fill: none; }
.pm-empty h3 { font-family: var(--serif); font-size: 22px; font-weight: 400; margin: 0 0 8px; }
.pm-empty p { color: var(--text-mute); font-size: 13px; margin: 0 0 20px; }

/* ── Orders ──────────────────────────────────────────── */
.order-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.order-chip { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer; color: var(--text); font-family: inherit; }
.order-chip.active { background: var(--text); color: var(--bg-base); border-color: var(--text); }
.order-chip:not(.active):hover { border-color: var(--line-strong); }

.order-card { background: var(--bg-panel); border: 1px solid var(--line); padding: 14px 16px; margin-bottom: 10px; }
.order-card .top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-mute); letter-spacing: .5px; margin-bottom: 8px; }
.order-card .nm { font-size: 14px; font-weight: 500; line-height: 1.3; }
.order-card .qty { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.order-card .live-from { font-size: 12px; color: var(--text-mute); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.order-card .live-from .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.order-card .bot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.order-card .bot .date { color: var(--text-mute); }
.order-card .bot a { color: var(--blue); text-decoration: none; }

.status-pill { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 2px; font-weight: 500; }
.status-pill--won { background: rgba(195,166,96,.15); color: var(--gold); }
.status-pill--shipped { background: rgba(58,124,184,.15); color: var(--blue); }
.status-pill--delivered, .status-pill--completed { background: rgba(94,143,93,.15); color: var(--green); }
.status-pill--cancelled { background: rgba(168,66,75,.15); color: var(--red); }

.order-empty { text-align: center; padding: 56px 24px; background: var(--bg-panel); border: 1px solid var(--line); }
.order-empty p { color: var(--text-mute); font-size: 14px; margin: 0 0 20px; }
.order-empty .acts { display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.order-card .view-details { color: var(--blue); font-size: 12px; text-decoration: none; }
.order-card .view-details:hover { text-decoration: underline; }

/* ── Account controls ────────────────────────────────── */
.ctrl-section h3 { font-family: var(--serif); font-size: 18px; font-weight: 400; margin: 0 0 4px; }
.ctrl-section .desc { font-size: 13px; color: var(--text-mute); margin: 0 0 14px; line-height: 1.6; }
.ctrl-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ctrl-row .label { font-size: 12px; color: var(--text-mute); letter-spacing: .5px; flex-shrink: 0; min-width: 90px; }
.ctrl-input-wrap { position: relative; flex: 1; max-width: 180px; }
.ctrl-input-wrap .prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-mute); font-size: 14px; pointer-events: none; }
.ctrl-input { background: var(--bg-base); border: 1px solid var(--line); color: var(--text); padding: 9px 12px 9px 26px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; border-radius: 2px; }
.ctrl-input:focus { outline: none; border-color: var(--gold-soft); }
.ctrl-progress { font-size: 12px; color: var(--text-mute); margin-top: 6px; }
.ctrl-progress strong { color: var(--text); font-weight: 500; }
.limit-block { margin-bottom: 14px; }
.limit-block:last-child { margin-bottom: 0; }
.limit-row { display: flex; align-items: center; gap: 10px; }
.limit-row .label { font-size: 12px; color: var(--text-mute); letter-spacing: .5px; flex-shrink: 0; min-width: 90px; text-transform: uppercase; }
.limit-summary { padding: 12px 14px; background: var(--bg-panel-2); border-left: 3px solid var(--gold); }
.limit-summary.reached { border-left-color: var(--text-mute); }
.limit-summary .row { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.limit-summary .label { font-size: 12px; color: var(--text-mute); letter-spacing: .5px; text-transform: uppercase; flex-shrink: 0; min-width: 70px; }
.limit-summary .amt { color: var(--text); flex: 1; }
.limit-summary .bar { height: 4px; background: rgba(255,255,255,.06); margin-top: 10px; overflow: hidden; border-radius: 2px; }
.limit-summary .bar i { display: block; height: 100%; background: var(--gold); transition: width .3s ease; }
.limit-summary.reached .bar i { background: var(--text-mute); }
.limit-summary .reached-msg { font-size: 12px; color: var(--text-mute); margin-top: 10px; line-height: 1.5; }
.ctrl-active { background: var(--bg-panel-2); border-left: 3px solid var(--gold); padding: 12px 14px; margin-top: 10px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ctrl-reached { color: var(--text-mute); font-size: 13px; padding: 12px 14px; background: var(--bg-panel-2); border-left: 3px solid var(--text-mute); margin-top: 10px; line-height: 1.5; }

/* ── Inline edit form ────────────────────────────────── */
.acct-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 6px; }
.acct-form-grid .full { grid-column: 1 / -1; }
.acct-form-field label { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-mute); margin-bottom: 6px; }
.acct-form-field input { width: 100%; box-sizing: border-box; background: var(--bg-base); border: 1px solid var(--line); color: var(--text); padding: 10px 12px; font-size: 14px; font-family: inherit; border-radius: 2px; }
.acct-form-field input:focus { outline: none; border-color: var(--gold-soft); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
  .acct-shell { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .acct-side { display: none; }
  .acct-main { padding: 16px var(--pad-x) 56px; max-width: none; }
  .acct-main h1 { font-size: 22px; }
  .acct-back { display: flex; align-items: center; gap: 8px; padding: 12px var(--pad-x); border-bottom: 1px solid var(--line); position: relative; }
  .acct-back a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
  .acct-back .ttl { position: absolute; left: 50%; transform: translateX(-50%); font-size: 14px; font-weight: 500; }
  .acct-form-grid { grid-template-columns: 1fr; }
  .acct-card .field-row { grid-template-columns: 1fr; gap: 4px; padding: 6px 0; }
  .acct-card .field-row .l { font-size: 11px; }
}
@media (max-width: 760px) {
  .acct-page-title { padding: 20px var(--pad-x); }
  .acct-page-title .nm { font-size: 18px; }
}

/* Brand logo (account-shell topbar + footer) */
.logo .brand-logo { height: 24px; width: auto; display: block; }
.footer .footer-brand .logo .brand-logo { height: 26px; }
@media (max-width: 760px) { .logo .brand-logo { height: 22px; } }
