:root { --vs-red:#EB000E; --vs-red-dark:#C4000C; --ds-page:#FAF7F5; --ds-raised:#F1ECE9; --ds-ink:#251F21; --ds-ink-2:#6E6568; --ds-ink-4:#C0BEBF; --ds-hairline:#E6E0DC; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--ds-page); color: var(--ds-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 60px; }
h1.pagetitle { font-size: 26px; letter-spacing: -0.02em; margin: 4px 0 6px; font-weight: 700; }
.fact { font-size: 13px; color: var(--ds-ink-2); margin: 0 0 10px; }
.intro { font-size: 15px; line-height: 22px; color: var(--ds-ink-2); margin: 0 0 18px; }
button { font: inherit; color: inherit; cursor: pointer; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 20px; }
.stat { background: var(--ds-raised); border-radius: 12px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat b { font-family: var(--ds-font-display, inherit); font-weight: 400; font-size: 24px; letter-spacing: -0.025em; color: var(--ds-ink); line-height: 1.1; }
.stat span { font-size: 11px; line-height: 14px; color: var(--ds-ink-2); }
.toolbar { position: sticky; top: 0; z-index: 5; background: var(--ds-page); padding: 10px 0 8px; margin: 0 0 8px; border-bottom: 1px solid var(--ds-hairline); }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--vs-red); border-radius: 14px; padding: 0 14px; height: 54px; color: var(--vs-red); box-shadow: 0 2px 10px rgba(235,0,14,.10); }
.search input::placeholder { color: var(--ds-ink-2); opacity: .85; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 16px; color: var(--ds-ink); height: 100%; }
.search:focus-within { box-shadow: 0 0 0 3px rgba(235,0,14,.25), 0 2px 10px rgba(235,0,14,.10); }
.clear { border: 0; background: var(--ds-ink-4, #c0bebf); color: #fff; width: 22px; height: 22px; border-radius: 50%; line-height: 20px; padding: 0; font-size: 16px; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex: none; border: 1px solid var(--ds-hairline); background: var(--ds-page); border-radius: 999px; padding: 7px 12px; font-size: 13px; line-height: 18px; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pill i { font-style: normal; font-size: 11px; color: var(--ds-ink-2); }
.pill.on { background: var(--ds-ink); border-color: var(--ds-ink); color: #fff; }
.pill.on i { color: #ddd; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ds-raised); border-radius: 10px; padding: 3px; margin-top: 10px; gap: 2px; }
.segbtn { border: 0; background: transparent; border-radius: 8px; padding: 7px 2px; font-size: 12px; line-height: 16px; min-width: 0; }
.segbtn.on { background: var(--ds-page); font-weight: 600; box-shadow: 0 1px 3px rgba(37,31,33,.14); }
.count-line { margin: 8px 0 0; font-size: 12px; color: var(--ds-ink-2); }
.cat { margin-top: 28px; }
.cat-head { margin: 0 0 4px; font-family: var(--ds-font-display, inherit); font-weight: 400; font-size: 24px; letter-spacing: -0.025em; display: flex; align-items: baseline; gap: 10px; }
.cat-head span { font-family: inherit; font-size: 12px; color: var(--ds-ink-2); background: var(--ds-raised); border-radius: 999px; padding: 2px 9px; letter-spacing: 0; }
.plan-block { margin-top: 16px; }
.plan-sub { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-ink-2); display: flex; align-items: center; gap: 8px; }
.plan-sub::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ds-ink-4, #c0bebf); }
.plan-sub.ACPlus::before { background: var(--vs-red); }
.plan-sub.TheftLoss::before { background: var(--ds-ink); }
.plan-sub.ProtectPlus::before { background: var(--ds-ink-4, #c0bebf); }
.plans { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (min-width: 768px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { border: 1px solid var(--ds-hairline); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.plan-name { font-weight: 600; font-size: 14px; line-height: 20px; min-width: 0; overflow-wrap: anywhere; }
.plan-price { flex: none; font-weight: 600; font-size: 16px; line-height: 20px; color: var(--vs-red); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--ds-raised); border-radius: 8px; padding: 4px 8px; font-size: 12px; line-height: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chip em { font-style: normal; color: var(--ds-ink-2); margin-right: 6px; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 14px; margin: 0 0 18px; border-bottom: 1px solid var(--ds-hairline); }
.brand-logo { height: 26px; width: auto; display: block; }
.brand-tag { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-ink-2); text-align: right; }

.viewseg { display: grid; grid-template-columns: 1fr 1fr; background: var(--ds-raised); border-radius: 12px; padding: 3px; gap: 2px; margin: 0 0 18px; }
.viewbtn { border: 0; background: transparent; border-radius: 9px; padding: 9px 4px; font-size: 14px; line-height: 18px; font-weight: 500; color: var(--ds-ink-2); }
.viewbtn.on { background: var(--ds-page); color: var(--ds-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(37,31,33,.16); }
.cust-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.cust-form .cat-head, .cust-list .cat-head { margin-bottom: 6px; }
.fld { display: flex; flex-direction: column; gap: 6px; }
.fld > span { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ds-ink-2); }
.fld > span i { font-style: normal; font-weight: 400; text-transform: none; letter-spacing: 0; }
.fld input { height: 46px; border: 1px solid var(--ds-hairline); border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--ds-ink); background: var(--ds-page); outline: none; min-width: 0; }
.fld input:focus { box-shadow: 0 0 0 2px var(--vs-red); border-color: transparent; }
.imei-row { display: flex; gap: 8px; }
.imei-row input { flex: 1; }
.scanbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ds-ink); background: var(--ds-ink); color: #fff; border-radius: 12px; padding: 0 14px; font-size: 14px; font-weight: 600; }
.scanmsg { font-style: normal; font-size: 12px; color: var(--ds-ink-2); }
.savebtn { height: 48px; border: 0; border-radius: 12px; background: var(--vs-red); color: #fff; font-size: 16px; font-weight: 600; }
.savebtn:active { background: var(--vs-red-dark); }
.savebtn:disabled { background: var(--ds-ink-4, #c0bebf); }
.formmsg { margin: 2px 0 0; font-size: 13px; color: var(--ds-ink-2); }
.formmsg.err { color: var(--vs-red-dark); }
.custs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cust-card { border: 1px solid var(--ds-hairline); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cust-date { flex: none; font-size: 12px; color: var(--ds-ink-2); white-space: nowrap; }
.delbtn { align-self: flex-start; border: 0; background: transparent; color: var(--vs-red-dark); font-size: 13px; padding: 0; }
.notebox { background: var(--ds-raised); border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 21px; color: var(--ds-ink-2); margin-top: 20px; }
.notebox b { color: var(--ds-ink); }
.closing { margin-top: 24px; font-size: 12px; color: var(--ds-ink-2); }
.cust-form form { display: flex; flex-direction: column; gap: 12px; }
.brand-logo { height: 26px; width: auto; display: block; }

/* admin + upload */
.adminbox .adminform{display:flex;flex-direction:column;gap:10px;margin-top:12px}
.adminbox input{height:46px;border:1px solid #E6E0DC;border-radius:12px;padding:0 12px;font-size:16px;background:#fff}
.ghostbtn{margin-top:10px;height:44px;padding:0 16px;border:1px solid #251F21;border-radius:12px;background:transparent;color:#251F21;font-size:15px;font-weight:600;cursor:pointer;width:100%}
.diffbox ul.diff{list-style:none;margin:12px 0 0;padding:0;max-height:260px;overflow:auto;display:flex;flex-direction:column;gap:6px}
.diffln{display:flex;flex-direction:column;padding:8px 10px;border:1px solid #E6E0DC;border-radius:10px;background:#fff}
.diffln .dl-name{font-weight:600;font-size:14px}
.diffln .dl-det{font-size:12px;color:#6E6568}
.diffln.add{border-left:4px solid #251F21}
.diffln.chg{border-left:4px solid #EB000E}
.diffln.rem{border-left:4px solid #B9AFAF}
.diffln.rem .dl-name{text-decoration:line-through;color:#6E6568}
.diffbtns{display:flex;flex-direction:column;gap:8px;margin-top:14px}

.sitefoot{margin-top:28px;padding-top:14px;border-top:1px solid #E8E1E1;text-align:center;font-size:12px;color:#9A9093}
.sitefoot a{color:#6E6568;text-decoration:none}
.sitefoot a:active{color:#EB000E}

.fldpair{display:flex;gap:10px}
.fldpair .fld{flex:1;min-width:0}
.cust-tools{display:flex;gap:8px;margin-bottom:12px}
.cust-tools input{flex:1;min-width:0;border:1px solid var(--ds-hairline);border-radius:12px;padding:10px 12px;font-size:14px;background:#fff;color:var(--ds-ink)}
.cust-tools .ghostbtn{flex:none;margin:0;width:auto;padding:0 16px}
.rowbtns{display:flex;gap:16px;align-items:center}
.editbtn{border:0;background:transparent;color:var(--ds-ink);font-size:13px;padding:0;font-weight:600}
.paychips{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.paychip{border:1px solid var(--ds-hairline);background:#fff;color:var(--ds-ink);border-radius:999px;padding:8px 14px;font-size:13px;font-weight:600;cursor:pointer}
.paychip.on{background:var(--ds-ink);color:#fff;border-color:var(--ds-ink)}
.storebadge{background:#F3EDED}
.adminform{display:flex;flex-direction:column;gap:10px;margin-top:12px}

/* ---- CMS dashboard (admin page) ---- */
body:has(.cms-root) { background: #F2F6FC; }
.cms-root { display: flex; gap: 14px; align-items: flex-start; }
.cms-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; background: #fff; border-radius: 16px; padding: 10px 8px; box-shadow: 0 2px 12px rgba(31,68,148,.10); flex: 0 0 auto; }
.cms-side button { width: 46px; height: 46px; border: 0; border-radius: 12px; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; }
.cms-side button.on { background: #2F80ED; box-shadow: 0 2px 8px rgba(47,128,237,.4); }
.cms-main { flex: 1; min-width: 0; }
.cms-root .cust-form, .cms-root .cust-list { background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(31,68,148,.10); }
.cms-root .savebtn { background: #2F80ED; }
.cms-root .savebtn:disabled { background: #9dbfe8; }
.cms-root .stat { background: #F2F6FC; }
.cms-modal-backdrop { position: fixed; inset: 0; background: rgba(15,30,60,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.cms-modal { background: #fff; border-radius: 16px; padding: 6px 18px 18px; width: 100%; max-width: 420px; max-height: 85vh; overflow: auto; box-shadow: 0 8px 30px rgba(15,30,60,.25); }

/* ---- best price search ---- */
.bestbadge { display: inline-block; background: var(--vs-red); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.segbtn.bestchip.on { background: var(--vs-red); color: #fff; border-color: var(--vs-red); }

.preview-note{background:#251f21;color:white;border-radius:14px;padding:14px 18px;font-size:13px;line-height:1.5;margin:0 0 18px}.viewseg a{color:inherit;text-decoration:none;padding:12px 18px}.cms-side{width:64px}.cms-side button{font-size:22px}.cms-main{min-width:0}
#view select{display:block;width:100%;max-width:100%;padding:10px;border:1px solid #bbb;border-radius:8px;margin:6px 0 14px}#view td{padding:7px;border:1px solid #ddd;white-space:nowrap}.notebox label{display:block;font-size:13px;font-weight:600}
