.membership-page { max-width: 1120px; margin: auto; padding: 32px 20px; color: #10304b; }
.membership-benefits, .membership-grid article { background: #f0f7ff; border: 1px solid #d7e5f4; border-radius: 14px; padding: 20px; }
.membership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 16px; margin: 20px 0 32px; }
.membership-grid a { display: inline-block; background: #235ee7; color: white; border-radius: 8px; padding: 10px 14px; text-decoration: none; }
.membership-plans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.membership-grid .membership-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: white;
  color: #14243a;
  border: 2px solid #dbe5ef;
}
.membership-card h3 { margin: 0 0 8px; color: inherit; }
.membership-card strong { font-size: 1.25rem; }
.membership-card small { color: #485970; }
.membership-card ul { margin: 14px 0; padding-left: 18px; }
.membership-card li { margin-bottom: 6px; }
.membership-card a, .membership-card button { margin-top: auto; }
.membership-card button { background: #e8f1ff; color: #123661; border: 0; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.membership-grid .membership-card.recommended, .membership-grid .membership-card.is-selected { border-color: #235ee7; }
.membership-card.is-selected button { background: #235ee7; color: white; }
@media (max-width: 760px) {
  .membership-plans { grid-template-columns: 1fr; }
}
.membership-payment-dialog {
  box-sizing: border-box;
  width: min(720px, calc(100% - 24px));
  max-height: 90dvh;
  padding: 20px;
  border: 1px solid #dbe5ef;
  border-radius: 16px;
  background: white;
  color: #14243a;
  text-align: left;
}
.membership-payment-dialog::backdrop { background: rgb(15 23 42 / 55%); }
.membership-payment-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.membership-payment-heading h2 { margin: 0; }
.membership-payment-methods { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.membership-payment-dialog button { border: 1px solid #cbdcf4; background: #edf5ff; color: #14243a; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.membership-payment-dialog button[aria-pressed="true"] { background: #235ee7; color: white; }
.membership-payment-dialog iframe { width: 100%; height: min(56dvh, 610px); border: 1px solid #dbe5ef; border-radius: 10px; }
.membership-payment-dialog [hidden] { display: none !important; }

.membership-payment-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  max-height: 90dvh;
  overflow: auto;
  box-shadow: 0 20px 60px rgb(15 23 42 / 30%);
}
.membership-payment-heading {
  position: sticky;
  top: 0;
  background: white;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e9f3;
}
#membershipPaymentPlan { padding: 12px; border-radius: 10px; background: #eff6ff; }

.membership-hero {
  padding: 64px 20px 60px;
  text-align: center;
  color: #fff;
  background: linear-gradient(rgb(15 23 42 / 72%), rgb(15 23 42 / 88%)),
    url("https://images.unsplash.com/photo-1556740758-90de374c12ad?auto=format&fit=crop&w=1920&q=80") center / cover no-repeat #14243a;
}
.membership-hero-text { max-width: 760px; margin: 0 auto; }
.member-status-line { display: inline-block; margin-top: 16px !important; padding: 8px 14px; border-radius: 10px; background: rgb(255 255 255 / 16%); border: 1px solid rgb(255 255 255 / 30%); font-weight: 600; }
.membership-hero span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #60a5fa;
  border-radius: 30px;
  color: #bfdbfe;
  font-size: .78rem;
  font-weight: 700;
}
.membership-hero h1 {
  margin: 18px auto 12px;
  color: #fff;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
}
.membership-hero p { max-width: 620px; margin: auto; color: #e2e8f0; line-height: 1.65; }
.membership-history-scroll { overflow-x: auto; margin-top: 16px; }
.membership-history-scroll table { width: 100%; min-width: 600px; border-collapse: collapse; }
.membership-history-scroll th, .membership-history-scroll td {
  padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #dbe5ef;
  overflow-wrap: anywhere;
}
.membership-history-scroll th { background: #edf5ff; }
.ad-upgrade-options { grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); }
.ad-upgrade-options label { cursor: pointer; }
.ad-upgrade-options label:has(input:checked) { outline: 2px solid #235ee7; }

/* v161: plan buttons that cannot be chosen */
.membership-card button:disabled{background:#f1f5f9;color:#64748b;border-color:#e2e8f0;cursor:not-allowed;opacity:1}

/* v163 – account membership tab */
.plan-summary { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 18px 20px; border-radius: 14px; background: linear-gradient(135deg, #eff6ff, #f8fbff); border: 1px solid #cfe0f7; margin-bottom: 14px; }
.plan-summary.is-paid { background: linear-gradient(135deg, #1d4ed8, #2563eb); border-color: #1d4ed8; color: #fff; }
.plan-summary h3 { margin: 2px 0 0; font-size: 1.5rem; }
.plan-summary-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.plan-summary-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.plan-summary-stats div { background: rgb(255 255 255 / 70%); color: #10304b; border-radius: 10px; padding: 8px 14px; min-width: 88px; text-align: center; }
.plan-summary.is-paid .plan-summary-stats div { background: rgb(255 255 255 / 16%); color: #fff; }
.plan-summary-stats b { display: block; font-size: 1.1rem; }
.plan-summary-stats span { font-size: .75rem; opacity: .85; }
.plan-hint { color: #52637a; font-size: .9rem; margin: 6px 0 0; }
.membership-grid .membership-card { position: relative; text-align: left; transition: border-color .15s, box-shadow .15s; }
.membership-grid .membership-card.is-selected { box-shadow: 0 6px 20px rgb(35 94 231 / 18%); }
.membership-grid .membership-card.is-current { border-color: #16a34a; }
.membership-grid .membership-card.is-current.is-selected { border-color: #16a34a; box-shadow: 0 6px 20px rgb(22 163 74 / 16%); }
.membership-grid .membership-card.is-locked:not(.is-current) { opacity: .62; background: #f6f8fb; }
.plan-price { margin: 2px 0 6px; }
.plan-price strong { font-size: 1.7rem; color: #0f2a4a; }
.plan-price small { margin-left: 6px; }
.membership-card ul.plan-perks { list-style: none; padding: 0; margin: 12px 0 18px; width: 100%; }
.plan-perks li { position: relative; padding-left: 24px; margin-bottom: 8px; font-size: .92rem; }
.plan-perks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 17px; height: 17px; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: .7rem; font-weight: 700; text-align: center; line-height: 17px; }
.plan-badge { position: absolute; top: -11px; right: 14px; background: #f59e0b; color: #fff; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.membership-card button { width: 100%; font-weight: 600; }
.membership-card button:disabled { background: #eef2f6; color: #6b7a8d; cursor: not-allowed; }
.membership-card.is-current button:disabled { background: #dcfce7; color: #15803d; }
.membership-card.is-selected button:not(:disabled) { background: #235ee7; color: #fff; }
.plan-details { margin: 14px 0 4px; font-weight: 600; color: #10304b; }
.plan-status { margin: 0 0 12px; color: #52637a; min-height: 1.2em; }

/* payment history */
.membership-history-scroll table { min-width: 640px; border: 1px solid #dbe5ef; border-radius: 12px; overflow: hidden; font-size: .9rem; }
.membership-history-scroll th { white-space: nowrap; text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: #52637a; background: #f3f7fc; }
.membership-history-scroll td { vertical-align: top; border-top: 1px solid #e8eef6; }
.membership-history-scroll td.ph-nowrap { white-space: nowrap; }
.ph-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.ph-badge.ok { background: #dcfce7; color: #166534; }
.ph-badge.wait { background: #fef3c7; color: #92400e; }
.ph-badge.bad { background: #fee2e2; color: #991b1b; }
.ph-badge.info { background: #dbeafe; color: #1e40af; }
.ph-badge.off { background: #e5e7eb; color: #4b5563; }
.ph-note { display: block; margin-top: 4px; color: #64748b; font-size: .8rem; }
.ph-ref { font-family: ui-monospace, monospace; font-size: .8rem; color: #64748b; cursor: copy; background: none; border: 0; padding: 0; }
@media (max-width: 640px) { .plan-summary-stats div { min-width: 70px; padding: 6px 10px; } }

/* public membership page */
.membership-grid a { font-weight: 600; width: 100%; text-align: center; box-sizing: border-box; margin-top: auto; }
.membership-grid a:hover { background: #1b4fc4; }
.membership-card.recommended { box-shadow: 0 10px 28px rgb(35 94 231 / 16%); }
.plan-state { display: block; width: 100%; box-sizing: border-box; margin-top: auto; text-align: center; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.plan-state.current { background: #dcfce7; color: #15803d; }
.plan-state.locked { background: #eef2f6; color: #6b7a8d; }
.membership-benefits { background: #eff6ff; text-align: center; }
.membership-benefits h2 { margin: 0 0 6px; font-size: 1.15rem; }
.membership-benefits p { margin: 0; color: #38506b; }
.section-title { margin: 8px 0 4px; }
.section-sub { margin: 0 0 4px; color: #52637a; }
.upgrade-grid article { background: #fff !important; position: relative; }
.upgrade-grid h3 { margin: 8px 0 6px; }
.upgrade-grid strong { color: #1d4ed8; }
.upgrade-grid p { margin: 8px 0 0; color: #52637a; font-size: .92rem; }
.up-icon { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: #e0ecff; font-size: 1.3rem; }
#membershipCheckout[hidden]{display:none}

/* payment history cards (v259) */
.pc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pc-chip { padding: 6px 14px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #334155; font-size: .82rem; font-weight: 600; cursor: pointer; }
.pc-chip.on { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.pc-list { display: grid; gap: 12px; }
.pc-card { background: #fff; border: 1px solid #e2e8f0; border-left: 5px solid #94a3b8; border-radius: 0 14px 14px 0; padding: 14px 16px; }
.pc-card[hidden] { display: none; }
.pc-action { border-left-color: #d97706; } .pc-pending { border-left-color: #2563eb; }
.pc-approved { border-left-color: #16a34a; } .pc-declined { border-left-color: #dc2626; } .pc-off { border-left-color: #94a3b8; }
.pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pc-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-icon { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.pc-names { display: flex; flex-direction: column; min-width: 0; } .pc-names strong { font-size: .98rem; } .pc-names span { color: #64748b; font-size: .86rem; overflow-wrap: anywhere; }
.pc-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; } .pc-right strong { font-size: 1.05rem; }
.pc-note { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: .88rem; }
.pc-note.pc-msg { background: #fef2f2; color: #7f1d1d; }
.pc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #64748b; font-size: .82rem; }
.pc-btn { padding: 8px 14px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #1e293b; font-weight: 700; font-size: .85rem; cursor: pointer; }
.pc-btn.pc-primary { background: #235ee7; border-color: #235ee7; color: #fff; }
@media (max-width: 480px) { .pc-card { padding: 12px; } .pc-foot { align-items: stretch; } .pc-btn { width: 100%; } }
.pc-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 14px; }
.pc-pager[hidden] { display: none; }
.pc-pager .pc-btn:disabled { opacity: .45; cursor: default; }
.pc-page { color: #475569; font-size: .85rem; font-weight: 600; }
@media (max-width: 480px) { .pc-pager .pc-btn { width: auto; } }

.pv-box{border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:14px 16px;margin:0 0 18px}
.pv-head{display:flex;align-items:center;gap:10px;margin:0 0 6px;font-size:14px}
.pv-tag{border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700}
.pv-tag.ok{background:#dcfce7;color:#166534}.pv-tag.no{background:#fef3c7;color:#92400e}
.pv-p{font-size:13px;color:#475569;line-height:1.55;margin:0 0 10px}
.pv-row{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 6px}
.pv-row input{flex:1;min-width:140px;max-width:220px;border:1.5px solid #cbd5e1;border-radius:8px;padding:9px 12px;font-size:16px;letter-spacing:3px;text-align:center}
.pv-btn{border:0;background:#2563eb;color:#fff;font-weight:700;font-size:13.5px;border-radius:8px;padding:9px 18px;cursor:pointer}
.pv-btn:disabled{opacity:.6;cursor:default}
.pv-link{border:0;background:none;color:#2563eb;font-size:13px;cursor:pointer;padding:4px 0}
.pv-link:disabled{color:#94a3b8;cursor:default}
.pv-note{font-size:13px;font-weight:600;margin:8px 0 0}.pv-note.bad{color:#b91c1c}.pv-note.good{color:#166534}

/* View receipt: soft orange, solid orange + lift on hover */
.pc-btn.pc-receipt { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: #fff7ed; color: #c2410c; border: 1.5px solid #fdba74; transition: background-color .25s, color .25s, border-color .25s, box-shadow .25s, transform .2s; }
.pc-receipt svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; transition: transform .3s; }
.pc-btn.pc-receipt:hover { background: #ea580c; border-color: #ea580c; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(234,88,12,.35); }
.pc-btn.pc-receipt:hover svg { transform: scale(1.2); }
.pc-btn.pc-receipt:active { transform: scale(.97); }
.pc-btn.pc-receipt:focus-visible { outline: 3px solid rgba(234,88,12,.35); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pc-btn.pc-receipt, .pc-receipt svg { transition: none; } .pc-btn.pc-receipt:hover { transform: none; } }

/* Phone verified card: green tick circle with a green edge */
.pv-box.pv-ok { border-left: 4px solid #16a34a; }
.pv-okrow { display: flex; align-items: center; gap: 14px; }
.pv-ck { width: 42px; height: 42px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; flex: none; }
.pv-ck svg { width: 22px; height: 22px; fill: none; stroke: #16a34a; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.pv-okt { font-size: 15px; font-weight: 800; color: #0f172a; }
.pv-okt .pv-tag { margin-left: 6px; vertical-align: 1px; }
.pv-oks { font-size: 13px; color: #64748b; margin-top: 2px; }

/* Locked (verified) phone number box */
#profPhone.pv-locked, #phoneChangeCard input.pv-locked, #changeEmailForm #currentEmail { background: #e8edf3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='11' width='14' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 018 0v3'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; color: #64748b; border-color: #d4dbe4; cursor: not-allowed; padding-right: 42px; }

/* v325: Account Actions buttons (calm: Log Out grey, only Delete is red) */
.acc-act{padding:10px 20px;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer;transition:.2s;font-family:inherit}
.acc-act-out{background:#fff;color:#475569;border:1px solid #e2e8f0}
.acc-act-out:hover{background:#f1f5f9;color:#0f172a;border-color:#94a3b8}
.acc-act-del{background:#fff;color:#dc2626;border:1px solid #fecaca;font-weight:800}
.acc-act-del:hover{background:#dc2626;color:#fff;border-color:#dc2626}
.acc-act:disabled{opacity:.5;cursor:wait}
.pv-chg{margin-top:12px}.pv-chg .pv-row input{max-width:160px}

/* Phone boxes that can be typed in: soft tint, clearer placeholder */
#profPhone:not(.pv-locked), #newPhoneInput { background: #f8fafc; }
#profPhone::placeholder, #newPhoneInput::placeholder { color: #64748b; opacity: 1; }

/* v348: six-box code in Profile */
.pv-num{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700;color:#0f172a;margin:0 0 12px}
.pv-otp{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;max-width:400px;margin:0 0 14px}
.pv-otp input{height:52px;width:100%;box-sizing:border-box;text-align:center;font-size:21px;font-weight:800;border:1px solid #cbd5e1;border-radius:12px;background:#fff;padding:0;color:#0f172a;outline:none;font-family:inherit}
.pv-otp input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.12)}
.pv-otp input.f{border-color:#93c5fd;background:#eff6ff}
.pv-otp.bad input{border-color:#fca5a5;background:#fef2f2;animation:pvShake .35s}
@keyframes pvShake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
.pv-row2{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.pv-note{border-radius:10px;padding:9px 12px;margin-top:12px}
.pv-note.good{background:#f0fdf4}.pv-note.bad{background:#fef2f2}
@media(max-width:420px){.pv-otp{gap:6px}.pv-otp input{height:46px;font-size:19px}.pv-row2 .pv-btn{width:100%}}

/* Dealer plan: Business page highlight, and the set-up prompt for current dealers */
.plan-biz{display:flex;align-items:flex-start;gap:12px;position:relative;margin:14px 0 4px;padding:12px;border:1px solid #86efac;background:#f0fdf4;border-radius:14px;text-align:left}
.plan-biz .biz-ic,.biz-prompt .biz-ic{flex:none;width:40px;height:40px;border-radius:11px;background:#16a34a;color:#fff;display:grid;place-items:center}
.plan-biz .biz-tx{min-width:0}.plan-biz b{display:block;font-size:.95rem;color:#166534}.plan-biz .biz-tx span{display:block;font-size:.82rem;line-height:1.4;color:#15803d;margin-top:2px}
.plan-biz em{position:absolute;top:-10px;right:12px;font-style:normal;background:#16a34a;color:#fff;font-size:.68rem;font-weight:700;padding:3px 9px;border-radius:999px}
.biz-prompt{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:14px 0;padding:14px 16px;border-radius:14px;border:1px solid}
.biz-prompt.warn{background:#fffbeb;border-color:#fcd34d}.biz-prompt.warn .biz-ic{background:#f59e0b}
.biz-prompt.ok{background:#f0fdf4;border-color:#bbf7d0}
.biz-prompt[hidden]{display:none}
.biz-prompt .biz-tx{flex:1;min-width:180px}.biz-prompt .biz-tx b{display:block;font-size:.98rem;color:#0f172a}.biz-prompt .biz-tx span{display:block;font-size:.85rem;color:#475569;margin-top:2px}
.biz-acts{display:flex;gap:10px;flex-wrap:wrap}
.biz-btn{border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:10px;padding:10px 16px;min-height:42px;font:inherit;font-weight:700;font-size:.9rem;cursor:pointer;transition:background-color .18s,border-color .18s,transform .18s,box-shadow .18s}
.biz-btn.primary{background:#2563eb;border-color:#2563eb;color:#fff}
.biz-btn:active{transform:scale(.97)}
@media(hover:hover){.biz-btn:hover{transform:translateY(-2px);box-shadow:0 8px 16px rgba(15,23,42,.14)}.biz-btn.primary:hover{background:#1d4ed8}}
@media(max-width:600px){.biz-acts{width:100%}.biz-acts .biz-btn{flex:1}}
.pv-btn{transition:transform .15s ease,background-color .15s ease,box-shadow .15s ease}
@media(hover:hover){.pv-btn:hover:not(:disabled){background:#1d4ed8;transform:translateY(-1px);box-shadow:0 6px 14px rgba(37,99,235,.28)}}
.pv-btn:active:not(:disabled){transform:none;box-shadow:none}
.pv-btn:focus-visible{outline:3px solid rgba(37,99,235,.35);outline-offset:2px}
