/* ========================================================================== 
   01) ตัวแปรธีมและค่าพื้นฐานของเว็บไซต์
   รวมสี ฟอนต์ เงา การตั้งค่า box-sizing และคลาสช่วยเหลือที่ใช้ร่วมกัน
   ========================================================================== */

:root {
  --bg: #f3f7f5;
  --ink: #18352e;
  --muted: #71847d;
  --line: #dce7e3;
  --green: #087f5b;
  --green2: #0a6b50;
  --pale: #e7f6ef;
  --white: #fff;
  --danger: #bd3c43;
  --shadow: 0 16px 42px rgba(22,62,51,.1);
  font-family: "Leelawadee UI",Tahoma,"Noto Sans Thai",Arial,sans-serif;
  color: var(--ink);
  background: var(--bg)
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: radial-gradient(circle at 80% -10%,rgba(79,202,157,.16),transparent 33rem),var(--bg);
  font-family: inherit
}

button,input,textarea,select {
  font: inherit
}

button {
  cursor: pointer
}

.hidden {
  display: none!important
}

.wide {
  width: 100%
}

/* ========================================================================== 
   02) กล่องข้อความแจ้งเตือน (ค่าพื้นฐาน)
   สถานะ .show ใช้แสดงข้อความ และ .error ใช้สำหรับข้อความผิดพลาด
   ========================================================================== */

.toast {
  position: fixed;
  z-index: 100;
  top: 18px;
  left: 50%;
  padding: 11px 18px;
  border-radius: 11px;
  color: #fff;
  background: #153a30;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%,-12px);
  pointer-events: none;
  transition: .2s
}

.toast.show {
  opacity: 1;
  transform: translate(-50%,0)
}

.toast.error {
  background: #9d3439
}

/* ========================================================================== 
   03) หน้าเข้าสู่ระบบ
   ครอบคลุมส่วนแบรนด์ การ์ดเข้าสู่ระบบ และข้อความช่วยเหลือ/ข้อผิดพลาด
   ========================================================================== */

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(360px,470px);
  align-items: center;
  gap: 80px;
  padding: 7vw;
  background: linear-gradient(135deg,#11392f 0 49%,transparent 49%),radial-gradient(circle at 20% 25%,rgba(95,218,171,.22),transparent 24rem),#f3f7f5
}

.login-brand {
  max-width: 470px;
  color: #fff;
  display: grid;
  grid-template-columns: 65px 1fr;
  align-items: center;
  gap: 3px 16px
}

.login-brand .logo {
  grid-row: 1/3;
  width: 65px;
  height: 65px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #62d5a9;
  color: #103a2f;
  font-size: 42px
}

.login-brand strong {
  font-size: 39px;
  letter-spacing: .08em
}

.login-brand small {
  color: #a7c8bd;
  font-size: 17px
}

.login-card {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow)
}

.login-card h1 {
  margin: 4px 0 5px;
  font-size: 34px
}

.login-card>p:not(.eyebrow) {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 15px
}

.login-card label,.modal label {
  display: grid;
  gap: 7px;
  margin-bottom: 15px;
  font-size: 14px;
  font-weight: 700
}

.login-help {
  display: block;
  margin-top: 15px;
  color: #879891;
  text-align: center
}

.form-error {
  min-height: 18px;
  margin-top: 9px;
  color: #b4363d;
  font-size: 13px
}

/* ========================================================================== 
   04) ฟอร์มและปุ่มที่ใช้ร่วมกัน
   กำหนดหน้าตาของ input, textarea, select และปุ่มทุกประเภท
   ========================================================================== */

input,textarea,select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d4e1dc;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: .15s
}

input:focus,textarea:focus,select:focus {
  border-color: #35a67e;
  box-shadow: 0 0 0 3px rgba(53,166,126,.12)
}

textarea {
  min-height: 82px;
  resize: vertical
}

.btn {
  min-height: 39px;
  padding: 0 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg,#0c9068,#087153);
  box-shadow: 0 7px 16px rgba(8,127,91,.17)
}

.btn.outline {
  border-color: #d4e1dc;
  background: #fff;
  color: #33574d
}

.btn.danger {
  color: #fff;
  background: var(--danger)
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed
}

