/* Sign in, register, checkout, legal pages and the buyer account, drawn in the Biply Market design.
   pages-base.css holds the older component rules (scoped to .pg); this file maps them onto the design's tokens and shapes.
   Nothing here touches the storefront pages. */

/* the older templates and their inline styles still ask for these names */
:root {
  --surface: #fff; --surface2: #f5f5f7; --mute: #6e6e73; --edge: transparent;
  --good-soft: rgba(18, 128, 92, .1); --warn: #a65b0b; --warn-soft: rgba(166, 91, 11, .12); --bad: #c0301f; --bad-soft: rgba(192, 48, 31, .1);
  --body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --display: var(--body);
}

.pg {
  --bg: #fbfbfd; --surface: #fff; --surface2: #f5f5f7; --line: rgba(0, 0, 0, .08); --edge: transparent;
  --ink: #1d1d1f; --mute: #6e6e73;
  --accent: #5546ff; --accent-ink: #fff; --accent-soft: #f0eefc;
  --good: #12805c; --good-soft: rgba(18, 128, 92, .1);
  --display: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --body: var(--display);
  --shadow: 0 30px 70px -40px rgba(20, 20, 60, .28);
  font-family: var(--body); font-size: 15px; line-height: 1.5; color: var(--ink);
  min-height: 60vh; padding: 56px 0 8px;
}
.pg-in { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.pg h1, .pg h2, .pg h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.pg :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.pg a:not(.btn) { color: inherit; }
.pg .plain, .pg .hint a, .pg .sub a { color: var(--accent); font-weight: 500; }
.pg .plain:hover { text-decoration: underline; }

/* ---------- cards ---------- */
.pg .card, .pg .pcard {
  display: block; overflow: visible; transform: none; transition: none; position: relative;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow); -webkit-backdrop-filter: none; backdrop-filter: none;
}
.pg .card::before, .pg .card::after, .pg .pcard::before { display: none; }
.pg .card:hover { transform: none; box-shadow: var(--shadow); }
.pg .card.pad { padding: 36px; }
.pg .card.pad h3.t, .pg .card h3.t { font-size: 20px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 4px; }
.pg .card .s { font-size: 14px; color: var(--muted); margin-bottom: 16px; }

/* ---------- buttons ---------- */
.pg .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 26px; min-width: 0;
  border-radius: 999px; border: 1px solid rgba(0, 0, 0, .14); background: transparent; color: var(--ink);
  font-size: 15px; font-weight: 500; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible; position: static;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.pg .btn::after { display: none; }
.pg .btn:hover { background: var(--panel-2); border-color: rgba(0, 0, 0, .14); box-shadow: none; filter: none; }
.pg .btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; box-shadow: 0 14px 30px -12px rgba(85, 70, 255, .7); }
.pg .btn.pri:hover { background: #4638e8; border-color: #4638e8; box-shadow: 0 14px 30px -12px rgba(85, 70, 255, .7); }
.pg .btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: none; }
.pg .btn.dark:hover { background: #000; }
.pg .btn.sm { height: 36px; padding: 0 16px; font-size: 13px; }
.pg .btn.lg { height: 56px; padding: 0 32px; font-size: 16px; }
.pg .btn.danger { color: var(--bad); }
.pg .btn[disabled], .pg .btn.is-busy { opacity: .5; cursor: not-allowed; }
.pg .btn.lg.pri { width: auto; }
.pg .narrow .btn.pri, .pg .narrow .btn.lg { width: 100%; }
.pg .linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; }
.pg .linkbtn:hover { text-decoration: underline; }

/* ---------- forms ---------- */
.pg .fld { display: grid; gap: 8px; margin-bottom: 18px; }
.pg .fld label, .pg label.l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pg .in, .pg select.in, .pg textarea.in {
  width: 100%; height: 50px; padding: 0 16px; background: #fff; color: var(--ink); font: inherit; font-size: 15px;
  border: 1px solid rgba(0, 0, 0, .16); border-radius: 14px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: border-color .2s, box-shadow .2s;
}
.pg textarea.in { height: auto; padding: 14px 16px; line-height: 1.5; }
.pg .in:hover { border-color: rgba(0, 0, 0, .3); }
.pg .in:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(85, 70, 255, .16); background: #fff; }
.pg .hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pg input[type="checkbox"], .pg input[type="radio"] { accent-color: var(--accent); }
.pg .field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; align-items: start; }
.pg .opt-tag { font-weight: 600; color: #4a3bd9; background: var(--accent-soft); border-radius: 999px; padding: 2px 10px; font-size: 11px; margin-left: 6px; }

/* ---------- notices ---------- */
.pg .flash { border-radius: 18px; padding: 14px 18px; margin: 0 0 20px; font-size: 14px; font-weight: 500; border: 1px solid transparent; }
.pg .flash.ok { background: rgba(18, 128, 92, .09); color: var(--good); border-color: rgba(18, 128, 92, .2); }
.pg .flash.err { background: var(--bad-soft); color: var(--bad); border-color: rgba(192, 48, 31, .2); }
.pg .notice { background: var(--panel); border: 0; border-radius: 20px; padding: 18px 20px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.pg .notice b { color: var(--ink); }
.pg .warnbox, .pg .warn { background: var(--warn-soft); border: 0; border-radius: 20px; color: var(--ink-2); }
.pg .pill { border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 600; box-shadow: none; }

/* ---------- sign in and register ---------- */
.pg .narrow { max-width: 480px; margin: 0 auto; }
.pg .narrow h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 10px; }
.pg .narrow p.sub, .pg .psub, .pg .sub { color: var(--ink-2); font-size: 16px; line-height: 1.5; margin-bottom: 26px; }

/* ---------- legal pages ---------- */
.pg .legal { max-width: 800px; margin: 0 auto; padding: clamp(28px, 5vw, 56px); }
.pg .legal h1 { font-size: clamp(34px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -.045em; margin-bottom: 8px; }
.pg .legal .upd { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.pg .prose { color: var(--ink-2); max-width: 70ch; font-size: 16px; line-height: 1.65; }
.pg .prose p { margin: 0 0 14px; }
.pg .prose h2 { font-size: 24px; letter-spacing: -.03em; margin: 34px 0 10px; color: var(--ink); }
.pg .prose ul { padding-left: 22px; display: grid; gap: 8px; margin: 0 0 14px; }
.pg .prose a { color: var(--accent); font-weight: 500; }

/* ---------- tables ---------- */
.pg table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pg th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pg td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.pg tr:last-child td { border-bottom: 0; }

@media (max-width: 640px) {
  .pg { padding-top: 32px; }
  .pg .card.pad { padding: 26px 22px; }
}
