/* Price management is a normal admin content panel, without a modal backdrop. */
.admin-price-panel { min-width: 0; }
.admin-settings-panel { min-width: 0; }
.admin-settings-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: calc(100dvh - 130px);
  overflow: hidden;
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  background: #fff;
}
.admin-maintenance-card { min-height: 0; padding: 24px; }
.admin-settings-card > div > nav { overflow-x: auto; }
@media (min-width: 1280px) {
  body[data-page="admin"] #top-nav-bar > .admin-supplier-menu {
    margin-top: auto;
    flex-shrink: 0;
    border-top: 1px solid var(--ux-line);
    border-radius: 0;
  }
}
.admin-price-frame {
  display: block;
  width: 100%;
  height: calc(100dvh - 130px);
  min-height: 560px;
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  background: #fff;
}
body[data-page="admin"] .dropdown-item.active {
  color: var(--ux-brand);
  background: var(--ux-brand-soft);
}
/* Keep the editors' own authenticated loading and save handlers. */
html[data-admin-embedded="1"] body { background: #fff !important; }
html[data-admin-embedded="1"] #main-header,
html[data-admin-embedded="1"] #ux-scroll-top { display: none !important; }
html[data-admin-embedded="1"] body > .container {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}
html[data-admin-embedded="1"] #page-content {
  max-width: none;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 24px;
}
html[data-admin-embedded="1"] body > .max-w-6xl { max-width: none; padding: 24px; }
html[data-admin-embedded="1"] .price-toolbar { flex-wrap: wrap; align-items: flex-start; }
html[data-admin-embedded="1"] .price-toolbar > div { min-width: 0; }
html[data-admin-embedded="1"] .price-toolbar > div:last-child { flex-wrap: wrap; }
html[data-admin-embedded="1"] #workGuideModal {
  position: static;
  padding: 0;
  background: #fff;
  backdrop-filter: none;
}
html[data-admin-embedded="1"] #workGuideModal > div {
  width: 100%;
  max-width: none;
  height: 100dvh;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}
html[data-admin-embedded="1"] #contentArea { position: static; min-width: 0; }
html[data-admin-embedded="1"] #closeGuideMobile,
html[data-admin-embedded="1"] #closeGuideDesktop { display: none; }
@media (max-width: 767px) {
  .admin-price-frame { height: calc(100dvh - 130px); min-height: 480px; }
  html[data-admin-embedded="1"] #sidebarArea,
  html[data-admin-embedded="1"] #contentArea { height: auto; min-height: 0; flex: 1; }
  html[data-admin-embedded="1"] #page-content,
  html[data-admin-embedded="1"] body > .max-w-6xl { padding: 16px; }
  html[data-admin-embedded="1"] #page-content > .flex.border-b { overflow-x: auto; gap: 8px; }
  html[data-admin-embedded="1"] #snowBaseWrap > .grid {
    grid-template-columns: 12px minmax(68px, 1fr) 12px minmax(70px, 1.5fr) 26px;
    gap: 6px;
  }
  html[data-admin-embedded="1"] #snowBaseWrap > .grid > * { grid-column: auto; }
  html[data-admin-embedded="1"] #snowBaseWrap input { min-width: 0; padding-inline: 6px; }
}

/* Guide editor uses the main administrator document and its established login. */
.admin-guide-panel { min-width: 0; }
.admin-guide-panel .admin-guide-layout { min-width: 0; background: #fff; }
.admin-guide-panel .admin-guide-shell {
  width: 100%;
  height: calc(100dvh - 130px);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #e1e8e3;
  border-radius: 14px;
  background: #fff;
}
.admin-guide-panel #contentArea { position: static; min-width: 0; }
.admin-guide-panel #closeGuideMobile,
.admin-guide-panel #closeGuideDesktop { display: none; }
.admin-guide-panel .sidebar-scroll { scrollbar-width: none; }
.admin-guide-panel .ql-view-content { overflow-wrap: anywhere; }
.admin-guide-panel .ql-view-content h1 { font-size: 1.6em; font-weight: 800; color: #1e293b; margin: 0.8em 0 0.5em; line-height: 1.3; }
.admin-guide-panel .ql-view-content h2 { font-size: 1.3em; font-weight: 700; color: #334155; margin: 1em 0 0.5em; border-left: 4px solid #16a34a; padding-left: 10px; }
.admin-guide-panel .ql-view-content p { margin-bottom: 0.8em; line-height: 1.7; color: #475569; word-break: keep-all; }
.admin-guide-panel .ql-view-content ul, .admin-guide-panel .ql-view-content ol { padding-left: 1.4em; margin-bottom: 1em; color: #475569; }
.admin-guide-panel .ql-view-content ul { list-style-type: disc; }
.admin-guide-panel .ql-view-content ol { list-style-type: decimal; }
.admin-guide-panel .ql-view-content img { border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); max-width: 100%; margin: 1rem 0; }
.admin-guide-panel .ql-view-content blockquote { border-left: 3px solid #cbd5e1; background: #f8fafc; padding: 0.8rem; margin: 1rem 0; color: #64748b; font-size: 0.95em; }
.admin-guide-panel .ql-view-content strong { color: #0f172a; font-weight: 700; }
.admin-guide-panel .ql-view-content img,
.admin-guide-panel #wg-content-editor img { max-width: 100%; }
.admin-guide-panel #wg-content-editor:empty::before { content: attr(data-placeholder); color: #cbd5e1; }
.admin-guide-panel :is(.ql-view-content, #wg-content-editor) ul { list-style: disc; padding-left: 1.25rem; }
.admin-guide-panel :is(.ql-view-content, #wg-content-editor) ol { list-style: decimal; padding-left: 1.25rem; }
html[data-admin-embedded="1"] body[data-page^="admin-"] > header {
  background: #fff;
  color: #172c20;
  border-color: #e1e8e3;
}
html[data-admin-embedded="1"] body[data-page^="admin-"] > header a[href="admin.html"] { display: none; }
html[data-admin-embedded="1"] body[data-page^="admin-"] > header > div { max-width: none; flex-wrap: wrap; }
html[data-admin-embedded="1"] body[data-page^="admin-"] > main { max-width: none; }
@media (max-width: 767px) {
  .admin-guide-panel .admin-guide-shell { height: calc(100dvh - 160px); min-height: 480px; }
  .admin-guide-panel #sidebarArea,
  .admin-guide-panel #contentArea { height: auto; min-height: 0; flex: 1; }
}
