/**
 * CVS NIC — Navigation & layout (สไตล์ใกล้ CVS Grocery · ไม่กระทบ logic เดิม)
 */

/* ฟอนต์ทันสมัยแบบ CVS GRO */
body,
#main-app,
#login-page {
  font-family: 'Kanit', 'Prompt', 'Segoe UI', sans-serif !important;
}
#main-app .form-control,
#main-app .form-select,
#main-app .btn,
#main-app label,
#main-app .cvs-nav-btn {
  font-family: inherit !important;
}

/* ฟอร์มเช็คอิน — จัดแถวชัดเจน */
.cvs-checkin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.cvs-field-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 575.98px) {
  .cvs-field-row {
    grid-template-columns: 1fr 1.6fr;
    gap: 10px;
  }
}
.cvs-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.cvs-field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}
.cvs-field-label-row .cvs-field-label { margin-bottom: 0; }
.cvs-field-label--required { color: #dc2626; }
.cvs-field-link {
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
}
.cvs-field-link:hover { color: #1d4ed8; text-decoration: underline; }
.cvs-field-control {
  border-radius: 12px !important;
  border: 1.5px solid #e2e8f0 !important;
  padding: 10px 12px !important;
  font-size: 0.9rem !important;
  font-weight: 500;
  background: #fff !important;
  min-height: 42px;
  box-shadow: 0 1px 2px rgba(15, 39, 68, 0.04);
}
.cvs-field-control:focus {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18) !important;
}
.cvs-field-hint {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 6px;
  line-height: 1.35;
}
.cvs-geo-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px 14px;
}
.cvs-geo-coords {
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  word-break: break-word;
}
.cvs-geo-coords.text-success,
#visit-geo-display.text-success { color: #15803d !important; }
.cvs-geo-coords.text-danger,
#visit-geo-display.text-danger { color: #b91c1c !important; }
.cvs-geo-place {
  font-size: 0.78rem;
  color: #475569;
  margin-top: 4px;
  line-height: 1.35;
  /* จองความสูงคงที่ — กันโชว์/ซ่อน「กำลังค้นหาชื่อสถานที่」แล้วหน้าจอสั่น */
  min-height: 1.35em;
}
.cvs-geo-place.cvs-geo-place--empty {
  visibility: hidden;
}
.cvs-geo-place.is-loading {
  opacity: 0.85;
}
.cvs-geo-match {
  font-size: 0.8rem;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  color: #64748b;
}
.cvs-geo-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid #cbd5e1;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cvs-geo-refresh-btn:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

