.checkin-layout {
  min-height: calc(100svh - 28px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.checkin-panel {
  position: relative;
  min-height: 100%;
  background: #fff8fb;
  border: 2px solid rgba(255, 105, 180, 0.34);
  border-radius: 20px;
  padding: 14px;
  overflow: hidden;
}

.checkin-public-page {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 0;
  background: #fff3f8;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.lotus-corner {
  position: absolute;
  z-index: 1;
  width: 170px;
  height: 226px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.lotus-tl {
  top: -8px;
  left: -8px;
  background-image: url("/Modules/Checkin/assets/bong-tl.png");
}

.lotus-tr {
  top: -8px;
  right: -8px;
  background-image: url("/Modules/Checkin/assets/bong-tr.png");
}

.lotus-bl {
  bottom: -8px;
  left: -8px;
  background-image: url("/Modules/Checkin/assets/bong-bl.png");
}

.lotus-br {
  right: -8px;
  bottom: -8px;
  background-image: url("/Modules/Checkin/assets/bong-br.png");
}

.checkin-logo {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 50%;
  width: 82px;
  height: auto;
  transform: translateX(-50%);
  object-fit: contain;
}

.checkin-brand {
  position: absolute;
  z-index: 3;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  width: min(540px, calc(100% - 240px));
  text-align: center;
}

.checkin-brand-title {
  color: #f00670;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.checkin-brand-rule {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #f00670;
  font-size: 18px;
  line-height: 1;
}

.checkin-brand-rule span {
  width: 94px;
  height: 2px;
  background: #f00670;
}

.checkin-brand-rule b {
  font-weight: 400;
}

.keypad-shell {
  position: relative;
  z-index: 4;
  width: min(520px, calc(100% - 120px));
  margin: 154px auto 0;
  text-align: center;
}

.keypad-shell h1 {
  position: relative;
  top: -18px;
  margin: 0 0 0;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
}

.keypad-field-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 10px;
}

.keypad-field-row label {
  display: grid;
  gap: 5px;
  text-align: center;
}

.keypad-field-row label > span {
  color: #000;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.keypad-display-box {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(255, 105, 180, 0.34);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8fb 0%, #ffeaf4 72%);
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.1),
    inset 0 8px 14px rgba(205, 82, 143, 0.24),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 9px 16px rgba(236, 85, 153, 0.12);
}

.keypad-display-box.active {
  border-color: #f00670;
  background: linear-gradient(180deg, #ff1680 0%, #f00670 72%);
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.16),
    inset 0 10px 16px rgba(143, 0, 76, 0.34),
    inset 0 -3px 0 rgba(255, 255, 255, 0.24),
    0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 17px rgba(236, 85, 153, 0.17);
}

.keypad-display-box.active b {
  color: #fff;
}

.keypad-display-box b {
  color: #000;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: none;
  white-space: nowrap;
}

.keypad-field-row label:first-child .keypad-display-box b {
  font-size: 20px;
  letter-spacing: -0.5px;
}

.keypad-display-box.active b {
  color: #fff;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.22),
    0 -1px 0 rgba(255, 255, 255, 0.18);
}

.keypad-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.keypad-grid button,
.keypad-next {
  border: 1px solid rgba(255, 105, 180, 0.28);
  border-radius: 13px;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 90ms ease, box-shadow 90ms ease, background 120ms ease;
}

.keypad-grid button {
  height: 58px;
  background: linear-gradient(180deg, #fffafd 0%, #fff1f7 100%);
  color: #f00670;
  font-size: 28px;
  font-weight: 800;
  box-shadow:
    0 10px 0 rgba(255, 166, 205, 0.52),
    0 18px 22px rgba(236, 85, 153, 0.16),
    inset 0 2px 0 rgba(255, 255, 255, 0.96);
}

.keypad-grid button:active,
.keypad-next:active {
  transform: translateY(5px);
  box-shadow:
    0 4px 0 rgba(255, 166, 205, 0.52),
    0 9px 14px rgba(236, 85, 153, 0.14),
    inset 0 2px 0 rgba(255, 255, 255, 0.9);
}

.keypad-next:active {
  transform: translateY(3px);
  box-shadow:
    inset 0 13px 18px rgba(0, 0, 0, 0.18),
    inset 0 13px 18px rgba(143, 0, 76, 0.3),
    inset 0 -2px 0 rgba(255, 255, 255, 0.2),
    0 6px 11px rgba(236, 85, 153, 0.14);
}

.keypad-action-row.ready .keypad-next:active {
  box-shadow:
    inset 0 13px 18px rgba(0, 0, 0, 0.2),
    inset 0 13px 18px rgba(143, 0, 76, 0.34),
    inset 0 -2px 0 rgba(255, 255, 255, 0.18),
    0 7px 12px rgba(240, 6, 112, 0.18);
}

.keypad-clear,
.keypad-backspace {
  color: #000 !important;
}

.keypad-next {
  width: 100%;
  height: 60px;
  border: 1px solid rgba(255, 105, 180, 0.26);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8fb 0%, #fff0f7 100%);
  color: #f00670;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 24px;
  font-weight: 800;
  box-shadow:
    inset 8px 8px 18px rgba(210, 98, 155, 0.16),
    inset -8px -8px 18px rgba(255, 255, 255, 0.92),
    0 2px 0 rgba(255, 105, 180, 0.16),
    0 12px 20px rgba(236, 85, 153, 0.08);
}

.keypad-next:disabled {
  cursor: default;
  opacity: 1;
}

.keypad-next:disabled:active {
  transform: none;
  box-shadow:
    inset 8px 8px 18px rgba(210, 98, 155, 0.16),
    inset -8px -8px 18px rgba(255, 255, 255, 0.92),
    0 2px 0 rgba(255, 105, 180, 0.16),
    0 12px 20px rgba(236, 85, 153, 0.08);
}

.keypad-action-row.ready .keypad-next {
  background: linear-gradient(180deg, #ff1883 0%, #ed006d 100%);
  color: #fff;
  cursor: pointer;
  opacity: 1;
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.17),
    inset 0 10px 16px rgba(143, 0, 76, 0.3),
    inset 0 -3px 0 rgba(255, 255, 255, 0.22),
    0 12px 19px rgba(240, 6, 112, 0.23);
}

.keypad-action-row.ready .keypad-next b {
  color: #f00670;
}

.keypad-action-row {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.keypad-status {
  min-height: 18px;
  margin-top: 10px;
  color: #b00050;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.welcome-shell {
  position: relative;
  z-index: 4;
  width: min(680px, calc(100% - 120px));
  margin: 150px auto 0;
}

.new-customer-shell {
  position: relative;
  z-index: 4;
  width: min(680px, calc(100% - 120px));
  margin: 108px auto 0;
}

.new-customer-title {
  text-align: center;
}

.new-customer-title h1 {
  margin: 24px 0 10px;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
}

.new-customer-title .checkin-brand-rule span {
  width: 76px;
}

.new-customer-form {
  margin-top: 34px;
}

.checkin-text-field {
  display: grid;
  gap: 6px;
}

.checkin-text-field > span {
  color: #000;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkin-text-field > span i {
  color: #f00670;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.checkin-text-field input {
  width: 100%;
  height: 62px;
  border: 1px solid rgba(255, 105, 180, 0.34);
  border-radius: 14px;
  background: #fff8fb;
  color: #000;
  padding: 0 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 700;
  outline: none;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.06),
    inset 0 8px 14px rgba(205, 82, 143, 0.1),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 9px 16px rgba(236, 85, 153, 0.08);
}

.checkin-text-field input:focus {
  border-color: #f00670;
}

.welcome-greeting {
  margin: 0 auto 34px;
  text-align: center;
}

.welcome-greeting > div:first-child {
  color: #f00670;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.welcome-greeting strong {
  display: block;
  margin-top: 4px;
  color: #000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.welcome-greeting .checkin-brand-rule {
  margin-top: 10px;
}

.welcome-greeting .checkin-brand-rule span {
  width: 82px;
}

.checkin-select-field {
  display: grid;
  gap: 6px;
}

.checkin-select-field > span {
  color: #000;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
}

.checkin-select-field > span b {
  color: rgba(0, 0, 0, 0.56);
  font-size: 18px;
  font-weight: 700;
}

.checkin-select-field select {
  width: 100%;
  height: 62px;
  border: 1px solid rgba(255, 105, 180, 0.34);
  border-radius: 14px;
  background: #fff8fb;
  color: #000;
  padding: 0 20px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 400;
  outline: none;
  cursor: pointer;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.06),
    inset 0 8px 14px rgba(205, 82, 143, 0.1),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 9px 16px rgba(236, 85, 153, 0.08);
}

.checkin-select-field select:focus {
  border-color: #f00670;
}

.service-picker {
  margin-top: 24px;
}

.service-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #f00670;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.service-title span {
  width: 92px;
  height: 2px;
  background: #f00670;
}