/* ========================================================================== 
   05) แถบด้านบนและข้อมูลผู้ใช้งาน
   ประกอบด้วยโลโก้ สถานะออนไลน์ โปรไฟล์ ตะกร้า และปุ่มไอคอน
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px)
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none
}

.brand .logo {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg,#0d8b65,#075a43);
  font-size: 28px
}

.brand>span:last-child,.user-chip>span:last-child {
  display: flex;
  flex-direction: column
}

.brand strong {
  font-size: 19px;
  letter-spacing: .06em
}

.brand small {
  color: #74867f;
  font-size: 12px
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px
}

.online {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  color: #177356;
  background: #ecfaf4;
  font-size: 12px;
  font-weight: 800
}

.online i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1aaa75;
  box-shadow: 0 0 0 4px rgba(26,170,117,.12)
}

.user-chip {
  padding: 4px 8px 4px 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff
}

.avatar {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--green);
  background: var(--pale);
  font-size: 14px;
  font-weight: 900
}

.user-chip strong {
  font-size: 12px
}

.user-chip small {
  max-width: 150px;
  overflow: hidden;
  color: #80918b;
  font-size: 10px;
  text-overflow: ellipsis
}

.icon-btn {
  min-width: 39px;
  height: 39px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff
}

.icon-btn b {
  margin-left: 3px;
  padding: 1px 5px;
  border-radius: 999px;
  color: #3b2709;
  background: #f1a33c;
  font-size: 11px
}

/* ========================================================================== 
   06) โครงหน้าหลัก เมนูด้านข้าง และพื้นที่เนื้อหา
   .view จะแสดงผลเมื่อมีคลาส .active เท่านั้น
   ========================================================================== */

.shell {
  max-width: 1500px;
  min-height: calc(100vh - 74px);
  margin: auto;
  padding: 23px;
  display: grid;
  grid-template-columns: 230px minmax(0,1fr);
  gap: 23px
}

.sidebar {
  position: sticky;
  top: 97px;
  height: calc(100vh - 120px);
  padding: 22px 15px 15px;
  display: flex;
  flex-direction: column;
  border-radius: 21px;
  color: #eaf8f2;
  background: linear-gradient(170deg,#143a31,#0d2c25);
  box-shadow: 0 18px 42px rgba(15,49,40,.15)
}

.sidebar>p {
  margin: 0 10px 10px;
  color: #8db0a6;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em
}

.sidebar nav {
  display: grid;
  gap: 6px
}

.nav-button {
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 11px;
  color: #a9c1ba;
  background: transparent;
  font-size: 13px;
  font-weight: 800;
  text-align: left
}

.nav-button span {
  font-size: 19px
}

.nav-button:hover {
  color: #fff;
  background: rgba(255,255,255,.06)
}

.nav-button.active {
  color: #10382e;
  background: linear-gradient(135deg,#79e1bc,#4fca9d)
}

.support {
  margin-top: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 15px;
  background: rgba(255,255,255,.05)
}

.support>span {
  width: 33px;
  height: 33px;
  margin-bottom: 10px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #68d6ad;
  background: rgba(104,214,173,.12)
}

.support strong {
  font-size: 14px
}

.support small {
  margin-top: 4px;
  color: #9ab4ac;
  font-size: 11px
}

.support p {
  margin: 10px 0 0;
  color: #68d6ad;
  font-size: 11px
}

.content {
  min-width: 0
}

.view {
  display: none
}

.view.active {
  display: block
}

/* ========================================================================== 
   07) ส่วนหัวของแต่ละหน้า ช่องค้นหา และแถบจุดเด่นบริการ
   ========================================================================== */

.page-head {
  min-height: 102px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px
}

.page-head h1 {
  margin: 5px 0 3px;
  font-size: clamp(26px,3vw,38px);
  line-height: 1.2;
  letter-spacing: -.03em
}

.page-head>div>span {
  color: var(--muted);
  font-size: 14px
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .07em
}

.search {
  width: min(340px,100%);
  position: relative;
  font-size: 23px;
  color: #83958e
}

.search input {
  height: 42px;
  padding-left: 37px;
  margin-left: -18px
}

.head-buttons {
  display: flex;
  gap: 8px
}

.trust-row {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--line);
  overflow: hidden
}

.trust-row>div {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff
}

.trust-row b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--green);
  background: var(--pale)
}

.trust-row span {
  display: flex;
  flex-direction: column
}

.trust-row strong {
  font-size: 13px
}

.trust-row small {
  color: #7c8f88;
  font-size: 11px
}

/* ========================================================================== 
   08) แค็ตตาล็อกและการ์ดสินค้า
   จัดวางรูปสินค้า รายละเอียด ราคา และปุ่มเพิ่มลงตะกร้า
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 17px
}

.product-card {
  display: grid;
  grid-template-columns: 36% 64%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(28,66,56,.06);
  overflow: hidden;
  transition: .2s
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow)
}

.product-art {
  min-height: 220px;
  position: relative;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#e5f6ef,#c9eadc);
  overflow: hidden
}

.product-art:before,.product-art:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(8,127,91,.12);
  border-radius: 50%
}

.product-art:before {
  width: 150px;
  height: 150px
}

.product-art:after {
  width: 210px;
  height: 210px
}

.product-art>span {
  position: relative;
  z-index: 1;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 23px;
  color: var(--green);
  background: rgba(255,255,255,.65);
  font-size: 37px;
  box-shadow: 0 14px 30px rgba(16,91,68,.13)
}

.product-art small {
  position: absolute;
  z-index: 1;
  bottom: 11px;
  left: 11px;
  padding: 5px 7px;
  border-radius: 7px;
  color: #315f51;
  background: rgba(255,255,255,.75);
  font-size: 10px;
  font-weight: 900
}

.product-info {
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0
}

.product-meta {
  display: flex;
  justify-content: space-between;
  color: #8b9c96;
  font-size: 10px
}

.product-meta b {
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--green);
  background: var(--pale)
}

.product-info h2 {
  margin: 13px 0 6px;
  font-size: 18px
}

.product-info>p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65
}

.product-foot {
  margin-top: auto;
  padding-top: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px
}

.product-foot>span {
  display: flex;
  flex-direction: column
}

.product-foot small {
  color: #81928c;
  font-size: 10px
}

.product-foot strong {
  color: var(--green2);
  font-size: 20px
}

.product-foot button {
  min-height: 34px;
  font-size: 11px
}

/* ========================================================================== 
   09) สถานะไม่มีข้อมูล และรายการคำสั่งซื้อของลูกค้า
   รวมป้ายสถานะ ยอดรวม รายการสินค้า และลำดับขั้นตอนคำสั่งซื้อ
   ========================================================================== */