/* หน้าเช็คอิน OA — 2 เมนูหลักพับได้ */
.cvs-oa-sections {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}
.cvs-oa-accordion {
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(15, 39, 68, 0.08);
  box-shadow: 0 6px 22px rgba(15, 39, 68, 0.07);
  overflow: hidden;
}
.cvs-oa-accordion--checkin {
  border-color: rgba(194, 65, 12, 0.18);
  background: linear-gradient(180deg, #fffaf5 0%, #ffffff 42%);
}
.cvs-oa-accordion--workday {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 42%);
}
.cvs-oa-accordion-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.cvs-oa-accordion-head:hover {
  background: rgba(15, 39, 68, 0.025);
}
.cvs-oa-accordion-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: #fff;
}
.cvs-oa-accordion-ic--orange {
  background: linear-gradient(145deg, #fb923c, #c2410c);
  box-shadow: 0 4px 12px rgba(194, 65, 12, 0.28);
}
.cvs-oa-accordion-ic--blue {
  background: linear-gradient(145deg, #60a5fa, #1d4ed8);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}
.cvs-oa-accordion-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cvs-oa-accordion-title {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}
.cvs-oa-accordion-sub {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.3;
}
.cvs-oa-accordion-badge {
  flex-shrink: 0;
  font-weight: 600;
}
.cvs-oa-accordion-chevron {
  flex-shrink: 0;
  color: #94a3b8;
  font-size: 1rem;
  transition: transform 0.2s ease;
}
.cvs-oa-accordion-body {
  padding: 4px 14px 16px;
  border-top: 1px solid rgba(15, 39, 68, 0.06);
}
.cvs-oa-accordion--checkin .cvs-oa-accordion-body {
  background: linear-gradient(180deg, rgba(255, 247, 237, 0.45) 0%, #fff 28%);
}
.cvs-oa-accordion--workday .cvs-oa-accordion-body {
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.55) 0%, #fff 28%);
}

/* ขั้นเลือกร้านก่อนถ่ายรูป */
.cvs-store-pick-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-size: 0.82rem;
  line-height: 1.35;
}
.cvs-store-pick-banner > i {
  font-size: 1.25rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.cvs-store-pick-list {
  border-color: #93c5fd !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}
.cvs-store-pick--pulse .cvs-store-pick-banner {
  animation: cvsStorePickPulse 1.4s ease-in-out 1;
}
.cvs-store-pick--pulse .cvs-store-pick-list {
  animation: cvsStorePickPulse 1.4s ease-in-out 1;
}
@keyframes cvsStorePickPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
  40% { box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.28); }
}
.cvs-photo-gate-hint {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.78rem;
  font-weight: 600;
}
:root {
  --cvs-nav-primary: #1e3a8a;
  --cvs-nav-primary-dark: #0f2744;
  --cvs-nav-accent: #ea580c;
  --cvs-nav-radius: 16px;
  --cvs-nav-shadow: 0 8px 28px rgba(15, 39, 68, 0.1);
}

/* backdrop ต้องอยู่ต่ำกว่า .cvs-nav — ถ้าสูงกว่า เมนู absolute บน desktop จะถูกทับคลิก
   (มือถือใช้ menu position:fixed z-index สูงกว่าจึงดูเหมือนกดได้เมื่อหดจอ) */
.cvs-nav-dropdown-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(15, 23, 42, 0.28);
  pointer-events: none;
}
.cvs-nav-dropdown-backdrop.show {
  display: block;
  pointer-events: auto;
}

.cvs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: var(--cvs-nav-radius);
  padding: 6px;
  margin-top: 10px;
  box-shadow: var(--cvs-nav-shadow);
  position: relative;
  z-index: 120;
  overflow: visible;
}
/* ตอนเปิด dropdown ให้ nav อยู่เหนือ backdrop ชัดเจน (กัน stacking context อื่นทับ) */
.cvs-nav:has(.cvs-nav-dropdown.is-open),
.cvs-nav.cvs-nav--dd-open {
  z-index: 130;
}

.cvs-nav-btn {
  flex: 1 1 auto;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.cvs-nav-btn:hover:not(.active) {
  background: #eff6ff;
  color: var(--cvs-nav-primary);
}
.cvs-nav-btn.active {
  background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.cvs-nav-btn--accent.active {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.35);
}

.cvs-nav-dropdown { position: relative; flex: 1 1 auto; min-width: 0; }
.cvs-nav-dropdown-toggle {
  width: 100%;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}
.cvs-nav-dropdown-toggle .cvs-nav-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.85;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cvs-nav-chevron {
  font-size: 0.65rem;
  margin-left: 4px;
  transition: transform 0.2s;
}
.cvs-nav-dropdown.is-open .cvs-nav-chevron { transform: rotate(180deg); }

.cvs-nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 240px;
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 14px;
  /* อยู่ใน stacking ของ .cvs-nav — ต้องสูงกว่า sibling อื่นใน nav */
  padding: 6px;
  box-shadow: 0 18px 44px rgba(15, 39, 68, 0.18);
  z-index: 200;
}
.cvs-nav-dropdown.is-open .cvs-nav-dropdown-menu { display: block; }

