/* កាតកញ្ចប់តម្លៃ — Landing, /pricing, /admin/billing.
   v2.20.98: រចនាថ្មី (.pv) — ពណ៌តាមកញ្ចប់, ដែនកំណត់ជា Grid, មុខងារបត់បាន។ ស្រាល: គ្មាន blur/filter; Animation តែ transform។ */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- ប្ដូរ ខែ / ឆ្នាំ ---- */
.pv-cycle{display:flex;width:max-content;max-width:100%;margin:0 auto 34px;padding:5px;gap:4px;border-radius:999px;background:var(--card);border:1px solid var(--line);box-shadow:0 8px 24px -18px rgba(40,38,90,.5)}
.pv-cycle button{display:inline-flex;align-items:center;gap:8px;padding:9px 20px;border-radius:999px;font-size:15px;transition:background .15s,color .15s}
.pv-cycle button.active{background:linear-gradient(135deg,#7272c4,#6262AC);color:#fff;box-shadow:0 8px 18px -10px rgba(98,98,172,.9)}
.pv-cycle small{padding:2px 9px;border-radius:999px;background:rgba(31,157,85,.12);color:#1a8a4a!important;font-size:12px;font-weight:700}
.pv-cycle button.active small{background:rgba(255,255,255,.2);color:#fff!important}

/* ---- Grid ---- */
.pv-grid:not(.plans-rail){display:grid;grid-template-columns:repeat(auto-fit,minmax(248px,1fr));gap:20px;align-items:stretch;max-width:1180px;margin:0 auto}
.pv-grid:not(.plans-rail):has(> .pv:nth-child(3):last-child){max-width:900px}
.pv-grid:not(.plans-rail):has(> .pv:nth-child(2):last-child){max-width:620px}

/* ---- កាត ---- */
.plan.pv{--pa:#6262AC;--pa2:#8a8ad6;--pa-soft:rgba(98,98,172,.09);position:relative;display:flex;flex-direction:column;gap:14px;min-width:0;padding:0 0 18px;border:1px solid var(--line);border-radius:22px;background:var(--card);overflow:visible;box-shadow:0 1px 2px rgba(23,22,43,.04);transition:transform .2s ease,box-shadow .2s ease}
.plan.pv:hover{transform:translateY(-3px);box-shadow:0 22px 44px -26px rgba(40,38,90,.45)}
.plan.pv::before{content:"";position:absolute;inset:0 0 auto;height:6px;border-radius:22px 22px 0 0;background:linear-gradient(90deg,var(--pa),var(--pa2))}
.plan.pv.pv-tone-0{--pa:#64748b;--pa2:#94a3b8;--pa-soft:rgba(100,116,139,.10)}
.plan.pv.pv-tone-1{--pa:#0f9b8e;--pa2:#34c3b4;--pa-soft:rgba(15,155,142,.10)}
.plan.pv.pv-tone-2{--pa:#6262AC;--pa2:#8a8ad6;--pa-soft:rgba(98,98,172,.10)}
.plan.pv.pv-tone-3{--pa:#2b2a5c;--pa2:#5856a6;--pa-soft:rgba(43,42,92,.10)}
.plan.pv.pv-pop{--pa:#6262AC;--pa2:#F5852F;--pa-soft:rgba(98,98,172,.10);border:2px solid transparent;background:linear-gradient(var(--card),var(--card)) padding-box,linear-gradient(135deg,#6262AC,#F5852F) border-box;box-shadow:0 26px 50px -28px rgba(98,98,172,.7)}
.plan.pv.pv-pop::before{height:0}
.plan.pv.plan-current{outline:0;box-shadow:0 0 0 3px rgba(31,157,85,.28)}
.pv-tag{position:absolute;top:-13px;left:50%;right:auto;transform:translateX(-50%);z-index:1;padding:4px 14px;border-radius:999px;background:linear-gradient(135deg,#6262AC,#F5852F);color:#fff;font-size:12px;font-weight:800;white-space:nowrap;box-shadow:0 8px 18px -8px rgba(245,133,47,.7)}
.pv-cur{position:absolute;top:14px;right:14px;display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:999px;background:rgba(31,157,85,.12);color:#1a8a4a;font-size:11.5px;font-weight:700}
.pv-cur .ui-icon{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:3}

.pv-head{display:flex;gap:12px;align-items:flex-start;padding:22px 22px 0}
.pv-ic{flex:none;width:44px;height:44px;border-radius:14px;display:inline-flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,var(--pa),var(--pa2));box-shadow:0 10px 20px -12px var(--pa)}
.pv-ic .ui-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pv-head h3{margin:0 0 4px;font-size:19px;line-height:1.25;color:var(--text)}
.pv-head .plan-desc{min-height:0;margin:0;font-size:13.5px;line-height:1.55;color:var(--muted)}

.plan-price.pv-price{min-height:78px;margin:0;padding:0 22px}
.pv-cyc{display:flex;flex-direction:column;gap:4px}
.pv-cyc[hidden]{display:none}
.pv-amount{display:flex;align-items:baseline;gap:4px;line-height:1}
.pv-price .pv-amount b{font-size:38px;font-weight:800;letter-spacing:-.03em;color:var(--text)}
.pv-price .pv-amount small{margin:0;font-size:14px;color:var(--muted)}
.pv-sub{font-size:12.5px;color:var(--muted)}
.pv-sub em{font-style:normal;font-weight:700;color:#1a8a4a}
.pv-promo{display:flex;align-items:center;gap:6px}
.pv-price .plan-was{margin:0;font-size:14px;color:var(--muted);opacity:1}
.pv-price .plan-save{margin:0;padding:2px 8px;border-radius:999px;background:#F5852F;color:#fff;font-size:11.5px;font-weight:800}
.pv-price .plan-code{display:inline-flex;align-items:center;gap:6px;width:max-content;max-width:100%;margin-top:4px;padding:4px 10px;border:1.5px dashed #6262AC;border-radius:9px;background:rgba(98,98,172,.06);color:#6262AC;font-size:12px;font-weight:600}
.pv-price .plan-code em{font-style:normal;font-weight:800;letter-spacing:.06em}

.pv-cta{padding:0 22px}
.pv-cta form{margin:0}
.pv .pv-cta .btn{width:100%;min-height:44px;border-radius:13px;font-weight:700}
.pv:not(.pv-pop) .pv-cta .btn:not(.btn-disabled){border-color:var(--pa);color:var(--pa);background:var(--card)}
.pv:not(.pv-pop) .pv-cta .btn:not(.btn-disabled):hover{background:var(--pa);color:#fff}
.pv.pv-pop .pv-cta .btn{background:linear-gradient(135deg,#6262AC,#7a6cd0 55%,#F5852F);border:0;color:#fff}

.pv-limits{list-style:none;display:flex;flex-direction:column;gap:2px;margin:0 22px;padding:6px 12px;border-radius:14px;background:var(--pa-soft)}
.pv-limits li{display:flex;align-items:center;gap:10px;min-height:32px;font-size:13px}
.pv-limits li+li{border-top:1px solid rgba(98,98,172,.10)}
.pv-limits .ui-icon{flex:none;width:18px;height:18px;fill:none;stroke:var(--pa);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pv-limits span{flex:1;min-width:0;color:var(--text);overflow-wrap:anywhere;line-height:1.35}
.pv-limits b{order:3;font-size:15px;font-weight:800;color:var(--text);white-space:nowrap}
.pv-limits li.off span,.pv-limits li.off b{color:var(--muted)}
.pv-limits li.off b{font-weight:600}
.pv-feats{display:flex;flex-direction:column;gap:9px;margin:0 22px;padding-top:12px;border-top:1px dashed var(--line);flex:1}
.pv-feats-title{margin:0;font-size:12.5px;font-weight:700;color:var(--text)}
.pv .plan-feats{list-style:none;display:flex;flex-direction:column;gap:8px;margin:0;padding:0;font-size:13.5px;flex:0 0 auto}
.pv .plan-feats li{display:flex;gap:8px;align-items:flex-start;line-height:1.45;color:var(--text)}
.pv .plan-feats .ui-icon,.pv-all .ui-icon{flex:none;width:17px;height:17px;margin-top:1px;padding:2px;border-radius:50%;background:var(--pa-soft);fill:none;stroke:var(--pa);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.pv .plan-feats li.off{color:var(--muted)}
.pv .plan-feats .pv-more{color:var(--pa);font-weight:700;padding-left:25px}
.pv .plan-feats .pv-more button{padding:0;border:0;background:none;font:inherit;font-weight:700;color:var(--pa);cursor:pointer}
.pv .plan-feats .pv-more button:hover{text-decoration:underline}
.pv-all-btn{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;margin-top:auto;padding:8px 12px;border:1px dashed var(--pa);border-radius:12px;background:var(--pa-soft);color:var(--pa);font:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:background .15s}
.pv-all-btn:hover{background:var(--card)}
.pv-all-btn span{font-weight:500;opacity:.8}
/* ---- Popup ប្រៀបធៀប ---- */
html.pv-dlg-on{overflow:hidden}
.pv-dialog{width:min(980px,calc(100vw - 24px));max-height:min(86vh,860px);padding:0;border:0;border-radius:22px;background:var(--card);color:var(--text);box-shadow:0 40px 90px -30px rgba(23,22,43,.55);overflow:hidden}
.pv-dialog[open]{display:flex;flex-direction:column;animation:pvDlg .2s ease-out}
.pv-dialog::backdrop{background:rgba(23,22,43,.55)}
@keyframes pvDlg{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.pv-dlg-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
.pv-dlg-head h3{margin:0;font-size:18px}
.pv-dlg-x{width:38px;height:38px;flex:none;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--muted);font-size:16px;cursor:pointer}
.pv-dlg-x:hover{color:var(--text)}
.pv-dlg-body{overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.pv-cmp{width:100%;min-width:560px;border-collapse:separate;border-spacing:0;font-size:13.5px}
.pv-cmp th,.pv-cmp td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:center;vertical-align:middle}
.pv-cmp tbody th{text-align:left;font-weight:500;color:var(--text);position:sticky;left:0;z-index:1;background:var(--card);min-width:170px;width:34%}
.pv-cmp thead th{position:sticky;top:0;z-index:2;background:var(--card);border-bottom:2px solid var(--line)}
.pv-cmp thead th:first-child{left:0;z-index:3;text-align:left;font-size:12px;color:var(--muted)}
.pv-cmp thead th b{display:block;font-size:14.5px;color:var(--pa)}
.pv-cmp thead th small{font-size:11.5px;color:var(--muted);font-weight:500}
.pv-cmp thead th.pv-tone-0{--pa:#64748b}.pv-cmp thead th.pv-tone-1{--pa:#0f9b8e}.pv-cmp thead th.pv-tone-2{--pa:#6262AC}.pv-cmp thead th.pv-tone-3{--pa:#2b2a5c}
.pv-cmp .pv-grp th span{position:sticky;left:12px}
.pv-cmp .pv-grp th{position:static;padding-top:16px;background:none;font-size:12px;font-weight:800;letter-spacing:.03em;color:var(--muted);text-transform:uppercase}
.pv-cmp td.pv-col-on,.pv-cmp th.pv-col-on{background:rgba(245,133,47,.08)}
.pv-cmp thead th.pv-col-on{background:#fff6ee;box-shadow:inset 0 3px 0 #F5852F}
.pv-yes{display:inline-flex;width:22px;height:22px;border-radius:50%;align-items:center;justify-content:center;background:rgba(31,157,85,.12);color:#1a8a4a}
.pv-yes .ui-icon{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.pv-no{color:var(--muted);opacity:.6}
html[data-theme="dark"] .pv-cmp thead th.pv-col-on{background:#2a2033}
html[data-theme="dark"] .pv-cmp thead th.pv-tone-3,html[data-theme="dark"] .pv-cmp thead th.pv-tone-0{--pa:#a3b1c6}
@media(prefers-color-scheme:dark){html[data-theme="auto"] .pv-cmp thead th.pv-col-on{background:#2a2033}}
@media(max-width:600px){.pv-dialog{width:100vw;max-width:100vw;max-height:92vh;margin:auto 0 0;border-radius:20px 20px 0 0}.pv-cmp{font-size:12.5px}.pv-cmp tbody th{min-width:130px}.pv-cmp th,.pv-cmp td{padding:9px 8px}}
@media(prefers-reduced-motion:reduce){.pv-dialog[open]{animation:none}}
.pv-foot{margin-top:22px}
.pv-foot-row{display:flex;align-items:flex-start;justify-content:center;gap:8px;margin:0;font-size:13px;line-height:1.7;color:var(--muted);text-align:center}
.pv-foot-row .ui-icon{flex:none;width:15px;height:15px;margin-top:3px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pv-foot-row a{color:#6262AC}
.pv-foot-box{display:flex;flex-direction:column;gap:6px;max-width:1180px;margin:18px auto 0;padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:rgba(98,98,172,.05)}
.pv-foot-box .pv-foot-row{justify-content:flex-start;text-align:left}
.pv-foot-box .pv-foot-row .ui-icon{color:#6262AC}
.pv-note .ui-icon{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2}

/* ---- Billing: Rail (អូសផ្ដេក) ---- */
.plans-compact.plans-rail{display:flex;align-items:stretch;gap:16px;max-width:100%;min-width:0;overflow-x:auto;scroll-snap-type:x proximity;overscroll-behavior-x:contain;padding:18px 4px 18px;margin:0 0 16px;scrollbar-width:thin;scrollbar-color:var(--blue) var(--blue-50)}
.plans-compact.plans-rail>.plan{flex:0 0 288px;max-width:90%;scroll-snap-align:start}
.plan-rail-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;color:var(--muted);font-size:12px}
.plan-rail-toolbar>div{display:flex;gap:7px;flex:none}.plan-rail-toolbar button{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--blue);font-size:25px;cursor:pointer}.plan-rail-toolbar button:disabled{opacity:.35;cursor:default}
.plans-rail:focus-visible{outline:2px solid var(--blue);outline-offset:3px;border-radius:10px}
.plans-rail .pv-cycle,.card .pv-cycle{margin-left:0}
@media(min-width:1180px){.plans-compact.plans-rail>.plan{flex:1 0 270px;max-width:340px}}

/* ---- Tablet / ទូរស័ព្ទ (Landing ប្រើ Rail ពី public.css ≤1024px) ---- */
@media(max-width:1024px){.pv-grid:not(.plans-rail){max-width:none}.pv-grid > .plan.pv{padding-bottom:20px}}
@media(max-width:600px){
  .pv-cycle{margin-bottom:22px}.pv-cycle button{padding:8px 14px;font-size:14px}
  .pv-head{padding:24px 18px 0}.plan-price.pv-price,.pv-cta{padding:0 18px}.pv-limits,.pv-feats{margin:0 18px}
  .pv-price .pv-amount b{font-size:34px}
  .plans-compact.plans-rail>.plan{flex-basis:86%;max-width:320px}.plan-rail-toolbar{font-size:13px}
}
@media(prefers-reduced-motion:reduce){.plan.pv,.plan.pv:hover{transition:none;transform:none}}
/* ពណ៌ងងឹត: ពណ៌កញ្ចប់ភ្លឺជាងបន្តិច ដើម្បីអានបានច្បាស់ */
html[data-theme="dark"] .plan.pv.pv-tone-0{--pa:#a3b1c6;--pa2:#7d8ba1}
html[data-theme="dark"] .plan.pv.pv-tone-3{--pa:#9b98f0;--pa2:#5856a6;--pa-soft:rgba(155,152,240,.12)}
html[data-theme="dark"] .pv-limits li+li{border-top-color:rgba(255,255,255,.07)}
@media(prefers-color-scheme:dark){
  html[data-theme="auto"] .plan.pv.pv-tone-0{--pa:#a3b1c6;--pa2:#7d8ba1}
  html[data-theme="auto"] .plan.pv.pv-tone-3{--pa:#9b98f0;--pa2:#5856a6;--pa-soft:rgba(155,152,240,.12)}
  html[data-theme="auto"] .pv-limits li+li{border-top-color:rgba(255,255,255,.07)}
}

/* v2.20.164: កាតទាំងអស់មានកម្ពស់តម្លៃស្មើគ្នា; តម្លៃធំនៅជួរតែមួយ (Free ក៏ដូចគ្នា) */
dl.pv-launch-terms{margin:6px 0 0;padding:8px 10px;border-radius:10px;background:var(--pa-soft);display:grid;gap:3px;font-size:12.5px;line-height:1.5}
dl.pv-launch-terms div{display:flex;justify-content:space-between;gap:8px;align-items:baseline}
dl.pv-launch-terms dt{margin:0;color:var(--muted)}
dl.pv-launch-terms dd{margin:0;font-weight:700;color:var(--text);white-space:nowrap}
dl.pv-launch-terms .pv-launch-join dd{color:var(--pa)}
@media(min-width:1024px){.pv-grid:has(.pv-cyc:not([hidden]) .pv-launch-terms) .plan-price.pv-price{min-height:150px;display:flex;flex-direction:column;justify-content:flex-end}}

/* v2.20.165: Pro ពណ៌ស្របគ្នា (ស្វាយ) ទាំង Light/Dark; ប៊ូតុង «មើលមុខងារទាំងអស់» នៅបាតកាតតម្រឹមគ្នា */
.pv-quota-increase{margin:0;padding:10px 12px;border-radius:12px;background:var(--pa-soft);font-size:12.5px}
.pv-quota-title{margin:0 0 6px;font-size:12px;font-weight:700;color:var(--pa)}
.pv-quota-increase ul{list-style:none;margin:0;padding:0;display:grid;gap:4px}
.pv-quota-increase li{display:flex;justify-content:space-between;gap:10px;align-items:baseline;color:var(--text)}
.pv-quota-increase li span{color:var(--muted)}
.pv-quota-increase li b{color:var(--pa);font-weight:800;white-space:nowrap}
/* v2.20.175: ប្លុកខិតទៅលើស្មើគ្នាគ្រប់កាត; ប៊ូតុងប្រៀបធៀបនៅបាតកាត */
.pv-feats>.pv-quota-increase{margin-top:0}
.pv-feats>.pv-all-btn{margin-top:auto}
html[data-theme="dark"] .plan.pv.pv-pop{--pa:#9b98f0;--pa-soft:rgba(155,152,240,.12)}
@media(prefers-color-scheme:dark){html[data-theme="auto"] .plan.pv.pv-pop{--pa:#9b98f0;--pa-soft:rgba(155,152,240,.12)}}
@media(min-width:1024px){.pv-grid:has(.pv-cyc:not([hidden]) .pv-launch-terms) .plan-price.pv-price.pv-price-free{padding-bottom:60px}}
/* v2.20.175 — ប្លុកផ្ទៃក្រោយ (ដែនកំណត់បន្ថែម/មុខងារសំខាន់ៗ) កម្ពស់ស្មើគ្នាគ្រប់កាត ទោះមានទិន្នន័យតិចជាង */
@media(min-width:1024px){.pv-feats>.pv-quota-increase{min-height:153px;box-sizing:border-box}}
/* v2.20.175 — កាត Free: ប្លុកព័ត៌មានតូចជំនួសចន្លោះទទេ (ពេលកាតផ្សេងមាន promotion) */
@media(min-width:1024px){.pv-grid:has(.pv-cyc:not([hidden]) .pv-launch-terms) .plan-price.pv-price.pv-price-free{padding-bottom:0}}
/* v2.20.175 — តម្លៃទាំងអស់ (រួមទាំង $0) នៅកណ្ដាល */
.plan-price.pv-price{text-align:center}
.plan-price.pv-price .pv-amount,.plan-price.pv-price .pv-promo{justify-content:center}
.plan-price.pv-price .pv-sub{display:block}
.pv-price .plan-code{margin-inline:auto}
dl.pv-launch-terms.pv-plain,dl.pv-launch-terms.pv-free-terms{min-height:78px;box-sizing:border-box;align-content:start}
/* v2.20.175 — កាតតម្លៃធំជាងមុន (ទំព័រសាធារណៈ: Landing/Pricing): ពង្រីកទទឹងផ្នែកតម្លៃដល់ 1320px, កាតអតិបរមា 340px */
@media(min-width:1180px){
  .wrap:has(> .plans-rail){max-width:min(1320px,calc(100vw - 60px))}
  .plans-compact.plans-rail>.plan{max-width:340px}
}
@media(min-width:1024px){.pv-grid .pv-head{min-height:98px;box-sizing:border-box}}