.empty {
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 1px dashed #c9dad4;
  border-radius: 19px;
  background: rgba(255,255,255,.68);
  color: #748780
}

.empty>span {
  font-size: 35px;
  color: #3aa67f
}

.empty h2 {
  margin: 8px 0 2px;
  font-size: 19px
}

.empty p {
  margin: 0;
  font-size: 12px
}

.order-list {
  display: grid;
  gap: 15px
}

.order-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #fff
}

.order-head {
  display: flex;
  justify-content: space-between;
  gap: 16px
}

.order-head h2 {
  margin: 3px 0 5px;
  font-size: 18px
}

.order-head small {
  color: #83948e;
  font-size: 11px
}

.order-head p {
  margin: 0;
  color: #7c8e87;
  font-size: 11px
}

.order-amount {
  text-align: right
}

.order-amount strong {
  display: block;
  margin-top: 7px;
  color: var(--green2);
  font-size: 21px
}

.badge {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #6a5704;
  background: #fff2b6;
  font-size: 10px;
  font-weight: 900
}

.badge.paid,.badge.completed {
  color: #12694d;
  background: #ddf5e9
}

.badge.preparing {
  color: #8a500d;
  background: #ffead1
}

.badge.shipping {
  color: #175f87;
  background: #dff1fc
}

.badge.rejected,.badge.cancelled {
  color: #8e3035;
  background: #fde0e2
}

.order-items {
  margin: 15px 0;
  padding: 11px 13px;
  border-radius: 11px;
  background: #f5f8f7
}

.order-items div {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: #637770;
  font-size: 11px
}

.order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px
}

.order-actions>span {
  color: #71847d;
  font-size: 11px
}

.order-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.order-action-buttons .btn {
  white-space: nowrap;
}

.steps {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(4,1fr)
}

.step {
  text-align: center;
  color: #9aaba5;
  font-size: 10px
}

.step b {
  width: 25px;
  height: 25px;
  margin: 0 auto 4px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6ecea
}

.step.active {
  color: var(--green);
  font-weight: 800
}

.step.active b {
  color: #fff;
  background: #14916b
}

/* ========================================================================== 
   10) หลังบ้าน: สรุปข้อมูล แท็บ ตาราง และรายการตรวจสอบการชำระเงิน
   ========================================================================== */

.metrics {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 13px
}

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff
}

.metric small {
  color: #71847d;
  font-size: 11px
}

.metric strong {
  display: block;
  margin-top: 4px;
  font-size: 23px
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 12px;
  background: #e5edea;
  overflow-x: auto
}

.admin-tabs button {
  min-height: 35px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  color: #687c75;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap
}

.admin-tabs button.active {
  color: var(--green2);
  background: #fff;
  box-shadow: 0 3px 9px rgba(24,66,55,.08)
}

.admin-tabs b {
  padding: 2px 5px;
  border-radius: 999px;
  color: #fff;
  background: #d28b27
}

.admin-panel {
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  overflow: hidden
}

.admin-panel.active {
  display: block
}

.data-table {
  width: 100%;
  border-collapse: collapse
}

.data-table th,.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #e7efec;
  text-align: left;
  font-size: 12px;
  vertical-align: middle
}

.data-table th {
  color: #71837d;
  background: #f6f9f8;
  font-size: 11px
}

.data-table small {
  display: block;
  color: #8a9b95;
  font-size: 10px
}

.data-table .right {
  text-align: right
}

.payment-card {
  padding: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid #e6eeeb
}

.payment-card h3 {
  margin: 0 0 4px;
  font-size: 15px
}

.payment-card p {
  margin: 0;
  color: #74867f;
  font-size: 11px
}

.payment-card strong {
  color: var(--green2);
  font-size: 19px
}

/* ========================================================================== 
   11) Popup / Dialog และฟอร์มภายใน
   ใช้กับหน้าต่างสมาชิก สินค้า ชำระเงิน อัปโหลดสลิป และฟอร์มทั่วไป
   ========================================================================== */