.cvs-nav-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.cvs-nav-dropdown-item:hover { background: #f8fafc; }
.cvs-nav-dropdown-item.is-current {
  background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
  color: #fff;
}
.cvs-nav-dropdown-item.is-current .cvs-nav-item-desc { color: rgba(255, 255, 255, 0.8); }
.cvs-nav-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: var(--cvs-nav-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.cvs-nav-dropdown-item.is-current .cvs-nav-item-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.cvs-nav-item-title { font-size: 0.85rem; font-weight: 700; display: block; }
.cvs-nav-item-desc { font-size: 0.72rem; color: #64748b; display: block; margin-top: 2px; }

/* ซ่อนแถบนำทางเก่า (เก็บ ID ไว้ให้ JS เดิม) */
.app-nav.cvs-nav-legacy {
  display: none !important;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

#role-quick-bar { display: none !important; }
#role-quick-hint-admin { display: none !important; }

/* Stepper เช็คอิน */
.cvs-checkin-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.cvs-checkin-step {
  flex: 1 1 22%;
  min-width: 64px;
  text-align: center;
  padding: 8px 6px;
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #94a3b8;
}
.cvs-checkin-step.done {
  background: #eff6ff;
  color: var(--cvs-nav-primary);
  border-color: #bfdbfe;
}
.cvs-checkin-step.active {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(194, 65, 12, 0.3);
}

.user-badge.user-badge--clickable {
  cursor: pointer;
  transition: background 0.15s;
}
.user-badge.user-badge--clickable:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* แท็บบัญชี */
.cvs-account-panel {
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(30, 58, 138, 0.08);
  box-shadow: var(--cvs-nav-shadow);
  padding: 20px;
}
.cvs-account-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cvs-nav-primary-dark);
  margin: 0 0 4px;
}
.cvs-account-sub {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 16px;
}
.cvs-account-info {
  background: #f8fafc;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.cvs-account-info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.82rem;
  padding: 4px 0;
}
.cvs-account-info-row span { color: #64748b; }
.cvs-account-field { margin-bottom: 12px; }
.cvs-account-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}
.cvs-account-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
}
.cvs-account-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.cvs-account-save-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  margin-bottom: 16px;
}
.cvs-account-save-btn--primary {
  background: linear-gradient(180deg, #2563eb 0%, #1e3a8a 100%);
  color: #fff;
}
.cvs-account-save-btn--pw {
  background: #f1f5f9;
  color: #334155;
}
.cvs-account-section-hdr {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cvs-nav-primary-dark);
  margin: 8px 0 10px;
}
.cvs-account-status {
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* Header กะทัดรัด + โลโก้ B2C (แบบ CVS GRO) */
.logo-shine-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  isolation: isolate;
}
.logo-shine-wrap .logo-shine-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.logo-shine-wrap .logo-shine-inner svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.logo-shine-wrap::after {
  content: '';
  position: absolute;
  top: -20%;
  left: -130%;
  width: 55%;
  height: 140%;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.92) 50%, rgba(255, 255, 255, 0) 62%, transparent 100%);
  transform: skewX(-22deg);
  pointer-events: none;
  z-index: 2;
  animation: cvsLogoShineSlide 3.2s ease-in-out infinite;
}
.logo-shine-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
@keyframes cvsLogoShineSlide {
  0%, 12% { left: -130%; opacity: 0; }
  18% { opacity: 1; }
  52% { left: 130%; opacity: 1; }
  58%, 100% { left: 130%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-shine-wrap::after { animation: none; opacity: 0; }
}
.cvs-b2c-logo--login {
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 20px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.cvs-b2c-logo--login.logo-shine-wrap::after {
  animation-duration: 3.6s;
}
.cvs-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cvs-b2c-logo--header {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.cvs-header-titles {
  min-width: 0;
}
.cvs-header-compact {
  padding: 10px 0 8px !important;
  margin-bottom: 8px !important;
  border-radius: 0 0 18px 18px !important;
}

/* หัวแอป + เมนู — โครงด้านบน (เดสก์ท็อป = ใน flow / มือถือ = fixed) */
#main-app .cvs-top-sticky {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
}
#main-app .cvs-top-sticky .cvs-header-row {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 12px 8px;
}
#main-app .cvs-top-spacer {
  display: none;
  width: 100%;
  height: 0;
  flex-shrink: 0;
  pointer-events: none;
}
@media (min-width: 768px) {
  #main-app .cvs-top-sticky {
    border-radius: 0 0 24px 24px;
    margin-bottom: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  }
}

