/* Unified readability and full-screen workspaces for merchant and platform consoles. */

body.app-merchant,
body.app-platform {
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

body.app-merchant .main,
body.app-platform .main {
  width: 100%;
  max-width: none;
  padding: 24px clamp(20px, 2vw, 34px) 40px;
}

body.app-merchant .view-root,
body.app-platform .view-root {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

body.app-merchant .app-shell {
  grid-template-columns: 240px minmax(0, 1fr);
}

body.app-platform .workspace {
  grid-template-columns: 244px minmax(0, 1fr);
}

body.app-merchant .sidebar,
body.app-platform .sidebar {
  padding-right: 14px;
  padding-left: 14px;
}

body.app-merchant .page-heading,
body.app-platform .page-heading {
  margin-bottom: 22px;
}

body.app-merchant .page-heading h1,
body.app-platform .page-heading h1 {
  font-size: 32px;
}

body.app-merchant .page-heading p,
body.app-platform .page-heading p {
  max-width: 980px;
  font-size: 15px;
}

body.app-merchant .sidebar nav button,
body.app-platform .sidebar nav button,
body.app-platform .nav-item {
  min-height: 43px;
  font-size: 15px;
}

body.app-merchant .sidebar-store span,
body.app-merchant .sidebar-store small,
body.app-merchant .sidebar-foot small,
body.app-platform .sidebar-context span,
body.app-platform .sidebar-context small,
body.app-platform .sidebar-foot small {
  font-size: 13px;
}

body.app-merchant .panel-head h2,
body.app-merchant .panel h2,
body.app-platform .panel-head h2,
body.app-platform .panel h2,
body.app-platform .section-head h2 {
  font-size: 19px;
}

body.app-merchant p,
body.app-merchant li,
body.app-merchant dd,
body.app-merchant td,
body.app-platform p,
body.app-platform li,
body.app-platform dd,
body.app-platform td {
  font-size: 15px;
  line-height: 1.6;
}

body.app-merchant small,
body.app-platform small,
body.app-merchant .muted,
body.app-platform .muted,
body.app-merchant .detail-grid dt,
body.app-platform .detail-grid dt {
  font-size: 13px;
  line-height: 1.55;
}

body.app-merchant th,
body.app-platform th {
  font-size: 14px;
}

body.app-merchant td,
body.app-platform td {
  font-size: 15px;
}

body.app-merchant .form-field > span,
body.app-platform .field > span,
body.app-platform .form-field > span {
  font-size: 14px;
}

body.app-merchant input,
body.app-merchant select,
body.app-merchant textarea,
body.app-platform input,
body.app-platform select,
body.app-platform textarea {
  min-height: 42px;
  font-size: 15px;
}

body.app-merchant button,
body.app-platform button {
  font-size: 15px;
}

body.app-merchant .detail-grid,
body.app-platform .detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

body.app-merchant .table-shell,
body.app-merchant .table-shell .table-scroll,
body.app-platform .table-shell,
body.app-platform .table-shell .table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
}

body.app-merchant .table-shell .responsive-table,
body.app-platform .table-shell .responsive-table {
  width: 100%;
}

body.app-merchant .panel,
body.app-platform .panel,
body.app-platform .section-block {
  border-radius: 8px;
}

body.app-merchant .panel-head,
body.app-platform .panel-head {
  min-height: 58px;
  padding: 14px 18px;
}

body.app-merchant .panel-body,
body.app-platform .panel-body {
  padding: 18px;
}

body.app-merchant .ghost-button,
body.app-merchant .solid-button,
body.app-merchant .danger-button,
body.app-platform .button {
  min-height: 40px;
  padding: 8px 14px;
}

.gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.gate-grid > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e3e8f2;
  border-radius: 7px;
  background: #ffffff;
}

.gate-grid span {
  color: #667085;
  font-size: 13px;
}

.gate-grid strong {
  color: #1b2430;
  font-size: 16px;
}

.readiness-note {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px 14px;
  color: #475467;
  border: 1px solid #dfe6f1;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.55;
}

.modal-overlay.is-fullscreen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.58);
}

.modal.is-fullscreen {
  display: flex;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.modal.is-fullscreen .modal-head {
  min-height: 76px;
  align-items: center;
  padding: 18px 30px;
  background: #ffffff;
}

.modal.is-fullscreen .modal-head h2 {
  font-size: 24px;
}

.modal.is-fullscreen .modal-head p {
  margin-top: 3px;
  font-size: 13px;
}

.modal.is-fullscreen .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 22px 30px 36px;
  overflow: auto;
  background: #f5f7fb;
}

.modal-workspace {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  font-size: 15px;
}

.modal.is-fullscreen .modal-workspace small,
.modal.is-fullscreen .modal-workspace .muted,
.modal.is-fullscreen .modal-workspace .detail-grid dt {
  font-size: 13px;
}