.service-title b {
  font-weight: 900;
}

.service-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.service-grid button {
  height: 74px;
  border: 1px solid rgba(255, 105, 180, 0.34);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff8fb 0%, #ffeaf4 72%);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 800;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.06),
    inset 0 8px 14px rgba(205, 82, 143, 0.1),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 9px 16px rgba(236, 85, 153, 0.08);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.service-grid button.wide {
  grid-column: 1 / -1;
}

.service-grid button i {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.service-grid button.active {
  border-color: #f00670;
  background: linear-gradient(180deg, #ff1883 0%, #ed006d 100%);
  color: #fff;
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.17),
    inset 0 10px 16px rgba(143, 0, 76, 0.3),
    inset 0 -3px 0 rgba(255, 255, 255, 0.22),
    0 12px 19px rgba(240, 6, 112, 0.23);
}

.welcome-checkin-button {
  width: min(520px, 100%);
  height: 68px;
  margin: 34px auto 0;
  border: 1px solid rgba(255, 105, 180, 0.34);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff8fb 0%, #ffeaf4 72%);
  color: #f00670;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 900;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.08),
    inset 0 8px 14px rgba(205, 82, 143, 0.14),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 12px 20px rgba(236, 85, 153, 0.14);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.welcome-checkin-button:disabled {
  cursor: default;
  opacity: 0.72;
}

.welcome-checkin-button:not(:disabled) {
  background: linear-gradient(180deg, #ff1883 0%, #ed006d 100%);
  color: #fff;
  box-shadow:
    inset 0 10px 16px rgba(0, 0, 0, 0.17),
    inset 0 10px 16px rgba(143, 0, 76, 0.3),
    inset 0 -3px 0 rgba(255, 255, 255, 0.22),
    0 12px 19px rgba(240, 6, 112, 0.23);
}

.welcome-checkin-button b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #f00670;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.thank-shell {
  position: relative;
  z-index: 4;
  width: min(620px, calc(100% - 120px));
  margin: 108px auto 0;
  text-align: center;
}

.thank-shell h1 {
  margin: 24px 0 20px;
  color: #f00670;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.thank-check {
  color: #f00670;
  font-size: 54px;
  line-height: 1;
}

.thank-id-card {
  width: fit-content;
  min-width: 286px;
  margin: 20px auto 10px;
  border: 2px solid rgba(255, 105, 180, 0.36);
  border-radius: 14px;
  background: #fff8fb;
  color: #f00670;
  padding: 14px 22px;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  box-shadow:
    inset 0 8px 14px rgba(0, 0, 0, 0.05),
    inset 0 8px 14px rgba(205, 82, 143, 0.1),
    inset 0 -3px 0 rgba(255, 255, 255, 0.98),
    0 10px 18px rgba(236, 85, 153, 0.1);
}

.thank-id-status {
  min-height: 18px;
  color: #b00050;
  font-size: 14px;
  font-weight: 700;
}

.thank-login-note {
  margin-top: 6px;
  color: #f00670;
  font-size: 24px;
  font-weight: 900;
}

.thank-shell > .checkin-brand-rule {
  margin-top: 24px;
}

.thank-shell > .checkin-brand-rule span {
  width: 58px;
}

.thank-message {
  margin-top: 34px;
  color: #000;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.25;
}

.thank-message p {
  margin: 0 0 12px;
}

.thank-return {
  margin-top: 24px;
  color: rgba(0, 0, 0, 0.5);
  font-size: 18px;
  font-weight: 400;
}

.keypad-next b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: #f00670;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

body.checkin-public-mode {
  overflow: hidden;
}

body.checkin-public-mode #app {
  min-height: 0;
  padding: 0;
}

.checkin-public-single {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 0;
  display: grid;
}

.checkin-menu-layout {
  width: 100%;
  min-height: calc(100svh - 116px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px;
}

.checkin-menu-panel {
  min-height: 100%;
  background: #fff8fb;
  border: 2px solid rgba(255, 105, 180, 0.34);
  border-radius: 20px;
  color: #000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.checkin-menu-panel:hover {
  background: #fffafd;
  border-color: rgba(255, 105, 180, 0.52);
}

.checkin-menu-panel:focus-visible {
  outline: 3px solid rgba(255, 105, 180, 0.32);
  outline-offset: 2px;
}

@media (max-width: 560px) {
  .checkin-layout {
    min-height: calc(100svh - 16px);
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .checkin-panel {
    padding: 12px;
  }

  .checkin-public-page {
    padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
  }

  .checkin-public-single {
    height: 100%;
    min-height: 0;
  }

  .lotus-corner {
    width: 126px;
    height: 167px;
  }

  .checkin-logo {
    top: 8px;
    width: 70px;
  }

  .checkin-brand {
    top: 72px;
    width: min(430px, calc(100% - 160px));
  }

  .checkin-brand-title {
    font-size: 26px;
  }

  .checkin-brand-rule span {
    width: 70px;
  }

  .keypad-shell {
    width: min(500px, calc(100% - 80px));
    margin-top: 138px;
  }

  .keypad-shell h1 {
    font-size: 23px;
  }

  .keypad-display-box {
    height: 48px;
  }

  .keypad-display-box b {
    font-size: 21px;
  }

  .keypad-grid button {
    height: 54px;
    font-size: 25px;
  }

  .keypad-next {
    height: 58px;
    font-size: 20px;
    gap: 14px;
  }

  .keypad-action-row {
    margin-top: 22px;
  }

  .welcome-shell {
    width: min(560px, calc(100% - 80px));
    margin-top: 132px;
  }

  .new-customer-shell {
    width: min(560px, calc(100% - 80px));
    margin-top: 88px;
  }

  .new-customer-title h1 {
    margin-top: 18px;
    font-size: 25px;
  }

  .new-customer-form {
    margin-top: 26px;
  }

  .checkin-text-field > span {
    font-size: 18px;
  }

  .checkin-text-field input {
    height: 56px;
    font-size: 20px;
    padding: 0 16px;
  }

  .welcome-greeting {
    margin-bottom: 28px;
  }

  .welcome-greeting > div:first-child {
    font-size: 26px;
  }

  .welcome-greeting strong {
    font-size: 34px;
  }

  .checkin-select-field > span,
  .checkin-select-field > span b {
    font-size: 16px;
  }

  .checkin-select-field select {
    height: 56px;
    font-size: 20px;
    padding: 0 16px;
  }

  .service-picker {
    margin-top: 22px;
  }

  .service-title {
    gap: 8px;
    font-size: 14px;
  }

  .service-title span {
    width: 48px;
  }

  .service-grid {
    gap: 10px;
  }

  .service-grid button {
    height: 62px;
    border-radius: 14px;
    gap: 10px;
    font-size: 16px;
  }

  .service-grid button i {
    width: 30px;
    height: 30px;
    font-size: 17px;
  }

  .welcome-checkin-button {
    height: 60px;
    margin-top: 24px;
    gap: 16px;
    font-size: 22px;
  }

  .welcome-checkin-button b {
    width: 32px;
    height: 32px;
    font-size: 27px;
  }

  .thank-shell {
    width: min(560px, calc(100% - 80px));
    margin-top: 88px;
  }

  .thank-shell h1 {
    margin-top: 18px;
    font-size: 34px;
  }

  .thank-check {
    font-size: 46px;
  }

  .thank-id-card {
    min-width: 240px;
    padding: 12px 18px;
    font-size: 26px;
  }

  .thank-login-note {
    font-size: 20px;
  }

  .thank-message {
    margin-top: 26px;
    font-size: 19px;
  }

  .thank-return {
    font-size: 15px;
  }

  .checkin-menu-layout {
    min-height: calc(100svh - 88px);
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .checkin-menu-panel {
    min-height: 120px;
    padding: 12px;
  }
}

/* Vinh fix: stop double-tap zoom on keypad */
[data-checkin-page="keypad"],
[data-checkin-page="keypad"] *,
.keypad-shell,
.keypad-shell * {
  touch-action: manipulation !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
}

[data-checkin-page="keypad"] button,
.keypad-display-box,
.keypad-grid button,
.keypad-next {
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
}