@media (max-width: 767.98px) {
  #main-app .premium-header.cvs-header-compact {
    padding-top: 8px !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  #main-app .cvs-top-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1040;
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    overflow: visible;
  }
  #main-app .cvs-top-spacer {
    display: block;
  }
  #main-app .cvs-top-sticky .cvs-header-row {
    padding: 6px 8px 4px;
    flex-wrap: nowrap;
    gap: 6px;
  }
  #main-app .cvs-top-sticky .cvs-header-brand {
    gap: 6px;
    flex-shrink: 0;
  }
  #main-app .cvs-top-sticky .cvs-b2c-logo--header {
    width: 32px;
    height: 32px;
    padding: 4px;
    border-radius: 8px;
  }
  #main-app .cvs-top-sticky .cvs-header-titles h2 {
    font-size: 0.95rem !important;
    line-height: 1.1 !important;
  }
  #main-app .cvs-top-sticky .cvs-header-right {
    gap: 4px;
    min-width: 0;
  }
  #main-app .cvs-top-sticky .cvs-header-user.user-badge {
    padding: 2px 6px 2px 3px;
    gap: 4px;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    border-radius: 999px;
    overflow: hidden;
  }
  #main-app .cvs-top-sticky .cvs-header-user .user-badge-text {
    min-width: 0;
    overflow: hidden;
    flex: 1 1 auto;
  }
  #main-app .cvs-top-sticky .cvs-header-user .user-avatar {
    width: 22px;
    height: 22px;
    font-size: 0.62rem;
    flex-shrink: 0;
  }
  #main-app .cvs-top-sticky .cvs-header-user .user-name {
    font-size: 0.68rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 22vw;
  }
  #main-app .cvs-top-sticky .cvs-header-user .user-role {
    display: block;
    font-size: 0.58rem;
    line-height: 1;
    opacity: 0.72;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 22vw;
  }
  #main-app .cvs-top-sticky .cvs-header-actions {
    flex-wrap: nowrap;
    gap: 3px;
    flex-shrink: 0;
  }
  #main-app .cvs-top-sticky .cvs-header-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 0.82rem;
  }
  #main-app .cvs-top-sticky .cvs-header-icon-btn.dropdown-toggle::after {
    display: none;
  }
  #main-app .cvs-top-sticky .cvs-nav {
    margin-top: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(30, 58, 138, 0.12);
    box-shadow: 0 4px 14px rgba(15, 39, 68, 0.1);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    overflow: visible;
    padding: 3px 4px;
    gap: 3px;
    position: relative;
    z-index: 130;
  }
  #main-app .cvs-top-sticky .cvs-nav-btn,
  #main-app .cvs-top-sticky .cvs-nav-dropdown {
    flex: none;
    min-width: 0;
    width: 100%;
  }
  #main-app .cvs-top-sticky .cvs-nav-btn {
    padding: 6px 2px;
    /* มือถือแสดงเฉพาะไอคอน เพื่อไม่ให้ชื่อเมนูเบียดหรือซ้อนกัน */
    font-size: 0;
    border-radius: 9px;
    gap: 0;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #main-app .cvs-top-sticky .cvs-nav-btn i {
    font-size: 1rem;
    flex-shrink: 0;
  }
  #main-app .cvs-top-sticky .cvs-nav-dropdown-toggle {
    flex-direction: row;
    gap: 0;
    line-height: 1.15;
    width: 100%;
    padding: 6px 4px;
    font-size: 0;
  }
  #main-app .cvs-top-sticky .cvs-nav-dropdown-toggle .cvs-nav-sub {
    display: none !important;
  }
  #main-app .cvs-top-sticky .cvs-nav-chevron {
    display: none;
  }
  /* คงตัวเลขแจ้งเตือนให้มองเห็น แม้ซ่อนชื่อเมนู */
  #main-app .cvs-top-sticky .cvs-nav-btn .cvs-leave-nav-badge,
  #main-app .cvs-top-sticky .cvs-nav-btn .cvs-recovery-badge {
    font-size: 0.58rem;
  }
  #main-app .cvs-top-sticky .cvs-nav-dropdown.is-open .cvs-nav-dropdown-menu {
    display: block;
    position: fixed;
    top: calc(var(--cvs-nav-bottom, 72px) + 4px);
    left: 8px;
    right: 8px;
    width: auto;
    min-width: 0;
    max-height: min(58vh, 400px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1050;
    touch-action: manipulation;
  }
}