dialog {
  padding: 0;
  border: 0;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 26px 80px rgba(12,45,36,.25)
}

dialog::backdrop {
  background: rgba(8,27,22,.55);
  backdrop-filter: blur(3px)
}

.modal {
  width: min(560px,calc(100% - 24px));
  border-radius: 19px
}

.modal.compact {
  width: min(470px,calc(100% - 24px))
}

.modal form>header,.drawer>header {
  padding: 21px 22px 14px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #e4ece9
}

.modal h2,.drawer h2 {
  margin: 0;
  font-size: 20px
}

.modal header p,.drawer header p {
  margin: 3px 0 0;
  color: #7b8e87;
  font-size: 11px
}

.close {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #edf2f0;
  color: #536a62;
  font-size: 22px
}

.modal form>label,.modal .form-grid,.modal .summary-box,.modal .pay-box,.modal .slip-link {
  margin-left: 22px;
  margin-right: 22px
}

.modal form>label:first-of-type,.modal .summary-box {
  margin-top: 17px
}

.modal footer,.drawer footer {
  padding: 16px 22px 21px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e4ece9
}

.form-grid {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 13px
}

.form-grid label {
  margin: 0
}

.form-grid .full {
  grid-column: 1/-1
}

.summary-box {
  padding: 11px 13px;
  border-radius: 11px;
  background: #f4f8f6
}

.summary-box div {
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  color: #61756e;
  font-size: 11px
}

.summary-box .sum {
  margin-top: 6px;
  padding-top: 9px;
  border-top: 1px solid #d9e5e1;
  color: #204b3e;
  font-weight: 900
}

.pay-box {
  margin-top: 13px;
  margin-bottom: 15px;
  padding: 13px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  border: 1px solid #ecd397;
  border-radius: 12px;
  background: #fff9e9
}

.pay-box span,.pay-box small {
  color: #7d681f;
  font-size: 10px
}

.pay-box strong {
  font-size: 13px
}

.pay-box .copy {
  grid-row: 1/3;
  grid-column: 2;
  padding: 4px 8px;
  border: 1px solid #e2ca8e;
  border-radius: 7px;
  background: #fff;
  color: #6c5610;
  font-size: 10px
}

.pay-box .copy b {
  display: block;
  font-size: 13px
}

.pay-box.center {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center
}

.pay-box.center b {
  font-size: 20px
}

.pay-box.center em {
  color: var(--green2);
  font-size: 26px;
  font-style: normal;
  font-weight: 900
}

.upload {
  padding: 14px;
  border: 1px dashed #b9cfc7;
  border-radius: 11px;
  background: #f7faf9
}

.slip-link {
  margin-top: 18px!important;
  margin-bottom: 15px!important;
  padding: 13px;
  display: block;
  border-radius: 10px;
  color: #fff;
  background: #1c6652;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900
}

/* ========================================================================== 
   12) ตะกร้าสินค้าแบบ Drawer
   จัดรายการสินค้า จำนวนสินค้า ยอดรวม และปุ่มดำเนินการต่อ
   ========================================================================== */

.drawer {
  width: min(440px,100%);
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  border-radius: 0
}

.drawer[open] {
  display: flex;
  flex-direction: column
}

.cart-items {
  padding: 7px 22px;
  flex: 1;
  overflow: auto
}

.cart-item {
  padding: 13px 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  border-bottom: 1px solid #e7eeeb
}

.cart-item>span {
  display: flex;
  flex-direction: column
}

.cart-item strong {
  font-size: 12px
}

.cart-item small {
  color: #7c8f88;
  font-size: 10px
}

.qty {
  display: flex;
  align-items: center;
  gap: 7px
}

.qty button {
  width: 25px;
  height: 25px;
  border: 1px solid #d5e2de;
  border-radius: 7px;
  background: #fff
}

.drawer footer {
  display: block
}

