:root{
  --purple:#7444c4;
  --purple-dark:#5928a3;
  --purple-light:#905fe4;
  --dark:#2c2040;
  --muted:#928b9e;
  --line:#eeeaf3;
  --pale:#f5f0fc;
  --emerald:#10b981;
  --emerald-dark:#047857;
  --emerald-pale:#ecfdf5;
  --amber:#f59e0b;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{margin:0;background:#faf9fc;color:var(--dark);font:14px 'Noto Sans Thai',sans-serif}
button,input{font:inherit}
button,a,input{-webkit-tap-highlight-color:transparent}
button,a{cursor:pointer}
a{text-decoration:none;color:inherit}
button:disabled{opacity:.4;cursor:default}
button:focus-visible,a:focus-visible{outline:3px solid #bfa5ea;outline-offset:4px}

.sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:#fff;border-right:1px solid var(--line);padding:32px 22px;display:flex;flex-direction:column}
.brand{display:flex;gap:10px;align-items:center;justify-content:center;font-size:22px;font-weight:800;white-space:nowrap}
.brandmark{display:grid;place-items:center;background:var(--purple);width:42px;height:45px;border-radius:14px;color:white;font-size:29px;box-shadow:0 5px 10px #7444c422}
.brand small{display:block;font-size:8px;letter-spacing:1.8px;color:#a294b4;font-weight:600}
.nav-label{font-size:11px;color:#aaa1b4;margin:46px 12px 14px}
.nav{display:flex;align-items:center;gap:11px;padding:14px 13px;border-radius:10px;color:#83798f;margin-bottom:7px;font-size:13px}
.nav>span{font-size:21px}
.nav.active{color:var(--purple);background:var(--pale);font-weight:600}
.nav b{margin-left:auto;background:white;border-radius:5px;font-size:10px;padding:2px 7px;border:1px solid #ebdff9;color:var(--purple)}
.side-bottom{margin-top:auto;background:linear-gradient(135deg,#f7f3fd,#fcfaff);border:1px solid var(--line);border-radius:16px;padding:22px 18px}
.mini-icon{color:var(--purple);font-size:29px;margin-bottom:10px}
.side-bottom strong{font-size:14px}
.side-bottom p{font-size:11px;line-height:1.9;color:var(--muted);margin:6px 0 10px}
.pill{font-size:9px;color:#8d70b6;background:#efe8fa;padding:3px 8px;border-radius:12px;display:inline-block}
.side-footer{font-size:10px;color:#b5adbf;margin-top:25px;text-align:center}

.main{margin-left:248px}
header{height:78px;border-bottom:1px solid var(--line);background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 42px;font-size:12px;color:#99909f}
header strong{font-weight:600;color:#554565}
.slash{margin:0 15px;color:#d7d0df}
.header-label{font-size:11px;color:#498363;background:#eefaf3;padding:5px 12px;border-radius:20px;display:inline-flex;align-items:center;font-weight:500}
i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#10b981;margin-right:6px}

main{max-width:1250px;margin:auto;padding:33px 42px 0}
.intro{display:flex;justify-content:space-between;align-items:center;margin-bottom:25px}
.eyebrow{font-size:9px;letter-spacing:2px;color:var(--purple);font-weight:700}
h1{font-size:29px;letter-spacing:-.7px;margin:7px 0}
h1>span{color:var(--purple)}
.spark{font-size:32px;margin-left:12px}
p{margin:0}
.intro p{font-size:12px;color:var(--muted)}
.version{border:1px solid #e4d9f5;color:#9472bf;background:#f6f1fc;padding:7px 14px;border-radius:20px;font-size:11px;font-weight:600}

.hero{height:237px;background:linear-gradient(110deg,#784bc3 0%,#8655d4 55%,#a878ea 100%);border-radius:19px;padding:28px 34px;color:#fff;display:flex;justify-content:space-between;position:relative;overflow:hidden;margin-bottom:24px}
.hero-tag{font-size:10px;background:#ffffff1c;padding:4px 9px;border:1px solid #ffffff24;border-radius:5px;display:inline-block}
.hero h2{font-size:27px;line-height:1.45;margin:14px 0 9px;letter-spacing:-.5px}
.hero p{color:#eadcfb;font-size:11px;max-width:480px;line-height:1.6}
.hero a{display:inline-block;font-size:11px;margin-top:17px;background:rgba(255,255,255,.15);padding:6px 14px;border-radius:20px;border:1px solid rgba(255,255,255,.3);transition:.2s}
.hero a:hover{background:rgba(255,255,255,.25)}
.hero a span{margin-left:8px}

.number-art{width:300px;position:relative}
.orbit{width:270px;height:270px;border-radius:50%;border:1px solid #ffffff20;position:absolute;top:-43px;right:0;box-shadow:0 0 0 28px #ffffff06,0 0 0 57px #ffffff05}
.tile{position:absolute;width:88px;height:104px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(140deg,#fff,#e9dcfe);color:#8050c7;font-size:66px;font-weight:600;box-shadow:0 16px 28px #45267d30;border:1px solid #fff}
.t1{left:15px;top:32px;transform:rotate(-13deg)}
.t2{left:110px;top:52px;transform:rotate(9deg);z-index:1}
.t3{left:203px;top:10px;transform:rotate(18deg);background:#bd96ee;color:#fff;border-color:#d4b5fb}
.star{position:absolute;color:#e8d6ff}
.s1{left:90px;top:2px;font-size:29px}
.s2{right:6px;bottom:6px;font-size:48px}
.art-label{position:absolute;bottom:0;left:55px;font-size:8px;letter-spacing:2px;color:#e6cffc}

/* Mode Switcher Tabs */
.mode-container{margin-bottom:20px}
.mode-tabs{display:inline-flex;background:#ede7f7;padding:5px;border-radius:14px;gap:6px}
.mode-tab{border:0;background:transparent;color:#796495;padding:10px 18px;border-radius:10px;font-size:12px;font-weight:600;display:flex;align-items:center;gap:7px;transition:all .2s}
.mode-tab span{font-size:14px}
.mode-tab:hover{color:var(--purple)}
.mode-tab.active{background:#fff;color:var(--purple);box-shadow:0 3px 10px rgba(116,68,196,0.18)}

.workspace{display:grid;grid-template-columns:350px 1fr;gap:25px;align-items:start}
.card{background:#fff;border:1px solid var(--line);border-radius:15px}
.input-card{padding:24px}
.section-title{display:flex;gap:12px;align-items:center;margin-bottom:26px}
.step{background:var(--pale);color:var(--purple);font-size:11px;font-weight:700;border-radius:9px;display:grid;place-items:center;width:35px;height:35px;flex-shrink:0}
h2{font-size:16px;margin:0;font-weight:600}
.section-title p,.result-heading p{font-size:10px;color:var(--muted);margin-top:4px}
.field-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}
.field-head label{font-size:11px}
.field-head label span{font-size:9px;color:#a39aaa}
.text-btn{border:0;background:transparent;color:#9672c6;font-size:10px;padding:4px 0}
.text-btn:hover{color:var(--purple);text-decoration:underline}
input{border:1px solid #e8e1ee;border-radius:8px;background:#fff;outline:0;transition:.2s}
input:focus{border-color:#a581dd;box-shadow:0 0 0 3px #a581dd18}
input::placeholder{color:#c6becf}
#round{width:100%;height:42px;padding:0 12px;font-size:12px}

.entry-table{border:1px solid var(--line);border-radius:10px;overflow:hidden;margin:17px 0}
.entry-head,.entry-row{display:grid;grid-template-columns:1fr 1.2fr;align-items:center;padding:12px}
.entry-head{font-size:10px;color:#a297ae;background:#faf8fd}
.entry-head span:last-child{text-align:center}
.entry-row{border-top:1px solid var(--line);padding:15px 12px}
.entry-row label{font-size:12px;font-weight:500}
.entry-row small{display:block;font-size:9px;font-weight:400;color:#b0a5bc;margin-top:3px}
.entry-row input{width:100%;height:49px;text-align:center;color:var(--purple);font-size:24px;font-weight:700;letter-spacing:7px;padding-left:7px;background:#fdfbff}

.primary{display:flex;justify-content:space-between;align-items:center;border:0;background:var(--purple);color:white;width:100%;padding:14px 18px;border-radius:10px;font-size:13px;font-weight:600;box-shadow:0 5px 12px #7444c41c;transition:.2s}
.primary:hover{background:#6234b1}
.reset{display:block;margin:12px auto 19px;background:transparent;border:0;color:#9d92a8;font-size:11px}
.reset:hover{color:#7444c4}
.input-note{border-top:1px dashed #e9e1f1;padding-top:16px;display:flex;gap:6px;font-size:9px;color:#b0a6bb;line-height:1.6}
.input-note span{color:#9c83bd}
#error{font-size:11px;color:#b14365;margin-bottom:10px}

.result-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px;gap:8px}
.count{font-size:9px;font-weight:600;color:#9b80bb;background:#eee7f8;padding:3px 9px;margin-left:5px;border-radius:6px}
.outline{background:white;border:1px solid #dfcef5;border-radius:8px;padding:8px 13px;color:#6d489f;font-size:11px;font-weight:600;transition:.2s}
.outline:hover:not(:disabled){background:#f6f1fc;border-color:var(--purple)}

/* Summary Card Layout */
.summary-card{background:linear-gradient(135deg,#fff 70%,#faf7ff);border:2px solid #dfcef5;border-radius:22px;padding:24px;box-shadow:0 8px 24px #7444c40a;margin-bottom:15px}
.summary-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:20px}
.round-badge{background:var(--purple);color:#fff;font-weight:700;padding:8px 16px;border-radius:25px;font-size:13px}
.sample-badge{color:#836b9e;font-size:11px;background:#f3edf9;padding:4px 10px;border-radius:12px}

/* Highlights */
.highlights{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:20px}
.highlight{border:2px solid #dfcff5;border-radius:18px;text-align:center;padding:18px 10px;background:linear-gradient(#f7f2ff,#fff);position:relative}
.highlight h3{font-size:14px;color:var(--purple);margin:0;font-weight:700}
.highlight strong{display:block;font-size:56px;line-height:1.2;color:#5c2da0;margin:6px 0;font-weight:800}
.highlight p{font-size:11px;color:#847392;margin:2px 0}
.highlight .formula-meta{font-size:9px;color:#9d88b4;background:#f0e7fa;padding:3px 8px;border-radius:6px;display:inline-block;margin-top:6px}

.highlight.secondary{background:linear-gradient(#f7f2ff,#fff);border-color:#dfcff5}
.highlight.secondary h3{color:var(--purple)}
.highlight.secondary strong{color:#5c2da0}
.highlight.secondary .formula-meta{color:#9d88b4;background:#f0e7fa}

.pair-card{background:#f8f5fc;border:1px dashed #d5c3ec;border-radius:14px;padding:14px 18px;display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}
.pair-card-left{display:flex;align-items:center;gap:12px}
.pair-card-left b{font-size:22px;color:var(--purple);letter-spacing:2px}
.pair-card-left span{font-size:11px;color:#7e6d92}

/* Blocks / Groups for original authentic formulas */
.group-card{background:#fff;border:1px solid #ebdff5;border-radius:14px;padding:16px 18px;margin-bottom:14px}
.group-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.group-head h4{margin:0;font-size:13px;font-weight:700;color:#453556;display:flex;align-items:center;gap:6px}
.group-head p{font-size:10px;color:var(--muted)}
.btn-copy-chip{border:1px solid #e1d3f2;background:#fbf9fe;color:var(--purple);font-size:10px;font-weight:600;padding:4px 9px;border-radius:6px;transition:.2s}
.btn-copy-chip:hover{background:var(--pale);border-color:var(--purple)}

.chips-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.chip-label{font-size:11px;font-weight:600;color:#7f6b98;min-width:65px}
.chip{background:#f5effc;border:1px solid #e0cff5;color:#6032a2;font-size:13px;font-weight:700;padding:5px 11px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;letter-spacing:.5px;transition:.2s;user-select:all}
.chip:hover{background:#ede1fa;transform:translateY(-1px)}
.chip.green{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.chip.blue{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.chip.amber{background:#fffbeb;border-color:#fde68a;color:#b45309}

.chips-group{display:flex;flex-direction:column;gap:9px}
.chips-row-4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;width:100%}
.three-row-item{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.three-row-item:last-child{margin-bottom:0}
.chip-label-sub{font-size:11px;font-weight:600;color:#7f6b98}

.grid-2col{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.stat-box{background:#fdfbff;border:1px solid #ede4f5;border-radius:12px;padding:12px 14px}
.stat-box-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.stat-box-head strong{font-size:12px;color:#554368}
.stat-box-head span{font-size:9px;color:var(--muted)}
.stat-box-val{font-size:19px;font-weight:800;color:var(--purple);letter-spacing:2px}
.stat-box-val.green,.stat-box-val.amber{color:var(--purple)}

.tips-box{background:#faf8ff;border:1px solid #e2d2f7;border-left:4px solid var(--purple);border-radius:10px;padding:12px 14px;margin-top:16px;font-size:11px;color:#6b5a82;line-height:1.7}
.tips-box strong{color:var(--purple);display:block;margin-bottom:4px}

/* Random 12 formulas styles */
.summary-rows{border:1px solid #e7dfef;background:#faf8fc;border-radius:17px;padding:10px 17px;margin-bottom:20px}
.summary-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 0;border-bottom:1px solid #ebe4f2}
.summary-row:last-child{border:0}
.summary-row>span{font-size:12px;font-weight:600;color:#6b5c7c}
.summary-row>b{background:#f3edfc;border:1px solid #ddc9f4;border-radius:8px;padding:4px 10px;font-size:17px;letter-spacing:1px;color:#6438a5;white-space:nowrap}

.result-note{font-size:10px;line-height:1.8;color:#a79aad;margin-top:14px}

/* History */
.history{margin-top:28px;padding:23px 25px}
.empty-history{padding:17px;text-align:center;color:#b1a6bc;font-size:11px}
.history-row{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding:12px 0;gap:10px;font-size:11px;color:#95859f}
.history-row strong{color:#6b4c8f}
.history-row button{background:#f5f0fb;color:var(--purple);border:0;padding:6px 12px;border-radius:6px;font-size:10px;font-weight:600;transition:.2s}
.history-row button:hover{background:#ede2fa}

/* Guide */
.guide{padding:28px 3px}
.guide h3{font-size:13px;font-weight:600;margin-bottom:14px}
.guide-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.guide-item{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.guide-item b{color:var(--purple);font-size:12px;display:block;margin-bottom:5px}
/* How to play each category (วิธีเล่นแต่ละสาย) */
.howtoplay{margin-top:28px;padding:26px 28px}
.howtoplay-header{margin-bottom:20px;display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.howtoplay-header h2{font-size:22px;font-weight:800;color:#391a61;display:flex;align-items:center;gap:10px;margin:0}
.howtoplay-header p{font-size:12px;color:var(--muted);margin-top:4px}
.howtoplay-tag{background:var(--pale);color:var(--purple);font-size:11px;font-weight:700;padding:6px 14px;border-radius:20px;border:1px solid #dfcef5}

.howtoplay-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.htp-card{border:1.5px solid #dfcef5;border-radius:18px;padding:22px;background:#fff;display:flex;flex-direction:column;box-shadow:0 4px 16px rgba(116,68,196,0.04);position:relative;transition:transform .2s, box-shadow .2s}
.htp-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(116,68,196,0.08)}
.htp-top{display:flex;align-items:center;gap:12px;margin-bottom:14px}
.htp-num{background:linear-gradient(135deg,var(--purple),#8f5de6);color:#fff;width:36px;height:36px;border-radius:12px;display:grid;place-items:center;font-size:15px;font-weight:800;flex-shrink:0;box-shadow:0 4px 8px rgba(116,68,196,0.2)}
.htp-title h3{margin:0;font-size:18px;font-weight:800;color:#352052}
.htp-title p{margin:2px 0 0;font-size:11px;color:var(--muted)}

.num-grid-5x2{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin:12px 0}
.num-cell{background:#f6f1fc;border:1px solid #decbf5;border-radius:8px;padding:8px 0;text-align:center;font-size:14px;font-weight:700;color:#5c2da0;letter-spacing:1px}

.htp-desc{font-size:11px;color:#6b5a82;line-height:1.6;margin:10px 0}
.htp-badges{display:flex;flex-direction:column;gap:6px;margin-top:auto}
.htp-badge{background:#f0e9f9;color:var(--purple);font-size:11px;font-weight:700;padding:8px 14px;border-radius:10px;text-align:center}
.htp-badge.green{background:#ecfdf5;color:#047857}
.htp-badge.amber{background:#fffbeb;color:#b45309}

.rood-box{display:flex;flex-direction:column;gap:12px;margin:14px 0}
.rood-item{display:flex;gap:12px;align-items:center;background:#faf8fd;border:1px solid #eee5f8;border-radius:12px;padding:12px}
.rood-tag{background:var(--purple);color:#fff;font-size:13px;font-weight:800;padding:8px 14px;border-radius:8px;min-width:60px;text-align:center;flex-shrink:0}
.rood-item p{margin:0;font-size:11px;color:#5a4773;line-height:1.7}

.pin-table{width:100%;border-collapse:collapse;margin:12px 0;font-size:11px}
.pin-table td{padding:8px 12px;border-bottom:1px solid #eeeaf3}
.pin-table tr:last-child td{border-bottom:0}
.pin-table td:first-child{font-weight:700;color:#553f6e;background:#faf7fd;border-radius:6px 0 0 6px;width:38%}
.pin-table td:last-child{color:#6c5783;background:#fff}

.htp-bullets{margin:10px 0;padding-left:18px;font-size:11px;color:#6b5a82;line-height:1.8}
.htp-bullets li{margin-bottom:2px}

.htp-example{background:#f7f2fd;border:1px dashed #d5c0f0;border-radius:10px;padding:10px 14px;font-size:12px;font-weight:700;color:var(--purple);text-align:center;margin:10px 0}

.howtoplay-notice{margin-top:24px;border-top:1px dashed #dfcef5;padding-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:20px;font-size:11px;color:#7e6c93;line-height:1.7}
.howtoplay-notice-col:first-child{border-right:1px solid #eeeaf3;padding-right:20px}
.howtoplay-notice b{color:var(--purple)}

@media(max-width:850px){
  .howtoplay-grid{grid-template-columns:1fr}
  .howtoplay-notice{grid-template-columns:1fr;gap:14px}
  .howtoplay-notice-col:first-child{border-right:0;border-bottom:1px solid #eeeaf3;padding-right:0;padding-bottom:14px}
}

footer{border-top:1px solid var(--line);padding:22px 0;display:flex;justify-content:space-between;font-size:10px;color:#b5aabc;margin-top:30px}
footer b{margin:0 6px}

#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#3e285c;color:white;padding:12px 25px;border-radius:10px;font-size:12px;opacity:0;pointer-events:none;transition:.2s;z-index:999;box-shadow:0 10px 25px rgba(0,0,0,0.2)}
#toast.show{opacity:1}

@media(min-width:1450px){
  main{padding-top:40px}
  .hero{height:260px}
  .hero h2{font-size:30px}
  .workspace{grid-template-columns:375px 1fr}
}

@media(max-width:1100px){
  .sidebar{width:205px;padding:28px 15px}
  .brand{font-size:19px}
  .main{margin-left:205px}
  main{padding:25px}
  header{padding:0 25px}
  .workspace{grid-template-columns:300px 1fr;gap:18px}
  .input-card{padding:18px}
  .number-art{transform:scale(.85);transform-origin:right center}
  .version{display:none}
  .guide-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:850px){
  .sidebar{position:relative;width:100%;padding:12px 18px;display:flex;justify-content:center;align-items:center;border-bottom:1px solid var(--line);background:#fff}
  .sidebar-auth-card{display:none !important}
  .brand{font-size:20px;justify-content:center;margin:0 auto}
  .brandmark{height:34px;width:34px;font-size:20px;border-radius:10px}
  .nav-label,.nav,.side-bottom,.side-footer{display:none}
  .main{margin-left:0}
  header{height:auto;min-height:48px;padding:8px 18px;display:flex;justify-content:space-between;align-items:center;gap:10px;background:#fff;border-bottom:1px solid var(--line)}
  .header-left{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:11px}
  .header-auth{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
  .workspace{grid-template-columns:1fr;gap:16px}
  .hero{height:auto;padding:18px 20px;margin-bottom:16px}
  .hero h2{font-size:22px}
  .grid-2col{grid-template-columns:1fr 1fr;gap:10px}
}

@media(max-width:620px){
  .sidebar{padding:10px 14px}
  .brand{font-size:18px;justify-content:center;margin:0 auto}
  .brandmark{height:30px;width:30px;font-size:18px;border-radius:8px}
  main{padding:12px 10px 0}
  header{padding:8px 12px;font-size:10px;min-height:44px;height:auto;display:flex;justify-content:space-between;align-items:center;gap:6px}
  .header-left{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:11px}
  .header-left .crumb-prefix, .header-left .slash{display:none}
  .header-left .header-label{padding:2px 6px;font-size:9.5px}
  .header-auth{display:flex;align-items:center;gap:5px;flex-wrap:nowrap}
  .auth-pill-status{padding:4px 8px;font-size:10px;gap:5px;white-space:nowrap;border-radius:14px}
  .status-indicator{width:6px;height:6px}
  .btn-header-renew{padding:4px 8px;font-size:10px;white-space:nowrap;border-radius:6px}
  .btn-header-logout{padding:4px 7px;font-size:10px;white-space:nowrap;border-radius:6px}
  .auth-text-full, .btn-renew-full, .btn-logout-full{display:none !important}
  .auth-text-short, .btn-renew-short, .btn-logout-short{display:inline !important}
  .intro{margin-bottom:12px}
  .eyebrow{font-size:8px;letter-spacing:1.5px}
  h1{font-size:20px;margin:3px 0}
  .spark{font-size:22px;margin-left:6px}
  .intro p{font-size:10px;line-height:1.5}
  .version{display:none}

  /* Compact Hero Banner */
  .hero{padding:14px 16px;margin-bottom:12px;border-radius:14px}
  .hero-tag{font-size:9px;padding:2px 7px}
  .hero h2{font-size:17px;line-height:1.35;margin:6px 0 4px}
  .hero p{font-size:10px;line-height:1.4}
  .hero a{font-size:10px;margin-top:8px;padding:4px 10px}
  .number-art{display:none}

  /* Compact Tabs */
  .mode-container{margin-bottom:12px}
  .mode-tabs{width:100%;display:flex;flex-direction:row;gap:4px;padding:3px;border-radius:10px}
  .mode-tab{flex:1;justify-content:center;padding:7px 4px;font-size:10.5px;border-radius:8px;text-align:center;gap:4px}
  .mode-tab span{font-size:12px}

  /* Compact Workspace & Cards */
  .workspace{gap:12px}
  .card{border-radius:14px}
  .input-card{padding:14px 12px}
  .section-title{margin-bottom:12px;gap:8px}
  .step{width:28px;height:28px;font-size:10px;border-radius:7px}
  .section-title h2{font-size:14px}
  .section-title p{font-size:9px}

  /* Form & Inputs */
  .entry-table{margin:10px 0}
  .entry-head{padding:6px 8px;font-size:9px}
  .entry-row{padding:8px 8px}
  .entry-row label{font-size:11px}
  .entry-row small{font-size:8px}
  .entry-row input{height:38px;font-size:20px;letter-spacing:4px}
  #round{height:34px;font-size:11px;padding:0 10px}
  .primary{padding:10px 14px;font-size:12px;border-radius:8px}
  .reset{margin:6px auto 10px;font-size:10px}
  .input-note{padding-top:8px;font-size:8.5px}

  /* Results Section */
  .result-heading{margin-bottom:10px}
  .result-heading h2{font-size:14px}
  .result-heading p{font-size:9px}
  .outline{padding:5px 9px;font-size:10px}

  /* Summary Card */
  .summary-card{padding:12px;border-radius:14px;margin-bottom:10px}
  .summary-top{margin-bottom:10px}
  .round-badge{font-size:10px;padding:4px 10px}
  .sample-badge{font-size:9px;padding:2px 6px}

  /* Highlights: Side by side 2 columns! */
  .highlights{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}
  .highlight{padding:10px 4px;border-radius:12px}
  .highlight h3{font-size:12px}
  .highlight strong{font-size:34px;margin:2px 0;line-height:1.1}
  .highlight p{font-size:9px;margin:0}
  .highlight .formula-meta{font-size:8px;padding:2px 5px;margin-top:4px}

  /* Pair card */
  .pair-card{padding:8px 12px;border-radius:10px;margin-bottom:10px;gap:6px}
  .pair-card-left span{font-size:10px}
  .pair-card-left b{font-size:17px;letter-spacing:1px}
  .btn-copy-chip{font-size:9px;padding:3px 7px}

  /* Group Cards (2 ตัว & 3 ตัว) - ORDERLY 4 COLUMNS! */
  .group-card{padding:10px 12px;margin-bottom:8px;border-radius:12px}
  .group-head{margin-bottom:6px}
  .group-head h4{font-size:12px}
  .chips-row-4{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;width:100%}
  .chips-row-4 .chip{padding:6px 2px;font-size:13px;border-radius:6px;width:100%;box-sizing:border-box}
  .three-row-item{margin-bottom:6px}
  .chip-label-sub{font-size:9.5px;color:#7e6c93;margin-bottom:3px}

  /* Stat boxes (พิกัด, ปักหลัก, วิน) - KEEP 2 COLUMNS! */
  .grid-2col{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:8px}
  .stat-box{padding:8px 10px;border-radius:10px}
  .stat-box-head{margin-bottom:3px}
  .stat-box-head strong{font-size:10px}
  .stat-box-head .btn-copy-chip{font-size:8px;padding:2px 5px}
  .stat-box-val{font-size:15px;letter-spacing:1px}

  /* Tips box */
  .tips-box{padding:8px 10px;font-size:9.5px;line-height:1.5;margin-top:10px}

  /* How to play on mobile */
  .howtoplay{margin-top:16px;padding:14px 12px}
  .howtoplay-header{margin-bottom:12px}
  .howtoplay-header h2{font-size:16px}
  .howtoplay-header p{font-size:9.5px}
  .howtoplay-tag{font-size:8.5px;padding:2px 6px}
  .howtoplay-grid{grid-template-columns:1fr;gap:10px}
  .htp-card{padding:12px 10px;border-radius:12px}
  .htp-top{margin-bottom:8px;gap:8px}
  .htp-num{width:26px;height:26px;font-size:11px;border-radius:7px}
  .htp-title h3{font-size:14px}
  .htp-title p{font-size:9px}
  .num-grid-5x2{gap:4px;margin:8px 0}
  .num-cell{font-size:12px;padding:5px 0;border-radius:5px}
  .htp-desc{font-size:9.5px;margin:6px 0}
  .htp-badge{font-size:9px;padding:5px 8px;border-radius:6px}
  .rood-box{gap:6px;margin:8px 0}
  .rood-item{padding:6px 8px;gap:8px;border-radius:8px}
  .rood-tag{font-size:10.5px;padding:4px 6px;min-width:38px}
  .rood-item p{font-size:9.5px;line-height:1.5}
  .pin-table{margin:6px 0}
  .pin-table td{padding:4px 6px;font-size:9.5px}
  .htp-bullets{padding-left:12px;font-size:9.5px;margin:4px 0}
  .htp-example{padding:6px 10px;font-size:10px;margin:6px 0}
  .howtoplay-notice{font-size:9px;gap:8px;margin-top:12px;padding-top:10px;grid-template-columns:1fr}
  .howtoplay-notice-col:first-child{border-right:0;border-bottom:1px solid #eeeaf3;padding-right:0;padding-bottom:8px}

  /* History on mobile */
  .history{margin-top:14px;padding:12px 10px}
  .history-row{padding:8px 0;font-size:9.5px}
  .history-row button{padding:4px 7px;font-size:8.5px}

  footer{margin-top:16px;padding:12px 0;font-size:8.5px}

  /* Auth modal mobile adjustments */
  .auth-modal{padding:22px 18px;border-radius:18px}
  .auth-info-card{flex-direction:column;align-items:flex-start;gap:12px;padding:14px 16px}
  .info-price{font-size:26px}
  .upload-area{padding:20px 14px}
  .upload-icon-circle{width:46px;height:46px;margin-bottom:8px}
  .upload-icon-circle svg{width:22px;height:22px}
  .upload-text-main{font-size:12px}
  .upload-text-sub{font-size:10px}
  .success-details-grid{grid-template-columns:1fr}
}

@media(max-width:380px){
  header{flex-direction:column;align-items:stretch;gap:6px;padding:6px 10px}
  .header-left{justify-content:space-between}
  .header-auth{justify-content:flex-end}
}

/* ==============================================================================
   Authentication & 24h Slip Login Gate System
   ============================================================================== */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Locked App State */
body.auth-locked .main,
body.auth-locked .sidebar{
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  transition: filter .3s ease;
}

/* Auth Modal Overlay */
.auth-overlay{
  position: fixed;
  inset: 0;
  background: rgba(19, 13, 31, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity .25s ease, visibility .25s ease;
  overflow-y: auto;
}

.auth-overlay.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-modal{
  background: #ffffff;
  border-radius: 24px;
  width: 100%;
  max-width: 530px;
  padding: 32px 30px;
  box-shadow: 0 25px 60px rgba(44, 32, 64, 0.35), 0 0 0 1px rgba(116, 68, 196, 0.15);
  position: relative;
  animation: authPop .32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authPop{
  0%{opacity:0;transform:scale(0.92) translateY(12px)}
  100%{opacity:1;transform:scale(1) translateY(0)}
}

.auth-modal-close{
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #faf9fc;
  color: #736783;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: .2s;
}
.auth-modal-close:hover{
  background: #eee8f8;
  color: var(--purple);
}

.auth-modal-head{
  margin-bottom: 18px;
}

.auth-badge-top{
  background: #f4ecfd;
  color: var(--purple);
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid #ebdcfb;
}

.auth-badge-top .sparkle{
  color: var(--amber);
  font-size: 13px;
}

.auth-brand{
  display: flex;
  align-items: center;
  gap: 14px;
}

.auth-brand h2{
  font-size: 21px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.4px;
  margin: 0;
}

.auth-brand p{
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

/* Info Banner Card */
.auth-info-card{
  background: linear-gradient(135deg, #fcfaff 0%, #f4edfc 100%);
  border: 1px solid #ebdcfb;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.info-card-left{
  flex-shrink: 0;
}

.info-label{
  font-size: 11px;
  color: #7d6b97;
  font-weight: 600;
}

.info-price{
  font-size: 32px;
  font-weight: 900;
  color: var(--purple-dark);
  line-height: 1.1;
  margin: 2px 0;
}

.info-price small{
  font-size: 14px;
  font-weight: 600;
  color: #7d6b97;
  margin-left: 2px;
}

.info-period{
  font-size: 11px;
  color: #059669;
  font-weight: 700;
}

.info-list{
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  color: #55486a;
  line-height: 1.6;
}

.info-list li{
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.info-list li span{
  color: #10b981;
  font-weight: 800;
  font-size: 12px;
}

/* Drag & Drop Upload Zone */
.upload-area{
  border: 2px dashed #d5c3ee;
  background: #faf8fd;
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  outline: none;
  display: block;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.slip-file-input-native{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
  margin: 0;
  padding: 0;
  display: block;
  -webkit-appearance: none;
}

.upload-area:hover,
.upload-area.dragover{
  border-color: var(--purple);
  background: #f4ecfc;
  box-shadow: 0 0 0 4px rgba(116, 68, 196, 0.12);
}

.upload-icon-circle{
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #efe4fa;
  color: var(--purple);
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  transition: transform .2s ease;
}

.upload-area:hover .upload-icon-circle{
  transform: translateY(-2px) scale(1.05);
}

.upload-text-main{
  font-size: 13px;
  color: var(--dark);
  margin-bottom: 4px;
}

.upload-text-main strong{
  color: var(--purple);
  text-decoration: underline;
}

.upload-text-sub{
  font-size: 11px;
  color: var(--muted);
}

.upload-text-sub kbd{
  background: #fff;
  border: 1px solid #dcd4e8;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
}

/* Preview Selected Image */
.upload-preview{
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid #ebdff9;
  position: relative;
  z-index: 10;
}

#preview-image{
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #eeeaf3;
  flex-shrink: 0;
}

.preview-info{
  flex: 1;
  min-width: 0;
}

.preview-info strong{
  display: block;
  font-size: 12.5px;
  color: var(--dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-info span{
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin: 2px 0 6px;
}

.preview-actions{
  display: flex;
  gap: 8px;
}

.btn-preview-change{
  border: 1px solid #ded0f2;
  background: #f7f3fc;
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  transition: .15s;
}
.btn-preview-change:hover{
  background: #efe6fa;
}

.btn-preview-remove{
  border: 1px solid #fee2e2;
  background: #fff5f5;
  color: #ef4444;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  transition: .15s;
}
.btn-preview-remove:hover{
  background: #fee2e2;
}

/* Progress Spinner Box */
.auth-progress{
  background: #faf8fd;
  border: 1px solid #ebdcfb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner-ring{
  width: 24px;
  height: 24px;
  border: 3px solid #ebdff9;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: authSpin .75s linear infinite;
  flex-shrink: 0;
}

@keyframes authSpin{
  to{transform:rotate(360deg)}
}

.progress-details strong{
  font-size: 12px;
  color: var(--purple-dark);
  display: block;
}

.progress-details p{
  font-size: 10.5px;
  color: var(--muted);
  margin: 2px 0 0 0;
}

/* Feedback Alerts */
.auth-alert{
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.auth-alert.error{
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert.success{
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.alert-icon{
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.auth-alert.error .alert-icon{
  background: #fee2e2;
  color: #dc2626;
}

.auth-alert.success .alert-icon{
  background: #d1fae5;
  color: #059669;
}

.alert-content{
  font-size: 12px;
  line-height: 1.5;
  flex: 1;
}

.error-reasons-list{
  margin: 6px 0 0 0;
  padding-left: 18px;
  font-size: 11px;
  color: #b91c1c;
}

.success-details-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 10px;
  border-radius: 8px;
}

.success-countdown{
  font-size: 11px;
  font-weight: 600;
  color: #047857;
  margin: 8px 0 0 0;
}

/* Submit Slip Button */
.btn-verify-slip{
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #7444c4, #5928a3);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  box-shadow: 0 6px 18px rgba(116, 68, 196, 0.3);
  transition: all .2s ease;
  cursor: pointer;
}

.btn-verify-slip:hover:not(:disabled){
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(116, 68, 196, 0.4);
}

.btn-verify-slip:active:not(:disabled){
  transform: translateY(0);
}

.btn-verify-slip:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-sparkle{
  color: #fbbf24;
}

.auth-footer-note{
  font-size: 10.5px;
  color: #9c92a8;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

/* Header Auth Bar */
.header-auth{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.auth-pill-status{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f4ecfd;
  border: 1px solid #ebdcfb;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-dark);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: .2s;
}
.auth-pill-status:hover{
  background: #ede0fc;
}

.status-indicator{
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
  flex-shrink: 0;
}

.status-indicator.inactive{
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.7);
}

.btn-header-renew{
  border: 1px solid #dcc6f7;
  background: #fff;
  color: var(--purple);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  transition: .2s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-header-renew:hover{
  background: var(--pale);
}

.btn-header-logout{
  border: 1px solid #eee;
  background: transparent;
  color: #8a7e98;
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 8px;
  transition: .2s;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.btn-header-logout:hover{
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}

.auth-text-short, .btn-renew-short, .btn-logout-short{
  display: none;
}

/* Sidebar Auth Card */
.sidebar-auth-card{
  background: linear-gradient(135deg, #faf7fe, #f5edfc);
  border: 1px solid #eedff9;
  border-radius: 14px;
  padding: 14px;
  margin: 14px 0 8px;
}

.auth-card-head{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--dark);
  margin-bottom: 8px;
}

.auth-dot{
  color: #10b981;
  font-size: 11px;
}

.auth-timer-box{
  background: #fff;
  border: 1px solid #eee5f8;
  border-radius: 8px;
  padding: 6px 9px;
  margin-bottom: 10px;
}

.timer-label{
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  display: block;
}

.timer-val{
  font-size: 12px;
  font-weight: 800;
  color: var(--purple-dark);
  margin-top: 1px;
}

.auth-card-actions{
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.btn-auth-action{
  border: 0;
  background: var(--purple);
  color: #fff;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  transition: .2s;
  cursor: pointer;
  width: 100%;
}
.btn-auth-action:hover{
  background: var(--purple-dark);
}

.btn-auth-logout{
  border: 0;
  background: transparent;
  color: #a497b5;
  font-size: 10px;
  padding: 4px 0;
  cursor: pointer;
}
.btn-auth-logout:hover{
  color: #ef4444;
  text-decoration: underline;
}

/* ==============================================================================
   Admin Integration Styles (Announcement, Bank Card, Maintenance, Nav)
   ============================================================================== */
.admin-pill {
  font-size: 9px;
  background: rgba(168, 85, 247, 0.25);
  color: #c084fc;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  border: 1px solid rgba(168, 85, 247, 0.4);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-admin-link {
  color: #a497b5;
  text-decoration: none;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
  margin-left: auto;
}
.footer-admin-link:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.35);
  color: #fff;
}

/* Announcement Banner */
.announcement-banner {
  padding: 10px 16px;
  border-radius: 12px;
  margin: 16px 24px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}

.announcement-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.announcement-text {
  flex: 1;
  color: inherit;
  font-weight: 500;
}

.announcement-link-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.announcement-link-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.announcement-close-btn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.7;
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.announcement-close-btn:hover {
  opacity: 1;
}

.announcement-banner.type-gold {
  background: linear-gradient(90deg, #78350f, #92400e, #b45309);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fef3c7;
}
.announcement-banner.type-info {
  background: linear-gradient(90deg, #3b1659, #5b21b6);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #f3e8ff;
}
.announcement-banner.type-success {
  background: linear-gradient(90deg, #064e3b, #047857);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #d1fae5;
}
.announcement-banner.type-warning {
  background: linear-gradient(90deg, #7c2d12, #c2410c);
  border: 1px solid rgba(251, 146, 60, 0.4);
  color: #ffedd5;
}
.announcement-banner.type-marquee .announcement-text {
  white-space: nowrap;
  animation: marquee 20s linear infinite;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Bank Account Card in Slip Modal */
.bank-account-card {
  background: rgba(25, 18, 48, 0.85);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.bank-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.bank-title-badge {
  font-weight: 700;
  color: #c084fc;
}
.bank-official-tag {
  font-size: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.bank-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bank-acc-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bank-acc-label {
  color: #a497b5;
  font-size: 11.5px;
}
.bank-acc-number {
  font-family: monospace;
  font-size: 15px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.03em;
}
.btn-copy-acc {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: auto;
}
.btn-copy-acc:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: rgba(168, 85, 247, 0.5);
}
.bank-name-row, .bank-promptpay-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
}
.bank-notice-text {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  color: #a497b5;
  font-size: 11px;
  line-height: 1.35;
}

/* Maintenance Screen Overlay */
.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 7, 20, 0.96);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.maintenance-card {
  max-width: 500px;
  background: rgba(25, 18, 48, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 20px;
  padding: 36px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(239, 68, 68, 0.15);
}
.maintenance-icon {
  font-size: 54px;
  margin-bottom: 16px;
}
.maintenance-card h1 {
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 12px;
}
.maintenance-card p {
  color: #cbd5e1;
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.maintenance-footer-link a {
  color: #a855f7;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}
.maintenance-footer-link a:hover {
  color: #c084fc;
  text-decoration: underline;
}

/* ==============================================================================
   PR Marketing User (ยูส PR การตลาด) Styles & Theme
   ============================================================================== */
.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f4ecfd;
  padding: 5px;
  border-radius: 14px;
  margin-bottom: 20px;
  border: 1px solid #ebdcfb;
}

.auth-mode-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #6d5d85;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}

.auth-mode-tab:hover {
  color: var(--purple);
  background: rgba(255, 255, 255, 0.6);
}

.auth-mode-tab.active {
  background: #ffffff;
  color: var(--purple-dark);
  border-color: #ebdcfb;
  box-shadow: 0 4px 12px rgba(116, 68, 196, 0.12);
  font-weight: 700;
}

.auth-mode-tab .tab-icon {
  font-size: 19px;
  flex-shrink: 0;
}

.auth-mode-tab .tab-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.auth-mode-tab .tab-title {
  font-size: 13px;
}

.auth-mode-tab .tab-subtitle {
  font-size: 10px;
  color: #8f859f;
  font-weight: 500;
  margin-top: 1px;
}

.auth-mode-tab .tab-badge-free {
  font-size: 9.5px;
  font-weight: 700;
  color: #9333ea;
  background: #fae8ff;
  border: 1px solid #f0abfc;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 2px;
  width: fit-content;
}

.auth-mode-tab.active .tab-badge-free {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(168, 85, 247, 0.35);
}

/* PR Banner Card */
.pr-banner-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff;
  padding: 14px 16px;
  border-radius: 14px;
  margin-bottom: 18px;
}

.pr-banner-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #c084fc 0%, #9333ea 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(147, 51, 234, 0.25);
}

.pr-banner-details strong {
  display: block;
  font-size: 13px;
  color: #581c87;
  font-weight: 700;
}

.pr-banner-details p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #7e22ce;
  line-height: 1.4;
}

/* Form Fields */
.auth-field-group {
  margin-bottom: 15px;
}

.auth-field-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b3d60;
  margin-bottom: 6px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-label-row label {
  margin-bottom: 0;
}

.field-hint {
  font-size: 11px;
  color: #928b9e;
}

.auth-input-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
  color: #9b8ea9;
  pointer-events: none;
}

.auth-text-input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: #ffffff;
  border: 1.5px solid #e2d9ee;
  border-radius: 12px;
  font-size: 14px;
  color: var(--dark);
  transition: all 0.2s ease;
}

.auth-text-input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3.5px rgba(116, 68, 196, 0.15);
}

.btn-toggle-pw {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 15px;
  color: #8b7d9c;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.btn-toggle-pw:hover {
  opacity: 0.8;
  color: var(--purple);
}

.auth-remember-row {
  margin-bottom: 18px;
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #635775;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--purple);
  cursor: pointer;
}

/* PR Login Submit Button */
.btn-pr-action {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%) !important;
  box-shadow: 0 10px 24px rgba(126, 34, 206, 0.35) !important;
  border: 1px solid #c084fc !important;
}

.btn-pr-action:hover:not(:disabled) {
  background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(126, 34, 206, 0.45) !important;
}

/* PR Indicator & Header Pill */
.status-indicator.pr-active {
  background: #a855f7 !important;
  box-shadow: 0 0 10px #a855f7, 0 0 4px #c084fc !important;
}

.btn-pr-status-pill {
  background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%) !important;
  color: #ffffff !important;
  border: 1px solid #e9d5ff !important;
  box-shadow: 0 3px 8px rgba(147, 51, 234, 0.25) !important;
}



