.h5ui-layer-open {
  overflow: hidden;
}

.h5ui-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  background: rgba(17, 24, 39, 0);
  transition: background-color 180ms ease;
}

.h5ui-overlay.is-open {
  background: rgba(17, 24, 39, 0.46);
}

.h5ui-overlay--bottom {
  align-items: flex-end;
}

.h5ui-overlay--center {
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.h5ui-sheet,
.h5ui-datepicker {
  width: 100%;
  color: #111827;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(17, 24, 39, 0.14);
  transform: translateY(100%);
  transition: transform 180ms ease;
}

.h5ui-overlay.is-open .h5ui-sheet,
.h5ui-overlay.is-open .h5ui-datepicker {
  transform: translateY(0);
}

.h5ui-sheet {
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}

.h5ui-sheet__title {
  padding: 14px 8px 12px;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
}

.h5ui-sheet__item {
  width: 100%;
  min-height: 54px;
  padding: 0 12px;
  color: #111827;
  font: inherit;
  font-size: 17px;
  background: transparent;
  border: 0;
  border-top: 1px solid #eef0f3;
}

.h5ui-sheet__item:active {
  background: #f3f4f6;
}

.h5ui-sheet__item--cancel {
  margin-top: 8px;
  color: #4b5563;
  background: #f5f6f8;
  border: 0;
  border-radius: 12px;
}

.h5ui-choice-sheet {
  display: flex;
  max-height: min(80vh, 720px);
  max-height: min(80dvh, 720px);
  flex-direction: column;
}

.h5ui-choice-sheet__handle {
  width: 38px;
  height: 4px;
  margin: 2px auto 0;
  background: #d4d4d8;
  border-radius: 999px;
}

.h5ui-choice-sheet .h5ui-sheet__title {
  flex: 0 0 auto;
}

.h5ui-choice-sheet__list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.h5ui-choice-sheet__item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.h5ui-choice-sheet__label {
  min-width: 0;
  flex: 1;
}

.h5ui-choice-sheet__item small {
  color: #8e8e93;
  font-size: 12px;
}

.h5ui-choice-sheet__item.is-selected {
  font-weight: 700;
  background: #f5f6f8;
}

.h5ui-choice-sheet__check {
  flex: 0 0 auto;
  color: #111827;
  font-size: 17px;
}

.h5ui-choice-sheet .h5ui-sheet__item--cancel {
  flex: 0 0 auto;
}

.h5ui-dialog {
  width: min(100%, 380px);
  overflow: hidden;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.22);
  transform: scale(0.96);
  opacity: 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.h5ui-overlay.is-open .h5ui-dialog {
  transform: scale(1);
  opacity: 1;
}

.h5ui-dialog__body {
  padding: 28px 24px 24px;
  text-align: center;
}

.h5ui-dialog__title {
  color: #111827;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
}

.h5ui-dialog__message {
  margin-top: 10px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.sales-import-warning .h5ui-dialog__message {
  max-height: 50vh;
  max-height: 50dvh;
  overflow-y: auto;
  overflow-wrap: anywhere;
}

.h5ui-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom));
}

.h5ui-dialog__actions--single {
  grid-template-columns: 1fr;
}

.h5ui-dialog__button {
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  border: 0;
  border-radius: 12px;
}

.h5ui-dialog__button--cancel {
  color: #374151;
  background: #f3f4f6;
}

.h5ui-dialog__button--primary {
  color: #ffffff;
  background: #111827;
}

.h5ui-dialog__button--danger {
  color: #ffffff;
  background: #dc2626;
}

.h5ui-dialog__button:active,
.h5ui-empty__action:active {
  opacity: 0.82;
}

