/* ============================================================
   POSShop — Design System  (modern, clean, 2026)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Thai:wght@400;500;600;700;800&display=swap');

:root{
  /* palette */
  --bg:#f1f5f9;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --border:#e6e9ef;
  --border-strong:#d3d9e3;
  --text:#0f172a;
  --text-muted:#64748b;
  --text-soft:#94a3b8;

  --primary:#6366f1;
  --primary-600:#4f46e5;
  --primary-700:#4338ca;
  --primary-soft:#eef2ff;
  --grad:linear-gradient(135deg,#6366f1 0%,#8b5cf6 50%,#a855f7 100%);
  --grad-dark:linear-gradient(180deg,#0b1120 0%,#111827 100%);

  --green:#10b981; --green-soft:#d1fae5;
  --red:#ef4444;   --red-soft:#fee2e2;
  --amber:#f59e0b; --amber-soft:#fef3c7;
  --blue:#3b82f6;  --blue-soft:#dbeafe;

  --radius:18px; --radius-md:12px; --radius-sm:9px;
  --shadow-sm:0 1px 2px rgba(15,23,42,.06),0 1px 3px rgba(15,23,42,.04);
  --shadow:0 4px 6px -1px rgba(15,23,42,.06),0 12px 28px -8px rgba(15,23,42,.12);
  --shadow-lg:0 20px 50px -12px rgba(15,23,42,.25);
  --ring:0 0 0 4px rgba(99,102,241,.18);
  --sb:248px;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:'Inter','Noto Sans Thai',system-ui,-apple-system,"Segoe UI",Tahoma,sans-serif;
  color:var(--text);background:var(--bg);line-height:1.6;font-size:15px;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
a{color:var(--primary-600);text-decoration:none;transition:color .15s}
a:hover{color:var(--primary-700)}
h1,h2,h3,h4{margin:0 0 .4em;line-height:1.25;letter-spacing:-.01em}
img{max-width:100%}
.container{max-width:1200px;margin:0 auto;padding:0 22px}
.muted{color:var(--text-muted)}
.small{font-size:13px}

/* custom scrollbar */
*::-webkit-scrollbar{width:10px;height:10px}
*::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:20px;border:2px solid transparent;background-clip:content-box}
*::-webkit-scrollbar-thumb:hover{background:#94a3b8;background-clip:content-box}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;gap:8px;justify-content:center;
  padding:10px 18px;border-radius:11px;border:1px solid transparent;
  font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;
  transition:transform .12s,box-shadow .15s,background .15s,border-color .15s;
  background:var(--primary-soft);color:var(--primary-600);white-space:nowrap}
.btn:hover{text-decoration:none;transform:translateY(-1px)}
.btn:active{transform:translateY(0)}
.btn svg{width:18px;height:18px}
.btn-primary{background:var(--grad);color:#fff;box-shadow:0 6px 16px -4px rgba(99,102,241,.5)}
.btn-primary:hover{color:#fff;box-shadow:0 10px 22px -6px rgba(99,102,241,.6)}
.btn-success{background:linear-gradient(135deg,#10b981,#059669);color:#fff;box-shadow:0 6px 16px -4px rgba(16,185,129,.5)}
.btn-success:hover{color:#fff}
.btn-danger{background:var(--red-soft);color:#b91c1c}
.btn-danger:hover{background:#fecaca;color:#991b1b}
.btn-ghost{background:#fff;border-color:var(--border);color:var(--text)}
.btn-ghost:hover{border-color:var(--border-strong);background:var(--surface-2);color:var(--text)}
.btn-sm{padding:7px 13px;font-size:13px;border-radius:9px}
.btn-sm svg{width:15px;height:15px}
.btn-lg{padding:14px 24px;font-size:16px;border-radius:13px}
.btn-block{width:100%}
.btn-icon{padding:9px;border-radius:10px}

/* ---------- forms ---------- */
.field{margin-bottom:18px}
.field > label{display:block;font-weight:600;margin-bottom:7px;font-size:13.5px;color:#334155}
.input,select,textarea{width:100%;padding:11px 14px;border:1px solid var(--border-strong);
  border-radius:11px;font-size:15px;background:#fff;font-family:inherit;color:var(--text);transition:.15s}
.input::placeholder{color:var(--text-soft)}
.input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);box-shadow:var(--ring)}
.input-group{display:flex;align-items:stretch;border:1px solid var(--border-strong);border-radius:11px;overflow:hidden;transition:.15s;background:#fff}
.input-group:focus-within{border-color:var(--primary);box-shadow:var(--ring)}
.input-group .addon{display:flex;align-items:center;padding:0 12px;background:var(--surface-2);color:var(--text-muted);font-size:14px;white-space:nowrap;border-right:1px solid var(--border)}
.input-group .input{border:0;border-radius:0;box-shadow:none!important}
.err{color:var(--red);font-size:13px;margin-top:6px;font-weight:500}
.hint{color:var(--text-muted);font-size:13px;margin-top:6px}
.row{display:flex;gap:16px;flex-wrap:wrap}
.row > *{flex:1;min-width:150px}

/* ---------- cards / layout ---------- */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm);padding:24px}
.card-pad-0{padding:0;overflow:hidden}
.grid{display:grid;gap:18px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:980px){.grid-3,.grid-4{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}

/* stat cards */
.stat{position:relative;padding:22px;border-radius:var(--radius);background:var(--surface);
  border:1px solid var(--border);box-shadow:var(--shadow-sm);overflow:hidden;transition:transform .15s,box-shadow .15s}
.stat:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.stat .ico{width:46px;height:46px;border-radius:13px;display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.stat .ico svg{width:24px;height:24px}
.stat .label{color:var(--text-muted);font-size:13px;font-weight:500}
.stat .value{font-size:27px;font-weight:800;margin-top:3px;letter-spacing:-.02em}
.ic-green{background:var(--green-soft);color:#059669}
.ic-indigo{background:var(--primary-soft);color:var(--primary-600)}
.ic-blue{background:var(--blue-soft);color:#2563eb}
.ic-amber{background:var(--amber-soft);color:#d97706}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto}
.pagination-wrap{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-top:1px solid var(--border);background:var(--surface)}
.pagination-info{font-size:13px;color:var(--text-muted)}
.pagination{display:flex;flex-wrap:wrap;align-items:center;gap:4px}
.pagination-num{min-width:36px;padding-left:10px;padding-right:10px;justify-content:center}
.pagination-nav{white-space:nowrap}
.pagination-ellipsis{padding:0 6px;color:var(--text-muted);font-size:14px;line-height:32px}
.pagination .is-active{cursor:default;pointer-events:none}
.meta-list{margin:0;padding:0}
.meta-row{display:flex;flex-wrap:wrap;gap:8px 16px;padding:12px 0;border-bottom:1px solid var(--border)}
.meta-row:last-child{border-bottom:none;padding-bottom:0}
.meta-row dt{width:100%;margin:0;font-size:12px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:.04em}
.meta-row dd{margin:0;font-size:14px}
.table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}
.table th,.table td{padding:13px 16px;text-align:left;border-bottom:1px solid var(--border);font-size:14px;vertical-align:middle}
.table thead th{background:var(--surface-2);color:#64748b;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.04em}
.table tbody tr{transition:background .12s}
.table tbody tr:hover td{background:#fafbff}
.table tbody tr:last-child td{border-bottom:0}
.text-right{text-align:right}
.text-center{text-align:center}

/* ---------- badges / alerts ---------- */
.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:999px;font-size:12px;font-weight:600}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.badge-green{background:var(--green-soft);color:#047857}
.badge-red{background:var(--red-soft);color:#b91c1c}
.badge-amber{background:var(--amber-soft);color:#b45309}
.badge-gray{background:#f1f5f9;color:#475569}
.badge-blue{background:var(--blue-soft, #dbeafe);color:#1d4ed8}
.alert{padding:13px 16px;border-radius:12px;margin-bottom:18px;font-size:14px;display:flex;gap:10px;align-items:flex-start;font-weight:500}
.alert svg{width:20px;height:20px;flex-shrink:0;margin-top:1px}
.alert-success{background:var(--green-soft);color:#065f46}
.alert-error,.alert-danger{background:var(--red-soft);color:#991b1b}
.alert-warning{background:var(--amber-soft);color:#b45309}
.alert-info{background:var(--blue-soft);color:#1e40af}

/* ============================================================
   PUBLIC / LANDING
   ============================================================ */
.nav{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.8);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border)}
.nav .container{display:flex;align-items:center;justify-content:space-between;height:68px}
.brand{font-weight:800;font-size:21px;display:inline-flex;align-items:center;gap:9px;color:var(--text)}
.brand .dot{width:30px;height:30px;border-radius:9px;background:var(--grad);display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:16px;box-shadow:0 4px 10px -2px rgba(99,102,241,.5)}
.brand:hover{color:var(--text)}

.hero{position:relative;background:var(--grad-dark);color:#fff;padding:110px 0 120px;overflow:hidden}
.hero::before{content:"";position:absolute;inset:0;background:
  radial-gradient(640px circle at 80% 10%,rgba(139,92,246,.35),transparent 55%),
  radial-gradient(520px circle at 10% 90%,rgba(99,102,241,.30),transparent 55%)}
.hero .container{position:relative}
.hero .pill{display:inline-flex;align-items:center;gap:8px;background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);
  padding:7px 15px;border-radius:999px;font-size:13px;font-weight:500;margin-bottom:22px;backdrop-filter:blur(6px)}
.hero h1{font-size:50px;line-height:1.1;max-width:760px;font-weight:800;letter-spacing:-.025em}
.hero h1 .hl{background:linear-gradient(120deg,#a5b4fc,#e9d5ff);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
.hero p{font-size:19px;opacity:.85;max-width:580px;margin-top:18px}
.hero .url-demo{display:inline-flex;align-items:center;gap:0;margin-top:8px;background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.15);border-radius:10px;padding:4px;font-family:'Inter',monospace}
.hero .url-demo span{padding:6px 10px;font-size:14px}
.hero .url-demo .slug{background:var(--grad);border-radius:7px;color:#fff;font-weight:600}
@media(max-width:760px){.hero{padding:70px 0 80px}.hero h1{font-size:34px}}

.section{padding:80px 0}
.section-head{text-align:center;max-width:620px;margin:0 auto 50px}
.section-head h2{font-size:34px;font-weight:800;letter-spacing:-.02em}
.section-head p{color:var(--text-muted);font-size:17px}
.feature{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:26px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s}
.feature:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.feature .ico{width:52px;height:52px;border-radius:15px;background:var(--primary-soft);color:var(--primary-600);
  display:flex;align-items:center;justify-content:center;margin-bottom:16px}
.feature .ico svg{width:26px;height:26px}
.feature h3{font-size:18px}
.feature p{color:var(--text-muted);margin:0;font-size:14.5px}
.cta{background:var(--grad);border-radius:26px;padding:56px;text-align:center;color:#fff;box-shadow:var(--shadow-lg)}
.cta h2{font-size:32px;color:#fff}
.site-footer{padding:36px 0;text-align:center;color:var(--text-muted);border-top:1px solid var(--border);background:#fff}

/* ============================================================
   AUTH
   ============================================================ */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;position:relative;
  background:var(--grad-dark);overflow:hidden}
.auth-wrap::before{content:"";position:absolute;inset:0;background:
  radial-gradient(600px circle at 85% 15%,rgba(139,92,246,.4),transparent 55%),
  radial-gradient(500px circle at 10% 85%,rgba(99,102,241,.35),transparent 55%)}
.auth-card{position:relative;background:rgba(255,255,255,.97);border-radius:24px;box-shadow:var(--shadow-lg);
  width:100%;max-width:460px;padding:38px;border:1px solid rgba(255,255,255,.4)}
.auth-card h2{font-size:26px}
.auth-logo{text-align:center;margin-bottom:26px}

/* ============================================================
   APP SHELL (shop / admin)
   ============================================================ */
.shell{display:flex;min-height:100vh}
.sidebar{width:var(--sb);background:var(--grad-dark);color:#cbd5e1;flex-shrink:0;display:flex;flex-direction:column;
  position:fixed;inset:0 auto 0 0;z-index:40;transition:transform .25s}
.sidebar .logo{padding:22px 20px;border-bottom:1px solid rgba(255,255,255,.07)}
.sidebar .logo .brand{color:#fff;font-size:17px}
.sidebar .logo .brand .dot{width:34px;height:34px}
.sidebar .shop-meta{margin-top:12px;font-size:13px}
.sidebar .shop-meta .nm{color:#fff;font-weight:600;font-size:15px}
.sidebar .shop-meta .url{color:#7c89a3;font-family:monospace;font-size:12px;margin-top:2px}
.sidebar nav{padding:14px 12px;flex:1;overflow-y:auto}
.sidebar nav .grp{color:#5b6779;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;padding:14px 14px 6px}
.sidebar nav a{display:flex;align-items:center;gap:12px;padding:11px 14px;border-radius:11px;
  color:#aab4c5;font-weight:500;margin-bottom:3px;font-size:14.5px;transition:.15s}
.sidebar nav a svg{width:20px;height:20px;opacity:.85}
.sidebar nav a:hover{background:rgba(255,255,255,.06);color:#fff;text-decoration:none}
.sidebar nav a.active{background:var(--grad);color:#fff;box-shadow:0 8px 18px -6px rgba(99,102,241,.6)}
.sidebar nav a.active svg{opacity:1}
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;margin-left:auto;
  border-radius:999px;background:var(--red);color:#fff;font-size:11px;font-weight:700;line-height:1}
.sidebar nav a.active .nav-badge{background:rgba(255,255,255,.25)}
.topbar .nav-badge{margin-left:4px;vertical-align:middle}
.sidebar .foot{padding:14px;border-top:1px solid rgba(255,255,255,.07)}
.sidebar .userbox{display:flex;align-items:center;gap:11px;padding:8px 10px;margin-bottom:10px}
.sidebar .avatar{width:38px;height:38px;border-radius:11px;background:var(--grad);display:flex;align-items:center;justify-content:center;color:#fff;font-weight:700;flex-shrink:0}
.sidebar .userbox .nm{color:#fff;font-weight:600;font-size:14px;line-height:1.2}
.sidebar .userbox .rl{color:#7c89a3;font-size:12px}

.main{flex:1;display:flex;flex-direction:column;min-width:0;margin-left:var(--sb)}
.topbar{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.85);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--border);min-height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 26px;gap:14px}
.topbar .tt{font-weight:700;font-size:16px}
.hamburger{display:none;background:none;border:0;cursor:pointer;color:var(--text);padding:6px}
.hamburger svg{width:24px;height:24px}
.content{padding:28px 26px 40px;flex:1}
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;flex-wrap:wrap;gap:14px}
.page-head h1{font-size:25px;margin:0;font-weight:800;letter-spacing:-.02em}
.page-head .sub{color:var(--text-muted);font-size:14px;margin-top:2px}

.sidebar-backdrop{display:none;position:fixed;inset:0;background:rgba(15,23,42,.5);z-index:39;backdrop-filter:blur(2px)}
@media(max-width:920px){
  .sidebar{transform:translateX(-100%);box-shadow:var(--shadow-lg)}
  .sidebar.open{transform:translateX(0)}
  .main{margin-left:0}
  .hamburger{display:inline-flex}
  .sidebar-backdrop.show{display:block}
}
/* โหมดยุบเมนู (ใช้กับหน้า POS) — บังคับซ่อน sidebar ทุกขนาดจอ */
.shell.collapsed .sidebar{transform:translateX(-100%);box-shadow:var(--shadow-lg)}
.shell.collapsed .sidebar.open{transform:translateX(0)}
.shell.collapsed .main{margin-left:0}
.shell.collapsed .hamburger{display:inline-flex}
.shell.collapsed .sidebar-backdrop.show{display:block}

/* ---------- modal (ชำระเงิน) ---------- */
.modal-overlay{position:fixed;inset:0;background:rgba(15,23,42,.55);backdrop-filter:blur(3px);
  display:none;align-items:center;justify-content:center;z-index:60;padding:18px}
.modal-overlay.show{display:flex}
.modal{background:#fff;border-radius:22px;box-shadow:var(--shadow-lg);width:100%;max-width:470px;
  overflow:hidden;animation:pop .18s ease;max-height:94vh;display:flex;flex-direction:column}
@keyframes pop{from{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}
.modal .mhd{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;flex-shrink:0}
.modal .mhd h3{margin:0;font-size:18px}
.modal .mbd{padding:22px;overflow-y:auto}
.modal .close{background:none;border:0;cursor:pointer;color:var(--text-muted);padding:4px;border-radius:8px}
.modal .close:hover{background:var(--surface-2)}
.due{text-align:center;background:linear-gradient(135deg,#eef2ff,#f5f3ff);border-radius:16px;padding:18px;margin-bottom:18px}
.due .lbl{color:var(--text-muted);font-size:13px}
.due .amt{font-size:36px;font-weight:800;color:var(--primary-600);letter-spacing:-.02em;line-height:1.1}
.pm-tabs{display:flex;gap:8px;margin-bottom:18px}
.pm-tabs button{flex:1;padding:12px 6px;border-radius:12px;border:1px solid var(--border-strong);background:#fff;
  cursor:pointer;font-weight:600;font-family:inherit;color:var(--text-muted);font-size:14px;transition:.12s}
.pm-tabs button.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-600)}
.received-input{font-size:24px!important;font-weight:700;text-align:right}
.quick-cash{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.quick-cash button{padding:13px 6px;border-radius:12px;border:1px solid var(--border-strong);background:#fff;
  cursor:pointer;font-weight:700;font-family:inherit;font-size:15px;transition:.12s}
.quick-cash button:hover{background:var(--primary-soft);border-color:var(--primary);color:var(--primary-600)}
.quick-cash .exact{grid-column:span 3;background:var(--primary-soft);color:var(--primary-600);border-color:var(--primary)}
.change-row{display:flex;justify-content:space-between;align-items:center;font-size:20px;font-weight:800;
  padding:14px 0 4px;border-top:1px dashed var(--border-strong);margin-top:10px}
.change-row .neg{color:var(--red)}
.change-row .change-amt{color:var(--green)}

/* section title inside content */
.sec-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:12px}
.sec-title h3{margin:0;font-size:17px}

.grid-dash{grid-template-columns:1.6fr 1fr}
@media(max-width:900px){.grid-dash{grid-template-columns:1fr}}

/* ---------- หน้าตั้งค่าร้าน (แท็บ) ---------- */
.settings-layout{align-items:start}
.settings-main{min-width:0}
.settings-aside{position:sticky;top:12px}
.settings-tabs{
  display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px
}
.settings-tab{
  display:inline-flex;align-items:center;gap:7px;padding:10px 16px;border-radius:12px;
  border:1px solid var(--border-strong);background:#fff;cursor:pointer;font-weight:600;
  font-family:inherit;font-size:14px;color:var(--text-muted);transition:.12s;white-space:nowrap
}
.settings-tab:hover{border-color:var(--primary);color:var(--primary-600);background:var(--primary-soft)}
.settings-tab.active{border-color:var(--primary);background:var(--primary-soft);color:var(--primary-600)}
.settings-tab svg{flex-shrink:0}
.settings-panel{display:none;margin-bottom:0}
.settings-panel.active{display:block}
.settings-panel .panel-desc{
  margin:-4px 0 18px;font-size:14px;color:var(--text-muted);line-height:1.55
}
.settings-group{
  padding:16px 18px;border:1px solid var(--border);border-radius:14px;
  background:var(--surface-2,#f8fafc);margin-bottom:14px
}
.settings-group:last-child{margin-bottom:0}
.settings-group-hd{
  display:flex;align-items:center;gap:8px;margin:0 0 14px;font-size:15px;font-weight:700;color:var(--text)
}
.settings-group-hd svg{color:var(--primary-600)}
.secret-saved{margin:6px 0 0;font-size:13px;color:#16a34a;display:flex;align-items:center;gap:6px}
.settings-row-2{display:flex;gap:12px;flex-wrap:wrap}
.settings-row-2 .field{flex:1;min-width:180px}
.logo-row{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.settings-save-bar{
  position:sticky;bottom:12px;margin-top:18px;padding:14px 18px;
  background:#fff;border:1px solid var(--border);border-radius:14px;
  box-shadow:0 8px 28px rgba(2,6,23,.08);display:flex;align-items:center;
  justify-content:space-between;gap:12px;flex-wrap:wrap;z-index:5
}
.settings-save-bar .hint{font-size:13px;color:var(--text-muted)}
.settings-danger-zone{display:flex;flex-direction:column;gap:14px}
.settings-danger-item{
  display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:14px 16px;border:1px solid color-mix(in srgb,var(--danger,#dc2626) 35%,var(--border));
  border-radius:var(--radius);background:color-mix(in srgb,var(--danger,#dc2626) 6%,transparent);
}
.settings-danger-item strong{display:flex;align-items:center;gap:6px;color:var(--danger,#dc2626)}
.settings-danger-item .hint{margin:4px 0 0;font-size:13px}
.settings-danger-form{flex-shrink:0;align-self:center}
.settings-danger-reset{
  border-color:color-mix(in srgb,var(--danger,#dc2626) 55%,var(--border));
  background:color-mix(in srgb,var(--danger,#dc2626) 10%,transparent);
}

/* product search combobox (ใบรับเข้า) */
.product-search{position:relative;min-width:220px}
.po-table-wrap{overflow:visible}
#poLines td{overflow:visible;vertical-align:top}
.product-search-dropdown{
  display:none;position:fixed;z-index:2000;max-height:min(280px,50vh);overflow-y:auto;
  background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-lg)
}
.product-search-dropdown.open{display:block}
.product-search-item{
  display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:10px 12px;
  border:0;background:none;cursor:pointer;font:inherit;text-align:left
}
.product-search-item:hover,.product-search-item.active{background:var(--primary-soft)}
.product-search-item .ps-barcode{font-size:12px;color:var(--text-muted)}
.product-search-empty{padding:12px 14px;font-size:13px;color:var(--text-muted)}

@media(max-width:900px){
  .settings-aside{position:static}
  .settings-tabs{overflow-x:auto;flex-wrap:nowrap;padding-bottom:4px;-webkit-overflow-scrolling:touch}
  .settings-tab{flex-shrink:0}
}

/* mini bar chart (dashboard) */
.chart{display:flex;align-items:flex-end;gap:10px;height:180px;padding-top:10px}
.chart .bar{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;justify-content:flex-end}
.chart .bar .fill{width:100%;max-width:46px;background:var(--grad);border-radius:9px 9px 0 0;min-height:4px;transition:height .5s ease;position:relative}
.chart .bar .fill:hover::after{content:attr(data-v);position:absolute;top:-26px;left:50%;transform:translateX(-50%);
  background:#0f172a;color:#fff;font-size:11px;padding:3px 8px;border-radius:6px;white-space:nowrap}
.chart .bar .lbl{font-size:11px;color:var(--text-muted)}

/* ---------- POS ---------- */
.pos{display:grid;grid-template-columns:1fr 400px;gap:20px;align-items:stretch}
@media(max-width:1020px){.pos{grid-template-columns:1fr}}
.prod-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}

/* คอลัมน์สินค้า: เต็มความกว้าง แผงบิลล่าสุดอยู่ด้านล่าง */
.pos-products{display:flex;flex-direction:column;min-height:0;min-width:0}
.pos-products-main{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;height:100%}
.pos-products-main > .input-group,
.pos-products-main > .hint,
.pos-products-main > .pos-tabs{flex-shrink:0}
.pos-products-main > .prod-grid{
  flex:1;min-height:0;overflow-y:auto;align-content:start;
  border:1px solid var(--border);border-radius:14px;background:var(--surface,#fff);
  box-shadow:var(--shadow-sm);padding:14px;scrollbar-width:thin
}
.pos-products-main > .prod-grid::-webkit-scrollbar{width:9px}
.pos-products-main > .prod-grid::-webkit-scrollbar-thumb{background:var(--border-strong);border-radius:8px;border:2px solid var(--surface,#fff)}
.pos-products-main > .prod-grid::-webkit-scrollbar-track{background:transparent}
@media(max-width:1020px){
  .pos-products-main > .prod-grid{max-height:55vh}
}

/* แผงบิลล่าสุด / ขายดีวันนี้ — แถบด้านล่างกริดสินค้า */
.pos-panel{
  flex-shrink:0;display:grid;grid-template-columns:1fr 1fr;gap:10px;
  margin-top:10px;max-height:132px;min-height:0
}
.pos-panel-sec{
  min-height:0;display:flex;flex-direction:column;
  border:1px solid var(--border);border-radius:12px;background:var(--surface,#fff);
  box-shadow:var(--shadow-sm);overflow:hidden
}
.pos-panel-hd{
  padding:8px 11px;font-size:12px;font-weight:700;color:var(--text-muted);
  border-bottom:1px solid var(--border);display:flex;align-items:center;gap:6px;flex-shrink:0
}
.pos-mini-list{flex:1;min-height:0;overflow-y:auto;padding:5px 6px;display:flex;flex-direction:column;gap:4px}
.pos-mini-empty{padding:10px 8px;text-align:center;font-size:12px;color:var(--text-soft)}
.pos-mini-item{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:7px 8px;border:1px solid var(--border);border-radius:9px;
  background:#fff;text-decoration:none;color:inherit;font-family:inherit;
  font-size:12px;transition:.12s;cursor:pointer;text-align:left;width:100%
}
a.pos-mini-item:hover,.pos-mini-add:hover{border-color:var(--primary);background:var(--primary-soft)}
.pos-mini-item .pmi-l{flex:1;min-width:0}
.pos-mini-item .pmi-l strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos-mini-item .pmi-l span{display:block;font-size:11px;color:var(--text-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos-mini-item .pmi-r{font-weight:700;color:var(--primary-600);flex-shrink:0;font-size:12px}
.pos-mini-add .pmi-r{
  width:22px;height:22px;border-radius:7px;background:var(--primary-soft);color:var(--primary-600);
  display:flex;align-items:center;justify-content:center;font-weight:800
}
@media(max-width:768px){
  .pos-panel{grid-template-columns:1fr;max-height:none}
  .pos-panel-sec{max-height:120px}
}

/* แถบแบ่งหน้าสินค้า */
.pos-pager{display:flex;align-items:center;justify-content:center;gap:14px;padding:10px 4px 2px}
.pos-pager .pg-btn{padding:8px 16px;border-radius:10px;border:1px solid var(--border-strong);background:#fff;
  cursor:pointer;font-family:inherit;font-weight:600;font-size:13.5px;color:var(--text);transition:.12s}
.pos-pager .pg-btn:hover:not(:disabled){border-color:var(--primary);color:var(--primary-600);background:var(--primary-soft)}
.pos-pager .pg-btn:disabled{opacity:.4;cursor:not-allowed}
.pos-pager .pg-info{font-size:13.5px;font-weight:700;color:var(--text-muted);min-width:90px;text-align:center}

/* ===== หน้าขายเต็มจอ (POS app-style: พอดี viewport ไม่มี scroll ของทั้งหน้า) ===== */
body.pos-page{overflow:hidden;height:100vh;height:100dvh}
body.pos-page .shell{height:100%;min-height:0;overflow:hidden}
body.pos-page .main{height:100%;overflow:hidden;display:flex;flex-direction:column}
body.pos-page .topbar{flex-shrink:0}
body.pos-page .content{
  flex:1;min-height:0;overflow:hidden;
  padding:12px 16px 14px;display:flex;flex-direction:column;gap:10px
}
body.pos-page .content > .alert{flex-shrink:0;margin:0}
body.pos-page .promo-bar{flex-shrink:0;margin-bottom:0}
body.pos-page .pos{
  flex:1;min-height:0;height:100%;min-width:0;
  grid-template-columns:minmax(0,1fr) minmax(320px,400px);gap:16px;align-items:stretch
}
body.pos-page .pos-products{height:100%;min-width:0;overflow:hidden}
body.pos-page .pos-products-main{height:100%;min-height:0}
/* ในโหมดเต็มจอ กล่องสินค้าเลื่อนได้ + แบ่งหน้า */
body.pos-page .pos-products-main > .prod-grid{flex:1;min-height:0;overflow-y:auto}
body.pos-page .pos-panel{flex-shrink:0}
body.pos-page .pos-pager{flex-shrink:0}
body.pos-page .cart{
  position:relative;top:auto;height:100%;max-height:100%;min-width:0;
  display:flex;flex-direction:column;min-height:0
}
body.pos-page .cart .hd,
body.pos-page .cart .pos-customer,
body.pos-page .cart .shift-lock,
body.pos-page .cart .ft{flex-shrink:0}
body.pos-page .cart .items{flex:1;min-height:0;max-height:none;overflow-y:auto}
body.pos-page .cart .ft{max-height:min(52vh,420px);overflow-y:auto;overscroll-behavior:contain}

@media(max-width:1020px){
  body.pos-page .pos{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;height:100%}
  body.pos-page .pos-products-main > .prod-grid{max-height:none}
  body.pos-page .cart{height:auto;max-height:min(48vh,520px)}
  body.pos-page .cart .ft{max-height:none}
}
.prod{background:#fff;border:1px solid var(--border);border-radius:15px;padding:16px;cursor:pointer;
  transition:.15s;position:relative;overflow:hidden}
.prod::after{content:"+";position:absolute;top:10px;right:12px;width:24px;height:24px;border-radius:8px;background:var(--primary-soft);
  color:var(--primary-600);display:flex;align-items:center;justify-content:center;font-weight:700;opacity:0;transition:.15s}
.prod:hover{border-color:var(--primary);box-shadow:var(--shadow);transform:translateY(-3px)}
.prod:hover::after{opacity:1}
.prod .thumb{height:64px;border-radius:11px;background:linear-gradient(135deg,#eef2ff,#f5f3ff);display:flex;align-items:center;justify-content:center;
  color:var(--primary);font-size:24px;font-weight:800;margin-bottom:11px}
.prod .nm{font-weight:600;font-size:14px;min-height:40px;line-height:1.4}
.prod .pr{color:var(--primary-600);font-weight:800;margin-top:4px;font-size:16px}
.prod .st{color:var(--text-soft);font-size:12px;margin-top:2px}
.prod.has-promo{border-color:#fca5a5}
.prod .promo-tag{position:absolute;top:10px;left:10px;z-index:2;background:var(--red,#dc2626);color:#fff;
  font-size:11px;font-weight:700;padding:2px 8px;border-radius:8px}
.prod::after{display:none}
.prod .pin-btn{position:absolute;top:8px;right:8px;z-index:3;width:28px;height:28px;border-radius:9px;
  border:1px solid var(--border);background:#fff;color:var(--text-soft);cursor:pointer;display:flex;
  align-items:center;justify-content:center;padding:0;transition:.12s}
.prod .pin-btn:hover{border-color:var(--amber-text,#b45309);color:var(--amber-text,#b45309)}
.prod .pin-btn.on{background:#fef3c7;border-color:#f59e0b;color:#b45309}
.prod .pin-btn.on svg{fill:#f59e0b}

/* แถบแท็บกรองสินค้าบนหน้าขาย */
.pos-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.pos-tabs .chip{display:inline-flex;align-items:center;gap:5px;padding:7px 14px;border-radius:999px;
  border:1px solid var(--border-strong);background:#fff;color:var(--text-muted);font-family:inherit;
  font-size:13.5px;font-weight:600;cursor:pointer;transition:.12s;white-space:nowrap}
.pos-tabs .chip:hover{border-color:var(--primary);color:var(--primary-600)}
.pos-tabs .chip.active{background:var(--primary);border-color:var(--primary);color:#fff}
.pos-tabs .chip-star.active{background:#f59e0b;border-color:#f59e0b}
.pos-tabs .chip-promo.active{background:var(--red,#dc2626);border-color:var(--red,#dc2626)}
.prod .pr .old{color:var(--text-soft);text-decoration:line-through;font-weight:600;font-size:12.5px;margin-right:5px}
.prod .pr .now{color:var(--red,#dc2626)}

/* สวิตช์เปิดโปรราคาในฟอร์มสินค้า */
.promo-switch{display:flex;align-items:center;gap:10px;cursor:pointer;font-weight:600;margin-bottom:14px}
.promo-switch input{width:18px;height:18px;flex-shrink:0}
.cart{background:#fff;border:1px solid var(--border);border-radius:var(--radius);position:sticky;top:84px;box-shadow:var(--shadow-sm);overflow:hidden}
.cart .hd{padding:14px 16px;border-bottom:1px solid var(--border);font-weight:700;font-size:16px;display:flex;align-items:center;justify-content:space-between;gap:9px}
.cart .hd .hd-title{display:flex;align-items:center;gap:9px}
.cart-tools{display:flex;gap:6px}
.cart-tools .btn{padding:6px 9px;font-size:12.5px;font-weight:600}
.cart-tools .cnt{display:inline-block;min-width:17px;padding:0 4px;border-radius:9px;background:var(--primary-soft);color:var(--primary-600);font-size:11.5px;text-align:center}

/* รายการบิลที่พักไว้ */
.hold-list{display:flex;flex-direction:column;gap:10px;max-height:60vh;overflow:auto}
.hold-item{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface,#fff)}
.hold-item .hi-main{flex:1;min-width:0}
.hold-item .hi-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.hold-item .hi-top strong{font-size:14.5px}
.hold-item .hi-top span{font-size:12px;color:var(--text-soft);flex-shrink:0}
.hold-item .hi-sub{font-size:12.5px;color:var(--text-muted);margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hold-item .hi-act{display:flex;gap:6px;flex-shrink:0}

/* ประวัติการขายรายวัน */
.daily-bar{display:flex;gap:8px;align-items:center;margin-bottom:12px}
.daily-sum{display:flex;gap:12px;margin-bottom:12px}
.daily-sum > div{flex:1;background:var(--surface-2);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:3px}
.daily-sum span{font-size:12.5px;color:var(--text-muted)}
.daily-sum strong{font-size:18px;color:var(--text)}
.daily-list{display:flex;flex-direction:column;gap:8px;max-height:50vh;overflow:auto}
.daily-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border:1px solid var(--border);border-radius:11px;text-decoration:none;color:var(--text);transition:.12s}
.daily-item:hover{border-color:var(--primary);background:var(--primary-soft)}
.daily-item .di-l{display:flex;flex-direction:column;gap:2px;min-width:0}
.daily-item .di-l strong{font-size:14px}
.daily-item .di-l span{font-size:12px;color:var(--text-soft)}
.daily-item .di-r{font-weight:800;font-size:14.5px;flex-shrink:0;display:flex;align-items:center;gap:6px}
.daily-item .di-r.strike{color:var(--text-soft);text-decoration:line-through}
.daily-item .db{font-size:11px;font-weight:700;padding:2px 7px;border-radius:7px}
.daily-item .db.voided{background:#fee2e2;color:#dc2626}
.daily-item .db.refunded{background:#fef3c7;color:#b45309}

/* คู่ค่า key-value (หน้ารายละเอียดรอบ) */
.kv{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 0;font-size:14px}
.kv span{color:var(--text-muted)}
.kv strong{font-weight:700}
.kv.total{border-top:1px dashed var(--border-strong);margin-top:6px;padding-top:11px;font-size:15.5px}
.kv.total strong{color:var(--primary-600)}

/* แถบปุ่มรอบขายที่กำลังเปิด */
.cart-tools #shiftBtn.shift-on{background:#dcfce7;border-color:#86efac;color:#166534}

/* Modal รอบขาย/ลิ้นชัก */
.shift-cur{background:var(--surface-2);border-radius:13px;padding:14px 16px;margin-bottom:14px}
.shift-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 0;font-size:14px}
.shift-row span{color:var(--text-muted)}
.shift-row.total{border-top:1px dashed var(--border-strong);margin-top:8px;padding-top:10px;font-size:16px}
.shift-row.total strong{color:var(--primary-600)}
.shift-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:10px 0}
.shift-grid > div{background:#fff;border:1px solid var(--border);border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:2px}
.shift-grid span{font-size:11.5px;color:var(--text-soft)}
.shift-grid strong{font-size:14px}
.shift-sec{border-top:1px solid var(--border);padding-top:14px;margin-top:14px}
.shift-sec-hd{font-weight:700;font-size:14px;margin-bottom:10px}
.mv-row{display:flex;gap:8px}
.mv-row #mvType{max-width:120px;flex-shrink:0}
.shift-result{border-radius:11px;padding:12px 14px;margin-bottom:14px;font-size:14px;line-height:1.6}
.shift-result.ok{background:#dcfce7;color:#166534}
.shift-result.over{background:#fef3c7;color:#b45309}
.shift-result.short{background:#fee2e2;color:#b91c1c}
@media(max-width:480px){ .shift-grid{grid-template-columns:1fr 1fr} }

/* ---------- รายงาน ---------- */
.report-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.report-card{display:flex;flex-direction:column;gap:10px;padding:22px 20px;border-radius:var(--radius);
  border:1px solid var(--border);background:var(--surface);text-decoration:none;color:var(--text);
  box-shadow:var(--shadow-sm);transition:.15s}
.report-card:hover{border-color:var(--primary);box-shadow:var(--shadow);transform:translateY(-2px)}
.report-card .rc-ico{width:52px;height:52px;border-radius:14px;display:flex;align-items:center;justify-content:center;margin-bottom:4px}
.report-card h3{margin:0;font-size:17px;font-weight:700}
.report-card p{margin:0;font-size:13.5px;color:var(--text-muted);line-height:1.45}
.report-filter{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px;
  padding:16px 18px;margin-bottom:20px;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface)}
.report-filter .rf-dates{display:flex;flex-wrap:wrap;gap:12px}
.report-filter label{display:flex;flex-direction:column;gap:5px;font-size:12.5px;font-weight:600;color:var(--text-muted)}
.report-filter .input{max-width:170px;padding:8px 11px}
.report-filter .rf-actions{display:flex;flex-wrap:wrap;gap:8px}

/* ---------- พิมพ์รายงาน / บันทึก PDF (A4) ---------- */
.report-print-head{display:none;text-align:center;padding:0 0 18px;margin-bottom:22px;border-bottom:2px solid #1e293b}
.report-print-head .rp-logo{width:56px;height:56px;border-radius:12px;object-fit:cover;margin-bottom:8px}
.report-print-head .rp-shop{margin:0;font-size:22px;font-weight:800;color:#0f172a;letter-spacing:-.02em}
.report-print-head .rp-title{margin:6px 0 0;font-size:15px;font-weight:600;color:#334155}
.report-print-head .rp-meta{margin-top:8px;font-size:12px;color:#64748b;display:flex;flex-wrap:wrap;justify-content:center;gap:6px 12px}
.report-print-head .rp-sep{color:#cbd5e1}
.report-print-foot{display:none;margin-top:28px;padding-top:10px;border-top:1px solid #cbd5e1;font-size:10px;color:#94a3b8;text-align:center;line-height:1.5}
.report-doc{max-width:100%}

@page{
  size:A4 portrait;
  margin:14mm 12mm 16mm 12mm;
}

@media print{
  /* ซ่อน UI ระบบ */
  body.report-page .sidebar,
  body.report-page .sidebar-backdrop,
  body.report-page .topbar,
  body.report-page .report-filter,
  body.report-page .no-print{display:none!important}
  body.report-page .shell{display:block!important}
  body.report-page .main{margin:0!important;width:100%!important;max-width:100%!important}
  body.report-page .content{padding:0!important;max-width:100%!important}

  /* หัว/ท้ายเอกสารรายงาน */
  .report-print-head{display:block!important}
  .report-print-foot{display:block!important;break-inside:avoid;page-break-inside:avoid}

  /* การ์ดและสรุปตัวเลข */
  .report-doc .card,
  .report-doc .stat{
    box-shadow:none!important;
    border:1px solid #cbd5e1!important;
    break-inside:avoid;
    page-break-inside:avoid;
    background:#fff!important;
  }
  .report-doc .stat{padding:12px 14px!important}
  .report-doc .stat .ico{display:none!important}
  .report-doc .stat .label{font-size:10px!important;color:#64748b!important;text-transform:uppercase;letter-spacing:.03em}
  .report-doc .stat .value{font-size:17px!important;color:#0f172a!important;font-weight:800!important}

  .report-doc .grid-4{grid-template-columns:repeat(4,1fr)!important;gap:10px!important}
  .report-doc .grid-3{grid-template-columns:repeat(3,1fr)!important;gap:10px!important}
  .report-doc .grid-2{grid-template-columns:1fr 1fr!important;gap:12px!important}

  /* ตาราง — อ่านง่ายบน PDF */
  .report-doc .table{
    width:100%!important;
    font-size:11px!important;
    box-shadow:none!important;
    border-collapse:collapse!important;
  }
  .report-doc .table thead{
    background:#f1f5f9!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .report-doc .table th,
  .report-doc .table td{
    border:1px solid #cbd5e1!important;
    padding:7px 9px!important;
    color:#0f172a!important;
  }
  .report-doc .table th{font-weight:700!important;font-size:10.5px!important}
  .report-doc .table tfoot td{font-weight:700!important;background:#f8fafc!important}
  .report-doc .table-wrap{overflow:visible!important}

  /* ซ่อนองค์ประกอบที่ไม่จำเป็นบน PDF */
  .report-doc .chart,
  .report-doc .empty .big,
  .report-doc a.btn,
  .report-doc .hint{display:none!important}
  .report-doc .empty{padding:24px!important;font-size:12px!important}

  /* หัวข้อส่วน */
  .report-doc .sec-title h3,
  .report-doc .report-section-title{
    font-size:13px!important;
    font-weight:700!important;
    margin:0!important;
    color:#0f172a!important;
  }
  .report-doc .sec-title{margin-bottom:10px!important;padding-bottom:6px!important;border-bottom:1px solid #e2e8f0!important}

  /* badge ให้เห็นชัดตอนพิมพ์ */
  .report-doc .badge{
    border:1px solid currentColor!important;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  /* แถวสุดท้ายที่เป็นปุ่ม — ซ่อนคอลัมน์ action */
  .report-doc .table th:last-child:empty,
  .report-doc .table td:last-child .btn{display:none!important}

  /* บังคับสีพื้นหลัง */
  html,body{background:#fff!important;color:#0f172a!important}
  -webkit-print-color-adjust:exact;
  print-color-adjust:exact;
}

/* หัวใบสรุปรอบขาย (หน้า shifts/show) */
.print-only{display:none}
@media print{
  .print-only{display:block}
  .print-head{text-align:center;margin-bottom:14px;padding-bottom:12px;border-bottom:2px solid #1e293b}
  .print-head h2{margin:0 0 4px;font-size:20px;font-weight:800}
  .print-head div{font-size:13px;color:#334155}
}

/* แบนเนอร์บังคับเปิดรอบก่อนขาย */
.shift-lock{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 16px;
  padding:10px 14px;border-radius:11px;background:var(--red-soft);color:#b91c1c;font-weight:600;font-size:13.5px}
.shift-lock span{display:flex;align-items:center;gap:7px}
.btn.is-disabled,.btn:disabled{opacity:.5;cursor:not-allowed;box-shadow:none;filter:grayscale(.2)}
.cart .items{max-height:42vh;overflow:auto}
.cart-item{display:flex;align-items:center;gap:10px;padding:12px 18px;border-bottom:1px solid var(--surface-2)}
.cart-item .nm{flex:1;font-size:14px;font-weight:500}
.cart-item .nm small{color:var(--text-muted);font-weight:400}
.qty{display:flex;align-items:center;gap:8px}
.qty button{width:28px;height:28px;border-radius:9px;border:1px solid var(--border-strong);background:#fff;cursor:pointer;font-weight:700;color:var(--text);transition:.12s}
.qty button:hover{background:var(--primary-soft);border-color:var(--primary);color:var(--primary-600)}
.qty span{min-width:22px;text-align:center;font-weight:600}
.cart .ft{padding:18px;background:var(--surface-2)}
.line{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:14px;color:var(--text-muted)}
.line span:last-child{color:var(--text);font-weight:600}
.line.total{font-size:22px;font-weight:800;color:var(--text);border-top:1px dashed var(--border-strong);padding-top:13px;margin-top:6px}
.disc-control{display:flex;align-items:center;gap:8px}
.disc-toggle{display:inline-flex;border:1px solid var(--border-strong);border-radius:9px;overflow:hidden;background:#fff}
.disc-toggle button{width:34px;height:32px;border:0;background:#fff;cursor:pointer;font-weight:700;color:var(--text-muted);font-family:inherit;transition:.12s}
.disc-toggle button+button{border-left:1px solid var(--border-strong)}
.disc-toggle button.active{background:var(--primary);color:#fff}
.line.disc-calc{font-size:12.5px;color:var(--amber-text,#b45309);margin-top:-4px}
.line.disc-calc span:last-child{color:#b45309;font-weight:700}
.line.total span:last-child{color:var(--primary-600)}
.empty{padding:48px 20px;text-align:center;color:var(--text-muted)}
.empty .big{font-size:40px;margin-bottom:10px;opacity:.4}

/* image preview / thumbnails */
.img-preview{width:88px;height:88px;border-radius:14px;border:1px solid var(--border);background:var(--surface-2);
  display:flex;align-items:center;justify-content:center;overflow:hidden;color:var(--text-soft);flex-shrink:0}
.img-preview img{width:100%;height:100%;object-fit:cover}
.thumb-sm{width:42px;height:42px;border-radius:10px;object-fit:cover;border:1px solid var(--border);background:var(--surface-2);vertical-align:middle}
.thumb-ph{width:42px;height:42px;border-radius:10px;background:linear-gradient(135deg,#eef2ff,#f5f3ff);
  display:inline-flex;align-items:center;justify-content:center;color:var(--primary);font-weight:700}
input[type=file]{font-size:13px;font-family:inherit}
input[type=file]::file-selector-button{padding:8px 14px;border-radius:9px;border:1px solid var(--border-strong);
  background:#fff;font-family:inherit;font-weight:600;color:var(--text);cursor:pointer;margin-right:10px}
input[type=file]::file-selector-button:hover{background:var(--surface-2)}

/* receipt */
.receipt{max-width:420px;margin:0 auto}
@media print{.sidebar,.topbar,.page-head .btn,.no-print{display:none!important}.main{margin:0}.content{padding:0}.card{box-shadow:none;border:0}}

/* ใบเสร็จเด้งในหน้าขาย (POP UP) */
.modal-receipt{max-width:400px}
.receipt-paper{background:#fff;color:#111;padding:6px 4px 2px;font-size:13px}
.receipt-paper .rcpt-head{text-align:center;border-bottom:1px dashed #cbd5e1;padding-bottom:12px;margin-bottom:10px}
.receipt-paper .rcpt-head img{width:58px;height:58px;border-radius:12px;object-fit:cover;margin-bottom:6px}
.receipt-paper .rcpt-head h2{margin:0;font-size:18px}
.receipt-paper .rcpt-sub{color:#64748b;font-size:12.5px}
.receipt-paper .rcpt-meta{color:#64748b;font-size:12px;margin-top:5px}
.rcpt-table{width:100%;border-collapse:collapse;margin-bottom:8px}
.rcpt-table td{padding:4px 4px;vertical-align:top;border-bottom:1px solid #f1f5f9}
.rcpt-table tr.h td{font-weight:700;color:#475569;border-bottom:1px solid #e2e8f0}
.rcpt-table td.c{text-align:center;white-space:nowrap}
.rcpt-table td.r{text-align:right;white-space:nowrap}
.rcpt-sum{padding:6px 4px 0;border-top:1px dashed #cbd5e1}
.rcpt-sum .l{display:flex;justify-content:space-between;gap:10px;padding:2px 0;font-size:13px}
.rcpt-sum .l.promo{color:#7c3aed;font-size:12.5px}
.rcpt-sum .l.total{font-weight:800;font-size:17px;margin-top:6px;border-top:1px solid #e2e8f0;padding-top:8px}
.rcpt-foot{text-align:center;color:#64748b;font-size:12px;margin-top:12px;border-top:1px dashed #cbd5e1;padding-top:10px}
.receipt-paper .rcpt-hd-text{font-weight:700;margin-bottom:3px}
.done-actions{margin-top:16px}

/* สวิตช์เลือกข้อมูลที่แสดงบนใบเสร็จ (หน้าตั้งค่า) */
.rcpt-switches{display:flex;flex-wrap:wrap;gap:8px}
.rcpt-switch{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border:1px solid var(--border-strong);
  border-radius:10px;cursor:pointer;font-size:13.5px;font-weight:600;color:var(--text-muted);transition:.12s}
.rcpt-switch:has(input:checked){border-color:var(--primary);background:var(--primary-50,#eef4ff);color:var(--primary-600)}
.rcpt-switch input{cursor:pointer}

/* พิมพ์เฉพาะใบเสร็จในหน้าขาย */
@media print{
  body.printing-receipt>*{visibility:hidden!important}
  body.printing-receipt #doneModal{visibility:visible!important;position:absolute;inset:0;background:#fff;display:block!important;padding:0}
  body.printing-receipt #doneModal .modal{box-shadow:none;border:0;max-width:none;width:100%;margin:0;transform:none}
  body.printing-receipt #doneModal .mbd{padding:0}
  body.printing-receipt #doneModal .no-print{display:none!important}
  body.printing-receipt #rcptArea,body.printing-receipt #rcptArea *{visibility:visible!important}
}

/* ---------- Thermal 80/58mm ---------- */
.receipt-paper.thermal-receipt-active,
#saleReceipt.thermal-receipt-active{
  max-width:none;width:100%;margin:0;padding:4px 2px;font-size:13px;line-height:1.4
}
.receipt-paper.thermal-receipt-active .rcpt-head img,
#saleReceipt.thermal-receipt-active img{max-width:56px;max-height:56px}
.receipt-paper.thermal-receipt-active .rcpt-table td,
#saleReceipt.thermal-receipt-active .table th,
#saleReceipt.thermal-receipt-active .table td{font-size:12.5px;padding:3px 2px}
@media print{
  html.thermal-printing,
  body.thermal-printing{
    width:80mm!important;min-width:80mm!important;max-width:80mm!important;
    margin:0!important;padding:0!important;background:#fff!important
  }
  html.thermal-printing.thermal-mm-58,
  body.thermal-printing.thermal-mm-58{
    width:58mm!important;min-width:58mm!important;max-width:58mm!important
  }
  body.thermal-printing .shell,
  body.thermal-printing .main,
  body.thermal-printing .content{
    width:100%!important;max-width:none!important;margin:0!important;padding:0!important
  }
  body.thermal-printing .sidebar,
  body.thermal-printing .topbar,
  body.thermal-printing .page-head,
  body.thermal-printing .no-print{display:none!important}
  body.thermal-printing .grid-dash{display:block!important}
  body.thermal-printing .grid-dash > .no-print{display:none!important}
  body.thermal-printing .card{box-shadow:none!important;border:0!important;padding:0!important;border-radius:0!important}
  body.thermal-printing .receipt{max-width:none!important;margin:0!important}
  body.thermal-printing #rcptArea,
  body.thermal-printing #saleReceipt,
  body.thermal-printing .thermal-receipt-active{
    display:block!important;width:100%!important;max-width:100%!important;
    margin:0!important;padding:2mm 1.5mm!important;
    font-size:13px!important;line-height:1.4!important;color:#000!important;
    box-sizing:border-box!important;-webkit-print-color-adjust:exact;print-color-adjust:exact
  }
  body.thermal-printing #saleReceipt h2,
  body.thermal-printing .thermal-receipt-active h2{font-size:17px!important}
  body.thermal-printing #saleReceipt .table,
  body.thermal-printing .thermal-receipt-active .table{width:100%!important;font-size:12.5px!important}
  body.thermal-printing #saleReceipt .table th,
  body.thermal-printing #saleReceipt .table td,
  body.thermal-printing .rcpt-table td,
  body.thermal-printing .thermal-receipt-active .table th,
  body.thermal-printing .thermal-receipt-active .table td{
    font-size:12.5px!important;padding:2px 1px!important;color:#000!important
  }
  body.thermal-printing .line{font-size:13px!important;margin-bottom:5px!important;color:#000!important}
  body.thermal-printing .line.total{font-size:17px!important;padding-top:8px!important}
  body.thermal-printing .line span:last-child{color:#000!important}
  body.thermal-printing [style*="font-size:13px"]{font-size:12px!important}
}

/* toolbar (ค้นหา) */
.toolbar{display:flex;gap:10px;align-items:center;margin-bottom:18px;flex-wrap:wrap}

/* ตัวเลือกโหมดสะสมแต้ม */
.point-modes{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:560px){.point-modes{grid-template-columns:1fr}}
.point-mode{display:flex;align-items:flex-start;gap:10px;padding:14px;border:1.5px solid var(--border-strong);
  border-radius:13px;cursor:pointer;transition:.14s;background:var(--surface)}
.point-mode:hover{border-color:var(--primary)}
.point-mode.active{border-color:var(--primary);background:var(--primary-soft)}
.point-mode input{margin-top:3px}
.point-mode strong{display:block;font-size:14px}
.point-mode .hint{margin:2px 0 0}

/* POS: แผงเลือกลูกค้า + แต้มที่จะได้รับ */
.pos-customer{padding:14px 18px;border-bottom:1px solid var(--border);background:var(--surface)}
.pos-customer .cust-row{display:flex;align-items:center;gap:8px}
.pos-customer .cust-info{flex:1;min-width:0}
.pos-customer .cust-info .nm{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pos-customer .cust-info .pt{font-size:12px;color:var(--text-muted)}
.cust-results{position:relative}
.cust-dropdown{position:absolute;z-index:30;left:0;right:0;top:calc(100% + 4px);background:#fff;border:1px solid var(--border-strong);
  border-radius:12px;box-shadow:0 12px 28px rgba(2,6,23,.14);max-height:240px;overflow:auto}
.cust-dropdown button{display:block;width:100%;text-align:left;padding:10px 14px;border:0;background:none;cursor:pointer;font-family:inherit}
.cust-dropdown button:hover{background:var(--primary-soft)}
.cust-dropdown .nm{font-weight:600;font-size:14px}
.cust-dropdown .meta{font-size:12px;color:var(--text-muted)}
.earn-badge{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px;
  padding:8px 12px;border-radius:10px;background:var(--amber-soft);color:#b45309;font-size:13px;font-weight:700}
.cust-redeem{margin-top:10px;padding-top:10px;border-top:1px dashed var(--border)}
.cust-redeem .redeem-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.cust-redeem .redeem-row label{font-size:12.5px;font-weight:600;color:var(--text-muted);flex-shrink:0}
.cust-redeem .redeem-hint{font-size:11.5px;color:var(--text-soft);flex:1;min-width:0}
.cust-redeem .redeem-preview{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;
  padding:7px 10px;border-radius:9px;background:var(--green-soft,#ecfdf5);font-size:12.5px;color:#15803d}
.cust-redeem .redeem-preview strong{font-weight:700}

/* POS: แถบโปรโมชั่นวน */
.promo-bar{display:flex;align-items:center;gap:12px;margin-bottom:16px;padding:12px 16px;border-radius:14px;
  background:linear-gradient(120deg,#eef2ff,#faf5ff);border:1px solid var(--border)}
.promo-bar .promo-ic{flex-shrink:0;width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  background:#fff;color:var(--primary-600);box-shadow:0 2px 6px rgba(2,6,23,.06)}
.promo-track{flex:1;min-width:0;position:relative;height:42px;overflow:hidden}
.promo-slide{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;
  opacity:0;transform:translateY(8px);transition:opacity .5s,transform .5s;pointer-events:none}
.promo-slide.active{opacity:1;transform:translateY(0)}
.promo-slide strong{font-size:14.5px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.promo-slide span{font-size:12.5px;color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* รายการโปรโมชั่นใน modal */
.promo-list{display:flex;flex-direction:column;gap:14px}
.promo-card{display:flex;gap:14px;border:1px solid var(--border);border-radius:13px;overflow:hidden;background:var(--surface)}
.promo-card img{width:120px;height:auto;object-fit:cover;flex-shrink:0;align-self:stretch}
.promo-card-body{padding:13px 14px;min-width:0}
.promo-card-body strong{display:block;font-size:15px;margin-bottom:4px}
.promo-card-body p{margin:0 0 6px;font-size:13.5px;color:var(--text-muted);line-height:1.5}
.promo-date{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--text-soft)}
.promo-card-top{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:4px}
.promo-card-top strong{margin:0}
.promo-disc{flex-shrink:0;background:var(--red,#dc2626);color:#fff;font-size:12px;font-weight:700;
  padding:2px 9px;border-radius:8px;white-space:nowrap}
.promo-meta{display:flex;flex-wrap:wrap;gap:6px;margin:2px 0 7px}
.promo-chip{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:600;
  color:var(--text-muted);background:var(--surface-2);border:1px solid var(--border);
  padding:2px 9px;border-radius:999px}
.promo-prods{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:7px;font-size:12px}
.promo-prods .lbl{color:var(--text-soft);font-weight:600}
.promo-prod{background:#eef2ff;color:#4338ca;border-radius:7px;padding:2px 8px;font-size:11.5px;font-weight:600}

/* รายการเลือกโปรโมชั่นหลายตัวในตะกร้า */
.promo-apply{padding:10px 0;border-bottom:1px dashed var(--border)}
.promo-apply-hd{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}
.promo-apply-hd>span{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:13.5px}
.promo-auto{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;color:var(--text-muted);cursor:pointer;white-space:nowrap}
.promo-opts{display:flex;flex-direction:column;gap:4px}
.promo-opt{display:flex;align-items:center;gap:8px;padding:6px 9px;border:1px solid var(--border);border-radius:9px;cursor:pointer;transition:.12s}
.promo-opt .t{flex:1;min-width:0;font-size:12.5px;line-height:1.3;display:flex;flex-direction:column}
.promo-opt .t small{color:var(--text-soft);font-size:11px;font-weight:600}
.promo-opt .amt{font-size:12px;font-weight:700;color:var(--red,#dc2626);white-space:nowrap}
.promo-opt.on{border-color:var(--primary);background:var(--primary-50,#eef4ff)}
.promo-opt.off{opacity:.55}
.promo-opt.off .amt{color:var(--text-soft);font-weight:600}
.promo-opt input{flex-shrink:0;cursor:pointer}
.promo-opt input:disabled{cursor:default}

/* ตัวเลือกสินค้าในโปรโมชั่น */
.prod-pick{max-height:240px;overflow:auto;border:1px solid var(--border-strong);border-radius:12px;padding:6px}
.prod-pick-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;cursor:pointer}
.prod-pick-item:hover{background:var(--surface-2)}
.prod-pick-item input{flex-shrink:0}
.prod-pick-item span{flex:1;font-size:14px}
.prod-pick-item small{flex-shrink:0}

/* แพ็กเกจ SaaS — หน้า billing / landing */
.pricing-grid{display:grid;width:100%;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:18px;align-items:stretch}
.pricing-grid-public{max-width:980px;margin:0 auto}
.pricing-card{position:relative;display:flex;flex-direction:column;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow-sm);transition:transform .18s,box-shadow .18s}
.pricing-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}
.pricing-card.pricing-current{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary),var(--shadow-sm)}
.pricing-badge{position:absolute;top:14px;right:14px;font-size:11px;font-weight:700;background:var(--primary-soft);color:var(--primary-700);padding:3px 10px;border-radius:999px}
.pricing-card h3{margin:0 0 8px;font-size:20px;font-weight:800}
.pricing-price{margin:14px 0 6px}
.pricing-price strong{font-size:32px;font-weight:800;letter-spacing:-.02em}
.pricing-price span{font-size:14px;color:var(--text-muted);font-weight:500}
.pricing-feats{list-style:none;margin:14px 0 18px;padding:0;flex:1}
.pricing-feats li{position:relative;padding:5px 0 5px 22px;font-size:14px;color:var(--text-muted);line-height:1.45}
.pricing-feats li::before{content:"";position:absolute;left:0;top:11px;width:8px;height:8px;border-radius:50%;background:var(--primary-400,#818cf8)}
@media(max-width:640px){.pricing-grid{grid-template-columns:1fr}}

/* หน้ากฎหมาย / FAQ / footer */
.legal-body{padding:28px;line-height:1.75}
.legal-body h2{font-size:18px;margin:24px 0 8px}
.legal-body h2:first-child{margin-top:0}
.faq-list{display:flex;flex-direction:column;gap:10px}
.faq-item{padding:16px 18px}
.faq-item summary{cursor:pointer;list-style:none}
.faq-item summary::-webkit-details-marker{display:none}
.footer-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 18px;margin-bottom:4px}
.footer-links a{color:var(--text-muted);font-size:14px;text-decoration:none}
.footer-links a:hover{color:var(--primary-600)}

/* Onboarding wizard */
.onboarding-wrap{min-height:calc(100vh - 120px);display:flex;align-items:center;justify-content:center;padding:32px 16px}
.onboarding-inner{max-width:480px;width:100%}
.onboarding-progress{display:flex;gap:8px;justify-content:center;margin-bottom:28px}
.onboarding-dot{width:10px;height:10px;border-radius:50%;background:var(--border-strong)}
.onboarding-dot.done,.onboarding-dot.active{background:var(--primary-600)}
.onboarding-dot.active{transform:scale(1.25)}
.onboarding-inner h1{font-size:26px;font-weight:800;text-align:center;margin:0 0 8px}
.onboarding-inner .muted{text-align:center}
.onboarding-checklist{list-style:none;margin:0;padding:20px}
.onboarding-checklist li{padding:8px 0;border-bottom:1px solid var(--line)}

/* ============================================================
   Public marketing site (2026 refresh)
   ============================================================ */
.pub-body{background:#fff}
.pub-nav{position:sticky;top:0;z-index:60;background:rgba(255,255,255,.88);backdrop-filter:saturate(180%) blur(14px);border-bottom:1px solid var(--border)}
.pub-nav-inner{display:flex;align-items:center;gap:16px;height:72px}
.pub-brand{font-size:17px;font-weight:800}
.pub-nav-links{display:flex;align-items:center;gap:6px;margin-right:auto;margin-left:24px}
.pub-nav-links a{padding:8px 12px;border-radius:999px;color:var(--text-muted);font-size:14px;font-weight:500;text-decoration:none;transition:.15s}
.pub-nav-links a:hover{color:var(--primary-600);background:var(--primary-soft)}
.pub-nav-actions{display:flex;align-items:center;gap:8px}
.pub-nav-toggle{display:none;margin-left:auto;background:none;border:0;padding:8px;color:var(--text);cursor:pointer}
.pub-nav-mobile{display:none;flex-direction:column;padding:0 22px 16px;border-top:1px solid var(--border);background:#fff}
.pub-nav-mobile a{padding:12px 0;color:var(--text);border-bottom:1px solid var(--border);text-decoration:none;font-weight:500}
.pub-nav-mobile.open{display:flex}
.pub-flash{padding-top:14px}
.maint-banner{background:var(--amber-soft);color:#92400e;padding:10px 22px;text-align:center;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px}

.hero-modern{background:radial-gradient(1200px 600px at 10% -10%,rgba(99,102,241,.35),transparent 60%),
  radial-gradient(900px 500px at 90% 20%,rgba(168,85,247,.25),transparent 55%),var(--grad-dark);
  padding:88px 0 72px}
.hero-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:40px;align-items:center}
.hero-copy .pill{margin-bottom:16px}
.hero-copy h1{font-size:clamp(34px,5vw,54px);line-height:1.08;max-width:none;margin:0}
.hero-copy p{font-size:18px;max-width:520px;margin-top:16px}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:28px}
.btn-hero-primary{background:#fff;color:var(--primary-700)!important;border:0;box-shadow:var(--shadow)}
.btn-hero-primary:hover{transform:translateY(-1px);box-shadow:var(--shadow-lg)}
.btn-hero-ghost{background:transparent;color:#fff!important;border:1px solid rgba(255,255,255,.35)}
.btn-hero-ghost:hover{background:rgba(255,255,255,.08)}
.hero-visual{display:flex;justify-content:center}
.hero-mock{width:min(100%,380px);background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);border-radius:20px;padding:14px;box-shadow:0 30px 60px rgba(0,0,0,.35);backdrop-filter:blur(8px)}
.hero-mock-bar{display:flex;gap:6px;margin-bottom:12px}
.hero-mock-bar span{width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.25)}
.hero-mock-body{background:rgba(15,23,42,.55);border-radius:14px;padding:18px}
.hero-mock-line{height:10px;border-radius:999px;background:rgba(255,255,255,.12);margin-bottom:10px}
.hero-mock-line.w80{width:80%}.hero-mock-line.w60{width:60%}
.hero-mock-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:16px 0}
.hero-mock-cards div{height:52px;border-radius:10px;background:rgba(255,255,255,.08)}
.hero-mock-btn{height:36px;border-radius:10px;background:var(--grad);opacity:.85}

.pub-stats{margin-top:-28px;position:relative;z-index:2;padding-bottom:8px}
.pub-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:22px 28px;box-shadow:var(--shadow)}
.pub-stat{text-align:center}
.pub-stat strong{display:block;font-size:28px;font-weight:800;letter-spacing:-.02em;color:var(--primary-700)}
.pub-stat span{font-size:13px;color:var(--text-muted)}

.pub-section{padding:72px 0}
.pub-section-alt{background:var(--surface-2)}
.pub-section-head{text-align:center;max-width:640px;margin:0 auto 40px}
.pub-section-head h2{font-size:clamp(28px,4vw,36px);font-weight:800}
.pub-section-head p{font-size:17px;color:var(--text-muted);margin-top:10px}
.pub-feature{border:1px solid var(--border);border-radius:var(--radius);padding:26px;background:#fff;transition:.2s}
.pub-feature:hover{transform:translateY(-4px);box-shadow:var(--shadow);border-color:rgba(99,102,241,.25)}
.pub-feature .ico{width:52px;height:52px;border-radius:14px;background:var(--primary-soft);color:var(--primary-600);display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.pricing-featured{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary),var(--shadow)}
.pub-cta{text-align:center;padding:56px 32px;border-radius:calc(var(--radius) + 4px);background:var(--grad-dark);color:#fff}
.pub-cta h2{color:#fff}
.pub-cta-note{margin-top:16px;opacity:.75}

.hero-trust-pills{display:flex;flex-wrap:wrap;gap:10px 16px;margin-top:22px}
.hero-trust-pills span{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:rgba(255,255,255,.82)}
.hero-mock{position:relative}
.hero-float{position:absolute;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.95);color:var(--primary-700);font-size:12px;font-weight:600;box-shadow:0 8px 24px rgba(0,0,0,.2);white-space:nowrap}
.hero-float-a{top:-8px;right:-12px;animation:heroFloat 4s ease-in-out infinite}
.hero-float-b{bottom:12px;left:-16px;animation:heroFloat 4s ease-in-out infinite .8s}
@keyframes heroFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}

.pub-trust-strip{padding:20px 0 8px;background:var(--surface-2);border-bottom:1px solid var(--border)}
.pub-trust-strip-inner{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 14px}
.pub-trust-badge{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;background:#fff;border:1px solid var(--border);border-radius:999px;font-size:13px;font-weight:600;color:var(--text);box-shadow:0 1px 2px rgba(15,23,42,.04)}
.pub-trust-badge svg{color:var(--primary-600);flex-shrink:0}

.pub-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;max-width:960px;margin:0 auto}
.pub-step{display:flex;gap:16px;align-items:flex-start;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow-sm)}
.pub-step-num{flex-shrink:0;width:40px;height:40px;border-radius:50%;background:var(--grad);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px}
.pub-step-body h3{display:flex;align-items:center;gap:8px;font-size:17px;margin:0 0 8px}
.pub-step-body p{margin:0;font-size:14px;color:var(--text-muted);line-height:1.55}
.pub-steps-cta{text-align:center;margin-top:32px}

.pub-trust-grid{max-width:920px;margin:0 auto}
.pub-trust-card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:26px;height:100%}
.pub-trust-ico{width:48px;height:48px;border-radius:14px;background:var(--primary-soft);color:var(--primary-600);display:flex;align-items:center;justify-content:center;margin-bottom:14px}
.pub-trust-card h3{font-size:17px;margin:0 0 8px}
.pub-trust-card p{margin:0;font-size:14px;color:var(--text-muted);line-height:1.55}

.pub-testimonials{align-items:stretch}
.pub-quote{margin:0;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;display:flex;flex-direction:column;gap:12px;height:100%}
.pub-quote-featured{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary),var(--shadow)}
.pub-quote-stars{display:flex;gap:2px;color:#f59e0b}
.pub-quote p{margin:0;font-size:15px;line-height:1.6;color:var(--text);flex:1}
.pub-quote footer{display:flex;flex-direction:column;gap:2px;padding-top:8px;border-top:1px solid var(--border)}
.pub-quote footer strong{font-size:14px}
.pub-quote footer span{font-size:12px;color:var(--text-muted)}

.pub-faq-list{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:10px}
.pub-faq-item{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:0 18px}
.pub-faq-item summary{cursor:pointer;font-weight:600;padding:16px 0;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px}
.pub-faq-item summary::-webkit-details-marker{display:none}
.pub-faq-item summary::after{content:'+';font-size:20px;color:var(--primary-600);font-weight:400}
.pub-faq-item[open] summary::after{content:'−'}
.pub-faq-item p{margin:0 0 16px;font-size:14px;color:var(--text-muted);line-height:1.6}
.pub-faq-more{text-align:center;margin-top:24px}

.pub-cta p{font-size:18px;opacity:.92;max-width:560px;margin:12px auto 24px;color:rgba(255,255,255,.9)}

.pub-footer{background:#0f172a;color:#cbd5e1;padding:48px 0 24px;margin-top:0}
.pub-footer a{color:#94a3b8;text-decoration:none;display:block;padding:4px 0;font-size:14px}
.pub-footer a:hover{color:#fff}
.pub-footer-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:32px;padding-bottom:32px;border-bottom:1px solid rgba(255,255,255,.08)}
.pub-footer .pub-brand{color:#fff;margin-bottom:10px}
.pub-footer-hd{font-weight:700;color:#fff;margin-bottom:10px;font-size:14px}
.pub-footer-contact{margin-top:12px;display:flex;flex-direction:column;gap:6px}
.pub-footer-copy{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;padding-top:20px;font-size:13px;color:#64748b}
.pub-footer-copy a{display:inline;color:#94a3b8;padding:0;margin-left:16px}

.pay-layout{align-items:start}
.pay-qr-card{text-align:center}
.pay-qr-wrap{display:flex;justify-content:center;padding:12px;background:#fff;border-radius:12px;border:1px solid var(--border);margin:12px 0}
#qrBox img{display:block;margin:0 auto}
.pay-amount span{display:block;font-size:13px;color:var(--text-muted)}
.pay-amount strong{font-size:28px;font-weight:800;color:var(--primary-700)}
.pay-dl{display:grid;grid-template-columns:120px 1fr;gap:8px 12px;margin:0;font-size:14px}
.pay-dl dt{color:var(--text-muted);margin:0}
.pay-dl dd{margin:0}
.pay-slip-preview{text-align:center;margin:12px 0}
.slip-lightbox{position:fixed;inset:0;z-index:2000;display:flex;align-items:center;justify-content:center;padding:20px}
.slip-lightbox[hidden]{display:none!important}
.slip-lightbox-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.72)}
.slip-lightbox-panel{position:relative;z-index:1;max-width:min(480px,92vw);max-height:90vh;overflow:auto;background:#fff;border-radius:12px;padding:16px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.slip-lightbox-panel img{display:block;max-width:100%;height:auto;border-radius:8px;border:1px solid var(--border)}
.slip-lightbox-close{position:absolute;top:8px;right:10px;border:0;background:transparent;font-size:28px;line-height:1;cursor:pointer;color:var(--text-muted)}

.maint-page{min-height:calc(100vh - 72px);display:flex;align-items:center;padding:48px 0;background:var(--surface-2)}
.maint-card{max-width:480px;margin:0 auto;text-align:center;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:48px 32px;box-shadow:var(--shadow)}
.maint-icon{width:88px;height:88px;margin:0 auto 20px;border-radius:50%;background:var(--primary-soft);color:var(--primary-600);display:flex;align-items:center;justify-content:center}
.maint-card h1{font-size:28px;font-weight:800;margin-bottom:12px}
.maint-actions{margin-top:24px}

@media(max-width:900px){
  .hero-grid{grid-template-columns:1fr;text-align:center}
  .hero-copy p,.hero-copy h1{margin-left:auto;margin-right:auto}
  .hero-actions{justify-content:center}
  .hero-visual{display:none}
  .pub-nav-links,.pub-nav-actions{display:none}
  .pub-nav-toggle{display:flex}
  .pub-stats-grid{grid-template-columns:1fr;gap:12px;text-align:left}
  .pub-stat{display:flex;align-items:baseline;gap:12px}
  .pub-steps{grid-template-columns:1fr}
  .pub-trust-strip-inner{justify-content:flex-start}
  .hero-trust-pills{justify-content:center}
  .hero-float{display:none}
  .pub-footer-grid{grid-template-columns:1fr;gap:24px}
}