/* APK Flutter WebView — ใช้ layout เดียวกับมือถือ (กัน cache/CSS ต่างจาก Chrome) */
html.flutter-app #main-app .cvs-top-sticky .cvs-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  overflow: visible;
}
html.flutter-app #main-app .cvs-top-sticky .cvs-nav-btn,
html.flutter-app #main-app .cvs-top-sticky .cvs-nav-dropdown {
  flex: none;
  min-width: 0;
  width: 100%;
}
html.flutter-app #main-app .cvs-top-sticky .cvs-nav-dropdown.is-open .cvs-nav-dropdown-menu {
  position: fixed;
  z-index: 1050;
  touch-action: manipulation;
}

@media (min-width: 401px) and (max-width: 767.98px) {
  #main-app .cvs-top-sticky .cvs-header-user .user-name {
    max-width: 28vw;
  }
  #main-app .cvs-top-sticky .cvs-header-user .user-role {
    max-width: 28vw;
  }
}

.cvs-header-compact .cvs-header-titles h2 {
  font-size: 1.2rem !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em;
}
.cvs-header-actions { max-width: 100%; }
.cvs-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-end;
}
.cvs-header-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.cvs-header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}
.cvs-header-icon-btn--logout {
  color: #fecaca;
  border-color: rgba(254, 202, 202, 0.35);
}
.user-badge-text { min-width: 0; }
.user-avatar {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: absolute;
  inset: 0;
}
.user-badge--active {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.55);
}
.cvs-nav-dropdown-divider {
  height: 1px;
  margin: 6px 8px;
  background: #e2e8f0;
}
.cvs-nav-dropdown-group {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.cvs-nav-dropdown-group-label {
  padding: 6px 12px 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

/* รูปโปรไฟล์บัญชี */
.cvs-account-photo-wrap {
  text-align: center;
  margin-bottom: 16px;
}
.cvs-account-photo-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 10px;
  overflow: hidden;
  border: 3px solid #bfdbfe;
  background: #eff6ff;
  position: relative;
}
.cvs-account-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cvs-account-photo-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1e3a8a;
}
.cvs-account-photo-btn {
  border: none;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
.cvs-account-photo-hint {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 6px;
}
.cvs-account-photo-status {
  font-size: 0.78rem;
  margin-top: 6px;
}

/* แจ้งเตือนพิกัดไกลจากสาขา */
.cvs-geo-far-alert {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
  color: #991b1b;
}

/* คำแนะนำเปิดสิทธิ์ GPS / กล้อง */
.cvs-perm-help {
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: 12px 14px;
  color: #9a3412;
  font-size: 0.8rem;
  line-height: 1.45;
}
.cvs-perm-help--camera {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.cvs-perm-help-steps {
  margin: 0;
  padding-left: 1.2rem;
}
.cvs-perm-help-steps li {
  margin-bottom: 4px;
}
.cvs-checkin-ready-hint {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 10px 12px;
  color: #991b1b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
}
.cvs-checkin-ready-hint.is-ok {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}
.cvs-checkin-ready-hint .cvs-ready-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* —— Modal ตำแหน่งเช็คอิน (UX ใช้งานง่าย) —— */
.geo-check-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 39, 68, 0.22);
}
.geo-check-modal .modal-header {
  border: 0;
  padding: 14px 18px 8px;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}
