/* =========================================================================
   DTC Drive Copy — Design System v2
   ฟอนต์ Sarabun | ธีมสีปรับได้ (--c1 / --c2) | การ์ดสีสด บนพื้นขาวลายตาราง
   ========================================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --c1: #3b6cf6;
  --c2: #7b4cf5;
  --blue: var(--c1);
  --purple: var(--c2);
  --green: #12b981;
  --orange: #f59e0b;
  --pink: #ec4878;
  --cyan: #0ea5c6;

  --ink: #0f1733;
  --ink-2: #39415f;
  --muted: #6b7393;
  --faint: #9aa1bd;
  --line: #e7eaf3;
  --line-2: #f0f2f8;
  --surface: #ffffff;
  --surface-2: #f7f8fc;
  --surface-3: #eff1f8;

  --grad-main: linear-gradient(135deg, var(--c1) 0%, var(--c2) 100%);
  --grad-hero: linear-gradient(125deg, color-mix(in srgb, var(--c1) 82%, #000) 0%, color-mix(in srgb, var(--c1) 55%, var(--c2)) 48%, var(--c2) 100%);
  --c1-soft: color-mix(in srgb, var(--c1) 9%, #fff);
  --c2-soft: color-mix(in srgb, var(--c2) 9%, #fff);
  --c1-ring: color-mix(in srgb, var(--c1) 22%, transparent);

  --sb-bg: color-mix(in srgb, var(--c1) 16%, #0b1028);
  --sb-bg-2: color-mix(in srgb, var(--c2) 14%, #0b1028);
  --sb-text: rgba(226, 231, 255, .72);
  --sb-w: 272px;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --sh-xs: 0 1px 2px rgba(16, 24, 64, .06);
  --sh: 0 1px 2px rgba(16, 24, 64, .05), 0 10px 30px -16px rgba(16, 24, 64, .2);
  --sh-lg: 0 2px 4px rgba(16, 24, 64, .04), 0 24px 48px -24px rgba(16, 24, 64, .3);
  --sh-color: 0 14px 30px -14px color-mix(in srgb, var(--c1) 70%, transparent);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { font-family: 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); -webkit-font-smoothing: antialiased; }
body {
  margin: 0; font-size: 15.5px; line-height: 1.6;
  background-color: #fbfcff;
  background-image:
    linear-gradient(color-mix(in srgb, var(--c1) 7%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--c1) 7%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--c1) 4%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--c1) 4%, transparent) 1px, transparent 1px);
  background-size: 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-attachment: fixed;
}
h1, h2, h3, h4, h5, h6 { color: var(--ink); letter-spacing: -.01em; }
a { color: var(--c1); text-decoration: none; }
a:hover { color: color-mix(in srgb, var(--c1) 80%, #000); }
code { color: var(--c2); }
::selection { background: color-mix(in srgb, var(--c2) 25%, transparent); }
:focus-visible { outline: 3px solid var(--c1-ring); outline-offset: 2px; }
.text-purple { color: var(--c2) !important; }
.text-primary { color: var(--c1) !important; }
.text-danger-soft { color: #e0456f !important; }

/* ---------- 3. Buttons ---------- */
.btn { font-weight: 600; border-radius: var(--r-sm); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem 1rem; transition: transform .15s var(--ease), box-shadow .15s var(--ease), background .15s, filter .15s; }
.btn-sm { padding: .32rem .7rem; font-size: .86rem; border-radius: 9px; }
.btn-lg { padding: .75rem 1.3rem; }
.btn-primary-grad { background: var(--grad-main); color: #fff; border: 0; box-shadow: var(--sh-color), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-primary-grad:hover, .btn-primary-grad:focus { color: #fff; filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary-grad:active { transform: translateY(0); }
.btn-primary-grad:disabled { opacity: .55; transform: none; }
.btn-soft { background: var(--c1-soft); color: var(--c1); border: 1px solid color-mix(in srgb, var(--c1) 14%, transparent); }
.btn-soft:hover { background: color-mix(in srgb, var(--c1) 14%, #fff); color: var(--c1); }
.btn-light { background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-light:hover { background: var(--surface-2); border-color: #d9ddeb; }
.btn-warning-soft { background: #fff5e1; color: #a35f00; border: 1px solid #fde4b0; }
.btn-warning-soft:hover { background: #ffedc7; color: #8a5000; }
.btn-danger-soft { background: #ffeef3; color: #c92a5a; border: 1px solid #ffd3e0; }
.btn-danger-soft:hover { background: #ffe0ea; color: #b01f4d; }
.btn-success-soft { background: #e6f8f0; color: #0b7f56; border: 1px solid #c3eedb; }
.btn-success-soft:hover { background: #d4f3e5; color: #08704b; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.btn-icon:hover { background: var(--surface-2); color: var(--c1); }
.btn-glass { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255,255,255,.26); color: #fff; }
.btn-white { background: #fff; color: var(--ink); border: 0; box-shadow: 0 8px 18px -8px rgba(0,0,0,.35); }
.btn-white:hover { color: var(--c1); transform: translateY(-1px); }

/* ---------- 4. Gradient fills (สีสด 2.5D) ---------- */
.bg-grad-blue   { background: linear-gradient(135deg, #4f8dff, #2f5bea); }
.bg-grad-purple { background: linear-gradient(135deg, #b06cff, #6d3df0); }
.bg-grad-green  { background: linear-gradient(135deg, #2bd49a, #0e9f6e); }
.bg-grad-pink   { background: linear-gradient(135deg, #ff7aa0, #e03267); }
.bg-grad-orange { background: linear-gradient(135deg, #ffbd4a, #f07b12); }
.bg-grad-cyan   { background: linear-gradient(135deg, #36d0f0, #0b8fb8); }
.bg-grad-yellow { background: linear-gradient(135deg, #fde047, #eab308); }

/* ---------- 5. Brand ---------- */
.brand-row { display: flex; align-items: center; gap: .7rem; }
.brand-logo { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 1.25rem; background: var(--grad-main); box-shadow: var(--sh-color), inset 0 1px 0 rgba(255,255,255,.35); }
.brand-logo.sm { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 11px; }
.brand-logo.has-img { background: #fff; border: 1px solid var(--line); overflow: hidden; box-shadow: var(--sh-xs); }
.brand-logo.has-img img { width: 100%; height: 100%; object-fit: contain; }
.brand-text { font-weight: 800; font-size: 1.12rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================================
   APP SHELL
   ========================================================================= */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 1040; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sb-bg) 0%, var(--sb-bg-2) 100%);
  color: var(--sb-text); transition: transform .28s var(--ease);
}
.sidebar::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000, transparent 70%); }
.sidebar > * { position: relative; }
.sb-brand { display: flex; align-items: center; gap: .75rem; padding: 1.25rem 1.25rem 1.1rem; color: #fff; }
.sb-brand:hover { color: #fff; }
.sb-brand .brand-text { font-size: 1.05rem; color: #fff; }
.sb-nav { flex: 1; overflow-y: auto; padding: .4rem .85rem 1rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.sb-label { font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: rgba(226,231,255,.42); margin: 1.1rem .75rem .45rem; }
.sb-nav a { position: relative; display: flex; align-items: center; gap: .8rem; padding: .66rem .85rem; margin-bottom: 2px; border-radius: 11px; color: var(--sb-text); font-weight: 500; white-space: nowrap; transition: background .15s, color .15s; }
.sb-nav a i { width: 20px; text-align: center; font-size: 1rem; color: rgba(226,231,255,.5); transition: color .15s; }
.sb-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-nav a:hover i { color: #fff; }
.sb-nav a.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.sb-nav a.active::before { content: ''; position: absolute; left: -.85rem; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--grad-main); }
.sb-nav a.active i { color: #fff; }
.sb-nav a.text-danger-soft { color: #ff9cb6 !important; }
.sb-nav a.text-danger-soft i { color: #ff9cb6; }
.sb-dot { margin-left: auto; width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #34e0a1; animation: ping 1.6s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,224,161,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(52,224,161,0); } }
.sb-user { display: flex; align-items: center; gap: .7rem; margin: 0 .85rem .75rem; padding: .7rem; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); }
.sb-user img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); flex: 0 0 40px; background: #fff; }
.sb-user > div { min-width: 0; flex: 1; }
.sb-user b { display: block; color: #fff; font-size: .92rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user small { display: block; font-size: .76rem; color: rgba(226,231,255,.55); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user .sb-logout { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: rgba(226,231,255,.7); flex: 0 0 34px; }
.sb-user .sb-logout:hover { background: rgba(255,90,130,.18); color: #ffb3c7; }
.sb-foot { font-size: .76rem; color: rgba(226,231,255,.45); padding: 0 1.25rem 1.1rem; }
.sb-backdrop { display: none; }

.main { margin-left: var(--sb-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }

/* Topbar: โปร่งใสบนส่วนหัว และเป็นสีขาวเมื่อเลื่อนลง */
.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .9rem; height: 68px; padding: 0 2rem; color: #fff; background: transparent; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, box-shadow .25s, color .25s; }
.topbar.scrolled { color: var(--ink); background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(16,24,64,.5); }
.top-crumb { display: flex; align-items: center; gap: .55rem; font-weight: 600; font-size: .95rem; min-width: 0; }
.top-crumb a { color: inherit; opacity: .8; }
.top-crumb a:hover { opacity: 1; color: inherit; }
.top-crumb .sep { font-size: .65rem; opacity: .55; }
.top-crumb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar:not(.scrolled) .btn-icon { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.topbar:not(.scrolled) .btn-icon:hover { background: rgba(255,255,255,.24); }
.topbar:not(.scrolled) .btn-primary-grad { background: #fff; color: var(--c1); box-shadow: 0 10px 22px -12px rgba(0,0,0,.5); }
.topbar:not(.scrolled) .top-user { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.28); color: #fff; backdrop-filter: blur(6px); }
.top-user { display: flex; align-items: center; gap: .55rem; padding: .25rem .35rem .25rem .25rem; border-radius: 30px; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: background .25s, color .25s; }
.top-user span { max-width: 170px; padding-right: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.top-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface-3); }
.role-tag { font-style: normal; font-size: .7rem; font-weight: 700; padding: .1rem .5rem; margin-right: .2rem; border-radius: 20px; background: linear-gradient(135deg, #ffd166, #f59e0b); color: #5c3b00; white-space: nowrap; }

/* Page hero — พื้นหลังรูป/ไล่สี + ชั้นมืด อ่านง่าย */
.page-hero { position: relative; margin-top: -68px; padding: calc(68px + 1.6rem) 2rem 6.5rem; color: #fff; isolation: isolate; overflow: hidden;
  background-color: color-mix(in srgb, var(--c1) 55%, #0a0f2e);
  background-image: linear-gradient(110deg, rgba(9,13,42,.8) 0%, color-mix(in srgb, var(--c1) 45%, rgba(9,13,42,.42)) 50%, color-mix(in srgb, var(--c2) 40%, rgba(9,13,42,.2)) 100%), var(--hero-img, linear-gradient(transparent, transparent));
  background-size: cover; background-position: center; }
.page-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000 30%, transparent); }
.page-hero::after { content: ''; position: absolute; z-index: -1; width: 620px; height: 620px; right: -160px; top: -300px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--c2) 45%, transparent), transparent 65%); }
.ph-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
.ph-main { min-width: 0; }
.ph-pill { display: none; align-items: center; gap: .45rem; margin-bottom: .9rem; padding: .32rem .85rem; border-radius: 30px; font-size: .84rem; font-weight: 600; color: #ffe7a3; background: rgba(255,214,102,.12); border: 1px solid rgba(255,214,102,.45); }
.page-hero .page-title { margin: 0 0 .35rem; color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; text-shadow: 0 2px 16px rgba(0,0,0,.25); }
.page-hero .crumb { margin: 0; max-width: 46em; color: rgba(255,255,255,.82); font-size: 1rem; line-height: 1.7; }
.ph-icon { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; font-size: 2.1rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.dash-only { display: none !important; }
body.is-dash .dash-only { display: block !important; }
body.is-dash .hero-stats.dash-only { display: grid !important; }
body.is-dash .not-dash { display: none !important; }
body.is-dash .ph-pill { display: inline-flex; }
body.is-dash .page-hero { padding-bottom: 7.5rem; }
body.is-dash .page-hero .page-title { font-size: clamp(2rem, 3.6vw, 3rem); }
body.is-dash .ph-inner { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); align-items: start; }
.hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 1.6rem; border-radius: var(--r-lg); overflow: hidden; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hs { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; min-width: 0; }
.hs + .hs { border-left: 1px solid rgba(255,255,255,.16); }
.hs-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1rem; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 16px -8px rgba(0,0,0,.5); }
.hs small { display: block; font-size: .8rem; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs b { display: block; font-size: 1.55rem; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-panel { position: relative; padding: 1rem; border-radius: var(--r-lg); background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); overflow: hidden; }
.hero-panel::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c1), #34d399, #fbbf24, #f472b6); }
.hp-head { display: flex; align-items: center; gap: .5rem; margin: .1rem .2rem .75rem; font-weight: 700; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #34e0a1; animation: ping 1.6s infinite; }
.hp-list { display: grid; gap: .5rem; }
.hp-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .7rem; border-radius: 13px; background: #fff; color: var(--ink); box-shadow: 0 6px 16px -10px rgba(0,0,0,.5); transition: transform .15s var(--ease); }
.hp-item:hover { color: var(--ink); transform: translateX(3px); }
.hp-av { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.hp-av.ok { background: linear-gradient(135deg, #2bd49a, #0e9f6e); } .hp-av.run { background: var(--grad-main); } .hp-av.warn { background: linear-gradient(135deg, #ffbd4a, #f07b12); }
.hp-av.bad { background: linear-gradient(135deg, #ff7aa0, #e03267); } .hp-av.mute { background: linear-gradient(135deg, #a3abc6, #6b7393); }
.hp-txt { flex: 1; min-width: 0; }
.hp-txt b { display: block; font-size: .93rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-txt small { color: var(--muted); font-size: .78rem; }
.hp-txt small em { font-style: normal; font-weight: 700; margin-right: .2rem; }
.hp-txt em.ok { color: #08875a; } .hp-txt em.run { color: var(--c1); } .hp-txt em.warn { color: #b06a00; } .hp-txt em.bad { color: #cc2c5b; } .hp-txt em.mute { color: var(--muted); }
.hp-st { flex: 0 0 auto; font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 20px; background: var(--surface-3); color: var(--muted); }
.hp-st.ok { background: #e3f8ee; color: #08875a; } .hp-st.run { background: var(--c1-soft); color: var(--c1); } .hp-st.warn { background: #fff4dc; color: #9c6200; } .hp-st.bad { background: #ffe8ee; color: #cc2c5b; }
.hp-empty { padding: 1.4rem; text-align: center; color: rgba(255,255,255,.8); border-radius: 13px; background: rgba(255,255,255,.08); }
.hp-more { display: block; margin-top: .75rem; text-align: center; font-weight: 600; color: rgba(255,255,255,.9); }
.hp-more:hover { color: #fff; }

/* เนื้อหาเต็มความกว้าง และซ้อนขึ้นบนส่วนหัว */
.content { position: relative; z-index: 2; flex: 1; width: 100%; padding: 0 2rem 2rem; margin-top: -4.5rem; }
body.is-dash .content { margin-top: -5.25rem; }
.app-foot { padding: 1.1rem 2rem; color: var(--faint); font-size: .84rem; border-top: 1px solid var(--line-2); }
.view { display: none; animation: viewIn .32s var(--ease); }
.view.active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards ---------- */
.card-x { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh); overflow: hidden; }
.card-x::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2) 45%, #fbbf24 75%, #f472b6); opacity: .9; z-index: 1; }
.pv-card .card-x::before, .ap-preview .pv-card::before { display: none; }
.card-x-head { display: flex; align-items: center; gap: .65rem; padding: 1rem 1.3rem; font-weight: 700; font-size: 1.02rem; border-bottom: 1px solid var(--line-2); }
.card-x-head > i:first-child { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--surface-2); font-size: .95rem; }
.card-x-body { padding: 1.3rem; }
.card-x-foot { padding: .9rem 1.3rem; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.gs-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: .95rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 12px -6px rgba(16,24,64,.35); }

/* small-box (AdminLTE) — การ์ดสถิติสีสด มีมิติ */
.small-box { position: relative; border-radius: var(--r-lg); color: #fff; overflow: hidden; isolation: isolate;
  box-shadow: 0 16px 30px -18px rgba(16,24,64,.6), inset 0 1px 0 rgba(255,255,255,.3), inset 0 -2px 0 rgba(0,0,0,.08); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.small-box::before { content: ''; position: absolute; z-index: -1; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255,255,255,.28), transparent 55%); }
.small-box::after { content: ''; position: absolute; z-index: -1; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent 30%, #000); }
.small-box:hover { transform: translateY(-3px); box-shadow: 0 22px 36px -18px rgba(16,24,64,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.small-box .inner { padding: 1.15rem 1.25rem .9rem; }
.small-box h3 { font-size: clamp(1.55rem, 2.6vw, 2.15rem); font-weight: 800; margin: 0 0 .1rem; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.small-box p { margin: 0; font-weight: 500; opacity: .92; }
.small-box .icon { position: absolute; right: 1.1rem; top: 1rem; width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(4px); transition: transform .25s var(--ease); }
.small-box:hover .icon { transform: rotate(-6deg) scale(1.06); }
.small-box-footer { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.25rem; color: rgba(255,255,255,.9); background: rgba(0,0,0,.1); font-size: .86rem; font-weight: 500; }
.small-box-footer:hover { color: #fff; background: rgba(0,0,0,.16); }

/* info-box */
.info-box { display: flex; align-items: center; gap: .85rem; height: 100%; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-xs); }
.ib-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 1.15rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 14px -8px rgba(16,24,64,.45); }
.ib-text { display: block; color: var(--muted); font-size: .82rem; line-height: 1.3; }
.ib-num { display: block; font-size: 1.32rem; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }

/* ---------- Account cards ---------- */
.acc-pair { position: relative; }
.acc-link { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--c1); display: grid; place-items: center; box-shadow: 0 8px 20px -8px rgba(16,24,64,.45), 0 0 0 6px rgba(255,255,255,.6); font-size: 1.05rem; }
.acc-card { position: relative; height: 100%; min-height: 176px; display: flex; flex-direction: column; padding: 1.25rem 1.35rem; border-radius: var(--r-lg); color: #fff; overflow: hidden; isolation: isolate;
  box-shadow: 0 20px 36px -22px rgba(16,24,64,.7), inset 0 1px 0 rgba(255,255,255,.28); }
.acc-card.src { background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 82%, #fff) 0%, var(--c1) 50%, color-mix(in srgb, var(--c1) 68%, #000) 100%); }
.acc-card.dst { background: linear-gradient(135deg, color-mix(in srgb, var(--c2) 82%, #fff) 0%, var(--c2) 50%, color-mix(in srgb, var(--c2) 68%, #000) 100%); }
.acc-card::before { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: rgba(255,255,255,.12); }
.acc-card::after { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(120deg, transparent 35%, #000); }
.acc-role { display: flex; align-items: center; gap: .55rem; font-weight: 700; }
.acc-role i { width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.acc-body { display: flex; align-items: center; gap: .95rem; margin: 1rem 0; min-width: 0; }
.acc-body img { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 50%; border: 3px solid rgba(255,255,255,.65); background: #fff; }
.acc-body > div { min-width: 0; }
.acc-body b { display: block; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-body small { opacity: .9; word-break: break-all; }
.acc-status { display: inline-flex; align-items: center; gap: .4rem; margin-top: .35rem; padding: .18rem .7rem; border-radius: 20px; background: rgba(255,255,255,.2); font-size: .8rem; font-weight: 600; }
.acc-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #5df2b0; box-shadow: 0 0 0 3px rgba(93,242,176,.3); }
.acc-actions { margin-top: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.acc-empty { margin: auto 0; padding: .6rem 0; text-align: center; }
.acc-empty > i { display: block; font-size: 2rem; margin-bottom: .4rem; opacity: .9; }
.acc-empty p { opacity: .85; margin-bottom: .9rem; }
.acc-chip { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; padding: .28rem .85rem .28rem .3rem; border-radius: 30px; font-weight: 600; font-size: .88rem; }
.acc-chip img { width: 28px; height: 28px; border-radius: 50%; }
.acc-chip.src { background: var(--c1-soft); color: var(--c1); }
.acc-chip.dst { background: var(--c2-soft); color: var(--c2); }

/* active job */
.active-banner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; margin-bottom: 1.25rem; border-radius: var(--r-lg); background: #fff; border: 1px solid color-mix(in srgb, var(--c1) 22%, var(--line)); box-shadow: var(--sh); }
.active-banner .ab-ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: var(--grad-main); box-shadow: var(--sh-color); }
.mini-progress { height: 8px; min-width: 110px; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.mini-progress > div { height: 100%; border-radius: 10px; background: var(--grad-main); }

.chart-box { position: relative; height: 290px; }
.chart-box.sm { height: 240px; }

/* ---------- Tables ---------- */
.table-x { --bs-table-bg: transparent; margin: 0; }
.table-x thead th { background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: .82rem; letter-spacing: .02em; border-bottom: 1px solid var(--line); padding: .75rem 1.1rem; white-space: nowrap; }
.table-x td { padding: .8rem 1.1rem; border-color: var(--line-2); vertical-align: middle; color: var(--ink-2); }
.table-x tbody tr { transition: background .12s; }
.table-x tbody tr:hover { background: color-mix(in srgb, var(--c1) 3%, #fff); }
.table-x tbody tr:last-child td { border-bottom: 0; }
.table-x tr.clickable { cursor: pointer; }
.fname { display: flex; align-items: center; gap: .65rem; min-width: 0; color: var(--ink); font-weight: 500; }
.fname .fi { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; }
.fname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 400px; }
a.fname:hover span { color: var(--c1); }
.u-av { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: var(--surface-3); border: 2px solid #fff; box-shadow: var(--sh-xs); }
.fi-folder { background: #fff3d1; color: #e89c00; }
.fi-pdf { background: #ffe8ec; color: #df3b5c; } .fi-doc { background: #e6eeff; color: #2f6bff; } .fi-sheet { background: #ddf6ea; color: #0e9f6e; }
.fi-slide { background: #ffefd9; color: #ec8500; } .fi-img { background: #f1e8ff; color: #8b46f5; } .fi-video { background: #ffe6f2; color: #dc3587; }
.fi-zip { background: #edf0f6; color: #59628a; } .fi-file { background: #eef1fa; color: #6b7393; }

.st { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .65rem; border-radius: 20px; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.st-pending   { background: #f2f3f8; color: #59628a; border-color: #e6e8f1; }
.st-copying, .st-running { background: #e7efff; color: #2a57e6; border-color: #d3e1ff; }
.st-success, .st-completed { background: #e3f8ee; color: #08875a; border-color: #c8efdc; }
.st-skipped, .st-paused { background: #fff4dc; color: #9c6200; border-color: #fbe3ae; }
.st-failed, .st-error { background: #ffe8ee; color: #cc2c5b; border-color: #ffd0dc; }
.st-scanning { background: #e0f6fb; color: #0a7d99; border-color: #c4ecf5; }
.st-ready { background: #f0e8ff; color: #6a3de8; border-color: #e1d4ff; }
.st-cancelled { background: #eef0f5; color: #59628a; border-color: #e1e4ee; }
.err-text { display: block; margin-top: .2rem; color: #cc2c5b; font-size: .78rem; max-width: 380px; white-space: normal; line-height: 1.45; }
.err-text.note { color: #9c6200; }

/* ---------- Wizard ---------- */
.stepper { display: flex; gap: .5rem; margin-bottom: 1.25rem; padding: .45rem; overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.step { position: relative; flex: 1; min-width: 165px; display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: 12px; color: var(--muted); transition: background .15s; }
.step span { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: var(--surface-3); color: var(--muted); }
.step b { font-size: .92rem; font-weight: 600; white-space: nowrap; }
.step.active { background: var(--c1-soft); color: var(--ink); }
.step.active span { background: var(--grad-main); color: #fff; box-shadow: var(--sh-color); }
.step.done span { position: relative; background: #18c286; color: transparent; }
.step.done span::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 800; }
.step.done:hover { background: var(--surface-2); }
.wiz-pane { display: none; animation: viewIn .3s var(--ease); }
.wiz-pane.active { display: block; }
.search-box { position: relative; min-width: 280px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search-box input { padding-left: 38px; border-radius: var(--r-sm); border-color: var(--line); background: var(--surface-2); }
.search-box input:focus { background: #fff; }
.link-box { padding: 1rem 1.1rem; border-radius: var(--r); background: linear-gradient(135deg, var(--c1-soft), var(--c2-soft)); border: 1px dashed color-mix(in srgb, var(--c1) 30%, var(--line)); }
.link-box label { display: block; font-weight: 700; margin-bottom: .5rem; }
.link-box .form-control { flex: 1; min-width: 220px; border-color: var(--line); border-radius: var(--r-sm); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; font-size: .92rem; }
.crumbs a { padding: .25rem .6rem; border-radius: 8px; color: var(--ink-2); }
.crumbs a:hover { background: var(--surface-2); }
.crumbs a.cur { background: var(--c1-soft); color: var(--c1); font-weight: 700; }
.crumbs i.sep { color: #c0c5db; font-size: .65rem; }
.dest-list { max-height: 430px; overflow-y: auto; }
.dest-item { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.3rem; border-top: 1px solid var(--line-2); cursor: pointer; font-weight: 500; transition: background .12s; }
.dest-item:hover { background: color-mix(in srgb, var(--c1) 4%, #fff); }
.dest-item .chev { margin-left: auto; color: #c0c5db; transition: transform .15s; }
.dest-item:hover .chev { transform: translateX(3px); color: var(--c1); }
.switch-row { display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--c2-soft); border: 1px solid color-mix(in srgb, var(--c2) 14%, transparent); cursor: pointer; }
.switch-row input { margin-top: .3rem; flex: 0 0 auto; }
.tree-preview { min-height: 130px; padding: 1rem 1.1rem; margin-bottom: 1rem; border-radius: var(--r); background: var(--surface-2); border: 1px dashed #d4d9ea; font-family: 'Sarabun', sans-serif; font-size: .95rem; line-height: 1.75; white-space: pre-wrap; color: var(--ink-2); }
.opt-card { height: 100%; display: flex; gap: .9rem; align-items: flex-start; padding: 1.05rem; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.opt-card:hover { border-color: color-mix(in srgb, var(--c1) 35%, var(--line)); transform: translateY(-1px); }
.opt-card input { display: none; }
.opt-card:has(input:checked) { border-color: var(--c2); background: color-mix(in srgb, var(--c2) 3%, #fff); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c2) 14%, transparent); }
.opt-card b { display: block; color: var(--ink); }
.opt-card small { color: var(--muted); }
.opt-ic { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.badge-rec { font-style: normal; font-size: .72rem; font-weight: 700; background: #ddf6ea; color: #08875a; padding: 1px 8px; border-radius: 10px; margin-left: .3rem; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .75rem; }
.sum-item { padding: .9rem 1rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line-2); }
.sum-item small { display: block; color: var(--muted); margin-bottom: .15rem; }
.sum-item b { word-break: break-word; }
.alert-info-soft { background: var(--c1-soft); color: color-mix(in srgb, var(--c1) 70%, #000); border: 1px solid color-mix(in srgb, var(--c1) 15%, transparent); border-radius: var(--r); }

/* ---------- Job / Progress ---------- */
.bridge { position: relative; display: grid; grid-template-columns: 1fr minmax(230px, 1.3fr) 1fr; gap: 1rem; align-items: center; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; border-radius: var(--r-xl); color: #fff; overflow: hidden; isolation: isolate;
  background: var(--grad-hero); box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--c1) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.25); }
.bridge::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 26px 26px; }
.bridge::after { content: ''; position: absolute; z-index: -1; width: 340px; height: 340px; left: 50%; top: -220px; transform: translateX(-50%); border-radius: 50%; background: rgba(255,255,255,.1); }
.bridge-acc { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.bridge-acc.right { justify-content: flex-end; }
.bridge-acc small { display: block; opacity: .75; font-size: .82rem; }
.bridge-acc b { display: block; font-size: .98rem; word-break: break-all; }
.b-ic { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 15px; display: grid; place-items: center; font-size: 1.3rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(4px); }
.bridge-mid { text-align: center; }
.bridge-folder { font-weight: 800; font-size: 1.18rem; word-break: break-word; }
.bridge-pipe { position: relative; height: 28px; margin: .55rem 0; border-radius: 14px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); overflow: hidden; }
.bridge-pipe i { position: absolute; top: 6px; left: -10%; opacity: 0; }
.bridge.live .bridge-pipe i { opacity: 1; animation: flow 2.4s linear infinite; }
.bridge.live .bridge-pipe i:nth-child(2) { animation-delay: .8s; }
.bridge.live .bridge-pipe i:nth-child(3) { animation-delay: 1.6s; }
.bridge-status { font-size: .9rem; opacity: .95; }
@keyframes flow { from { left: -12%; } to { left: 104%; } }

.big-pct { font-size: clamp(2.6rem, 6vw, 3.8rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; background: var(--grad-main); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.big-progress { height: 22px; border-radius: 12px; background: var(--surface-3); overflow: hidden; box-shadow: inset 0 2px 4px rgba(16,24,64,.08); }
.big-progress .bar { position: relative; height: 100%; border-radius: 12px; background: linear-gradient(90deg, var(--c1), var(--c2)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 4px 12px -3px color-mix(in srgb, var(--c2) 60%, transparent); transition: width .6s var(--ease); }
.big-progress.live .bar { background-image: linear-gradient(90deg, var(--c1), var(--c2)), repeating-linear-gradient(45deg, rgba(255,255,255,.2) 0 12px, transparent 12px 24px); background-blend-mode: overlay; animation: stripes 1s linear infinite; }
@keyframes stripes { from { background-position: 0 0, 0 0; } to { background-position: 0 0, 34px 0; } }
.current-file { padding: .65rem .9rem; border-radius: var(--r-sm); background: var(--surface-2); font-size: .95rem; word-break: break-all; }
.time-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; margin-top: 1rem; }
.time-row > div { padding: .65rem .85rem; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
.time-row small { display: block; color: var(--muted); font-size: .8rem; }
.time-row b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.1rem; }

.finish-card { position: relative; padding: 1.6rem; margin-bottom: 1.25rem; border-radius: var(--r-xl); background: #fff; border: 1px solid #c8efdc; box-shadow: var(--sh); overflow: hidden; }
.finish-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #2bd49a, #0e9f6e); }
.finish-card.warn { border-color: #fde2b5; }
.finish-card.warn::before { background: linear-gradient(90deg, #ffbd4a, #f07b12); }
.finish-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; }
.finish-head .fh-ic { width: 58px; height: 58px; border-radius: 17px; display: grid; place-items: center; font-size: 1.7rem; color: #fff; box-shadow: 0 10px 20px -10px rgba(16,24,64,.5); }
.finish-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .65rem; margin-bottom: 1.1rem; }
.finish-grid > div { padding: .85rem; border-radius: var(--r); background: var(--surface-2); text-align: center; }
.finish-grid b { display: block; font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.finish-grid small { color: var(--muted); }

.filter-tabs { display: flex; flex-wrap: wrap; gap: .3rem; padding: .25rem; border-radius: 12px; background: var(--surface-2); }
.filter-tabs button { border: 0; background: transparent; color: var(--ink-2); padding: .3rem .7rem; border-radius: 9px; font-size: .82rem; font-weight: 600; transition: background .12s; }
.filter-tabs button:hover { background: #fff; }
.filter-tabs button.active { background: #fff; color: var(--c1); box-shadow: 0 2px 8px -3px rgba(16,24,64,.25); }
.pager { display: flex; gap: .3rem; }
.pager button { min-width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; }
.pager button:hover:not(:disabled) { border-color: var(--c1); color: var(--c1); }
.pager button.active { background: var(--grad-main); color: #fff; border-color: transparent; }
.pager button:disabled { opacity: .4; }
.mini-bar { width: 110px; height: 4px; margin-top: 5px; border-radius: 4px; background: #e3e9ff; overflow: hidden; }
.mini-bar > div { height: 100%; background: var(--c1); }
.log-list { list-style: none; margin: 0; padding: .3rem 0; max-height: 380px; overflow-y: auto; font-size: .86rem; }
.log-list li { display: flex; gap: .6rem; padding: .5rem 1.2rem; border-bottom: 1px dashed var(--line-2); color: var(--ink-2); }
.log-list li:last-child { border-bottom: 0; }
.log-list li time { flex: 0 0 auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.log-list .lv-success i { color: var(--green); } .log-list .lv-error i { color: var(--pink); } .log-list .lv-warning i { color: var(--orange); } .log-list .lv-info i { color: var(--c1); }

/* settings */
.clear-row { display: flex; align-items: center; gap: .9rem; padding: .95rem; margin-bottom: .75rem; border-radius: var(--r); border: 1px solid var(--line); transition: border-color .15s; }
.clear-row:hover { border-color: #d9ddeb; }
.clear-row > div { flex: 1; }
.clear-row b { display: block; }
.clear-row small { color: var(--muted); }
.code-box { padding: .85rem 1rem; border-radius: var(--r-sm); background: #121838; color: #c9d2ff; white-space: pre-wrap; word-break: break-all; font-size: .85rem; }

/* ---------- Banner ---------- */
.app-banner { position: relative; display: flex; align-items: flex-end; min-height: var(--bh, 190px); margin-bottom: 1.25rem; border-radius: var(--r-xl); overflow: hidden; color: #fff; isolation: isolate;
  box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--c1) 85%, transparent), inset 0 1px 0 rgba(255,255,255,.22); }
.app-banner.has-img { background: linear-gradient(90deg, rgba(10,14,40,.74) 0%, rgba(10,14,40,.3) 58%, rgba(10,14,40,0) 100%), var(--bimg) center/cover no-repeat; }
.app-banner.no-img { background: var(--grad-hero); }
.app-banner.no-img::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 26px 26px; }
.app-banner.no-img::after { content: ''; position: absolute; z-index: -1; width: 340px; height: 340px; right: -90px; top: -130px; border-radius: 50%; background: rgba(255,255,255,.12); }
.app-banner .ab-inner { position: relative; max-width: 780px; padding: 1.5rem 1.75rem; }
.app-banner h2 { margin: 0 0 .3rem; color: #fff; font-weight: 800; font-size: clamp(1.4rem, 3vw, 2.05rem); text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.app-banner p { margin: 0; opacity: .95; line-height: 1.65; text-shadow: 0 1px 8px rgba(0,0,0,.25); }

/* ---------- Appearance ---------- */
.ap-grid { display: grid; grid-template-columns: minmax(0, 1fr) 370px; gap: 1.25rem; align-items: start; }
.ap-preview { position: sticky; top: 92px; }
.ap-field { margin-bottom: 1rem; }
.ap-field > label, .ap-label { display: block; font-weight: 700; margin-bottom: .4rem; }
.ap-field .form-control, .ap-field .form-select { border-color: var(--line); border-radius: var(--r-sm); }
.ap-hint { color: var(--muted); font-size: .84rem; }
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: .5rem; }
.icon-pick button { height: 52px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink-2); font-size: 1.25rem; transition: border-color .15s, transform .15s; }
.icon-pick button:hover { border-color: var(--c1); transform: translateY(-1px); }
.icon-pick button.active { border-color: transparent; color: #fff; background: var(--grad-main); box-shadow: var(--sh-color); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.seg button { border: 0; background: transparent; padding: .42rem .95rem; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--c1); box-shadow: 0 2px 8px -3px rgba(16,24,64,.3); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .55rem; }
.swatch { padding: .45rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); transition: transform .15s; }
.swatch:hover { transform: translateY(-1px); }
.swatch span { display: block; height: 30px; margin-bottom: .3rem; border-radius: 8px; }
.swatch.active { border-color: var(--c2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c2) 20%, transparent); }
.color-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.color-row label { display: flex; align-items: center; gap: .5rem; font-weight: 600; }
.color-row input[type=color], .ap-field input[type=color] { width: 46px; height: 36px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; cursor: pointer; }
.bg-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: .6rem; }
.bg-pick button { padding: .4rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.bg-pick button i { display: block; height: 56px; margin-bottom: .35rem; border-radius: 8px; border: 1px solid var(--line-2); }
.bg-pick button.active { border-color: var(--c2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c2) 20%, transparent); }
.bgp-grid { background-color: #fbfcff; background-image: linear-gradient(color-mix(in srgb, var(--c1) 16%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--c1) 16%, transparent) 1px, transparent 1px); background-size: 10px 10px; }
.bgp-dots { background-color: #fbfcff; background-image: radial-gradient(color-mix(in srgb, var(--c1) 35%, transparent) 1.2px, transparent 1.5px); background-size: 9px 9px; }
.bgp-gradient { background: radial-gradient(circle at 0 0, color-mix(in srgb, var(--c1) 30%, #fff), transparent 60%), radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--c2) 32%, #fff), #fbfcff 70%); }
.bgp-plain { background: #f4f6fb; }
.bgp-image { display: grid !important; place-items: center; background: linear-gradient(135deg, #d3dcff, #f1dcff); color: var(--muted); font-style: normal; }
.upload-box { display: flex; align-items: center; flex-wrap: wrap; gap: .85rem; padding: .75rem; border-radius: var(--r); border: 1.5px dashed #d4d9ea; background: var(--surface-2); }
.upload-box .thumb { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); background: #fff center/contain no-repeat; color: #b4b9d1; }
.upload-box .thumb.wide { width: 124px; flex-basis: 124px; background-size: cover; }
.upload-box .ub-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.pv-card { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.pv-top { display: flex; align-items: center; gap: .65rem; padding: .75rem .85rem; border-bottom: 1px solid var(--line-2); }
.pv-top .brand-logo { width: 34px; height: 34px; font-size: 1rem; border-radius: 10px; }
.pv-top b { font-size: .95rem; }
.pv-body { min-height: 210px; padding: .85rem; }
.pv-body .app-banner { min-height: 96px; margin-bottom: .75rem; border-radius: 14px; }
.pv-body .app-banner .ab-inner { padding: .75rem .9rem; }
.pv-body .app-banner h2 { font-size: 1rem; }
.pv-body .app-banner p { font-size: .78rem; }
.pv-btn { display: inline-block; padding: .38rem .85rem; border-radius: 9px; color: #fff; background: var(--grad-main); font-size: .8rem; font-weight: 700; box-shadow: var(--sh-color); }
.pv-tabs { display: flex; align-items: center; gap: .3rem; margin-top: .7rem; }
.pv-tabs span { flex: 1; height: 8px; border-radius: 6px; background: var(--surface-3); }
.pv-tabs span:first-child { background: var(--grad-main); }

/* ---------- Guide ---------- */
.guide-hero { display: none !important; }
.guide-hero-legacy { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; padding: 1.75rem 1.9rem; margin-bottom: 1.1rem; border-radius: var(--r-xl); color: #fff; overflow: hidden; isolation: isolate;
  background: var(--grad-hero); box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--c1) 85%, transparent); }
.guide-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 26px 26px; }
.gh-text { flex: 1 1 320px; }
.gh-text h2 { color: #fff; font-weight: 800; margin-bottom: .45rem; }
.gh-text p { margin: 0; max-width: 38em; opacity: .95; line-height: 1.75; }
.gh-flow { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.gh-node { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; border-radius: 12px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); font-weight: 700; white-space: nowrap; }
.guide-toc { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: 1.1rem; }
.guide-toc a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .95rem; border-radius: 30px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: .9rem; box-shadow: var(--sh-xs); transition: border-color .15s, color .15s; }
.guide-toc a:hover { border-color: var(--c1); color: var(--c1); }
.guide-sec { margin-bottom: 1.1rem; scroll-margin-top: 92px; }
.guide p, .guide li { line-height: 1.8; }
.guide-steps { counter-reset: gs; list-style: none; margin: 0; padding: 0; }
.guide-steps > li { counter-increment: gs; position: relative; padding: 0 0 1.15rem 3.2rem; }
.guide-steps > li::before { content: counter(gs); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad-main); box-shadow: var(--sh-color); }
.guide-steps > li:not(:last-child)::after { content: ''; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.guide-steps > li > b { display: block; margin-bottom: .2rem; font-size: 1.05rem; }
.guide-steps p, .guide-steps ul { margin-bottom: .4rem; }
.guide kbd { padding: .1rem .45rem; border-radius: 6px; background: var(--c1-soft); color: var(--c1); font-family: inherit; font-weight: 700; font-size: .88em; box-shadow: none; }
.guide code { padding: .1rem .35rem; border-radius: 5px; background: var(--surface-3); color: var(--c2); word-break: break-all; }
.guide-note { display: flex; gap: .8rem; padding: .95rem 1.05rem; margin: .4rem 0 1rem; border-radius: var(--r); background: #fff8e6; color: #7a5200; border: 1px solid #fbe6b3; }
.guide-note > i { margin-top: .3rem; font-size: 1.1rem; }
.guide-note.ok { background: #e8f8f0; color: #0b6b48; border-color: #c6eedb; }
.guide-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; margin: .5rem 0; }
.guide-compare > div { padding: .95rem 1.05rem; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); }
.guide-compare pre { margin: .5rem 0; padding: .7rem .9rem; border-radius: var(--r-sm); background: #fff; border: 1px dashed #d4d9ea; font-family: 'Sarabun', sans-serif; font-size: .92rem; line-height: 1.6; color: var(--ink-2); white-space: pre; overflow-x: auto; }
.guide-compare small { color: var(--muted); }
.badge-mode { display: inline-block; margin-right: .35rem; padding: 1px 8px; border-radius: 10px; font-size: .72rem; font-weight: 700; background: var(--c2-soft); color: var(--c2); }
.guide-status { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1rem; align-items: center; }
.guide-list > li { margin-bottom: .35rem; }
.guide-faq .accordion-item { margin-bottom: .5rem; border: 1px solid var(--line); border-radius: 12px !important; overflow: hidden; }
.guide-faq .accordion-button { font-family: inherit; font-weight: 700; color: var(--ink); }
.guide-faq .accordion-button:not(.collapsed) { background: var(--c1-soft); color: var(--c1); box-shadow: none; }
.guide-faq .accordion-button:focus { box-shadow: 0 0 0 3px var(--c1-ring); }

/* ---------- Illustrated guide ---------- */
.gflow { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; margin-bottom: 1rem; padding: 1rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh); }
.gf-item { flex: 1 1 150px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding: .5rem; }
.gf-item b { font-size: .95rem; }
.gf-item small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.gf-ic { width: 46px; height: 46px; margin-bottom: .25rem; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 1.1rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 16px -8px rgba(16,24,64,.45); }
.gf-arrow { align-self: center; color: #c0c5db; font-size: .85rem; }
.gnote-top { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; margin: 0 0 1.4rem; border-radius: var(--r); background: #fff0f5; border: 1px solid #ffd0df; color: #8a1f45; }
.gnote-top > i { font-size: 1.2rem; color: #ff2d6f; }
.gpart { display: flex; align-items: baseline; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 1rem; font-size: 1.45rem; font-weight: 800; scroll-margin-top: 92px; }
.gpart span { font-size: .8rem; font-weight: 700; padding: .2rem .7rem; border-radius: 20px; color: #fff; background: var(--grad-main); align-self: center; }
.gpart small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.gstep { position: relative; margin-bottom: 1.25rem; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--sh); overflow: hidden; scroll-margin-top: 92px; }
.gstep::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c1), var(--c2) 45%, #fbbf24 75%, #f472b6); }
.gstep-head { display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.3rem; border-bottom: 1px solid var(--line-2); }
.gstep-no { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 800; color: #fff; background: var(--grad-main); box-shadow: var(--sh-color); }
.gstep-head small { display: block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.gstep-head h3 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.gstep-body { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 1.4rem; padding: 1.3rem; align-items: start; }
.gshot { margin: 0; }
.gzoom { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 14px 30px -18px rgba(16,24,64,.45); cursor: zoom-in; }
.gzoom img { display: block; width: 100%; height: auto; transition: transform .35s var(--ease); }
.gzoom:hover img { transform: scale(1.015); }
.gzoom-ic { position: absolute; right: .7rem; bottom: .7rem; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: rgba(10,14,40,.6); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s; }
.gzoom:hover .gzoom-ic { opacity: 1; }
.gshot.phone { max-width: 260px; margin: 0 auto; }
.gshot.phone .gzoom { border-radius: 26px; border: 6px solid #1a2040; }
.gmobile .gstep-body { grid-template-columns: 280px minmax(0, 1fr); align-items: center; }
.gcall { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .75rem; }
.gcall li { display: flex; gap: .7rem; align-items: flex-start; line-height: 1.7; color: var(--ink-2); }
.gc-no { width: 28px; height: 28px; flex: 0 0 28px; margin-top: .1rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .88rem; color: #fff; background: #ff2d6f; box-shadow: 0 0 0 3px #ffe1ea; }
.gsmall { font-size: .88rem; color: var(--muted); margin: 0; }
.gtable td { padding: .45rem .7rem; font-size: .88rem; }
.gstatus { font-size: .9rem; }
.glight { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 2rem; background: rgba(8,11,32,.86); backdrop-filter: blur(4px); cursor: zoom-out; animation: viewIn .2s var(--ease); }
.glight[hidden] { display: none; }
.glight img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 60px rgba(0,0,0,.5); cursor: default; }
.glight button { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; color: #fff; background: rgba(255,255,255,.15); font-size: 1.2rem; }
@media (max-width: 1099.98px) {
  .gstep-body, .gmobile .gstep-body { grid-template-columns: 1fr; }
  .gf-arrow { display: none; }
}

/* =========================================================================
   LOGIN — split screen
   ========================================================================= */
.login-body { min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.login-hero { position: relative; display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 5vw, 4.5rem); color: #fff; overflow: hidden; isolation: isolate;
  background-color: color-mix(in srgb, var(--c1) 55%, #0a0f2e);
  background-image: linear-gradient(135deg, rgba(9,13,42,.8) 0%, color-mix(in srgb, var(--c1) 48%, rgba(9,13,42,.42)) 55%, color-mix(in srgb, var(--c2) 45%, rgba(9,13,42,.22)) 100%), var(--hero-img, linear-gradient(transparent, transparent));
  background-size: cover; background-position: center; }
.login-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 30% 40%, #000 30%, transparent 85%); }
.login-hero::after { content: ''; position: absolute; z-index: -1; width: 520px; height: 520px; right: -200px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%); }
.login-hero > * { max-width: 560px; }
.login-hero .brand-row { margin-bottom: 2.4rem; }
.login-hero .brand-text { color: #fff; }
.login-hero .brand-logo:not(.has-img) { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); box-shadow: none; }
.hero-title { margin-bottom: 1rem; color: #fff; font-size: clamp(2rem, 3.8vw, 3.1rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.hero-sub { max-width: 34em; color: rgba(255,255,255,.86); font-size: 1.06rem; line-height: 1.75; }
.hero-points { display: grid; gap: .65rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.hero-points li { display: flex; align-items: center; gap: .75rem; font-weight: 500; color: rgba(255,255,255,.95); }
.hero-points i { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); }
.transfer-demo { display: flex; align-items: center; gap: .8rem; margin: 2rem 0 .6rem; }
.td-account { display: flex; align-items: center; gap: .6rem; padding: .75rem .95rem; border-radius: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); white-space: nowrap; }
.td-account > i { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--c1); background: #fff; }
.td-dst > i { color: var(--c2); }
.td-account b { display: block; font-size: .95rem; color: #fff; }
.td-account small { color: rgba(255,255,255,.75); }
.td-pipe { position: relative; flex: 1; height: 44px; overflow: hidden; background: repeating-linear-gradient(90deg, rgba(255,255,255,.4) 0 10px, transparent 10px 18px) center / 100% 3px no-repeat; }
.td-file { position: absolute; top: 50%; left: -10%; width: 30px; height: 30px; transform: translateY(-50%); display: grid; place-items: center; border-radius: 8px; background: #fff; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); animation: flow 4s linear infinite; }
.td-file.f1 { color: #df3b5c; } .td-file.f2 { color: var(--green); animation-delay: 1s; } .td-file.f3 { color: #2f6bff; animation-delay: 2s; } .td-file.f4 { color: #e89c00; animation-delay: 3s; }
.login-hero .app-banner { margin-bottom: 1.8rem; box-shadow: 0 20px 40px -24px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.2); }

.login-card-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 4vw, 3rem); }
.login-card { width: 100%; max-width: 440px; padding: 2.6rem 2.3rem 2.2rem; border-radius: var(--r-xl); text-align: center; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-lg); }
.login-icon { width: 70px; height: 70px; margin: 0 auto 1.1rem; border-radius: 20px; display: grid; place-items: center; font-size: 1.75rem; color: #fff; background: var(--grad-main); box-shadow: var(--sh-color); }
.login-card h2 { margin-bottom: .4rem; font-weight: 800; }
.btn-google { display: flex; align-items: center; justify-content: center; gap: .8rem; padding: .9rem 1rem; border-radius: var(--r); border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-weight: 700; font-size: 1.04rem; transition: border-color .15s, box-shadow .15s, transform .15s; }
.btn-google:hover { color: var(--ink); border-color: color-mix(in srgb, var(--c1) 45%, var(--line)); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--c1) 70%, transparent); transform: translateY(-1px); }
.login-foot a { white-space: nowrap; }
.login-foot { margin-top: 1.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line-2); font-size: .86rem; color: var(--muted); }

/* =========================================================================
   PUBLIC PAGES (คู่มือ นโยบาย ข้อกำหนด ตรวจสอบระบบ)
   ========================================================================= */
.pub-nav { position: sticky; top: 0; z-index: 1020; background: rgba(255,255,255,.9); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); }
.pub-nav .inner { display: flex; align-items: center; gap: 1rem; max-width: 1080px; margin: 0 auto; padding: .75rem 1.25rem; }
.pub-nav .brand-row { color: var(--ink); min-width: 0; }
.pub-links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.pub-links a:not(.btn) { padding: .45rem .8rem; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.pub-links a:not(.btn):hover { background: var(--surface-2); color: var(--c1); }
.pub-links a.cur { background: var(--c1-soft); color: var(--c1); }
.pub-hero { position: relative; padding: 2.6rem 1.25rem 5.5rem; color: #fff; isolation: isolate; overflow: hidden;
  background-color: color-mix(in srgb, var(--c1) 55%, #0a0f2e);
  background-image: linear-gradient(110deg, rgba(9,13,42,.8) 0%, color-mix(in srgb, var(--c1) 45%, rgba(9,13,42,.42)) 50%, color-mix(in srgb, var(--c2) 40%, rgba(9,13,42,.2)) 100%), var(--hero-img, linear-gradient(transparent, transparent));
  background-size: cover; background-position: center; }
.pub-hero::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000 30%, transparent); }
.pub-hero .inner { display: flex; align-items: center; gap: 1.5rem; max-width: 1080px; margin: 0 auto; }
.pub-hero.narrow .inner { max-width: 860px; }
.pub-hero.wide .inner, .pub-main.wide { max-width: 1320px; }
.pub-hero h1 { margin: 0 0 .35rem; color: #fff; font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.pub-hero p { margin: 0; color: rgba(255,255,255,.82); }
.pub-hero .ph-icon { margin-left: auto; }
.pub-main { position: relative; z-index: 2; max-width: 1080px; margin: -3.5rem auto 0; padding: 0 1.25rem 2rem; }
.pub-main.narrow { max-width: 860px; }
.pub-foot { max-width: 1080px; margin: 0 auto; padding: 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; justify-content: space-between; color: var(--faint); font-size: .86rem; border-top: 1px solid var(--line-2); }
.pub-foot a { color: var(--muted); }
.doc-head { position: relative; padding: 1.8rem 2rem; margin-bottom: 1.1rem; border-radius: var(--r-xl); color: #fff; overflow: hidden; isolation: isolate; background: var(--grad-hero); box-shadow: 0 24px 44px -26px color-mix(in srgb, var(--c1) 85%, transparent); }
.doc-head::before { content: ''; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 26px 26px; }
.doc-head h1 { margin: 0 0 .3rem; color: #fff; font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
.doc-head p { margin: 0; opacity: .9; }
.doc-head .dh-ic { float: right; width: 58px; height: 58px; margin-left: 1rem; border-radius: 17px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); }
.doc h2 { margin-top: 1.9rem; font-size: 1.18rem; font-weight: 800; display: flex; align-items: center; gap: .55rem; }
.doc h2::before { content: ''; width: 6px; height: 1.1em; border-radius: 3px; background: var(--grad-main); }
.doc p, .doc li { line-height: 1.85; color: var(--ink-2); }
.check-list td:first-child { width: 48px; }

/* ---------- Loader ---------- */
.page-loader { position: fixed; inset: 0; z-index: 3000; display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(255,255,255,.72); backdrop-filter: blur(5px); }
.page-loader.show { display: flex; animation: viewIn .2s var(--ease); }
.page-loader p { margin-top: 1rem; font-weight: 700; color: var(--c2); }
.loader-ring { width: 62px; height: 62px; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 18%, var(--c1), var(--c2)); animation: spin .85s linear infinite;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px)); }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, #eef0f8 25%, #f8f9fd 50%, #eef0f8 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Bootstrap / SweetAlert polish ---------- */
.form-control, .form-select { border-color: var(--line); border-radius: var(--r-sm); padding: .55rem .85rem; }
.form-control:focus, .form-select:focus { border-color: color-mix(in srgb, var(--c1) 50%, #fff); box-shadow: 0 0 0 4px var(--c1-ring); }
.form-check-input:checked { background-color: var(--c1); border-color: var(--c1); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--c1-ring); }
.form-range::-webkit-slider-thumb { background: var(--c1); }
.form-range::-moz-range-thumb { background: var(--c1); }
.alert { border-radius: var(--r); }
.swal2-popup { font-family: 'Sarabun', sans-serif !important; border-radius: var(--r-xl) !important; padding: 1.6rem 1.4rem 1.4rem !important; }
.swal2-title { color: var(--ink) !important; font-weight: 800 !important; }
.swal2-styled { border-radius: var(--r-sm) !important; font-weight: 700 !important; padding: .6rem 1.3rem !important; }
.swal2-styled.swal2-confirm { background: var(--grad-main) !important; box-shadow: var(--sh-color) !important; }
.swal2-toast { border-radius: var(--r) !important; box-shadow: var(--sh-lg) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
  .ap-grid { grid-template-columns: 1fr; }
  .ap-preview { position: static; }
}
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 50px rgba(0,0,0,.35); }
  .sidebar.open { transform: none; }
  .sb-backdrop.show { display: block; position: fixed; inset: 0; z-index: 1030; background: rgba(10,14,40,.45); backdrop-filter: blur(2px); }
  .main { margin-left: 0; }

  .acc-link { display: none; }
  .topbar { padding: 0 1.1rem; }
  .page-hero { padding: calc(68px + 1rem) 1.25rem 5.5rem; }
  body.is-dash .ph-inner { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs:nth-child(3) { border-left: 0; }
  .hs:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.16); }
  .ph-icon { display: none; }
  .content { padding: 0 1.25rem 1.5rem; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { padding: 2rem 1.5rem 2.4rem; }
  .login-hero .brand-row { margin-bottom: 1.5rem; }
  .hero-points, .transfer-demo, .login-hero .app-banner { display: none; }
  .hero-title { font-size: 1.75rem; }
  .login-card-wrap { margin-top: -1.6rem; align-items: flex-start; padding-top: 0; }
  .bridge { grid-template-columns: 1fr; text-align: center; }
  .bridge-acc, .bridge-acc.right { justify-content: center; }
  .bridge-acc.right { flex-direction: row-reverse; }
  .bridge-acc.right .text-end { text-align: left !important; }
}
@media (max-width: 575.98px) {
  body { font-size: 15px; }
  .content { padding: 0 .85rem 1.25rem; }
  .page-hero { padding-left: 1rem; padding-right: 1rem; }
  .hs { padding: .8rem; }
  .hs b { font-size: 1.25rem; }
  .top-crumb { display: none; }
  .top-user span { display: none; }
  .card-x-body { padding: 1.05rem; }
  .card-x-head { padding: .85rem 1.05rem; }
  .search-box { min-width: 0; width: 100%; }
  .fname span { max-width: 170px; }
  .step { min-width: 0; flex: 0 0 auto; }
  .step b { display: none; }
  .step.active b { display: inline; }
  .guide-status { grid-template-columns: 1fr; gap: .25rem; }
  .guide-status > span:nth-child(even) { margin-bottom: .5rem; color: var(--muted); }
  .guide-steps > li { padding-left: 2.7rem; }
  .pub-links a:not(.btn) { display: none; }
  .doc-head { padding: 1.4rem; }
  .login-card { padding: 2rem 1.4rem 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
