body.admin-body,
body.admin-login-body {
  /* Core design tokens. Page styles consume these aliases instead of new ad-hoc values. */
  --admin-page-max: 1600px;
  --admin-page-gutter: clamp(16px, 2.25vw, 32px);
  --admin-primary: #c24135;
  --admin-primary-dark: #9f3028;
  --admin-primary-soft: #fff0ed;
  --admin-primary-strong: #7f2722;
  --admin-text: #1d2939;
  --admin-text-strong: #101828;
  --admin-muted: #667085;
  --admin-muted-soft: #98a2b3;
  --admin-line: #d0d5dd;
  --admin-line-soft: #eaecf0;
  --admin-soft: #f8f9fb;
  --admin-surface: #ffffff;
  --admin-surface-raised: #ffffff;
  --admin-sidebar: #f7f8fa;
  --admin-sidebar-muted: #667085;
  --admin-success: #067647;
  --admin-success-soft: #ecfdf3;
  --admin-warning: #b54708;
  --admin-warning-soft: #fffaeb;
  --admin-danger: #b42318;
  --admin-danger-soft: #fef3f2;
  --admin-info: #175cd3;
  --admin-info-soft: #eff8ff;
  --admin-radius-sm: 6px;
  --admin-radius-md: 8px;
  --admin-radius-lg: 10px;
  --admin-radius-xl: 12px;
  --admin-control-height: 40px;
  --admin-control-height-sm: 32px;
  --admin-space-1: 4px;
  --admin-space-2: 8px;
  --admin-space-3: 12px;
  --admin-space-4: 16px;
  --admin-space-5: 20px;
  --admin-space-6: 24px;
  --admin-space-8: 32px;
  --admin-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  --admin-shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04);
  --admin-shadow-overlay: 0 20px 44px rgba(16, 24, 40, 0.18);
}

body.admin-body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: #f6f7f9;
  color: var(--admin-text);
  font-family: "Barlow", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.admin-body,
body.admin-login-body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.admin-body::before {
  display: none;
}

.admin-body *,
.admin-body *::before,
.admin-body *::after,
.admin-login-body *,
.admin-login-body *::before,
.admin-login-body *::after {
  box-sizing: border-box;
}

.admin-body a,
.admin-login-body a {
  color: inherit;
  text-decoration: none;
}

.admin-body p,
.admin-body h1,
.admin-body h2,
.admin-body h3,
.admin-body h4,
.admin-body ul,
.admin-body ol {
  margin-top: 0;
}

.admin-body img,
.admin-login-body img {
  display: block;
  max-width: 100%;
}

.admin-body .btn,
.admin-login-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}

.admin-body .btn:focus-visible,
.admin-login-body .btn:focus-visible,
.admin-body .admin-icon-button:focus-visible,
.admin-body .admin-sidebar-collapse:focus-visible,
.admin-body .admin-sidebar-link:focus-visible,
.admin-body .admin-sidebar-sublink:focus-visible,
.admin-body .admin-ui-action:focus-visible,
.admin-body .admin-ui-more summary:focus-visible,
.admin-body .admin-ui-page-link:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.22);
  outline-offset: 3px;
}

.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}

.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
}

.admin-body .btn-outline,
.admin-login-body .btn-outline {
  background: #fff;
  border-color: var(--admin-line);
  color: var(--admin-text);
  box-shadow: 0 10px 22px rgba(16, 36, 79, 0.06);
}

.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: rgba(220, 38, 38, 0.32);
  color: var(--admin-primary-dark);
  background: #fff;
}

.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}

.admin-body .btn-danger:hover,
.admin-login-body .btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

.admin-body .btn:disabled,
.admin-body .btn[disabled],
.admin-login-body .btn:disabled,
.admin-login-body .btn[disabled] {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  transform: none;
}

.admin-body input,
.admin-body select,
.admin-body textarea {
  max-width: 100%;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  outline: 0;
}

.admin-body textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.65;
}

.admin-body label {
  min-width: 0;
}

.admin-body input,
.admin-body select {
  min-height: 42px;
  padding: 0 12px;
}

.admin-body input[type="checkbox"],
.admin-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  padding: 0;
  border-radius: 4px;
  vertical-align: middle;
  accent-color: var(--admin-primary);
}

.admin-body input[type="radio"] {
  border-radius: 50%;
}

.admin-body textarea {
  padding: 12px;
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

.admin-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  overflow: hidden;
  transition: grid-template-columns .18s ease;
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 86px 1fr;
}

.admin-sidebar {
  height: 100vh;
  background: var(--admin-sidebar);
  border-right: 1px solid var(--admin-line-soft);
  color: var(--admin-text);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 0;
  gap: 20px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px 0 4px;
}

.admin-brand-mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
}

.admin-brand-mark img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.admin-brand-copy {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar {
  padding-inline: 16px;
}

.admin-shell.is-sidebar-collapsed .admin-brand {
  justify-content: center;
}

.admin-shell.is-sidebar-collapsed .admin-brand-mark {
  flex-basis: 42px;
  width: 42px;
  height: 42px;
}

.admin-shell.is-sidebar-collapsed .admin-brand-copy,
.admin-shell.is-sidebar-collapsed .admin-sidebar-title,
.admin-shell.is-sidebar-collapsed .admin-nav-text,
.admin-shell.is-sidebar-collapsed .admin-subnav-caret,
.admin-shell.is-sidebar-collapsed .admin-sidebar-subnav,
.admin-shell.is-sidebar-collapsed .admin-sidebar-foot-label,
.admin-shell.is-sidebar-collapsed .admin-sidebar-foot .btn-outline {
  display: none;
}

.admin-brand-kicker {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.admin-brand-kicker::before {
  content: "/";
  margin-right: 6px;
  color: var(--admin-muted-soft);
}

.admin-brand strong {
  font-family: "Barlow", "Noto Sans SC", Arial, sans-serif;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--admin-text-strong);
  letter-spacing: 0.01em;
}

.admin-sidebar-collapse {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: var(--admin-surface);
  color: var(--admin-muted);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  box-shadow: var(--admin-shadow-soft);
}

.admin-sidebar-collapse:hover {
  background: var(--admin-soft);
  border-color: #b8c1ce;
  color: var(--admin-text-strong);
}

.admin-shell.is-sidebar-collapsed .admin-sidebar-collapse {
  transform: rotate(180deg);
}

.admin-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.admin-sidebar-section {
  display: grid;
  gap: 6px;
}

.admin-sidebar-title {
  display: block;
  padding: 0 2px;
  color: var(--admin-muted-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-sidebar-group {
  display: grid;
  gap: 4px;
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  color: #475467;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.25;
  transition: background .16s ease, color .16s ease;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar-link {
  justify-content: center;
  padding: 10px 0;
}

.admin-sidebar-parent {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.admin-nav-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 900;
  transition: color .16s ease;
}

.admin-nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-subnav-caret {
  margin-left: auto;
  color: inherit;
  font-size: 14px;
  transition: transform .18s ease;
}

.admin-sidebar-group.has-subnav.is-expanded .admin-subnav-caret {
  transform: rotate(180deg);
}

.admin-sidebar-link:hover {
  background: #eef2f6;
  color: var(--admin-text-strong);
}

.admin-sidebar-link:hover .admin-nav-icon,
.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link .admin-nav-icon {
  color: var(--admin-text-strong);
}

.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link {
  background: transparent;
  color: var(--admin-text-strong);
}

.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link:hover {
  background: #eef2f6;
  color: var(--admin-text-strong);
}

.admin-sidebar-link.is-active,
.admin-sidebar-link.is-active:hover {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
  box-shadow: inset 3px 0 0 var(--admin-primary);
}

.admin-sidebar-link.is-active .admin-nav-icon {
  color: var(--admin-primary);
}

.admin-sidebar-subnav {
  display: grid;
  gap: 3px;
  padding: 2px 0 2px 22px;
}

.admin-sidebar-group.has-subnav:not(.is-expanded) .admin-sidebar-subnav {
  display: none;
}

.admin-sidebar-sublink {
  display: block;
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--admin-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  transition: background .16s ease, color .16s ease;
}

.admin-sidebar-sublink:hover {
  background: #eef2f6;
  color: var(--admin-text-strong);
}

.admin-sidebar-sublink.is-active,
.admin-sidebar-sublink.is-active:hover {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
  box-shadow: inset 3px 0 0 var(--admin-primary);
}

.admin-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 12px;
  color: var(--admin-muted);
  font-size: 14px;
}

.admin-sidebar-foot .btn-outline {
  width: 100%;
  min-height: 40px;
  border-color: var(--admin-line);
  background: var(--admin-surface);
  color: var(--admin-text);
  box-shadow: none;
}

.admin-sidebar-foot-label {
  overflow-wrap: break-word;
  line-height: 1.5;
}

.admin-main {
  height: 100vh;
  padding: 28px var(--admin-page-gutter) 40px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.admin-topbar {
  width: min(100%, var(--admin-page-max));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto 24px;
  padding: 10px 0;
}

.admin-topbar-actions {
  align-items: center;
}

.admin-icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  color: var(--admin-text);
  cursor: pointer;
  box-shadow: var(--admin-shadow-soft);
}

.admin-icon-button:hover {
  border-color: rgba(220, 38, 38, 0.28);
  color: var(--admin-primary-dark);
  transform: translateY(-1px);
}

.admin-user-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--admin-text);
}

.admin-user-avatar {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e7f5f3;
  color: var(--admin-primary-dark);
  font-size: 13px;
  font-weight: 900;
}

.admin-user-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 14px;
  white-space: nowrap;
}

.admin-user-label,
.admin-user-role {
  color: var(--admin-text);
  font-weight: 900;
}

.admin-topbar h1 {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1.1;
}

.admin-route-toolbar,
.admin-section-head,
.admin-inquiry-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  min-width: 0;
}

.admin-flash,
.admin-notice {
  margin-bottom: 16px;
}

.admin-flash {
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.admin-flash-success {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-flash-error {
  background: #fff0f0;
  color: #b43a3a;
}

.admin-flash-warning {
  background: #fff7e6;
  color: #925c00;
}

.admin-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 16px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 14px;
  background: #10244f;
  color: #fff;
  box-shadow: 0 18px 44px rgba(16, 36, 79, 0.24);
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .16s ease, transform .16s ease;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-toast[hidden] {
  display: none;
}

.admin-route-toolbar h2,
.admin-section-head h2 {
  margin: 10px 0 0;
  color: var(--admin-text);
  font-size: 30px;
  line-height: 1.15;
}

.admin-route-toolbar p,
.admin-section-head p {
  margin: 12px 0 0;
  color: var(--admin-muted);
  font-size: 16px;
  line-height: 1.65;
}

.admin-body .section-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--admin-primary-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.admin-content-card,
.admin-toolbar .result-card,
.admin-panel,
.admin-surface-card,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-table-wrap {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-card);
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.admin-panel-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-customer-section-head,
.admin-modal-header,
.admin-customer-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.admin-panel-head h2,
.admin-blogs-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-customer-section-head h2,
.admin-modal-header h2,
.admin-customer-modal-header h2 {
  margin: 8px 0 0;
  color: var(--admin-text);
  font-size: 26px;
  line-height: 1.18;
}

.admin-panel-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-customer-section-head p,
.admin-modal-header p,
.admin-customer-modal-header p {
  margin: 8px 0 0;
  color: var(--admin-muted);
  line-height: 1.6;
}

.admin-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: var(--admin-shadow-soft);
}

.admin-filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-filter-bar label span {
  line-height: 1;
}

.admin-filter-bar input,
.admin-filter-bar select {
  min-width: 180px;
}

.admin-inquiry-filter-keyword {
  flex: 0 1 360px;
}

.admin-inquiry-filter-keyword input {
  width: 100%;
}

.admin-inquiry-filter-actions,
.admin-quote-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-ui-list-container {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-section {
  width: min(100%, var(--admin-page-max));
  margin: 0 auto;
  display: grid;
  gap: 24px;
  min-width: 0;
}

.admin-tabs {
  display: flex;
  gap: 12px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
}

.admin-inquiry-main,
.admin-products-main,
.admin-blogs-main,
.admin-customers-main,
.admin-customer-layout,
.admin-customer-library-main,
.admin-single-flow,
.admin-quote-form,
.admin-landing-designer {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.admin-products-main {
  display: grid;
  gap: 24px;
}

.admin-single-flow {
  display: grid;
  gap: 24px;
}

.admin-toolbar .result-card {
  padding: 24px;
}

.admin-product-layout,
.admin-blog-layout,
.admin-images-layout {
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  gap: 24px;
  align-items: start;
}

.admin-product-form-wrap,
.admin-product-list-wrap {
  padding: 24px;
}

.admin-blog-form,
.admin-product-form,
.admin-quote-form,
.admin-blog-ai-panel,
.admin-blog-editor,
.admin-settings-form,
.admin-landing-job-form {
  display: grid;
  gap: 18px;
}

.admin-blog-form label,
.admin-product-form label,
.admin-quote-form label,
.admin-blog-ai-panel label,
.admin-blog-editor label,
.admin-settings-form label,
.admin-landing-job-form label {
  display: grid;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-blog-form label > span,
.admin-product-form label > span,
.admin-blog-ai-panel label > span,
.admin-blog-editor label > span,
.admin-settings-form label > span,
.admin-landing-job-form label > span {
  line-height: 1.2;
}

.admin-subnav-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 8px;
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: #fff;
}

.admin-subnav-tabs a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--admin-muted);
  font-weight: 800;
  text-decoration: none;
}

.admin-subnav-tabs a.is-active,
.admin-subnav-tabs a:hover {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
}

.admin-blog-layout-single {
  grid-template-columns: minmax(0, 1fr);
}

.admin-blog-manage-wrap {
  padding: 24px;
}

.admin-inline-form {
  margin-top: 12px;
}

.admin-structured-card,
.admin-structured-preview-card,
.admin-product-supplement-card {
  display: grid;
  gap: 18px;
}

.admin-structured-textarea {
  min-height: 360px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  line-height: 1.7;
}

.admin-product-create-card {
  gap: 14px;
}

.admin-product-form.admin-product-create-form {
  gap: 28px;
}

.admin-product-create-form .admin-structured-textarea {
  min-height: 240px;
}

.admin-product-field-description {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.admin-product-source-error {
  margin: -2px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.admin-product-create-form .admin-structured-textarea[aria-invalid="true"] {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, 0.1);
}

.admin-structured-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-structured-preview-item {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #dce5f4;
  background: #f8faff;
  display: grid;
  gap: 6px;
}

.admin-structured-preview-item span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #607094;
}

.admin-structured-preview-item strong {
  color: #16233f;
  line-height: 1.7;
  font-weight: 700;
}

.admin-blog-form textarea,
.admin-product-form textarea,
.admin-quote-form textarea,
.admin-blog-ai-panel textarea,
.admin-blog-editor textarea,
.admin-settings-form textarea,
.admin-blog-form input,
.admin-product-form input,
.admin-quote-form input,
.admin-blog-ai-panel input,
.admin-blog-editor input,
.admin-settings-form input,
.admin-blog-form select,
.admin-product-form select,
.admin-quote-form select,
.admin-blog-ai-panel select,
.admin-blog-editor select,
.admin-settings-form select {
  width: 100%;
}

.admin-field-combo {
  display: grid;
  gap: 8px;
}

.admin-inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-inline-action {
  min-height: 44px;
  padding: 0 14px;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-form-wide {
  grid-column: 1 / -1;
}

.admin-field-help,
.admin-help-text,
.admin-muted-inline {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-actions,
.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-actions {
  align-items: center;
}

.admin-help-text { margin: -4px 0 0; }

.admin-product-supplement-card .admin-help-text {
  margin-top: -2px;
}

.admin-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #f7f9fe;
  border: 1px solid #dce5f4;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--admin-shadow-soft);
}

.admin-filters input,
.admin-filters select {
  min-width: 160px;
  min-height: 42px;
}

.admin-product-filter-grid input[type="search"],
.admin-blog-filters input[type="text"] {
  flex: 0 1 360px;
}

.admin-list-toolbar-copy {
  display: grid;
  gap: 4px;
}

.admin-list-toolbar-copy strong {
  font-size: 20px;
}

.admin-list-toolbar-copy span {
  color: #607094;
  line-height: 1.5;
}

.admin-list-toolbar-actions {
  display: flex;
  gap: 10px;
}

.admin-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-preview-toolbar {
  margin-bottom: 14px;
}

.admin-preview-toolbar .btn.is-current {
  background: #10244f;
  border-color: #10244f;
  color: #fff;
}

.admin-empty-note {
  padding: 18px 20px;
  border-radius: 18px;
  background: #f7f9fe;
  border: 1px dashed #cdd9f0;
  color: #607094;
}

.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.admin-image-card,
.admin-blog-image-card {
  border: 1px solid #d8e1f2;
  border-radius: 18px;
  padding: 14px;
  background: #f7f9fe;
}

.admin-image-card.is-cover {
  border-color: #6366f1;
}

.admin-image-cover-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 600;
}

.admin-image-cover-badge[hidden] {
  display: none;
}

.admin-site-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.admin-site-media-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  padding: 18px;
  display: grid;
  gap: 14px;
  box-shadow: var(--admin-shadow-card);
}

.admin-site-media-meta {
  display: grid;
  gap: 4px;
}

.admin-site-media-meta strong {
  font-size: 18px;
}

.admin-site-media-meta span {
  color: #607094;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-image-preview,
.admin-blog-image-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  margin-bottom: 12px;
}

.admin-table-wrap {
  overflow: auto;
  padding: 0;
}

.admin-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7ecf7;
  vertical-align: top;
}

.admin-table th {
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #607094;
  background: #f3f6fb;
}

.admin-table td {
  color: #33415f;
  line-height: 1.58;
}

.admin-table tbody tr {
  transition: background .16s ease;
}

.admin-table tbody tr:hover {
  background: #fbfdfc;
}

.admin-table-compact th,
.admin-table-compact td {
  padding: 16px 18px;
}

.admin-check-col,
.admin-checkbox-cell {
  width: 48px;
  text-align: center;
}

.admin-ui-actions-col,
.admin-ui-actions-cell {
  width: 126px;
  text-align: right;
}

.admin-table-message {
  display: -webkit-box;
  overflow: hidden;
  color: #607094;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.admin-inquiry-date {
  display: inline-block;
  max-width: 170px;
  color: #607094;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.admin-table-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.admin-product-table,
.admin-blog-table {
  min-width: 1320px;
}

.admin-product-cell,
.admin-blog-title-cell {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.admin-blog-title-cell.is-no-thumb {
  grid-template-columns: minmax(0, 1fr);
}

.admin-product-thumb,
.admin-blog-cover-preview {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: #eef3fb center / cover no-repeat;
  border: 1px solid #e1e8f3;
}

.admin-product-image-trigger {
  padding: 0;
  overflow: hidden;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.admin-product-image-trigger:hover {
  border-color: rgba(220, 38, 38, 0.52);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.admin-product-image-trigger:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.28);
  outline-offset: 3px;
}

.admin-product-image-trigger img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(8, 18, 36, .78);
}

.admin-image-preview-overlay[hidden] {
  display: none;
}

.admin-image-preview-dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1100px, 92vw);
  height: min(820px, 88vh);
  max-width: 92vw;
  max-height: 88vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none !important;
  box-shadow: none;
}

.admin-image-preview-figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
}

.admin-image-preview-figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: zoom-in;
  transform: translate(0, 0) scale(1);
  transform-origin: center center;
  transition: transform .18s ease;
  touch-action: none;
  user-select: none;
}

.admin-image-preview-figure img.is-zoomed {
  cursor: grab;
}

.admin-image-preview-figure img.is-dragging {
  cursor: grabbing;
  transition: none;
}

.admin-image-preview-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.admin-image-preview-close:hover,
.admin-image-preview-close:focus-visible {
  background: rgba(255, 255, 255, .24);
}
.admin-image-preview-cancel {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border-color: rgba(255, 255, 255, .4);
  background: rgba(255, 255, 255, .14);
  color: #fff;
}
.admin-image-preview-cancel:hover {
  background: rgba(255, 255, 255, .26);
  color: #fff;
}

.admin-product-title-block,
.admin-blog-title-cell > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-product-clamp,
.admin-product-clamp-2,
.admin-product-clamp-3,
.admin-blog-title-cell small,
.admin-blog-title-cell span {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: break-word;
  -webkit-box-orient: vertical;
}

.admin-product-clamp,
.admin-product-clamp-2,
.admin-blog-title-cell span {
  -webkit-line-clamp: 2;
}

.admin-product-clamp-3,
.admin-blog-title-cell small {
  -webkit-line-clamp: 3;
}

.admin-product-muted,
.admin-blog-title-cell span,
.admin-blog-title-cell small {
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-product-chip-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3fb;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-product-status-badge,
.admin-blog-status-published {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-blog-status-draft {
  background: #fff7e6;
  color: #925c00;
}

.admin-blog-status-archived,
.admin-blog-status-offline {
  background: #eef3fb;
  color: var(--admin-muted);
}

.admin-surface-card,
.admin-customer-list-card,
.admin-library-card,
.admin-library-table-card {
  overflow: hidden;
}

.admin-product-page-panel {
  min-width: 0;
}

.admin-product-page-title,
.admin-customer-head-copy,
.admin-customer-modal-head-copy,
.admin-landing-toolbar-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-product-image-field,
.admin-product-image-upload,
.admin-product-image-list {
  display: grid;
  gap: 10px;
}

.admin-product-image-dropzone {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 18px;
  border: 1px dashed #b9c7dc;
  border-radius: var(--admin-radius-md);
  background: #f8fbff;
  color: var(--admin-muted);
  text-align: center;
  cursor: pointer;
}

.admin-product-image-dropzone:hover {
  border-color: rgba(220, 38, 38, 0.38);
  background: #f4fbf9;
}

.admin-product-image-dropzone strong {
  color: var(--admin-text);
}

.admin-product-image-feedback {
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-product-image-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.admin-product-image-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-product-preview-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.admin-product-preview-image {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  background: #eef3fb center / cover no-repeat;
  border: 1px solid #e1e8f3;
}

.admin-row-remove {
  justify-self: start;
}

.admin-check-danger {
  color: #b91c1c;
}

.admin-btn-danger {
  color: #b91c1c;
  border-color: #f3b4b4;
}

.admin-btn-danger:hover {
  background: #fef2f2;
}

.admin-password-field {
  position: relative;
}

.admin-password-input {
  position: relative;
  display: block;
}

.admin-password-input > input {
  padding-right: 72px;
}

.admin-password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-width: 52px;
  padding: 4px 8px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--admin-primary-dark);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
}

.admin-password-toggle:hover {
  background: rgba(220, 38, 38, 0.08);
}

.admin-password-toggle:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 1px;
}

.admin-product-filters {
  margin-bottom: 18px;
}

.admin-inquiry-actions,
.admin-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-bulk-form {
  display: grid;
  gap: 14px;
}

.admin-bulk-toolbar {
  padding: 16px 18px;
  border: 1px solid #dce5f4;
  border-radius: 18px;
  background: #f7f9fe;
}

.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 6px 6px 0 0;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.admin-inquiry-tag-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-inquiry-tag {
  margin: 0;
  background: #eef3fb;
  color: #24467a;
}

.admin-inquiry-tag.is-source {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-inquiry-tag.is-normal,
.admin-inquiry-tag.is-has-file {
  background: #e8f6ed;
  color: #166534;
}

.admin-inquiry-tag.is-invalid {
  background: #fdecec;
  color: #9f1239;
}

.admin-inquiry-tag.is-muted {
  background: #f1f5f9;
  color: #64748b;
}

.admin-status-badge.is-normal {
  background: #e8f6ed;
  color: #166534;
}

.admin-status-badge.is-spam {
  background: #fdecec;
  color: #9f1239;
}

.admin-risk-badge {
  background: #eef3fb;
  color: #24467a;
}

.admin-inquiry-products {
  display: grid;
  gap: 10px;
}

.admin-inquiry-product {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #f7f9fe;
  border: 1px solid #e2e9f6;
}

.admin-inquiry-product img {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef3fb;
}

.admin-inquiry-product span,
.admin-inquiry-meta,
.admin-muted-text,
.admin-long-text {
  display: block;
  color: #5f6f93;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: break-word;
  word-break: normal;
}

.admin-long-text {
  max-width: 360px;
  color: #35486d;
}

.admin-inquiry-table th,
.admin-inquiry-table td {
  min-width: 120px;
  overflow-wrap: break-word;
  word-break: normal;
}

.admin-inquiry-table th:first-child,
.admin-inquiry-table td:first-child {
  min-width: 42px;
}

.admin-inquiry-list-table th:nth-child(2),
.admin-inquiry-list-table td:nth-child(2) {
  width: 160px;
}

.admin-inquiry-list-table {
  table-layout: auto;
}

.admin-inquiry-list-table th:nth-child(3),
.admin-inquiry-list-table td:nth-child(3) {
  width: 150px;
}

.admin-inquiry-list-table th:nth-child(4),
.admin-inquiry-list-table td:nth-child(4) {
  width: 150px;
}

.admin-inquiry-list-table th:nth-child(6),
.admin-inquiry-list-table td:nth-child(6) {
  width: 78px;
}

.admin-inquiry-list-table th:nth-child(7),
.admin-inquiry-list-table td:nth-child(7) {
  width: 190px;
}

.admin-inquiry-row {
  cursor: pointer;
}

.admin-ui-list-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-ui-action,
.admin-ui-more-item {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.admin-ui-action,
.admin-ui-more summary,
.admin-ui-page-link,
.admin-ui-more-item {
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.admin-ui-action:hover,
.admin-ui-more summary:hover,
.admin-ui-page-link:not(.is-disabled):hover {
  transform: translateY(-1px);
}

.admin-ui-action-primary {
  border-color: rgba(220, 38, 38, 0.22);
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
}

.admin-ui-action-secondary:hover,
.admin-ui-action-primary:hover,
.admin-ui-more-item:hover {
  border-color: rgba(220, 38, 38, 0.32);
  background: #fff7f7;
}

.admin-ui-more {
  position: relative;
}

.admin-product-table .admin-ui-list-actions {
  position: relative;
  z-index: 1;
}

.admin-ui-more summary {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: var(--admin-muted);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.admin-ui-more-trigger {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: var(--admin-muted);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.admin-ui-more summary::-webkit-details-marker {
  display: none;
}

.admin-ui-more-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 2000;
  min-width: 132px;
  display: grid;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(16, 36, 79, 0.14);
}

.admin-ui-more:not([open]) .admin-ui-more-menu {
  display: none;
}

.admin-ui-more.is-open-up .admin-ui-more-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

.admin-ui-more-menu.is-floating {
  position: fixed;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 3000;
}

.admin-ui-more-item {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  border-color: transparent;
  box-shadow: none;
}

.admin-ui-more-item.is-danger {
  color: #b91c1c;
}

.admin-ui-more-divider {
  display: block;
  height: 1px;
  margin: 4px 0;
  background: #edf1f7;
}

.admin-ui-more form,
.admin-ui-more-menu form {
  margin: 0;
}

.admin-ui-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--admin-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
}

.admin-ui-pagination-summary {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 14px;
}

.admin-ui-pagination-summary strong {
  color: var(--admin-text);
}

.admin-ui-pagination-summary span {
  color: #8a99b5;
}

.admin-ui-page-controls,
.admin-ui-page-size {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-ui-page-link,
.admin-ui-page-ellipsis {
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
  background: #fff;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.admin-ui-page-link.is-active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.admin-ui-page-link.is-disabled,
.admin-ui-page-ellipsis {
  opacity: 0.56;
  cursor: not-allowed;
}

.admin-ui-page-size select {
  min-width: 92px;
  min-height: 34px;
  border-radius: 10px;
}

.admin-import-toolbar,
.admin-import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-import-summary {
  margin-bottom: 18px;
}

.admin-import-summary .result-card {
  min-width: 160px;
  padding: 18px 20px;
}

.admin-import-summary .result-card h3 {
  margin: 0 0 6px;
}

.admin-import-summary .result-card p {
  margin: 0;
  font-size: 30px;
  font-family: "Rajdhani", Arial, sans-serif;
}

.admin-quote-layout,
.admin-quote-workflow {
  display: grid;
  gap: 24px;
  min-width: 0;
}

.admin-quote-page-intro,
.admin-quote-panel-head,
.admin-quote-hero,
.admin-quote-form-panel,
.admin-quote-list-card,
.admin-quote-filter-panel,
.admin-quote-log-panel,
.admin-quote-input-card {
  min-width: 0;
}

.admin-quote-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--admin-shadow-soft);
}

.admin-quote-history-tabs a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--admin-muted);
  font-weight: 800;
}

.admin-quote-history-tabs a.is-active,
.admin-quote-history-tabs a:hover {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
}

.admin-quote-input-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e3eaf4;
  border-radius: var(--admin-radius-md);
  background: #f9fbff;
}

.admin-quote-input-section h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 18px;
}

.admin-quote-filter-grid,
.admin-quote-input-grid,
.admin-blog-ai-grid,
.admin-blog-status-grid,
.admin-customer-filter-grid,
.admin-settings-permissions-grid,
.admin-settings-users {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  min-width: 0;
}

.admin-quote-history-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-quote-form-actions {
  justify-content: flex-end;
}

.admin-quote-quality-strip,
.admin-blog-status-grid {
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--admin-shadow-soft);
}

.admin-quote-quality-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-quote-history-primary {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-blog-editor {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  align-items: start;
}

.admin-blog-editor-side {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

.admin-blog-head-actions,
.admin-product-page-actions,
.admin-landing-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.admin-blog-guardrails,
.admin-blog-qa-box,
.admin-blog-publish-bar {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #dcebe8;
  border-radius: var(--admin-radius-md);
  background: #f3fbf9;
  color: var(--admin-muted);
  line-height: 1.55;
}

.admin-blog-guardrails strong,
.admin-blog-qa-box strong,
.admin-blog-side-panel h3 {
  margin: 0;
  color: var(--admin-text);
}

.admin-blog-content-input {
  min-height: 480px;
}

.admin-blog-cover-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  margin-bottom: 10px;
}

.admin-blog-status-grid > div,
.admin-stat-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e3eaf4;
  border-radius: 16px;
  background: #fff;
}

.admin-blog-status-grid span,
.admin-stat-card span {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-blog-status-grid strong,
.admin-stat-card strong {
  color: var(--admin-text);
  font-family: "Rajdhani", "Barlow", Arial, sans-serif;
  font-size: 30px;
  line-height: 1;
}

.admin-import-errors {
  display: grid;
  gap: 6px;
}

.admin-import-errors span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff0f0;
  color: #b43a3a;
  font-size: 13px;
}

.admin-import-failed {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff6f6;
  border: 1px solid #f1d6d6;
}

.admin-import-failed h3 {
  margin: 0 0 12px;
}

.admin-import-failed ul {
  margin: 0;
  padding-left: 18px;
  color: #8b3d3d;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.admin-badge-success {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-badge-muted {
  background: #eef3fb;
  color: #607094;
}

.admin-message-box,
.admin-empty-inline {
  display: block;
  padding: 14px 16px;
  border: 1px solid #e2e9f6;
  border-radius: 14px;
  background: #f8faff;
  color: #35486d;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.admin-customer-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--admin-line);
  background: #fff;
}

.admin-customer-section,
.admin-customer-modal-summary,
.admin-customer-next-action,
.admin-customer-followup-card,
.admin-customer-note-card,
.admin-library-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.admin-customer-modal-card,
.admin-customer-create-modal-card {
  width: min(980px, 100%);
}

.admin-customer-modal-body,
.admin-customer-drawer-column {
  display: grid;
  gap: 18px;
}

.admin-customer-info-grid,
.admin-customer-modal-grid,
.admin-customer-drawer-grid,
.admin-customer-profile-grid,
.admin-customer-create-grid,
.admin-followup-grid,
.admin-customer-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.admin-customer-form-actions,
.admin-customer-modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-customer-modal-badges,
.admin-crm-stage-cell,
.admin-crm-market-cell,
.admin-crm-follow-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-crm-name-cell,
.admin-library-file-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-crm-customer-name {
  color: var(--admin-text);
  font-weight: 900;
}

.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef3fb;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-customer-level-chip {
  background: #fff7e6;
  color: #925c00;
}

.admin-crm-contact-text,
.admin-crm-demand-cell,
.admin-library-file-cell span {
  color: var(--admin-muted);
  overflow-wrap: break-word;
}

.admin-customer-timeline {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-followup-compose,
.admin-attachment-upload-form,
.admin-customer-profile-form,
.admin-customer-create-form {
  display: grid;
  gap: 16px;
}

.admin-customer-search-field {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
}

.admin-customer-search-field input {
  width: 100%;
}

.admin-customer-control-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-customer-control-meta {
  margin-left: auto;
  justify-content: flex-end;
}

.admin-customer-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--admin-line);
  border-radius: 999px;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.admin-customer-count-badge b {
  font-family: "Rajdhani", Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.admin-customer-control-meta button {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--admin-primary-dark);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.admin-crm-table,
.admin-crm-table-light {
  width: 100%;
  border-collapse: collapse;
}

.admin-crm-table th,
.admin-crm-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e7ecf7;
  text-align: left;
  vertical-align: top;
}

