* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --order-layout-topbar-height: 52px;
}

html,
body {
  min-height: 100%;
  margin: 0;
  font-family: var(--yomi-table-body-text-font);
  color: var(--yomi-table-body-text);
  background: var(--yomi-page-bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.admin-module-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  min-width: 1180px;
  min-height: 100vh;
  background-color: var(--yomi-page-bg);
  background-image: var(--yomi-page-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.admin-module-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  height: calc(100vh - 14px);
  overflow-y: auto;
  padding: 24px 16px 24px 20px;
  border-radius: 0 0 18px 0;
  background-color: var(--yomi-sidebar-bg);
  background-image: var(--yomi-sidebar-bg-image);
  background-size: cover;
  background-position: center;
  border-right: 1px solid rgba(15, 23, 42, 0.09);
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.admin-module-sidebar::-webkit-scrollbar {
  width: 8px;
}

.admin-module-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.admin-module-sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: transparent;
}

.admin-module-sidebar.is-scrollbar-hot {
  scrollbar-color: rgba(17, 17, 17, 0.28) transparent;
}

.admin-module-sidebar.is-scrollbar-hot::-webkit-scrollbar-thumb,
.admin-module-sidebar::-webkit-scrollbar-thumb:hover,
.admin-module-sidebar::-webkit-scrollbar-thumb:active {
  background: rgba(17, 17, 17, 0.28);
}

.admin-module-brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.admin-module-logo {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--yomi-avatar-bg);
  background-image: var(--yomi-avatar-bg-image);
  background-size: cover;
  background-position: center;
  color: var(--yomi-avatar-text);
  font-size: var(--yomi-avatar-text-size);
  font-weight: var(--yomi-avatar-text-weight);
  font-style: var(--yomi-avatar-text-style);
}

.admin-module-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-module-brand strong {
  display: block;
  overflow: hidden;
  color: var(--yomi-sidebar-store-name-text);
  font-family: var(--yomi-sidebar-store-name-text-font);
  font-size: var(--yomi-sidebar-store-name-text-size);
  font-weight: var(--yomi-sidebar-store-name-text-weight);
  font-style: var(--yomi-sidebar-store-name-text-style);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-module-brand span {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--yomi-sidebar-store-description-text);
  font-family: var(--yomi-sidebar-store-description-text-font);
  font-size: var(--yomi-sidebar-store-description-text-size);
  font-weight: var(--yomi-sidebar-store-description-text-weight);
  font-style: var(--yomi-sidebar-store-description-text-style);
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-module-nav {
  display: grid;
  align-content: start;
  gap: 24px;
}

.admin-module-section {
  display: grid;
  gap: 8px;
  border-radius: 8px;
}

.admin-module-section-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: auto;
  margin: 0;
  padding: 0 8px;
  color: var(--yomi-menu-group-text);
  font-family: var(--yomi-menu-group-text-font);
  font-size: var(--yomi-menu-group-text-size);
  font-weight: var(--yomi-menu-group-text-weight);
  font-style: var(--yomi-menu-group-text-style);
  user-select: none;
}

.admin-module-link {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  width: calc(100% - 18px);
  min-height: 40px;
  margin-left: 18px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--yomi-menu-item-text);
  font-family: var(--yomi-menu-item-text-font);
  font-size: var(--yomi-menu-item-text-size);
  font-weight: var(--yomi-menu-item-text-weight);
  font-style: var(--yomi-menu-item-text-style);
  justify-content: flex-start;
  text-align: left;
  cursor: pointer;
}

.admin-module-link-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  place-items: center;
  color: currentColor;
}

.admin-module-link-svg {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-module-link-svg.is-mask-icon {
  background: currentColor;
}

.admin-module-link span:last-child,
.admin-module-section-title span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-module-drag {
  position: absolute;
  left: -17px;
  top: 50%;
  display: inline-grid;
  width: 14px;
  height: 18px;
  flex: 0 0 14px;
  place-items: center;
  margin-left: -4px;
  color: var(--yomi-table-sub-text);
  cursor: grab;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.16s ease, color 0.16s ease;
  z-index: 1;
}

.admin-module-drag svg,
.admin-module-drag img,
.admin-module-drag .is-mask-icon {
  width: 14px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.admin-module-drag svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-module-drag .is-mask-icon {
  background: currentColor;
  mask: var(--action-icon-mask) center / contain no-repeat;
  -webkit-mask: var(--action-icon-mask) center / contain no-repeat;
}

.admin-module-section-title .admin-module-drag {
  left: -10px;
}

.admin-module-section-title:hover .admin-module-drag,
.admin-module-link:hover .admin-module-drag,
.admin-module-section.is-dragging .admin-module-drag,
.admin-module-link.is-dragging .admin-module-drag {
  opacity: 1;
}

.admin-module-drag:active {
  cursor: grabbing;
  color: var(--yomi-menu-active-text);
}

.admin-module-section.is-dragging,
.admin-module-link.is-dragging {
  opacity: 0.45;
}

.admin-module-section.is-drop-target,
.admin-module-link.is-drop-target {
  background: var(--yomi-active-bg);
  box-shadow: inset 3px 0 0 var(--yomi-menu-active-text);
}

.admin-module-link:hover,
.admin-module-link:focus-visible {
  background-color: var(--yomi-hover-bg);
  background-image: var(--yomi-hover-bg-image);
  background-size: cover;
  background-position: center;
  outline: none;
}

.admin-module-link.is-active {
  background-color: var(--yomi-active-bg);
  background-image: var(--yomi-active-bg-image);
  background-size: cover;
  background-position: center;
  color: var(--yomi-menu-active-text);
  font-weight: var(--yomi-menu-active-text-weight);
  font-style: var(--yomi-menu-active-text-style);
}

.admin-module-link.is-active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 0;
  height: 100%;
  width: 3px;
  border-radius: 999px;
  background: var(--yomi-menu-active-text);
}

.admin-module-main {
  min-width: 0;
  min-height: 100vh;
}

.admin-module-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 32px);
  min-height: var(--order-layout-topbar-height);
  margin: 0 16px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 0 0 22px 22px;
  background:
    var(--yomi-topbar-bg-image),
    var(--yomi-topbar-bg);
  box-shadow: 0 18px 42px rgba(17, 17, 17, 0.14), 0 4px 14px rgba(17, 17, 17, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
}

