/* TelePharm Connect — platform site (landing, sign-up, payment, shop account, admin) */
:root {
  --navy: #13293d; --navy-2: #1b2a4a; --ink: #13293d; --ink-2: #4c6275; --muted: #7a8ca3;
  --blue: #2456d6; --blue-600: #1c46b5; --blue-50: #eef3fd; --blue-100: #dbe6fb;
  --cyan: #22c3e6; --mint: #2ee6b6; --mint-50: #e6fbf4; --green: #13a36b;
  --amber: #8a5a00; --amber-50: #fff6e0; --red: #c0392b; --red-50: #fdeeee;
  --bg: #f4f7fc; --line: #e3eaf5; --white: #fff; --radius: 14px;
  --shadow: 0 1px 2px rgba(19, 41, 61, .05), 0 8px 24px rgba(19, 41, 61, .05);
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Anuphan', 'IBM Plex Sans Thai', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--white); font-size: 15.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; line-height: 1.25; color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* header / footer */
.site-head { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-head .container { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-2); font-family: var(--display); font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.nav a:hover { color: var(--blue); }
.nav .login { color: var(--blue); font-weight: 600; }
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; }
.head-right { margin-left: auto; font-size: 14px; color: var(--ink-2); }
.site-foot { border-top: 1px solid var(--line); padding: 22px 0; font-size: 13.5px; color: var(--ink-2); background: var(--white); }
.site-foot .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.site-foot.dark { background: var(--navy-2); color: #c9d5ea; border: 0; }
.site-foot.dark a { color: #e6eeff; }
.site-foot .links { display: flex; flex-wrap: wrap; gap: 18px; }

/* buttons & form */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 20px; font-weight: 600; cursor: pointer; background: var(--white); color: var(--navy); text-decoration: none; white-space: nowrap; transition: .15s; font-size: 15px; }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); }
.btn-sm { padding: 7px 14px; font-size: 14px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 14px; color: var(--navy); }
.input, select.input, textarea.input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); outline: none; transition: .15s; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }
.input::placeholder { color: #9aabbf; }
.help { font-size: 12.5px; color: var(--muted); }
.help b { color: var(--navy); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14.5px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.err { color: var(--red); background: var(--red-50); border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.ok { color: #0c6b48; background: var(--mint-50); border: 1px solid #b7f0dc; border-radius: 12px; padding: 14px 18px; }
.warnbox { color: var(--amber); background: var(--amber-50); border-radius: 12px; padding: 12px 16px; font-size: 14px; }

/* cards */
.card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.card-soft { background: var(--bg); }
.section { padding: 64px 0; }
.section.alt { background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--green); font-weight: 600; font-size: 13.5px; margin-bottom: 8px; }
.eyebrow.blue { color: var(--blue); }
.section h2 { font-size: 30px; margin-bottom: 8px; }
.section .lead { color: var(--ink-2); margin: 0 0 24px; }

/* landing */
.hero { background: linear-gradient(180deg, #fff 0%, var(--bg) 100%); padding: 56px 0 64px; border-bottom: 1px solid var(--line); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 46px; line-height: 1.18; }
.hero h1 mark { background: linear-gradient(transparent 62%, var(--mint) 62%); color: inherit; padding: 0 4px; }
.hero p.sub { color: var(--ink-2); font-size: 17px; margin: 18px 0 26px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.mock { position: relative; }
.mock .blob { position: absolute; inset: 6% 0 0 8%; background: radial-gradient(circle at 50% 50%, #dff7f6 0%, #e9f1fd 60%, transparent 61%); border-radius: 50%; }
.laptop { position: relative; margin: 30px auto 0; width: 88%; background: #1f2d4d; border-radius: 16px 16px 6px 6px; padding: 12px; box-shadow: var(--shadow); }
.laptop .screen { background: #fff; border-radius: 8px; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; padding: 26px 12px 12px; position: relative; min-height: 220px; }
.laptop .url { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--muted); background: var(--bg); border-radius: 6px; padding: 1px 10px; }
.laptop .dots { position: absolute; top: 9px; left: 10px; display: flex; gap: 4px; }
.laptop .dots i { width: 7px; height: 7px; border-radius: 50%; background: #f2b8b5; display: block; }
.laptop .dots i:nth-child(2) { background: #f5dc8b; } .laptop .dots i:nth-child(3) { background: #a9e3b9; }
.laptop .vid { background: #eaf3fd; border-radius: 8px; display: grid; place-items: center; font-size: 64px; position: relative; }
.laptop .vid .me { position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border-radius: 8px; background: #fff; display: grid; place-items: center; font-size: 26px; border: 2px solid #fff; box-shadow: var(--shadow); }
.laptop .chat { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.laptop .chat .h { background: #06c755; color: #fff; font-size: 10px; font-weight: 700; padding: 4px 6px; border-radius: 6px; }
.laptop .chat .b { height: 10px; border-radius: 6px; background: #eef2f7; }
.laptop .chat .b.g { background: #bfeecf; width: 70%; align-self: flex-end; }
.laptop .base { height: 10px; background: #c6cfdf; border-radius: 0 0 14px 14px; width: 110%; margin: 0 -5%; }
.float { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 12px; box-shadow: var(--shadow); display: flex; gap: 8px; align-items: center; }
.float b { display: block; font-size: 12.5px; }
.float.f1 { left: -2%; top: 52%; } .float.f2 { right: 0; top: 0; }
.video-wrap { background: var(--navy-2); border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; }
.video-wrap video { width: 100%; height: 100%; display: block; background: var(--navy-2); }
.step { position: relative; }
.step .n { position: absolute; right: 22px; top: 18px; font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--blue-100); }
.ico { width: 42px; height: 42px; border-radius: 10px; background: var(--blue-50); display: grid; place-items: center; color: var(--blue); margin-bottom: 14px; }
.ico svg { width: 22px; height: 22px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.hl { border: 2px solid var(--blue); box-shadow: 0 10px 30px rgba(36, 86, 214, .08); }
.plan .tag { position: absolute; right: 18px; top: 18px; background: var(--blue); color: #fff; font-size: 12px; padding: 2px 10px; border-radius: 999px; }
.plan .price { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 10px 0 14px; color: var(--navy); }
.plan .price-year { margin: -6px 0 16px; color: var(--ink-2); font-size: 14.5px; }
.plan .price-year span { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: #e8efff; color: var(--blue); font-size: 13px; font-weight: 600; }
.grid.single { grid-template-columns: minmax(0, 420px); justify-content: center; }
.plan .price small { font-size: 14px; font-weight: 400; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; color: var(--ink-2); font-size: 14.5px; line-height: 1.9; flex: 1; }
.sec-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 16px; align-items: stretch; }
.sec-item { display: flex; gap: 14px; align-items: flex-start; }
.sec-item .ico { margin: 0; flex: none; }

/* sign-up */
.page-title { font-size: 34px; margin: 8px 0 6px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0; }
.stepper div { border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 16px; font-size: 15px; background: #fff; color: var(--ink-2); }
.stepper div.on { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.stepper div.done { border-color: var(--blue); color: var(--blue); }
.box-title { display: flex; align-items: center; gap: 12px; font-size: 21px; margin-bottom: 22px; }
.num { width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; font-family: var(--font); flex: none; }
.doc { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px dashed #cfdbee; background: var(--bg); border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; }
.doc b { display: block; }
.doc .files { font-size: 13px; color: var(--green); margin-top: 4px; }
.doc .files button { border: 0; background: none; color: var(--red); cursor: pointer; padding: 0 4px; }
.choice { border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; cursor: pointer; display: flex; gap: 12px; align-items: flex-start; background: #fff; }
.choice input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.choice.on { border-color: var(--blue); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue) inset; }
.choice b { display: block; }
.choice .badge { display: inline-block; background: var(--mint); color: #064b39; border-radius: 999px; font-size: 12px; padding: 1px 10px; margin-left: 6px; font-weight: 600; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; flex-wrap: wrap; }
.ph-block { border-top: 1px dashed var(--line); padding-top: 16px; margin-top: 4px; }
.ph-block h4 { font-size: 14px; color: var(--ink-2); margin-bottom: 10px; display: flex; justify-content: space-between; }

/* payment */
.pay-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.summary .row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; }
.summary .row b { white-space: nowrap; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; font-family: var(--display); font-size: 20px; font-weight: 700; }
.summary .total span:last-child { color: var(--blue); }
.tabs-inline { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs-inline button { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 20px; cursor: pointer; }
.tabs-inline button.on { background: var(--blue); color: #fff; border-color: var(--blue); font-weight: 600; }
.qr-box { width: 220px; height: 220px; border: 1.5px dashed #cfdbee; border-radius: 12px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 10px; background: #fff; flex: none; }
.qr-box img, .qr-box svg { width: 100%; height: 100%; }

/* dashboard */
.kv-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--bg); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.kv-row code { font-size: 14px; }
.check-list { list-style: none; padding: 0; margin: 0 0 18px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.check-list .dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #dbe4f1; color: var(--navy); font-weight: 700; flex: none; font-size: 14px; }
.check-list .dot.done { background: var(--mint); color: #064b39; }
.check-list .dot.next { background: var(--blue); color: #fff; }
.stat .lbl { color: var(--ink-2); font-size: 14.5px; }
.stat .val { font-family: var(--display); font-size: 30px; font-weight: 700; margin: 10px 0; color: var(--navy); }
.stat .val.blue { color: var(--blue); } .stat .val.warn { color: var(--amber); } .stat .val.ok { color: var(--green); background: none; border: 0; padding: 0; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { text-align: left; color: var(--ink-2); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; background: var(--blue-50); color: var(--blue); }
.badge.green { background: var(--mint-50); color: #0c6b48; } .badge.amber { background: var(--amber-50); color: var(--amber); } .badge.red { background: var(--red-50); color: var(--red); } .badge.gray { background: #eef1f5; color: #5b6b7d; }
.modal { position: fixed; inset: 0; background: rgba(19, 41, 61, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal .card { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 10px; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.legal h2 { font-size: 19px; margin: 24px 0 8px; color: var(--blue); }
.legal p, .legal li { color: var(--ink-2); }

@media (max-width: 900px) {
  .hero .container, .pay-layout, .sec-grid { grid-template-columns: 1fr; }
  .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 34px; }
  .nav a:not(.login):not(.btn) { display: none; }
}
@media (max-width: 600px) {
  .g2, .g3, .g4, .stepper { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  .section h2, .page-title { font-size: 25px; }
  .card { padding: 18px; }
  .brand span { font-size: 16px; }
  .doc { flex-direction: column; align-items: flex-start; }
  .site-head .container { gap: 12px; }
}
@media print { .site-head, .site-foot, .noprint { display: none !important; } body { background: #fff; } .card { border: 0; } }