.drawer footer .total {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.drawer footer .total strong {
  color: var(--green2);
  font-size: 24px
}

.drawer footer>small {
  display: block;
  margin-top: 7px;
  color: #80928b;
  text-align: center;
  font-size: 10px
}

/* ========================================================================== 
   13) Responsive หลัก
   ปรับเลย์เอาต์สำหรับแท็บเล็ต โทรศัพท์ และหน้าจอขนาดเล็กมาก
   ========================================================================== */

@media(max-width:1050px) {
  .product-grid {
    grid-template-columns: 1fr
  }

  .online,.user-chip {
    display: none
  }

  .metrics {
    grid-template-columns: repeat(2,1fr)
  }

}

@media(max-width:760px) {
  .login-screen {
    grid-template-columns: 1fr;
    padding: 22px;
    background: radial-gradient(circle at 10% 0,rgba(95,218,171,.22),transparent 20rem),#12382f
  }

  .login-brand {
    display: none
  }

  .login-card {
    padding: 27px
  }

  .topbar {
    height: 64px;
    padding: 0 13px
  }

  .brand small {
    display: none
  }

  .brand .logo {
    width: 35px;
    height: 35px
  }

  .header-actions {
    gap: 5px
  }

  .shell {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px
  }

  .sidebar {
    position: sticky;
    top: 64px;
    z-index: 10;
    height: auto;
    padding: 6px;
    border-radius: 13px
  }

  .sidebar>p,.support {
    display: none
  }

  .sidebar nav {
    grid-template-columns: repeat(3,1fr)
  }

  .nav-button {
    padding: 0 5px;
    justify-content: center;
    font-size: 11px
  }

  .nav-button span {
    display: none
  }

  .page-head {
    min-height: 0;
    margin: 16px 2px;
    align-items: stretch;
    flex-direction: column
  }

  .page-head h1 {
    font-size: 27px
  }

  .page-head>div>span {
    font-size: 12px
  }

  .search {
    width: 100%
  }

  .trust-row {
    grid-template-columns: 1fr
  }

  .product-card {
    grid-template-columns: 34% 66%
  }

  .product-info {
    padding: 14px
  }

  .product-foot {
    align-items: stretch;
    flex-direction: column
  }

  .metrics {
    grid-template-columns: 1fr 1fr
  }

  .head-buttons {
    width: 100%
  }

  .head-buttons .btn {
    flex: 1
  }

  .data-table {
    min-width: 670px
  }

  .admin-panel {
    overflow: auto
  }

  .order-head {
    flex-direction: column
  }

  .order-amount {
    text-align: left
  }

  .form-grid {
    grid-template-columns: 1fr
  }

  .form-grid .full {
    grid-column: auto
  }

}

@media(max-width:450px) {
  .product-card {
    grid-template-columns: 1fr
  }

  .product-art {
    min-height: 155px
  }

  .metrics {
    grid-template-columns: 1fr
  }

  .brand>span:last-child {
    display: none
  }

  .steps {
    font-size: 9px
  }

}

/* ========================================================================== 
   14) รูปโลโก้และรูปสินค้า
   กำหนดการย่อ/ขยายรูปให้อยู่ในกรอบโดยไม่ผิดสัดส่วน
   ========================================================================== */

.brand .logo,.login-brand .logo {
  overflow: hidden;
  background: #fff
}

.brand .logo img,.login-brand .logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff
}

.product-art {
  position: relative;
  overflow: hidden;
}

.product-art > span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 70%;
  height: 70%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.product-art > span img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  object-position: center;
  margin: 0;
}

.product-art > small {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

/* ชดเชยตำแหน่งภาพแนวตั้งของ GS900 ให้ดูอยู่กึ่งกลางด้วยสายตา */
.product-grid .product-card:nth-child(2) .product-art > span img {
  transform: translate(8px, 2px);
}

/* ========================================================================== 
   15) หลังบ้าน: ค้นหาคำสั่งซื้อและทะเบียนอุปกรณ์
   รวมช่องค้นหา สรุปจำนวน และตารางรายละเอียดอุปกรณ์
   ========================================================================== */

.admin-order-search {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #f6f9f8;
}

.admin-order-search input {
  min-width: 0;
  flex: 1;
}

.admin-order-search .btn {
  flex: 0 0 auto;
}

.admin-order-empty {
  min-height: 260px;
  border: 0;
  border-radius: 0;
}

.admin-device-toolbar {
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  background: #f6f9f8;
}

.admin-device-toolbar input {
  min-width: 0;
  flex: 1;
}

.admin-device-toolbar .btn {
  flex: 0 0 auto;
}

.admin-device-summary {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.admin-device-summary > div {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef7f3;
}

.admin-device-summary small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.admin-device-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--green2);
  font-size: 16px;
}

.admin-devices-table {
  min-width: 1100px;
}

.admin-devices-table code {
  color: #164b3d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.admin-device-owner {
  min-width: 170px;
}

@media (max-width: 600px) {
  .admin-order-search, .admin-device-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-device-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* ========================================================================== 
   16) ระดับสมาชิก
   รองรับ Silver, Gold, Platinum และ Elite ในส่วนข้อมูลผู้ใช้งาน
   ========================================================================== */

.user-chip > span:last-child {
  align-items: flex-start;
}

.user-chip .user-rank {
  max-width: none;
  margin-top: 3px;
  padding: 2px 6px;
  display: inline-flex;
  border-radius: 999px;
  color: #52615d;
  background: #e9efed;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.4;
  text-transform: uppercase;
}