.geo-check-modal .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}
.geo-check-modal .modal-title .geo-check-title-ic {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  font-size: 1rem;
}
.geo-check-modal .modal-body { padding: 8px 18px 16px; }
.geo-check-modal .modal-footer {
  border: 0;
  padding: 0 18px 16px;
  background: transparent;
  gap: 8px;
}
.geo-check-store {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f1f5f9;
  margin-bottom: 12px;
}
.geo-check-store-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #fff;
  color: #1e40af;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(15, 39, 68, 0.08);
}
.geo-check-store-name {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: #0f172a;
  word-break: break-word;
}
.geo-check-store-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}
.geo-check-status {
  text-align: center;
  border-radius: 16px;
  padding: 16px 14px 14px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.geo-check-status.is-ok {
  background: linear-gradient(180deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #bbf7d0;
}
.geo-check-status.is-warn {
  background: linear-gradient(180deg, #fffbeb 0%, #fefce8 100%);
  border-color: #fde68a;
}
.geo-check-status.is-far {
  background: linear-gradient(180deg, #fef2f2 0%, #fff1f2 100%);
  border-color: #fecaca;
}
.geo-check-status.is-unknown {
  background: #f8fafc;
  border-color: #e2e8f0;
}
.geo-check-status-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.geo-check-status.is-ok .geo-check-status-label { color: #15803d; }
.geo-check-status.is-warn .geo-check-status-label { color: #b45309; }
.geo-check-status.is-far .geo-check-status-label { color: #b91c1c; }
.geo-check-status.is-unknown .geo-check-status-label { color: #64748b; }
.geo-check-dist {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.geo-check-status-msg {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 6px;
}
.geo-check-map {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin-bottom: 12px;
  background: #e2e8f0;
  position: relative;
}
.geo-check-map iframe {
  display: block;
  width: 100%;
  height: 160px;
  border: 0;
}
.geo-check-map-caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 0.68rem;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}
.geo-check-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
@media (max-width: 420px) {
  .geo-check-points { grid-template-columns: 1fr; }
}
.geo-check-point {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}
.geo-check-point-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.geo-check-point-label .bi-person-walking { color: #2563eb; }
.geo-check-point-label .bi-shop { color: #dc2626; }
.geo-check-point-coords {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  line-height: 1.35;
}
.geo-check-point-copy {
  margin-top: 6px;
  font-size: 0.72rem;
  padding: 2px 8px;
}
.geo-check-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.geo-check-actions .btn {
  border-radius: 12px;
  font-weight: 600;
  padding: 10px 14px;
  justify-content: center;
}
.geo-check-actions .btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
  border: 0;
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.28);
}
.admin-geo-open {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.admin-geo-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.18);
}

@media (max-width: 576px) {
  .cvs-nav-btn { font-size: 0.75rem; padding: 9px 8px; }
  .cvs-nav-dropdown-menu { min-width: 200px; }
}

/* รูปเช็คอิน — สไตล์เดียวกับ CVS Grocery */
.checkin-photo-zone {
  border: none;
  border-radius: 18px;
  padding: 0;
  background: transparent;
  position: relative;
  cursor: default;
}
.checkin-photo-zone.is-tappable {
  cursor: pointer;
}
.checkin-photo-zone.is-tappable .checkin-photo-canvas {
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.checkin-photo-zone.is-tappable .checkin-photo-canvas:active {
  opacity: 0.94;
  transform: scale(0.995);
}
.checkin-photo-zone.is-tappable #visit-checkin-photo-placeholder,
.checkin-photo-zone.is-tappable #checkin-photo-placeholder {
  cursor: pointer;
}
.checkin-photo-zone.has-photo.is-tappable .checkin-photo-preview {
  cursor: pointer;
}
.checkin-photo-canvas {
  position: relative;
  width: 100%;
  box-sizing: border-box;
  border-radius: 18px;
  padding: 20px 16px 16px;
  background:
    linear-gradient(180deg, #fff7ed 0%, #fff 100%),
    repeating-linear-gradient(0deg, transparent, transparent 11px, rgba(194, 65, 12, 0.04) 11px, rgba(194, 65, 12, 0.04) 12px);
  border: 2px solid #fdba74;
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.9), 0 8px 24px rgba(194, 65, 12, 0.1);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.checkin-photo-zone.has-photo .checkin-photo-canvas {
  border-color: #22c55e;
  background: linear-gradient(180deg, #f0fdf4 0%, #fff 100%);
}
.checkin-photo-frame-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 0;
  box-shadow: 0 6px 16px rgba(194, 65, 12, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  margin: 0 auto 10px;
  flex-shrink: 0;
}
.checkin-photo-frame-icon i {
  display: block;
  line-height: 1;
  width: 1em;
  height: 1em;
  margin: 0;
  padding: 0;
  transform: translate(1px, 0.5px);
}
#visit-checkin-photo-placeholder,
#checkin-photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 168px;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
}
.checkin-photo-preview {
  width: 100%;
  max-width: 280px;
  height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 3px solid #fff;
  box-shadow: 0 8px 24px rgba(15, 39, 68, 0.18);
  display: none;
  margin: 0 auto 10px;
}
.checkin-photo-preview.show { display: block; }
.cvs-photo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.cvs-photo-btn--primary {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  color: #fff;
  box-shadow: 0 4px 0 #9a3412, 0 6px 16px rgba(194, 65, 12, 0.28);
}
.cvs-photo-btn--outline {
  background: #fff;
  color: #c2410c;
  border: 1.5px solid #fdba74;
}
.cvs-photo-btn:active { transform: translateY(1px); }

/* ===== การลา (แบบ CVS Grocery) ===== */
.cvs-leave-layout { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 24px; }
.cvs-leave-panel {
  background: #fff;
  border: 1px solid rgba(30, 58, 138, 0.08);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 18px rgba(15, 39, 68, 0.05);
}
.cvs-leave-panel-hdr { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.cvs-leave-title { font-size: 0.98rem; font-weight: 800; color: #0f172a; margin: 0; display: flex; align-items: center; gap: 8px; }
.cvs-leave-sub { font-size: 0.74rem; color: #64748b; margin: 4px 0 0; }
.cvs-leave-total-pill {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}
.cvs-leave-cards-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.cvs-leave-cards-track::-webkit-scrollbar { height: 4px; }
.cvs-leave-chip {
  flex: 0 0 148px;
  scroll-snap-align: start;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.cvs-leave-chip:active { transform: scale(0.98); }
.cvs-leave-chip-title { font-size: 0.82rem; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.cvs-leave-chip-quota { font-size: 1rem; font-weight: 800; color: #1e40af; }
.cvs-leave-chip-sub { font-size: 0.66rem; color: #64748b; margin-top: 4px; line-height: 1.35; }
.cvs-leave-chip--sick { border-color: #fecaca; background: #fef2f2; }
.cvs-leave-chip--personal { border-color: #fed7aa; background: #fff7ed; }
.cvs-leave-chip--annual { border-color: #bbf7d0; background: #f0fdf4; }
.cvs-leave-chip--maternity { border-color: #fbcfe8; background: #fdf2f8; }
.cvs-leave-chip--military { border-color: #c7d2fe; background: #eef2ff; }
.cvs-leave-chip--steril { border-color: #ddd6fe; background: #f5f3ff; }
.cvs-leave-chip--unpaid { border-color: #e2e8f0; background: #f8fafc; }
.cvs-leave-chip--other { border-color: #cbd5e1; background: #f1f5f9; }
.cvs-leave-chip--loading { flex: 1; text-align: center; color: #64748b; cursor: default; }
.cvs-leave-chip--error { color: #b45309; background: #fffbeb; border-color: #fcd34d; }
.cvs-leave-hint { font-size: 0.72rem; color: #94a3b8; margin: 6px 0 0; }
.cvs-leave-form-collapsed { display: flex; flex-direction: column; gap: 10px; }
.cvs-leave-form-collapsed-main {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1.5px dashed #bfdbfe;
  border-radius: 14px;
  background: #f8fbff;
  cursor: pointer;
}
.cvs-leave-form-collapsed-ic {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.cvs-leave-open-btn, .cvs-leave-fold-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}
.cvs-leave-open-btn { background: linear-gradient(135deg, #2563eb, #1e3a8a); color: #fff; width: 100%; min-height: 48px; font-size: 1rem; font-weight: 800; }
.cvs-leave-fold-btn { background: #f1f5f9; color: #475569; }
.cvs-leave-form-title { font-size: 0.95rem; font-weight: 800; margin: 0 0 4px; color: #0f172a; }
.cvs-leave-field { margin-bottom: 12px; }
.cvs-leave-label { display: block; font-size: 0.76rem; font-weight: 700; color: #64748b; margin-bottom: 4px; }
.cvs-leave-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}
.cvs-leave-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.cvs-leave-type-hint, .cvs-leave-days-estimate { font-size: 0.74rem; color: #64748b; margin-top: 4px; }
.cvs-leave-days-estimate { color: #1d4ed8; font-weight: 600; }
.cvs-leave-attach-zone {
  border: 1.5px dashed #cbd5e1;
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  background: #f8fafc;
  cursor: pointer;
  display: block;
  font-size: 0.82rem;
  color: #475569;
}
.cvs-leave-submit-btn {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(135deg, #16a34a, #15803d);
  cursor: pointer;
}
.cvs-leave-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.cvs-leave-history-list { display: flex; flex-direction: column; gap: 8px; }
.cvs-leave-history-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 12px; background: #fafafa; }
.cvs-leave-history-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cvs-leave-history-days { margin-left: auto; font-size: 0.78rem; font-weight: 700; color: #1e40af; }
.cvs-leave-history-meta { font-size: 0.76rem; color: #64748b; margin-top: 4px; }
.cvs-leave-history-note, .cvs-leave-history-comment { font-size: 0.74rem; color: #475569; margin-top: 4px; }
.cvs-leave-st { font-size: 0.66rem; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.cvs-leave-st--wait { background: #fef3c7; color: #92400e; }
.cvs-leave-st--ok { background: #dcfce7; color: #166534; }
.cvs-leave-st--no { background: #fee2e2; color: #991b1b; }
.cvs-leave-team-list { display: flex; flex-direction: column; gap: 8px; }
.cvs-leave-team-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cvs-leave-team-item:hover, .cvs-leave-team-item:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}
.cvs-leave-pending-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

/* ไฮไลต์ช่องที่ยังไม่ได้คีย์เมื่อ OA กดเช็คเอ้าส์ก่อนบันทึกการตรวจหน้าร้าน */
@keyframes cvsFieldFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
  30% { box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.45); }
}
.cvs-field-flash {
  animation: cvsFieldFlash 0.7s ease-in-out 3;
  border-color: #dc3545 !important;
  border-radius: 8px;
}

/* สโตร์ & สาขา (OA/SUP) — ป้ายสถานะคำขอแก้ไข · Bootstrap 5.2 ไม่มี *-subtle จึงกำหนดเอง */
.badge.bg-warning-subtle { background: #fef3c7 !important; color: #b45309 !important; }
.badge.bg-success-subtle { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-danger-subtle { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-secondary-subtle { background: #e5e7eb !important; color: #4b5563 !important; }
.badge.border-warning-subtle { border-color: #fcd34d !important; }
.badge.border-success-subtle { border-color: #86efac !important; }
.badge.border-danger-subtle { border-color: #fca5a5 !important; }
.badge.border-secondary-subtle { border-color: #d1d5db !important; }

/* ===== UX 2026: เมนูสั้น · ปุ่มหลักเด่น · ไม่พึ่งคู่มือ ===== */
.cvs-nav-item-desc { display: none !important; }
.cvs-oa-accordion-sub { display: none !important; }
.cvs-leave-open-btn { min-height: 48px; font-size: 1rem; font-weight: 800; }
.cvs-nav-dropdown-item {
  align-items: center;
  padding: 11px 12px;
}
.cvs-nav-item-title { font-size: 0.9rem; }

.cvs-checkin-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: sticky;
  bottom: 8px;
  z-index: 8;
  padding: 10px 0 4px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%);
}
.cvs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 12px 18px;
  border: none;
  border-radius: 16px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  line-height: 1.1;
  box-shadow: 0 8px 20px rgba(15, 39, 68, 0.14);
}
.cvs-cta:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}
.cvs-cta--primary {
  background: linear-gradient(180deg, #f97316 0%, #c2410c 100%);
  color: #fff;
}
.cvs-cta--primary:hover:not(:disabled) {
  filter: brightness(1.06);
  color: #fff;
}
.cvs-cta--checkout {
  background: #fff;
  color: #b91c1c;
  border: 2px solid #fecaca;
  box-shadow: none;
}
.cvs-cta--checkout:not(:disabled) {
  border-color: #ef4444;
  background: #fef2f2;
}
.cvs-cta--success {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%);
  color: #fff;
  min-width: 180px;
}
.cvs-cta--success:hover:not(:disabled) {
  filter: brightness(1.05);
  color: #fff;
}
#fc-frontcheck-save-bar .cvs-cta--success,
#tab-basket-pre .cvs-cta--success {
  flex: 1 1 220px;
}
@media (max-width: 575.98px) {
  .cvs-checkin-cta { grid-template-columns: 1fr; }
  .cvs-cta { min-height: 54px; font-size: 1.08rem; }
  #fc-frontcheck-save-bar .d-flex {
    flex-direction: column-reverse;
  }
  #fc-frontcheck-save-bar .cvs-cta--success,
  #tab-basket-pre .cvs-cta--success {
    width: 100%;
    flex: 1 1 auto;
  }
}