.admin-crm-table th {
  background: #f3f6fb;
  color: var(--admin-muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-empty-inline {
  color: #8a99b5;
}

.admin-file-grid,
.admin-inquiry-dialog-files {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.admin-file-card,
.admin-inquiry-dialog-files a {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #e2e9f6;
  border-radius: 12px;
  background: #f8faff;
  color: var(--admin-text);
  text-decoration: none;
}

.admin-file-card span,
.admin-inquiry-dialog-files a span {
  color: var(--admin-primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.admin-inquiry-dialog-overlay,
.admin-modal-overlay,
.admin-confirm-modal-overlay,
.admin-delete-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 20, 40, 0.48);
}

.admin-inquiry-dialog-overlay[hidden],
.admin-modal-overlay[hidden],
.admin-confirm-modal-overlay[hidden],
.admin-delete-modal-overlay[hidden] {
  display: none;
}

.admin-inquiry-dialog-card,
.admin-modal-card,
.admin-confirm-modal-card,
.admin-delete-modal-card {
  position: relative;
  width: min(860px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--admin-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 20, 40, 0.28);
}

.admin-confirm-modal-header,
.admin-delete-modal-header {
  padding: 24px 28px 0;
}

.admin-confirm-modal-header h3,
.admin-delete-modal-header h3 {
  margin: 0;
  color: var(--admin-text);
  font-size: 22px;
}

.admin-confirm-modal-footer,
.admin-delete-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 28px 28px;
}

.admin-inquiry-dialog-close,
.admin-modal-close,
.admin-confirm-modal-close,
.admin-delete-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  color: var(--admin-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.admin-inquiry-dialog-body,
.admin-modal-body,
.admin-confirm-modal-body,
.admin-delete-modal-body {
  padding: 28px;
}

.admin-inquiry-dialog-content {
  display: grid;
  gap: 22px;
}

.admin-inquiry-dialog-head,
.admin-detail-hero,
.admin-inquiry-detail-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, #f8faff, #eef6f5);
}

.admin-inquiry-dialog-head h3,
.admin-detail-hero h2,
.admin-inquiry-detail-hero h2 {
  margin: 0;
  color: var(--admin-text);
}

.admin-inquiry-dialog-head p,
.admin-detail-hero p,
.admin-inquiry-detail-hero p {
  margin: 6px 0 0;
  color: var(--admin-muted);
}

.admin-inquiry-dialog-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
  justify-content: flex-end;
}

.admin-inquiry-dialog-grid,
.admin-inquiry-detail-grid,
.admin-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-inquiry-dialog-grid > div,
.admin-inquiry-detail-grid > span,
.admin-info-grid > span {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid #e2e9f6;
  border-radius: 14px;
  background: #fbfcff;
}

.admin-inquiry-dialog-grid span,
.admin-inquiry-detail-grid span > span,
.admin-info-grid span > span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-inquiry-dialog-grid b,
.admin-inquiry-detail-grid b,
.admin-info-grid b {
  color: var(--admin-text);
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: break-word;
}

.admin-inquiry-dialog-wide,
.admin-inquiry-detail-wide {
  grid-column: 1 / -1;
}

.admin-inquiry-dialog-section,
.admin-inquiry-detail-section {
  display: grid;
  gap: 12px;
}

.admin-inquiry-dialog-section h4,
.admin-inquiry-detail-section h3 {
  margin: 0;
  color: var(--admin-text);
}

.admin-inquiry-dialog-actions {
  display: flex;
  justify-content: flex-end;
}

body.admin-dialog-lock {
  overflow: hidden;
}

.admin-product-created-list {
  border-color: #dcebe8;
}

/* Blog management refresh. These rules are limited to the blog workspace. */
.admin-blogs-main .admin-blogs-head {
  align-items: flex-start;
}

.admin-blogs-main .admin-blogs-head h2 {
  font-size: 24px;
}

.admin-blogs-main .admin-blog-page-subtitle {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.5;
}

.admin-blogs-main .admin-blog-head-actions,
.admin-blogs-main .admin-blog-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.admin-blogs-main .admin-blog-head-actions form {
  margin: 0;
}

.admin-blogs-main .admin-blog-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
}

.admin-blogs-main .admin-blog-filter-bar input,
.admin-blogs-main .admin-blog-filter-bar select {
  min-height: 40px;
  margin: 0;
}

.admin-blogs-main .admin-blog-filter-search {
  flex: 0 1 250px;
  width: auto;
  min-width: 210px;
}

.admin-blogs-main .admin-blog-filter-bar select {
  flex: 0 1 160px;
  width: auto;
  min-width: 118px;
}

.admin-blogs-main .admin-blog-filter-status {
  flex-basis: 140px;
}

.admin-blogs-main .admin-blog-filter-submit {
  min-height: 40px;
  padding: 0 18px;
}

.admin-blogs-main .admin-blog-filter-reset {
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.admin-blogs-main .admin-blog-filter-reset:hover {
  color: var(--admin-primary-dark);
  text-decoration: underline;
}

.admin-blogs-main .admin-blog-table {
  min-width: 920px;
  table-layout: fixed;
}

.admin-blogs-main .admin-blog-title-cell {
  min-height: 56px;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
}

.admin-blogs-main .admin-blog-title-cell > div {
  gap: 3px;
}

.admin-blogs-main .admin-blog-row-thumb {
  display: block;
  width: 56px;
  height: 56px;
  border: 1px solid #e1e8f3;
  border-radius: 8px;
  background: #eef3fb center / cover no-repeat;
}

.admin-blogs-main .admin-blog-row-thumb.is-empty {
  background: #f1f5f9;
}

.admin-blogs-main .admin-blog-table tr {
  scroll-margin-top: 88px;
}

.admin-blogs-main .admin-blog-table tr:target {
  background: #fff8ed;
  box-shadow: inset 3px 0 #f59e0b;
}

.admin-blogs-main .admin-blog-row-title {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--admin-text);
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-blogs-main .admin-blog-row-title:hover {
  color: var(--admin-primary-dark);
  text-decoration: underline;
}

.admin-blogs-main .admin-blog-title-cell span,
.admin-blogs-main .admin-blog-title-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-blogs-main .admin-blog-title-cell small {
  -webkit-line-clamp: unset;
}

.admin-blogs-main .admin-blog-category-brand {
  display: grid;
  gap: 4px;
}

.admin-blogs-main .admin-blog-category-brand strong {
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.35;
}

.admin-blogs-main .admin-blog-category-brand span {
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-blogs-main .admin-blog-status,
.admin-blogs-main .admin-blog-seo-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-blogs-main .admin-blog-status-generating,
.admin-blogs-main .admin-blog-status-review {
  background: #eaf2ff;
  color: #1d4ed8;
}

.admin-blogs-main .admin-blog-status-failed {
  background: #fff0f0;
  color: #b42318;
}

.admin-blogs-main .admin-blog-seo-status.is-good {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-blogs-main .admin-blog-seo-status.is-pending {
  background: #fff7e6;
  color: #925c00;
}

.admin-blogs-main .admin-blog-seo-status.is-unset {
  background: #f1f5f9;
  color: #64748b;
}

.admin-blogs-main .admin-blog-ai-form {
  max-width: 860px;
  gap: 18px;
}

.admin-blogs-main .admin-blog-form-wide {
  width: 100%;
}

.admin-blogs-main .admin-blog-ai-inline-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-blogs-main .admin-blog-ai-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 4px;
}

.admin-blogs-main .admin-blog-guardrail-note {
  max-width: 620px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-blogs-main .admin-blog-guardrail-note strong {
  color: var(--admin-text);
}

.admin-blogs-main .admin-blog-generation-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  max-width: 860px;
  padding: 16px 18px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
}

.admin-blogs-main .admin-blog-generation-state strong {
  color: var(--admin-text);
}

.admin-blogs-main .admin-blog-generation-state span {
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-blogs-main .admin-blog-generation-state .btn {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.admin-blogs-main .admin-blog-editor {
  grid-template-columns: minmax(0, 72fr) minmax(280px, 28fr);
  gap: 20px;
  align-items: start;
}

.admin-blogs-main .admin-blog-editor-primary,
.admin-blogs-main .admin-blog-editor-sidebar {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-blogs-main .admin-blog-editor-primary {
  padding: 24px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: var(--admin-surface);
}

.admin-blogs-main .admin-blog-editor-sidebar {
  position: sticky;
  top: 24px;
}

.admin-blogs-main .admin-blog-editor-sidebar .admin-blog-side-panel {
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
}

.admin-blogs-main .admin-blog-editor-sidebar h3,
.admin-blogs-main .admin-blog-details summary {
  font-size: 14px;
  font-weight: 700;
}

.admin-blogs-main .admin-blog-publish-settings dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.admin-blogs-main .admin-blog-publish-settings dl > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-blogs-main .admin-blog-publish-settings dt,
.admin-blogs-main .admin-blog-publish-settings dd {
  margin: 0;
  font-size: 13px;
}

.admin-blogs-main .admin-blog-publish-settings dt {
  color: var(--admin-muted);
}

.admin-blogs-main .admin-blog-publish-settings dd {
  color: var(--admin-text);
  font-weight: 600;
  text-align: right;
}

.admin-blogs-main .admin-blog-details summary {
  cursor: pointer;
  color: var(--admin-text);
}

.admin-blogs-main .admin-blog-details[open] summary {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  .admin-blogs-main .admin-blog-editor {
    grid-template-columns: 1fr;
  }

  .admin-blogs-main .admin-blog-editor-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .admin-blogs-main .admin-blogs-head,
  .admin-blogs-main .admin-blog-ai-footer {
    display: grid;
    gap: 14px;
  }

  .admin-blogs-main .admin-blog-head-actions,
  .admin-blogs-main .admin-blog-top-actions {
    width: 100%;
    margin-left: 0;
  }

  .admin-blogs-main .admin-blog-top-actions .btn,
  .admin-blogs-main .admin-blog-head-actions .btn {
    flex: 1 1 auto;
  }

  .admin-blogs-main .admin-blog-ai-inline-grid,
  .admin-blogs-main .admin-blog-editor-sidebar {
    grid-template-columns: 1fr;
  }

  .admin-blogs-main .admin-blog-ai-footer .btn {
    width: 100%;
  }

  .admin-blogs-main .admin-blog-filter-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-blogs-main .admin-blog-filter-search,
  .admin-blogs-main .admin-blog-filter-bar select,
  .admin-blogs-main .admin-blog-filter-submit {
    width: 100%;
    min-width: 0;
  }

  .admin-blogs-main .admin-blog-generation-state {
    grid-template-columns: 1fr;
  }

  .admin-blogs-main .admin-blog-generation-state .btn {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }
}

.admin-settings-user-row,
.admin-settings-user-row-wide {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 1.1fr 1fr .8fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e3eaf4;
  border-radius: 16px;
  background: #fbfcff;
}

.admin-settings-user-row.is-head {
  background: #f3f6fb;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-settings-permission-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #e3eaf4;
  border-radius: 16px;
  background: #fbfcff;
}

.admin-settings-permission-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-settings-permission-options label,
.admin-check {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
}

.admin-product-created-list tr.is-highlight {
  background: #f0fdfa;
  box-shadow: inset 4px 0 0 #0f766e;
}

.admin-badge-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.admin-image-controls {
  display: grid;
  gap: 10px;
}

@media (max-width: 900px) {
  .admin-structured-preview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-notice {
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 600;
}

.admin-notice-success {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-notice-error {
  background: #fff0f0;
  color: #b43a3a;
}

body.admin-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(36, 67, 143, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 67, 143, .045) 1px, transparent 1px),
    #f7f9fc;
  background-size: 56px 56px, 56px 56px, auto;
  color: #172033;
  font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.admin-login-shell {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: 56px;
}

.admin-login-identity {
  position: relative;
  min-height: 560px;
  padding: 28px 0;
  display: grid;
  align-content: space-between;
  gap: 40px;
}

.admin-login-identity::before {
  content: "";
  position: absolute;
  inset: 88px 0 88px 48px;
  z-index: -1;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, .1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 67, 143, .1) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(232, 239, 249, .72));
  background-size: 44px 44px, 44px 44px, auto;
}

.admin-login-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #172033;
  box-shadow: 0 14px 30px rgba(20, 40, 77, .08);
}

.admin-login-brand:focus-visible,
.admin-login-submit:focus-visible {
  outline: 3px solid rgba(220, 38, 38, .28);
  outline-offset: 3px;
}

.admin-login-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
}

.admin-login-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.admin-login-brand strong,
.admin-login-brand small {
  display: block;
  letter-spacing: 0;
}

.admin-login-brand strong {
  color: #172033;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}

.admin-login-brand small {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}

.admin-login-intro {
  max-width: 560px;
  display: grid;
  gap: 16px;
}

.admin-login-kicker {
  color: #0f766e;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.admin-login-intro h1,
.admin-login-card h2 {
  margin: 0;
  color: #172033;
  letter-spacing: 0;
}

.admin-login-intro h1 {
  max-width: 520px;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
}

.admin-login-intro p,
.admin-login-card-head p {
  margin: 0;
  color: #667085;
  line-height: 1.7;
}

.admin-login-intro p {
  max-width: 420px;
  font-size: 16px;
}

.admin-login-strip {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 8px;
}

.admin-login-strip span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: #24438f;
  font-family: "Rajdhani", "Barlow", Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(20, 40, 77, .07);
}

.admin-login-strip span:nth-child(3) {
  color: #b42318;
}

.admin-login-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 22px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(20, 40, 77, .1);
}

.admin-login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #eb251c, #0f766e, #24438f);
}

.admin-login-card-head {
  display: grid;
  gap: 8px;
}

.admin-login-card h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}

.admin-login-card-head p {
  font-size: 15px;
}

.admin-login-card .admin-notice {
  padding: 12px 14px;
  border: 1px solid rgba(180, 58, 58, .16);
  border-radius: 8px;
  background: #fff7f7;
  color: #9f2f2f;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.admin-login-form {
  display: grid;
  gap: 18px;
}

.admin-login-field {
  display: grid;
  gap: 8px;
}

.admin-login-field span {
  color: #344054;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}

.admin-login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #ccd6e4;
  border-radius: 8px;
  outline: 0;
  background: #fbfcfe;
  color: #172033;
  font: inherit;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.admin-login-form input:hover {
  border-color: #aebbd0;
}

.admin-login-form input:focus {
  border-color: var(--admin-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12);
}

.admin-login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border-radius: 8px;
  background: var(--admin-primary);
  box-shadow: 0 12px 24px rgba(220, 38, 38, .16);
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-login-submit:hover {
  background: var(--admin-primary-dark);
  box-shadow: 0 14px 28px rgba(220, 38, 38, .2);
  transform: translateY(-1px);
}

.admin-login-submit:active {
  transform: translateY(0);
}

@media (max-width: 960px) {
  .admin-login-shell {
    width: min(680px, calc(100% - 40px));
    min-height: auto;
    padding: 32px 0;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 28px;
  }

  .admin-login-identity {
    min-height: auto;
    padding: 0;
    gap: 24px;
  }

  .admin-login-identity::before {
    inset: 56px -16px auto 80px;
    height: 180px;
    opacity: .72;
  }

  .admin-login-intro {
    gap: 12px;
  }

  .admin-login-intro h1 {
    max-width: 620px;
    font-size: 36px;
    line-height: 1.16;
  }

  .admin-login-intro p {
    max-width: 560px;
  }

  .admin-login-card {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  body.admin-login-body {
    background-size: 44px 44px, 44px 44px, auto;
  }

  .admin-login-shell {
    width: calc(100% - 28px);
    min-height: 100svh;
    padding: 24px 0;
    gap: 22px;
  }

  .admin-login-identity {
    gap: 20px;
  }

  .admin-login-identity::before {
    inset: 64px -10px auto 42px;
    height: 150px;
    background-size: 36px 36px, 36px 36px, auto;
  }

  .admin-login-brand {
    max-width: 100%;
    padding: 8px 10px 8px 8px;
  }

  .admin-login-brand-mark {
    width: 38px;
    height: 38px;
  }

  .admin-login-intro h1 {
    font-size: 30px;
    line-height: 1.18;
  }

  .admin-login-intro p {
    font-size: 15px;
    line-height: 1.65;
  }

  .admin-login-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-login-strip span {
    min-height: 46px;
    font-size: 18px;
  }

  .admin-login-card {
    padding: 22px;
    gap: 20px;
  }

  .admin-login-card h2 {
    font-size: 26px;
  }

  .admin-login-form {
    gap: 16px;
  }

  .admin-login-form input {
    height: 46px;
  }
}

@media (max-width: 380px) {
  .admin-login-intro h1 {
    font-size: 28px;
  }

  .admin-login-card {
    padding: 20px;
  }

  .admin-login-brand strong {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-login-form input,
  .admin-login-submit {
    transition: none;
  }

  .admin-login-submit:hover {
    transform: none;
  }
}

/* Global admin UI baseline: compact, aligned, and shared across pages. */
body.admin-body,
body.admin-login-body {
  --admin-page-gutter: clamp(24px, 2.2vw, 32px);
  --admin-radius-lg: 12px;
  --admin-radius-md: 8px;
  --admin-control-height: 40px;
  --admin-control-radius: 8px;
  --admin-control-border: #d7dee9;
  --admin-control-placeholder: #9aa6b8;
  --admin-shadow-card: none;
  --admin-shadow-soft: none;
  font-size: 14px;
}

body.admin-body {
  background: #f5f7fb;
}

.admin-main {
  padding: 24px var(--admin-page-gutter) 32px;
}

.admin-page {
  width: min(100%, var(--admin-page-max));
  margin: 0 auto;
  padding: 0;
  display: grid;
  gap: 24px;
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
}

.admin-topbar {
  min-height: 40px;
  margin-bottom: 24px;
  padding: 0;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}

.admin-section,
.admin-inquiry-main,
.admin-products-main,
.admin-blogs-main,
.admin-customers-main,
.admin-customer-layout,
.admin-customer-library-main,
.admin-single-flow,
.admin-quote-form,
.admin-landing-designer {
  gap: 24px;
}

.admin-route-toolbar,
.admin-section-head,
.admin-inquiry-page-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-detail-hero,
.admin-inquiry-detail-hero,
.admin-quote-hero {
  margin-bottom: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-route-toolbar h2,
.admin-section-head h2,
.admin-inquiry-page-head h2,
.admin-blogs-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-detail-hero h2,
.admin-inquiry-detail-hero h2,
.admin-quote-hero h2 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
}

.admin-route-toolbar p,
.admin-section-head p,
.admin-inquiry-page-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-detail-hero p,
.admin-inquiry-detail-hero p,
.admin-quote-hero p {
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-body .section-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.admin-content-card,
.admin-panel,
.admin-surface-card,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-table-wrap,
.admin-site-media-card,
.admin-toolbar .result-card,
.admin-filter-bar,
.admin-filters,
.admin-ui-pagination,
.admin-list-toolbar,
.admin-quote-input-section,
.admin-quote-quality-strip,
.admin-blog-status-grid,
.admin-customer-control-bar,
.admin-customer-section,
.admin-customer-modal-summary,
.admin-customer-next-action,
.admin-customer-followup-card,
.admin-customer-note-card,
.admin-library-card,
.admin-bulk-toolbar,
.admin-empty-note,
.admin-message-box,
.admin-empty-inline {
  border-radius: var(--admin-radius-lg);
  border-color: var(--admin-line);
  box-shadow: none;
}

.admin-page * {
  word-break: normal;
}

.admin-page .admin-table,
.admin-page .admin-crm-table,
.admin-page .admin-library-table,
.admin-page .admin-product-table,
.admin-page .admin-blog-table,
.admin-page .admin-inquiry-list-table,
.admin-page .admin-quote-history-batch-table table,
.admin-page .admin-quote-list-card table,
.admin-page .admin-customer-table-scroll table {
  width: 100%;
  min-width: 1200px;
  table-layout: auto;
}

.admin-page .table-wrap,
.admin-page .admin-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap {
  padding: 24px;
}

.admin-panel-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-customer-section-head,
.admin-modal-header,
.admin-customer-modal-header {
  gap: 16px;
}

.admin-panel-head h2,
.admin-blogs-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-customer-section-head h2,
.admin-modal-header h2,
.admin-customer-modal-header h2,
.admin-quote-input-section h3,
.admin-blog-side-panel h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
}

.admin-panel-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-customer-section-head p,
.admin-modal-header p,
.admin-customer-modal-header p {
  margin: 8px 0 0;
  font-size: 14px;
}

.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action,
.admin-sidebar-foot .btn-outline {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 16px;
  border-radius: var(--admin-control-radius);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-body .btn:hover,
.admin-login-body .btn:hover,
.admin-icon-button:hover {
  transform: none;
}

.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.admin-body .btn-outline,
.admin-login-body .btn-outline {
  background: #fff;
  border-color: var(--admin-control-border);
  color: var(--admin-text);
}

.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
  box-shadow: none;
}

.admin-body .btn-danger:hover,
.admin-login-body .btn-danger:hover {
  background: #fef2f2;
  border-color: transparent;
  color: #991b1b;
}

.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}

.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-login-form input {
  border-color: var(--admin-control-border);
  border-radius: var(--admin-control-radius);
  background: #fff;
  color: var(--admin-text);
  font-size: 14px;
}

.admin-body input,
.admin-body select,
.admin-login-form input {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 12px;
}

.admin-body textarea {
  min-height: 96px;
  padding: 10px 12px;
}

.admin-body input::placeholder,
.admin-body textarea::placeholder,
.admin-login-form input::placeholder {
  color: var(--admin-control-placeholder);
  opacity: 1;
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.admin-login-form input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}

.admin-body input:disabled,
.admin-body select:disabled,
.admin-body textarea:disabled,
.admin-body .btn:disabled,
.admin-body .btn[disabled] {
  background: #f1f4f8;
  color: #8a96a8;
  cursor: not-allowed;
  opacity: 1;
}

.admin-blog-form,
.admin-product-form,
.admin-quote-form,
.admin-blog-ai-panel,
.admin-blog-editor,
.admin-settings-form,
.admin-landing-job-form,
.admin-customer-profile-form,
.admin-customer-create-form,
.admin-attachment-upload-form,
.admin-followup-compose {
  gap: 24px;
}

.admin-form-grid,
.admin-quote-filter-grid,
.admin-quote-input-grid,
.admin-blog-ai-grid,
.admin-customer-profile-grid,
.admin-customer-create-grid,
.admin-followup-grid,
.admin-customer-info-grid,
.admin-customer-modal-grid,
.admin-customer-drawer-grid,
.admin-customer-file-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.admin-blog-form label,
.admin-product-form label,
.admin-quote-form label,
.admin-blog-ai-panel label,
.admin-blog-editor label,
.admin-settings-form label,
.admin-landing-job-form label,
.admin-customer-profile-form label,
.admin-customer-create-form label,
.admin-followup-compose label,
.admin-attachment-upload-form label {
  gap: 8px;
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 600;
}

.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar,
.admin-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 0;
  padding: 16px;
  background: #fff;
}

.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar,
.admin-bulk-toolbar,
.admin-quote-quality-strip,
.admin-blog-status-grid {
  align-content: start;
}

.admin-filter-bar label,
.admin-filters label,
.admin-customer-filter-grid label,
.admin-customer-search-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 500;
}

.admin-customer-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-customer-filter-grid label {
  display: inline-flex;
}

.admin-customer-filter-grid label span {
  white-space: nowrap;
}

.admin-customer-filter-grid select {
  width: 160px;
  min-width: 140px;
}

