/* ============================================================
   หน้าจัดการร้าน — ใช้ตัวแปรสีร่วมกับ app.css
   เน้นใช้งานบนมือถือ ตารางจะกลายเป็นการ์ดเมื่อจอแคบ
   ============================================================ */

.admin-body{background:#f6eee5}

.admin{
  max-width:1120px;
  width:100%;
  margin:0 auto;
  padding:calc(var(--safe-t) + 18px) 14px calc(var(--safe-b) + 40px) 14px;
  padding:calc(var(--safe-t) + 18px) max(14px,var(--safe-l)) calc(var(--safe-b) + 40px) max(14px,var(--safe-r));
}

.panel{
  background:#fff;
  padding:16px 18px 18px;
  border-radius:14px;
  margin:0 0 14px;
  border:1px solid var(--line);
}
.panel h2{margin:0 0 12px;font-size:19.5px}
.panel > .small{margin-top:-4px;margin-bottom:12px}

.login-panel{max-width:410px;margin:8vh auto}
.login-panel input{width:100%;margin-bottom:12px}

.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.top h1{margin:0;font-size:24px}
.small{font-size:14.5px;color:var(--muted);margin:2px 0 0;line-height:1.6}
.danger{color:#a33}
.empty{color:var(--muted);text-align:center;padding:22px 0;margin:0;font-size:15px}

.admin-links{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.admin-links a,.admin-links .link{
  color:var(--accent);
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  min-height:var(--tap);
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border-radius:9px;
  background:var(--cream);
  border:0;
}

#app{display:none}

/* ---------------- ฟอร์ม ---------------- */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px 14px;margin-bottom:12px}

.panel label{display:block;font-size:14.5px;font-weight:700;color:var(--muted)}
.panel label.check{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:var(--tap);
  font-size:15px;
  color:var(--ink);
}
.panel label.check input{width:22px;height:22px;accent-color:var(--accent)}

.panel input,.panel textarea,.panel select{
  width:100%;
  padding:11px 12px;
  margin-top:4px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#fffdf9;
  font-size:16px;          /* ต่ำกว่านี้ iOS จะซูมหน้าจอเองตอนกด */
  min-height:var(--tap);
}
.panel textarea{min-height:76px;resize:vertical}
.panel input[type=file]{padding:9px;background:#fff}

.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:12px 0 0}
.actions-end{justify-content:flex-end;margin-bottom:0}

.button-danger{background:#a33}
.button-danger:active{background:#8a2a2a}

/* ---------------- ตัวกรองออเดอร์ ---------------- */
.filters{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.chip{
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
  border-radius:99px;
  padding:0 16px;
  min-height:var(--tap);
  font-weight:700;
  font-size:14px;
}
.chip.is-on{background:var(--accent);border-color:var(--accent);color:#fff}

/* สองแผงวางคู่กันตอนจอกว้าง จบในจอเดียวไม่ต้องเลื่อน
   จอแคบกลับมาเรียงบนลงล่างตามเดิม */
/* จอคอมกว้าง ขยายพื้นที่เนื้อหาให้ใช้จอคุ้มขึ้น
   การ์ดออเดอร์สองใบต่อแถวจะได้กว้างพอแตกเป็นสองคอลัมน์ในตัวเองด้วย */
@media (min-width:1280px){ .admin{max-width:1340px} }
@media (min-width:1800px){ .admin{max-width:1700px} }

.cols2{display:grid;grid-template-columns:1fr;gap:0}
@media (min-width:1100px){
  .cols2{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:14px;align-items:start}
  .cols2 > .panel{margin-bottom:0}
}

/* ------------------------------------------------------------
   แท็บย่อยในแต่ละแท็บใหญ่
   เปิดทีละเรื่อง แต่ละเรื่องจบในจอเดียว ไม่ต้องเลื่อนหา
   ------------------------------------------------------------ */
.subtabs{
  display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px;
  background:#fff;border:1px solid var(--line);border-radius:12px;padding:6px
}
.subtabs button{
  /* ตัวที่ไม่ได้เลือกต้องดูเป็นปุ่มด้วย มีพื้นกับขอบ ไม่ใช่ตัวหนังสือลอย ๆ */
  flex:1 1 auto;border:1px solid var(--line);background:var(--cream);border-radius:9px;
  padding:0 18px;min-height:46px;font:inherit;font-size:16px;font-weight:700;
  color:#6b5f57;cursor:pointer;white-space:nowrap;transition:background .12s,color .12s
}
.subtabs button:hover{background:#f6e6d9;color:var(--accent)}
.subtabs button.is-on{background:var(--accent);border-color:var(--accent);color:#fff}
.sub-off{display:none !important}

/* แถบเปลี่ยนหน้าของตารางยาว ๆ */
.pager{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)
}
.pg-info{font-size:14.5px;color:var(--muted);font-weight:600}
.pg-btns{display:flex;gap:9px}
.pg-btns .add{margin:0;min-width:104px}
.pg-btns .add:disabled{opacity:.42;cursor:not-allowed}
.au-filter .grow{flex:1 1 280px}

/* ---------------- ตาราง ---------------- */
.table-wrap{margin-top:6px}
table{width:100%;border-collapse:collapse;font-size:15.5px}
th,td{text-align:left;padding:11px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:14px;font-weight:700;color:var(--muted);text-transform:none;letter-spacing:0;white-space:nowrap}
tbody tr:hover{background:#fffaf4}
td select{margin-top:0}

/* ปุ่มจัดการเรียงแนวนอน ไม่ตกบรรทัด ประหยัดพื้นที่ */
.cell-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.cell-actions .add{margin:0;white-space:nowrap}
/* ปุ่มแก้ไขกับลบในตารางสินค้า ให้อยู่บรรทัดเดียวกันตั้งแต่จอแท็บเล็ตขึ้นไป
   เดิมช่องแคบจนปุ่มตกบรรทัด ทำให้ทุกแถวสูงขึ้นเท่าตัว (118 จุดต่อแถว)
   สินค้าสิบกว่าตัวเลยยาวเกือบสามจอ ทั้งที่เนื้อหาจริงไม่ได้เยอะขนาดนั้น */
@media(min-width:821px){
  [data-tab="items"] .cell-actions{flex-wrap:nowrap}
  [data-tab="items"] .cell-actions .add{padding:0 11px;min-height:40px;min-width:0}
}
.cancelled-tag{
  display:inline-block;
  padding:4px 11px;
  border-radius:20px;
  background:#a33;
  color:#fff;
  font-size:12px;
  font-weight:700;
}
tr.is-cancelled{background:#faf0ee}
tr.is-cancelled .order-code{text-decoration:line-through;color:var(--muted)}
.muted-note{font-size:12px;color:var(--muted);line-height:1.5}

/* ---------------- จอแคบ: ตารางกลายเป็นการ์ด ---------------- */
@media(max-width:820px){
  table,tbody,tr,td{display:block;width:100%}
  thead{display:none}

  tr{
    border:1px solid var(--line);
    border-radius:13px;
    padding:12px;
    margin-bottom:12px;
    background:#fff;
  }
  tr.is-cancelled{background:#faf0ee;border-color:#e6c9c3}

  td{
    border:0;
    padding:7px 0;
    display:flex;
    gap:12px;
    align-items:flex-start;
    justify-content:space-between;
    border-bottom:1px dashed var(--line);
  }
  td:last-child{border-bottom:0;padding-bottom:0}

  /* ชื่อคอลัมน์ย้ายมาอยู่หน้าค่าในแต่ละแถว */
  td::before{
    content:attr(data-label);
    flex:0 0 34%;
    font-size:12px;
    font-weight:800;
    color:var(--muted);
    text-transform:uppercase;
    letter-spacing:.03em;
    padding-top:3px;
  }
  td>*{flex:1 1 auto;min-width:0;text-align:right}
  td select{max-width:200px;margin-left:auto}
  .cell-actions{align-items:stretch}
  .cell-actions .add,.cell-actions .button{flex:1 1 auto;justify-content:center}
}

@media(max-width:480px){
  td{flex-direction:column;gap:5px}
  td::before{flex:none;padding-top:0}
  td>*{text-align:left;width:100%}
  td select{max-width:none;margin-left:0}
}

/* ---------------- หน้าต่างยกเลิกบิล ---------------- */
#cancelModal .modal-card{text-align:left}
#cancelModal h2{margin:0 0 6px;font-size:21px}
#cancelModal .block-title{
  margin:18px 0 8px;
  font-size:13px;
  font-weight:800;
  letter-spacing:.05em;
  color:var(--green);
  text-transform:uppercase;
  padding-bottom:7px;
  border-bottom:2px solid var(--cream);
}
#cancelModal textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--line);
  border-radius:9px;
  font-size:16px;
  min-height:76px;
  resize:vertical;
  background:#fffdf9;
}
.code-line{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:19px;
  font-weight:800;
  color:var(--accent);
  margin:0 0 10px;
  word-break:break-all;
}
.warn{
  background:#f7e7e4;
  border-radius:10px;
  padding:12px;
  font-size:14px;
  line-height:1.55;
  margin:0;
}

/* ---------------- กล่องยอดขนมปัง (ชุดที่ 5) ---------------- */
.bread-panel{border:2px solid var(--green)}
.bread-now{
  font-size:17px;
  font-weight:700;
  color:var(--green);
  margin:0 0 4px;
}
.bread-now b{font-size:34px;color:var(--accent);line-height:1}
.bread-now.is-out b{color:#a33}
.sub-head{font-size:15px;margin:20px 0 10px;padding-bottom:8px;border-bottom:2px solid var(--cream)}
.bread-in{color:var(--green);font-weight:700}
.bread-out{color:#a33;font-weight:700}

/* ---------------- กะการขาย (ชุดที่ 7ข) ---------------- */
.shift-panel{border:2px solid var(--accent)}
.shift-since{margin:0 0 14px;font-size:15px;color:var(--muted)}
.shift-since b{color:var(--ink)}

/* กล่องตัวเลขของกะ ตอนอยู่ในคอลัมน์แคบ ตัวเลขยาว ๆ จะตกบรรทัดกลางจำนวน
   ลดความกว้างขั้นต่ำลง และห้ามตัดคำกลางตัวเลข */
.sum-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:10px;margin-bottom:6px}
.sum-box{
  background:var(--cream);
  border-radius:12px;
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.sum-box span{font-size:13px;color:var(--muted);font-weight:700}
.sum-box b{
  font-size:22px;
  font-size:clamp(18px,2.2vw,24px);line-height:1.15;color:var(--ink);
  white-space:nowrap;overflow-wrap:normal
}
.sum-box.is-cash b{color:var(--green)}
.sum-box.is-bank b{color:#2f5d8f}
.sum-box.is-profit b{color:var(--accent)}
.sum-box.is-drawer{background:var(--accent);border:0}
.sum-box.is-drawer span{color:#ffffffcc}
.sum-box.is-drawer b{color:#fff}

.diff-line{
  margin:6px 0 0;
  font-size:16px;
  font-weight:800;
  line-height:1.5;
  padding:11px 13px;
  border-radius:10px;
  background:var(--cream);
}
.diff-line.is-ok{background:#e6f2e9;color:#2c6b3f}
.diff-line.is-over{background:#eaf0f7;color:#2f5d8f}
.diff-line.is-short{background:#f7e7e4;color:#a33}
.diff-short{color:#a33;font-weight:800}
.diff-over{color:#2f5d8f;font-weight:800}
.diff-zero{color:#2c6b3f;font-weight:800}

/* ลิงก์ไปหน้าขายหน้าร้าน ให้เด่นกว่าลิงก์อื่น */
.admin-links .pos-link{background:var(--accent);color:#fff}

/* ============================================================
   แถบแท็บ แยกงานเป็นหมวด ไม่ต้องเลื่อนยาว
   ============================================================ */
.tabs{
  display:grid;
  /* แบ่งช่องตามจำนวนแท็บอัตโนมัติ เพิ่มแท็บใหม่ก็ยังอยู่แถวเดียว */
  grid-auto-flow:column;
  grid-auto-columns:1fr;
  gap:5px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:6px;
  margin-bottom:16px;
  position:-webkit-sticky;position:sticky;
  /* ต้องอยู่ใต้แถบเมนูหลังร้านที่ติดขอบจออยู่ ไม่งั้นสองแถบจะทับกันตอนเลื่อน
     ความสูงของแถบเมนูวัดจริงจาก assets/nav-bar.js แล้วส่งมาเป็น --nav-h */
  top:calc(var(--nav-h, 64px) + 6px);
  z-index:10;
  /* ค่าข้างบนเป็นของจอกว้างที่แถบเมนูติดขอบจอ
     จอแคบแถบเมนูเลื่อนหายไปแล้ว แถบแท็บจึงติดขอบบนได้เลย */
  box-shadow:0 2px 10px #00000012;
}
.tab{
  /* ให้เห็นว่าเป็นปุ่มแยกกัน ไม่ใช่ข้อความเรียงกันเฉย ๆ
     ตัวที่ไม่ได้เลือกมีพื้นครีมอ่อนกับเส้นขอบบาง ๆ */
  border:1px solid var(--line);
  background:var(--cream);
  border-radius:10px;
  min-height:58px;
  padding:6px 4px;
  font-weight:700;
  font-size:14.5px;
  color:#6b5f57;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  line-height:1.2;
}
.tab span{font-size:20px;line-height:1}
.tab.is-on{background:var(--accent);color:#fff}
.tab .dot{
  position:absolute;
  transform:translate(18px,-16px);
  background:#a33;
  color:#fff;
  border-radius:99px;
  min-width:20px;
  height:20px;
  font-size:11px;
  display:grid;
  place-items:center;
  padding:0 5px;
}

/* กล่องที่ไม่ได้อยู่ในแท็บปัจจุบัน ซ่อนไว้ */
.panel[data-tab].hidden{display:none}

/* จอแคบ ย่อตัวอักษรและไอคอนลงแทนการตกบรรทัด */
@media(max-width:520px){
  .tabs{gap:3px;padding:4px}
  /* 12px คือเส้นแบ่งที่ยังอ่านออกตอนถือห่างแขน เล็กกว่านี้ต้องเพ่ง
     ย่อไอคอนกับขอบในลงแทน ตัวหนังสือไม่ย่อตามแล้ว */
  .tab{font-size:12px;min-height:54px;padding:5px 2px;gap:1px}
  .tab span{font-size:17px}
}
@media(max-width:380px){
  .tab{font-size:12px;padding:5px 1px}
  .tab span{font-size:15px}
  .tab .dot{transform:translate(14px,-16px);min-width:17px;height:17px;font-size:10px}
}

/* ลิงก์ไปหน้าจอครัว */
.admin-links .kitchen-link{background:#3f5544;color:#fff}

/* ลิงก์ไปสถานีพิมพ์ */
.admin-links .print-link{background:#4a5a6b;color:#fff}
/* ปุ่มรับออเดอร์ ใช้บ่อยที่สุด ให้เด่นกว่าปุ่มอื่น */
.admin-links .take-link{background:#1F4D2B;color:#fff;font-weight:700}

/* ============================================================
   หน้าบัญชี
   ============================================================ */
/* แถวเลือกช่วงวันที่ ให้อยู่บรรทัดเดียว ไม่ยืดเต็มความกว้าง */
/* หัวข้อย่อยในฟอร์มยาว ๆ แบ่งเรื่องให้อ่านเป็นกลุ่ม ไม่ใช่ช่องกรอกสิบกว่าช่องเรียงรวด */
.block-title{
  margin:16px 0 8px;font-size:15.5px;font-weight:800;color:var(--accent);
  padding-left:10px;border-left:4px solid var(--accent);line-height:1.3
}
.panel > .block-title:first-of-type{margin-top:4px}
.actions-split{justify-content:space-between;align-items:center}
/* ซ่อนช่องกรอกจากสายตาแต่ยังใช้งานด้วยคีย์บอร์ดและโค้ดได้
   ต้องใส่ !important เพราะกฎ .panel input สั่ง width:100% ไว้
   ถ้าไม่ใส่ ช่องที่ซ่อนจะกว้างเต็มแผงแล้วดันหน้าให้ล้นขอบจอ */
.vis-hidden{
  position:absolute !important;
  width:1px !important;height:1px !important;
  min-height:0 !important;padding:0 !important;margin:-1px !important;border:0 !important;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;opacity:0;pointer-events:none
}

/* ช่องที่อยู่รูปโลโก้ กับปุ่มเลือกรูปและอัปโหลด อยู่บรรทัดเดียวกัน
   เมื่อก่อนปุ่มอัปโหลดไปอยู่ท้ายหน้า ห่างจากช่องที่มันเกี่ยวข้องมาก */
.logo-field{grid-column:1 / -1}
.logo-row{display:flex;gap:9px;align-items:center;margin-top:4px;flex-wrap:wrap}
.logo-row input{flex:1 1 220px;min-width:0;margin-top:0}
.logo-row .add{margin:0;flex:none;min-height:var(--tap)}
.hint-line{display:block;font-size:13.5px;color:var(--muted);font-weight:600;margin-top:5px}

/* ---------- รายการสินค้าแบ่งตามหมวด และลากเรียงได้ ----------
   หัวหมวดเป็นแถบเข้มคาดเต็มความกว้าง เห็นชัดว่าของกลุ่มไหนอยู่ตรงไหน
   และมีเลขลำดับหมวดกำกับ จะได้รู้ว่าหมวดนี้ขึ้นเป็นที่เท่าไรในหน้าลูกค้า */
.reorder-help{margin:0 0 10px;font-weight:600}

.cat-row > td{background:var(--cream);padding:0 !important;border-bottom:2px solid var(--line)}
/* ยอมให้ตกบรรทัดได้ จอแคบ ๆ จำนวนรายการจะได้ลงไปอยู่บรรทัดล่าง
   ถ้าไม่ให้ตกบรรทัด คำว่า "6 รายการ" จะถูกบีบจนตัวอักษรเรียงลงมาทีละตัว */
.cat-bar{display:flex;align-items:center;gap:11px;padding:10px 13px;flex-wrap:wrap}
.cat-no{
  flex:none;min-width:30px;height:30px;border-radius:8px;
  background:var(--accent);color:#fff;font-size:15px;font-weight:800;
  display:flex;align-items:center;justify-content:center;padding:0 7px
}
.cat-nm{flex:1 1 auto;min-width:0;font-size:16.5px;font-weight:800;color:var(--ink);
  word-break:break-word;overflow-wrap:anywhere}
.cat-ct{flex:none;white-space:nowrap;font-size:13.5px;color:var(--muted);font-style:normal;font-weight:600}

/* ที่จับลาก ต้องใหญ่พอให้นิ้วโดน และบอกด้วยเคอร์เซอร์ว่าลากได้ */
.grab{
  flex:none;width:34px;height:34px;border-radius:8px;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface);border:1px solid var(--line);
  color:var(--muted);font-size:17px;line-height:1;
  cursor:grab;-webkit-user-select:none;user-select:none;
  -webkit-touch-callout:none;touch-action:none
}
.grab:active{cursor:grabbing;background:var(--cream)}

.nm-cell{display:flex;align-items:center;gap:10px}
/* เลขลำดับในหมวด วางเป็นป้ายเล็กข้างชื่อ ไม่กินบรรทัดเพิ่ม
   ชื่อหมวดไม่ต้องเขียนซ้ำในทุกแถว เพราะมีแถบหัวหมวดคุมอยู่แล้ว */
.pos-no{
  flex:none;min-width:26px;height:26px;border-radius:7px;
  background:var(--cream);border:1px solid var(--line);color:var(--muted);
  font-size:13px;font-weight:800;
  display:flex;align-items:center;justify-content:center;padding:0 5px
}
.nm-txt{flex:1;min-width:0}
.nm-txt b{display:block;word-break:break-word;overflow-wrap:anywhere}

/* ปุ่มลูกศรขึ้นลง ทางเลือกของการลาก และใช้ได้ทุกเครื่อง */
.movers{flex:none;display:flex;gap:4px}
.mv{
  width:32px;height:32px;min-height:0;padding:0;border-radius:8px;
  border:1px solid var(--line);background:var(--surface);
  color:var(--ink);font-size:12px;line-height:1
}
.mv:disabled{opacity:.35}
.mv:not(:disabled):hover{background:var(--cream);border-color:var(--accent)}

/* แถวที่กำลังลาก ยกขึ้นมาให้เห็นว่ากำลังจับอันนี้อยู่ */
.is-grabbing > td{background:#fdf1ea !important;box-shadow:inset 0 0 0 2px var(--accent)}
body.is-reordering{-webkit-user-select:none;user-select:none;cursor:grabbing}

/* ---------- เลือกรูปสินค้า ----------
   วางรูปตัวอย่างไว้ข้างปุ่ม เจ้าของร้านจะได้เห็นทันทีว่าเลือกรูปถูกใบไหม
   ไม่ต้องกดบันทึกแล้วไปเปิดหน้าร้านดูว่าใช่รูปที่ตั้งใจหรือเปล่า */
.pic-pick{
  display:flex;gap:14px;align-items:flex-start;
  background:var(--cream);border:2px solid var(--line);border-radius:12px;
  padding:13px;margin:4px 0 12px
}
.pic-box{
  flex:none;width:128px;border-radius:10px;overflow:hidden;
  border:2px solid var(--line);background:#fff center/cover no-repeat;
  position:relative
}
/* สัดส่วน 4:3 เท่ากับการ์ดเมนูหน้าร้าน จะได้เห็นว่ารูปจะถูกตัดตรงไหน
   ใส่ที่ ::before เพราะกล่องนี้เป็นลูกของ flex ซึ่งเบราว์เซอร์เก่าคิดเปอร์เซ็นต์ผิด */
.pic-box::before{content:"";display:block;padding-top:75%}
.pic-box.is-empty{background-image:none}
/* ข้อความเอามาจาก data-empty ไม่เขียนตายในไฟล์สไตล์ จะได้สลับภาษาได้ */
.pic-box.is-empty::after{
  content:attr(data-empty);position:absolute;top:0;right:0;bottom:0;left:0;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;font-weight:700;color:var(--muted);text-align:center;padding:6px
}
.pic-side{flex:1;min-width:0}
.pic-side > b{display:block;font-size:15.5px;margin:0 0 2px}
.pic-side input{width:100%}
.pic-btns{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:9px 0 4px}
.pic-btns .add{margin:0;flex:none}
@media(max-width:520px){
  /* จอแคบวางซ้อนกัน แต่ไม่ปล่อยรูปตัวอย่างกว้างเต็มกรอบ
     เพราะสัดส่วน 4:3 เต็มความกว้างจะสูงเกือบ 300 จุด ดันปุ่มบันทึกหายไปจากจอ */
  .pic-pick{flex-direction:column}
  .pic-box{width:100%;max-width:200px}
}

/* สวิตช์เปิด-ปิดรับออเดอร์ อยู่หัวแผง กดเห็นผลทันทีว่าเปิดหรือปิด */
.open-switch{display:flex;align-items:center}
.sw.is-big{min-height:46px;font-size:15.5px;padding:6px 18px 6px 7px}
.sw.is-big .dot{width:42px;height:24px}
.sw.is-big .dot::after{width:20px;height:20px}
.sw.is-big.is-on .dot::after{transform:translateX(18px)}
.sw.is-off{border-color:#e2bdb3;background:#fbf1ee;color:#a33}
.sw.is-off .dot{background:#d99f92}

.row{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;margin-bottom:6px}
.row label{flex:0 1 210px;min-width:0}
.row .add{margin:0;min-height:var(--tap)}

/* งบกำไรขาดทุนกับรายจ่ายแยกหมวด วางคู่กันตอนจอกว้าง
   เมื่อก่อนกล่องงบใช้คลาส .ac-cards ซึ่งเป็นตารางการ์ด
   หัวข้อกับตัวเลขเลยถูกหั่นเป็นช่อง ๆ และเหลือที่ว่างข้างซ้ายเป็นแถบยาว */
.ac-pl{min-width:0}
.ac-split{display:grid;grid-template-columns:1fr;gap:18px;margin-top:14px}
@media (min-width:1000px){
  .ac-split{grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:28px;align-items:start}
  .ac-bycat{margin-top:0}
}
.ac-pl .period{font-size:13.5px;color:var(--muted);margin:0 0 10px}
.ac-cards{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:10px;
  margin:14px 0 4px;
}
.ac-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:13px 14px;
}
.ac-card span{display:block;font-size:13px;color:var(--muted);line-height:1.4}
.ac-card b{display:block;font-size:21px;margin-top:3px;line-height:1.2}
.ac-card i{display:block;font-size:12px;color:var(--muted);font-style:normal;margin-top:2px}
.ac-card.is-good b{color:#2c6b3f}
.ac-card.is-bad b{color:#a33}

.ac-bycat{margin-top:18px}
.ac-bycat h3{font-size:16px;margin:0 0 10px}
.ac-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border-bottom:1px dashed var(--line);
  padding:9px 2px;
}
.ac-row:last-child{border-bottom:0}
.ac-row .nm{flex:1 1 auto;min-width:0;font-size:15px;line-height:1.4}
.ac-row b{white-space:nowrap;font-size:16px}
.ac-row .kind{
  display:inline-block;
  font-size:11px;
  font-style:normal;
  border-radius:99px;
  padding:2px 9px;
  margin-left:8px;
  vertical-align:middle;
}
.ac-row .kind.is-cogs{background:#f3e2cc;color:#8a5a2b}
.ac-row .kind.is-opex{background:#e6f2e9;color:#2c6b3f}

/* ============================================================
   หน้าตาแบบใหม่

   หลักการสี ใช้ความหมายเดียวกันทั้งระบบ
     เขียว  เงินเข้า กำไร สำเร็จ
     แดง    เงินออก อันตราย ยกเลิก
     เหลือง รอดำเนินการ ยังไม่จบ
     ดำ     ตัวเลขชี้ขาดที่ต้องดูก่อนใคร
   ============================================================ */

/* ---------------- แถวตัวเลขสำคัญ ---------------- */
.kpi-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:9px;
  margin-bottom:14px;
}
@media(min-width:620px){ .kpi-row{grid-template-columns:repeat(4,1fr)} }
.kpi-row.hidden{display:none}
.kpi{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:11px 13px;
  min-width:0;
}
.kpi span{display:block;font-size:12px;color:var(--muted);line-height:1.35}
.kpi b{display:block;font-size:20px;margin-top:2px;line-height:1.15;word-break:break-word;overflow-wrap:anywhere}
.kpi.in {background:#f2f8f3;border-color:#cbe3d1}
.kpi.in b{color:#2c6b3f}
.kpi.out{background:#fbf3f1;border-color:#eccdc3}
.kpi.out b{color:#a4402c}
/* กองสลิปที่ยังไม่ได้เปิดดู ย้ำด้วยสีเหลือง เป็นงานค้างที่ต้องสะสาง */
.kpi.warn{background:#fdf6e6;border-color:#ecd9ae}
.kpi.warn b{color:#8a5a10}
.kpi.key{background:#29211e;border-color:#29211e}
.kpi.key span{color:#c9b8a8}
.kpi.key b{color:#fff}

@media (max-width:760px){
  .tabs{top:6px}
}

@media(max-width:520px){
  .kpi b{font-size:17px}
  .kpi span{font-size:11px}
}

/* ---------------- หัวข้อกล่อง มีแถบสีนำ ---------------- */
.panel h2{display:flex;align-items:center;gap:9px}
.panel h2::before{
  content:'';
  flex:0 0 auto;
  width:4px;
  height:19px;
  border-radius:2px;
  background:var(--accent);
}

/* ---------------- รายการออเดอร์ ---------------- */
/* ------------------------------------------------------------
   หัวแผง มีชื่อแผงกับปุ่มเพิ่มของใหม่อยู่แถวเดียวกัน
   ------------------------------------------------------------ */
.panel-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;margin-bottom:14px
}
.panel-head h2{margin:0}
.panel-head .button{margin:0;white-space:nowrap}

/* ------------------------------------------------------------
   สวิตช์เปิด-ปิดขาย
   กดทีเดียวเปลี่ยนทันที ไม่ต้องเปิดฟอร์มแก้แล้วกดบันทึกอีกรอบ
   ทำเป็นปุ่มจริง ไม่ใช่ช่องติ๊ก จะได้กดง่ายบนแท็บเล็ต
   ------------------------------------------------------------ */
.sw{
  display:inline-flex;align-items:center;gap:9px;
  border:1px solid var(--line);background:#fff;
  border-radius:99px;padding:5px 13px 5px 6px;
  font:inherit;font-size:13.5px;font-weight:700;color:var(--muted);
  cursor:pointer;min-height:38px;white-space:nowrap
}
.sw .dot{
  flex:none;width:36px;height:20px;border-radius:99px;
  background:#d9cec4;position:relative;transition:background .15s
}
.sw .dot::after{
  content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;
  border-radius:50%;background:#fff;transition:transform .15s;
  box-shadow:0 1px 2px rgba(0,0,0,.2)
}
.sw.is-on{border-color:#cbe3d1;background:#f2f8f3;color:#2c6b3f}
.sw.is-on .dot{background:#3f8552}
.sw.is-on .dot::after{transform:translateX(16px)}
.sw:disabled{opacity:.6;cursor:wait}

/* ป๊อบอัปฟอร์ม ต้องกว้างกว่ากล่องยืนยันธรรมดา เพราะมีหลายช่อง
   กฎหน้าตาของช่องกรอกเดิมเขียนไว้ใต้ .panel ซึ่งใช้ไม่ถึงในป๊อบอัป
   จึงต้องเขียนซ้ำที่นี่ ไม่งั้นช่องติ๊กกับช่องรายละเอียดจะเบี้ยว */
.modal-wide{max-width:720px;width:100%;text-align:left}
.modal-wide .grid{margin-bottom:4px}
.modal-wide h2{margin:0 0 16px;font-size:21px;padding-right:34px}
.modal-wide label{display:block;font-size:13px;font-weight:700;color:var(--muted)}
.modal-wide input,
.modal-wide textarea,
.modal-wide select{
  width:100%;padding:11px 12px;margin:4px 0 0;
  border:1px solid var(--line);border-radius:9px;
  font:inherit;font-size:16px;min-height:var(--tap);
  background:#fff;color:var(--ink)
}
.modal-wide textarea{min-height:88px;resize:vertical;line-height:1.5}
.modal-wide label.check{
  display:flex;align-items:center;gap:11px;
  min-height:var(--tap);margin:10px 0 0;
  font-size:15.5px;font-weight:600;color:var(--ink)
}
.modal-wide label.check input{
  width:24px;height:24px;min-height:0;flex:none;margin:0;accent-color:var(--accent)
}
.modal-wide label.check span{font-size:15.5px;font-weight:600;color:var(--ink)}
.actions-end{display:flex;gap:10px;justify-content:flex-end;align-items:center;flex-wrap:wrap;margin-top:14px}

/* จอกว้างวางการ์ดสองใบต่อแถว เห็นออเดอร์ได้มากขึ้นเท่าตัว
   ใช้ container query ให้การ์ดแตกเป็นสองคอลัมน์ตามความกว้าง "ของการ์ดเอง"
   ไม่ใช่ความกว้างจอ ไม่งั้นพอวางสองใบ ข้างในจะแน่นจนอ่านไม่ออก */
.ord-list{display:grid;grid-template-columns:1fr;gap:14px;align-items:start}
@media (min-width:1280px){ .ord-list{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (min-width:1800px){ .ord-list{grid-template-columns:repeat(3,minmax(0,1fr))} }

/* ------------------------------------------------------------
   การ์ดออเดอร์
   ใช้บนแท็บเล็ตกับคอมเป็นหลัก พนักงานต้องกวาดตาแล้วรู้ทันทีว่า
   บิลไหนเป็นของใคร ยอดเท่าไร ได้เงินหรือยัง และมีสลิปให้ตรวจไหม
   จอกว้างจึงแบ่งเป็นสองคอลัมน์ ซ้ายของที่ต้องทำ ขวาเรื่องเงิน
   ------------------------------------------------------------ */
.ord-item{
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:14px 16px 15px;
  box-shadow:0 1px 2px rgba(74,47,32,.05);
  /* เป็นตารางตั้งแต่จอแคบ เพื่อให้สั่งลำดับด้วย order ได้
     จอแคบมีคอลัมน์เดียว พอการ์ดกว้างพอค่อยแตกเป็นสองคอลัมน์ข้างล่าง */
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
}
.ord-item.is-cancelled{opacity:.6;background:#faf7f4}

.ord-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  padding-bottom:12px;
  border-bottom:1px solid var(--line);
}
.ord-id .code{
  font-size:20px;font-weight:800;letter-spacing:.08em;
  display:block;line-height:1.15;color:var(--accent-dark,#8a4326)
}
.ord-id .who{font-size:15px;font-weight:600;color:#3f352f;margin-top:3px;line-height:1.4}
.ord-id .sub{font-size:13px;color:var(--muted);line-height:1.5;margin-top:2px}
.ord-money{text-align:right;flex:0 0 auto}
.ord-money b{font-size:24px;font-weight:800;display:block;line-height:1.1}

.tag{
  display:inline-block;
  font-size:12.5px;
  font-weight:700;
  border-radius:99px;
  padding:3px 11px;
  margin-top:6px;
  white-space:nowrap;
}
.tag.paid{background:#e6f2e9;color:#2c6b3f}
.tag.wait{background:#fdf0d5;color:#8a5a10}
.tag.new {background:#f3e8e2;color:#a04f2c}
.tag.void{background:#f7e7e4;color:#a4402c}

.ord-col{margin-top:11px;min-width:0}
.ord-col h4{
  margin:0 0 7px;font-size:12.5px;font-weight:700;letter-spacing:.04em;
  color:var(--muted);text-transform:none
}

/* รายการสินค้า บรรทัดละชิ้น จำนวนอยู่หน้าสุด */
.ord-lines{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ord-lines li{
  display:flex;gap:10px;align-items:baseline;
  background:var(--cream);border-radius:9px;padding:7px 11px
}
.ord-lines .q{
  flex:none;min-width:30px;font-size:15px;font-weight:800;color:var(--accent,#b85c38)
}
.ord-lines .nm{min-width:0}
.ord-lines .nm b{display:block;font-size:15px;font-weight:600;color:#3f352f;line-height:1.4}
.ord-lines .nm i{display:block;font-style:normal;font-size:13.5px;color:#6b5f57;line-height:1.5}
.ord-lines .nm em{
  display:block;font-style:normal;font-size:13.5px;font-weight:700;
  color:#a4402c;line-height:1.5;margin-top:1px
}

/* เรื่องเงิน จัดเป็นตารางสองช่อง อ่านเทียบกันง่าย */
.pay-grid{display:flex;flex-direction:column;gap:1px;background:var(--line);border-radius:9px;overflow:hidden}
.pay-grid .pr{
  display:flex;justify-content:space-between;align-items:baseline;gap:12px;
  background:#fff;padding:7px 11px
}
.pay-grid .pr span{font-size:13.5px;color:var(--muted)}
.pay-grid .pr b{font-size:15px;font-weight:700;color:#3f352f;text-align:right}

/* ช่องตรวจสลิป */
.slip-chk{margin-top:11px}
.slip-thumb{
  display:block;width:100%;padding:0;border:2px solid var(--line);border-radius:11px;
  background:var(--cream);cursor:zoom-in;overflow:hidden;line-height:0
}
.slip-thumb img{width:100%;height:118px;object-fit:cover;object-position:top;display:block}
.slip-thumb:hover{border-color:var(--accent,#b85c38)}
/* แถวที่เปลี่ยนสถานะไว้แต่ยังไม่กดบันทึก
   ต้องเห็นชัดว่ายังค้างอยู่ ไม่งั้นพนักงานนึกว่าบันทึกแล้วตั้งแต่ตอนเลือก */
.ord-item.is-dirty{box-shadow:inset 0 0 0 2px var(--accent)}
.ord-item.is-dirty .update{background:var(--accent);color:#fff;border-color:var(--accent)}

.slip-cap{display:block;font-size:12.5px;color:var(--muted);margin-top:4px;text-align:center}
/* บันทึกไว้ว่าแนบสลิป แต่เปิดไฟล์ไม่ได้
   ต้องบอกตรง ๆ ไม่ใช่ปล่อยให้เห็นเป็นรูปแตก เพราะพนักงานจะแยกไม่ออก
   ว่าไฟล์หาย หรือหน้าเว็บเสีย ซึ่งสองอย่างนี้ต้องแก้คนละแบบ */
.slip-chk.is-gone .slip-thumb{display:none}
.slip-chk.is-gone .slip-cap{
  color:#a33;font-weight:700;text-align:left;
  background:#f7e7e4;border:1px solid #e0bdb5;border-radius:10px;
  padding:9px 11px;line-height:1.5;margin-top:0
}
.slip-missing{
  margin:11px 0 0;font-size:14px;font-weight:700;line-height:1.5;
  background:#f9e9e5;color:#a4402c;border-radius:9px;padding:10px 12px
}

.ord-note{
  font-size:14px;
  line-height:1.55;
  margin-top:9px;
  background:#fdf3dc;
  color:#7a5410;
  border-radius:9px;
  padding:9px 12px;
}

/* ช่องเปลี่ยนสถานะสองช่อง ต้องอยู่เคียงกันแม้คอลัมน์จะแคบ
   ถ้าปล่อยให้ตกบรรทัด การ์ดจะสูงขึ้นอีกเกือบร้อยพิกเซลต่อใบ */
.ord-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(132px,1fr));gap:10px;margin-top:11px}
.ord-controls .sel{min-width:0;display:block}
.ord-controls .sel span{
  display:block;font-size:12.5px;color:var(--muted);margin-bottom:3px;font-weight:600
}
.ord-controls select{width:100%;min-width:0;min-height:var(--tap);font-size:15px}

.ord-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}
.ord-actions .add{margin:0}

/* จอแท็บเล็ตขึ้นไป แบ่งสองคอลัมน์ ของที่สั่งกับเรื่องเงินอยู่คู่กัน
   ไม่ต้องเลื่อนลงไปดูว่าบิลนี้มีสลิปหรือยัง */
/* จอแคบ กล่อง .ord-left ไม่มีตัวตน ลูกข้างในจึงเรียงเป็นแถวเดียว
   แล้วสั่งลำดับใหม่ให้เรื่องเงินกับสลิปมาก่อนปุ่มกด
   พนักงานจะได้เห็นสลิปก่อนตัดสินใจกดยืนยันว่าเงินเข้าแล้ว */
.ord-left{display:contents}
.ord-item > .ord-top{order:0}
.ord-left > .is-items{order:1}
.ord-item > .is-pay{order:2}
.ord-left > .ord-controls{order:3}
.ord-left > .ord-actions{order:4}

/* การ์ดแตกเป็นสองคอลัมน์ในตัวเอง ซ้าย = ของที่ต้องทำ ตามด้วยช่องเปลี่ยนสถานะและปุ่ม
   ขวา = เรื่องเงินกับสลิป เห็นคู่กันในตาเดียว

   ใช้ความกว้างจอตัดสิน ไม่ใช่ container query
   เพราะ container query ใช้จัดตัวคอนเทนเนอร์เองไม่ได้ จัดได้แต่ลูกข้างใน
   และจำนวนคอลัมน์ของรายการก็ผูกกับความกว้างจออยู่แล้ว
   ทุกกรณีการ์ดกว้างเกิน 540px เสมอ (จอ 760 = 1 คอลัมน์, 1280 = 2, 1800 = 3) */
@media (min-width:760px){
  .ord-item{
    padding:16px 20px 18px;
    grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
    column-gap:24px
  }
  .ord-item > .ord-top{grid-column:1 / -1}
  .ord-left{display:block;grid-column:1;min-width:0}
  .ord-item > .is-pay{grid-column:2}
  .ord-id .code{font-size:22px}
  .ord-money b{font-size:26px}
}

/* ------------------------------------------------------------
   กล่องขยายดูสลิป
   ------------------------------------------------------------ */
.slip-back{
  position:fixed;top:0;right:0;bottom:0;left:0;inset:0;z-index:70;
  background:rgba(40,25,16,.72);
  display:flex;align-items:center;justify-content:center;
  padding:16px;
  padding:max(16px,var(--safe-t)) 16px max(16px,var(--safe-b));
}
.slip-win{
  background:#fff;border-radius:14px;overflow:hidden;
  width:100%;max-width:620px;max-height:100%;display:flex;flex-direction:column
}
.slip-bar{
  display:flex;align-items:center;gap:12px;
  padding:11px 14px;border-bottom:1px solid var(--line);background:var(--cream)
}
.slip-bar b{font-size:16px}
.slip-bar .grow{flex:1}
.slip-x{
  border:1px solid var(--line);background:#fff;border-radius:9px;
  padding:7px 16px;font:inherit;font-weight:700;cursor:pointer;min-height:40px
}
.slip-x:active{background:var(--cream)}
.slip-pic{overflow:auto;padding:12px;background:#f2ece6;text-align:center}
.slip-pic img{max-width:100%;height:auto;border-radius:8px;background:#fff}
body.no-scroll{overflow:hidden}

/* ปุ่มอันตราย ต้องไม่เหมือนปุ่มบันทึก จะได้ไม่กดผิด */
.add.is-danger{border-color:#d9a49a;color:#a4402c;background:#fff}
.add.is-danger:active{background:#f7e7e4}
.add.is-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.add.is-primary:active{background:var(--accent-dark)}

/* ---------------- งบกำไรขาดทุน ---------------- */
.pl{font-size:14px;margin-top:12px}
.pl .r{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding:8px 0;
  border-bottom:1px dashed var(--line);
}
.pl .r:last-child{border-bottom:0}
.pl .r b{white-space:nowrap;font-variant-numeric:tabular-nums}
.pl .r.sub{padding:4px 0;border-bottom:0}
.pl .r.sub span{padding-left:16px;font-size:12.5px;color:var(--muted)}
.pl .r.sub b{font-size:12.5px;font-weight:400;color:var(--muted)}
.pl .minus{color:#a4402c}
.pl .r.total{
  border-bottom:0;
  border-top:2px solid var(--ink);
  margin-top:4px;
  padding-top:10px;
  font-weight:800;
  font-size:16px;
}
.pl .r.grand{
  border-top:3px double var(--ink);
  font-size:17px;
}
.pl .r.grand b{color:#2c6b3f}
.pl .r.grand.is-loss b{color:#a4402c}
.pl .period{font-size:12px;color:var(--muted);margin:0 0 4px}

/* ============================================================
   รายการประวัติแบบย่อ
   แสดง 2 คอลัมน์ คอลัมน์ละ 5 แถว แล้วมีปุ่มดูเพิ่มเติม
   เพื่อไม่ให้ประวัติยาวลากหน้าจอจนหาของอื่นไม่เจอ
   ============================================================ */
.mini-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:0 22px;
  margin-top:6px;
}
.mini-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  padding:8px 0;
  border-bottom:1px dashed var(--line);
  min-width:0;
}
.mini-row .left{flex:1 1 auto;min-width:0}
.mini-row .ttl{font-size:13.5px;font-weight:700;line-height:1.35;word-break:break-word;overflow-wrap:anywhere}
.mini-row .sub{font-size:11.5px;color:var(--muted);line-height:1.5;margin-top:1px;word-break:break-word;overflow-wrap:anywhere}
.mini-row .val{flex:0 0 auto;text-align:right;font-size:13.5px;font-weight:700;white-space:nowrap}
.mini-row .val .extra{display:block;font-size:11.5px;font-weight:400;color:var(--muted);margin-top:1px}
.mini-empty{grid-column:1/-1;color:var(--muted);font-size:13.5px;padding:10px 0}

.more-btn{
  display:block;
  margin:10px auto 0;
  color:var(--accent);
  font-weight:700;
  font-size:14px;
  min-height:var(--tap);
  padding:0 18px;
  border-radius:9px;
}
.more-btn:active{background:var(--cream)}

/* มือถือเหลือคอลัมน์เดียว จอแคบเกินกว่าจะอ่าน 2 คอลัมน์ได้สบาย */
@media(max-width:640px){
  .mini-list{grid-template-columns:1fr;gap:0}
}

/* ============================================================
   สีปุ่มตามความหมาย ใช้เหมือนกันทั้งระบบ

   น้ำเงิน  แก้ไข         ปลอดภัย แก้กลับได้
   แดง      ลบ ยกเลิก    อันตราย แก้กลับไม่ได้
   น้ำตาล   บันทึก ยืนยัน  การกระทำหลักของหน้านั้น
   เทา      ดูอย่างเดียว   ไม่เปลี่ยนแปลงข้อมูล
   ============================================================ */
.add.is-edit{
  border-color:#a9c0d4;
  color:#2c567a;
  background:#f4f8fb;
}
.add.is-edit:active{background:#e6eff6}

.add.is-danger{border-color:#d9a49a;color:#a4402c;background:#fdf5f3}
.add.is-danger:active{background:#f7e7e4}

.add.is-primary{background:var(--accent);border-color:var(--accent);color:#fff}
.add.is-primary:active{background:var(--accent-dark)}

.add.is-view{border-color:var(--line);color:var(--muted);background:#fff}
.add.is-view:active{background:var(--cream)}

/* ============================================================
   รายการรายจ่าย
   ทุกอย่างอยู่บรรทัดเดียว ชื่อซ้าย เงินกลาง ปุ่มขวา
   ============================================================ */
.ex-list{margin-top:10px}
.ex-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 0;
  border-bottom:1px dashed var(--line);
  flex-wrap:wrap;
}
.ex-row:last-child{border-bottom:0}
.ex-main{flex:1 1 200px;min-width:0}
.ex-main .ttl{display:block;font-size:14.5px;font-weight:700;line-height:1.35;word-break:break-word;overflow-wrap:anywhere}
.ex-main .sub{display:block;font-size:12px;color:var(--muted);line-height:1.5;margin-top:2px;word-break:break-word;overflow-wrap:anywhere}
.ex-amt{flex:0 0 auto;font-size:17px;white-space:nowrap;color:#a4402c}
.ex-row .cell-actions{flex:0 0 auto}

@media(max-width:520px){
  .ex-row{gap:8px}
  .ex-amt{font-size:16px}
  .ex-row .cell-actions{flex:1 1 100%}
}

/* สิ่งที่ลูกค้าสั่งว่าไม่ใส่ */
.no-items{color:#B3261E}

/* ===== แผงล้างข้อมูลเพื่อเริ่มใช้งานจริง =====
   ใช้กรอบแดงอ่อนให้รู้ว่าเป็นงานที่ย้อนคืนไม่ได้
   เขียนด้วยคำสั่งที่ Safari 12 อ่านได้ ไม่ใช้ gap ใน flex ตรงนี้ */
.reset-box{
  border:2px solid #d9a49a;
  background:#fdf5f3;
  border-radius:14px;
  padding:14px 16px;
  margin:14px 0 10px;
}
.reset-box h3{
  font-size:15px;
  margin:0 0 6px;
  color:#a4402c;
}
.reset-box h3 + .reset-list{margin-bottom:14px}
.reset-box .is-keep + h3,
.reset-box .reset-list:last-child{margin-bottom:0}
.reset-list{
  margin:0;
  padding-left:20px;
  font-size:14px;
  line-height:1.7;
  color:#5c4f45;
}
.reset-list.is-keep{color:#2c6b3f}
.reset-row{align-items:flex-end;flex-wrap:wrap}
.reset-row input{text-transform:uppercase;letter-spacing:1px}
#doReset{margin-left:10px}
#doReset:disabled{opacity:.5}
#resetDone{color:#2c6b3f;font-weight:700}

@media(max-width:520px){
  #doReset{margin-left:0;margin-top:10px;width:100%}
}