.modal.is-fullscreen .modal-workspace .form-field > span,
.modal.is-fullscreen .modal-workspace .field > span {
  color: #475467;
  font-size: 14px;
  font-weight: 600;
}

#productCopyForm {
  width: min(100%, 960px);
  margin: 0 auto;
}

.modal.is-fullscreen .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  flex: 0 0 auto;
  min-height: 68px;
  align-items: center;
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e6eaf1;
  box-shadow: 0 -8px 24px rgba(31, 46, 86, 0.06);
}

.modal.is-fullscreen .order-detail-tabs {
  top: -22px;
  margin-bottom: 18px;
  padding: 10px 0;
}

.modal.is-fullscreen .order-detail-tabs button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.modal.is-fullscreen .section-block,
.modal.is-fullscreen .panel {
  margin-bottom: 18px;
}

body.app-platform .overlay-backdrop:not(.is-dialog) {
  justify-content: stretch;
}

body.app-platform .drawer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  border-radius: 0;
}

body.app-platform .drawer-head {
  min-height: 76px;
  align-items: center;
  padding: 18px 30px;
}

body.app-platform .drawer-head h2 {
  font-size: 24px;
}

body.app-platform .drawer-head p {
  font-size: 13px;
}

body.app-platform .drawer-body {
  padding: 22px 30px 36px;
  background: #f5f7fb;
}

body.app-platform .drawer-body > * {
  width: 100%;
  max-width: 1600px;
  margin-right: auto;
  margin-left: auto;
}

body.app-platform .drawer-footer {
  min-height: 68px;
  align-items: center;
  padding: 12px 30px;
  background: #ffffff;
  box-shadow: 0 -8px 24px rgba(31, 46, 86, 0.06);
}

.pe-product-editor-page .pe-breadcrumb,
.pe-product-editor-page .pe-page-head,
.pe-product-editor-page .pe-alert,
.pe-product-editor-page .pe-editor-shell,
.pe-product-editor-page .pe-footer-actions {
  max-width: 1600px;
}

.pe-product-editor-page {
  padding-right: clamp(20px, 2vw, 34px);
  padding-left: clamp(20px, 2vw, 34px);
}

.pe-product-editor-page .product-editor-section {
  min-height: 560px;
  padding: 24px;
}

.pe-product-editor-page .product-basic-panel {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  margin: 12px 0 0;
}

.pe-product-editor-page .product-basic-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pe-product-editor-page .product-basic-panel .form-field.full {
  grid-column: 1 / -1;
}

.pe-product-editor-page .product-basic-panel .form-field > span {
  font-size: 14px;
}

.pe-product-editor-page .product-basic-panel input,
.pe-product-editor-page .product-basic-panel select {
  min-height: 44px;
  font-size: 15px;
}

.pe-product-editor-page .pe-page-head h1 {
  font-size: 26px;
}

.pe-product-editor-page .pe-page-head p,
.pe-product-editor-page .pe-breadcrumb,
.pe-product-editor-page .pe-alert {
  font-size: 13px;
}

.pe-product-editor-page .product-section-heading h3 {
  font-size: 19px;
}

.pe-product-editor-page .product-section-heading p,
.pe-product-editor-page .product-section-heading > div > span {
  font-size: 13px;
}

.pe-product-editor-page,
.pe-product-editor-page .pe-editor-shell,
.pe-product-editor-page .product-editor-section,
.pe-product-editor-page .pe-huidu-sku,
.pe-product-editor-page .pe-sku-facts-table,
.pe-product-editor-page .product-rent-ladder,
.pe-product-editor-page .table-wrap {
  min-width: 0;
  max-width: 100%;
}

.pe-product-editor-page .pe-sku-facts-table,
.pe-product-editor-page .product-rent-ladder .table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

@media (max-width: 980px) {
  body.app-merchant .app-shell,
  body.app-platform .workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  body.app-merchant .sidebar,
  body.app-platform .sidebar {
    width: 100%;
    max-width: 100vw;
  }
}

@media (max-width: 900px) {
  body.app-merchant .main,
  body.app-platform .main {
    padding: 16px 14px 30px;
  }

  .modal.is-fullscreen .modal-head,
  .modal.is-fullscreen .modal-body,
  .modal.is-fullscreen .modal-actions,
  body.app-platform .drawer-head,
  body.app-platform .drawer-body,
  body.app-platform .drawer-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal.is-fullscreen .modal-head h2,
  body.app-platform .drawer-head h2 {
    font-size: 20px;
  }

  .pe-product-editor-page .product-editor-section {
    min-height: 0;
    padding: 16px 12px;
  }

  .pe-product-editor-page .product-basic-panel .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pe-product-editor-page .pe-sku-facts-head,
  .pe-product-editor-page .pe-sku-facts-row {
    min-width: 720px;
  }

  .pe-product-editor-page .product-rent-ladder table {
    min-width: 640px;
  }
}