.admin-filter-bar label span,
.admin-filters label span,
.admin-customer-filter-grid label span,
.admin-customer-search-field span {
  white-space: nowrap;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-filters input,
.admin-filters select,
.admin-customer-filter-grid select {
  min-width: 140px;
  max-width: 220px;
}

.admin-filter-bar label,
.admin-filters label {
  min-width: 0;
}

.admin-inquiry-filter-keyword,
.admin-quote-filter-keyword,
.admin-customer-search-field {
  flex: 0 1 360px;
}

.admin-inquiry-filter-keyword input,
.admin-quote-filter-keyword input,
.admin-product-filter-grid input[type="search"],
.admin-blog-filters input[type="text"],
.admin-customer-search-field input {
  width: 100%;
  min-width: 280px;
  max-width: 360px;
}

.admin-inquiry-filter-actions,
.admin-quote-filter-actions,
.admin-actions,
.admin-topbar-actions,
.admin-blog-head-actions,
.admin-product-page-actions,
.admin-customer-head-actions,
.admin-customer-form-actions,
.admin-customer-modal-footer,
.admin-quote-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.admin-filter-bar button[type="submit"],
.admin-filters button[type="submit"] {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.admin-filter-bar a.btn-outline,
.admin-filters a.btn-outline,
.admin-customer-control-meta button,
.admin-bulk-toolbar .admin-muted-text + .btn,
.admin-body .admin-text-action {
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--admin-primary-dark);
  font-weight: 600;
}

.admin-filter-bar button[type="submit"],
.admin-filters button[type="submit"],
.admin-customer-control-meta button {
  white-space: nowrap;
}

.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar {
  align-content: flex-start;
}

.admin-table-wrap {
  border-radius: var(--admin-radius-lg);
  overflow: auto;
}

.admin-table,
.admin-crm-table,
.admin-library-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td,
.admin-crm-table th,
.admin-crm-table td,
.admin-library-table th,
.admin-library-table td {
  white-space: nowrap;
}

.admin-table .admin-text-wrap,
.admin-table .admin-table-message,
.admin-table .admin-long-text,
.admin-table .admin-product-clamp,
.admin-table .admin-product-clamp-2,
.admin-table .admin-product-clamp-3,
.admin-table .admin-product-muted,
.admin-table .admin-blog-title-cell span,
.admin-table .admin-blog-title-cell small,
.admin-table .admin-crm-contact-text,
.admin-table .admin-crm-demand-cell,
.admin-table .admin-library-file-cell span {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.admin-table th,
.admin-table td,
.admin-crm-table th,
.admin-crm-table td,
.admin-library-table th,
.admin-library-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e7ecf3;
  vertical-align: middle;
}

.admin-table th,
.admin-crm-table th,
.admin-library-table th {
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.admin-table td,
.admin-crm-table td,
.admin-library-table td {
  color: #344054;
  line-height: 1.5;
}

.admin-table td strong,
.admin-crm-table td strong,
.admin-library-table td strong,
.admin-badge,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count,
.admin-inquiry-date,
.admin-ui-actions-cell,
.admin-ui-actions-col {
  white-space: nowrap;
}

.admin-table tbody tr,
.admin-crm-table tbody tr,
.admin-library-table tbody tr {
  min-height: 56px;
}

.admin-table tbody tr > td,
.admin-crm-table tbody tr > td,
.admin-library-table tbody tr > td {
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table tbody tr:hover,
.admin-crm-table tbody tr:hover,
.admin-library-table tbody tr:hover {
  background: #fbfcfe;
}

.admin-table-compact th,
.admin-table-compact td {
  padding: 10px 12px;
}

.admin-ui-actions-col,
.admin-ui-actions-cell {
  width: 176px;
  min-width: 176px;
  text-align: right;
  white-space: nowrap;
}

.admin-ui-list-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.admin-inquiry-table th:nth-child(1),
.admin-inquiry-table td:nth-child(1) { width: 42px; }
.admin-inquiry-table th:nth-child(2),
.admin-inquiry-table td:nth-child(2) { width: 170px; }
.admin-inquiry-table th:nth-child(3),
.admin-inquiry-table td:nth-child(3) { width: 120px; }
.admin-inquiry-table th:nth-child(4),
.admin-inquiry-table td:nth-child(4) { width: 220px; }
.admin-inquiry-table th:nth-child(5),
.admin-inquiry-table td:nth-child(5) { width: 320px; }
.admin-inquiry-table th:nth-child(6),
.admin-inquiry-table td:nth-child(6) { width: 90px; }
.admin-inquiry-table th:nth-child(7),
.admin-inquiry-table td:nth-child(7) { width: 180px; }
.admin-inquiry-table th:nth-child(8),
.admin-inquiry-table td:nth-child(8) { width: 176px; }

.admin-product-table th:nth-child(1),
.admin-product-table td:nth-child(1) { width: 280px; }
.admin-product-table th:nth-child(2),
.admin-product-table td:nth-child(2) { width: 160px; }
.admin-product-table th:nth-child(3),
.admin-product-table td:nth-child(3) { width: 140px; }
.admin-product-table th:nth-child(4),
.admin-product-table td:nth-child(4) { width: 320px; }
.admin-product-table th:nth-child(5),
.admin-product-table td:nth-child(5) { width: 110px; }
.admin-product-table th:nth-child(6),
.admin-product-table td:nth-child(6) { width: 160px; }

.admin-quote-history-batch-table table th:nth-child(1),
.admin-quote-history-batch-table table td:nth-child(1) { width: 54px; }
.admin-quote-history-batch-table table th:nth-child(2),
.admin-quote-history-batch-table table td:nth-child(2) { width: 160px; }
.admin-quote-history-batch-table table th:nth-child(3),
.admin-quote-history-batch-table table td:nth-child(3) { width: 180px; }
.admin-quote-history-batch-table table th:nth-child(4),
.admin-quote-history-batch-table table td:nth-child(4) { width: 180px; }
.admin-quote-history-batch-table table th:nth-child(5),
.admin-quote-history-batch-table table td:nth-child(5) { width: 120px; }
.admin-quote-history-batch-table table th:nth-child(6),
.admin-quote-history-batch-table table td:nth-child(6) { width: 120px; }
.admin-quote-history-batch-table table th:nth-child(7),
.admin-quote-history-batch-table table td:nth-child(7) { width: 120px; }
.admin-quote-history-batch-table table th:nth-child(8),
.admin-quote-history-batch-table table td:nth-child(8) { width: 120px; }
.admin-quote-history-batch-table table th:nth-child(9),
.admin-quote-history-batch-table table td:nth-child(9) { width: 180px; }
.admin-quote-history-batch-table table th:nth-child(10),
.admin-quote-history-batch-table table td:nth-child(10) { width: 320px; }

.admin-quote-list-card .admin-ui-actions-cell,
.admin-quote-history-batch-table .admin-ui-actions-cell {
  width: 176px;
}

.admin-customer-table-scroll .admin-ui-actions-cell {
  width: 176px;
}

.admin-blog-table .admin-ui-actions-cell,
.admin-product-table .admin-ui-actions-cell,
.admin-quote-list-card .admin-ui-actions-cell,
.admin-customer-table-scroll .admin-ui-actions-cell,
.admin-inquiry-list-table .admin-ui-actions-cell {
  width: 176px;
  min-width: 176px;
}

.admin-ui-action,
.admin-ui-more-item {
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--admin-primary-dark);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.admin-ui-action.is-danger,
.admin-ui-more-item.is-danger {
  color: #b91c1c;
}

.admin-ui-action:hover,
.admin-ui-action-primary:hover,
.admin-ui-action-secondary:hover,
.admin-ui-more-item:hover {
  background: transparent;
  color: var(--admin-primary);
  transform: none;
}

.admin-ui-more summary {
  width: auto;
  height: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--admin-muted);
  font-size: 18px;
  line-height: 1;
}

.admin-ui-more summary:hover {
  background: transparent;
  color: var(--admin-primary-dark);
  transform: none;
}

.admin-ui-more-menu {
  min-width: 132px;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--admin-radius-md);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.admin-ui-more-item {
  width: 100%;
  justify-content: flex-start;
}

.admin-ui-more-item.is-danger,
.admin-check-danger,
.admin-delete-modal-footer .btn-danger,
.admin-confirm-modal-footer .btn-danger {
  color: #b91c1c;
}

.admin-badge,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count {
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.admin-ui-pagination {
  padding: 12px 16px;
  gap: 12px;
  background: #fff;
}

.admin-ui-page-link,
.admin-ui-page-ellipsis,
.admin-ui-page-size select {
  min-height: 32px;
  border-radius: 6px;
}

.admin-help-text,
.admin-field-help,
.admin-muted-inline,
.admin-inquiry-meta,
.admin-muted-text,
.admin-long-text,
.admin-product-muted,
.admin-blog-title-cell span,
.admin-blog-title-cell small {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}

.admin-table-message,
.admin-long-text,
.admin-product-clamp,
.admin-product-clamp-2,
.admin-product-clamp-3,
.admin-blog-title-cell span,
.admin-blog-title-cell small,
.admin-crm-contact-text,
.admin-crm-demand-cell,
.admin-library-file-cell span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.admin-table-message,
.admin-long-text,
.admin-product-clamp,
.admin-product-clamp-2,
.admin-blog-title-cell span,
.admin-library-file-cell span,
.admin-crm-contact-text,
.admin-crm-demand-cell {
  -webkit-line-clamp: 2;
}

.admin-product-clamp-3,
.admin-blog-title-cell small {
  -webkit-line-clamp: 2;
}

.admin-product-thumb,
.admin-table-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}

@media (max-width: 1120px) {
  .admin-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .admin-shell.is-sidebar-collapsed {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .admin-sidebar {
    gap: 16px;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar {
    padding-inline: 22px;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand {
    justify-content: flex-start;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-copy,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-title,
  .admin-shell.is-sidebar-collapsed .admin-nav-text,
  .admin-shell.is-sidebar-collapsed .admin-subnav-caret,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot-label,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot .btn-outline {
    display: grid;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-copy {
    display: flex;
  }

  .admin-shell.is-sidebar-collapsed .admin-nav-text,
  .admin-shell.is-sidebar-collapsed .admin-subnav-caret,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot-label,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot .btn-outline {
    display: inline-flex;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-subnav {
    display: grid;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-group.has-subnav:not(.is-expanded) .admin-sidebar-subnav {
    display: none;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-link {
    justify-content: flex-start;
    padding: 10px 12px;
  }

  .admin-toolbar,
  .admin-product-layout,
  .admin-blog-layout,
  .admin-blog-editor,
  .admin-quote-layout,
  .admin-quote-workflow {
    grid-template-columns: 1fr;
  }

  .admin-blog-editor-side {
    position: static;
  }

  .admin-inline-field {
    grid-template-columns: 1fr;
  }

  .admin-list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-route-toolbar,
  .admin-section-head,
  .admin-inquiry-page-head,
  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-topbar-actions {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .admin-main,
  .admin-sidebar {
    padding: 20px 16px;
  }

  body.admin-body,
  body.admin-login-body {
    --admin-page-gutter: 16px;
  }

  .admin-section {
    gap: 18px;
  }

  .admin-panel,
  .admin-blog-ai-panel,
  .admin-blog-editor-main,
  .admin-blog-side-panel,
  .admin-product-form-wrap,
  .admin-product-list-wrap {
    padding: 18px;
    border-radius: 18px;
  }

  .admin-panel-head,
  .admin-blogs-head,
  .admin-product-page-head,
  .admin-route-toolbar,
  .admin-section-head,
  .admin-inquiry-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions,
  .admin-topbar-actions,
  .admin-blog-head-actions,
  .admin-product-page-actions {
    width: 100%;
  }

  .admin-actions .btn,
  .admin-topbar-actions .btn,
  .admin-blog-head-actions .btn,
  .admin-product-page-actions .btn {
    flex: 0 0 auto;
  }

  .admin-brand {
    align-items: center;
    flex-direction: row;
  }

  .admin-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filter-bar label,
  .admin-filter-bar input,
  .admin-filter-bar select,
  .admin-filters input,
  .admin-filters select,
  .admin-inquiry-filter-actions,
  .admin-quote-filter-actions {
    width: 100%;
  }

  .admin-form-grid,
  .admin-blog-ai-grid,
  .admin-quote-filter-grid,
  .admin-quote-input-grid,
  .admin-customer-filter-grid,
  .admin-settings-permissions-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-cell,
  .admin-blog-title-cell {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .admin-product-thumb,
  .admin-table-thumb {
    width: 56px;
    height: 56px;
  }

  .admin-inquiry-dialog-grid,
  .admin-inquiry-detail-grid,
  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-inquiry-dialog-head,
  .admin-detail-hero,
  .admin-inquiry-detail-hero {
    flex-direction: column;
  }

  .admin-user-chip {
    max-width: 100%;
  }

  .admin-user-meta {
    flex-wrap: wrap;
    white-space: normal;
  }

  .admin-ui-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-ui-page-controls,
  .admin-ui-page-size {
    flex-wrap: wrap;
  }

  .admin-settings-user-row,
  .admin-settings-user-row-wide {
    grid-template-columns: 1fr;
  }
}

/* Final compact-admin overrides for legacy rules that appear later in the file. */
.admin-body input[type="checkbox"],
.admin-body input[type="radio"],
.admin-login-body input[type="checkbox"],
.admin-login-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
}

.admin-body input[type="radio"],
.admin-login-body input[type="radio"] {
  border-radius: 50%;
}

.admin-login-form input,
.admin-login-submit {
  min-height: 40px;
  height: 40px;
}

.admin-login-submit:hover {
  transform: none;
  box-shadow: none;
}

.admin-landing-basic-grid input,
.admin-landing-basic-grid select,
.admin-landing-search-box input,
.admin-landing-campaign-grid input,
.admin-landing-campaign-grid select,
.admin-landing-reference-controls input,
.admin-landing-reference-controls select,
.admin-landing-requirement-grid select {
  min-height: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
}

.admin-landing-requirement-grid textarea,
.admin-landing-idea-field textarea {
  border-radius: 8px;
  font-size: 14px;
}

/* Final compact-admin overrides after legacy mobile and inline-like rules. */
.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action,
.admin-delete-modal-footer .btn,
.admin-confirm-modal-footer .btn {
  min-height: 40px;
  height: 40px;
  min-width: 0;
  padding: 0 16px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}

.admin-body .btn-danger,
.admin-login-body .btn-danger,
.admin-delete-modal-footer .btn-danger,
.admin-confirm-modal-footer .btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
}

.admin-body input,
.admin-body select,
.admin-login-form input,
.admin-ui-page-size select {
  min-height: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
}

.admin-body textarea {
  border-radius: 8px;
  font-size: 14px;
}

.admin-body input[type="checkbox"],
.admin-body input[type="radio"],
.admin-login-body input[type="checkbox"],
.admin-login-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-content-card,
.admin-surface-card,
.admin-table-wrap,
.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-card,
.admin-quote-input-section,
.admin-blog-status-grid,
.admin-ui-pagination {
  border-radius: 12px;
  box-shadow: none;
}

.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px;
  background: #fff;
}

.admin-filter-bar a.btn-outline,
.admin-filters a.btn-outline,
.admin-customer-control-meta button,
.admin-ui-action,
.admin-ui-more-item {
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--admin-primary-dark);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.admin-ui-more summary {
  width: auto;
  height: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.admin-field-required {
  color: #b91c1c;
}

.admin-log-cell-ellipsis {
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-panel-head-spaced {
  margin-top: 18px;
}

.admin-summary-number {
  margin: 8px 0 0;
  color: var(--admin-text);
  font-family: "Rajdhani", Arial, sans-serif;
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
}

/* Layout-system hardening: keep legacy page rules aligned with the shared admin baseline. */
body.admin-body {
  background: #f5f7fb;
}

.admin-main {
  padding: 24px var(--admin-page-gutter) 32px;
}

.admin-page,
.admin-topbar {
  width: min(100%, 1600px);
  max-width: 1600px;
}

.admin-page {
  gap: 24px;
}

.admin-section,
.admin-products-main,
.admin-blogs-main,
.admin-customers-main,
.admin-customer-layout,
.admin-customer-library-main,
.admin-single-flow,
.admin-quote-layout,
.admin-quote-workflow,
.admin-blog-editor,
.admin-product-layout,
.admin-blog-layout {
  gap: 24px;
}

.admin-topbar,
.admin-route-toolbar,
.admin-section-head,
.admin-inquiry-page-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-detail-hero,
.admin-inquiry-detail-hero,
.admin-quote-hero,
.admin-panel-head,
.admin-customer-section-head,
.admin-list-toolbar {
  justify-content: flex-start;
}

.admin-topbar-actions,
.admin-actions,
.admin-blog-head-actions,
.admin-product-page-actions,
.admin-customer-head-actions {
  margin-left: auto;
}

.admin-route-toolbar h2,
.admin-section-head h2,
.admin-inquiry-page-head h2,
.admin-blogs-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-detail-hero h2,
.admin-inquiry-detail-hero h2,
.admin-quote-hero h2 {
  font-size: 24px;
  line-height: 1.25;
}

.admin-content-card,
.admin-panel,
.admin-surface-card,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-table-wrap,
.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar,
.admin-bulk-toolbar,
.admin-ui-pagination,
.admin-list-toolbar,
.admin-quote-input-section,
.admin-quote-quality-strip,
.admin-blog-status-grid,
.admin-customer-section,
.admin-customer-modal-summary,
.admin-customer-next-action,
.admin-customer-followup-card,
.admin-customer-note-card,
.admin-library-card,
.admin-empty-note,
.admin-message-box,
.admin-empty-inline {
  border-radius: 12px;
  box-shadow: none;
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-blog-manage-wrap {
  padding: 24px;
}

.admin-filter-bar,
.admin-filters,
.admin-customer-control-bar,
.admin-library-control-bar,
.admin-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 12px;
  min-height: 0;
  margin: 0;
  padding: 16px;
  background: #fff;
}

.admin-filter-bar label,
.admin-filters label,
.admin-customer-filter-grid label,
.admin-customer-search-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 500;
}

.admin-filter-bar label > span,
.admin-filters label > span,
.admin-customer-filter-grid label > span,
.admin-customer-search-field > span {
  white-space: nowrap;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-filters input,
.admin-filters select,
.admin-customer-filter-grid select,
.admin-library-control-bar select {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
  max-width: 180px;
}

.admin-inquiry-filter-keyword,
.admin-quote-filter-keyword,
.admin-customer-search-field,
.admin-product-filter-grid input[type="search"],
.admin-blog-filters input[type="text"] {
  flex: 0 1 360px;
}

.admin-inquiry-filter-keyword input,
.admin-quote-filter-keyword input,
.admin-customer-search-field input,
.admin-product-filter-grid input[type="search"],
.admin-blog-filters input[type="text"] {
  width: 100%;
  min-width: 280px;
  max-width: 360px;
}

.admin-customer-control-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-customer-control-meta {
  flex-basis: 100%;
  color: var(--admin-muted);
}

.admin-customer-filter-grid,
.admin-library-control-bar .admin-customer-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-login-form input,
.admin-ui-page-size select {
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font-size: 14px;
}

.admin-body input,
.admin-body select,
.admin-login-form input,
.admin-ui-page-size select {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
}

.admin-body textarea {
  padding: 10px 12px;
}

.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action {
  min-height: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-form-grid,
.admin-quote-filter-grid,
.admin-quote-input-grid,
.admin-blog-ai-grid,
.admin-customer-profile-grid,
.admin-customer-create-grid,
.admin-followup-grid,
.admin-customer-info-grid,
.admin-customer-modal-grid,
.admin-customer-drawer-grid,
.admin-customer-file-grid,
.admin-settings-permissions-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.admin-form-wide,
.admin-blog-content-input,
.admin-structured-textarea {
  grid-column: 1 / -1;
}

.admin-quote-filter-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.admin-quote-filter-grid .admin-quote-filter-keyword {
  flex: 0 1 360px;
}

.admin-quote-filter-actions,
.admin-customer-form-actions,
.admin-customer-modal-footer,
.admin-quote-form-actions {
  justify-content: flex-end;
}

.admin-quote-filter-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.admin-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: 12px;
}

.admin-page .admin-table,
.admin-page .admin-crm-table,
.admin-page .admin-library-table,
.admin-page .admin-product-table,
.admin-page .admin-blog-table,
.admin-page .admin-inquiry-list-table,
.admin-page .admin-quote-history-batch-table table,
.admin-page .admin-quote-list-card table,
.admin-page .admin-customer-table-scroll table,
.admin-page .admin-landing-list-card table {
  width: 100%;
  min-width: 1200px;
  table-layout: auto;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td,
.admin-crm-table th,
.admin-crm-table td,
.admin-library-table th,
.admin-library-table td {
  padding: 10px 12px;
  vertical-align: middle;
  word-break: normal;
  overflow-wrap: normal;
  white-space: nowrap;
}

.admin-table tbody tr > td,
.admin-crm-table tbody tr > td,
.admin-library-table tbody tr > td {
  height: 56px;
}

.admin-table-message,
.admin-long-text,
.admin-product-clamp,
.admin-product-clamp-2,
.admin-product-clamp-3,
.admin-blog-title-cell span,
.admin-blog-title-cell small,
.admin-crm-contact-text,
.admin-crm-demand-cell,
.admin-library-file-cell span,
.admin-text-wrap {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.admin-inquiry-date,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count,
.admin-ui-actions-cell,
.admin-ui-actions-col {
  white-space: nowrap;
}

.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count {
  width: max-content;
  max-width: 100%;
}

.admin-ui-actions-col,
.admin-ui-actions-cell {
  width: 180px;
  min-width: 180px;
  max-width: 220px;
  text-align: right;
}

.admin-ui-actions-cell.is-menu-open {
  position: relative;
  z-index: 3;
}

.admin-product-table .admin-ui-actions-cell {
  position: relative;
  overflow: visible;
  text-overflow: clip;
}

.admin-product-table .admin-ui-list-actions {
  position: relative;
  z-index: 1;
}

.admin-ui-list-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  max-width: 100%;
  white-space: nowrap;
}

.admin-ui-list-actions form {
  display: inline-flex;
  margin: 0;
}

/* Field errors expand only their own cell; keep every editable control on one baseline. */
.admin-quote-history-batch-table .admin-table th,
.admin-quote-history-batch-table .admin-table td {
  vertical-align: top;
}

.admin-quote-history-batch-table .admin-table td > input:not([type='hidden']),
.admin-quote-history-batch-table .admin-table td > select {
  display: block;
  width: 100%;
  min-width: 0;
  height: var(--admin-control-height);
  min-height: var(--admin-control-height);
}

.admin-quote-history-field-error {
  display: block;
  margin-top: 4px;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.35;
}

.admin-quote-entry-upload small,
.admin-quote-entry-note textarea {
  color: var(--admin-muted);
}

.admin-quote-entry-note textarea {
  min-height: 96px;
}

.admin-quote-entry-actions {
  justify-content: flex-end;
}

@media (max-width: 1280px) {
  .admin-quote-history-entry-panel .admin-quote-entry-basic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-quote-entry-dropzone {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .admin-quote-history-entry-panel .admin-quote-entry-basic-grid {
    grid-template-columns: 1fr;
  }

  .admin-quote-history-head,
  .admin-quote-history-modal-head {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-quote-history-modal-card {
    width: min(100vw - 24px, 920px);
    max-height: calc(100vh - 24px);
  }

  .admin-quote-confirm-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-quote-history-entry-modal {
    align-items: flex-start;
    padding: 8px;
  }

  .admin-quote-history-entry-modal-card {
    width: 100%;
    max-height: calc(100vh - 16px);
  }

  .admin-quote-history-entry-modal-head,
  .admin-quote-history-entry-modal-card .admin-quote-history-batch-form,
  .admin-quote-history-entry-modal-card .admin-quote-history-confirm-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-quote-history-modal {
    padding: 12px;
  }

  .admin-quote-history-modal-head {
    gap: 12px;
    padding: 20px 60px 16px 20px;
  }

  .admin-quote-history-modal-count {
    display: flex;
    align-items: baseline;
    justify-items: start;
    min-width: 0;
  }

  .admin-quote-history-modal-count span {
    margin-left: 6px;
  }

  .admin-quote-history-modal-metrics {
    padding: 0 20px;
  }

  .admin-quote-history-modal-table-wrap {
    padding: 0 20px 16px;
  }
}

@media (max-width: 640px) {
  .admin-quote-history-modal-head h3 {
    font-size: 22px;
  }

  .admin-quote-history-modal-metrics {
    grid-template-columns: 1fr;
  }

  .admin-quote-history-modal-metric,
  .admin-quote-history-modal-metric + .admin-quote-history-modal-metric {
    padding: 14px 0;
  }

  .admin-quote-history-modal-metric + .admin-quote-history-modal-metric {
    border-top: 1px solid var(--admin-line);
    border-left: 0;
  }
}

body.admin-body .admin-inquiry-filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 360px) auto;
  align-items: end;
  gap: 16px 12px;
}

body.admin-body .admin-inquiry-filter-bar label {
  display: grid;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

body.admin-body .admin-inquiry-filter-bar input,
body.admin-body .admin-inquiry-filter-bar select {
  width: 100%;
  min-width: 0;
  max-width: none;
}

body.admin-body .admin-inquiry-filter-keyword {
  flex: 1 1 auto;
  min-width: 0;
}

body.admin-body .admin-inquiry-filter-actions {
  align-self: end;
  justify-self: start;
}

@media (max-width: 720px) {
  body.admin-body .admin-inquiry-filter-bar {
    grid-template-columns: 1fr;
  }

  body.admin-body .admin-inquiry-filter-actions {
    width: 100%;
  }
}

/* Product management list: compact filters, visible row actions, and sortable drawers. */
.admin-product-page-panel .admin-product-page-head { align-items: flex-start; gap: 18px; }
.admin-product-page-panel .admin-product-page-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.admin-product-page-panel .admin-product-filter-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.admin-product-page-panel .admin-product-filter-grid input,
.admin-product-page-panel .admin-product-filter-grid select { height: 36px; min-height: 36px; width: auto; min-width: 112px; margin: 0; padding-inline: 10px; font-size: 13px; }
.admin-product-page-panel .admin-product-filter-grid input[type="search"] { width: min(320px, 100%); min-width: 220px; }
.admin-product-filter-submit { min-height: 36px !important; padding-inline: 14px !important; }
.admin-product-filter-reset { padding: 7px 4px; color: var(--admin-muted); font-size: 13px; text-decoration: none; }
.admin-product-table-wrap { overflow-x: auto; overflow-y: visible; }
.admin-product-table { width: 100%; min-width: 1280px; table-layout: auto; }
.admin-product-table th, .admin-product-table td { padding: 12px 10px; vertical-align: middle; }
.admin-product-table th:nth-child(1) { width: 28%; }.admin-product-table th:nth-child(2) { width: 12%; }.admin-product-table th:nth-child(3) { width: 12%; }.admin-product-table th:nth-child(4) { width: 16%; }.admin-product-table th:nth-child(5) { width: 94px; }.admin-product-table th:nth-child(6) { width: 90px; }.admin-product-table th:nth-child(7) { width: 132px; }
.admin-product-table tbody tr { height: 92px; }.admin-product-table .admin-product-thumb { width: 64px; height: 64px; flex: 0 0 64px; background-image: none !important; }.admin-product-table .admin-product-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }.admin-product-table .admin-product-cell { min-width: 0; }.admin-product-table .admin-product-title-block { min-width: 0; }.admin-product-table .admin-product-title-block strong { font-size: 14px; color: var(--admin-text); }.admin-product-table .admin-product-title-block span, .admin-product-table .admin-product-muted { font-size: 12px; }.admin-product-table .admin-product-chip-stack { gap: 4px; }.admin-product-featured-label { color: var(--admin-muted); font-size: 13px; }.admin-product-featured-label.is-featured { color: var(--admin-text); font-weight: 600; }
.admin-product-table .admin-ui-actions-col,
.admin-product-table .admin-ui-actions-cell { position: static; width: auto; min-width: 250px; max-width: none; text-align: left; white-space: normal; }
.admin-product-table .admin-ui-list-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px 12px; white-space: normal; }
.admin-product-table .admin-ui-action { font-size: 13px; line-height: 1.45; }

/* The publish-task list is a short operational queue, so keep each record scannable in one compact row. */
.admin-page .admin-product-task-table { min-width: 860px; table-layout: fixed; }
.admin-product-task-table th,
.admin-product-task-table td { padding: 8px 10px; }
.admin-product-task-table tbody tr { height: 48px; }
.admin-product-task-table th:nth-child(1),
.admin-product-task-table td:nth-child(1) { width: 184px; padding-left: 16px; }
.admin-product-task-table th:nth-child(2),
.admin-product-task-table td:nth-child(2) { width: auto; }
.admin-product-task-table th:nth-child(3),
.admin-product-task-table td:nth-child(3) { width: 152px; }
.admin-product-task-table th:nth-child(4),
.admin-product-task-table td:nth-child(4) { width: 94px; }
.admin-product-task-table th:nth-child(5),
.admin-product-task-table td:nth-child(5) { width: 54px; text-align: center; }
.admin-product-task-table .admin-ui-actions-col,
.admin-product-task-table .admin-ui-actions-cell { width: 108px; min-width: 108px; max-width: 108px; }
.admin-product-task-table .admin-ui-list-actions { gap: 10px; }
.admin-product-task-code,
.admin-product-task-title,
.admin-product-task-oem { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-product-task-code { color: var(--admin-muted); font-family: Rajdhani, Barlow, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.admin-product-task-title { color: var(--admin-text); font-size: 14px; font-weight: 600; }
.admin-product-task-oem,
.admin-product-task-attachment-count { color: var(--admin-muted); font-size: 13px; }
.admin-product-task-table .admin-badge { padding: 3px 7px; font-size: 12px; line-height: 1.3; }
.admin-product-task-table .admin-ui-action { font-size: 13px; }
/* Product featured and display-order drawers */
.admin-product-sort-drawer[hidden] { display: none; }
.admin-product-sort-drawer { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: flex-end; background: rgba(18, 32, 51, .32); }
.admin-product-sort-panel { position: relative; display: flex; flex-direction: column; width: min(1080px, 100vw); height: 100%; overflow: hidden; padding: 22px 24px; background: var(--admin-surface, #fff); box-shadow: -12px 0 32px rgba(18, 32, 51, .16); }
.admin-product-sort-head { display: flex; flex: 0 0 auto; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.admin-product-sort-head h3 { margin: 0; font-size: 21px; line-height: 1.3; }
.admin-product-sort-head p, .admin-sort-help { margin: 5px 0 0; color: var(--admin-muted); font-size: 13px; line-height: 1.5; }
.admin-sort-count { margin-left: 8px; color: var(--admin-muted); font-size: 14px; font-weight: 500; }
.admin-product-drawer-close { border: 0; background: transparent; color: var(--admin-muted); font-size: 28px; line-height: 1; cursor: pointer; }
.admin-product-sort-panel form { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.admin-product-sort-body { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 45fr) minmax(0, 55fr); min-height: 0; border-top: 1px solid var(--admin-border, #e8edf3); border-bottom: 1px solid var(--admin-border, #e8edf3); }
.admin-sort-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 18px 16px 0; }
.admin-sort-selected-pane { padding-right: 0; padding-left: 22px; border-left: 1px solid var(--admin-border, #e8edf3); }
.admin-sort-pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.admin-sort-pane-head h4 { margin: 0; color: var(--admin-text); font-size: 15px; }
.admin-sort-pane-head p { margin: 0; color: var(--admin-muted); font-size: 13px; }
.admin-sort-filter-stack { display: grid; gap: 8px; margin-bottom: 12px; }
.admin-sort-search, .admin-sort-selects select { box-sizing: border-box; width: 100%; height: 42px; border: 1px solid var(--admin-border, #dce3eb); border-radius: 7px; background: var(--admin-surface, #fff); color: var(--admin-text); font: inherit; font-size: 13px; }
.admin-sort-search { padding: 0 12px; }
.admin-sort-selects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-sort-selects select { min-width: 0; padding: 0 9px; }
.admin-sort-candidate-list, .admin-sort-list { min-height: 0; overflow: auto; }
.admin-sort-candidate-list { display: grid; flex: 1 1 auto; align-content: start; gap: 4px; padding-right: 4px; }
.admin-sort-candidate { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 76px; padding: 7px 0; border-bottom: 1px solid var(--admin-border, #edf0f4); }
.admin-sort-product-image { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; overflow: hidden; background: #f7f9fb; }
.admin-sort-product-image img { width: 100%; height: 100%; object-fit: contain; }
.admin-sort-product-copy { display: grid; min-width: 0; gap: 3px; }
.admin-sort-product-copy strong, .admin-sort-product-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-sort-product-copy strong { color: var(--admin-text); font-size: 14px; line-height: 1.35; }
.admin-sort-product-copy small { color: var(--admin-muted); font-size: 12px; line-height: 1.3; }
.admin-sort-add { min-width: 62px; min-height: 32px; padding: 4px 9px; font-size: 12px; }
.admin-sort-add.is-added { color: var(--admin-muted); }
.admin-sort-pagination { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; color: var(--admin-muted); font-size: 12px; }
.admin-sort-pagination > div { display: inline-flex; align-items: center; gap: 8px; }
.admin-sort-pagination button { width: 25px; height: 25px; padding: 0; border: 1px solid var(--admin-border, #dce3eb); border-radius: 5px; background: var(--admin-surface, #fff); color: var(--admin-text); cursor: pointer; }
.admin-sort-pagination button:disabled { cursor: default; opacity: .45; }
.admin-sort-list { display: grid; flex: 1 1 auto; align-content: start; gap: 6px; padding: 8px 4px 8px 0; }
.admin-sort-selected-pane > .admin-sort-search { flex: 0 0 auto; margin: 0 0 10px; }
.admin-sort-row { display: grid; grid-template-columns: 18px 23px 52px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 72px; padding: 7px 9px; border: 1px solid transparent; background: var(--admin-surface, #fff); cursor: grab; }
.admin-sort-row:hover { border-color: var(--admin-border, #e8edf3); }
.admin-sort-row.is-dragging { opacity: .45; }
.admin-sort-row.is-located { border-color: rgba(28, 92, 166, .42); background: rgba(28, 92, 166, .07); transition: background .2s ease; }
.admin-sort-row .admin-sort-product-image { width: 52px; height: 52px; }
.admin-sort-handle { color: var(--admin-muted); cursor: grab; font-size: 16px; }
.admin-sort-row b { color: var(--admin-muted); font-size: 13px; font-weight: 600; }
.admin-sort-remove { border: 0; background: transparent; color: var(--admin-muted); cursor: pointer; font: inherit; font-size: 12px; }
.admin-sort-remove:hover { color: var(--admin-text); }
.admin-sort-empty { align-self: center; margin: auto; color: var(--admin-muted); text-align: center; font-size: 13px; line-height: 1.6; }
.admin-sort-actions { display: flex; flex: 0 0 auto; justify-content: flex-end; gap: 8px; padding-top: 16px; }
.admin-sort-confirm, .admin-sort-position-dialog { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: rgba(18, 32, 51, .26); }
.admin-sort-confirm[hidden], .admin-sort-position-dialog[hidden] { display: none; }
.admin-sort-confirm > div, .admin-sort-position-dialog > div { width: min(360px, 100%); padding: 20px; border: 1px solid var(--admin-border, #dce3eb); border-radius: 9px; background: var(--admin-surface, #fff); box-shadow: 0 12px 28px rgba(18, 32, 51, .16); }
.admin-sort-confirm strong, .admin-sort-position-dialog strong { display: block; color: var(--admin-text); font-size: 15px; }
.admin-sort-confirm p { margin: 7px 0 16px; color: var(--admin-muted); font-size: 13px; }
.admin-sort-confirm > div > div, .admin-sort-position-dialog > div > div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.admin-sort-position-dialog input { box-sizing: border-box; width: 100%; height: 40px; margin-top: 12px; padding: 0 10px; border: 1px solid var(--admin-border, #dce3eb); border-radius: 7px; font: inherit; }
@media (max-width: 760px) { .admin-product-sort-panel { padding: 18px; }.admin-product-sort-body { grid-template-columns: 1fr; overflow: auto; }.admin-sort-pane { min-height: 430px; padding: 16px 0; }.admin-sort-selected-pane { border-top: 1px solid var(--admin-border, #e8edf3); border-left: 0; }.admin-sort-row { grid-template-columns: 18px 22px 46px minmax(0, 1fr) auto; }.admin-sort-row .admin-sort-product-image { width: 46px; height: 46px; }.admin-sort-candidate { grid-template-columns: 54px minmax(0, 1fr) auto; }.admin-sort-product-image { width: 54px; height: 54px; } }

/* Product editor: single-column content flow for daily B2B product maintenance. */
[data-product-editor-shell] {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
[data-product-editor-shell] .admin-product-page-head {
  margin-bottom: 18px;
}
[data-product-editor-shell] .admin-product-page-title p {
  margin-bottom: 0;
}
.admin-product-edit-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
}
.admin-product-edit-back-link:hover {
  color: var(--admin-primary-dark);
}
.admin-product-edit-top-actions {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 10px 0 14px;
  background: rgba(248, 250, 252, 0.92);
  backdrop-filter: blur(6px);
}
.admin-product-edit-flow {
  display: grid;
  gap: 22px;
}
.admin-product-edit-section,
.admin-product-seo-editor {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
.admin-product-edit-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.admin-product-edit-section-head h3,
.admin-product-seo-editor summary strong {
  margin: 0;
  color: var(--admin-text);
  font-size: 17px;
  line-height: 1.3;
}
.admin-product-edit-section-head p,
.admin-product-seo-editor summary small {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}
.admin-product-edit-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
}
.admin-product-edit-section-grid > label:has(textarea),
.admin-product-edit-section-grid > .admin-product-fitment-field,
.admin-product-edit-section-grid > .admin-product-image-field {
  grid-column: 1 / -1;
}
.admin-product-edit-hint {
  margin: -4px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.5;
}
/* Uniform control sizing inside the editor (scoped; overrides the 38px admin token). */
.admin-body [data-product-editor-shell] form input:where(:not([type="checkbox"]):not([type="radio"]):not([type="file"])),
.admin-body [data-product-editor-shell] form select {
  height: 42px;
  min-height: 42px;
}
.admin-body [data-product-editor-shell] .admin-product-edit-top-actions .btn {
  height: 42px;
  min-height: 42px;
}
/* Uniform, compact field sizing inside the editor. */
[data-product-editor-shell] .admin-product-edit-section-grid > label,
[data-product-editor-shell] .admin-product-seo-editor-body > label {
  gap: 7px;
}
.admin-product-edit-section-grid textarea[name="oe_numbers"] {
  min-height: 64px;
}
.admin-product-edit-section-grid textarea[name="description"] {
  min-height: 150px;
}
.admin-product-edit-section .admin-product-fitment-editor-label {
  display: none;
}

/* Fitment: light table-style groups instead of nested cards. */
.admin-fitment-editor {
  display: grid;
  gap: 16px;
}
.admin-fitment-group {
  display: grid;
  gap: 10px;
}
.admin-fitment-group + .admin-fitment-group {
  margin-top: 2px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-line-soft);
}
.admin-fitment-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-fitment-brand-input {
  flex: 0 1 360px;
  min-width: 0;
  font-weight: 700;
}
.admin-text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--admin-primary);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.admin-text-button:hover { color: var(--admin-primary-dark); text-decoration: underline; }
.admin-fitment-remove-brand {
  color: #dc2626;
}
.admin-fitment-remove-brand:hover { color: #b91c1c; text-decoration: underline; }
.admin-fitment-table {
  display: grid;
  gap: 6px;
}
.admin-fitment-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: center;
}
.admin-fitment-row-head {
  padding: 0 2px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-body [data-product-editor-shell] .admin-fitment-row input {
  height: 40px;
  min-height: 40px;
  border-radius: 8px;
}
.admin-fitment-remove-model {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--admin-muted-soft);
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}
.admin-fitment-remove-model:hover {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}
.admin-fitment-add-model,
.admin-fitment-add-brand {
  justify-self: start;
}
.admin-fitment-add-brand {
  padding: 6px 2px;
}

/* SEO: collapsed by default, advanced fields only when expanded. */
.admin-product-seo-editor {
  padding: 0;
  overflow: hidden;
}
.admin-product-seo-editor summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  cursor: pointer;
  list-style: none;
}
.admin-product-seo-editor summary::-webkit-details-marker { display: none; }
.admin-product-seo-editor[open] summary { border-bottom: 1px solid var(--admin-line-soft); }
.admin-product-seo-editor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  padding: 20px 24px 24px;
}
.admin-product-seo-editor-body > .admin-seo-preview,
.admin-product-seo-editor-body > label:has(textarea),
.admin-product-seo-editor-body > label:has([name="canonical_override"]),
.admin-product-seo-editor-body > .admin-indexable {
  grid-column: 1 / -1;
}
.admin-seo-preview {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #e0e7ef;
  border-radius: 8px;
  background: #fbfdff;
}
.admin-seo-preview > span { color: var(--admin-muted); font-size: 12px; font-weight: 700; }
.admin-seo-preview strong { color: #1a0dab; font-size: 18px; font-weight: 500; line-height: 1.35; }
.admin-seo-preview em { overflow: hidden; color: #16803a; font-size: 13px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.admin-seo-preview p { margin: 2px 0 0; color: #4d5767; font-size: 13px; line-height: 1.5; }
.admin-indexable { grid-column: 1 / -1; }
.admin-indexable input[type="hidden"] { display: none; }
.admin-product-seo-editor-body textarea[name="remarks"] {
  min-height: 66px;
}

/* Product images: horizontal grid with hover controls. */
.admin-product-edit-section .admin-image-grid {
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 14px;
}
.admin-product-edit-section .admin-image-card {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}
.admin-product-edit-section .admin-image-card.is-cover {
  border-color: #6366f1;
}
.admin-product-edit-section .admin-image-preview {
  aspect-ratio: 4 / 3;
  margin: 0;
  border-radius: 0;
  background-color: #f8fafc;
  background-size: contain;
}
.admin-product-edit-section .admin-image-cover-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  margin: 0;
}
.admin-product-edit-section .admin-image-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  gap: 6px;
  padding: 16px 8px 8px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.55));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.admin-product-edit-section .admin-image-card:hover .admin-image-controls,
.admin-product-edit-section .admin-image-card:focus-within .admin-image-controls {
  opacity: 1;
  transform: none;
}
.admin-product-edit-section .admin-image-controls .btn {
  flex: 1;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border-color: transparent;
  background: rgba(255, 255, 255, 0.95);
  color: var(--admin-text);
  font-size: 12px;
  box-shadow: none;
}
.admin-product-edit-section .admin-image-controls .btn:hover {
  background: #fff;
  color: var(--admin-primary-dark);
}
.admin-product-edit-section .admin-image-controls .admin-btn-danger {
  color: #dc2626;
}
.admin-product-edit-section .admin-image-controls .btn[hidden] {
  display: none;
}
.admin-product-edit-section .admin-product-image-dropzone {
  min-height: 92px;
  padding: 14px;
}
@media (hover: none) {
  .admin-product-edit-section .admin-image-controls {
    position: static;
    padding: 8px;
    background: none;
    opacity: 1;
    transform: none;
  }
  .admin-product-edit-section .admin-image-controls .btn {
    border-color: var(--admin-line);
    background: #fff;
  }
}

@media (max-width: 780px) {
  .admin-product-edit-section,
  .admin-product-seo-editor-body { padding: 16px; }
  .admin-product-edit-section-grid,
  .admin-product-seo-editor-body { grid-template-columns: 1fr; }
  .admin-product-edit-top-actions { top: 0; }
  .admin-fitment-row { grid-template-columns: minmax(0, 1fr) 34px; }
  .admin-fitment-row-head { display: none; }
  .admin-fitment-model-name { grid-column: 1 / -1; }
  .admin-product-seo-editor summary { padding: 14px 16px; }
}

/* User, role, and capability management. */
.admin-access-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 0;
}

.admin-access-hero h2 {
  margin: 8px 0 0;
  color: var(--admin-text);
  font-size: 28px;
  line-height: 1.2;
}

.admin-access-hero p {
  max-width: 700px;
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.6;
}

.admin-settings-tabs {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 42px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-settings-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border-bottom: 2px solid transparent;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.admin-settings-tabs a:hover,
.admin-settings-tabs a:focus-visible {
  color: var(--admin-primary-dark);
}

.admin-settings-tabs a.is-active {
  border-bottom-color: var(--admin-primary);
  color: var(--admin-primary-dark);
}

.admin-access-panel {
  width: 100%;
}

.admin-access-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-access-filters label:first-of-type {
  flex: 1 1 300px;
}

.admin-access-filters input,
.admin-access-filters select {
  width: 100%;
}

.admin-access-filters select {
  min-width: 132px;
}

.admin-access-table {
  min-width: 820px;
}

.admin-access-table th,
.admin-access-table td {
  padding: 12px 14px;
}

.admin-access-table td:first-child {
  min-width: 210px;
}

.admin-access-subline {
  display: block;
  max-width: 320px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-access-form {
  max-width: 1080px;
}

.admin-access-form .admin-panel-head {
  margin-bottom: 2px;
}

.admin-access-form .admin-form-grid > label,
.admin-access-password {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-access-form label > span,
.admin-access-scope > span,
.admin-access-password > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 700;
}

.admin-access-password {
  max-width: 420px;
}

.admin-access-password small,
.admin-access-scope small,
.admin-access-scope-options small {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-user-create-modal {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .48);
}

.admin-user-create-modal[hidden] {
  display: none;
}

body.admin-body.is-admin-modal-open {
  overflow: hidden;
}

.admin-user-create-modal-card {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.admin-user-create-modal-head,
.admin-user-create-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.admin-user-create-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--admin-line);
  background: #fff;
}

.admin-user-create-modal-head h3 {
  margin: 3px 0 0;
  color: var(--admin-text);
  font-size: 20px;
  line-height: 1.25;
}

.admin-user-create-modal-close {
  display: inline-grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--admin-line);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-muted);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  line-height: 1;
}

.admin-user-create-modal-close:hover,
.admin-user-create-modal-close:focus-visible {
  border-color: #b7c5d6;
  color: var(--admin-text);
  outline: 0;
}

.admin-user-create-modal-body {
  padding: 22px;
}

.admin-user-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-user-create-grid > label,
.admin-user-create-scope {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.admin-user-create-grid > label > span,
.admin-user-create-scope > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 700;
}

.admin-user-create-grid .is-full {
  grid-column: 1 / -1;
}

.admin-user-create-scope {
  align-content: start;
  padding: 11px 13px;
  border: 1px solid #dce4ec;
  border-radius: 6px;
  background: #f8fafc;
}

.admin-user-create-scope strong {
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.35;
}

.admin-user-create-grid small,
.admin-user-create-scope small {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

.admin-user-create-modal-actions {
  position: sticky;
  bottom: 0;
  justify-content: flex-end;
  border-top: 1px solid var(--admin-line);
  background: #fff;
}

.admin-access-scope {
  display: grid;
  align-content: start;
  gap: 7px;
  padding-top: 1px;
}

.admin-access-scope strong {
  color: var(--admin-text);
  font-size: 14px;
  line-height: 40px;
}

.admin-access-scope-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-access-scope-options label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.admin-access-scope-options input {
  flex: 0 0 auto;
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  padding: 0;
}

.admin-access-scope-options label > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.admin-access-scope-options strong {
  color: var(--admin-text);
  font-size: 13px;
  line-height: 1.35;
}

.admin-access-scope-options .is-disabled {
  border-style: dashed;
  background: #f8fafc;
  cursor: not-allowed;
  opacity: 0.72;
}

.admin-access-capability-table {
  min-width: 760px;
  table-layout: fixed;
}

.admin-access-capability-table th,
.admin-access-capability-table td {
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
}

.admin-access-capability-table th:first-child {
  width: 150px;
  text-align: left;
}

.admin-capability-toggle {
  display: inline-grid;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid #d7e0e9;
  border-radius: 6px;
  background: #fff;
  color: #8a98a8;
  cursor: pointer;
  font: inherit;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.admin-capability-toggle:hover,
.admin-capability-toggle:focus-visible {
  border-color: var(--admin-primary);
  color: var(--admin-primary-dark);
  outline: 0;
}

.admin-capability-toggle:focus-visible {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}

.admin-capability-toggle.is-enabled {
  border-color: #65ae82;
  background: #edf9f1;
  color: #14733a;
}

.admin-capability-toggle.is-labeled {
  grid-template-columns: auto auto;
  gap: 4px;
  width: auto;
  min-width: 48px;
  padding: 0 7px;
}

.admin-capability-toggle-mark {
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.admin-capability-toggle-label {
  color: currentColor;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Customer management: dense operational view, scoped to the customer module. */
.admin-customers-main > .admin-customer-page-head {
  align-items: flex-start;
  gap: 16px;
}

.admin-customers-main > .admin-customer-page-head h2 {
  margin: 0;
  font-size: 24px;
}

.admin-customers-main > .admin-customer-page-head p {
  margin-top: 6px;
}

.admin-customers-main .admin-customer-list-card {
  overflow: hidden;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-control-bar {
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--admin-line);
}

.admin-customers-main .admin-customer-search-field {
  flex: 0 1 290px;
}

.admin-customers-main .admin-customer-search-field input {
  min-width: 250px;
  max-width: 320px;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid {
  gap: 8px;
}

.admin-customers-main .admin-customer-filter-grid .admin-customer-search-field {
  display: inline-flex;
  flex: 0 1 290px;
}

.admin-customers-main .admin-customer-filter-grid label {
  display: block;
}

.admin-customers-main .admin-customer-filter-grid select {
  width: 132px;
  min-width: 132px;
  max-width: 132px;
}

.admin-customers-main .admin-customer-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-customers-main .admin-customer-control-meta {
  flex-basis: auto;
  margin-left: 0;
}

/* Keep the file library as one dense list surface, including its empty state. */
.admin-customer-library-main .admin-library-card {
  display: block;
  gap: 0;
  padding: 0;
  border-radius: 8px;
}

.admin-customer-library-main .admin-library-control-bar {
  border-bottom: 1px solid var(--admin-line);
  border-radius: 0;
}

.admin-customer-library-main .admin-library-control-bar .admin-customer-filter-grid label:nth-child(1) select,
.admin-customer-library-main .admin-library-control-bar .admin-customer-filter-grid label:nth-child(3) select {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}

.admin-customer-library-main .admin-library-table-wrap,
.admin-customer-library-main .admin-library-table-card {
  border: 0;
  border-radius: 0;
}

.admin-customer-library-main .admin-library-table.is-empty {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-customer-library-main .admin-ui-pagination {
  border-top: 1px solid var(--admin-line);
  border-radius: 0;
}

.admin-customers-main .admin-customer-table-scroll {
  border-radius: 0;
}

.admin-customers-main .admin-customer-table-scroll table {
  min-width: 1360px;
  table-layout: fixed;
}

.admin-customers-main .admin-customer-table-scroll th,
.admin-customers-main .admin-customer-table-scroll td {
  padding: 10px 14px;
  vertical-align: middle;
}

.admin-customers-main .admin-customer-table-scroll tbody tr > td {
  height: 68px;
}

.admin-customers-main .admin-customer-table-scroll th:nth-child(1),
.admin-customers-main .admin-customer-table-scroll td:nth-child(1) { width: 190px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(2),
.admin-customers-main .admin-customer-table-scroll td:nth-child(2) { width: 130px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(3),
.admin-customers-main .admin-customer-table-scroll td:nth-child(3) { width: 150px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(4),
.admin-customers-main .admin-customer-table-scroll td:nth-child(4) { width: 220px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(5),
.admin-customers-main .admin-customer-table-scroll td:nth-child(5) { width: 160px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(6),
.admin-customers-main .admin-customer-table-scroll td:nth-child(6) { width: 290px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(7),
.admin-customers-main .admin-customer-table-scroll td:nth-child(7) { width: 150px; }

.admin-customers-main .admin-customer-table-scroll th:last-child,
.admin-customers-main .admin-customer-table-scroll td:last-child {
  position: sticky;
  right: 0;
  z-index: 2;
  border-left: 1px solid var(--admin-line);
  background: #fff;
}

.admin-customers-main .admin-customer-table-scroll th:last-child {
  z-index: 3;
  background: #f8fafc;
}

.admin-customers-main .admin-customer-table-scroll tbody tr:hover td:last-child {
  background: #fbfcfe;
}

.admin-customers-main .admin-crm-name-cell,
.admin-customers-main .admin-crm-market-cell,
.admin-customers-main .admin-crm-follow-cell,
.admin-customers-main .admin-crm-demand-cell,
.admin-customers-main .admin-customer-contact-cell {
  gap: 3px;
}

.admin-customers-main .admin-crm-name-cell span,
.admin-customers-main .admin-crm-market-cell span,
.admin-customers-main .admin-crm-follow-cell span,
.admin-customers-main .admin-crm-demand-cell span {
  overflow: hidden;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customers-main .admin-crm-demand-cell strong {
  overflow: hidden;
  display: block;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customer-stage-level {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--admin-text);
  white-space: nowrap;
}

.admin-customer-stage-level span {
  color: var(--admin-primary-dark);
  font-size: 13px;
  font-weight: 700;
}

.admin-customer-contact-cell {
  display: grid;
  min-width: 0;
}

.admin-customer-contact-cell > span {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 6px;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-customer-contact-cell small {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-customers-main .admin-empty-note {
  min-height: 0;
  padding: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--admin-muted);
  text-align: center;
}

.admin-customers-main .admin-ui-pagination {
  border-top: 1px solid var(--admin-line);
  border-radius: 0;
}

.admin-customer-create-drawer {
  justify-content: flex-end;
  padding: 0;
}

.admin-customer-create-drawer .admin-customer-create-modal-card {
  display: flex;
  flex-direction: column;
  width: min(680px, 100vw);
  max-width: 720px;
  height: 100vh;
  max-height: 100vh;
  margin-left: auto;
  overflow: hidden;
  border-width: 0 0 0 1px;
  border-radius: 0;
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
}

.admin-customer-create-drawer .admin-customer-modal-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  min-height: 64px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--admin-line);
  background: #fff;
}

.admin-customer-create-drawer .admin-customer-modal-head-copy h3 {
  margin: 0;
  font-size: 18px;
}

.admin-customer-create-drawer .admin-customer-modal-body {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.admin-customer-create-drawer .admin-customer-create-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 0;
}

.admin-customer-create-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 88px 24px 96px;
}

.admin-customer-create-section + .admin-customer-create-section {
  margin-top: 24px;
}

.admin-customer-create-section h4 {
  margin: 0 0 12px;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.4;
}

.admin-customer-create-drawer .admin-customer-create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.admin-customer-create-drawer .admin-customer-create-grid label {
  gap: 6px;
  font-size: 13px;
}

.admin-customer-create-drawer .admin-customer-create-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.admin-customer-create-drawer .admin-customer-modal-footer {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  min-height: 72px;
  padding: 16px 24px;
  border-top: 1px solid var(--admin-line);
  background: #fff;
}

@media (max-width: 760px) {
  .admin-customers-main > .admin-customer-page-head {
    display: grid;
  }

  .admin-customers-main .admin-customer-head-actions {
    width: 100%;
    margin-left: 0;
  }

  .admin-customers-main .admin-customer-head-actions .admin-actions {
    justify-content: flex-start;
  }

  .admin-customers-main .admin-customer-search-field,
  .admin-customers-main .admin-customer-search-field input {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .admin-customers-main .admin-customer-filter-grid,
  .admin-customers-main .admin-customer-filter-grid label,
  .admin-customers-main .admin-customer-filter-grid select {
    width: 100%;
    max-width: none;
  }

  .admin-customer-create-drawer .admin-customer-create-modal-card {
    width: 100%;
    max-width: none;
  }

  .admin-customer-create-drawer .admin-customer-create-grid {
    grid-template-columns: 1fr;
  }

  .admin-customer-create-drawer .admin-form-wide {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  .admin-access-scope-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-access-hero {
    align-items: flex-start;
  }

  .admin-access-hero h2 {
    font-size: 24px;
  }

  .admin-settings-tabs {
    gap: 16px;
  }

  .admin-access-filters,
  .admin-access-filters label,
  .admin-access-filters .btn {
    width: 100%;
  }

  .admin-access-filters select {
    min-width: 0;
  }

  .admin-access-table {
    min-width: 760px;
  }

  .admin-access-scope-options {
    grid-template-columns: 1fr;
  }

  .admin-access-scope-options label {
    min-height: 0;
  }

  .admin-access-password {
    max-width: none;
  }

  .admin-user-create-modal {
    align-items: end;
    padding: 0;
  }

  .admin-user-create-modal-card {
    width: 100%;
    max-height: min(760px, calc(100vh - 16px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .admin-user-create-modal-head,
  .admin-user-create-modal-body,
  .admin-user-create-modal-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-user-create-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .admin-user-create-grid .is-full {
    grid-column: auto;
  }
}

/* Generation jobs use the same full-width list surface as article management. */
.admin-page .admin-blogs-main .admin-blog-task-table {
  width: 100%;
  min-width: 820px;
  table-layout: fixed;
}

.admin-page .admin-blogs-main .admin-blog-row-title {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-line-clamp: unset;
}

.admin-blogs-main .admin-blog-task-table {
  min-width: 820px;
  table-layout: fixed;
}

.admin-blogs-main .admin-blog-task-table th:nth-child(1),
.admin-blogs-main .admin-blog-task-table td:nth-child(1) { width: 42%; }
.admin-blogs-main .admin-blog-task-table th:nth-child(2),
.admin-blogs-main .admin-blog-task-table td:nth-child(2) { width: 15%; }
.admin-blogs-main .admin-blog-task-table th:nth-child(3),
.admin-blogs-main .admin-blog-task-table td:nth-child(3),
.admin-blogs-main .admin-blog-task-table th:nth-child(4),
.admin-blogs-main .admin-blog-task-table td:nth-child(4) { width: 16%; }
.admin-blogs-main .admin-blog-task-table th:nth-child(5),
.admin-blogs-main .admin-blog-task-table td:nth-child(5) { width: 132px; }

.admin-blogs-main .admin-blog-task-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-blogs-main .admin-blog-task-content strong,
.admin-blogs-main .admin-blog-task-content span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-blogs-main .admin-blog-task-content strong {
  color: var(--admin-text);
  font-weight: 700;
}

.admin-blogs-main .admin-blog-task-table tr.is-tracked td {
  background: #fffaf9;
}

.admin-blogs-main .admin-blog-task-live-note {
  margin: 10px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-blogs-main .admin-blog-task-content span {
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-blogs-main .admin-blog-task-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #526273;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-blogs-main .admin-blog-task-status.is-queued,
.admin-blogs-main .admin-blog-task-status.is-pending {
  background: #fff7e6;
  color: #925c00;
}

.admin-blogs-main .admin-blog-task-status.is-running {
  background: #eaf2ff;
  color: #1d4ed8;
}

.admin-blogs-main .admin-blog-task-status.is-completed {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-blogs-main .admin-blog-task-status.is-failed {
  background: #fff0f0;
  color: #b42318;
}

.admin-blogs-main .admin-blog-ai-modal {
  z-index: 1100;
}

.admin-blogs-main .admin-blog-ai-modal-card {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  border-radius: 8px;
  overflow: hidden;
}

.admin-blogs-main .admin-blog-ai-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 0;
}

.admin-blogs-main .admin-blog-ai-modal-header h2 {
  font-size: 20px;
}

.admin-blogs-main .admin-blog-ai-modal-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.admin-blogs-main .admin-blog-ai-modal-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  max-height: calc(min(760px, 100vh - 48px) - 79px);
}

.admin-blogs-main .admin-blog-ai-modal-form .admin-blog-ai-modal-body {
  min-height: 0;
  overflow-y: auto;
}

.admin-blogs-main .admin-blog-ai-modal-body label {
  display: grid;
  gap: 8px;
}

.admin-blogs-main .admin-blog-ai-modal-body label > span {
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 600;
}

.admin-blogs-main .admin-blog-ai-modal-body label > span b {
  color: var(--admin-primary);
}

.admin-blogs-main .admin-blog-ai-modal-body input,
.admin-blogs-main .admin-blog-ai-modal-body select,
.admin-blogs-main .admin-blog-ai-modal-body textarea {
  width: 100%;
  margin: 0;
}

.admin-blogs-main .admin-blog-ai-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 24px;
  border-top: 1px solid var(--admin-border);
  padding-top: 16px;
}

@media (max-width: 680px) {
  .admin-blogs-main .admin-blog-ai-modal {
    align-items: end;
    padding: 0;
  }

  .admin-blogs-main .admin-blog-ai-modal-card {
    width: 100%;
    max-height: min(760px, calc(100vh - 12px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 8px 8px 0 0;
  }

  .admin-blogs-main .admin-blog-ai-modal-form {
    max-height: calc(min(760px, 100vh - 12px) - 79px);
  }

  .admin-blogs-main .admin-blog-ai-modal-header,
  .admin-blogs-main .admin-blog-ai-modal-body,
  .admin-blogs-main .admin-blog-ai-modal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }

  .admin-blogs-main .admin-blog-ai-modal-footer .btn {
    flex: 1 1 0;
  }
}

/* --------------------------------------------------------------------------
   Admin system layer
   This compatibility layer normalizes legacy page classes without changing
   their PHP data flows. Keep page-specific exceptions above this boundary.
   -------------------------------------------------------------------------- */

body.admin-body {
  font-size: 14px;
  line-height: 1.5;
}

.admin-sidebar {
  gap: var(--admin-space-4);
  padding: var(--admin-space-5) var(--admin-space-4);
  background: var(--admin-sidebar);
}

.admin-sidebar-nav {
  gap: var(--admin-space-4);
}

.admin-sidebar-section {
  gap: var(--admin-space-1);
}

.admin-sidebar-title {
  padding: 0 var(--admin-space-2);
  color: var(--admin-sidebar-muted);
  font-size: 11px;
}

.admin-sidebar-collapse {
  min-height: var(--admin-control-height-sm);
  border-radius: var(--admin-radius-sm);
}

.admin-sidebar-link {
  min-height: var(--admin-control-height);
  padding: 8px 10px;
  border-radius: var(--admin-radius-md);
}

.admin-sidebar-subnav {
  gap: 2px;
  padding-left: 18px;
}

.admin-sidebar-sublink {
  min-height: var(--admin-control-height-sm);
  padding: 7px 10px;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
}

.admin-sidebar-foot {
  gap: var(--admin-space-2);
  font-size: 13px;
}

.admin-sidebar-foot .btn-outline {
  min-height: var(--admin-control-height-sm);
  border-radius: var(--admin-radius-sm);
}

.admin-mobile-nav-backdrop,
.admin-mobile-nav-toggle {
  display: none;
}

.admin-main {
  padding: var(--admin-space-6) var(--admin-page-gutter) var(--admin-space-8);
}

.admin-topbar {
  min-height: 56px;
  margin-bottom: var(--admin-space-5);
  padding: 0 0 var(--admin-space-4);
  border-bottom: 1px solid var(--admin-line-soft);
}

.admin-topbar h1 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-topbar-actions {
  gap: var(--admin-space-2);
}

.admin-icon-button {
  width: var(--admin-control-height);
  height: var(--admin-control-height);
  border-radius: var(--admin-radius-md);
  box-shadow: none;
}

.admin-user-chip {
  min-height: var(--admin-control-height);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
}

.admin-user-avatar {
  border-radius: var(--admin-radius-sm);
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-section {
  gap: var(--admin-space-5);
}

.admin-inquiry-main,
.admin-products-main,
.admin-blogs-main,
.admin-customers-main,
.admin-customer-layout,
.admin-customer-library-main,
.admin-single-flow,
.admin-quote-form,
.admin-quote-layout,
.admin-quote-workflow {
  gap: var(--admin-space-5);
}

/* Buttons */
.admin-body .btn,
.admin-login-body .btn {
  min-height: var(--admin-control-height);
  padding: 0 14px;
  border-radius: var(--admin-radius-md);
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}

.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  box-shadow: 0 1px 2px rgba(159, 48, 40, 0.2);
}

.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
}

.admin-body .btn-outline,
.admin-login-body .btn-outline {
  border-color: var(--admin-line);
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: #f0a79f;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: var(--admin-danger);
  border-color: var(--admin-danger);
  color: #fff;
  box-shadow: none;
}

.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: var(--admin-control-height-sm);
  padding: 0 10px;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
}

/* Inputs, selects and text areas */
.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-body textarea {
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  box-shadow: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select {
  min-height: var(--admin-control-height);
}

.admin-body textarea {
  min-height: 96px;
}

.admin-body input::placeholder,
.admin-body textarea::placeholder {
  color: var(--admin-muted-soft);
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 53, 0.14);
}

.admin-body input:disabled,
.admin-body select:disabled,
.admin-body textarea:disabled {
  border-color: var(--admin-line-soft);
  background: #f2f4f7;
  color: var(--admin-muted);
  cursor: not-allowed;
}

.admin-body input[type="file"] {
  width: 100%;
  min-height: var(--admin-control-height);
  padding: 7px 9px;
  border: 1px dashed #b8c1ce;
  border-radius: var(--admin-radius-md);
  background: #fcfcfd;
  color: var(--admin-muted);
  cursor: pointer;
}

.admin-body input[type="file"]::file-selector-button {
  min-height: 24px;
  margin-right: 10px;
  padding: 0 8px;
  border: 0;
  border-radius: 4px;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* Headings, toolbars and form surfaces */
.admin-route-toolbar,
.admin-section-head,
.admin-inquiry-page-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-blogs-head,
.admin-access-hero {
  gap: var(--admin-space-4);
  margin-bottom: 0;
}

.admin-route-toolbar h2,
.admin-section-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-blogs-head h2,
.admin-access-hero h2 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-route-toolbar p,
.admin-section-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-blogs-head p,
.admin-access-hero p {
  margin: var(--admin-space-1) 0 0;
  color: var(--admin-muted);
  font-size: 14px;
  line-height: 1.55;
}

.admin-body .section-kicker {
  color: var(--admin-primary-strong);
  font-size: 11px;
  letter-spacing: .08em;
}

.admin-panel,
.admin-content-card,
.admin-surface-card,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-table-wrap,
.admin-site-media-card,
.admin-landing-list-card {
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-card);
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap {
  gap: var(--admin-space-4);
  padding: var(--admin-space-5);
}

/* A nested grouping is structural, not a second elevated card. */
.admin-panel .admin-panel,
.admin-content-card .admin-content-card,
.admin-panel .admin-content-card,
.admin-content-card .admin-panel,
.admin-panel .admin-table-wrap,
.admin-content-card .admin-table-wrap {
  border-radius: var(--admin-radius-md);
  box-shadow: none;
}

.admin-panel-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-customer-section-head {
  gap: var(--admin-space-3);
}

.admin-panel-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-customer-section-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.admin-panel-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-customer-section-head p {
  margin: var(--admin-space-1) 0 0;
  font-size: 13px;
}

.admin-form-grid,
.admin-quote-filter-grid,
.admin-quote-input-grid,
.admin-blog-ai-grid,
.admin-blog-status-grid,
.admin-customer-filter-grid,
.admin-settings-permissions-grid,
.admin-settings-users,
.admin-customer-info-grid,
.admin-customer-modal-grid,
.admin-customer-drawer-grid,
.admin-customer-profile-grid,
.admin-customer-create-grid,
.admin-followup-grid,
.admin-customer-file-grid {
  gap: var(--admin-space-3);
}

.admin-blog-form,
.admin-product-form,
.admin-quote-form,
.admin-blog-ai-panel,
.admin-blog-editor,
.admin-settings-form,
.admin-landing-job-form,
.admin-followup-compose,
.admin-attachment-upload-form,
.admin-customer-profile-form,
.admin-customer-create-form {
  gap: var(--admin-space-4);
}

.admin-actions,
.admin-topbar-actions,
.admin-list-toolbar-actions,
.admin-blog-head-actions,
.admin-product-page-actions,
.admin-landing-toolbar-actions,
.admin-customer-form-actions,
.admin-customer-modal-footer {
  gap: var(--admin-space-2);
}

/* Tabs and filter toolbars */
.admin-subnav-tabs,
.admin-quote-history-tabs {
  gap: 2px;
  margin: 0;
  padding: 3px;
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: #f2f4f7;
  box-shadow: none;
}

.admin-subnav-tabs a,
.admin-quote-history-tabs a {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 5px;
  font-size: 13px;
}

.admin-subnav-tabs a.is-active,
.admin-subnav-tabs a:hover,
.admin-quote-history-tabs a.is-active,
.admin-quote-history-tabs a:hover {
  background: var(--admin-surface);
  color: var(--admin-primary-strong);
  box-shadow: var(--admin-shadow-soft);
}

.admin-filter-bar,
.admin-filters,
.admin-list-toolbar,
.admin-bulk-toolbar,
.admin-customer-control-bar,
.admin-access-filters,
.admin-quote-history-toolbar,
.admin-blogs-main .admin-blog-filter-bar {
  gap: var(--admin-space-3);
  margin-bottom: 0;
  padding: var(--admin-space-3) var(--admin-space-4);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-filter-bar label,
.admin-filters label,
.admin-access-filters label,
.admin-quote-history-toolbar label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-list-toolbar-copy strong {
  color: var(--admin-text-strong);
  font-size: 16px;
}

/* Tables, row actions, dropdowns and pagination */
.admin-table-wrap {
  border-radius: var(--admin-radius-lg);
}

.admin-table th,
.admin-table td,
.admin-crm-table th,
.admin-crm-table td {
  padding: 12px var(--admin-space-4);
  border-bottom-color: var(--admin-line-soft);
}

.admin-table th,
.admin-crm-table th {
  background: #f9fafb;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.admin-table td,
.admin-crm-table td {
  color: #344054;
}

.admin-table tbody tr:hover,
.admin-crm-table tbody tr:hover {
  background: #fcfcfd;
}

.admin-ui-action,
.admin-ui-more summary,
.admin-ui-more-item,
.admin-ui-page-link,
.admin-ui-page-ellipsis {
  min-height: var(--admin-control-height-sm);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-sm);
  box-shadow: none;
  font-weight: 700;
}

.admin-ui-more summary {
  width: var(--admin-control-height-sm);
  height: var(--admin-control-height-sm);
}

.admin-ui-action-primary {
  border-color: #f4c7c2;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-ui-action-secondary:hover,
.admin-ui-action-primary:hover,
.admin-ui-more-item:hover {
  border-color: #f4c7c2;
  background: var(--admin-primary-soft);
}

.admin-ui-more-menu {
  z-index: 2000;
  padding: var(--admin-space-1);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-overlay);
}

.admin-ui-more-item {
  min-height: 32px;
  border-radius: 5px;
}

.admin-ui-pagination {
  padding: var(--admin-space-3) var(--admin-space-4);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
}

.admin-ui-page-link.is-active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-ui-page-size select {
  min-height: var(--admin-control-height-sm);
  border-radius: var(--admin-radius-sm);
}

/* Status, empty, loading and notices */
.admin-badge,
.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count,
.admin-blog-task-status {
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-badge-success,
.admin-product-status-badge,
.admin-blog-status-published,
.admin-blog-task-status.is-completed {
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.admin-badge-muted,
.admin-product-chip,
.admin-product-more-count,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-crm-stage,
.admin-crm-file-count {
  background: #f2f4f7;
  color: #475467;
}

.admin-blog-status-draft,
.admin-customer-level-chip,
.admin-blog-task-status.is-queued,
.admin-blog-task-status.is-pending {
  background: var(--admin-warning-soft);
  color: var(--admin-warning);
}

.admin-badge-danger,
.admin-blog-task-status.is-failed {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-empty-note,
.admin-empty-inline,
.admin-message-box {
  padding: var(--admin-space-4);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: #fcfcfd;
  color: var(--admin-muted);
}

.admin-ui-list-container.is-loading,
[data-admin-list].is-loading {
  position: relative;
  pointer-events: none;
  opacity: .58;
}

.admin-ui-list-container.is-loading::after,
[data-admin-list].is-loading::after {
  content: "";
  position: absolute;
  top: 12px;
  right: 14px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(194, 65, 53, 0.22);
  border-top-color: var(--admin-primary);
  border-radius: 50%;
  animation: admin-spin .7s linear infinite;
}

.admin-notice,
.admin-flash {
  padding: 12px var(--admin-space-4);
  border: 1px solid transparent;
  border-radius: var(--admin-radius-md);
  font-weight: 600;
}

.admin-notice-success,
.admin-flash-success {
  border-color: #abefc6;
  background: var(--admin-success-soft);
  color: var(--admin-success);
}

.admin-notice-error,
.admin-flash-error {
  border-color: #fecdca;
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-toast {
  right: var(--admin-space-5);
  bottom: var(--admin-space-5);
  padding: 11px 14px;
  border: 1px solid #344054;
  border-radius: var(--admin-radius-md);
  background: #1d2939;
  box-shadow: var(--admin-shadow-overlay);
  font-size: 14px;
  font-weight: 600;
}

/* Modal, drawer and upload shells */
.admin-modal-overlay,
.admin-confirm-modal-overlay,
.admin-delete-modal-overlay,
.admin-inquiry-dialog-overlay,
.admin-drawer {
  background: rgba(16, 24, 40, 0.48);
}

.admin-modal-card,
.admin-confirm-modal-card,
.admin-delete-modal-card,
.admin-inquiry-dialog-card,
.admin-drawer-card {
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-overlay);
}

.admin-modal-header,
.admin-customer-modal-header,
.admin-confirm-modal-header,
.admin-delete-modal-header {
  padding: var(--admin-space-5) var(--admin-space-5) 0;
}

.admin-modal-body,
.admin-confirm-modal-body,
.admin-delete-modal-body,
.admin-inquiry-dialog-body {
  padding: var(--admin-space-5);
}

.admin-confirm-modal-footer,
.admin-delete-modal-footer {
  padding: 0 var(--admin-space-5) var(--admin-space-5);
}

.admin-modal-close,
.admin-confirm-modal-close,
.admin-delete-modal-close,
.admin-inquiry-dialog-close,
.admin-drawer-close {
  width: var(--admin-control-height-sm);
  height: var(--admin-control-height-sm);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-sm);
  color: var(--admin-muted);
}

.admin-product-image-dropzone {
  min-height: 120px;
  border-color: #b8c1ce;
  border-radius: var(--admin-radius-md);
  background: #fcfcfd;
}

.admin-product-image-dropzone:hover,
.admin-product-image-dropzone:focus-visible {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-login-body * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 720px) {
  .admin-shell,
  .admin-shell.is-sidebar-collapsed {
    display: block;
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: fixed;
    z-index: 80;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, calc(100vw - 48px));
    height: 100vh;
    padding: var(--admin-space-5) var(--admin-space-4);
    transform: translateX(calc(-100% - 12px));
    transition: transform .18s ease;
    box-shadow: var(--admin-shadow-overlay);
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar {
    padding: var(--admin-space-5) var(--admin-space-4);
  }

  .admin-shell.is-sidebar-collapsed .admin-brand {
    justify-content: flex-start;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-copy,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-subnav {
    display: grid;
  }

  .admin-shell.is-sidebar-collapsed .admin-brand-copy {
    display: flex;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-title,
  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot-label {
    display: block;
  }

  .admin-shell.is-sidebar-collapsed .admin-nav-text,
  .admin-shell.is-sidebar-collapsed .admin-subnav-caret {
    display: inline;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-foot .btn-outline {
    display: inline-flex;
  }

  .admin-sidebar-collapse {
    display: none;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-link {
    justify-content: flex-start;
    padding: 8px 10px;
  }

  .admin-shell.is-mobile-nav-open .admin-sidebar {
    transform: translateX(0);
  }

  .admin-mobile-nav-backdrop {
    display: block;
    position: fixed;
    z-index: 70;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(16, 24, 40, .44);
    cursor: default;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  .admin-shell.is-mobile-nav-open .admin-mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-main {
    width: 100%;
    height: 100vh;
  }

  .admin-topbar {
    align-items: center;
    flex-direction: row;
    gap: var(--admin-space-2);
  }

  .admin-topbar-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: var(--admin-space-2);
  }

  .admin-topbar-heading h1 {
    white-space: nowrap;
  }

  .admin-mobile-nav-toggle {
    width: var(--admin-control-height);
    height: var(--admin-control-height);
    flex: 0 0 var(--admin-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid var(--admin-line);
    border-radius: var(--admin-radius-md);
    background: var(--admin-surface);
    color: var(--admin-text);
    font: inherit;
    font-size: 20px;
    cursor: pointer;
  }

  .admin-topbar-actions {
    width: auto;
    flex: 0 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
  }

  .admin-topbar-actions .btn-outline {
    display: none;
  }

  .admin-user-chip {
    min-width: var(--admin-control-height);
    padding: 3px;
  }

  .admin-user-meta {
    display: none;
  }

  .admin-main {
    padding: var(--admin-space-4);
  }

  .admin-topbar h1 {
    font-size: 22px;
  }

  .admin-panel,
  .admin-blog-ai-panel,
  .admin-blog-editor-main,
  .admin-blog-side-panel,
  .admin-product-form-wrap,
  .admin-product-list-wrap {
    padding: var(--admin-space-4);
    border-radius: var(--admin-radius-lg);
  }

  .admin-route-toolbar,
  .admin-section-head,
  .admin-product-page-head,
  .admin-customer-page-head,
  .admin-blogs-head,
  .admin-access-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-route-toolbar .admin-actions,
  .admin-section-head .admin-actions,
  .admin-product-page-head .admin-actions,
  .admin-customer-page-head .admin-actions,
  .admin-blogs-head .admin-actions,
  .admin-access-hero .admin-actions {
    width: 100%;
  }

  .admin-route-toolbar .btn,
  .admin-section-head .btn,
  .admin-product-page-head .btn,
  .admin-customer-page-head .btn,
  .admin-blogs-head .btn,
  .admin-access-hero .btn {
    flex: 1 1 auto;
  }

  .admin-ui-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-ui-page-controls {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* Keep the customer-create drawer fields on a single, predictable form rhythm. */
.admin-customer-create-drawer .admin-customer-create-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.admin-customer-create-drawer .admin-customer-create-grid > label {
  display: grid;
  grid-template-rows: auto minmax(var(--admin-control-height), auto);
  align-content: start;
  min-width: 0;
  gap: 8px;
}

.admin-customer-create-drawer .admin-customer-create-grid > label > span {
  display: block;
  min-height: 20px;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.admin-customer-create-drawer .admin-customer-create-grid > label > input,
.admin-customer-create-drawer .admin-customer-create-grid > label > select,
.admin-customer-create-drawer .admin-customer-create-grid > label > textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.admin-customer-create-drawer .admin-customer-create-grid > .admin-form-wide {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .admin-customer-create-drawer .admin-customer-create-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-customer-create-drawer .admin-customer-create-grid > .admin-form-wide {
    grid-column: auto;
  }
}

/* Keep list fields content-led instead of spreading across the entire panel. */
.admin-page .admin-table,
.admin-page .admin-crm-table,
.admin-page .admin-library-table,
.admin-page .admin-product-table,
.admin-page .admin-blog-table,
.admin-page .admin-inquiry-list-table,
.admin-page .admin-quote-history-batch-table table,
.admin-page .admin-quote-list-card table,
.admin-page .admin-customer-table-scroll table,
.admin-page .admin-landing-list-card table {
  width: auto;
  min-width: 0;
}

/* Access lists have a small, fixed set of fields; use the panel width instead of leaving an empty tail. */
.admin-page .admin-access-panel.admin-table-wrap > .admin-access-users-table,
.admin-page .admin-access-panel.admin-table-wrap > .admin-access-roles-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.admin-access-users-table th:nth-child(1),
.admin-access-users-table td:nth-child(1) { width: 35%; }
.admin-access-users-table th:nth-child(2),
.admin-access-users-table td:nth-child(2) { width: 13%; }
.admin-access-users-table th:nth-child(3),
.admin-access-users-table td:nth-child(3) { width: 15%; }
.admin-access-users-table th:nth-child(4),
.admin-access-users-table td:nth-child(4) { width: 10%; }
.admin-access-users-table th:nth-child(5),
.admin-access-users-table td:nth-child(5) { width: 17%; }
.admin-access-users-table th:nth-child(6),
.admin-access-users-table td:nth-child(6) { width: 10%; }

.admin-access-roles-table th:nth-child(1),
.admin-access-roles-table td:nth-child(1) { width: 22%; }
.admin-access-roles-table th:nth-child(2),
.admin-access-roles-table td:nth-child(2) { width: 10%; }
.admin-access-roles-table th:nth-child(3),
.admin-access-roles-table td:nth-child(3) { width: 18%; }
.admin-access-roles-table th:nth-child(4),
.admin-access-roles-table td:nth-child(4) { width: 40%; }
.admin-access-roles-table th:nth-child(5),
.admin-access-roles-table td:nth-child(5) { width: 10%; }

/* Customer list fields are intentionally one value per column. */
.admin-page .admin-customers-main .admin-customer-table-scroll table {
  width: 100%;
  min-width: 2200px;
  table-layout: fixed;
}

.admin-customers-main .admin-customer-table-scroll th:nth-child(1),
.admin-customers-main .admin-customer-table-scroll td:nth-child(1) { width: 150px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(2),
.admin-customers-main .admin-customer-table-scroll td:nth-child(2) { width: 180px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(3),
.admin-customers-main .admin-customer-table-scroll td:nth-child(3) { width: 110px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(4),
.admin-customers-main .admin-customer-table-scroll td:nth-child(4) { width: 70px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(5),
.admin-customers-main .admin-customer-table-scroll td:nth-child(5) { width: 150px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(6),
.admin-customers-main .admin-customer-table-scroll td:nth-child(6) { width: 130px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(7),
.admin-customers-main .admin-customer-table-scroll td:nth-child(7) { width: 260px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(8),
.admin-customers-main .admin-customer-table-scroll td:nth-child(8) { width: 160px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(9),
.admin-customers-main .admin-customer-table-scroll td:nth-child(9) { width: 130px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(10),
.admin-customers-main .admin-customer-table-scroll td:nth-child(10) { width: 130px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(11),
.admin-customers-main .admin-customer-table-scroll td:nth-child(11) { width: 220px; }
.admin-customers-main .admin-customer-table-scroll th:nth-child(12),
.admin-customers-main .admin-customer-table-scroll td:nth-child(12) { width: 180px; }

.admin-customers-main .admin-customer-list-value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Customer-list actions scroll with the rest of the table. */
.admin-customers-main .admin-customer-table-scroll th:last-child,
.admin-customers-main .admin-customer-table-scroll td:last-child {
  position: static;
  border-left: 0;
}

.admin-page .admin-table th,
.admin-page .admin-table td,
.admin-page .admin-crm-table th,
.admin-page .admin-crm-table td,
.admin-page .admin-library-table th,
.admin-page .admin-library-table td {
  padding: 9px 8px;
}

/* List actions stay visible as compact text controls instead of an overflow menu. */
.admin-page .admin-ui-actions-col,
.admin-page .admin-ui-actions-cell,
.admin-ui-actions-col,
.admin-ui-actions-cell {
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  white-space: nowrap;
}

.admin-page .admin-ui-actions-cell,
.admin-ui-actions-cell {
  overflow: visible;
  text-overflow: clip;
}

.admin-page .admin-ui-list-actions,
.admin-ui-list-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap !important;
  gap: 8px;
  max-width: none;
  white-space: nowrap;
}

.admin-page .admin-ui-list-actions form,
.admin-ui-list-actions form {
  display: inline-flex;
  margin: 0;
}

.admin-page .admin-ui-list-actions .admin-ui-action,
.admin-ui-list-actions .admin-ui-action {
  min-height: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--admin-primary-dark);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.admin-page .admin-ui-list-actions .admin-ui-action:hover,
.admin-page .admin-ui-list-actions .admin-ui-action-primary:hover,
.admin-page .admin-ui-list-actions .admin-ui-action-secondary:hover,
.admin-ui-list-actions .admin-ui-action:hover,
.admin-ui-list-actions .admin-ui-action-primary:hover,
.admin-ui-list-actions .admin-ui-action-secondary:hover {
  border-color: transparent;
  background: transparent;
  color: var(--admin-primary);
  transform: none;
}

.admin-page .admin-ui-list-actions .admin-ui-action.is-danger,
.admin-page .admin-ui-list-actions .admin-ui-action-danger,
.admin-ui-list-actions .admin-ui-action.is-danger,
.admin-ui-list-actions .admin-ui-action-danger {
  color: #b91c1c;
}

.admin-sort-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 3px 4px;
  max-width: 270px;
  white-space: normal;
}

.admin-sort-row-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--admin-primary-dark);
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}

.admin-sort-row-actions button:hover {
  background: transparent;
  color: var(--admin-primary);
}

.admin-sort-row:has(.admin-sort-row-actions) {
  grid-template-columns: 18px 23px 52px minmax(150px, 1fr) minmax(225px, 270px);
}

/* History detail is a flat dialog surface, not a nested table card. */
.admin-quote-history-modal .admin-quote-history-modal-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.admin-page .admin-quote-history-modal .admin-quote-history-modal-table {
  width: max(100%, 700px);
  min-width: 700px;
}

/* History quote entry uses its own legacy field grid. Keep it on the shared
   compact scale instead of stretching fields across the full form width. */
.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid,
.admin-page .admin-quote-history-entry-panel .admin-quote-entry-basic-grid {
  gap: var(--admin-space-2);
}

.admin-page .admin-quote-history-entry-panel .admin-quote-entry-basic-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label,
.admin-page .admin-quote-history-entry-panel .admin-quote-entry-basic-grid > label {
  gap: var(--admin-space-1);
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label:nth-child(1),
.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label:nth-child(3) {
  flex: 0 1 220px;
  max-width: 220px;
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label:nth-child(2) {
  flex: 0 1 180px;
  max-width: 180px;
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label:nth-child(4),
.admin-page .admin-quote-history-batch-form .admin-quote-entry-basic-grid > label:nth-child(5) {
  flex: 0 1 140px;
  max-width: 140px;
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-section,
.admin-page .admin-quote-history-entry-panel .admin-quote-entry-section {
  gap: var(--admin-space-2);
  padding: var(--admin-space-3);
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-content,
.admin-page .admin-quote-history-entry-panel .admin-quote-entry-content {
  margin-top: var(--admin-space-2);
}

.admin-page .admin-quote-history-batch-form .admin-quote-entry-dropzone {
  gap: var(--admin-space-2);
}

.admin-page .admin-quote-history-entry-modal-head {
  gap: var(--admin-space-2);
  padding: var(--admin-space-3) var(--admin-space-4);
}

.admin-page .admin-quote-history-entry-modal-card .admin-quote-history-batch-form,
.admin-page .admin-quote-history-entry-modal-card .admin-quote-history-confirm-panel {
  padding: var(--admin-space-3) var(--admin-space-4) var(--admin-space-4);
}

@media (max-width: 960px) {
  .admin-page .admin-quote-history-entry-panel .admin-quote-entry-basic-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-sort-row:has(.admin-sort-row-actions) {
    grid-template-columns: 18px 22px 46px minmax(0, 1fr) minmax(132px, 150px);
  }

  .admin-sort-row-actions {
    justify-content: flex-end;
    max-width: 150px;
  }
}

/* Publish tasks use a deliberately compact five-column table. The generic
   action-column reset above must not collapse its fixed table layout. */
.admin-page .admin-product-task-table {
  width: 100% !important;
  min-width: 720px !important;
  table-layout: fixed;
}

.admin-page .admin-product-task-table th:nth-child(1),
.admin-page .admin-product-task-table td:nth-child(1) {
  width: 180px;
}

.admin-page .admin-product-task-table th:nth-child(3),
.admin-page .admin-product-task-table td:nth-child(3) {
  width: 116px;
}

.admin-page .admin-product-task-table th:nth-child(4),
.admin-page .admin-product-task-table td:nth-child(4) {
  width: 64px;
}

.admin-page .admin-product-task-table .admin-ui-actions-col,
.admin-page .admin-product-task-table .admin-ui-actions-cell {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  text-align: left;
}

/* Product-image selection is triggered by the visible dropzone. Keep the
   native input visually hidden after the generic file-input rule is applied. */
.admin-body input.admin-product-image-input {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* Inquiry filters need a visible secondary reset action; global filter-link
   compaction is intentionally not applied to this paired action group. */
body.admin-body .admin-inquiry-filter-actions a.btn.btn-outline {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  color: var(--admin-text);
  box-shadow: none;
}

/* Keep the routine detail action visible while placing the destructive action
   in the existing overflow menu. */
body.admin-body .admin-inquiry-list-table {
  width: 100%;
  min-width: 0;
}

body.admin-body .admin-inquiry-list-table .admin-ui-actions-col,
body.admin-body .admin-inquiry-list-table .admin-ui-actions-cell {
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
}

body.admin-body .admin-inquiry-list-table .admin-ui-list-actions {
  gap: 8px;
}

/* The quote row keeps the primary detail action visible and groups download
   and deletion behind the existing overflow control. */
body.admin-body .admin-quote-list-card .admin-ui-actions-col,
body.admin-body .admin-quote-list-card .admin-ui-actions-cell {
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
}

body.admin-body .admin-quote-list-card .admin-ui-list-actions {
  gap: 8px;
}

/* These four inputs have different information density. Keep the short
   currency field compact without creating a stranded second row on desktop. */
@media (min-width: 761px) {
  body.admin-body .admin-quote-create-modal-form .admin-quote-new-input-grid {
    grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(180px, 1.4fr) minmax(110px, .7fr);
  }
}

/* Customer filters use one shared control row. Keep every field on the same
   baseline and let the whole row wrap together at narrower widths. */
.admin-customers-main:not(.admin-customer-library-main) .admin-customer-control-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--admin-space-3);
  padding: var(--admin-space-3) var(--admin-space-4);
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(132px, 1fr));
  align-items: center;
  gap: var(--admin-space-2);
  min-width: 0;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid label,
.admin-customers-main:not(.admin-customer-library-main) .admin-customer-search-field {
  display: block;
  min-width: 0;
  width: auto;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid select,
.admin-customers-main:not(.admin-customer-library-main) .admin-customer-search-field input {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--admin-space-2);
  min-width: max-content;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-actions .admin-customer-reset {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--admin-primary-strong);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-actions .admin-customer-reset:hover {
  color: var(--admin-primary);
}

@media (max-width: 1100px) and (min-width: 761px) {
  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-control-bar {
    grid-template-columns: 1fr;
  }

  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid {
    grid-template-columns: minmax(240px, 1.5fr) repeat(2, minmax(132px, 1fr));
  }

  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) and (min-width: 761px) {
  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid .admin-customer-search-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-control-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-grid {
    grid-template-columns: 1fr;
  }

  .admin-customers-main:not(.admin-customer-library-main) .admin-customer-filter-actions {
    justify-content: flex-start;
  }
}

.admin-page .admin-table-wrap:not(.admin-quote-history-modal-table-wrap):not(.admin-quote-items-table-wrap),
.admin-page .table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
}

.admin-page .admin-table-wrap:not(.admin-quote-history-modal-table-wrap):not(.admin-quote-items-table-wrap) > table:not(.admin-quote-history-table),
.admin-page .table-wrap > table {
  width: max-content !important;
  min-width: 100% !important;
  max-width: none;
  table-layout: auto !important;
}

.admin-page .admin-table-wrap:not(.admin-quote-history-modal-table-wrap):not(.admin-quote-items-table-wrap) .admin-ui-actions-col,
.admin-page .admin-table-wrap:not(.admin-quote-history-modal-table-wrap):not(.admin-quote-items-table-wrap) .admin-ui-actions-cell,
.admin-page .table-wrap .admin-ui-actions-col,
.admin-page .table-wrap .admin-ui-actions-cell {
  width: max-content !important;
  min-width: max-content !important;
  max-width: none !important;
}

.admin-page .admin-customers-main .admin-customer-table-scroll th:last-child,
.admin-page .admin-customers-main .admin-customer-table-scroll td:last-child {
  position: static;
  right: auto;
  left: auto;
  z-index: auto;
  border-left: 0;
}

.admin-page .admin-customers-main .admin-customer-table-scroll th:last-child {
  background: #f8fafc;
}

.admin-page .admin-customers-main .admin-customer-table-scroll td:last-child {
  background: transparent;
}

body.admin-body,
body.admin-login-body {
  --admin-page-max: 1640px;
  --admin-page-gutter: 28px;
  --admin-sidebar-width: 236px;
  --admin-primary-ring: rgba(194, 65, 53, .18);
  --admin-control-height: 38px;
  --admin-control-height-sm: 32px;
  --admin-radius-sm: 6px;
  --admin-radius-md: 8px;
  --admin-radius-lg: 8px;
  --admin-radius-xl: 10px;
  --admin-space-1: 4px;
  --admin-space-2: 8px;
  --admin-space-3: 12px;
  --admin-space-4: 16px;
  --admin-space-5: 20px;
  --admin-space-6: 24px;
  --admin-space-8: 32px;
  --admin-shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --admin-shadow-soft: 0 1px 2px rgba(16, 24, 40, .04);
  --admin-shadow-overlay: 0 16px 40px rgba(16, 24, 40, .18);
}

body.admin-body {
  background: #f8fafc;
  overflow: hidden;
}

.admin-shell {
  grid-template-columns: var(--admin-sidebar-width) minmax(0, 1fr);
}

.admin-shell.is-sidebar-collapsed {
  grid-template-columns: 72px minmax(0, 1fr);
}

.admin-sidebar {
  padding: 20px 14px;
  gap: 16px;
  background: var(--admin-sidebar);
}

.admin-brand {
  min-height: 42px;
  padding: 0 2px;
  gap: 10px;
}

.admin-brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  border-radius: 8px;
}

.admin-brand strong {
  font-size: 14px;
}

.admin-brand-kicker {
  font-size: 12px;
}

.admin-sidebar-collapse {
  min-height: 32px;
  border-radius: 6px;
}

.admin-sidebar-nav {
  gap: 16px;
}

.admin-sidebar-section {
  gap: 4px;
}

.admin-sidebar-title {
  padding: 0 10px 4px;
  font-size: 11px;
  letter-spacing: .04em;
}

.admin-sidebar-link {
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.admin-sidebar-link:hover {
  background: #eef2f6;
}

.admin-sidebar-link.is-active,
.admin-sidebar-group.has-active-child > .admin-sidebar-parent {
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-sidebar-sublink {
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.admin-sidebar-sublink.is-active {
  background: var(--admin-primary);
  color: #fff;
}

.admin-sidebar-foot {
  gap: 8px;
  padding-top: 12px;
  border-top-color: var(--admin-line-soft);
}

.admin-main {
  padding: 24px var(--admin-page-gutter) 40px;
  overflow-x: hidden;
}

.admin-topbar {
  width: min(100%, var(--admin-page-max));
  min-height: 62px;
  margin: 0 auto 24px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--admin-line-soft);
}

.admin-topbar h1 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-topbar-actions,
.admin-actions,
.admin-list-toolbar-actions,
.admin-blog-head-actions,
.admin-product-page-actions,
.admin-customer-head-actions,
.admin-customer-form-actions,
.admin-customer-modal-footer,
.admin-quote-form-actions {
  gap: 8px;
}

.admin-icon-button,
.admin-user-chip {
  min-height: var(--admin-control-height);
  border-radius: var(--admin-radius-md);
}

.admin-icon-button {
  width: var(--admin-control-height);
  height: var(--admin-control-height);
  box-shadow: none;
}

.admin-user-chip {
  padding: 4px 10px;
  background: var(--admin-surface);
}

.admin-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.admin-page,
.admin-section {
  width: min(100%, var(--admin-page-max));
  gap: 16px;
}

.admin-route-toolbar,
.admin-section-head,
.admin-inquiry-page-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-detail-hero,
.admin-inquiry-detail-hero,
.admin-quote-hero {
  gap: 16px;
  margin-bottom: 0;
}

.admin-route-toolbar h2,
.admin-section-head h2,
.admin-inquiry-page-head h2,
.admin-blogs-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-detail-hero h2,
.admin-inquiry-detail-hero h2,
.admin-quote-hero h2 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 22px;
  line-height: 1.35;
}

.admin-route-toolbar p,
.admin-section-head p,
.admin-inquiry-page-head p,
.admin-blogs-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-detail-hero p,
.admin-inquiry-detail-hero p,
.admin-quote-hero p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.55;
}

.admin-panel,
.admin-content-card,
.admin-surface-card,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap,
.admin-table-wrap,
.admin-site-media-card,
.admin-landing-list-card,
.admin-toolbar .result-card {
  border: 1px solid var(--admin-line-soft);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-card);
}

.admin-panel,
.admin-blog-ai-panel,
.admin-blog-editor-main,
.admin-blog-side-panel,
.admin-product-form-wrap,
.admin-product-list-wrap {
  gap: 16px;
  padding: 20px;
}

.admin-panel .admin-panel,
.admin-content-card .admin-content-card,
.admin-panel .admin-content-card,
.admin-content-card .admin-panel,
.admin-panel .admin-table-wrap,
.admin-content-card .admin-table-wrap {
  border-radius: var(--admin-radius-md);
  box-shadow: none;
}

.admin-panel-head,
.admin-blogs-head,
.admin-product-page-head,
.admin-customer-page-head,
.admin-customer-section-head,
.admin-modal-header,
.admin-customer-modal-header {
  gap: 12px;
}

.admin-panel-head h2,
.admin-product-page-head h2,
.admin-customer-page-head h2,
.admin-customer-section-head h2,
.admin-modal-header h2,
.admin-customer-modal-header h2,
.admin-quote-input-section h3,
.admin-blog-side-panel h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.admin-panel-head p,
.admin-product-page-head p,
.admin-customer-page-head p,
.admin-customer-section-head p,
.admin-modal-header p,
.admin-customer-modal-header p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.admin-body .btn,
.admin-login-body .btn {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--admin-radius-md);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}

.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  box-shadow: 0 1px 2px rgba(194, 65, 53, .2);
}

.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
  box-shadow: 0 2px 5px rgba(194, 65, 53, .22);
}

.admin-body .btn-outline,
.admin-login-body .btn-outline {
  border-color: var(--admin-line);
  background: var(--admin-surface);
}

.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: #e5aaa4;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-body textarea,
.admin-login-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  box-shadow: none;
  font-size: 14px;
}

.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-login-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
}

.admin-body textarea {
  min-height: 96px;
  height: auto;
  padding: 10px 12px;
  line-height: 1.55;
}

.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.admin-login-body input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px var(--admin-primary-ring);
}

.admin-body input:disabled,
.admin-body select:disabled,
.admin-body textarea:disabled {
  background: #f2f4f7;
}

.admin-filter-bar,
.admin-filters,
.admin-list-toolbar,
.admin-bulk-toolbar,
.admin-customer-control-bar,
.admin-library-control-bar,
.admin-access-filters,
.admin-quote-history-toolbar,
.admin-blogs-main .admin-blog-filter-bar {
  gap: 12px;
  margin-bottom: 0;
  padding: 16px;
  border: 1px solid var(--admin-line-soft);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  box-shadow: none;
}

.admin-filter-bar label,
.admin-filters label,
.admin-access-filters label,
.admin-quote-history-toolbar label {
  gap: 6px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-filter-bar input,
.admin-filter-bar select,
.admin-filters input,
.admin-filters select {
  min-width: 140px;
}

.admin-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.admin-table,
.admin-crm-table {
  min-width: 100%;
}

.admin-table th,
.admin-table td,
.admin-crm-table th,
.admin-crm-table td {
  padding: 10px 16px;
  border-bottom-color: var(--admin-line-soft);
}

.admin-table th,
.admin-crm-table th {
  height: 37px;
  background: #f9fafb;
  color: var(--admin-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.3;
  white-space: nowrap;
}

.admin-table td,
.admin-crm-table td {
  color: #344054;
  line-height: 1.5;
  vertical-align: middle;
}

.admin-table tbody tr:hover,
.admin-crm-table tbody tr:hover {
  background: var(--admin-primary-soft);
}

.admin-table-thumb,
.admin-product-thumb,
.admin-blog-cover-preview {
  border-radius: var(--admin-radius-md);
  object-fit: cover;
}

.admin-ui-actions-cell,
.admin-ui-actions-col {
  white-space: nowrap;
}

.admin-ui-action,
.admin-ui-more summary,
.admin-ui-more-item,
.admin-ui-page-link,
.admin-ui-page-ellipsis {
  min-height: var(--admin-control-height-sm);
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-sm);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

.admin-ui-action {
  padding: 0 10px;
}

.admin-ui-action-primary {
  border-color: #e9bdb8;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-ui-action-secondary {
  background: var(--admin-surface);
  color: var(--admin-muted);
}

.admin-ui-action-secondary:hover,
.admin-ui-action-primary:hover,
.admin-ui-more-item:hover {
  border-color: #e9bdb8;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-ui-more summary {
  width: 32px;
  height: 32px;
}

.admin-ui-more-menu {
  z-index: 2000;
  padding: 4px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  box-shadow: var(--admin-shadow-overlay);
}

.admin-ui-more-item {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
}

.admin-ui-pagination {
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--admin-line-soft);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
}

.admin-ui-page-link,
.admin-ui-page-ellipsis {
  min-width: 32px;
  min-height: 32px;
}

.admin-ui-page-link.is-active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
}

.admin-ui-page-size select {
  min-width: 86px;
  min-height: 32px;
  height: 32px;
  border-radius: var(--admin-radius-sm);
}

.admin-ui-page-jump {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-muted);
  font-size: 13px;
  white-space: nowrap;
}

.admin-ui-page-jump input {
  width: 64px;
  min-height: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-sm);
  color: var(--admin-text);
  text-align: center;
}

.admin-ui-page-jump button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-text);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.admin-ui-page-jump button:hover {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.admin-badge,
.admin-product-chip,
.admin-product-more-count,
.admin-product-status-badge,
.admin-blog-status,
.admin-status-badge,
.admin-risk-badge,
.admin-inquiry-tag,
.admin-crm-stage,
.admin-customer-level-chip,
.admin-crm-file-count,
.admin-blog-task-status {
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.admin-empty-note,
.admin-empty-inline,
.admin-message-box {
  padding: 20px 16px;
  border-color: var(--admin-line-soft);
  border-radius: var(--admin-radius-md);
  background: #fcfcfd;
  color: var(--admin-muted);
}

.admin-ui-list-container.is-loading,
[data-admin-list].is-loading {
  opacity: .62;
}

.admin-ui-list-container.is-loading::after,
[data-admin-list].is-loading::after {
  border-color: rgba(194, 65, 53, .22);
  border-top-color: var(--admin-primary);
}

.admin-notice,
.admin-flash {
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: var(--admin-radius-md);
  font-size: 14px;
  font-weight: 600;
}

.admin-toast {
  right: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: var(--admin-radius-md);
  background: #1d2939;
  box-shadow: var(--admin-shadow-overlay);
  font-size: 14px;
  font-weight: 600;
}

.admin-modal-overlay,
.admin-confirm-modal-overlay,
.admin-delete-modal-overlay,
.admin-inquiry-dialog-overlay,
.admin-drawer {
  padding: 24px;
  background: rgba(16, 24, 40, .48);
}

.admin-modal-card,
.admin-confirm-modal-card,
.admin-delete-modal-card,
.admin-inquiry-dialog-card,
.admin-drawer-card {
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: hidden;
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-overlay);
}

.admin-modal-header,
.admin-customer-modal-header,
.admin-confirm-modal-header,
.admin-delete-modal-header {
  padding: 20px 20px 0;
}

.admin-modal-body,
.admin-confirm-modal-body,
.admin-delete-modal-body,
.admin-inquiry-dialog-body {
  max-height: min(560px, calc(100vh - 170px));
  overflow-y: auto;
  padding: 20px;
}

.admin-confirm-modal-footer,
.admin-delete-modal-footer {
  padding: 0 20px 20px;
}

.admin-modal-close,
.admin-confirm-modal-close,
.admin-delete-modal-close,
.admin-inquiry-dialog-close,
.admin-drawer-close {
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-sm);
  font-size: 20px;
}

.admin-drawer {
  align-items: stretch;
  justify-content: flex-end;
  padding: 0;
}

.admin-drawer-card {
  width: min(640px, 100%);
  height: 100%;
  max-height: none;
  border-width: 0 0 0 1px;
  border-radius: 0;
  overflow-y: auto;
}

.admin-product-image-dropzone {
  min-height: 120px;
  border-color: #b8c1ce;
  border-radius: var(--admin-radius-md);
  background: #fcfcfd;
}

.admin-product-image-dropzone:hover,
.admin-product-image-dropzone:focus-visible {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
}

.admin-page img,
.admin-main img {
  max-width: 100%;
}

.admin-page .admin-table-wrap > table,
.admin-page .table-wrap > table {
  max-width: none;
}

@media (max-width: 1180px) and (min-width: 721px) {
  body.admin-body {
    --admin-page-gutter: 20px;
  }

  .admin-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .admin-shell.is-sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .admin-topbar {
    margin-bottom: 20px;
  }

  .admin-main {
    padding-top: 20px;
  }
}

@media (max-width: 720px) {
  body.admin-body {
    --admin-page-gutter: 16px;
  }

  .admin-main {
    padding: 16px var(--admin-page-gutter) 24px;
  }

  .admin-topbar {
    min-height: 52px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .admin-topbar h1 {
    font-size: 20px;
  }

  .admin-panel,
  .admin-blog-ai-panel,
  .admin-blog-editor-main,
  .admin-blog-side-panel,
  .admin-product-form-wrap,
  .admin-product-list-wrap {
    padding: 16px;
  }

  .admin-route-toolbar,
  .admin-section-head,
  .admin-inquiry-page-head,
  .admin-blogs-head,
  .admin-product-page-head,
  .admin-customer-page-head,
  .admin-detail-hero,
  .admin-inquiry-detail-hero,
  .admin-quote-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-route-toolbar .admin-actions,
  .admin-section-head .admin-actions,
  .admin-product-page-head .admin-actions,
  .admin-customer-page-head .admin-actions,
  .admin-blogs-head .admin-actions,
  .admin-quote-hero .admin-actions {
    width: 100%;
  }

  .admin-route-toolbar .btn,
  .admin-section-head .btn,
  .admin-product-page-head .btn,
  .admin-customer-page-head .btn,
  .admin-blogs-head .btn,
  .admin-quote-hero .btn {
    flex: 1 1 auto;
  }

  .admin-filter-bar,
  .admin-filters,
  .admin-list-toolbar,
  .admin-bulk-toolbar,
  .admin-customer-control-bar,
  .admin-library-control-bar {
    align-items: stretch;
    padding: 12px;
  }

  .admin-filter-bar label,
  .admin-filters label {
    width: 100%;
  }

  .admin-filter-bar input,
  .admin-filter-bar select,
  .admin-filters input,
  .admin-filters select,
  .admin-inquiry-filter-keyword input,
  .admin-quote-filter-keyword input,
  .admin-customer-search-field input {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .admin-ui-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-ui-page-controls {
    max-width: 100%;
    overflow-x: auto;
  }

  .admin-modal-overlay,
  .admin-confirm-modal-overlay,
  .admin-delete-modal-overlay,
  .admin-inquiry-dialog-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .admin-modal-card,
  .admin-confirm-modal-card,
  .admin-delete-modal-card,
  .admin-inquiry-dialog-card {
    max-height: calc(100vh - 24px);
  }

  .admin-modal-body,
  .admin-confirm-modal-body,
  .admin-delete-modal-body,
  .admin-inquiry-dialog-body {
    max-height: calc(100vh - 150px);
  }
}

/* Product list stays compact after removing the category column. */
.admin-product-page-panel .admin-product-table {
  min-width: 980px;
}

.admin-product-page-panel .admin-product-table th,
.admin-product-page-panel .admin-product-table td {
  padding: 8px 10px;
}

.admin-product-page-panel .admin-product-table tbody tr {
  height: 76px;
}

.admin-product-page-panel .admin-product-table .admin-product-cell {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 8px;
}

.admin-product-page-panel .admin-product-table .admin-product-thumb {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.admin-product-page-panel .admin-product-table th:nth-child(1),
.admin-product-page-panel .admin-product-table td:nth-child(1) { width: 36%; }
.admin-product-page-panel .admin-product-table th:nth-child(2),
.admin-product-page-panel .admin-product-table td:nth-child(2) { width: 18%; }
.admin-product-page-panel .admin-product-table th:nth-child(3),
.admin-product-page-panel .admin-product-table td:nth-child(3) { width: 110px; }
.admin-product-page-panel .admin-product-table th:nth-child(4),
.admin-product-page-panel .admin-product-table td:nth-child(4) { width: 100px; }
.admin-product-page-panel .admin-product-table th:nth-child(5),
.admin-product-page-panel .admin-product-table td:nth-child(5) { width: 150px; }

.admin-product-page-panel .admin-product-table .admin-ui-actions-col,
.admin-product-page-panel .admin-product-table .admin-ui-actions-cell {
  min-width: 220px;
  width: 220px;
  padding-inline: 8px;
}

.admin-product-page-panel .admin-product-table .admin-ui-list-actions {
  gap: 4px 10px;
}

.admin-product-page-panel .admin-product-status-badge.is-offline {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-sidebar-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--admin-muted);
}

.admin-sidebar-collapse-icon,
.admin-sidebar-collapse-icon svg {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
}

.admin-sidebar-collapse-icon svg {
  transition: transform .18s ease;
}

.admin-sidebar-link {
  gap: 11px;
  min-height: 48px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 700;
}

.admin-nav-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f4f7;
  color: #667085;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.admin-nav-svg {
  display: block;
  width: 19px;
  height: 19px;
}

.admin-sidebar-link:hover .admin-nav-icon,
.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link .admin-nav-icon {
  background: #fff0f0;
  color: var(--admin-primary);
}

.admin-sidebar-link:hover .admin-nav-icon {
  transform: translateY(-1px);
}

.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link,
.admin-sidebar-group.has-subnav.is-expanded > .admin-sidebar-link:hover {
  background: #fff8f8;
  border-color: #f8d5d5;
}

.admin-sidebar-link.is-active,
.admin-sidebar-link.is-active:hover {
  background: var(--admin-primary-soft);
  border-color: #f3caca;
  color: var(--admin-primary-strong);
  box-shadow: none;
}

.admin-sidebar-link.is-active .admin-nav-icon {
  background: var(--admin-primary);
  color: #fff;
  transform: none;
}

.admin-shell.is-sidebar-collapsed .admin-sidebar-link {
  justify-content: center;
  padding: 6px 0;
}

@media (max-width: 720px) {
  .admin-sidebar-collapse {
    display: none;
  }

  .admin-sidebar-link {
    min-height: 46px;
  }

  .admin-shell.is-sidebar-collapsed .admin-sidebar-link {
    justify-content: flex-start;
    padding: 8px 10px;
  }
}

/* Article management keeps high-density rows without reducing legibility. */
.admin-page .admin-blogs-main .admin-blog-filter-bar {
  gap: 8px;
  padding: 10px 12px;
}

.admin-page .admin-blogs-main .admin-blog-filter-bar input,
.admin-page .admin-blogs-main .admin-blog-filter-bar select,
.admin-page .admin-blogs-main .admin-blog-filter-submit {
  min-height: 34px;
}

.admin-page .admin-blogs-main .admin-blog-filter-submit {
  padding-inline: 14px;
}

.admin-page .admin-blogs-main .admin-table-wrap.admin-blog-table-wrap > .admin-blog-table {
  width: 100% !important;
  min-width: 900px !important;
  table-layout: fixed !important;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-blog-col-article {
  width: 45%;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-blog-col-category {
  width: 20%;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-blog-col-status {
  width: 12%;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-blog-col-seo {
  width: 10%;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-blog-col-actions {
  width: 13%;
}

.admin-page .admin-blogs-main .admin-blog-table th,
.admin-page .admin-blogs-main .admin-blog-table td {
  padding: 7px 10px;
}

.admin-page .admin-blogs-main .admin-blog-table th {
  height: 34px;
}

.admin-page .admin-blogs-main .admin-blog-table tbody tr > td {
  height: 52px;
}

.admin-page .admin-blogs-main .admin-blog-title-cell {
  min-height: 44px;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
}

.admin-page .admin-blogs-main .admin-blog-row-thumb {
  width: 44px;
  height: 44px;
}

.admin-page .admin-blogs-main .admin-blog-row-title {
  line-height: 1.35;
}

.admin-page .admin-blogs-main .admin-blog-category-brand {
  gap: 1px;
}

.admin-page .admin-blogs-main .admin-blog-status,
.admin-page .admin-blogs-main .admin-blog-seo-status {
  min-height: 22px;
  padding: 2px 7px;
}

.admin-page .admin-blogs-main .admin-table-wrap.admin-blog-table-wrap > .admin-blog-table .admin-ui-actions-col,
.admin-page .admin-blogs-main .admin-table-wrap.admin-blog-table-wrap > .admin-blog-table .admin-ui-actions-cell {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding-inline: 8px;
}

.admin-page .admin-blogs-main .admin-blog-table .admin-ui-list-actions {
  justify-content: flex-end;
  gap: 6px;
}

.admin-page .admin-blogs-main .admin-ui-more-floating {
  position: relative;
}

.admin-page .admin-blogs-main .admin-ui-more-trigger {
  display: inline-grid;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  place-items: center;
  padding: 0 0 6px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  cursor: pointer;
}

.admin-page .admin-blogs-main .admin-ui-more-trigger:hover,
.admin-page .admin-blogs-main .admin-ui-more-trigger[aria-expanded='true'] {
  border-color: #e9bdb8;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-ui-more-menu.is-floating {
  min-width: 112px;
  background: var(--admin-surface);
}

@media (max-width: 720px) {
  .admin-page .admin-blogs-main .admin-blog-filter-bar {
    gap: 8px;
    padding: 10px;
  }

  .admin-page .admin-blogs-main .admin-blog-filter-bar input,
  .admin-page .admin-blogs-main .admin-blog-filter-bar select,
  .admin-page .admin-blogs-main .admin-blog-filter-submit {
    width: 100%;
  }
}

/* Secondary navigation uses a restrained rail to keep the hierarchy clear. */
.admin-sidebar-subnav {
  position: relative;
  gap: 4px;
  margin: 2px 0 6px;
  padding: 6px 0 6px 28px;
}

.admin-sidebar-subnav::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 18px;
  width: 1px;
  background: linear-gradient(to bottom, transparent, #e5e8ec 10%, #e5e8ec 90%, transparent);
  content: '';
}

.admin-sidebar-sublink {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px 7px 15px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.25;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.admin-sidebar-sublink::before {
  position: absolute;
  top: 50%;
  left: -14px;
  width: 5px;
  height: 5px;
  border: 2px solid #c6cdd6;
  border-radius: 50%;
  background: #fff;
  content: '';
  transform: translateY(-50%);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.admin-sidebar-sublink:hover {
  border-color: #eceef1;
  background: #fff;
  box-shadow: 0 4px 12px rgba(16, 24, 40, .055);
  color: var(--admin-text-strong);
  transform: translateX(2px);
}

.admin-sidebar-sublink:hover::before {
  border-color: #a9b1bb;
  transform: translateY(-50%) scale(1.1);
}

.admin-sidebar-sublink.is-active,
.admin-sidebar-sublink.is-active:hover {
  border-color: #f4d6d6;
  background: linear-gradient(90deg, #fff0f0 0%, #fffafa 100%);
  box-shadow: 0 5px 14px rgba(170, 31, 31, .08);
  color: var(--admin-primary-strong);
  transform: none;
}

.admin-sidebar-sublink.is-active::before,
.admin-sidebar-sublink.is-active:hover::before {
  border-color: var(--admin-primary);
  background: var(--admin-primary);
  box-shadow: 0 0 0 4px rgba(190, 35, 35, .10);
}

.admin-sidebar-sublink:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar-sublink,
  .admin-sidebar-sublink::before {
    transition: none;
  }
}

.admin-page .admin-blogs-main .admin-blog-editor-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.admin-page .admin-blogs-main .admin-blogs-head {
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: 20px 24px;
  border: 1px solid #eadfe0;
  border-radius: 14px;
  background: linear-gradient(120deg, #fffafa 0%, #fff 68%);
  box-shadow: 0 8px 22px rgba(76, 34, 40, .05);
}

.admin-page .admin-blogs-main .admin-blogs-head h2 {
  letter-spacing: -.02em;
}

.admin-page .admin-blogs-main .admin-blog-top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-page .admin-blogs-main .admin-blog-editor-primary,
.admin-page .admin-blogs-main .admin-blog-editor-settings,
.admin-page .admin-blogs-main .admin-blog-editor-advanced .admin-blog-side-panel {
  min-width: 0;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: var(--admin-surface);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045);
}

.admin-page .admin-blogs-main .admin-blog-editor-primary {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-line-soft);
}

.admin-page .admin-blogs-main .admin-blog-editor-section-head > div {
  display: grid;
  gap: 5px;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-head h3 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 18px;
  letter-spacing: -.02em;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-head p {
  max-width: 340px;
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.admin-page .admin-blogs-main .admin-blog-editor-kicker {
  color: var(--admin-primary-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
}

.admin-page .admin-blogs-main .admin-blog-editor-title-field,
.admin-page .admin-blogs-main .admin-blog-editor-content-field {
  display: grid;
  gap: 9px;
}

.admin-page .admin-blogs-main .admin-blog-editor-title-field > span,
.admin-page .admin-blogs-main .admin-blog-editor-content-field > span,
.admin-page .admin-blogs-main .admin-blog-editor-form label > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 700;
}

.admin-page .admin-blogs-main .admin-blog-editor-title-field input {
  min-height: 54px;
  padding: 0 16px;
  border-color: #d8dde5;
  border-radius: 10px;
  background: #fff;
  color: var(--admin-text-strong);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.admin-page .admin-blogs-main .admin-blog-editor-title-field input::placeholder {
  color: #aab2bd;
  font-weight: 500;
}

.admin-page .admin-blogs-main .admin-blog-editor-title-field input:focus,
.admin-page .admin-blogs-main .admin-blog-content-input:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form input:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form select:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea:focus {
  border-color: #d99c98;
  box-shadow: 0 0 0 3px rgba(190, 65, 60, .1);
  outline: 0;
}

.admin-page .admin-blogs-main .admin-blog-content-input {
  min-height: 620px;
  padding: 20px;
  border-color: #d8dde5;
  border-radius: 10px;
  background: #fcfdff;
  color: #293241;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.85;
  resize: vertical;
}

.admin-page .admin-blogs-main .admin-blog-content-input::placeholder {
  color: #98a2b3;
}

.admin-page .admin-blogs-main .admin-blog-editor-content-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.admin-page .admin-blogs-main .admin-blog-editor-content-meta strong {
  flex: 0 0 auto;
  color: var(--admin-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.admin-page .admin-blogs-main .admin-blog-editor-settings {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.admin-page .admin-blogs-main .admin-blog-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-page .admin-blogs-main .admin-blog-settings-grid .admin-blog-side-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #fbfcfe;
}

.admin-page .admin-blogs-main .admin-blog-settings-grid h4,
.admin-page .admin-blogs-main .admin-blog-editor-advanced h4 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 15px;
  letter-spacing: -.01em;
}

.admin-page .admin-blogs-main .admin-blog-taxonomy-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-page .admin-blogs-main .admin-blog-taxonomy-fields label,
.admin-page .admin-blogs-main .admin-blog-publish-settings > label {
  display: grid;
  gap: 8px;
}

.admin-page .admin-blogs-main .admin-blog-editor-advanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.admin-page .admin-blogs-main .admin-blog-editor-advanced .admin-blog-side-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
}

.admin-page .admin-blogs-main .admin-blog-details summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 15px;
  font-weight: 750;
  list-style: none;
  cursor: pointer;
}

.admin-page .admin-blogs-main .admin-blog-details summary::-webkit-details-marker {
  display: none;
}

.admin-page .admin-blogs-main .admin-blog-details summary::after {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.5px solid var(--admin-muted);
  border-bottom: 1.5px solid var(--admin-muted);
  content: '';
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}

.admin-page .admin-blogs-main .admin-blog-details[open] summary::after {
  transform: rotate(225deg) translate(-1px, -2px);
}

.admin-page .admin-blogs-main .admin-blog-details summary small {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 500;
}

.admin-page .admin-blogs-main .admin-blog-seo-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-page .admin-blogs-main .admin-blog-seo-fields label,
.admin-page .admin-blogs-main .admin-blog-more-fields label {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-field-counter {
  color: var(--admin-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.admin-page .admin-blogs-main .admin-blog-field-counter.is-over-limit {
  color: #b42318;
  font-weight: 700;
}

.admin-page .admin-blogs-main .admin-blog-field-wide {
  grid-column: 1 / -1;
}

.admin-page .admin-blogs-main .admin-blog-more-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .62fr);
  align-items: start;
  gap: 16px;
}

.admin-page .admin-blogs-main .admin-blog-more-fields .admin-blog-cover-preview {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 150px;
  margin: 0;
  border: 1px solid var(--admin-line);
  border-radius: 10px;
}

.admin-page .admin-blogs-main .admin-blog-more-fields .admin-check-danger {
  grid-column: 2;
  grid-row: 3;
}

.admin-page .admin-blogs-main .admin-blog-editor-offline {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .admin-page .admin-blogs-main .admin-blog-editor-form {
    max-width: none;
  }

  .admin-page .admin-blogs-main .admin-blog-settings-grid,
  .admin-page .admin-blogs-main .admin-blog-editor-advanced {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .admin-page .admin-blogs-main .admin-blogs-head,
  .admin-page .admin-blogs-main .admin-blog-editor-primary,
  .admin-page .admin-blogs-main .admin-blog-editor-settings,
  .admin-page .admin-blogs-main .admin-blog-editor-advanced .admin-blog-side-panel {
    padding: 16px;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-section-head p {
    max-width: none;
    text-align: left;
  }

  .admin-page .admin-blogs-main .admin-blog-top-actions {
    justify-content: stretch;
  }

  .admin-page .admin-blogs-main .admin-blog-top-actions .btn {
    flex: 1 1 0;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-content-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .admin-page .admin-blogs-main .admin-blog-taxonomy-fields,
  .admin-page .admin-blogs-main .admin-blog-seo-fields,
  .admin-page .admin-blogs-main .admin-blog-more-fields {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-blogs-main .admin-blog-field-wide,
  .admin-page .admin-blogs-main .admin-blog-more-fields .admin-blog-cover-preview,
  .admin-page .admin-blogs-main .admin-blog-more-fields .admin-check-danger {
    grid-column: auto;
    grid-row: auto;
  }

  .admin-page .admin-blogs-main .admin-blog-content-input {
    min-height: 480px;
  }
}


/* ==========================================================================
   Admin login page (restored after the 5-app split: these rules lived in
   sections excluded when admin-base.css was extracted).
   ========================================================================== */
body.admin-body,
body.admin-login-body {
  /* Core design tokens. Page styles consume these aliases instead of new ad-hoc values. */
  --admin-page-max: 1600px;
  --admin-page-gutter: clamp(16px, 2.25vw, 32px);
  --admin-primary: #c24135;
  --admin-primary-dark: #9f3028;
  --admin-primary-soft: #fff0ed;
  --admin-primary-strong: #7f2722;
  --admin-text: #1d2939;
  --admin-text-strong: #101828;
  --admin-muted: #667085;
  --admin-muted-soft: #98a2b3;
  --admin-line: #d0d5dd;
  --admin-line-soft: #eaecf0;
  --admin-soft: #f8f9fb;
  --admin-surface: #ffffff;
  --admin-surface-raised: #ffffff;
  --admin-sidebar: #f7f8fa;
  --admin-sidebar-muted: #667085;
  --admin-success: #067647;
  --admin-success-soft: #ecfdf3;
  --admin-warning: #b54708;
  --admin-warning-soft: #fffaeb;
  --admin-danger: #b42318;
  --admin-danger-soft: #fef3f2;
  --admin-info: #175cd3;
  --admin-info-soft: #eff8ff;
  --admin-radius-sm: 6px;
  --admin-radius-md: 8px;
  --admin-radius-lg: 10px;
  --admin-radius-xl: 12px;
  --admin-control-height: 40px;
  --admin-control-height-sm: 32px;
  --admin-space-1: 4px;
  --admin-space-2: 8px;
  --admin-space-3: 12px;
  --admin-space-4: 16px;
  --admin-space-5: 20px;
  --admin-space-6: 24px;
  --admin-space-8: 32px;
  --admin-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.08);
  --admin-shadow-soft: 0 1px 2px rgba(16, 24, 40, 0.04);
  --admin-shadow-overlay: 0 20px 44px rgba(16, 24, 40, 0.18);
}


body.admin-body,
body.admin-login-body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


.admin-body *,
.admin-body *::before,
.admin-body *::after,
.admin-login-body *,
.admin-login-body *::before,
.admin-login-body *::after {
  box-sizing: border-box;
}


.admin-body a,
.admin-login-body a {
  color: inherit;
  text-decoration: none;
}


.admin-body img,
.admin-login-body img {
  display: block;
  max-width: 100%;
}


.admin-body .btn,
.admin-login-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}


.admin-body .btn:focus-visible,
.admin-login-body .btn:focus-visible,
.admin-body .admin-icon-button:focus-visible,
.admin-body .admin-sidebar-collapse:focus-visible,
.admin-body .admin-sidebar-link:focus-visible,
.admin-body .admin-sidebar-sublink:focus-visible,
.admin-body .admin-ui-action:focus-visible,
.admin-body .admin-ui-more summary:focus-visible,
.admin-body .admin-ui-page-link:focus-visible {
  outline: 3px solid rgba(220, 38, 38, 0.22);
  outline-offset: 3px;
}


.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}


.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
}


.admin-body .btn-outline,
.admin-login-body .btn-outline {
  background: #fff;
  border-color: var(--admin-line);
  color: var(--admin-text);
  box-shadow: 0 10px 22px rgba(16, 36, 79, 0.06);
}


.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: rgba(220, 38, 38, 0.32);
  color: var(--admin-primary-dark);
  background: #fff;
}


.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.16);
}


.admin-body .btn-danger:hover,
.admin-login-body .btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}


.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}


.admin-body .btn:disabled,
.admin-body .btn[disabled],
.admin-login-body .btn:disabled,
.admin-login-body .btn[disabled] {
  cursor: not-allowed;
  opacity: .58;
  box-shadow: none;
  transform: none;
}


body.admin-login-body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(36, 67, 143, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 67, 143, .045) 1px, transparent 1px),
    #f7f9fc;
  background-size: 56px 56px, 56px 56px, auto;
  color: #172033;
  font-family: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


.admin-login-shell {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: 56px;
}


.admin-login-identity {
  position: relative;
  min-height: 560px;
  padding: 28px 0;
  display: grid;
  align-content: space-between;
  gap: 40px;
}


.admin-login-identity::before {
  content: "";
  position: absolute;
  inset: 88px 0 88px 48px;
  z-index: -1;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, .1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(36, 67, 143, .1) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, .72), rgba(232, 239, 249, .72));
  background-size: 44px 44px, 44px 44px, auto;
}


.admin-login-brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  color: #172033;
  box-shadow: 0 14px 30px rgba(20, 40, 77, .08);
}


.admin-login-brand:focus-visible,
.admin-login-submit:focus-visible {
  outline: 3px solid rgba(220, 38, 38, .28);
  outline-offset: 3px;
}


.admin-login-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #edf1f7;
  border-radius: 8px;
  background: #fff;
}


.admin-login-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


.admin-login-brand strong,
.admin-login-brand small {
  display: block;
  letter-spacing: 0;
}


.admin-login-brand strong {
  color: #172033;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 800;
}


.admin-login-brand small {
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 600;
}


.admin-login-intro {
  max-width: 560px;
  display: grid;
  gap: 16px;
}


.admin-login-kicker {
  color: #0f766e;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}


.admin-login-intro h1,
.admin-login-card h2 {
  margin: 0;
  color: #172033;
  letter-spacing: 0;
}


.admin-login-intro h1 {
  max-width: 520px;
  font-size: 44px;
  line-height: 1.12;
  font-weight: 800;
}


.admin-login-intro p,
.admin-login-card-head p {
  margin: 0;
  color: #667085;
  line-height: 1.7;
}


.admin-login-intro p {
  max-width: 420px;
  font-size: 16px;
}


.admin-login-strip {
  display: grid;
  grid-template-columns: repeat(3, 88px);
  gap: 8px;
}


.admin-login-strip span {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid #e3e9f3;
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  color: #24438f;
  font-family: "Rajdhani", "Barlow", Arial, sans-serif;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(20, 40, 77, .07);
}


.admin-login-strip span:nth-child(3) {
  color: #b42318;
}


.admin-login-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 22px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(20, 40, 77, .1);
}


.admin-login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #eb251c, #0f766e, #24438f);
}


.admin-login-card-head {
  display: grid;
  gap: 8px;
}


.admin-login-card h2 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
}


.admin-login-card-head p {
  font-size: 15px;
}


.admin-login-card .admin-notice {
  padding: 12px 14px;
  border: 1px solid rgba(180, 58, 58, .16);
  border-radius: 8px;
  background: #fff7f7;
  color: #9f2f2f;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}


.admin-login-form {
  display: grid;
  gap: 18px;
}


.admin-login-field {
  display: grid;
  gap: 8px;
}


.admin-login-field span {
  color: #344054;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
}


.admin-login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #ccd6e4;
  border-radius: 8px;
  outline: 0;
  background: #fbfcfe;
  color: #172033;
  font: inherit;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}


.admin-login-form input:hover {
  border-color: #aebbd0;
}


.admin-login-form input:focus {
  border-color: var(--admin-primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12);
}


.admin-login-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 2px;
  border-radius: 8px;
  background: var(--admin-primary);
  box-shadow: 0 12px 24px rgba(220, 38, 38, .16);
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}


.admin-login-submit:hover {
  background: var(--admin-primary-dark);
  box-shadow: 0 14px 28px rgba(220, 38, 38, .2);
  transform: translateY(-1px);
}


.admin-login-submit:active {
  transform: translateY(0);
}


@media (max-width: 960px) {
  .admin-login-shell {
    width: min(680px, calc(100% - 40px));
    min-height: auto;
    padding: 32px 0;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 28px;
  }

  .admin-login-identity {
    min-height: auto;
    padding: 0;
    gap: 24px;
  }

  .admin-login-identity::before {
    inset: 56px -16px auto 80px;
    height: 180px;
    opacity: .72;
  }

  .admin-login-intro {
    gap: 12px;
  }

  .admin-login-intro h1 {
    max-width: 620px;
    font-size: 36px;
    line-height: 1.16;
  }

  .admin-login-intro p {
    max-width: 560px;
  }

  .admin-login-card {
    padding: 28px;
  }
}


@media (max-width: 640px) {
  body.admin-login-body {
    background-size: 44px 44px, 44px 44px, auto;
  }

  .admin-login-shell {
    width: calc(100% - 28px);
    min-height: 100svh;
    padding: 24px 0;
    gap: 22px;
  }

  .admin-login-identity {
    gap: 20px;
  }

  .admin-login-identity::before {
    inset: 64px -10px auto 42px;
    height: 150px;
    background-size: 36px 36px, 36px 36px, auto;
  }

  .admin-login-brand {
    max-width: 100%;
    padding: 8px 10px 8px 8px;
  }

  .admin-login-brand-mark {
    width: 38px;
    height: 38px;
  }

  .admin-login-intro h1 {
    font-size: 30px;
    line-height: 1.18;
  }

  .admin-login-intro p {
    font-size: 15px;
    line-height: 1.65;
  }

  .admin-login-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .admin-login-strip span {
    min-height: 46px;
    font-size: 18px;
  }

  .admin-login-card {
    padding: 22px;
    gap: 20px;
  }

  .admin-login-card h2 {
    font-size: 26px;
  }

  .admin-login-form {
    gap: 16px;
  }

  .admin-login-form input {
    height: 46px;
  }
}


@media (max-width: 380px) {
  .admin-login-intro h1 {
    font-size: 28px;
  }

  .admin-login-card {
    padding: 20px;
  }

  .admin-login-brand strong {
    font-size: 14px;
  }
}


@media (prefers-reduced-motion: reduce) {
  .admin-login-form input,
  .admin-login-submit {
    transition: none;
  }

  .admin-login-submit:hover {
    transform: none;
  }
}


/* Global admin UI baseline: compact, aligned, and shared across pages. */
body.admin-body,
body.admin-login-body {
  --admin-page-gutter: clamp(24px, 2.2vw, 32px);
  --admin-radius-lg: 12px;
  --admin-radius-md: 8px;
  --admin-control-height: 40px;
  --admin-control-radius: 8px;
  --admin-control-border: #d7dee9;
  --admin-control-placeholder: #9aa6b8;
  --admin-shadow-card: none;
  --admin-shadow-soft: none;
  font-size: 14px;
}


.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action,
.admin-sidebar-foot .btn-outline {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 16px;
  border-radius: var(--admin-control-radius);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}


.admin-body .btn:hover,
.admin-login-body .btn:hover,
.admin-icon-button:hover {
  transform: none;
}


.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}


.admin-body .btn-outline,
.admin-login-body .btn-outline {
  background: #fff;
  border-color: var(--admin-control-border);
  color: var(--admin-text);
}


.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
  box-shadow: none;
}


.admin-body .btn-danger:hover,
.admin-login-body .btn-danger:hover {
  background: #fef2f2;
  border-color: transparent;
  color: #991b1b;
}


.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}


.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-login-form input {
  border-color: var(--admin-control-border);
  border-radius: var(--admin-control-radius);
  background: #fff;
  color: var(--admin-text);
  font-size: 14px;
}


.admin-body input,
.admin-body select,
.admin-login-form input {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
  padding: 0 12px;
}


.admin-body input::placeholder,
.admin-body textarea::placeholder,
.admin-login-form input::placeholder {
  color: var(--admin-control-placeholder);
  opacity: 1;
}


.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.admin-login-form input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}


@media (max-width: 720px) {
  .admin-main,
  .admin-sidebar {
    padding: 20px 16px;
  }

  body.admin-body,
  body.admin-login-body {
    --admin-page-gutter: 16px;
  }

  .admin-section {
    gap: 18px;
  }

  .admin-panel,
  .admin-blog-ai-panel,
  .admin-blog-editor-main,
  .admin-blog-side-panel,
  .admin-product-form-wrap,
  .admin-product-list-wrap {
    padding: 18px;
    border-radius: 18px;
  }

  .admin-panel-head,
  .admin-blogs-head,
  .admin-product-page-head,
  .admin-route-toolbar,
  .admin-section-head,
  .admin-inquiry-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-actions,
  .admin-topbar-actions,
  .admin-blog-head-actions,
  .admin-product-page-actions {
    width: 100%;
  }

  .admin-actions .btn,
  .admin-topbar-actions .btn,
  .admin-blog-head-actions .btn,
  .admin-product-page-actions .btn {
    flex: 0 0 auto;
  }

  .admin-brand {
    align-items: center;
    flex-direction: row;
  }

  .admin-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-filter-bar label,
  .admin-filter-bar input,
  .admin-filter-bar select,
  .admin-filters input,
  .admin-filters select,
  .admin-inquiry-filter-actions,
  .admin-quote-filter-actions {
    width: 100%;
  }

  .admin-form-grid,
  .admin-blog-ai-grid,
  .admin-quote-filter-grid,
  .admin-quote-input-grid,
  .admin-customer-filter-grid,
  .admin-settings-permissions-grid {
    grid-template-columns: 1fr;
  }

  .admin-product-cell,
  .admin-blog-title-cell {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .admin-product-thumb,
  .admin-table-thumb {
    width: 56px;
    height: 56px;
  }

  .admin-inquiry-dialog-grid,
  .admin-inquiry-detail-grid,
  .admin-info-grid {
    grid-template-columns: 1fr;
  }

  .admin-inquiry-dialog-head,
  .admin-detail-hero,
  .admin-inquiry-detail-hero {
    flex-direction: column;
  }

  .admin-user-chip {
    max-width: 100%;
  }

  .admin-user-meta {
    flex-wrap: wrap;
    white-space: normal;
  }

  .admin-ui-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-ui-page-controls,
  .admin-ui-page-size {
    flex-wrap: wrap;
  }

  .admin-settings-user-row,
  .admin-settings-user-row-wide {
    grid-template-columns: 1fr;
  }
}


/* Final compact-admin overrides for legacy rules that appear later in the file. */
.admin-body input[type="checkbox"],
.admin-body input[type="radio"],
.admin-login-body input[type="checkbox"],
.admin-login-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
}


.admin-body input[type="radio"],
.admin-login-body input[type="radio"] {
  border-radius: 50%;
}


.admin-login-form input,
.admin-login-submit {
  min-height: 40px;
  height: 40px;
}


.admin-login-submit:hover {
  transform: none;
  box-shadow: none;
}


/* Final compact-admin overrides after legacy mobile and inline-like rules. */
.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action,
.admin-delete-modal-footer .btn,
.admin-confirm-modal-footer .btn {
  min-height: 40px;
  height: 40px;
  min-width: 0;
  padding: 0 16px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}


.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 13px;
}


.admin-body .btn-danger,
.admin-login-body .btn-danger,
.admin-delete-modal-footer .btn-danger,
.admin-confirm-modal-footer .btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
}


.admin-body input,
.admin-body select,
.admin-login-form input,
.admin-ui-page-size select {
  min-height: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
}


.admin-body input[type="checkbox"],
.admin-body input[type="radio"],
.admin-login-body input[type="checkbox"],
.admin-login-body input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}


.admin-body input,
.admin-body select,
.admin-body textarea,
.admin-login-form input,
.admin-ui-page-size select {
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font-size: 14px;
}


.admin-body input,
.admin-body select,
.admin-login-form input,
.admin-ui-page-size select {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
}


.admin-body .btn,
.admin-login-body .btn,
.admin-icon-button,
.admin-inline-action {
  min-height: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}


.admin-ui-action.is-danger,
.admin-ui-more-item.is-danger,
.admin-body .btn-danger,
.admin-login-body .btn-danger,
.admin-delete-modal-footer .btn-danger,
.admin-confirm-modal-footer .btn-danger {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
}


@media (max-width: 767px) {
  body.admin-body,
  body.admin-login-body {
    --admin-page-gutter: 16px;
  }

  .admin-main {
    padding: 20px var(--admin-page-gutter) 28px;
  }

  .admin-panel,
  .admin-blog-ai-panel,
  .admin-blog-editor-main,
  .admin-blog-side-panel,
  .admin-product-form-wrap,
  .admin-product-list-wrap,
  .admin-blog-manage-wrap {
    padding: 18px;
  }

  .admin-form-grid,
  .admin-quote-filter-grid,
  .admin-quote-input-grid,
  .admin-blog-ai-grid,
  .admin-customer-profile-grid,
  .admin-customer-create-grid,
  .admin-followup-grid,
  .admin-customer-info-grid,
  .admin-customer-modal-grid,
  .admin-customer-drawer-grid,
  .admin-customer-file-grid,
  .admin-settings-permissions-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-bar label,
  .admin-filters label,
  .admin-filter-bar input,
  .admin-filter-bar select,
  .admin-filters input,
  .admin-filters select,
  .admin-customer-search-field,
  .admin-customer-search-field input,
  .admin-customer-filter-grid,
  .admin-customer-filter-grid label,
  .admin-customer-filter-grid select,
  .admin-inquiry-filter-actions,
  .admin-quote-filter-actions {
    width: 100%;
    max-width: none;
  }
}


/* Buttons */
.admin-body .btn,
.admin-login-body .btn {
  min-height: var(--admin-control-height);
  padding: 0 14px;
  border-radius: var(--admin-radius-md);
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
}


.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  box-shadow: 0 1px 2px rgba(159, 48, 40, 0.2);
}


.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
}


.admin-body .btn-outline,
.admin-login-body .btn-outline {
  border-color: var(--admin-line);
  background: var(--admin-surface);
  box-shadow: none;
}


.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: #f0a79f;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}


.admin-body .btn-danger,
.admin-login-body .btn-danger {
  background: var(--admin-danger);
  border-color: var(--admin-danger);
  color: #fff;
  box-shadow: none;
}


.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: var(--admin-control-height-sm);
  padding: 0 10px;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
}


@media (prefers-reduced-motion: reduce) {
  .admin-body *,
  .admin-login-body * {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}


body.admin-body,
body.admin-login-body {
  --admin-page-max: 1640px;
  --admin-page-gutter: 28px;
  --admin-sidebar-width: 236px;
  --admin-primary-ring: rgba(194, 65, 53, .18);
  --admin-control-height: 38px;
  --admin-control-height-sm: 32px;
  --admin-radius-sm: 6px;
  --admin-radius-md: 8px;
  --admin-radius-lg: 8px;
  --admin-radius-xl: 10px;
  --admin-space-1: 4px;
  --admin-space-2: 8px;
  --admin-space-3: 12px;
  --admin-space-4: 16px;
  --admin-space-5: 20px;
  --admin-space-6: 24px;
  --admin-space-8: 32px;
  --admin-shadow-card: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --admin-shadow-soft: 0 1px 2px rgba(16, 24, 40, .04);
  --admin-shadow-overlay: 0 16px 40px rgba(16, 24, 40, .18);
}


.admin-body .btn,
.admin-login-body .btn {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--admin-radius-md);
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
}


.admin-body .btn-primary,
.admin-login-body .btn-primary {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  box-shadow: 0 1px 2px rgba(194, 65, 53, .2);
}


.admin-body .btn-primary:hover,
.admin-login-body .btn-primary:hover {
  background: var(--admin-primary-dark);
  border-color: var(--admin-primary-dark);
  box-shadow: 0 2px 5px rgba(194, 65, 53, .22);
}


.admin-body .btn-outline,
.admin-login-body .btn-outline {
  border-color: var(--admin-line);
  background: var(--admin-surface);
}


.admin-body .btn-outline:hover,
.admin-login-body .btn-outline:hover {
  border-color: #e5aaa4;
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}


.admin-body .btn-sm,
.admin-login-body .btn-sm {
  min-height: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--admin-radius-sm);
  font-size: 13px;
}


.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-body textarea,
.admin-login-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  border-color: var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: var(--admin-surface);
  box-shadow: none;
  font-size: 14px;
}


.admin-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.admin-body select,
.admin-login-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  min-height: var(--admin-control-height);
  height: var(--admin-control-height);
}


.admin-body input:focus,
.admin-body select:focus,
.admin-body textarea:focus,
.admin-login-body input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px var(--admin-primary-ring);
}


/* ==========================================================================
   Restored styles for: .admin-badge-warning, .sr-only
   (defined outside the sections included when this css was assembled).
   ========================================================================== */


.admin-badge-warning {
  background: #fff7e6;
  color: #8a5b00;
}


.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
   Phase 3 产品编辑器 V2（.admin-product-editor-v2 / .apev2-*）
   单列模块化结构：基础信息/适配/规格/供应/描述/图片/发布/SEO。
   ========================================================================== */
.admin-product-editor-v2 {
  display: grid;
  gap: 26px;
  max-width: 1120px;
}
.apev2-module {
  display: grid;
  gap: 14px;
  padding: 22px 24px;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}
.apev2-module-title {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 15px;
  font-weight: 800;
}
.apev2-module-desc {
  margin: -6px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
}
.apev2-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  align-items: start;
}
.apev2-span-2 {
  grid-column: 1 / -1;
}
.apev2-module label {
  display: grid;
  gap: 6px;
  margin: 0;
}
.apev2-module label > span {
  color: var(--admin-text);
  font-size: 12.5px;
  font-weight: 700;
}
.apev2-hint {
  color: var(--admin-muted);
  font-size: 11.5px;
  font-weight: 400 !important;
}
.admin-product-editor-v2 .admin-product-seo-editor {
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  background: #fff;
}
.apev2-savebar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-inline: -24px;
  padding: 12px 24px;
  border-top: 1px solid var(--admin-line-soft);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(4px);
}
.apev2-savebar .btn {
  height: 42px;
  min-height: 42px;
  padding-inline: 22px;
}

/* Fitment 编辑器 V2：品牌组 → 车型卡片（year/engine/chassis/generation/fuel） */
.admin-fitment-brand-label {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-fitment-model {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #fcfdff;
}
.admin-fitment-model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 34px;
  gap: 10px;
  align-items: end;
}
.admin-fitment-model-row label {
  display: grid;
  gap: 5px;
  margin: 0;
}
.admin-fitment-model-row label > span,
.admin-fitment-model-field > span {
  color: var(--admin-muted);
  font-size: 11.5px;
  font-weight: 700;
}
.admin-fitment-model-field {
  display: grid;
  gap: 5px;
  margin: 0;
}
.admin-fitment-tag-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  min-height: 42px;
  padding: 5px 8px;
  border: 1px solid var(--admin-line);
  border-radius: 8px;
  background: #fff;
}
.admin-fitment-tag-input input {
  flex: 1 1 120px;
  min-width: 120px;
  height: 28px;
  min-height: 28px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font-size: 13px;
}
.admin-fitment-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 9px;
  border-radius: 6px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 12.5px;
  font-weight: 600;
}
.admin-fitment-tag button {
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.admin-fitment-tag button:hover {
  background: rgba(29, 78, 216, 0.15);
}

@media (max-width: 900px) {
  .apev2-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Phase 4B：分类规格模板配置 + 产品编辑页动态规格
   ============================================================================ */
.admin-spec-scope-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}
.admin-spec-scope-form label {
  display: grid;
  gap: 6px;
  min-width: 250px;
  margin: 0;
}
.admin-spec-scope-form label > span {
  color: var(--admin-muted);
  font-size: 12.5px;
  font-weight: 700;
}

.admin-spec-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.admin-spec-panel-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}
.admin-spec-panel-head p {
  margin: 4px 0 0;
  color: var(--admin-muted);
  font-size: 12.5px;
}

.admin-spec-inherit-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  background: #f4f8ff;
}
.admin-spec-inherit-note p {
  margin: 0 0 8px;
  font-size: 13px;
}
.admin-spec-inherit-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}
.admin-spec-inherit-preview strong {
  font-size: 12.5px;
}
.admin-spec-chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: #e6efff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.admin-spec-template-list {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.admin-spec-template-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #fff;
}
.admin-spec-row-handle {
  color: var(--admin-muted);
}
.admin-spec-row-index {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 12px;
}
.admin-spec-row-copy {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}
.admin-spec-row-copy strong {
  font-size: 13.5px;
}
.admin-spec-row-copy small {
  color: var(--admin-muted);
  font-size: 11.5px;
}
.admin-spec-row-required {
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
}
.admin-spec-row-actions {
  display: flex;
  gap: 6px;
}
.admin-spec-row-actions .btn {
  height: 30px;
  min-height: 30px;
  padding-inline: 9px;
}
.admin-spec-template-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.admin-spec-template-spacer {
  flex: 1 1 auto;
}
.admin-spec-template-clear {
  margin-top: 10px;
}

.admin-spec-picker-search {
  margin-bottom: 10px;
  width: 100%;
}
.admin-spec-picker-list {
  display: grid;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}
.admin-spec-picker-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.admin-spec-picker-item:hover {
  border-color: #bcd2ff;
  background: #f7faff;
}
.admin-spec-picker-item[hidden] {
  display: none;
}
.admin-spec-picker-item.is-added {
  opacity: 0.5;
  cursor: not-allowed;
}
.admin-spec-picker-item strong {
  font-size: 13px;
}
.admin-spec-picker-item small {
  color: var(--admin-muted);
  font-size: 11.5px;
}
.admin-spec-picker-empty {
  color: var(--admin-muted);
  font-size: 12.5px;
}
.admin-spec-picker-footer {
  margin-top: 10px;
}

.admin-spec-definition-body {
  display: grid;
  gap: 12px;
}
.admin-spec-definition-body label {
  display: grid;
  gap: 6px;
  margin: 0;
}
.admin-spec-definition-body label > span {
  color: var(--admin-text);
  font-size: 12.5px;
  font-weight: 700;
}
.admin-spec-definition-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.admin-spec-definitions-table td code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #f1f5f9;
  font-size: 11.5px;
}
.admin-spec-definition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-spec-definition-actions .admin-inline-form {
  display: inline-block;
  margin: 0;
}

/* 产品编辑页动态规格字段（Phase 4B） */
.admin-spec-editor-note {
  margin: -2px 0 10px;
}
.admin-spec-field-input {
  display: flex;
  gap: 6px;
  align-items: center;
}
.admin-spec-field-input input {
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
}
.admin-spec-unit {
  flex: 0 0 auto;
  min-width: 30px;
  color: var(--admin-muted);
  font-size: 12.5px;
  font-weight: 600;
}
.admin-spec-required-star {
  color: #dc2626;
}

/* Phase 4C：分类展示配置 + 产品前台展示设置 */
.admin-spec-row-state select {
  height: 32px;
  min-height: 32px;
  padding: 2px 8px;
  border-radius: 8px;
}
.admin-spec-chip.is-off {
  background: #f1f5f9;
  color: var(--admin-muted);
}
.admin-module-order-mode-row {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 10px 0 12px;
}
.admin-radio-inline {
  display: inline-flex !important;
  gap: 6px;
  align-items: center;
  margin: 0 !important;
}
.admin-module-config-meta {
  color: var(--admin-muted);
  font-size: 12.5px;
  margin: 0 0 10px;
}
.admin-module-config-meta strong {
  color: var(--admin-text);
}

/* ==========================================================================
   Product Editor 信息架构收敛（site-specific，对应前端详情页结构）
   Product Images：独立模块，缩略图横排；Overview：紧凑表单；
   Details：Vehicle Fitment → Specifications 纵向排列。
   窄屏自然堆叠；不影响其它应用/页面。
   ========================================================================== */
.apev2-subsection-title {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 13.5px;
  font-weight: 800;
}
.apev2-details-block {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
.apev2-details-fitment,
.apev2-details-specs {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

/* ---- Product Images：紧凑缩略图横排（上传区 140-160px + 缩略图 120-140px）---- */
.apev2-product-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}
.apev2-product-images .admin-product-image-field {
  flex: 0 1 180px;
  width: 180px;
}
.apev2-product-images .admin-product-image-dropzone {
  width: 180px;
  height: 180px;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 10px;
  text-align: center;
  box-sizing: border-box;
}
.apev2-product-images .admin-product-image-feedback,
.apev2-product-images .admin-product-image-list {
  font-size: 11.5px;
}
.apev2-product-images .admin-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.apev2-product-images .admin-image-card {
  width: 180px;
  padding: 8px;
  border-radius: 10px;
  display: grid;
  grid-template-rows: 164px 22px 28px;
  gap: 6px;
  align-content: start;
}
.apev2-product-images .admin-image-thumb-preview {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.apev2-product-images .admin-image-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  margin: 0;
}
.apev2-product-images .admin-image-cover-row {
  min-height: 22px;
  display: flex;
  align-items: center;
}
.apev2-product-images .admin-image-cover-badge {
  margin: 0;
  font-size: 11px;
}
.apev2-product-images .admin-image-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.apev2-product-images .admin-image-controls .btn {
  height: 28px;
  min-height: 28px;
  padding-inline: 6px;
  font-size: 12px;
  width: 100%;
}
/* 主图时「设为主图」隐藏，但操作区行高固定，卡片高度完全一致。 */
.apev2-product-images .admin-image-controls .btn[hidden] {
  display: none;
}

/* 产品列表新增列：分类 / 产品品牌（轻量展示，不参与筛选）。 */
.admin-product-category-cell {
  color: var(--admin-muted);
  font-size: 12.5px;
  max-width: 200px;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   Product Details 编辑区（品牌分组 + 车型列表 + 规格键值表）
   覆盖旧 Phase 3 卡片式 Fitment 样式（同类名），作用域限定编辑器内。
   ========================================================================== */
/* 标题层级：Product Details 22px/600；Fitment / Specs 18px/600。 */
.apev2-details-section > .apev2-module-title {
  font-size: 22px;
  font-weight: 600;
}
.apev2-subsection-title {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 18px;
  font-weight: 600;
}

/* ---- Vehicle Fitment：品牌分组 + 车型列表 ---- */
.apev2-details-fitment .admin-fitment-editor {
  display: grid;
  gap: 22px;
}
.apev2-details-fitment .admin-fitment-group {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--admin-line-soft, #e4e9f2);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}
.apev2-details-fitment .admin-fitment-group + .admin-fitment-group {
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid var(--admin-line-soft, #e4e9f2);
}
/* 品牌行：Vehicle Make 输入与「删除品牌」同行相邻，删除不漂到最右。 */
.apev2-details-fitment .admin-fitment-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.apev2-details-fitment .admin-fitment-brand-input {
  flex: 0 1 220px;
  min-width: 140px;
  font-weight: 600;
}
.apev2-details-fitment .admin-fitment-remove-brand {
  margin-inline-start: 4px;
  font-size: 12px;
  font-weight: 600;
}
/* 车型列表：真正 grid 列布局 24% / 18% / 30% / 18% / 100px，全部对齐。 */
.apev2-details-fitment .admin-fitment-list-head,
.apev2-details-fitment .admin-fitment-row {
  display: grid;
  grid-template-columns: minmax(0, 24fr) minmax(0, 18fr) minmax(0, 30fr) minmax(0, 18fr) minmax(100px, 100px);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding-inline: 8px;
}
.apev2-details-fitment .admin-fitment-list-head {
  min-height: 32px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-block-end: 1px solid var(--admin-line-soft, #e4e9f2);
}
.apev2-details-fitment .admin-fitment-row {
  border-block-end: 1px solid var(--admin-line-soft, #edf1f6);
  font-size: 13px;
}
.apev2-details-fitment .admin-fitment-row:hover {
  background: #fbfcfe;
}
.apev2-details-fitment .admin-fitment-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}
.apev2-details-fitment .admin-fitment-cell-model {
  font-weight: 700;
}
.apev2-details-fitment .admin-fitment-cell-engine,
.apev2-details-fitment .admin-fitment-cell-chassis {
  color: var(--admin-muted);
}
.apev2-details-fitment .admin-fitment-cell-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  white-space: nowrap;
}
.apev2-details-fitment .admin-fitment-cell-actions .admin-text-button {
  font-size: 12.5px;
  white-space: nowrap;
}
/* 删除类操作：小号红色文字，不用大红按钮。 */
.admin-text-button.is-danger {
  color: #b42318;
}
.admin-text-button.is-danger:hover {
  color: #8f1d14;
}
/* 空品牌状态：不预置空车型占位。 */
.apev2-details-fitment .admin-fitment-empty {
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  color: var(--admin-muted);
  font-size: 13px;
  border-block-end: 1px solid var(--admin-line-soft, #edf1f6);
}
.apev2-details-fitment .admin-fitment-empty strong {
  color: var(--admin-text-strong);
}
/* 行内展开编辑区：与当前车型行关联，输入 42px。 */
.apev2-details-fitment .admin-fitment-edit-panel {
  display: grid;
  gap: 10px;
  margin-block: 6px;
  padding: 12px;
  border: 1px dashed var(--admin-line-soft, #d8e1f2);
  border-radius: 8px;
  background: #fbfcfe;
}
.apev2-details-fitment .admin-fitment-edit-panel label {
  display: grid;
  gap: 6px;
}
.apev2-details-fitment .admin-fitment-edit-panel label > span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}
.apev2-details-fitment .admin-fitment-edit-panel .admin-fitment-model-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.apev2-details-fitment .admin-fitment-edit-panel input {
  min-height: 42px;
}
.apev2-details-fitment .admin-fitment-cancel-draft {
  justify-self: start;
}
/* 添加按钮统一 secondary 样式。 */
.apev2-details-fitment .admin-fitment-add-model,
.apev2-details-fitment .admin-fitment-toolbar .admin-fitment-add-brand {
  justify-self: start;
}
.apev2-details-fitment .admin-fitment-toolbar {
  display: flex;
  justify-content: flex-start;
}

/* ---- Specifications：标准键值列表 ---- */
.apev2-details-specs .admin-spec-list-head,
.apev2-details-specs .admin-spec-row {
  display: grid;
  grid-template-columns: minmax(0, 30fr) minmax(0, 34fr) minmax(0, 16fr) minmax(72px, 72px);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding-inline: 8px;
}
.apev2-details-specs .admin-spec-list-head {
  min-height: 32px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border-block-end: 1px solid var(--admin-line-soft, #e4e9f2);
}
.apev2-details-specs .admin-spec-row {
  border-block-end: 1px solid var(--admin-line-soft, #edf1f6);
}
.apev2-details-specs .admin-spec-row.is-template .admin-spec-label-input {
  background: #f7f9fc;
}
.apev2-details-specs .admin-spec-row input {
  min-height: 42px;
}
.apev2-details-specs .admin-spec-cell {
  min-width: 0;
}
.apev2-details-specs .admin-spec-cell-actions {
  display: flex;
  justify-content: flex-end;
}
.apev2-details-specs .admin-spec-cell-actions .admin-text-button {
  font-size: 12.5px;
  white-space: nowrap;
}
.apev2-details-specs .admin-spec-remove-row {
  font-size: 12.5px;
}
.apev2-details-specs .admin-spec-required-star {
  color: #b42318;
}
.apev2-details-specs .apev2-spec-toolbar {
  display: flex;
  justify-content: flex-start;
}

/* Sticky 保存栏：表单底部留白，避免 Specifications 最后一行被遮挡。 */
.admin-product-editor-v2 {
  padding-block-end: 72px;
}

@media (max-width: 900px) {
  .apev2-details-fitment .admin-fitment-list-head,
  .apev2-details-fitment .admin-fitment-row {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr) minmax(92px, 92px);
  }
}

/* Fitment 车型草稿局部保存：按钮右下角对齐，主按钮保存、取消为文字按钮。 */
.apev2-details-fitment .admin-fitment-panel-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-block-start: 2px;
}
.apev2-details-fitment .admin-fitment-draft-error {
  margin: 0;
  color: #b42318;
  font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* Blog 统一发布工作台：工具栏 / 封面模块 / 发布底栏 / SEO 说明行        */
/* ------------------------------------------------------------------ */
.admin-blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(36, 67, 143, 0.12);
  border-radius: 8px;
  background: #f8fafc;
}

.admin-blog-toolbar button,
.admin-blog-toolbar-callout {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(36, 67, 143, 0.14);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text, #16325c);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.admin-blog-toolbar button:hover {
  border-color: rgba(36, 67, 143, 0.4);
  background: #eef3fb;
}

.admin-blog-toolbar-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: rgba(36, 67, 143, 0.14);
}

.admin-blog-toolbar-callout select {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.admin-blog-cover-module {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px 18px;
  align-items: start;
}

.admin-blog-cover-upload,
.admin-blog-cover-alt {
  display: grid;
  gap: 6px;
}

.admin-blog-cover-upload span,
.admin-blog-cover-alt span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-blog-cover-preview {
  grid-row: span 2;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(36, 67, 143, 0.22);
  border-radius: 8px;
  background: #f3f6fb center/cover no-repeat;
  color: #94a3b8;
  font-size: 12px;
}

.admin-blog-cover-preview.is-empty {
  background-color: #f3f6fb;
  background-image: none;
}

.admin-blog-editor-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(36, 67, 143, 0.1);
}

.admin-blog-editor-footer .btn {
  min-width: 120px;
  justify-content: center;
}

.admin-blog-btn-danger {
  margin-left: auto;
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.3);
}

.admin-blog-btn-danger:hover {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, 0.55);
}

.admin-blog-ai-modal-card {
  max-width: 560px;
}

/* ------------------------------------------------------------------ */
/* 博客编辑器：段落类型 / 实时预览 / 使用说明 Drawer                    */
/* ------------------------------------------------------------------ */
.admin-blog-toolbar-block select {
  min-height: 30px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(36, 67, 143, 0.16);
  border-radius: 6px;
  background: #fff;
  color: #16325c;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.admin-blog-editor-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
}

@media (max-width: 1180px) {
  .admin-blog-editor-body {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ */
/* 博客正文块编辑器 + 编辑/预览切换（无左右分栏）                       */
/* ------------------------------------------------------------------ */
.admin-blog-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.admin-blog-mode-switch button {
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(36, 67, 143, 0.18);
  border-radius: 6px;
  background: #fff;
  color: #36527d;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
}

.admin-blog-mode-switch button.is-active {
  background: #16325c;
  border-color: #16325c;
  color: #fff;
}

.admin-blog-mode-switch .admin-blog-help-open {
  margin-left: 6px;
}

.admin-blog-editor-body {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.admin-blog-editor-frame {
  position: relative;
  min-height: 420px;
  max-height: 480px;
  padding: 14px 16px;
  overflow-y: auto;
  border: 1px solid rgba(36, 67, 143, 0.2);
  border-radius: 10px;
  background: #fff;
  resize: vertical;
  scrollbar-width: thin;
}

.admin-blog-block-placeholder {
  padding: 40px 8px;
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.admin-blog-block-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-blog-block-editor[hidden] {
  display: none;
}

.admin-blog-block {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.admin-blog-block.is-focused {
  border-color: rgba(36, 67, 143, 0.28);
  background: #fbfcfe;
}

.admin-blog-block-badge {
  position: absolute;
  top: -8px;
  left: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #16325c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.admin-blog-block-heading,
.admin-blog-block-paragraph,
.admin-blog-block-callout-body {
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3d4a5c;
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
}

.admin-blog-block-heading:focus,
.admin-blog-block-paragraph:focus,
.admin-blog-block-callout-body:focus {
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(36, 67, 143, 0.18);
}

/* SEO 设置：默认展开、全宽两列平铺、字段样式统一 */
.admin-blog-seo-open {
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(36, 67, 143, 0.12);
  border-radius: 10px;
  background: #fbfcfe;
}

.admin-blog-seo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-blog-seo-head h3 {
  margin: 0;
  color: #062b62;
  font-size: 15px;
}

.admin-blog-seo-head p {
  margin: 0;
  color: #94a3b8;
  font-size: 12px;
}

.admin-blog-seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  align-items: start;
}

.admin-blog-seo-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.admin-blog-seo-column label {
  display: grid;
  gap: 5px;
}

.admin-blog-seo-column label > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-blog-seo-column label > small {
  color: #94a3b8;
  font-size: 11.5px;
  line-height: 1.5;
}

.admin-blog-seo-column input,
.admin-blog-seo-column textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(36, 67, 143, 0.16);
  border-radius: 7px;
  background: #fff;
  color: #16325c;
  font: inherit;
  font-size: 13.5px;
}

/* 只读自动值：与输入框同一套样式，仅弱化底色 */
.admin-blog-seo-column input[readonly] {
  background: #f4f7fb;
  color: #5a6c86;
  cursor: default;
}

/* 发布设置：两列元数据网格 */
.admin-blog-publish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid rgba(36, 67, 143, 0.12);
  border-radius: 10px;
  background: #fbfcfe;
}

.admin-blog-publish-grid label {
  display: grid;
  gap: 5px;
}

.admin-blog-publish-grid label > span,
.admin-blog-publish-readonly > span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.admin-blog-publish-grid input,
.admin-blog-publish-grid select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(36, 67, 143, 0.16);
  border-radius: 7px;
  background: #fff;
  color: #16325c;
  font: inherit;
  font-size: 13.5px;
}

.admin-blog-publish-readonly {
  display: grid;
  gap: 4px;
}

.admin-blog-publish-readonly small {
  color: #94a3b8;
  font-size: 12px;
}

.admin-blog-publish-grid .admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: end;
  min-height: 36px;
  color: #36527d;
  font-size: 13.5px;
  font-weight: 650;
}

@media (max-width: 900px) {
  .admin-blog-seo-grid,
  .admin-blog-publish-grid {
    grid-template-columns: 1fr;
  }
}

.admin-blog-block-heading.is-h2 {
  color: #062b62;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-blog-block-heading.is-h3 {
  color: #062b62;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-blog-block.is-callout {
  border: 1px solid #e2e9f2;
  border-left: 3px solid #7d9bc9;
  background: #f8fafc;
}

.admin-blog-block.is-callout.is-important {
  border-left-color: #d9972c;
}

.admin-blog-block.is-callout.is-warning {
  border-left-color: #c94f3d;
}

.admin-blog-block-callout-select {
  justify-self: start;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(36, 67, 143, 0.16);
  border-radius: 6px;
  background: #fff;
  color: #16325c;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
}

.admin-blog-block.is-table {
  padding-bottom: 10px;
}

.admin-blog-block-table-wrap {
  overflow-x: auto;
}

.admin-blog-block-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-blog-block-table th,
.admin-blog-block-table td {
  padding: 4px;
  border: 1px solid rgba(36, 67, 143, 0.14);
}

.admin-blog-block-table th input {
  font-weight: 700;
  background: #f3f6fa;
}

.admin-blog-block-table input {
  width: 100%;
  min-width: 90px;
  padding: 5px 7px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: #3d4a5c;
  font: inherit;
  font-size: 13.5px;
}

.admin-blog-block-table input:focus {
  outline: 2px solid rgba(36, 67, 143, 0.3);
}

.admin-blog-block-table-actions {
  display: flex;
  gap: 6px;
}

.admin-blog-block-table-actions button,
.admin-blog-block-image-remove {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(36, 67, 143, 0.16);
  border-radius: 5px;
  background: #fff;
  color: #36527d;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.admin-blog-block-table-actions button:hover,
.admin-blog-block-image-remove:hover {
  border-color: rgba(36, 67, 143, 0.4);
  background: #eef3fb;
}

.admin-blog-block.is-image {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
}

.admin-blog-block-image-media {
  grid-row: span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  border: 1px dashed rgba(36, 67, 143, 0.22);
  border-radius: 8px;
  background: #f6f8fc center/contain no-repeat;
}

.admin-blog-block-image-media img {
  display: block;
  max-width: 100%;
  max-height: 130px;
  border-radius: 6px;
}

.admin-blog-block-image-media.is-missing::before {
  content: "🖼 图片";
  color: #94a3b8;
  font-size: 12px;
}

.admin-blog-block-image-alt,
.admin-blog-block-image-caption {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid rgba(36, 67, 143, 0.14);
  border-radius: 6px;
  background: #fff;
  color: #3d4a5c;
  font: inherit;
  font-size: 13px;
}

.admin-blog-block-image-remove {
  justify-self: start;
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.3);
}

.admin-blog-frontend-preview {
  min-width: 0;
}

.admin-blog-preview-frame {
  display: block;
  width: 100%;
  min-height: 420px;
  border: 1px solid rgba(36, 67, 143, 0.14);
  border-radius: 10px;
  background: #fff;
}

/* ==========================================================================
   Blog 发布/编辑页：三模块统一卡片 + 统一交互态（文章内容 / SEO / 发布设置）
   覆盖历史分散的 blog editor 规则；作用域限定 .admin-page .admin-blogs-main。
   控件基线：40px 标准 / 32px 紧凑；focus = 主色单环（无 outline 双层框）。
   ========================================================================== */

/* ---- 1. 统一模块卡片：标题 -> 说明 -> 分割线 -> 内容区 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-editor-module {
  min-width: 0;
  display: grid;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: var(--admin-surface);
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-editor-module:hover {
  border-color: #c3cad6;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-line-soft);
}

.admin-page .admin-blogs-main .admin-blog-editor-section-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-title h3 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 18px;
  letter-spacing: -.02em;
}

.admin-page .admin-blogs-main .admin-blog-editor-section-title p {
  max-width: none;
  margin: 0;
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
}

.admin-page .admin-blogs-main .admin-blog-editor-kicker {
  color: var(--admin-primary-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1;
}

/* ---- 2. 控件统一态：浅边框白底 / hover 略深 / focus 主色单环 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-form label:not(.admin-check):not(.admin-blog-cover-replace):not(.admin-blog-toolbar-block):not(.admin-blog-toolbar-callout) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-form label > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input,
.admin-page .admin-blogs-main .admin-blog-editor-form select,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input,
.admin-page .admin-blogs-main .admin-blog-editor-form select {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea {
  min-height: 96px;
  padding: 9px 12px;
  line-height: 1.6;
  resize: vertical;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input::placeholder,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea::placeholder {
  color: #98a2b3;
  opacity: 1;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input:hover,
.admin-page .admin-blogs-main .admin-blog-editor-form select:hover,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea:hover {
  border-color: #b3bdcc;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form select:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
  outline: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input[readonly] {
  background: #f7f8fa;
  color: var(--admin-muted);
  cursor: default;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input:disabled,
.admin-page .admin-blogs-main .admin-blog-editor-form select:disabled,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea:disabled {
  background: #f2f4f7;
  border-color: #e2e6ec;
  color: #98a2b3;
  cursor: not-allowed;
  box-shadow: none;
}

/* checkbox / radio / 隐藏控件：不套用 40px 文本框尺寸。 */
.admin-page .admin-blogs-main .admin-blog-editor-form input[type="checkbox"],
.admin-page .admin-blogs-main .admin-blog-editor-form input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  border-radius: 4px;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input[type="radio"] {
  border-radius: 50%;
}

.admin-page .admin-blogs-main .admin-blog-editor-form input[type="file"],
.admin-page .admin-blogs-main .admin-blog-editor-form input[type="hidden"] {
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
}

/* 校验失败态：仅 .is-error 时出现，避免和 focus 环叠加。 */
.admin-page .admin-blogs-main .admin-blog-editor-form input.is-error,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.is-error,
.admin-page .admin-blogs-main .admin-blog-editor-form select.is-error {
  border-color: #d92d20;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .10);
}

/* 标题保持更大字号，但边框/圆角/焦点与其他输入框一致。 */
.admin-page .admin-blogs-main .admin-blog-editor-title-field input {
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.015em;
}

.admin-page .admin-blogs-main .admin-blog-editor-content-field small {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* ---- 3. 工具栏：按钮与下拉同高同圆角，hover/active 清晰 ---- */
.admin-page .admin-blogs-main .admin-blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #f8f9fb;
}

.admin-page .admin-blogs-main .admin-blog-toolbar button,
.admin-page .admin-blogs-main .admin-blog-toolbar-block,
.admin-page .admin-blogs-main .admin-blog-toolbar-callout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-toolbar button:hover,
.admin-page .admin-blogs-main .admin-blog-toolbar-block:hover,
.admin-page .admin-blogs-main .admin-blog-toolbar-callout:hover {
  border-color: rgba(220, 38, 38, .45);
  color: var(--admin-primary-dark);
}

.admin-page .admin-blogs-main .admin-blog-toolbar button:active,
.admin-page .admin-blogs-main .admin-blog-toolbar-block:active,
.admin-page .admin-blogs-main .admin-blog-toolbar-callout:active,
.admin-page .admin-blogs-main .admin-blog-toolbar button.is-selected {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-page .admin-blogs-main .admin-blog-toolbar button:focus-visible,
.admin-page .admin-blogs-main .admin-blog-toolbar-block:focus-visible,
.admin-page .admin-blogs-main .admin-blog-toolbar-callout:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 1px;
  box-shadow: none;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-toolbar select {
  min-height: 32px;
  height: 32px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-toolbar select:hover {
  border-color: #b3bdcc;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-toolbar select:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
  outline: 0;
}

/* 提示信息下拉：边框由外层 label 提供，内部 select 无边框。 */
.admin-page .admin-blogs-main .admin-blog-toolbar-callout {
  padding: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-toolbar-callout select {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.admin-page .admin-blogs-main .admin-blog-toolbar-sep {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--admin-line-soft);
}

/* ---- 4. 主编辑区：有边框、内部滚动、不无限撑长、focus 统一 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

/* Markdown 源文本编辑区：单一 textarea，等宽字体、舒适行高、一个整体边框。 */
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-md-input {
  width: 100%;
  min-height: 420px;
  padding: 14px 16px;
  border: 1px solid var(--admin-control-border);
  border-radius: 10px;
  background: #fcfdff;
  color: #24292f;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, "IBM Plex Mono", monospace;
  font-size: 14px;
  line-height: 1.75;
  tab-size: 4;
  resize: vertical;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-md-input:hover {
  border-color: #b3bdcc;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-md-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
  outline: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-md-input::placeholder {
  color: #98a2b3;
  opacity: 1;
}

.admin-page .admin-blogs-main .admin-blog-editor-frame {
  position: relative;
  min-height: 360px;
  max-height: 480px;
  padding: 14px 16px;
  overflow-y: auto;
  border: 1px solid var(--admin-control-border);
  border-radius: 10px;
  background: #fff;
  resize: vertical;
  scrollbar-width: thin;
}

.admin-page .admin-blogs-main .admin-blog-editor-frame:hover {
  border-color: #b3bdcc;
}

/* focus：轻量主色边框，无整块大红框；红色仅用于校验错误。 */
.admin-page .admin-blogs-main .admin-blog-editor-frame:focus-within {
  border-color: var(--admin-primary);
}

.admin-page .admin-blogs-main .admin-blog-editor-frame.is-error {
  border-color: #d92d20;
}

/* 占位提示：与正文真实输入位置对齐（左上角），点击可穿透，非居中 Empty State。 */
.admin-page .admin-blogs-main .admin-blog-block-placeholder {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  padding: 0;
  color: #98a2b3;
  font-size: 15px;
  line-height: 1.75;
  text-align: left;
  pointer-events: none;
}

/* ---- 连续正文编辑区：单一 contenteditable，块内无边框 / 无徽标 / 无嵌套 textarea ---- */
.admin-page .admin-blogs-main .admin-blog-editor-content {
  outline: 0;
  min-width: 0;
}

/* 编辑样式 ≈ 前台博客详情：字号 / 行距 / 段距尽量一致。 */
.admin-page .admin-blogs-main .admin-blog-editor-content p {
  margin: 0 0 14px;
  min-height: 1.75em;
  color: #3d4a5c;
  font-size: 16px;
  line-height: 1.75;
}

.admin-page .admin-blogs-main .admin-blog-editor-content p:last-child {
  margin-bottom: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-content h2 {
  margin: 26px 0 10px;
  color: var(--admin-text-strong);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.admin-page .admin-blogs-main .admin-blog-editor-content h3 {
  margin: 18px 0 8px;
  color: var(--admin-text-strong);
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.admin-page .admin-blogs-main .admin-blog-editor-content a {
  color: var(--admin-primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.admin-page .admin-blogs-main .admin-blog-editor-content strong {
  font-weight: 700;
}

/* 提示块（Callout）：视觉对齐前台博客详情——浅背景 + 左边框 + 图标标签，正文直接编辑。 */
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-callout {
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid #e2e9f2;
  border-left: 3px solid #7d9bc9;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-callout.is-important {
  border-left-color: #d9972c;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-callout.is-warning {
  border-left-color: #c94f3d;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f7;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--admin-text-strong);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-label::before {
  content: "ⓘ";
  color: #7d9bc9;
  font-size: 14px;
  font-weight: 700;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout.is-important .admin-blog-editor-callout-label::before {
  content: "!";
  color: #d9972c;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout.is-warning .admin-blog-editor-callout-label::before {
  content: "⚠";
  color: #c94f3d;
}

/* 提示块工具条：仅选中时显示，不常驻、不折行。 */
.admin-page .admin-blogs-main .admin-blog-editor-callout-toolbar {
  display: none;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-callout.is-selected .admin-blog-editor-callout-toolbar {
  display: flex;
}

.admin-page .admin-blogs-main .admin-blog-editor-form select.admin-blog-editor-callout-tone {
  min-height: 26px;
  height: 26px;
  padding: 0 6px;
  border: 1px solid var(--admin-control-border);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12px;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-toolbar button {
  min-height: 26px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(180, 35, 24, .3);
  border-radius: 6px;
  background: #fff;
  color: #b42318;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-toolbar button:hover {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, .55);
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-body {
  position: relative;
  padding: 10px 14px;
}

/* 空提示块的正文占位文案。 */
.admin-page .admin-blogs-main .admin-blog-editor-callout-body.is-empty::before {
  content: "在这里直接输入提示内容……";
  position: absolute;
  top: 10px;
  left: 14px;
  color: #98a2b3;
  pointer-events: none;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-body p {
  margin: 0;
  color: #3d4a5c;
  font-size: 15.5px;
  line-height: 1.65;
}

.admin-page .admin-blogs-main .admin-blog-editor-callout-body p + p {
  margin-top: 8px;
}

/* 图片块：正文流内按真实比例展示（不裁切、无巨大灰容器），说明文字在图片下方。 */
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-image-block {
  position: relative;
  margin: 18px 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-media {
  position: relative;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-media img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #edf1f6;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-caption {
  margin: 8px 0 0;
  color: var(--admin-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-caption:empty {
  display: none;
}

/* 图片浮动工具条：仅选中图片时显示。 */
.admin-page .admin-blogs-main .admin-blog-editor-image-toolbar {
  position: absolute;
  top: 8px;
  right: 8px;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 4px 14px rgba(16, 24, 40, .12);
  white-space: nowrap;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-image-block.is-selected .admin-blog-editor-image-toolbar {
  display: flex;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-toolbar button,
.admin-page .admin-blogs-main .admin-blog-editor-image-toolbar label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--admin-control-border);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-toolbar button:hover,
.admin-page .admin-blogs-main .admin-blog-editor-image-toolbar label:hover {
  border-color: rgba(220, 38, 38, .45);
  color: var(--admin-primary-dark);
}

/* 图片设置 Popover：点击「图片设置」才展开。 */
.admin-page .admin-blogs-main .admin-blog-editor-image-settings {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--admin-line-soft);
  border-radius: 10px;
  background: #fbfcfe;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-image-block.is-settings-open .admin-blog-editor-image-settings {
  display: grid;
}

.admin-page .admin-blogs-main .admin-blog-editor-image-settings label {
  display: grid;
  gap: 4px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
}

.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-editor-image-settings input {
  min-height: 32px;
  height: 32px;
  font-size: 13px;
}

/* 表格块：平时只看到表格本身（对齐前台样式），光标进入才显示轻量工具条。 */
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-table-block {
  margin: 18px 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-table-scroll {
  overflow-x: auto;
}

.admin-page .admin-blogs-main .admin-blog-editor-table {
  width: 100%;
  border-collapse: collapse;
  color: #3d4a5c;
  font-size: 14.5px;
  line-height: 1.5;
}

.admin-page .admin-blogs-main .admin-blog-editor-table th,
.admin-page .admin-blogs-main .admin-blog-editor-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--admin-line-soft);
  background: #fff;
  vertical-align: top;
}

.admin-page .admin-blogs-main .admin-blog-editor-table th {
  background: #f3f6fa;
  color: var(--admin-text-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}

.admin-page .admin-blogs-main .admin-blog-editor-table tr:last-child td {
  border-bottom: 0;
}

.admin-page .admin-blogs-main .admin-blog-editor-table p {
  margin: 0;
  min-height: 1.5em;
}

.admin-page .admin-blogs-main .admin-blog-editor-table-toolbar {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  white-space: nowrap;
}

.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-table-block.is-selected .admin-blog-editor-table-toolbar {
  display: flex;
}

.admin-page .admin-blogs-main .admin-blog-editor-table-toolbar button {
  min-height: 28px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--admin-control-border);
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-editor-table-toolbar button:hover {
  border-color: rgba(220, 38, 38, .45);
  color: var(--admin-primary-dark);
}

/* ---- 统一内容块选中态：轻微 outline（无布局抖动），三个内容块共用 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-image-block.is-selected,
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-table-block.is-selected,
.admin-page .admin-blogs-main .admin-blog-editor-content .admin-blog-editor-callout.is-selected {
  outline: 2px solid rgba(220, 38, 38, .22);
  outline-offset: 3px;
  border-radius: 8px;
}

/* 工具栏 B / I / 链接 的 active 状态（光标处格式回显）。 */
.admin-page .admin-blogs-main .admin-blog-toolbar button.is-active {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
  color: var(--admin-primary-strong);
}

.admin-page .admin-blogs-main .admin-blog-block-editor {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-block-editor[hidden] {
  display: none;
}

.admin-page .admin-blogs-main .admin-blog-block {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: border-color .12s ease, background-color .12s ease;
}

.admin-page .admin-blogs-main .admin-blog-block:hover {
  border-color: #e4e8ee;
  background: #fcfcfd;
}

.admin-page .admin-blogs-main .admin-blog-block.is-focused {
  border-color: rgba(220, 38, 38, .28);
  background: #fffdfc;
}

.admin-page .admin-blogs-main .admin-blog-block-badge {
  position: absolute;
  top: -8px;
  left: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--admin-primary-dark);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-heading,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-paragraph,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-callout-body {
  width: 100%;
  min-height: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--admin-text);
  font: inherit;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-heading:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-paragraph:focus,
.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-callout-body:focus {
  outline: 0;
  background: #fff;
  box-shadow: none;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-heading.is-h2 {
  color: var(--admin-text-strong);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.admin-page .admin-blogs-main .admin-blog-editor-form textarea.admin-blog-block-heading.is-h3 {
  color: var(--admin-text-strong);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.35;
}

.admin-page .admin-blogs-main .admin-blog-block.is-callout {
  border: 1px solid var(--admin-line-soft);
  border-left: 3px solid #b8c2d0;
  background: #f8f9fb;
}

.admin-page .admin-blogs-main .admin-blog-block.is-callout.is-important {
  border-left-color: #d9972c;
}

.admin-page .admin-blogs-main .admin-blog-block.is-callout.is-warning {
  border-left-color: #c94f3d;
}

.admin-page .admin-blogs-main .admin-blog-editor-form select.admin-blog-block-callout-select {
  justify-self: start;
  min-height: 32px;
  height: 32px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
}

.admin-page .admin-blogs-main .admin-blog-block.is-table {
  padding-bottom: 10px;
}

.admin-page .admin-blogs-main .admin-blog-block-table-wrap {
  overflow-x: auto;
}

.admin-page .admin-blogs-main .admin-blog-block-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-page .admin-blogs-main .admin-blog-block-table th,
.admin-page .admin-blogs-main .admin-blog-block-table td {
  padding: 4px;
  border: 1px solid var(--admin-line-soft);
}

.admin-page .admin-blogs-main .admin-blog-block-table th input {
  font-weight: 700;
  background: #f3f6fa;
}

.admin-page .admin-blogs-main .admin-blog-block-table input {
  width: 100%;
  min-width: 90px;
  min-height: 32px;
  height: 32px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 13.5px;
}

.admin-page .admin-blogs-main .admin-blog-block-table input:focus {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, .35);
}

.admin-page .admin-blogs-main .admin-blog-block-table-actions button,
.admin-page .admin-blogs-main .admin-blog-block-image-remove {
  min-height: 30px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-block-table-actions button:hover,
.admin-page .admin-blogs-main .admin-blog-block-image-remove:hover {
  border-color: rgba(220, 38, 38, .45);
  color: var(--admin-primary-dark);
}

.admin-page .admin-blogs-main .admin-blog-block.is-image {
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: start;
}

.admin-page .admin-blogs-main .admin-blog-block-image-media {
  grid-row: span 3;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  border: 1px dashed var(--admin-control-border);
  border-radius: 8px;
  background: #f6f8fc center/contain no-repeat;
}

.admin-page .admin-blogs-main .admin-blog-block-image-media img {
  display: block;
  max-width: 100%;
  max-height: 130px;
  border-radius: 6px;
}

.admin-page .admin-blogs-main .admin-blog-block-image-media.is-missing::before {
  content: "🖼 图片";
  color: #98a2b3;
  font-size: 12px;
}

.admin-page .admin-blogs-main .admin-blog-block-image-alt,
.admin-page .admin-blogs-main .admin-blog-block-image-caption {
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font: inherit;
  font-size: 13px;
}

.admin-page .admin-blogs-main .admin-blog-block-image-remove {
  justify-self: start;
  color: #b42318;
  border-color: rgba(180, 35, 24, .3);
}

.admin-page .admin-blogs-main .admin-blog-block-image-remove:hover {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, .55);
  color: #b42318;
}

.admin-page .admin-blogs-main .admin-blog-editor-content-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 2px;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.admin-page .admin-blogs-main .admin-blog-editor-content-meta strong {
  flex: 0 0 auto;
  color: var(--admin-text);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---- 5. 模块头部「预览」链接：与按钮同款，点击进网页预览 ---- */
.admin-page .admin-blogs-main .admin-blog-preview-slot {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

/* ---- 6. SEO 设置：默认展开、两列左右对齐、只读字段与输入框同款 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-seo-open {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .045);
}

.admin-page .admin-blogs-main .admin-blog-seo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
}

.admin-page .admin-blogs-main .admin-blog-seo-column {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-seo-column label {
  gap: 6px;
}

.admin-page .admin-blogs-main .admin-blog-field-counter {
  justify-self: end;
  color: var(--admin-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.admin-page .admin-blogs-main .admin-blog-field-counter.is-over-limit {
  color: #b42318;
  font-weight: 700;
}

/* ---- 7. 发布设置：规整两列、状态轻标签、精选垂直居中、封面图行 ---- */
.admin-page .admin-blogs-main .admin-blog-publish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.admin-page .admin-blogs-main .admin-blog-publish-status {
  display: grid;
  gap: 6px;
}

.admin-page .admin-blogs-main .admin-blog-publish-status > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

.admin-page .admin-blogs-main .admin-blog-publish-status-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 40px;
}

.admin-page .admin-blogs-main .admin-blog-publish-status-body small {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-page .admin-blogs-main .admin-blog-publish-featured {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.admin-page .admin-blogs-main .admin-blog-cover-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--admin-line-soft);
}

.admin-page .admin-blogs-main .admin-blog-cover-field > h3 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 15px;
  letter-spacing: -.01em;
}

.admin-page .admin-blogs-main .admin-blog-cover-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.admin-page .admin-blogs-main .admin-blog-cover-preview {
  grid-row: auto;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 1px dashed var(--admin-control-border);
  border-radius: 10px;
  background: #f3f6fb center/cover no-repeat;
  color: #98a2b3;
  font-size: 12.5px;
}

.admin-page .admin-blogs-main .admin-blog-cover-preview.is-empty {
  background-color: #f3f6fb;
  background-image: none;
}

.admin-page .admin-blogs-main .admin-blog-cover-controls {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
}

.admin-page .admin-blogs-main .admin-blog-cover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.admin-page .admin-blogs-main .admin-blog-cover-replace {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--admin-control-border);
  border-radius: 8px;
  background: #fff;
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-cover-replace:hover {
  border-color: rgba(220, 38, 38, .45);
  color: var(--admin-primary-dark);
}

.admin-page .admin-blogs-main .admin-blog-cover-replace:focus-visible,
.admin-page .admin-blogs-main .admin-blog-cover-remove:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 1px;
}

.admin-page .admin-blogs-main .admin-blog-cover-remove {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(180, 35, 24, .3);
  border-radius: 8px;
  background: #fff;
  color: #b42318;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.admin-page .admin-blogs-main .admin-blog-cover-remove:hover {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, .55);
  color: #b42318;
}

.admin-page .admin-blogs-main .admin-blog-cover-alt {
  display: grid;
  gap: 6px;
}

.admin-page .admin-blogs-main .admin-blog-cover-alt > span {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

/* ---- 8. 底部操作：固定顺序 保存草稿 -> 发布，成功后原地轻提示 ---- */
.admin-page .admin-blogs-main .admin-blog-editor-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding-top: 18px;
  border-top: 1px solid var(--admin-line-soft);
}

.admin-page .admin-blogs-main .admin-blog-editor-footer .btn {
  min-width: 128px;
}

.admin-page .admin-blogs-main .admin-blog-editor-footer .admin-blog-btn-danger {
  margin-left: auto;
  color: #b42318;
  border-color: rgba(180, 35, 24, .3);
}

.admin-page .admin-blogs-main .admin-blog-editor-footer .admin-blog-btn-danger:hover {
  background: #fef3f2;
  border-color: rgba(180, 35, 24, .55);
  color: #b42318;
}

/* ---- 9. 响应式与无障碍 ---- */
@media (max-width: 900px) {
  .admin-page .admin-blogs-main .admin-blog-seo-grid,
  .admin-page .admin-blogs-main .admin-blog-publish-grid {
    grid-template-columns: 1fr;
  }

  .admin-page .admin-blogs-main .admin-blog-cover-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-editor-module {
    padding: 16px;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-section-head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-content-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-footer {
    flex-wrap: wrap;
  }

  .admin-page .admin-blogs-main .admin-blog-editor-footer .admin-blog-btn-danger {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-page .admin-blogs-main .admin-blog-editor-form input,
  .admin-page .admin-blogs-main .admin-blog-editor-form select,
  .admin-page .admin-blogs-main .admin-blog-editor-form textarea,
  .admin-page .admin-blogs-main .admin-blog-toolbar button,
  .admin-page .admin-blogs-main .admin-blog-toolbar-block,
  .admin-page .admin-blogs-main .admin-blog-toolbar-callout,
  .admin-page .admin-blogs-main .admin-blog-editor-form .admin-blog-editor-module {
    transition: none;
  }
}

/* ==================== AI邮件（tab=ai_email） ==================== */

/* 通用 Drawer 缺失的基础定位补齐（供 AI邮件 邮件详情使用） */
.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
}
.admin-drawer[hidden] {
  display: none;
}
.admin-drawer-card {
  display: flex;
  flex-direction: column;
  background: var(--admin-surface);
}

.admin-ai-email-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-ai-email-tabs {
  margin-top: -8px;
}
.admin-ai-email-tabs .admin-tab {
  padding: 8px 16px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-sm);
  background: var(--admin-surface);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.admin-ai-email-tabs .admin-tab.is-active {
  border-color: var(--admin-primary);
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
}

.admin-ai-email-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.admin-ai-email-module {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-lg);
  box-shadow: var(--admin-shadow-card);
}

/* 生成页模块头：与博客编辑器同款（标题左、操作右、下分隔线） */
[data-ai-email-generate] .admin-blog-editor-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--admin-line-soft);
}
[data-ai-email-generate] .admin-blog-editor-section-title {
  display: grid;
  gap: 5px;
}
[data-ai-email-generate] .admin-blog-editor-section-title h3 {
  margin: 0;
  color: var(--admin-text-strong);
  font-size: 18px;
  letter-spacing: -0.02em;
}
[data-ai-email-generate] .admin-blog-editor-kicker {
  color: var(--admin-primary-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
  text-transform: uppercase;
}
[data-ai-email-generate] .admin-blog-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-ai-email-upload-slot {
  display: grid;
  justify-items: start;
  gap: 12px;
  min-width: 0;
}
.admin-ai-email-upload-slot .btn-primary {
  min-height: 56px;
  padding: 0 34px;
  border-radius: 14px;
  font-size: 16px;
}
.admin-ai-email-upload-slot small {
  max-width: 680px;
  color: var(--admin-muted);
  font-weight: 500;
  line-height: 1.6;
}
.admin-ai-email-upload-status {
  width: 100%;
  color: var(--admin-primary);
  font-size: 13px;
  font-weight: 600;
}
.admin-ai-email-upload-status.is-error {
  color: var(--admin-danger, #dc2626);
}

.admin-ai-email-count {
  font-size: 13px;
  color: var(--admin-muted);
  font-weight: 600;
}
.admin-ai-email-count b {
  color: var(--admin-text);
  font-size: 15px;
}
.admin-ai-email-count.is-error b {
  color: var(--admin-danger, #dc2626);
}

.admin-ai-email-table {
  min-width: 1020px;
}
.admin-ai-email-table[hidden],
.admin-ai-email-empty[hidden] {
  display: none;
}
.admin-ai-email-empty {
  padding: 28px 20px;
  text-align: center;
}
.admin-ai-email-check-col {
  width: 36px;
}
.admin-ai-email-subject {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--admin-text);
}
.admin-ai-email-goal {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--admin-muted);
}
.admin-ai-email-edited {
  color: var(--admin-primary);
  font-weight: 700;
}

.admin-ai-email-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #f1f4f9;
  color: #607094;
}
.admin-ai-email-status.is-generated { background: #e9f8ef; color: #1e7a45; }
.admin-ai-email-status.is-generating { background: #eef4ff; color: #2a5cc8; }
.admin-ai-email-status.is-sending { background: #eef4ff; color: #2a5cc8; }
.admin-ai-email-status.is-sent { background: #e9f8ef; color: #1e7a45; }
.admin-ai-email-status.is-failed { background: #fdecec; color: #b42318; }
.admin-ai-email-status.is-pending { background: #fff7e6; color: #925c00; }

.admin-ai-email-record-search {
  display: flex;
  gap: 8px;
  min-width: 280px;
}

/* 发件设置：label 左列定宽、输入框右列统一宽度，整体左对齐 */
.admin-ai-email-settings-form {
  display: grid;
  gap: 14px;
  max-width: 480px;
}
.admin-ai-email-settings-form > .admin-social-field {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 700;
}
.admin-ai-email-settings-form > .admin-social-field > span {
  line-height: 1.3;
}
.admin-ai-email-settings-form > .admin-social-field input {
  width: 100%;
}
.admin-ai-email-key-field {
  display: grid;
  gap: 6px;
  justify-items: start;
  min-width: 0;
}
.admin-ai-email-key-field small {
  color: var(--admin-muted-soft);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
}
.admin-ai-email-key-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-ai-email-key-mask {
  padding: 10px 14px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: #f6f8fb;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--admin-muted);
}
.admin-ai-email-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 126px; /* 与输入列左缘对齐：112px label 列 + 14px gap */
}
.admin-ai-email-settings-note,
.admin-ai-email-test-note {
  color: var(--admin-primary);
  font-size: 13px;
  font-weight: 600;
}

.admin-ai-email-connection {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-ai-email-connection-note {
  color: var(--admin-muted);
  font-size: 13px;
}
.admin-ai-email-domain-hint {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.6;
}
.admin-ai-email-domain-hint strong {
  color: var(--admin-text);
}

.admin-ai-email-test-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-ai-email-test-row input {
  width: min(360px, 100%);
}

/* 邮件详情 Drawer */
.admin-ai-email-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 0;
}
.admin-ai-email-drawer-head h2 {
  margin: 0;
  font-size: 17px;
}
.admin-ai-email-drawer-meta {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
  word-break: break-all;
}
.admin-ai-email-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
  display: grid;
  gap: 16px;
  min-height: 0;
}

/* 详情分区：客户信息（只读）+ 邮件内容（可编辑） */
.admin-ai-email-drawer-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.admin-ai-email-drawer-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--admin-text-strong);
  font-size: 13px;
  font-weight: 800;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--admin-line-soft);
}
.admin-ai-email-info-list {
  display: grid;
  gap: 6px;
  margin: 0;
}
.admin-ai-email-info-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.admin-ai-email-info-row dt {
  color: var(--admin-muted);
  font-weight: 500;
}
.admin-ai-email-info-row dd {
  margin: 0;
  color: var(--admin-text);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  min-width: 0;
}
.admin-ai-email-edit-field {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}
.admin-ai-email-edit-field input,
.admin-ai-email-edit-field textarea {
  width: 100%;
}
.admin-ai-email-edit-field textarea {
  min-height: 240px;
  line-height: 1.6;
}
.admin-ai-email-edit-flag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #eef4ff;
  color: #2a5cc8;
}
.admin-ai-email-edit-flag.is-edited {
  background: #fff7e6;
  color: #925c00;
}
.admin-ai-email-drawer-empty {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--admin-line);
  border-radius: var(--admin-radius-md);
  color: var(--admin-muted);
  font-size: 13px;
  text-align: center;
}
.admin-ai-email-detail-subject {
  display: grid;
  gap: 6px;
}
.admin-ai-email-detail-subject span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}
.admin-ai-email-detail-subject strong {
  font-size: 15px;
  color: var(--admin-text);
  line-height: 1.4;
}
.admin-ai-email-detail-body {
  padding: 16px;
  border: 1px solid var(--admin-line);
  border-radius: var(--admin-radius-md);
  background: #fbfcfe;
  color: var(--admin-text);
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
}
.admin-ai-email-detail-body p {
  margin: 0 0 10px;
}
.admin-ai-email-detail-body p:last-child {
  margin-bottom: 0;
}
.admin-ai-email-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--admin-muted);
  font-size: 12px;
}
.admin-ai-email-detail-error {
  color: var(--admin-danger, #dc2626);
  font-weight: 600;
}
.admin-ai-email-drawer-foot {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 20px 20px;
}
.admin-ai-email-drawer-foot .admin-social-field {
  text-align: left;
}

/* 发送确认 / API Key 弹窗 */
.admin-ai-email-send-card,
.admin-ai-email-key-card {
  width: min(480px, 100%);
}
.admin-ai-email-key-card .admin-modal-body .admin-social-field {
  display: grid;
  gap: 8px;
  text-align: left;
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 800;
}
.admin-ai-email-key-card .admin-modal-body .admin-social-field input {
  width: 100%;
}
.admin-ai-email-send-summary {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--admin-text);
}
.admin-ai-email-send-summary p {
  margin: 0;
}
.admin-ai-email-send-summary b {
  font-weight: 700;
}
.admin-ai-email-warning {
  color: var(--admin-danger, #dc2626);
  font-weight: 600;
}
.admin-ai-email-send-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 0 20px 20px;
}
.admin-ai-email-key-note {
  margin-top: 8px;
  color: var(--admin-danger, #dc2626);
  font-size: 13px;
  font-weight: 600;
}

.admin-ai-email-record-back {
  margin-bottom: -6px;
}

@media (max-width: 760px) {
  .admin-ai-email-module {
    padding: 18px 14px;
  }
  .admin-ai-email-settings-form > .admin-social-field {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .admin-ai-email-settings-actions {
    padding-left: 0;
  }
}

/* ==================== 业务应用壳（AI邮件 / 社媒发布 二级导航） ==================== */

.business-app-nav {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--admin-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.business-app-nav-link {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 18px 11px;
  border: none;
  background: none;
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.15s ease;
}

.business-app-nav-link:hover {
  color: var(--admin-text);
}

.business-app-nav-link.is-active {
  color: var(--admin-primary);
  font-weight: 700;
}

.business-app-nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -2px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: var(--admin-primary);
}

.business-app-page-head {
  margin: 2px 0 -6px;
}

/* ---- AI邮件：发件设置 Key 状态 / 历史详情 ---- */

.admin-ai-email-key-state {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff7e6;
  color: #925c00;
}
.admin-ai-email-key-state.is-ok {
  background: #e9f8ef;
  color: #1e7a45;
}

.admin-ai-email-date-input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cfd9e8;
  border-radius: 12px;
  font-size: 13px;
  color: var(--admin-text);
}
.admin-ai-email-date-sep {
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-ai-email-record-name {
  display: block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--admin-text);
}

.admin-ai-email-history-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.admin-ai-email-history-table-wrap {
  overflow-x: auto;
}
.admin-ai-email-history-table {
  min-width: 860px;
}
.admin-ai-email-message-id {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--admin-muted);
  font-size: 12px;
}
.admin-ai-email-history-back {
  align-self: flex-start;
}
.admin-ai-email-status.is-pending { background: #fff7e6; color: #925c00; }
.admin-ai-email-status.is-sending { background: #eef4ff; color: #2a5cc8; }
.admin-ai-email-status.is-partial { background: #eef4ff; color: #2a5cc8; }



/* ---- 通用列表列宽拖动（shared admin_resizable_tables） ---- */

table[data-resizable-table] th[data-col-resize] {
  position: relative;
}

table[data-resizable-table] th {
  overflow: hidden;
}

table[data-resizable-table] td {
  overflow: hidden;
}

table[data-resizable-table] td.admin-ui-actions-cell,
table[data-resizable-table] th.admin-ui-actions-col {
  overflow: visible;
}

.admin-resize-handle {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
  touch-action: none;
}

.admin-resize-handle::after {
  content: '';
  position: absolute;
  top: 24%;
  right: 4px;
  bottom: 24%;
  width: 2px;
  border-radius: 1px;
  background: transparent;
  transition: background .12s ease;
}

.admin-resize-handle:hover::after,
.admin-resize-handle.is-dragging::after {
  background: var(--admin-primary);
  opacity: .45;
}

body.admin-col-resizing,
body.admin-col-resizing * {
  cursor: col-resize !important;
  user-select: none;
  -webkit-user-select: none;
}

/* ---- 统一页面 Header（shared admin-base.css 同步块，改动后同步到各应用 vendored 副本） ----
   设计约定：
   - 应用顶栏（.admin-topbar）只显示应用名 + 全局操作，不再重复页面标题；
   - 一级页面标题统一由内容区页头（.admin-*page-head / .admin-blogs-head / .admin-page-header）承担：
     左侧 标题 + 一句话描述，右侧 页面操作；标题 26px/700，描述 14px 灰色；
   - 标题与描述间距 8px，页头与主体间距由各应用容器 gap 承担（无 gap 时 24px）。 */

.admin-topbar {
  min-height: 62px;
  margin: 0 auto 24px;
  padding: 10px 0 16px;
  border-bottom: 1px solid var(--admin-line-soft);
}

.admin-topbar h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--admin-text-strong);
}

.admin-page-header,
.admin-product-page-head,
.admin-blogs-head,
.admin-crm-page-head,
.admin-quote-page-head,
.admin-landing-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin: 0 0 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.admin-page-header h2,
.admin-product-page-head h2,
.admin-blogs-head h2,
.admin-crm-page-head h2,
.admin-crm-page-head .admin-crm-page-copy h2,
.admin-quote-page-head h2,
.admin-quote-page-head .admin-quote-page-intro h2,
.admin-landing-page-head h2,
.admin-route-toolbar h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--admin-text-strong);
}

.admin-page-header p,
.admin-product-page-head p,
.admin-blogs-head p,
.admin-crm-page-head p,
.admin-crm-page-head .admin-crm-page-copy p,
.admin-quote-page-head p,
.admin-landing-page-head p,
.admin-route-toolbar p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--admin-muted);
}

.admin-page-header-actions,
.admin-product-page-actions,
.admin-crm-page-actions,
.admin-quote-page-actions,
.admin-landing-template-actions,
.admin-social-head-actions,
.admin-blog-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  min-width: 0;
}

/* 统一页面 Header 补充（AI邮件）：页头是 .admin-ai-email-main 网格子项，间距由 gap 承担 */
.admin-ai-email-main .admin-blogs-head {
  margin-bottom: 0;
}

/* ---- 操作手册抽屉（shared admin-base.css 同步块，改动后同步到各应用 vendored 副本） ----
   设计约定：
   - 各页面页头操作区的「? 操作手册」按钮打开右侧抽屉（.admin-manual-drawer）；
   - 抽屉 = 全屏遮罩（justify-content: flex-end）+ 右侧全高卡片（min(720px, 100vw)）；
   - 手册正文由服务端渲染（.admin-manual-content），抽屉内滚动；
   - 关闭方式：× / 遮罩 / Esc，配合 body.admin-dialog-lock 滚动锁定。 */
.admin-manual-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  justify-content: flex-end;
  padding: 0;
  background: rgba(16, 24, 40, 0.48);
}
.admin-manual-drawer.is-open {
  display: flex;
}
.admin-manual-drawer-card {
  display: flex;
  flex-direction: column;
  width: min(720px, 100vw);
  height: 100vh;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--admin-line-soft);
  border-radius: var(--admin-radius-xl) 0 0 var(--admin-radius-xl);
  box-shadow: -16px 0 40px rgba(15, 23, 42, 0.16);
  background: var(--admin-surface);
}
.admin-manual-drawer-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-line-soft);
}
.admin-manual-drawer-head-copy {
  min-width: 0;
}
.admin-manual-drawer-head-copy h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--admin-text-strong);
}
.admin-manual-drawer-meta {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--admin-muted);
}
.admin-manual-drawer-meta:empty {
  display: none;
}
.admin-manual-drawer-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--admin-radius-xl);
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--admin-muted);
  cursor: pointer;
}
.admin-manual-drawer-close:hover {
  background: var(--admin-line-soft);
  color: var(--admin-text-strong);
}
.admin-manual-drawer-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 24px 32px;
}
.admin-manual-content {
  max-width: 680px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--admin-text-strong);
}
.admin-manual-content h2 {
  margin: 24px 0 10px;
  font-size: 18px;
  font-weight: 700;
}
.admin-manual-content h2:first-child {
  margin-top: 0;
}
.admin-manual-content h3 {
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 700;
}
.admin-manual-content p {
  margin: 8px 0;
}
.admin-manual-content ul,
.admin-manual-content ol {
  margin: 8px 0;
  padding-left: 22px;
}
.admin-manual-content li {
  margin: 3px 0;
}
.admin-manual-content code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--admin-line-soft);
  font-size: 13px;
}
.admin-manual-content blockquote {
  margin: 10px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--admin-line-soft);
  color: var(--admin-muted);
}
.admin-manual-table-wrap {
  margin: 10px 0;
  overflow-x: auto;
}
.admin-manual-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-manual-content th,
.admin-manual-content td {
  padding: 6px 10px;
  border: 1px solid var(--admin-line-soft);
  text-align: left;
  vertical-align: top;
}
.admin-manual-content th {
  background: var(--admin-line-soft);
  font-weight: 600;
}
.admin-manual-loading,
.admin-manual-empty {
  margin: 24px 0;
  text-align: center;
  color: var(--admin-muted);
}
.admin-manual-empty-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--admin-text-strong);
}
.admin-manual-empty-hint {
  margin: 0;
}
/* 设置-操作手册维护页（主站） */
.admin-manual-admin-head h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}
.admin-manual-admin-head p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--admin-muted);
}
.admin-manual-pages {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--admin-muted);
}
.admin-manual-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.admin-manual-badge.is-generated {
  background: #dcfce7;
  color: #166534;
}
.admin-manual-badge.is-missing {
  background: #f1f5f9;
  color: #64748b;
}
.admin-manual-generate-status {
  margin: 12px 0 0;
  font-size: 13px;
  color: #b91c1c;
}

/* ---- 操作手册轻量入口（shared admin-base.css 同步块，改动后同步到各应用 vendored 副本） ----
   设计约定：
   - 操作手册是帮助入口，视觉层级低于所有业务按钮；
   - 小字号灰字、无边框、无底色，hover 轻微变色即可。 */
.admin-manual-entry {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-size: 12px;
  line-height: 1.6;
  color: var(--admin-muted);
  cursor: pointer;
  white-space: nowrap;
}
.admin-manual-entry:hover {
  color: var(--admin-text-strong);
  background: var(--admin-line-soft);
}