.admin-module-back {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.09);
  border-radius: 10px;
  background-color: var(--yomi-form-bg);
  background-image: var(--yomi-form-bg-image);
  color: var(--yomi-secondary-button-text);
}

.admin-module-back-icon,
.admin-module-back svg {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.admin-module-back svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-module-back-icon.is-mask-icon {
  background: currentColor;
  mask: var(--action-icon-mask) center / contain no-repeat;
  -webkit-mask: var(--action-icon-mask) center / contain no-repeat;
}

.admin-module-title {
  margin: 0;
  color: var(--yomi-topbar-title-text);
  font-family: var(--yomi-topbar-title-text-font);
  font-size: var(--yomi-topbar-title-text-size);
  font-weight: var(--yomi-topbar-title-text-weight);
  font-style: var(--yomi-topbar-title-text-style);
}

.admin-module-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.admin-module-frame {
  margin: 14px;
  height: calc(100vh - var(--order-layout-topbar-height) - 28px);
  min-height: 420px;
  overflow: hidden;
  padding: 14px;
  border-radius: 18px;
  background-color: var(--yomi-order-shell-bg);
  background-image: var(--yomi-order-shell-bg-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
}

.admin-module-loading {
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--yomi-table-sub-text);
  font-family: var(--yomi-table-sub-text-font);
  font-size: var(--yomi-table-sub-text-size);
  font-weight: var(--yomi-table-sub-text-weight);
}

.yomi-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  gap: 12px;
  padding-top: 6px;
}

.yomi-pagination-size,
.yomi-pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.yomi-pagination-size,
.yomi-pagination-controls {
  min-width: 0;
  color: var(--yomi-table-sub-text);
  font-family: var(--yomi-table-sub-text-font);
  font-size: var(--yomi-table-sub-text-size);
  font-weight: var(--yomi-table-sub-text-weight);
  font-style: var(--yomi-table-sub-text-style);
}

.yomi-pagination-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--yomi-border);
  border-radius: 7px;
  color: var(--yomi-table-body-text);
  background: var(--yomi-detail-bg);
  font: inherit;
}

.yomi-pagination-button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--yomi-primary, #1677ff) 40%, var(--yomi-border, #d9dee7));
  background: var(--yomi-hover-bg, #f4f6f8);
}

.yomi-pagination-button.is-active {
  border-color: color-mix(in srgb, var(--yomi-primary, #1677ff) 35%, var(--yomi-border, #d9dee7));
  color: var(--yomi-table-body-text);
  background: color-mix(in srgb, var(--yomi-primary, #1677ff) 10%, var(--yomi-detail-bg, #fff));
}

.yomi-pagination-button:disabled {
  opacity: .38;
  cursor: default;
}

.yomi-pagination-icon {
  width: 18px;
  height: 18px;
}

.yomi-pagination-ellipsis {
  display: inline-grid;
  width: 20px;
  height: 30px;
  place-items: center;
  color: var(--yomi-table-sub-text);
  font: inherit;
}

.yomi-hover-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.yomi-hover-scroll::-webkit-scrollbar { width: 8px; }
.yomi-hover-scroll::-webkit-scrollbar-track { background: transparent; }
.yomi-hover-scroll::-webkit-scrollbar-thumb { border-radius: 999px; background: transparent; }
.yomi-hover-scroll.is-scrollbar-hot { scrollbar-color: rgba(17, 17, 17, .28) transparent; }
.yomi-hover-scroll.is-scrollbar-hot::-webkit-scrollbar-thumb,
.yomi-hover-scroll::-webkit-scrollbar-thumb:hover,
.yomi-hover-scroll::-webkit-scrollbar-thumb:active { background: rgba(17, 17, 17, .28); }