.h5ui-undo {
  position: fixed;
  right: 16px;
  bottom: calc(76px + env(safe-area-inset-bottom));
  left: 16px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 12px 10px 16px;
  color: #ffffff;
  background: #111827;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.24);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.h5ui-undo.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.h5ui-undo__message {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}

.h5ui-undo__action {
  flex: none;
  padding: 8px 10px;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.h5ui-undo.is-undone {
  justify-content: center;
}

.h5ui-undo.is-undone .h5ui-undo__message {
  flex: 0 1 auto;
  text-align: center;
}

.h5ui-toast {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 1300;
  max-width: calc(100% - 48px);
  padding: 10px 16px;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  background: rgba(17, 24, 39, 0.92);
  border-radius: 10px;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.h5ui-toast.is-open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.h5ui-datepicker {
  overflow: hidden;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.h5ui-datepicker__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid #eef0f3;
}

.h5ui-datepicker__head strong {
  font-size: 17px;
}

.h5ui-datepicker__text {
  padding: 10px 0;
  color: #4b5563;
  font: inherit;
  font-size: 15px;
  background: transparent;
  border: 0;
}

.h5ui-datepicker__text[data-action="confirm"] {
  color: #111827;
  font-weight: 700;
  text-align: right;
}

.h5ui-datepicker__month {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 18px 16px 12px;
}

.h5ui-datepicker__month strong {
  font-size: 17px;
  text-align: center;
}

.h5ui-datepicker__arrow {
  width: 38px;
  height: 38px;
  color: #111827;
  font: inherit;
  font-size: 28px;
  line-height: 32px;
  background: #f5f6f8;
  border: 0;
  border-radius: 50%;
}

.h5ui-datepicker__arrow:disabled {
  color: #c4c9d0;
  background: #fafafa;
}

.h5ui-datepicker__weekdays,
.h5ui-datepicker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0 12px;
}

.h5ui-datepicker__weekdays {
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
}

.h5ui-datepicker__weekdays span {
  padding: 8px 0 10px;
}

.h5ui-datepicker__day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 42px;
  margin: 2px auto;
  color: #111827;
  font: inherit;
  font-size: 15px;
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.h5ui-datepicker__day span {
  position: relative;
  z-index: 1;
}

.h5ui-datepicker__day.is-selected {
  color: #ffffff;
  font-weight: 700;
  background: #111827;
}

.h5ui-datepicker__day.is-disabled {
  color: #c6cbd2;
  background: #f5f6f7;
}

.h5ui-datepicker__day i {
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 4px;
  height: 4px;
  background: #9ca3af;
  border-radius: 50%;
  transform: translateX(-50%);
}

.h5ui-datepicker__day.is-selected i {
  background: #ffffff;
}

.h5ui-datepicker__day.is-blank {
  pointer-events: none;
}

.h5ui-empty[data-empty-state] {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  min-width: 0;
  min-height: 224px;
  margin: 0;
  padding: 32px 20px;
  border: 1px solid #ECECEF;
  border-radius: 16px;
  background: #FFFFFF;
  color: #252529;
  text-align: center;
}
.h5ui-empty[data-empty-state] .h5ui-empty__visual {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 0 20px;
  border-radius: 18px;
  background: #F5F5F7;
  color: #85858F;
}
.h5ui-empty[data-empty-state] .h5ui-empty__visual > svg { display: block; width: 32px; height: 32px; margin: 0; }
.h5ui-empty[data-empty-state] .h5ui-empty__message {
  width: 100%;
  min-width: 0;
  max-width: 300px;
  margin: 0;
  color: #252529;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  overflow-wrap: anywhere;
}
.h5ui-empty[data-empty-state] .h5ui-empty__description {
  width: 100%;
  min-width: 0;
  max-width: 300px;
  margin: 8px 0 0;
  color: #71717A;
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  overflow-wrap: anywhere;
}
.h5ui-empty[data-empty-state] .h5ui-empty__action {
  box-sizing: border-box;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 44px;
  max-width: 100%;
  margin: 20px 0 0;
  padding: 10px 20px;
  border: 1px solid #050505;
  border-radius: 12px;
  background: #050505;
  color: #FFFFFF;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.h5ui-empty[data-empty-state] .h5ui-empty__action:focus-visible { outline: 2px solid #85858F; outline-offset: 3px; }
.h5ui-empty[data-empty-state].h5ui-empty--page { min-height: 320px; padding: 48px 24px; }
.h5ui-empty[data-empty-state].h5ui-empty--compact { min-height: 160px; padding: 24px 16px; }
.h5ui-empty--compact[data-empty-state] .h5ui-empty__visual { width: 48px; height: 48px; margin-bottom: 16px; border-radius: 14px; }
.h5ui-empty--compact[data-empty-state] .h5ui-empty__visual > svg { width: 28px; height: 28px; }
.h5ui-empty[data-empty-state].h5ui-empty--inline { min-height: 0; padding: 16px 8px; border: 0; border-radius: 0; background: transparent; }
.h5ui-empty--inline[data-empty-state] .h5ui-empty__message { font-size: 14px; line-height: 22px; }
.h5ui-empty--inline[data-empty-state] .h5ui-empty__description { font-size: 12px; line-height: 20px; }
.h5ui-empty[data-empty-state].h5ui-empty--embedded { border: 0; background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .h5ui-empty[data-empty-state] .h5ui-empty__action:hover { background: #29292D; border-color: #29292D; }
}

.h5ui-file-input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 700px) {
  .h5ui-sheet {
    width: min(100%, 560px);
    margin: 0 auto;
    border-radius: 20px 20px 0 0;
  }

  .h5ui-datepicker {
    width: min(100%, 560px);
    margin: 0 auto;
  }
}