.user-chip .user-rank.silver {
  color: #47545a;
  background: linear-gradient(135deg, #f2f5f6, #cbd3d7);
}

.user-chip .user-rank.gold {
  color: #684b05;
  background: linear-gradient(135deg, #fff4bf, #e9bc45);
}

.user-chip .user-rank.platinum {
  color: #395c67;
  background: linear-gradient(135deg, #edf9fb, #add5dc);
}

.user-chip .user-rank.elite {
  color: #fff;
  background: linear-gradient(135deg, #18352e, #b38b3b);
}

/* ========================================================================== 
   17) หลังบ้าน: คำสั่งซื้อ การจัดส่ง และ IMEI / S/N
   ใช้บันทึกขนส่ง เลขติดตาม รายการสินค้า และหมายเลขอุปกรณ์แต่ละเครื่อง
   ========================================================================== */

.admin-orders-table {
  min-width: 1050px;
}

.shipping-update {
  width: 230px;
  min-width: 230px;
}

.shipping-update select, .shipping-update input {
  margin-bottom: 7px;
  padding: 8px 10px;
  font-size: 12px;
}

.shipping-update .btn {
  width: 100%;
  min-height: 33px;
  font-size: 11px;
}

.shipping-update .btn + .btn {
  margin-top: 7px;
}

/* ช่องที่ยังไม่ถึงขั้นตอนทำงานจะแสดงเป็นสถานะล็อก */
.shipping-update select:disabled,
.shipping-update input:disabled,
.shipping-update .btn:disabled,
.data-table select[data-order-status]:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: #eef3f1;
}

.shipping-update > small {
  margin-top: 8px;
  padding: 7px 9px;
  display: block;
  border-radius: 8px;
  color: #60756e;
  background: #f2f7f5;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

/* แยกปุ่มยกเลิกออกจากช่องเลือกอัปเดตสถานะ */
.admin-status-actions {
  min-width: 250px;
  display: grid;
  gap: 12px;
}

.admin-status-actions > select,
.admin-status-actions > .btn {
  width: 100%;
}

.admin-cancel-order {
  min-height: 38px;
}

.admin-status-actions > .shipping-label-button {
  width: 100%;
  min-height: 38px;
  border-color: #e79512;
  background: #f5a623;
  color: #fff;
}

.admin-status-actions > .shipping-label-button:hover {
  border-color: #d98700;
  background: #e99512;
}

/* เนื้อหา Popup ยืนยันการยกเลิกคำสั่งซื้อ */
.cancel-confirm-box {
  margin: 18px 22px;
  padding: 18px;
  border: 1px solid #efc5c8;
  border-radius: 13px;
  background: #fff7f7;
  text-align: center;
}

.cancel-confirm-box > span,
.cancel-confirm-box > small {
  display: block;
  color: #7b696a;
  font-size: 11px;
}

.cancel-confirm-box > strong {
  display: block;
  margin: 7px 0;
  color: var(--danger);
  font-size: 20px;
}

.cancel-confirm-box > p {
  margin: 0 0 12px;
  font-size: 13px;
}

.cancel-confirm-box > small {
  line-height: 1.6;
}

.admin-order-main {
  width: 285px;
  min-width: 285px;
}

.admin-order-items {
  margin-top: 9px;
  padding: 8px 9px;
  display: grid;
  gap: 5px;
  border-radius: 8px;
  background: #f2f7f5;
}

.admin-order-items div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  color: #506a62;
  font-size: 10px;
}

.admin-order-items b {
  flex: 0 0 auto;
  color: var(--green2);
}

.admin-order-note {
  margin: 8px 0 0;
  max-width: 360px;
  color: #506a62;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.admin-order-note span {
  color: var(--ink);
  font-weight: 800;
}

.payment-card .admin-order-note {
  margin-top: 4px;
}

.order-shipping-info {
  margin: -5px 0 14px;
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #cfe5dd;
  border-radius: 10px;
  color: #315f51;
  background: #edf9f4;
  font-size: 11px;
}

.order-shipping-info b {
  flex: 0 0 auto;
  color: var(--green2);
}

.device-modal {
  width: min(780px, calc(100% - 24px));
}

.device-fields {
  max-height: min(62vh, 620px);
  padding: 18px 22px;
  display: grid;
  gap: 16px;
  overflow: auto;
  background: #f5f8f7;
}

.device-product {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  overflow: hidden;
}

.device-product > header {
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--pale);
}

.device-product h3 {
  margin: 0;
  font-size: 14px;
}

.device-product header span {
  color: var(--green2);
  font-size: 11px;
  font-weight: 900;
}

.device-row {
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border-top: 1px solid #edf2f0;
}

.device-row.personal-device-row {
  grid-template-columns: 34px minmax(0, 1fr);
}

.device-row b {
  color: var(--green2);
  font-size: 11px;
}

.device-row input {
  min-width: 0;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
}

.order-device-info {
  margin: -5px 0 14px;
  border: 1px solid #d8e7e2;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
}

.order-device-info summary {
  padding: 10px 13px;
  color: var(--green2);
  cursor: pointer;
  font-weight: 900;
}

.order-device-info > div {
  max-height: 230px;
  padding: 0 13px 10px;
  overflow: auto;
}

.order-device-info p {
  margin: 0;
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #edf2f0;
}

.order-device-info span {
  color: #61756e;
  text-align: right;
}

/* ========================================================================== 
   18) รายการสินค้าที่ลูกค้าเป็นเจ้าของ
   แสดงยอดสรุป แยกตามสินค้า และตาราง IMEI / S/N ของลูกค้า
   ========================================================================== */

.owned-product-metrics {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.owned-product-metrics > div {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(14, 55, 44, .05);
}

.owned-product-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.owned-product-metrics strong {
  color: var(--green2);
  font-size: 24px;
}

.owned-product-summary {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.owned-product-summary article {
  padding: 16px 18px;
  border: 1px solid #cfe5dd;
  border-radius: 15px;
  background: linear-gradient(145deg, #fff, #effaf6);
}

.owned-product-summary header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.owned-product-summary header span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.owned-product-summary header b {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--green2);
  background: #dff5ec;
  font-size: 11px;
}

.owned-product-summary h2 {
  margin: 12px 0 5px;
  font-size: 17px;
}

.owned-product-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.owned-product-list {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.owned-products-table {
  min-width: 850px;
}

.owned-products-table code {
  color: #164b3d;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

.owned-product-pending {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #8b6a18;
  background: #fff3c9;
  font-size: 10px;
  font-weight: 900;
}

/* ========================================================================== 
   19) รูปแบบ Popup หลังเพิ่มสินค้าลงตะกร้า
   ส่วนนี้ตั้งใจเขียนทับค่าพื้นฐานของ .toast ในส่วนที่ 02
   ========================================================================== */

.toast {
  top: 18px;
  right: 18px;
  left: auto;
  max-width: min(440px, calc(100vw - 28px));
  min-height: 54px;
  padding: 12px 18px 12px 52px;
  display: flex;
  align-items: center;
  border: 1px solid #a8e7c7;
  border-radius: 14px;
  color: #087a45;
  background: #ecfff5;
  box-shadow: 0 14px 36px rgba(15, 103, 68, .18);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  transform: translate(18px, -8px);
}

.toast::before {
  content: "✓";
  position: absolute;
  left: 17px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
}

.toast.show {
  transform: translate(0, 0);
}

.toast.error {
  border-color: #e6a9ad;
  color: #fff;
  background: #9d3439;
}

.toast.error::before {
  content: "!";
}

/* ========================================================================== 
   20) Responsive เพิ่มเติมสำหรับฟังก์ชันที่เพิ่มภายหลัง
   ปรับ Popup เมนู รายการสินค้าที่เป็นเจ้าของ การจัดส่ง และ IMEI / S/N
   ========================================================================== */

@media (max-width: 600px) {
  .toast {
    top: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .sidebar nav {
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  }

  .order-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .order-action-buttons {
    justify-content: stretch;
  }

  .order-action-buttons .btn {
    flex: 1;
  }

  .owned-product-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .owned-product-metrics > div {
    padding: 14px;
  }

  .owned-product-metrics strong {
    font-size: 19px;
  }

  .owned-product-summary {
    grid-template-columns: 1fr;
  }

  .order-shipping-info {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .device-row {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .device-row b {
    grid-row: 1 / 3;
  }

  .order-device-info p {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .order-device-info span {
    text-align: left;
  }

}
.user-modal {
  width: min(720px, calc(100vw - 32px));
}

.coordinate-help {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef8f4;
  color: #456b60;
  font-size: .9rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.admin-users-table {
  min-width: 1120px;
}

.admin-users-table td:first-child {
  min-width: 240px;
}

.admin-users-table td:first-child small {
  display: block;
  margin-top: 5px;
  max-width: 330px;
  white-space: normal;
}

.location-link {
  color: var(--green, #087f5b);
  white-space: nowrap;
  text-decoration: none;
}

.location-link:hover {
  text-decoration: underline;
}

.field-help {
  display: block;
  margin-top: 6px;
  color: #6f837c;
  font-size: .82rem;
}

.bank-pay-box {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 14px;
}

.bank-pay-box > strong {
  font-size: 1rem;
}

.bank-pay-box .bank-detail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 9px;
  align-items: baseline;
}

.bank-pay-box .bank-detail span {
  font-size: .78rem;
}

.bank-pay-box .bank-detail b {
  font-size: .86rem;
}

.bank-pay-box .copy {
  grid-row: 1 / 4;
  align-self: center;
  min-width: 154px;
  padding: 9px 12px;
}

.bank-pay-box .copy b {
  font-size: 1rem;
}

.bank-slip-box small {
  font-size: .82rem;
}

.pay-box.center.bank-slip-box small b,
.pay-box.center.bank-slip-box small strong {
  font-size: inherit;
}

@media (max-width: 620px) {
  .bank-pay-box {
    grid-template-columns: 1fr;
  }

  .bank-pay-box .copy {
    grid-row: auto;
    grid-column: auto;
    width: 100%;
  }
}

/* =========================================================
   ข้อมูล GPS รายเครื่อง
   ========================================================= */
.gps-toolbar {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.gps-toolbar input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  font: inherit;
}

.gps-summary {
  margin-bottom: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.gps-summary > div {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.gps-summary small,
.gps-summary strong {
  display: block;
}

.gps-summary small {
  margin-bottom: 5px;
  color: #6f837c;
}

.gps-summary strong {
  font-size: 1.25rem;
}

.gps-list {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  overflow: hidden;
}

.gps-table-scroll {
  width: 100%;
  overflow-x: auto;
}

.gps-data-table {
  min-width: 2380px;
}

.gps-data-table th,
.gps-data-table td {
  vertical-align: top;
  white-space: nowrap;
}

.gps-data-table td:nth-child(5),
.gps-data-table td:nth-child(16) {
  white-space: normal;
}

.gps-data-table td:nth-child(16) {
  min-width: 280px;
}

.gps-contact span,
.gps-contact b {
  display: block;
}

.gps-contact b {
  margin-top: 5px;
  color: var(--green2);
}

.gps-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf3f1;
  font-weight: 800;
}

.gps-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #82958e;
}

.gps-status.active {
  color: #087852;
  background: #dcf6ea;
}

.gps-status.active i { background: #12a875; }
.gps-status.offline { color: #a4373d; background: #fde5e7; }
.gps-status.offline i { background: #cf424a; }
.gps-status.maintenance { color: #8a5706; background: #fff0c9; }
.gps-status.maintenance i { background: #e39a1b; }

.gps-pending {
  color: #81938d;
}

.gps-edit-button {
  min-width: 82px;
}

.gps-status-actions {
  display: grid;
  justify-items: start;
  gap: 9px;
}

.gps-register-button {
  min-width: 104px;
  padding: 9px 14px;
}

.gps-registration-note {
  margin: 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #eef8f4;
  color: #547168;
  font-size: 0.92rem;
}

.registration-section {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.registration-section h3 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 1.08rem;
}

.registration-section .form-grid {
  padding: 0;
}

.registration-section .form-grid + .form-grid {
  margin-top: 14px;
}

.gps-modal {
  width: min(820px, calc(100vw - 32px));
}

.gps-form-grid select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font: inherit;
}

@media (max-width: 900px) {
  .gps-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .gps-toolbar,
  .gps-summary {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   รายงานค่าบริการรายปี
   ========================================================= */
.annual-report-toolbar {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.86);
}

.annual-report-toolbar label {
  display: grid;
  gap: 7px;
  min-width: 190px;
  font-weight: 700;
}

.annual-report-toolbar select {
  min-height: 48px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.annual-report-table { min-width: 1580px; }
.annual-report-table th,
.annual-report-table td {
  vertical-align: top;
  white-space: nowrap;
}

.annual-report-table td:nth-child(11) {
  min-width: 260px;
  white-space: normal;
}

.annual-report-table td small {
  display: block;
  max-width: 220px;
  margin-top: 5px;
  color: var(--muted);
  white-space: normal;
}

.annual-model {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e3f7ef;
  color: var(--green2);
  font-weight: 800;
}

.annual-amount {
  color: var(--green2);
  font-size: 1.08rem;
}

.airtime-management-table { min-width: 1420px; }
.airtime-management-table th,
.airtime-management-table td { vertical-align: middle; white-space: nowrap; }
.airtime-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-weight: 800;
  white-space: nowrap;
}
.airtime-status.pending { background: #fff2d9; color: #a86400; }
.airtime-status.completed { background: #ddf7ec; color: var(--green2); }
.slip-link.inline { display: inline-flex; width: auto; padding: 8px 12px; }
.airtime-payment-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
}
.airtime-payment-details div { display: grid; gap: 5px; padding: 13px 15px; background: #fff; }
.airtime-payment-details small { color: var(--muted); }
.airtime-payment-details strong { color: var(--ink); overflow-wrap: anywhere; }

.gps-transport-confirm-button {
  white-space: nowrap;
  border: 1px solid #f5a623;
  background: #f5a623 !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(245, 166, 35, .22);
}
.gps-transport-confirm-button:hover {
  border-color: #d98900;
  background: #d98900 !important;
  color: #fff !important;
}
.registration-book-preview { display: grid; gap: 9px; }
.registration-book-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.registration-book-controls { display: flex; align-items: center; gap: 7px; }
.registration-book-controls .btn { min-width: 42px; min-height: 38px; padding: 6px 12px; }
.registration-book-controls .reset { min-width: auto; }
.registration-book-controls output { min-width: 54px; text-align: center; font-weight: 800; color: var(--green2); }
.registration-book-viewport {
  width: 100%;
  height: 430px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f5f8f7;
  cursor: default;
  user-select: none;
  touch-action: none;
  overscroll-behavior: contain;
}
.registration-book-viewport.is-zoomed { cursor: grab; }
.registration-book-viewport.is-dragging { cursor: grabbing; }
.registration-book-viewport img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: top left;
  pointer-events: none;
}
.registration-book-preview > small { color: var(--muted); }

@media (max-width: 620px) {
  .annual-report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .annual-report-toolbar label { min-width: 0; }
  .registration-book-heading { align-items: flex-start; flex-direction: column; }
  .registration-book-controls { flex-wrap: wrap; }
  .registration-book-viewport { height: 330px; }
  .airtime-payment-details { grid-template-columns: 1fr; }
}
