﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html,
body {
  min-height: 100%;
}

@media (hover: none) and (pointer: coarse) {
  html,
  body {
    touch-action: pan-x pan-y;
  }
}

body {
  background: #f6f7f9;
  color: #1f2933;
  margin: 0;
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-main {
  flex: 1 0 auto;
}

.app-main-fluid {
  padding-left: 24px;
  padding-right: 24px;
}

.footer {
  flex-shrink: 0;
  line-height: 60px;
  white-space: nowrap;
  width: 100%;
}

.navbar-brand {
  font-weight: 700;
}

.user-navbar {
  gap: 8px;
}

.user-navbar .nav-link {
  white-space: nowrap;
}

.user-navbar-name {
  font-weight: 500;
}

.tool-shell {
  max-width: 920px;
  margin: 24px auto 0;
}

.home-shell {
  margin: 26px auto 0;
  max-width: 1060px;
}

.home-heading {
  margin-bottom: 22px;
}

.home-heading h1 {
  font-size: 2rem;
  font-weight: 750;
  margin: 0;
}

.home-heading p {
  color: #667085;
  margin: 8px 0 0;
}

.platform-list {
  display: grid;
  gap: 26px;
}

.platform-section {
  display: grid;
  gap: 12px;
}

.platform-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.platform-heading h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.platform-heading span,
.admin-platform-header span {
  color: #8a95a3;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
}

.feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  color: #1f2933;
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-content: space-between;
  min-height: 176px;
  padding: 22px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: #1f8eed;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.09);
  color: #1f2933;
  transform: translateY(-1px);
}

.feature-card h3 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.feature-card p {
  color: #667085;
  margin: 0;
}

.feature-card span {
  color: #1264c8;
  font-weight: 650;
}

.empty-state {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 28px;
}

.empty-state h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.empty-state p {
  color: #667085;
  margin: 0;
}

.tool-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.tool-heading h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0;
}

.tool-heading p {
  color: #667085;
  margin: 6px 0 0;
}

.tool-form {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(16, 24, 40, 0.06);
  padding: 28px;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.form-label {
  font-weight: 650;
}

.options-grid {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 24px;
  align-items: start;
}

.number-input {
  max-width: 180px;
}

.check-list {
  display: grid;
  gap: 14px;
  padding-top: 32px;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.actions .btn {
  min-width: 140px;
}

.status-line {
  color: #667085;
  margin: 20px 0 0;
}

.fba-tool {
  max-width: 920px;
}

.fba-tool-heading {
  align-items: flex-end;
  margin-bottom: 18px;
}

.fba-tool-heading h1 {
  font-size: 1.9rem;
}

.fba-tool-heading p {
  color: #667085;
}

.tool-meta {
  color: #8a95a3;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86rem;
  white-space: nowrap;
}

.fba-tool-form {
  border-color: #dde3ea;
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(16, 24, 40, 0.06);
  padding: 28px;
}

.fba-source-guide {
  align-items: center;
  background: var(--ui-forest-soft, #eef5f1);
  border-bottom: 1px solid var(--ui-line, #d9e1e8);
  border-left: 4px solid var(--ui-gold, #bf8a4b);
  border-top: 1px solid var(--ui-line, #d9e1e8);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 10px 14px;
}

.fba-source-guide-summary {
  min-width: 0;
}

.fba-source-guide-kicker {
  color: var(--ui-teal, #0f766e);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.fba-source-guide-summary p {
  color: var(--ui-ink, #17211e);
  font-size: 0.94rem;
  font-weight: 720;
  line-height: 1.4;
  margin: 0;
}

.fba-source-guide-trigger {
  background: var(--ui-cream, #fffaf2);
  border: 1px solid var(--ui-line-strong, #cdbfae);
  border-radius: 6px;
  color: var(--ui-teal, #0f766e);
  flex: 0 0 auto;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.4;
  padding: 8px 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.fba-source-guide-trigger:hover {
  background: #fff;
  border-color: var(--ui-gold, #bf8a4b);
}

.fba-source-guide-trigger:focus-visible {
  border-color: var(--ui-gold, #bf8a4b);
  outline: 3px solid rgba(191, 138, 75, 0.28);
  outline-offset: 1px;
}

.fba-export-path {
  border-top: 1px solid var(--ui-line, #d9e1e8);
  margin-top: 16px;
  padding-top: 16px;
}

.fba-export-path h4 {
  color: var(--ui-ink, #17211e);
  font-size: 0.98rem;
  font-weight: 760;
  line-height: 1.5;
  margin: 0;
}

.fba-export-steps {
  align-items: center;
  color: var(--ui-ink, #17211e);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.9rem;
  font-weight: 680;
  gap: 6px;
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.fba-export-steps li + li::before {
  color: var(--ui-subtle, #8c948e);
  content: ">";
  margin-right: 6px;
}

.fba-export-path p {
  color: var(--ui-muted, #66736d);
  line-height: 1.6;
  margin: 8px 0 0;
}

.fba-export-path strong {
  color: var(--ui-teal, #0f766e);
}

.fba-export-example {
  display: grid;
  gap: 8px;
  margin: 16px 0 0;
}

.fba-export-example-caption {
  align-items: center;
  color: var(--ui-ink, #17211e);
  display: flex;
  font-size: 0.9rem;
  font-weight: 760;
  gap: 12px;
  justify-content: space-between;
}

.fba-export-example-caption a {
  color: var(--ui-teal, #0f766e);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.fba-export-example-caption a:hover {
  text-decoration: underline;
}

.fba-export-example-image-link {
  border-radius: 4px;
  display: block;
  overflow: hidden;
}

.fba-export-example-image-link:focus-visible {
  outline: 3px solid rgba(191, 138, 75, 0.32);
  outline-offset: 2px;
}

.fba-example-modal .fba-export-example img {
  border-radius: 4px;
  display: block;
  max-height: none;
  width: 100%;
}

.fba-example-modal .modal-content {
  background: var(--ui-cream, #fffaf2);
  border-color: var(--ui-line, #d9e1e8);
  border-radius: 8px;
}

.fba-example-modal .modal-header {
  border-bottom-color: var(--ui-line, #d9e1e8);
}

.fba-example-modal .modal-title {
  color: var(--ui-ink, #17211e);
  font-weight: 780;
}

.fba-example-modal .modal-body {
  display: grid;
  gap: 20px;
}

.fba-example-modal-requirements {
  min-width: 0;
  width: 100%;
}

.fba-example-modal-requirements h3 {
  color: var(--ui-ink, #17211e);
  font-size: 1rem;
  font-weight: 780;
  line-height: 1.5;
  margin: 0;
}

.fba-example-modal-requirements > p:not(.fba-source-guide-note) {
  color: var(--ui-muted, #66736d);
  line-height: 1.65;
  margin: 8px 0 0;
}

.fba-source-guide-note {
  align-items: flex-start;
  color: var(--ui-teal, #0f766e);
  display: flex;
  font-size: 0.9rem;
  font-weight: 680;
  gap: 8px;
  line-height: 1.55;
  margin: 10px 0 0;
}

.fba-source-guide-note-mark {
  flex: 0 0 auto;
  font-weight: 900;
}

.fba-example-modal-gallery {
  border-top: 1px solid var(--ui-line, #d9e1e8);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr);
  padding-top: 20px;
  width: 100%;
}

.fba-example-modal-gallery.has-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.fba-example-modal-item {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 0;
  min-width: 0;
}

.fba-example-modal-item[hidden] {
  display: none;
}

.fba-example-modal-item figcaption {
  color: var(--ui-ink, #17211e);
  font-size: 0.9rem;
  font-weight: 760;
}

.fba-example-modal .modal-body img {
  background: #e9e7e1;
  border: 1px solid var(--ui-line, #d9e1e8);
  display: block;
  height: auto;
  max-height: calc(100vh - 240px);
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.fba-example-modal #sourceGuideModalCaption {
  color: var(--ui-muted, #66736d);
  line-height: 1.6;
  margin: 0;
  text-align: center;
}

.upload-row {
  margin-bottom: 26px;
}

.upload-control {
  align-items: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #1f2933;
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 420px);
  padding: 16px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.upload-control:hover,
.upload-control.is-dragging {
  background: #f8fbff;
  border-color: #1f8eed;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}

.upload-copy {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.upload-copy .form-text {
  display: block;
  margin-top: 4px;
}

.upload-mark {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #cfe4fb;
  border-radius: 8px;
  color: #1264c8;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.upload-title {
  color: #1f2933;
  display: block;
  font-weight: 700;
}

.upload-action {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #1264c8;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  width: fit-content;
  justify-self: end;
}

.upload-control:hover .upload-action,
.upload-control.is-dragging .upload-action {
  border-color: #1f8eed;
}

.visually-hidden-file {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.fba-options-grid {
  background: #fff;
  border-top: 1px solid #edf1f6;
  column-gap: 24px;
  padding-top: 24px;
  row-gap: 4px;
}

.fba-tool .form-label {
  color: #111827;
  font-size: 0.96rem;
}

.fba-tool .form-select,
.fba-tool .form-control {
  border-color: #cbd5e1;
  min-height: 38px;
}

.fba-tool .form-text {
  color: #64748b;
}

.fba-actions {
  border-top: 1px solid #edf1f6;
  margin-top: 8px;
  padding-top: 22px;
}

.fba-actions .btn {
  font-weight: 700;
  min-height: 42px;
  min-width: 150px;
}

.fba-status-line {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #475569;
  line-height: 1.6;
  padding: 12px 14px;
}

.validation-summary-valid {
  display: none;
}

.admin-shell {
  max-width: 920px;
  margin: 24px auto 0;
}

.admin-login-shell {
  max-width: 520px;
}

.admin-login-card h2,
.module-disabled h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.admin-muted,
.module-disabled p {
  color: #667085;
}

.admin-body {
  background: #eef2f6;
  margin-bottom: 0;
}

.admin-login-body {
  background: #eef2f6;
  margin-bottom: 0;
}

.admin-login-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  padding: 24px;
}

.admin-login-panel {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.12);
  display: grid;
  grid-template-columns: 260px minmax(320px, 430px);
  margin: 0 auto;
  max-width: 720px;
  overflow: hidden;
  width: 100%;
}

.admin-login-side {
  background: #071c2f;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 420px;
  padding: 28px 24px;
}

.admin-login-brand {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
}

.admin-login-brand:hover {
  color: #fff;
}

.admin-login-side h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.admin-login-card {
  padding: 42px 36px;
}

.admin-login-submit {
  min-width: 96px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.admin-sidebar {
  align-self: start;
  background: #071c2f;
  color: #d8e6f3;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 18px;
  position: sticky;
  top: 0;
}

.admin-brand {
  color: #fff;
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 26px;
  text-decoration: none;
}

.admin-brand:hover {
  color: #fff;
}

.admin-menu {
  display: grid;
  gap: 14px;
}

.admin-menu-group {
  display: grid;
  gap: 6px;
}

.admin-menu-group h2 {
  color: #82a3bf;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 4px 8px 2px;
}

.admin-menu-link {
  align-items: center;
  border-radius: 6px;
  color: #d8e6f3;
  display: flex;
  min-height: 42px;
  padding: 10px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.admin-menu-link:hover,
.admin-menu-link.is-active {
  background: #1f8eed;
  color: #fff;
}

.admin-menu-form {
  margin: 0;
}

.admin-menu-button {
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  width: 100%;
}

.admin-content {
  min-width: 0;
  padding: 28px 32px;
}

.admin-page {
  max-width: 980px;
}

.admin-page-header {
  margin-bottom: 20px;
}

.admin-page-header h1 {
  font-size: 1.7rem;
  font-weight: 700;
  margin: 0;
}

.admin-page-header p {
  color: #667085;
  margin: 0;
}

.amazon-admin-header {
  align-items: flex-end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.admin-user-switcher {
  min-width: 320px;
}

.admin-user-switcher label {
  color: #526173;
  display: block;
  font-size: .875rem;
  margin-bottom: .35rem;
}

.amazon-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}

.amazon-admin-tabs a {
  align-items: center;
  background: #fff;
  border: 1px solid #d8e2ec;
  border-radius: .5rem;
  color: #263746;
  display: inline-flex;
  font-weight: 600;
  min-height: 38px;
  padding: .45rem .85rem;
  text-decoration: none;
}

.amazon-admin-tabs a.is-active {
  background: #2d8cff;
  border-color: #2d8cff;
  color: #fff;
}

.admin-two-column {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-report-content {
  max-width: none;
}

.admin-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px 8px 0 0;
  display: flex;
  gap: 0;
  margin-bottom: 0;
  overflow-x: auto;
}

.admin-tab {
  border-bottom: 2px solid transparent;
  color: #344054;
  min-width: 120px;
  padding: 14px 18px 12px;
  text-align: center;
  text-decoration: none;
}

.admin-tab:hover,
.admin-tab.is-active {
  border-bottom-color: #1f8eed;
  color: #1264c8;
}

.settings-form {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 0 0 8px 8px;
  border-top: 0;
  padding: 24px 20px;
}

.settings-grid {
  display: grid;
  gap: 20px;
  max-width: 380px;
}

.settings-form .btn {
  margin-top: 10px;
  min-width: 96px;
}

.route-input-group {
  max-width: 380px;
}

.module-list {
  display: grid;
  gap: 20px;
}

.admin-platform-group {
  display: grid;
  gap: 12px;
}

.admin-platform-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.admin-platform-header h2 {
  font-size: 1.12rem;
  font-weight: 700;
  margin: 0;
}

.admin-feature-list {
  display: grid;
  gap: 14px;
}

.module-card {
  align-items: center;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 20px;
}

.module-card h2,
.module-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.module-card p {
  color: #667085;
  margin: 0 0 8px;
}

.module-key {
  color: #8a95a3;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
}

.module-actions {
  align-items: center;
  display: inline-flex;
  gap: 10px;
  min-width: 150px;
  justify-content: flex-end;
}

.module-access-form {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  justify-items: start;
  min-width: 210px;
}

.module-actions .btn {
  min-width: 72px;
}

.upload-retention-days {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.upload-retention-days.is-hidden {
  display: none;
}

.upload-retention-days .form-label {
  margin: 0;
  white-space: nowrap;
}

.upload-retention-days .number-input {
  width: 96px;
}

.module-status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.9rem;
  padding: 4px 10px;
}

.module-status.is-enabled {
  background: #d1fadf;
  color: #067647;
}

.module-status.is-disabled {
  background: #fee4e2;
  color: #b42318;
}

.nav-logout-form {
  display: flex;
}

.nav-logout-form .nav-link {
  border: 0;
  padding-bottom: 0.5rem;
  padding-top: 0.5rem;
  text-decoration: none;
}

.login-tool-shell {
  max-width: 560px;
}

.login-tool-form {
  padding: 28px;
}

.order-analysis-shell {
  max-width: 1180px;
}

.order-data-center-shell {
  align-items: flex-start;
  display: grid;
  gap: 22px;
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: none;
  width: 100%;
}

.order-data-sidebar {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 16px;
  position: sticky;
  top: 86px;
}

.order-data-brand {
  border-bottom: 1px solid #edf1f6;
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.order-data-brand strong {
  color: #111827;
  font-size: 0.98rem;
}

.order-data-brand span {
  color: #667085;
  font-size: 0.82rem;
}

.order-data-menu {
  display: grid;
  gap: 6px;
}

.order-data-menu-link {
  border-radius: 6px;
  color: #334155;
  font-weight: 600;
  padding: 9px 10px;
  text-decoration: none;
}

.order-data-menu-link:hover,
.order-data-menu-link.is-active {
  background: #eef5ff;
  color: #0d6efd;
}

.order-data-content {
  min-width: 0;
}

.order-data-heading {
  margin-bottom: 18px;
}

.order-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-page-shell {
  max-width: none;
  width: min(100%, calc(100vw - 48px));
}

.order-data-content > .report-page-shell {
  width: 100%;
}

.admin-report-page-shell {
  width: 100%;
}

.order-upload-form {
  margin-bottom: 22px;
}

.order-product-name-form {
  margin-bottom: 22px;
}

.order-product-name-form .tool-panel,
.order-upload-form .tool-panel {
  margin-top: 0;
}

.order-product-name-form .order-table th:last-child,
.order-product-name-form .order-table td:last-child {
  width: 92px;
}

.order-options-grid {
  border-top: 1px solid #edf1f6;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 22px;
}

.order-import-guidance {
  border-radius: 8px;
  display: grid;
  gap: 6px;
  line-height: 1.55;
  margin: 18px 0 22px;
}

.order-management-commandbar {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 20px;
}

.order-management-tabs {
  align-items: stretch;
  display: flex;
  gap: 4px;
}

.order-management-tabs a {
  border-bottom: 3px solid transparent;
  color: var(--admin-muted);
  font-weight: 700;
  padding: 11px 15px 10px;
  text-decoration: none;
}

.order-management-tabs a:hover {
  color: var(--admin-text);
}

.order-management-tabs a.is-active {
  border-bottom-color: var(--ui-teal);
  color: var(--admin-text);
}

.order-management-command-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 8px;
}

.order-import-modal .order-import-guidance {
  margin: 0;
}

.order-import-modal .order-options-grid {
  border-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 0;
}

.order-import-advanced {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 13px 15px;
}

.order-import-advanced summary {
  cursor: pointer;
  font-weight: 700;
}

.order-import-advanced .table,
.product-name-mappings-modal .table {
  min-width: 620px;
}

.order-import-advanced .order-table th:last-child,
.order-import-advanced .order-table td:last-child,
.product-name-mappings-modal .order-table th:last-child,
.product-name-mappings-modal .order-table td:last-child {
  width: 88px;
}

.report-list-commandbar {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.report-list-filter {
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
  margin-bottom: 0;
}

.report-create-button {
  flex: 0 0 auto;
  min-height: 38px;
  white-space: nowrap;
}

.report-generate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-generate-grid .report-filter-store {
  grid-column: auto;
}

.report-filter-grid {
  align-items: end;
  display: grid;
  gap: 14px 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
  justify-content: start;
}

.report-filter-field {
  min-width: 0;
}

.report-filter-field .form-control,
.report-filter-field .form-select {
  min-width: 0;
  width: 100%;
}

.report-filter-year .form-control {
  min-width: 6rem;
}

.report-filter-store {
  grid-column: span 2;
}

.report-filter-action {
  align-self: end;
  justify-self: start;
}

.report-filter-action .btn {
  min-width: 96px;
  white-space: nowrap;
}

.report-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.report-actions form {
  display: inline-flex;
  margin: 0;
}

.report-actions .btn {
  min-width: 72px;
  padding-left: 10px;
  padding-right: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.report-actions .btn-outline-danger {
  min-width: 56px;
}

.generated-reports-table {
  min-width: 1240px;
}

.generated-reports-table .report-name-cell {
  max-width: 220px;
  white-space: normal;
}

.generated-reports-table .report-date-range,
.generated-reports-table .report-created-at {
  min-width: 128px;
}

.generated-reports-table .report-action-cell {
  min-width: 260px;
}

.generated-reports-table .report-action-cell {
  min-width: 268px;
  white-space: nowrap;
}

.tool-panel,
.admin-panel {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-top: 22px;
  padding: 22px;
}

.tool-panel-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.tool-panel-header h2,
.admin-panel h2 {
  font-size: 1.08rem;
  font-weight: 700;
  margin: 0;
}

.tool-panel-header span {
  color: #667085;
  font-size: 0.92rem;
}

.order-table,
.admin-table {
  margin-bottom: 0;
}

.order-table th,
.admin-table th {
  color: #475569;
  font-size: 0.9rem;
  white-space: nowrap;
}

.order-table td,
.admin-table td {
  vertical-align: middle;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0 22px;
}

.metric-card {
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 18px;
}

.metric-card span {
  color: #667085;
}

.metric-card strong {
  color: #111827;
  font-size: 1.45rem;
}

.metric-grid-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.daily-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.daily-chip {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  display: inline-flex;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
}

.report-bar-chart {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  min-height: 210px;
  overflow-x: hidden;
  padding: 8px 2px 2px;
}

.report-bar-chart-short {
  gap: 10px;
}

.report-bar-chart-medium {
  gap: 8px;
}

.report-bar-chart-dense {
  gap: 3px;
}

.report-bar-chart-scroll {
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
}

.report-bar-item {
  align-items: center;
  display: grid;
  flex: 1 1 0;
  gap: 6px;
  grid-template-rows: auto 140px auto;
  justify-items: center;
  min-width: 0;
}

.report-bar-chart-short .report-bar-item {
  flex: 0 0 54px;
}

.report-bar-chart-medium .report-bar-item {
  flex: 0 1 54px;
  min-width: 46px;
}

.report-bar-chart-dense .report-bar-item {
  flex: 1 1 0;
}

.report-bar-chart-scroll .report-bar-item {
  flex: 0 0 28px;
}

.report-bar-value {
  color: #344054;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.report-bar-track {
  align-items: end;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  display: flex;
  height: 140px;
  overflow: hidden;
  width: 18px;
}

.report-bar-fill {
  background: linear-gradient(180deg, #2f80ed 0%, #0f766e 100%);
  border-radius: 7px 7px 0 0;
  display: block;
  min-height: 8px;
  width: 100%;
}

.report-bar-label {
  color: #667085;
  font-size: 0.75rem;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.report-bar-chart-short .report-bar-label,
.report-bar-chart-medium .report-bar-label {
  line-height: 1.15;
  overflow: visible;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}

.report-bar-chart-dense .report-bar-value,
.report-bar-chart-dense .report-bar-label,
.report-bar-chart-scroll .report-bar-value,
.report-bar-chart-scroll .report-bar-label {
  font-size: 0.68rem;
}

.report-bar-chart-dense .report-bar-track,
.report-bar-chart-scroll .report-bar-track {
  width: min(12px, 72%);
}

.report-result-header {
  align-items: center;
}

.report-tabs {
  align-items: center;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 0;
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.report-tabs a {
  border-radius: 6px;
  color: #344054;
  font-weight: 600;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.report-tabs a:hover,
.report-tabs a:focus {
  background: #eef4ff;
  color: #155eef;
}

.report-section {
  scroll-margin-top: 74px;
}

.report-dashboard-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.report-mini-panel {
  border: 1px solid #edf1f6;
  border-radius: 8px;
  padding: 16px;
}

.report-mini-panel h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 12px;
}

.report-page-shell .report-result-header {
  margin-bottom: 14px;
}

.report-page-shell .tool-panel {
  margin-top: 18px;
  padding: 18px 20px;
}

.report-page-shell .tool-panel-header {
  margin-bottom: 12px;
}

.report-page-shell .metric-grid {
  gap: 12px;
  margin: 14px 0 16px;
}

.report-page-shell .metric-card {
  gap: 4px;
  min-height: 86px;
  padding: 14px 16px;
}

.report-page-shell .metric-card strong {
  font-size: 1.34rem;
}

.report-page-shell .report-dashboard-grid {
  gap: 14px;
}

.report-page-shell .report-mini-panel {
  padding: 14px 16px;
}

.report-page-shell .report-compact-details {
  padding: 0;
}

.report-page-shell .report-compact-details summary {
  min-height: 46px;
  padding: 11px 14px;
}

.report-page-shell .report-compact-details summary span {
  font-size: 0.98rem;
}

.report-page-shell .report-compact-details summary small {
  font-size: 0.86rem;
}

.report-page-shell .report-compact-details[open] summary {
  margin-bottom: 0;
  padding-bottom: 11px;
}

.report-page-shell .report-compact-details > .table-responsive,
.report-page-shell .report-compact-details > .report-wide-table,
.report-page-shell .report-compact-details > .empty-state {
  padding: 0 14px 12px;
}

.report-page-shell .report-compact-details .dt-container {
  padding: 0;
}

.report-page-shell .report-compact-details .dt-scroll,
.report-page-shell .report-compact-details .dt-container > .dt-layout-row {
  padding-left: 0;
  padding-right: 0;
}

.report-page-shell .report-compact-details table.dataTable {
  margin-bottom: 0;
}

.report-page-shell .report-compact-details .order-table th,
.report-page-shell .report-compact-details .order-table td {
  font-size: 0.88rem;
  padding: 0.34rem 0.48rem;
}

.report-page-shell .report-wide-details .order-table th,
.report-page-shell .report-wide-details .order-table td {
  font-size: inherit;
  padding: 0.45rem 0.6rem;
}

.report-page-shell .report-analysis-grid {
  gap: 14px;
  margin-bottom: 14px;
}

.report-page-shell .report-tabs {
  margin-top: 14px;
}

.report-analysis-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom: 18px;
}

.report-page-shell .report-analysis-grid-compact {
  align-items: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-page-shell .report-analysis-grid-compact .report-wide-details {
  grid-column: 1 / -1;
}

.report-page-shell .report-analysis-grid-compact .report-compact-details[open] > .table-responsive,
.report-page-shell .report-analysis-grid-compact .report-compact-details[open] > .report-wide-table {
  overflow: visible;
}

.report-page-shell .report-analysis-grid-compact .report-wide-details[open] > .report-wide-table {
  max-height: none;
}

.report-wide-table {
  overflow-x: auto;
  padding-bottom: 2px;
}

.report-grid-table {
  min-width: max-content;
}

.report-grid-table thead th {
  background: #0f766e;
  color: #fff;
}

.report-grid-table th,
.report-grid-table td {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.report-page-shell .order-table th,
.report-page-shell .order-table td {
  padding: 0.45rem 0.6rem;
}

.report-grid-table th:first-child,
.report-grid-table td:first-child,
.report-grid-table th:nth-child(2),
.report-grid-table td:nth-child(2),
.report-grid-table .source-title-cell {
  text-align: left;
}

.report-grid-table .sticky-col {
  background: #fff;
  left: 0;
  min-width: 180px;
  position: sticky;
  z-index: 2;
}

.report-grid-table thead .sticky-col {
  background: #0f766e;
  color: #fff;
}

.total-row td,
.total-row .sticky-col {
  background: #fce4d6;
  font-weight: 700;
}

.peak-row td {
  background: #fff7ed;
  font-weight: 700;
}

.raw-order-table th,
.raw-order-table td {
  max-width: 280px;
}

.raw-order-table .derived-column {
  background: #155eef;
}

.dt-container {
  color: #344054;
  font-size: 0.94rem;
  width: 100%;
}

.dt-container .dt-layout-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin: 10px 0;
}

.report-page-shell .dt-container .dt-layout-row {
  gap: 10px;
  margin: 8px 0;
}

.dt-container .dt-layout-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dt-container .dt-search,
.dt-container .dt-length {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.dt-container .dt-input {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: #111827;
  min-height: 36px;
  padding: 6px 10px;
}

.dt-container .dt-search .dt-input {
  min-width: 220px;
}

.dt-container .dt-paging {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dt-container .dt-paging .dt-paging-button {
  background: #fff;
  border: 1px solid #d0d7e2;
  border-radius: 6px;
  color: #344054 !important;
  cursor: pointer;
  min-height: 34px;
  padding: 5px 10px;
}

.dt-container .dt-paging .dt-paging-button.current {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff !important;
}

.dt-container .dt-paging .dt-paging-button.disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.dt-container .dt-scroll-body {
  border: 1px solid #edf1f6;
  border-radius: 0 0 8px 8px;
  overscroll-behavior: contain;
}

.report-page-shell .dt-scroll {
  width: 100%;
}

.report-page-shell .dt-scroll-body {
  min-height: 120px;
}

.report-page-shell .report-table-container-large .dt-scroll-body {
  max-height: 520px;
}

.report-page-shell .report-table-container-wide .dt-scroll-body {
  max-height: 420px;
}

.report-page-shell .report-table-container-summary .dt-scroll-body {
  max-height: 320px;
}

.report-page-shell .report-table-container-compact .dt-scroll-body {
  max-height: 360px;
}

.dt-container .dt-scroll-head table,
.dt-container .dt-scroll-body table {
  margin-bottom: 0;
}

.dt-container table.dataTable > thead > tr > th {
  outline: none;
}

.dt-container table.report-grid-table > thead > tr > th {
  background: #0f766e;
  color: #fff;
}

.dt-container table.dataTable > tbody > tr.total-row > *,
.dt-container table.dataTable > tfoot > tr.total-row > * {
  box-shadow: none;
}

.dt-container table.dataTable > tfoot > tr.total-row > th,
.dt-container table.dataTable > tfoot > tr.total-row > td {
  background: #ecfdf3;
  color: #064e3b;
  font-weight: 700;
}

.dt-container .source-title-cell {
  white-space: normal !important;
}

.translated-value {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.translated-value-cn {
  color: #667085;
  font-size: 0.86em;
}

.report-details summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}

.report-details summary::-webkit-details-marker {
  display: none;
}

.report-details summary span {
  color: #111827;
  font-size: 1.08rem;
  font-weight: 700;
}

.report-details summary small {
  color: #667085;
}

.report-details summary::after {
  color: #475467;
  content: "展开";
  font-weight: 600;
  margin-left: 16px;
}

.report-details[open] summary {
  border-bottom: 1px solid #edf1f6;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.report-details[open] summary::after {
  content: "收起";
}

.source-title-cell {
  max-width: 420px;
  min-width: 320px;
  white-space: normal !important;
}

.empty-state {
  background: #f8fbff;
  border: 1px dashed #c7d7fe;
  border-radius: 8px;
  color: #475467;
  padding: 18px;
}

.admin-wide-page {
  max-width: 1240px;
}

.system-database-admin-content {
  padding-right: 24px;
}

.system-database-page {
  max-width: none;
  width: 100%;
}

.system-database-page .admin-panel {
  overflow: hidden;
}

.system-database-page .admin-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.system-database-provider-grid .admin-metric-card strong,
.system-database-provider-grid .admin-metric-card small {
  overflow-wrap: anywhere;
}

.system-database-provider-grid .admin-metric-card small {
  display: block;
  margin-top: 4px;
}

.system-database-operations-panel {
  overflow: visible !important;
}

.system-database-status-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

.system-database-status-grid .admin-metric-card strong,
.system-database-status-grid .admin-metric-card small {
  overflow-wrap: anywhere;
}

.system-database-status-grid .admin-metric-card small {
  display: block;
  margin-top: 5px;
}

.system-database-current-provider {
  border-left: 3px solid var(--admin-primary);
}

.system-database-pending-provider {
  background: #fffbeb;
  border-color: #f5d98b;
}

.system-database-operation-form {
  margin-top: 20px;
}

.system-database-config-section {
  border-bottom: 1px solid var(--admin-border);
  border-top: 1px solid var(--admin-border);
  padding: 20px 0;
}

.system-database-subsection-heading {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.system-database-subsection-heading h3 {
  font-size: 1rem;
  margin: 0;
}

.system-database-subsection-heading .form-text {
  margin: 4px 0 0;
}

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

.system-database-authentication-group {
  border: 0;
  margin: 0 0 16px;
  min-width: 0;
  padding: 0;
}

.system-database-authentication-group legend {
  float: none;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  width: auto;
}

.system-database-segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 190px));
  width: fit-content;
}

.system-database-segmented-control input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.system-database-segmented-control label {
  align-items: center;
  background: #fff;
  border: 1px solid var(--admin-border);
  color: var(--admin-muted);
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  font-weight: 600;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
}

.system-database-segmented-control label:first-of-type {
  border-radius: 6px 0 0 6px;
}

.system-database-segmented-control label:last-of-type {
  border-left: 0;
  border-radius: 0 6px 6px 0;
}

.system-database-segmented-control input:checked + label {
  background: var(--admin-primary-soft);
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.system-database-segmented-control input:focus-visible + label {
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
  position: relative;
  z-index: 1;
}

.system-database-segmented-control input:disabled + label {
  cursor: not-allowed;
  opacity: 0.55;
}

.system-database-secret-toggle {
  align-items: center;
  display: inline-flex;
  flex: 0 0 42px;
  justify-content: center;
  width: 42px;
}

.system-database-advanced-connection {
  border-top: 1px solid #edf1f6;
  margin-top: 16px;
  padding-top: 14px;
}

.system-database-advanced-connection summary {
  color: var(--admin-muted);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
}

.system-database-workflow-section {
  margin-top: 22px;
}

.system-database-workflow-tabs {
  gap: 4px;
}

.system-database-workflow-tabs .nav-link {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  min-height: 42px;
}

.system-database-workflow-content {
  border: 1px solid var(--admin-border);
  border-top: 0;
  min-height: 220px;
  padding: 20px;
}

.system-database-workflow-direction {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  margin-bottom: 16px;
  max-width: 620px;
}

.system-database-workflow-direction > div {
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
}

.system-database-workflow-direction > div span {
  color: var(--admin-muted);
  font-size: 0.78rem;
}

.system-database-workflow-direction > div strong {
  overflow-wrap: anywhere;
}

.system-database-workflow-direction > svg {
  align-self: center;
  color: var(--admin-muted);
  justify-self: center;
}

.system-database-workflow-content .alert {
  max-width: 760px;
}

.system-database-migration-options {
  display: grid;
  gap: 10px;
}

.system-database-destructive-option {
  align-items: center;
  display: flex;
  min-height: 28px;
}

.system-database-destructive-option .form-check-input {
  flex: 0 0 auto;
}

.system-database-help-button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #667085;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
  margin-left: 4px;
  padding: 0;
  width: 28px;
}

.system-database-help-button:hover,
.system-database-help-button:focus-visible {
  color: var(--admin-primary);
}

.system-database-help-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 1px;
}

.system-database-filter-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.system-database-filter-actions .btn {
  min-width: 92px;
}

.system-database-page [data-system-database-bulk-delete-form] {
  margin: 0;
}

.system-database-table-scroll {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  margin-top: 16px;
  overflow-x: auto;
}

.system-database-table {
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 0;
  min-width: 1120px;
}

.system-database-table th,
.system-database-table td {
  max-width: 260px;
  white-space: nowrap;
}

.system-database-table th {
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}

.system-database-table .system-database-selection-header,
.system-database-table .system-database-selection-cell {
  max-width: 44px;
  min-width: 44px;
  text-align: center;
  width: 44px;
}

.system-database-table .system-database-selection-header {
  left: 0;
  position: sticky;
  z-index: 6;
}

.system-database-table .system-database-selection-cell {
  --bs-table-bg: var(--admin-surface);
  background: var(--admin-surface);
  left: 0;
  position: sticky;
  z-index: 3;
}

.system-database-table .system-database-selection-header input,
.system-database-table .system-database-selection-cell input {
  cursor: pointer;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  width: 16px;
}

.system-database-table th a {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.system-database-column-name {
  font-weight: 700;
}

.system-database-column-desc,
.system-database-field-label small {
  color: #667085;
  font-size: 12px;
  font-weight: 400;
}

.system-database-field-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}

.system-database-cell > span {
  display: inline-block;
  max-width: min(240px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.system-database-cell {
  overflow: hidden;
}

.system-database-path-cell > span {
  max-width: 520px;
}

.system-database-table .system-database-actions-header,
.system-database-table .system-database-actions-cell {
  --bs-table-accent-bg: transparent;
  background-clip: border-box;
  isolation: isolate;
  max-width: 150px;
  min-width: 150px;
  position: sticky;
  right: 0;
  width: 150px;
}

.system-database-table .system-database-actions-header {
  --bs-table-bg: var(--admin-surface-soft);
  background: var(--admin-surface-soft);
  background-color: var(--admin-surface-soft);
  border-left: 1px solid #dde3ea;
  top: 0;
  z-index: 5;
}

.system-database-table .system-database-actions-cell {
  --bs-table-bg: var(--admin-surface);
  background: var(--admin-surface);
  background-color: var(--admin-surface);
  border-left: 1px solid #edf1f6;
  box-shadow: -18px 0 0 var(--admin-surface), -10px 0 14px rgba(15, 23, 42, 0.06);
  z-index: 4;
}

.system-database-actions-header::before,
.system-database-actions-cell::before,
.system-database-actions-header::after,
.system-database-actions-cell::after {
  background: inherit;
  bottom: 0;
  content: "";
  pointer-events: none;
  position: absolute;
  top: 0;
}

.system-database-actions-header::before,
.system-database-actions-cell::before {
  left: -18px;
  width: 18px;
}

.system-database-actions-header::after,
.system-database-actions-cell::after {
  left: 0;
  right: 0;
}

.system-database-actions-header::before,
.system-database-actions-header::after {
  z-index: 0;
}

.system-database-actions-cell::before,
.system-database-actions-cell::after {
  z-index: 1;
}

.system-database-row-actions {
  align-items: center;
  background: var(--admin-surface);
  box-shadow: -14px 0 0 var(--admin-surface);
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  padding-left: 8px;
  position: relative;
  white-space: nowrap;
  z-index: 2;
}

.system-database-row-actions form {
  margin: 0;
}

.system-database-actions-cell .btn:not(:hover):not(:focus):not(:active) {
  background-color: var(--admin-surface);
}

.system-database-field-grid {
  display: grid;
  gap: 12px 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.system-database-insert-panel {
  overflow: visible !important;
}

.system-database-form-actions {
  align-items: end;
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.system-database-table-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.system-database-edit-modal .modal-body {
  background: #f8fafc;
}

.system-database-confirm-summary {
  background: #f8fafc;
  border: 1px solid #e4eaf2;
  border-radius: 8px;
  display: grid;
  gap: 8px 12px;
  grid-template-columns: 96px minmax(0, 1fr);
  margin: 12px 0;
  padding: 12px;
}

.system-database-confirm-summary dt {
  color: #667085;
  font-weight: 600;
}

.system-database-confirm-summary dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.inline-form-grid,
.admin-filter-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-filter-form {
  align-items: end;
  background: #fff;
  border: 1px solid #dde3ea;
  border-radius: 8px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 280px));
  justify-content: start;
  margin-bottom: 20px;
  padding: 18px;
}

.admin-filter-form > .form-row {
  margin-bottom: 0;
}

.admin-filter-actions {
  align-items: center;
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.admin-filter-actions .btn {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
}

.quick-date-range-field {
  min-width: 0;
}

.quick-date-range-field .form-select {
  min-width: 0;
  width: 100%;
}

.report-generate-grid .report-filter-quick-range {
  grid-column: 1 / -1;
  max-width: 220px;
}

.system-database-filter-form {
  align-items: end;
  grid-template-columns: minmax(260px, 420px) minmax(220px, 360px) minmax(120px, 150px) auto;
  justify-content: start;
}

.form-row-action {
  align-content: end;
}

.reset-password-form {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  min-width: 220px;
}

.standalone-settings-form {
  border-top: 1px solid #dde3ea;
  border-radius: 8px;
}

.admin-panel-title-row {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.admin-panel-title-row h2 {
  margin-bottom: 4px;
}

.admin-panel-actions,
.translation-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.translation-import-form {
  border-top: 1px solid #edf1f6;
  margin-bottom: 20px;
  margin-top: 4px;
  padding-top: 18px;
}

.translation-original {
  font-weight: 700;
  min-width: 160px;
}

.translation-chinese {
  min-width: 180px;
}

.admin-pagination {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
}

.admin-pagination-summary {
  color: #5f6b7a;
  font-size: 0.9rem;
}

.admin-pagination-controls,
.admin-pagination-page-form,
.admin-pagination-size-form {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-pagination-controls .disabled {
  pointer-events: none;
}

.admin-pagination-page-form,
.admin-pagination-size-form {
  margin: 0;
}

.admin-pagination-page-form .form-label,
.admin-pagination-size-form .form-label {
  color: #5f6b7a;
  font-size: 0.9rem;
  margin: 0;
  white-space: nowrap;
}

.admin-pagination-jump-input {
  max-width: 76px;
  text-align: center;
}

.admin-pagination-page-suffix {
  color: #5f6b7a;
  font-size: 0.9rem;
  margin-left: -4px;
}

.admin-pagination-size-form .form-select {
  min-width: 96px;
}

.system-logs-page .admin-page-header,
.system-log-detail-page .admin-page-header {
  align-items: flex-start;
}

.system-log-filter-actions,
.system-log-detail-actions,
.system-log-actions-cell {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.system-log-actions-header,
.system-log-actions-cell {
  width: 220px;
}

.system-log-actions-cell form,
.system-log-detail-actions form {
  margin: 0;
}

.system-log-content {
  background: #0f172a;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  color: #e5e7eb;
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0;
  max-height: 70vh;
  overflow: auto;
  padding: 1rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.translation-management-page {
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-width: none;
  width: 100%;
}

.translation-management-page .admin-page-header {
  margin-bottom: 0;
}

.translation-management-page .admin-page-header h1 {
  font-size: 1.55rem;
}

.translation-management-page .admin-panel {
  box-sizing: border-box;
  margin-top: 0;
  max-width: none;
  padding: 14px 16px;
  width: 100%;
}

.translation-management-page .translation-edit-form {
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.translation-management-page .form-label {
  margin-bottom: 4px;
}

.translation-feedback-region {
  display: grid;
  gap: 8px;
}

.translation-feedback-region:empty {
  display: none;
}

.translation-feedback-region .alert {
  margin-bottom: 0;
}

.translation-list-panel {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

.translation-list-panel .admin-panel-title-row {
  margin-bottom: 0;
}

.translation-list-panel .admin-filter-form {
  grid-template-columns: minmax(260px, 420px) minmax(160px, 220px) auto;
  justify-content: start;
  margin-bottom: 0;
  padding: 12px 14px;
}

.translation-list-panel .translation-import-form {
  grid-template-columns: minmax(0, 2fr) minmax(160px, 1fr);
  margin: 0;
  padding-top: 8px;
}

.translation-table-scroll {
  border: 1px solid #edf1f6;
  border-radius: 8px;
  overflow: auto;
}

.translation-table-scroll .admin-table {
  margin-bottom: 0;
}

.translation-table-scroll .admin-table th,
.translation-table-scroll .admin-table td {
  padding: 0.55rem 0.65rem;
}

.translation-table-scroll .admin-table thead th {
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.translation-list-panel .admin-pagination {
  border-top: 1px solid #edf1f6;
  margin-top: 0;
  padding-top: 12px;
}

@media (max-width: 1100px) {
  .system-database-filter-form {
    grid-template-columns: minmax(220px, 360px) minmax(200px, 320px);
  }

  .report-page-shell .report-analysis-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .admin-login-page {
    align-items: stretch;
    padding: 16px;
  }

  .admin-login-panel {
    grid-template-columns: 1fr;
  }

  .admin-login-side {
    min-height: auto;
    padding: 22px;
  }

  .admin-login-side h1 {
    margin-top: 32px;
  }

  .admin-login-card {
    padding: 24px 22px;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    height: auto;
    overflow: visible;
    padding: 16px;
    position: static;
  }

  .admin-brand {
    margin-bottom: 12px;
  }

  .admin-menu {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .admin-menu-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-menu-group h2 {
    grid-column: 1 / -1;
    margin-left: 4px;
  }

  .admin-menu-link {
    justify-content: center;
  }

  .admin-content {
    padding: 20px 16px;
  }

  .amazon-admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-switcher {
    min-width: 0;
  }

  .admin-two-column {
    grid-template-columns: 1fr;
  }

  .report-filter-grid {
    grid-template-columns: 1fr;
  }

  .report-filter-store,
  .report-filter-action {
    grid-column: auto;
  }

  .report-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .report-actions .btn {
    width: auto;
  }

  .system-database-admin-content {
    padding: 20px 16px;
  }

  .system-database-page .admin-metric-grid,
  .system-database-filter-form,
  .system-database-field-grid,
  .system-database-connection-grid {
    grid-template-columns: 1fr;
  }

  .system-database-segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .system-database-workflow-content {
    padding: 16px;
  }

  .system-database-workflow-direction {
    grid-template-columns: 1fr;
  }

  .system-database-workflow-direction > svg {
    transform: rotate(90deg);
  }

  .system-database-filter-actions,
  .system-database-form-actions {
    justify-content: flex-start;
  }

  .system-database-table {
    min-width: 920px;
  }

  .translation-management-page {
    display: block;
    height: auto;
    overflow: visible;
  }

  .translation-management-page .admin-panel {
    margin-top: 18px;
    padding: 18px;
  }

  .translation-list-panel {
    display: block;
    overflow: visible;
  }

  .translation-list-panel .admin-filter-form,
  .translation-list-panel .translation-import-form {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .translation-table-scroll {
    margin-top: 16px;
    max-height: none;
    overflow: auto;
  }

  .tool-form {
    padding: 20px;
  }

  .order-data-center-shell {
    display: block;
    max-width: none;
  }

  .order-data-sidebar {
    margin-bottom: 16px;
    position: static;
  }

  .order-data-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-data-menu-link {
    text-align: center;
  }

  .fba-tool-form {
    padding: 20px;
  }

  .fba-source-guide {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }

  .fba-source-guide-trigger {
    width: 100%;
  }

  .fba-example-modal-gallery.has-secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  .upload-control {
    grid-template-columns: 1fr;
  }

  .upload-action {
    justify-self: stretch;
  }

  .options-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .check-list {
    padding-top: 0;
  }

  .module-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-actions {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .upload-retention-days {
    width: 100%;
  }

  .module-access-form {
    min-width: 0;
    width: 100%;
  }

  .order-options-grid,
  .inline-form-grid,
  .admin-filter-form,
  .metric-grid,
  .report-analysis-grid {
    grid-template-columns: 1fr;
  }

  .tool-panel,
  .admin-panel {
    padding: 18px;
  }

  .tool-panel-header,
  .report-result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .app-main-fluid {
    padding-left: 12px;
    padding-right: 12px;
  }

  .report-page-shell {
    margin-top: 18px;
    width: 100%;
  }

  .report-page-shell .tool-panel {
    padding: 18px;
  }

  .report-page-shell .report-table-container-large .dt-scroll-body,
  .report-page-shell .report-table-container-wide .dt-scroll-body,
  .report-page-shell .report-table-container-summary .dt-scroll-body {
    max-height: 320px;
  }

  .report-page-shell .report-table-container-compact .dt-scroll-body {
    max-height: 360px;
  }

  .report-tabs {
    position: static;
  }

  .admin-panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .reset-password-form {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
  }
}

/* Admin visual refresh: keeps Razor pages and form posts intact while modernizing the shell. */
:root {
  --admin-bg: #f4f6f8;
  --admin-surface: #ffffff;
  --admin-surface-soft: #f8faf9;
  --admin-border: #d9e1e8;
  --admin-border-strong: #c3ced8;
  --admin-text: #18211f;
  --admin-muted: #64716d;
  --admin-subtle: #8a9793;
  --admin-sidebar: #17201b;
  --admin-sidebar-soft: #223129;
  --admin-sidebar-text: #dfe9e5;
  --admin-primary: #0f766e;
  --admin-primary-hover: #0b5f59;
  --admin-primary-soft: #e6f5f2;
  --admin-warning: #b7791f;
  --admin-danger: #b42318;
  --admin-danger-soft: #fff0ed;
  --admin-shadow: 0 12px 34px rgba(24, 33, 31, 0.08);
}

.admin-body,
.admin-login-body {
  background:
    linear-gradient(180deg, rgba(244, 246, 248, 0.96), rgba(244, 246, 248, 1));
  color: var(--admin-text);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

.admin-dashboard {
  background: var(--admin-bg);
  grid-template-columns: 248px minmax(0, 1fr);
}

.admin-sidebar {
  background: var(--admin-sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 10px 0 28px rgba(24, 33, 31, 0.12);
  color: var(--admin-sidebar-text);
  padding: 18px 14px;
}

.admin-sidebar-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0 4px 18px;
  padding: 0 0 16px;
}

.admin-brand {
  align-items: center;
  color: #fff;
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  min-height: 44px;
}

.admin-brand-mark {
  align-items: center;
  background: #f2b84b;
  border-radius: 8px;
  color: #17201b;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  letter-spacing: 0;
  width: 34px;
}

.admin-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-brand-title {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.1;
}

.admin-brand-subtitle {
  color: #aabbb4;
  font-size: 0.78rem;
  font-weight: 400;
}

.admin-menu {
  gap: 18px;
}

.admin-menu-group {
  gap: 4px;
}

.admin-menu-group h2 {
  color: #94a7a0;
  font-size: 0.72rem;
  font-weight: 700;
  margin: 0 10px 7px;
}

.admin-menu-link {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--admin-sidebar-text);
  font-size: 0.93rem;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 10px;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.admin-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-menu-link.is-active {
  background: #f3f6f4;
  border-color: #f3f6f4;
  color: #17201b;
}

.admin-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  padding: 0;
}

.admin-topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 28px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.admin-topbar-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-topbar-title span {
  color: var(--admin-subtle);
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-topbar-title strong {
  color: var(--admin-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
}

.admin-user-chip {
  background: var(--admin-primary-soft);
  border: 1px solid #b7ded7;
  border-radius: 999px;
  color: #0b5f59;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  padding: 5px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Admin workbench */
.admin-dashboard-content .admin-content-inner {
  max-width: none;
}

.admin-workbench {
  display: grid;
  gap: 14px;
  max-width: none;
  min-width: 0;
}

.dashboard-page-header {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  margin-bottom: 0;
}

.dashboard-refresh-state {
  align-items: center;
  color: var(--admin-muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .78rem;
  gap: 7px;
}

.dashboard-live-dot {
  background: #1f9d72;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(31, 157, 114, .13);
  height: 7px;
  width: 7px;
}

.admin-workbench.has-runtime-error .dashboard-live-dot {
  background: var(--admin-danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}

.dashboard-live-strip {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  display: grid;
  grid-template-columns: minmax(300px, 1.35fr) repeat(3, minmax(190px, 1fr));
  min-width: 0;
  overflow: hidden;
}

.dashboard-admin-summary,
.dashboard-live-metric {
  min-height: 132px;
  min-width: 0;
  padding: 15px 17px;
}

.dashboard-live-metric {
  border-left: 1px solid var(--admin-border);
  display: grid;
  gap: 7px;
  grid-template-rows: auto 54px auto;
}

.dashboard-admin-summary {
  align-items: center;
  display: flex;
  gap: 15px;
}

.dashboard-admin-avatar {
  align-items: center;
  background: #0f766e;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 58px;
  font-size: 1.3rem;
  font-weight: 700;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.dashboard-admin-copy {
  display: grid;
  gap: 9px;
  min-width: 0;
  width: 100%;
}

.dashboard-admin-copy > div {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.dashboard-admin-copy > div strong {
  color: var(--admin-text);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.dashboard-admin-copy > div span,
.dashboard-admin-copy dt,
.dashboard-live-metric small {
  color: var(--admin-muted);
  font-size: .74rem;
}

.dashboard-admin-copy dl,
.dashboard-runtime-facts,
.dashboard-status-panel dl {
  display: grid;
  margin: 0;
}

.dashboard-admin-copy dl {
  gap: 3px;
}

.dashboard-admin-copy dl div,
.dashboard-runtime-facts div {
  align-items: baseline;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.dashboard-admin-copy dd,
.dashboard-runtime-facts dd {
  color: var(--admin-text);
  font-size: .76rem;
  margin: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-live-metric-heading {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.dashboard-live-metric-heading span {
  color: var(--admin-muted);
  font-size: .78rem;
  font-weight: 600;
}

.dashboard-live-metric-heading strong {
  color: var(--admin-text);
  font-size: 1.18rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.dashboard-live-metric-cpu {
  border-top: 3px solid #1683a8;
}

.dashboard-live-metric-memory {
  border-top: 3px solid #8358b6;
}

.dashboard-live-metric-uptime {
  border-top: 3px solid #d08724;
}

.dashboard-live-metric-uptime .dashboard-live-metric-heading strong {
  font-size: .76rem;
  font-weight: 400;
}

.dashboard-sparkline {
  background: rgba(248, 250, 249, .72);
  border: 1px solid rgba(100, 113, 109, .13);
  border-radius: 4px;
  display: block;
  height: 54px;
  max-width: 100%;
  width: 100%;
}

.dashboard-live-metric-cpu .dashboard-sparkline {
  background: rgba(22, 131, 168, .035);
  border-color: rgba(22, 131, 168, .14);
}

.dashboard-live-metric-memory .dashboard-sparkline {
  background: rgba(131, 88, 182, .035);
  border-color: rgba(131, 88, 182, .14);
}

.dashboard-chart-meta {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.dashboard-chart-meta small:last-child {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-runtime-facts {
  align-content: center;
  gap: 5px;
}

.dashboard-runtime-facts dt {
  color: var(--admin-muted);
  font-size: .73rem;
  font-weight: 600;
}

.dashboard-environment-bar {
  align-items: center;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .75rem;
  gap: 8px 20px;
  min-height: 36px;
  padding: 7px 12px;
}

.dashboard-environment-bar strong {
  color: var(--admin-text);
  font-weight: 700;
  margin-right: 4px;
}

.dashboard-environment-os {
  flex: 1 1 260px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-business-snapshot {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.dashboard-section-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 30px;
}

.dashboard-section-heading > div {
  align-items: baseline;
  display: flex;
  gap: 10px;
}

.dashboard-section-heading h2,
.dashboard-data-panel h2,
.dashboard-status-panel h2 {
  color: var(--admin-text);
  font-size: .92rem;
  font-weight: 700;
  margin: 0;
}

.dashboard-section-heading span,
.dashboard-data-panel header span {
  color: var(--admin-muted);
  font-size: .74rem;
}

.dashboard-section-warning {
  background: var(--admin-danger-soft);
  border: 1px solid #f4c5bd;
  border-radius: 5px;
  color: var(--admin-danger) !important;
  padding: 4px 8px;
}

.dashboard-kpi-grid,
.dashboard-status-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-text);
  display: grid;
  gap: 4px;
  min-height: 98px;
  min-width: 0;
  padding: 13px 15px;
  position: relative;
  text-decoration: none;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}

.dashboard-kpi-card::before {
  background: var(--dashboard-accent, var(--admin-primary));
  content: "";
  height: 3px;
  left: -1px;
  position: absolute;
  right: -1px;
  top: -1px;
}

.dashboard-kpi-card:hover,
.dashboard-kpi-card:focus-visible {
  border-color: var(--dashboard-accent, var(--admin-primary));
  box-shadow: 0 5px 14px rgba(24, 33, 31, .08);
  color: var(--admin-text);
  transform: translateY(-1px);
}

.dashboard-kpi-card > span {
  color: var(--admin-muted);
  font-size: .79rem;
  font-weight: 600;
}

.dashboard-kpi-card > strong {
  color: var(--admin-text);
  font-size: 1.48rem;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-kpi-card > small {
  color: var(--dashboard-accent, var(--admin-muted));
  font-size: .72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accent-teal { --dashboard-accent: #0f766e; }
.accent-blue { --dashboard-accent: #2677a8; }
.accent-violet { --dashboard-accent: #8358b6; }
.accent-amber { --dashboard-accent: #c17b16; }
.accent-green { --dashboard-accent: #31854d; }
.accent-cyan { --dashboard-accent: #1683a8; }
.accent-rose { --dashboard-accent: #b94f69; }
.accent-slate { --dashboard-accent: #596a78; }

.dashboard-status-panel,
.dashboard-data-panel {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  min-width: 0;
  overflow: hidden;
}

.dashboard-status-panel {
  border-top: 3px solid var(--dashboard-status-accent, var(--admin-primary));
}

.status-database { --dashboard-status-accent: #5f6f7a; }
.status-usage { --dashboard-status-accent: #c17b16; }
.status-amazon { --dashboard-status-accent: #31854d; }
.status-logs { --dashboard-status-accent: #b94f69; }

.dashboard-status-panel header,
.dashboard-data-panel > header {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 9px 12px;
}

.dashboard-status-panel header a,
.dashboard-data-panel header a {
  color: var(--admin-primary);
  font-size: .73rem;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-data-panel header > div {
  align-items: baseline;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.dashboard-status-panel dl div {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 35px;
  padding: 7px 12px;
}

.dashboard-status-panel dl div:last-child {
  border-bottom: 0;
}

.dashboard-status-panel dt {
  color: var(--admin-muted);
  font-size: .74rem;
  font-weight: 600;
}

.dashboard-status-panel dd {
  color: var(--admin-text);
  font-size: .76rem;
  margin: 0;
  max-width: 66%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-danger-value {
  color: var(--admin-danger) !important;
}

.dashboard-activity-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr);
  min-width: 0;
}

.dashboard-data-panel .table-responsive {
  margin: 0;
}

.dashboard-table {
  font-size: .75rem;
  margin: 0;
  min-width: 580px;
}

.dashboard-table > :not(caption) > * > * {
  border-color: var(--admin-border);
  padding: 8px 10px;
}

.dashboard-table thead th {
  background: var(--admin-surface-soft);
  color: var(--admin-muted);
  font-size: .71rem;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.dashboard-table td {
  color: var(--admin-text);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-table td a {
  color: var(--admin-primary);
  font-weight: 600;
}

.dashboard-status-badge {
  background: #edf1f4;
  border-radius: 4px;
  color: #596a78;
  display: inline-flex;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 6px;
}

.dashboard-status-badge.is-success {
  background: #e7f5ec;
  color: #247342;
}

.dashboard-status-badge.is-failed {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.dashboard-status-badge.is-processing {
  background: #fff4dd;
  color: #95600f;
}

.dashboard-empty-cell {
  color: var(--admin-muted) !important;
  height: 72px;
  text-align: center;
}

.admin-workbench.has-business-error .dashboard-section-heading::after {
  color: var(--admin-danger);
  content: "业务数据更新失败，当前显示上次结果";
  font-size: .73rem;
}

@media (max-width: 1320px) {
  .dashboard-live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-live-metric:nth-child(3) {
    border-left: 0;
  }

  .dashboard-kpi-grid,
  .dashboard-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .dashboard-activity-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .dashboard-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-live-strip,
  .dashboard-kpi-grid,
  .dashboard-status-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-live-metric {
    border-left: 0;
  }

  .dashboard-admin-summary,
  .dashboard-live-metric {
    min-height: 118px;
  }

  .dashboard-environment-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-environment-os {
    flex-basis: auto;
    white-space: normal;
  }

  .dashboard-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-activity-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-profile-dropdown {
  position: relative;
}

.admin-profile-trigger {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--admin-text);
  display: inline-flex;
  gap: 9px;
  padding: 4px 8px 4px 5px;
}

.admin-profile-trigger:hover,
.admin-profile-trigger:focus-visible,
.admin-profile-trigger.show {
  background: var(--admin-primary-soft);
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.admin-profile-trigger::after {
  margin-left: 2px;
}

.admin-profile-avatar {
  align-items: center;
  background: var(--admin-primary);
  border: 2px solid var(--admin-surface);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 32px;
  font-size: .9rem;
  font-weight: 700;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.admin-profile-avatar-large {
  flex-basis: 40px;
  font-size: 1rem;
  height: 40px;
  width: 40px;
}

.admin-profile-trigger-copy,
.admin-profile-menu-header > div {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.admin-profile-trigger-copy {
  max-width: 140px;
}

.admin-profile-menu-header > div {
  max-width: 132px;
}

.admin-profile-trigger-copy strong,
.admin-profile-menu-header strong {
  font-size: .86rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-profile-trigger-copy small,
.admin-profile-menu-header small {
  color: var(--admin-muted);
  font-size: .72rem;
}

.admin-profile-menu {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(24, 33, 31, .14);
  min-width: 210px;
  padding: 8px;
}

.admin-profile-menu-header {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 7px 8px 10px;
}

.admin-profile-menu .dropdown-item {
  border-radius: 6px;
  color: var(--admin-text);
  font-size: .86rem;
  padding: 8px 10px;
}

.admin-profile-menu .dropdown-item:hover,
.admin-profile-menu .dropdown-item:focus {
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
}

.admin-profile-menu .admin-profile-logout {
  color: var(--admin-danger);
}

.admin-profile-menu .admin-profile-logout:hover,
.admin-profile-menu .admin-profile-logout:focus {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
}

.admin-content-inner {
  min-width: 0;
  padding: 26px 30px 38px;
}

.admin-page {
  box-sizing: border-box;
  max-width: none;
  min-width: 0;
  width: 100%;
}

.admin-wide-page,
.system-database-page,
.translation-management-page {
  max-width: none;
}

.admin-page-header {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.admin-page-header h1 {
  color: var(--admin-text);
  font-size: 1.58rem;
  font-weight: 700;
  line-height: 1.2;
}

.admin-page-header p,
.admin-muted,
.module-disabled p {
  color: var(--admin-muted);
}

.admin-panel,
.tool-form,
.settings-form,
.module-card,
.empty-state {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(24, 33, 31, 0.03);
}

.admin-panel {
  padding: 22px;
}

.admin-profile-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
}

.admin-profile-grid .admin-panel {
  margin-top: 0;
}

.admin-profile-security-summary {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

.admin-profile-security-summary div {
  align-items: baseline;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding-bottom: 9px;
}

.admin-profile-security-summary dt {
  color: var(--admin-muted);
  font-size: .85rem;
  font-weight: 600;
}

.admin-profile-security-summary dd {
  color: var(--admin-text);
  font-size: .86rem;
  margin: 0;
  text-align: right;
}

.profile-security-action + .profile-security-action {
  margin-top: 18px;
}

.mfa-setup-grid {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: 220px minmax(0, 1fr);
  margin-bottom: 22px;
}

.mfa-setup-qr {
  border: 1px solid var(--admin-border);
  padding: 8px;
}

.mfa-manual-key {
  display: grid;
  gap: 8px;
}

.mfa-manual-key code {
  overflow-wrap: anywhere;
}

.recovery-code-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.recovery-code-grid code {
  background: var(--admin-primary-soft);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  padding: 9px 12px;
}

.admin-panel + .admin-panel,
.admin-platform-group + .admin-platform-group {
  margin-top: 18px;
}

.admin-panel h2,
.admin-panel-title-row h2,
.admin-platform-header h2 {
  color: var(--admin-text);
  font-size: 1rem;
  font-weight: 700;
}

.admin-panel-title-row {
  border-bottom: 1px solid var(--admin-border);
  margin: -2px -2px 18px;
  padding-bottom: 14px;
}

.admin-platform-header {
  margin-bottom: 10px;
}

.admin-platform-header span {
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 4px 9px;
}

.module-list,
.admin-feature-list {
  gap: 12px;
}

.module-card {
  box-shadow: none;
  padding: 18px 20px;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.module-card:hover {
  border-color: var(--admin-border-strong);
  box-shadow: var(--admin-shadow);
}

.module-card h2,
.module-card h3 {
  color: var(--admin-text);
  font-size: 1rem;
}

.module-key {
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  display: inline-flex;
  font-family: inherit;
  font-size: 0.76rem;
  padding: 3px 8px;
}

.module-status {
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 10px;
}

.module-status.is-enabled {
  background: #e5f6ed;
  border-color: #b7e3c8;
  color: #137547;
}

.module-status.is-disabled {
  background: #fff0ed;
  border-color: #ffd0c7;
  color: var(--admin-danger);
}

.btn {
  border-radius: 7px;
  font-weight: 690;
}

.btn-primary {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--admin-primary-hover);
  border-color: var(--admin-primary-hover);
}

.btn-outline-primary {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--admin-primary);
  border-color: var(--admin-primary);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--admin-border-strong);
  color: #40514c;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: #eef3f1;
  border-color: #aebbb6;
  color: var(--admin-text);
}

.form-label {
  color: #33423e;
  font-size: 0.9rem;
  font-weight: 690;
}

.form-control,
.form-select,
.input-group-text {
  border-color: var(--admin-border-strong);
  border-radius: 7px;
  color: var(--admin-text);
  min-height: 38px;
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.input-group > .input-group-text:not(:last-child) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #5ab6aa;
  box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.13);
}

.form-row {
  gap: 7px;
  margin-bottom: 16px;
}

.inline-form-grid,
.admin-filter-form,
.system-database-filter-form,
.system-database-field-grid {
  gap: 14px;
}

.admin-tabs {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--admin-border);
  border-radius: 0;
  gap: 6px;
}

.admin-tab {
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--admin-muted);
  font-weight: 700;
  min-height: 42px;
  min-width: 110px;
  padding: 10px 16px;
}

.admin-tab:hover,
.admin-tab.is-active {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-primary);
}

.settings-form {
  border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: none;
  padding: 24px;
}

.order-table,
.admin-table {
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.order-table th,
.admin-table th,
.system-database-table th,
.translation-table-scroll .admin-table thead th {
  background: var(--admin-surface-soft);
  border-bottom: 1px solid var(--admin-border);
  color: #4b5b57;
  font-size: 0.82rem;
  font-weight: 600;
}

.order-table td,
.admin-table td,
.system-database-table td {
  border-color: #e7ecef;
}

.table-responsive,
.system-database-table-scroll,
.translation-table-scroll {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  background: var(--admin-surface);
}

.table-responsive > .table,
.system-database-table-scroll > .table,
.translation-table-scroll > .table {
  margin-bottom: 0;
}

.admin-pagination {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

.amazon-admin-header {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(24, 33, 31, 0.03);
  padding: 18px 20px;
}

.amazon-admin-tabs {
  border-bottom: 1px solid var(--admin-border);
  gap: 4px;
  margin: 16px 0 20px;
  padding-bottom: 0;
}

.amazon-admin-tabs a {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--admin-muted);
  font-size: 0.9rem;
  min-height: 40px;
}

.amazon-admin-tabs a:hover,
.amazon-admin-tabs a.is-active {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-primary);
}

.admin-metric-grid {
  gap: 12px;
}

.admin-metric-card {
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
}

.alert {
  border-radius: 8px;
}

.alert-success,
.alert-info {
  background: #e9f6f2;
  border-color: #bfe1d8;
  color: #165f55;
}

.alert-danger {
  background: #fff0ed;
  border-color: #ffd0c7;
  color: var(--admin-danger);
}

.admin-login-page {
  background: var(--admin-bg);
  min-height: 100vh;
  padding: 28px;
}

.admin-login-panel {
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(24, 33, 31, 0.14);
  grid-template-columns: minmax(280px, 340px) minmax(340px, 440px);
  max-width: 780px;
}

.admin-login-side {
  background: var(--admin-sidebar);
  min-height: 460px;
  padding: 30px 28px;
}

.admin-login-brand-block {
  align-items: center;
  color: #fff;
  display: inline-flex;
  font-weight: 700;
  gap: 10px;
}

.admin-login-kicker {
  color: #f2b84b;
  font-size: 0.76rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.admin-login-side h1 {
  color: #fff;
  font-size: 2rem;
  line-height: 1.15;
}

.admin-login-side-copy {
  color: #b9c7c1;
  line-height: 1.7;
  margin: 14px 0 0;
  max-width: 240px;
}

.admin-login-card {
  padding: 44px 40px;
}

.admin-login-heading {
  margin-bottom: 24px;
}

.admin-login-card h2 {
  color: var(--admin-text);
  font-size: 1.55rem;
  font-weight: 700;
}

.admin-login-submit {
  min-height: 40px;
  min-width: 110px;
}

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    height: auto;
    overflow: visible;
    position: static;
  }

  .admin-sidebar-header {
    margin-bottom: 12px;
  }

  .admin-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-menu-group {
    align-content: start;
  }

  .admin-topbar {
    position: static;
  }
}

@media (max-width: 720px) {
  .admin-login-page {
    padding: 16px;
  }

  .admin-login-panel {
    grid-template-columns: 1fr;
  }

  .admin-login-side {
    min-height: auto;
  }

  .admin-login-card {
    padding: 26px 22px;
  }

  .admin-topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
  }

  .admin-topbar-actions {
    justify-content: space-between;
  }

  .admin-content-inner {
    padding: 20px 16px 28px;
  }

  .admin-menu {
    grid-template-columns: 1fr;
  }

  .admin-menu-group {
    grid-template-columns: 1fr;
  }

  .admin-panel,
  .settings-form {
    padding: 18px;
  }

  .admin-profile-grid,
  .mfa-setup-grid {
    grid-template-columns: 1fr;
  }

  .mfa-setup-qr {
    justify-self: start;
  }

  .recovery-code-grid {
    grid-template-columns: 1fr;
  }

  .amazon-admin-header {
    padding: 16px;
  }
}

.original-image-tool {
  max-width: 1240px;
}

.original-image-form,
.original-template-panel,
.original-image-list-panel {
  margin-top: 18px;
}

.original-upload-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.original-upload-control {
  grid-template-columns: minmax(220px, 1fr) auto;
  min-height: 114px;
}

.original-actions {
  border-top: 1px solid #edf1f6;
  margin-top: 8px;
  padding-top: 20px;
}

.original-panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.original-table-wrap,
.original-exif-table-wrap {
  overflow-x: auto;
}

.original-image-table {
  min-width: 760px;
}

.original-image-table .original-file-cell {
  max-width: 420px;
  word-break: break-all;
}

.original-select-cell {
  width: 48px;
  white-space: nowrap;
}

.original-status-line {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #475569;
  line-height: 1.6;
  padding: 12px 14px;
}

.original-status-badge {
  background: #eef5ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #2457a6;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 4px 10px;
}

.original-exif-modal .modal-header {
  align-items: flex-start;
}

.original-editor-help {
  color: #64748b;
  margin: 6px 0 0;
}

.original-editor-toolbar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.original-exif-table {
  min-width: 1180px;
}

.original-exif-table th,
.original-exif-table td {
  vertical-align: middle;
}

.original-exif-table .exif-description-cell,
.original-exif-table .exif-type-cell,
.original-exif-table .exif-error-cell {
  min-width: 150px;
}

.original-exif-table .exif-error-cell {
  color: #b42318;
}

.upload-file-browser {
  min-width: 0;
}

.upload-file-location-bar {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.upload-file-location-copy {
  min-width: 0;
}

.upload-file-location-label {
  color: var(--admin-muted);
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 6px;
}

.upload-breadcrumbs {
  min-width: 0;
}

.upload-breadcrumbs ol {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.upload-breadcrumb-item a,
.upload-breadcrumb-item > span {
  align-items: center;
  color: var(--admin-text);
  display: inline-flex;
  font-size: 15px;
  font-weight: 650;
  gap: 7px;
  line-height: 1.35;
  max-width: min(420px, 70vw);
  min-height: 26px;
  text-decoration: none;
}

.upload-breadcrumb-item a {
  color: var(--admin-primary);
}

.upload-breadcrumb-item a:hover,
.upload-breadcrumb-item a:focus-visible {
  text-decoration: underline;
}

.upload-breadcrumb-item a span,
.upload-breadcrumb-item > span span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-breadcrumb-item svg {
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.upload-breadcrumb-separator {
  color: var(--admin-subtle);
  display: inline-flex;
}

.upload-breadcrumb-separator svg {
  height: 14px;
  width: 14px;
}

.upload-file-entry-count {
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 7px 9px;
}

.upload-file-commandbar {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.upload-file-search-form {
  align-items: center;
  display: flex;
  flex: 1 1 620px;
  gap: 8px;
  margin: 0;
  max-width: 760px;
  min-width: 0;
}

.upload-file-search-field {
  flex: 1 1 auto;
  min-width: 180px;
  position: relative;
}

.upload-file-search-field > svg {
  color: var(--admin-subtle);
  height: 16px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  z-index: 2;
}

.upload-file-search-field .form-control {
  padding-left: 38px;
}

.upload-file-search-actions,
.upload-file-command-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.upload-file-search-actions {
  min-height: 0;
}

.upload-file-command-actions .btn,
.upload-file-search-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  white-space: nowrap;
}

.upload-files-table-wrap {
  max-width: 100%;
}

.upload-files-table {
  min-width: 800px;
}

.upload-file-name-cell {
  min-width: 300px;
}

.upload-file-entry {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.upload-file-entry-icon {
  align-items: center;
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  color: var(--admin-muted);
  display: inline-flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.upload-file-entry-icon.is-directory {
  background: var(--admin-primary-soft);
  border-color: color-mix(in srgb, var(--admin-primary) 24%, var(--admin-border));
  color: var(--admin-primary);
}

.upload-file-entry-icon svg {
  height: 17px;
  width: 17px;
}

.upload-file-entry-copy {
  display: block;
  min-width: 0;
}

.upload-file-entry-name {
  color: var(--admin-text);
  display: block;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-decoration: none;
}

a.upload-file-entry-name {
  color: var(--admin-primary);
}

a.upload-file-entry-name:hover,
a.upload-file-entry-name:focus-visible {
  text-decoration: underline;
}

.upload-file-entry-copy small {
  color: var(--admin-muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.upload-file-type-column {
  min-width: 86px;
}

.upload-file-size-column {
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  white-space: nowrap;
}

.upload-file-time-column {
  font-variant-numeric: tabular-nums;
  min-width: 168px;
  white-space: nowrap;
}

.upload-file-actions-header,
.upload-file-actions-cell {
  min-width: 200px;
}

.upload-file-actions-cell .admin-action-group {
  gap: 6px;
}

.upload-file-empty-cell {
  padding: 44px 18px !important;
}

.upload-file-empty-state {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  text-align: center;
}

.upload-file-empty-state svg {
  color: var(--admin-subtle);
  height: 28px;
  width: 28px;
}

.upload-file-empty-state strong {
  color: var(--admin-muted);
  font-size: 14px;
  font-weight: 600;
}

.admin-form-modal.upload-file-upload-modal .modal-dialog {
  width: min(680px, calc(100vw - 24px));
}

.upload-file-upload-target {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  font-size: 13px;
  gap: 7px;
  margin-bottom: 12px;
  min-width: 0;
}

.upload-file-upload-target svg {
  color: var(--admin-primary);
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

.upload-file-upload-target strong {
  color: var(--admin-text);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.upload-file-picker {
  border: 1px dashed var(--admin-border-strong);
  border-radius: 7px;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.upload-file-picker:hover,
.upload-file-picker:focus-within,
.upload-file-picker.is-dragging {
  background: var(--admin-primary-soft);
  border-color: var(--admin-primary);
}

.upload-file-picker:focus-within {
  box-shadow: 0 0 0 3px var(--admin-focus-ring);
}

.upload-file-picker-label {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  margin: 0;
  min-height: 86px;
  padding: 14px;
}

.upload-file-picker-icon {
  align-items: center;
  background: var(--admin-primary-soft);
  border: 1px solid color-mix(in srgb, var(--admin-primary) 24%, var(--admin-border));
  border-radius: 7px;
  color: var(--admin-primary);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.upload-file-picker-icon svg {
  height: 20px;
  width: 20px;
}

.upload-file-picker-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.upload-file-picker-copy strong {
  color: var(--admin-text);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
}

.upload-file-picker-copy small {
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.35;
}

.upload-file-picker-action {
  pointer-events: none;
}

.upload-file-selection {
  border-top: 1px solid var(--admin-border);
  margin-top: 16px;
  padding-top: 14px;
}

.upload-file-selection-header {
  align-items: center;
  color: var(--admin-muted);
  display: grid;
  font-size: 13px;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 8px;
}

.upload-file-selection-header strong {
  color: var(--admin-text);
  font-weight: 650;
}

.upload-file-selection-clear {
  align-items: center;
  color: var(--admin-muted);
  display: inline-flex;
  font-size: 13px;
  gap: 5px;
  justify-self: end;
  min-height: 30px;
  padding: 3px 5px;
  text-decoration: none;
}

.upload-file-selection-clear:hover,
.upload-file-selection-clear:focus-visible {
  color: var(--admin-danger);
}

.upload-file-selection-list {
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  list-style: none;
  margin: 0;
  max-height: 220px;
  overflow: auto;
  padding: 0;
}

.upload-file-selection-item {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 48px;
  padding: 7px 9px 7px 12px;
}

.upload-file-selection-item + .upload-file-selection-item {
  border-top: 1px solid var(--admin-border);
}

.upload-file-selection-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.upload-file-selection-copy strong {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-selection-copy small {
  color: var(--admin-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.upload-file-selection-remove {
  flex: 0 0 var(--admin-control-height-sm);
}

.upload-file-modal-submit {
  min-width: 112px;
}

.upload-file-modal-form.is-submitting .upload-file-picker,
.upload-file-modal-form.is-submitting .upload-file-selection {
  opacity: .58;
  pointer-events: none;
}

.upload-entry-modal-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.upload-entry-modal-heading > div {
  min-width: 0;
}

.upload-entry-modal-heading .form-text {
  max-width: min(330px, 64vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-entry-modal-icon {
  align-items: center;
  background: var(--admin-primary-soft);
  border: 1px solid color-mix(in srgb, var(--admin-primary) 24%, var(--admin-border));
  border-radius: 7px;
  color: var(--admin-primary);
  display: inline-flex;
  flex: 0 0 38px;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.upload-entry-modal-icon svg {
  height: 18px;
  width: 18px;
}

.upload-entry-location,
.upload-entry-move-destination {
  align-items: center;
  background: #f7f9fb;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  display: grid;
  gap: 4px 12px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 46px;
  padding: 9px 12px;
}

.upload-entry-location span,
.upload-entry-move-destination span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 600;
}

.upload-entry-location strong,
.upload-entry-move-destination strong {
  color: var(--admin-text);
  font-size: 13px;
  font-weight: 650;
  min-width: 0;
  text-align: right;
}

.upload-entry-location strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-entry-move-destination strong {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
}

.upload-entry-move-modal .modal-dialog {
  max-width: 620px;
}

.upload-entry-move-body {
  display: grid;
  gap: 10px;
}

.upload-entry-move-body > .form-label {
  margin: 0;
}

.upload-directory-tree,
.upload-directory-tree-children {
  list-style: none;
  margin: 0;
  padding: 0;
}

.upload-directory-tree {
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  max-height: min(48vh, 420px);
  min-height: 190px;
  overflow: auto;
  padding: 7px;
}

.upload-directory-tree-children {
  padding-left: 22px;
}

.upload-directory-tree-row {
  align-items: center;
  display: grid;
  gap: 2px;
  grid-template-columns: 30px minmax(0, 1fr);
  min-height: 38px;
}

.upload-directory-tree-toggle,
.upload-directory-tree-toggle-spacer {
  align-items: center;
  align-self: stretch;
  display: inline-flex;
  justify-content: center;
  width: 30px;
}

.upload-directory-tree-toggle {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--admin-muted);
  padding: 0;
}

.upload-directory-tree-toggle:hover,
.upload-directory-tree-toggle:focus-visible {
  background: #eef2f6;
  color: var(--admin-text);
  outline: 0;
}

.upload-directory-tree-toggle svg {
  height: 15px;
  transition: transform 140ms ease;
  width: 15px;
}

.upload-directory-tree-node[aria-expanded="true"] > .upload-directory-tree-row .upload-directory-tree-toggle svg {
  transform: rotate(90deg);
}

.upload-directory-tree-option {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--admin-text);
  display: flex;
  gap: 9px;
  min-height: 34px;
  min-width: 0;
  padding: 5px 9px;
  text-align: left;
  width: 100%;
}

.upload-directory-tree-option svg {
  color: #c58a17;
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.upload-directory-tree-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-directory-tree-option:hover,
.upload-directory-tree-option:focus-visible {
  background: #f3f6f9;
  border-color: var(--admin-border);
  outline: 0;
}

.upload-directory-tree-node[aria-selected="true"] > .upload-directory-tree-row .upload-directory-tree-option {
  background: var(--admin-primary-soft);
  border-color: color-mix(in srgb, var(--admin-primary) 34%, var(--admin-border));
  color: var(--admin-primary);
}

.upload-directory-tree-option.is-unavailable {
  background: transparent;
  border-color: transparent;
  color: var(--admin-subtle);
  cursor: not-allowed;
  opacity: .56;
}

.upload-entry-move-destination {
  margin-top: 2px;
}

.upload-file-preview-modal .modal-body {
  padding: 0;
}

.upload-file-preview-modal .modal-header {
  gap: 12px;
}

.upload-file-preview-header-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.upload-file-preview-modal.is-preview-fullscreen .modal-dialog {
  height: 100vh;
  margin: 0;
  max-width: none;
  width: 100vw;
}

.upload-file-preview-modal.is-preview-fullscreen .modal-content {
  border: 0;
  border-radius: 0;
  height: 100vh;
}

.upload-file-preview-modal.is-preview-fullscreen .modal-body {
  flex: 1 1 auto;
  min-height: 0;
}

.upload-file-preview-image-wrap {
  align-items: center;
  background: #f7f9fb;
  display: flex;
  height: min(72vh, 760px);
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.upload-file-preview-image {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.upload-file-preview-frame {
  border: 0;
  display: block;
  height: min(72vh, 760px);
  width: 100%;
}

.upload-file-preview-modal.is-preview-fullscreen .upload-file-preview-frame,
.upload-file-preview-modal.is-preview-fullscreen .upload-file-preview-image-wrap {
  height: calc(100vh - 58px);
  max-height: none;
}

.cost-profit-tool {
  max-width: 1180px;
}

.cost-profit-heading h1 {
  font-size: 1.9rem;
}

.cost-profit-form {
  display: grid;
  gap: 18px;
}

.cost-profit-tabs {
  border-bottom: 1px solid #e4e9ef;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.cost-profit-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: #526173;
  font-weight: 720;
  min-height: 42px;
  padding: 10px 16px;
  white-space: nowrap;
}

.cost-profit-tab.is-active {
  border-bottom-color: var(--admin-primary, #0f766e);
  color: var(--admin-primary, #0f766e);
}

.cost-profit-ratebar {
  align-items: end;
  background: #f8faf9;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  padding: 14px;
}

.cost-profit-market-field {
  display: grid;
  gap: 6px;
}

.cost-profit-market-field .form-label {
  margin: 0;
}

.cost-profit-rate-copy {
  align-items: center;
  color: #526173;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  line-height: 1.5;
  min-height: 38px;
}

.cost-profit-rate-copy strong {
  color: #2457a6;
}

.cost-profit-rate-divider {
  background: #cbd5df;
  display: inline-flex;
  height: 16px;
  margin: 0 6px;
  width: 1px;
}

.cost-profit-rate-time {
  color: #7a8696;
  margin-left: 4px;
}

.cost-profit-grid {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
}

.cost-profit-inputs,
.cost-profit-result,
.cost-profit-section {
  min-width: 0;
}

.cost-profit-inputs {
  display: grid;
  gap: 18px;
}

.cost-profit-section,
.cost-profit-result {
  border: 1px solid #dde3ea;
  border-radius: 8px;
  padding: 18px;
}

.cost-profit-section-header {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
}

.cost-profit-section-header h2 {
  color: #111827;
  font-size: 1rem;
  font-weight: 760;
  margin: 0;
}

.cost-profit-section-header span {
  color: #7a8696;
  font-size: 0.86rem;
}

.cost-profit-field-grid,
.cost-profit-cost-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cost-profit-cost-grid {
  margin-top: 16px;
}

.cost-profit-number {
  min-width: 0;
}

.cost-profit-percent-unit {
  justify-content: center;
  min-width: 74px;
}

.cost-profit-conversion {
  color: #667085;
  display: block;
  font-size: 0.82rem;
  min-height: 18px;
}

.cost-profit-label-with-hint {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.cost-profit-label-with-hint > span {
  align-items: center;
  display: inline-flex;
}

.cost-profit-label-with-hint > span::before {
  color: #2563eb;
  content: "↗";
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1;
  margin-right: 4px;
}

.cost-profit-label-with-hint > small {
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
}

.cost-profit-radio-row {
  align-items: center;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 10px 0;
}

.cost-profit-radio-row label {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  margin: 0;
}

.cost-profit-radio-row small {
  color: #7a8696;
}

.cost-profit-result {
  background: #fff;
  position: sticky;
  top: 84px;
}

.cost-profit-total {
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 16px;
}

.cost-profit-total > span {
  color: #344054;
  font-weight: 700;
}

.cost-profit-total strong {
  color: #2457a6;
  display: flex;
  flex-wrap: wrap;
  font-size: 1.2rem;
  gap: 6px;
  line-height: 1.25;
}

.cost-profit-rate-result {
  align-items: center;
  border-bottom: 1px solid #edf1f6;
  color: #526173;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.cost-profit-rate-result strong {
  color: #111827;
}

.cost-profit-detail-group {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.cost-profit-detail-group h3 {
  color: #111827;
  font-size: 0.95rem;
  font-weight: 760;
  margin: 0;
}

.cost-profit-line,
.cost-profit-line-emphasis {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 1fr) minmax(104px, auto) minmax(96px, auto);
  min-height: 30px;
}

.cost-profit-line {
  color: #526173;
  font-size: 0.88rem;
}

.cost-profit-line-emphasis {
  color: #18211f;
  font-weight: 700;
}

.cost-profit-line span,
.cost-profit-line-emphasis span,
.cost-profit-line strong,
.cost-profit-line-emphasis strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cost-profit-candidates {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.cost-profit-candidate {
  background: #fff;
  border: 1px solid #dbe3ea;
  border-radius: 7px;
  color: #334155;
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  text-align: left;
}

.cost-profit-candidate.is-active {
  background: #eef9f6;
  border-color: #78c7ba;
}

.cost-profit-candidate strong {
  color: #2457a6;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.cost-profit-candidate-title {
  color: #18211f;
  font-weight: 700;
}

.cost-profit-candidate-note {
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.cost-profit-sale-summary {
  border-top: 1px solid var(--ui-line, #dbe3ea);
  margin-top: 18px;
}

.cost-profit-sale-summary-row,
.cost-profit-sale-summary-rate {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(110px, 1fr) minmax(104px, auto) minmax(96px, auto);
}

.cost-profit-sale-summary-row {
  min-height: 58px;
  padding: 12px 0;
}

.cost-profit-sale-summary-row + .cost-profit-sale-summary-row {
  border-top: 1px solid var(--ui-line, #edf1f6);
}

.cost-profit-sale-summary-label {
  color: var(--ui-ink, #18211f);
}

.cost-profit-sale-summary-value {
  color: var(--ui-muted, #526173);
  min-width: 0;
  overflow-wrap: anywhere;
}

.cost-profit-sale-summary-value strong {
  color: var(--ui-ink, #18211f);
  font-size: 1.02rem;
}

.cost-profit-sale-summary-row.is-profit .cost-profit-sale-summary-value strong,
.cost-profit-sale-summary-rate strong {
  color: var(--ui-blue, #2457a6);
}

.cost-profit-sale-summary-rate {
  color: var(--ui-muted, #526173);
  font-size: 0.86rem;
  padding: 0 0 14px;
}

.cost-profit-empty-result {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  padding: 10px 12px;
}

@media (max-width: 900px) {
  .cost-profit-ratebar,
  .cost-profit-grid,
  .cost-profit-field-grid,
  .cost-profit-cost-grid {
    grid-template-columns: 1fr;
  }

  .cost-profit-result {
    position: static;
  }

  .original-upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .cost-profit-form {
    padding: 18px;
  }

  .cost-profit-section,
  .cost-profit-result {
    padding: 16px;
  }

  .cost-profit-rate-copy {
    align-items: flex-start;
    flex-direction: column;
  }

  .cost-profit-rate-divider {
    display: none;
  }

  .cost-profit-line,
  .cost-profit-line-emphasis {
    grid-template-columns: 1fr;
  }

  .cost-profit-sale-summary-row {
    gap: 6px;
    grid-template-columns: 1fr;
  }

  .cost-profit-sale-summary-rate {
    grid-template-columns: 1fr auto;
  }

  .cost-profit-sale-summary-spacer {
    display: none;
  }

  .original-panel-actions {
    justify-content: stretch;
    width: 100%;
  }

  .original-panel-actions .btn,
  .original-actions .btn {
    flex: 1 1 0;
    min-width: 0;
  }

  .upload-file-location-bar {
    align-items: flex-start;
  }

  .upload-file-commandbar {
    align-items: stretch;
    flex-direction: column;
  }

  .upload-file-search-form {
    flex-basis: auto;
    max-width: none;
    width: 100%;
  }

  .upload-file-command-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .upload-file-command-actions .btn {
    min-width: 0;
    white-space: normal;
  }

  .upload-file-actions-header,
  .upload-file-actions-cell {
    min-width: 200px;
  }

  .upload-file-preview-frame {
    height: 70vh;
  }

  .upload-file-preview-image-wrap {
    height: 70vh;
  }
}

@media (max-width: 520px) {
  .upload-file-location-bar {
    gap: 10px;
  }

  .upload-file-entry-count {
    padding: 6px 7px;
  }

  .upload-file-search-form {
    flex-wrap: wrap;
  }

  .upload-file-search-field {
    flex-basis: 100%;
  }

  .upload-file-search-actions {
    width: 100%;
  }

  .upload-file-search-actions .btn {
    flex: 1 1 0;
  }

  .upload-file-picker-label {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .upload-file-picker-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .upload-file-selection-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .upload-file-selection-clear {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .upload-entry-modal-heading .form-text {
    max-width: 54vw;
  }

  .upload-directory-tree {
    max-height: 42vh;
    min-height: 170px;
  }

  .upload-directory-tree-children {
    padding-left: 16px;
  }

  .upload-entry-location,
  .upload-entry-move-destination {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .upload-entry-location strong,
  .upload-entry-move-destination strong {
    text-align: left;
  }
}

/* Shared structure. Theme tokens are registered in css/themes/*.css. */

html {
  scroll-padding-top: 92px;
}

body {
  background: var(--ui-paper);
  color: var(--ui-ink);
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif;
}

.app-shell {
  background: var(--site-page-background, var(--ui-paper));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  background: var(--site-header-background, transparent);
  padding: 8px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-navbar {
  min-height: 64px;
  padding: 0;
}

.site-nav-inner {
  background: var(--site-nav-surface, var(--ui-cream));
  border: 1px solid var(--site-nav-border, var(--ui-line));
  border-radius: 8px;
  box-shadow: var(--site-nav-shadow, var(--ui-shadow-soft));
  gap: 16px;
  min-height: 64px;
  padding-left: 20px;
  padding-right: 14px;
  width: 100%;
}

.site-brand {
  align-items: center;
  color: var(--ui-ink);
  display: inline-flex;
  gap: 10px;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.site-brand:hover,
.site-brand:focus {
  color: var(--ui-ink);
}

.site-brand-mark {
  align-items: center;
  background: var(--site-brand-mark-background, var(--ui-forest));
  border: 1px solid var(--site-brand-mark-border, transparent);
  border-radius: 8px;
  box-shadow: var(--site-brand-mark-shadow, none);
  color: var(--site-brand-mark-color, #fff);
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.site-brand-mark svg {
  height: 21px;
  stroke-width: 1.9;
  width: 21px;
}

.site-brand-title {
  color: var(--ui-ink);
  font-size: 1.05rem;
  font-weight: 760;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-brand-mark {
  align-items: center;
  background: var(--ui-gold);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(191, 138, 75, 0.25);
  color: var(--ui-forest-deep);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 850;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.admin-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-brand-title {
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.admin-brand-subtitle {
  color: var(--ui-gold);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav-collapse {
  align-items: center;
  gap: 16px;
}

.site-main-nav,
.site-user-nav {
  align-items: center;
  gap: 4px;
}

.site-main-nav {
  --site-nav-indicator-opacity: 0;
  --site-nav-indicator-width: 0px;
  --site-nav-indicator-x: 0px;
  position: relative;
}

.site-nav-link {
  align-items: center;
  border-radius: 6px;
  color: var(--site-nav-text, var(--ui-muted));
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 650;
  gap: 7px;
  justify-content: center;
  min-height: 48px;
  padding: 0 11px;
  position: relative;
  transition: background-color 0.16s ease, color 0.16s ease;
  white-space: nowrap;
}

.site-nav-link:hover,
.site-nav-link:focus {
  background: var(--site-nav-hover-background, var(--ui-forest-soft));
  color: var(--site-nav-hover-text, var(--ui-teal));
}

.site-nav-link.is-active {
  color: var(--site-nav-active, var(--ui-teal));
}

.site-module-menu {
  position: relative;
}

.site-module-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  display: inline-flex;
  gap: 7px;
  text-align: left;
}

.site-module-toggle.dropdown-toggle::after {
  margin-left: 1px;
  transition: transform 0.16s ease;
}

.site-module-toggle.show,
.site-module-toggle:active {
  background: var(--site-nav-hover-background, var(--ui-forest-soft));
  color: var(--site-nav-active, var(--ui-teal));
}

.site-module-toggle.show::after {
  transform: rotate(180deg);
}

.site-module-submenu,
.site-account-submenu {
  background: var(--site-nav-menu-surface, var(--ui-cream));
  border: 1px solid var(--site-nav-border, var(--ui-line));
  border-radius: 8px;
  box-shadow: var(--site-nav-menu-shadow, var(--ui-shadow-soft));
  margin: 0;
  padding: 7px;
}

.site-module-submenu {
  max-width: min(360px, calc(100vw - 24px));
  min-width: 240px;
}

.site-module-submenu[data-bs-popper],
.site-account-submenu[data-bs-popper] {
  margin-top: 0;
}

.site-module-link {
  align-items: center;
  border-radius: 6px;
  color: var(--ui-ink);
  display: flex;
  font-size: 0.9rem;
  font-weight: 680;
  gap: 9px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 10px 11px;
  white-space: normal;
}

.site-module-link svg {
  color: var(--site-nav-active, var(--ui-teal));
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.site-module-link:hover,
.site-module-link:focus,
.site-module-link:active,
.site-module-link.is-active {
  background: var(--ui-forest-soft);
  color: var(--site-nav-active, var(--ui-teal));
}

.site-module-toggle:focus-visible,
.site-module-link:focus-visible,
.site-account-action:focus-visible {
  box-shadow: 0 0 0 3px var(--site-focus-ring, rgba(37, 99, 166, 0.24));
  outline: 2px solid var(--site-nav-active, var(--ui-teal));
  outline-offset: 1px;
}

.site-login-link {
  background: var(--site-action-background, var(--ui-forest));
  color: var(--site-action-text, #fff);
  min-height: 40px;
  padding-left: 17px;
  padding-right: 17px;
}

.site-login-link:hover,
.site-login-link:focus {
  background: var(--site-action-hover, var(--ui-teal));
  color: var(--site-action-text, #fff);
}

.site-account-menu {
  position: relative;
}

.site-user-trigger {
  align-items: center;
  background: var(--site-user-chip-background, var(--ui-cream));
  border: 1px solid var(--site-user-chip-border, var(--ui-line));
  border-radius: 999px;
  color: var(--site-user-chip-text, var(--ui-forest));
  display: inline-flex;
  font-size: 0.88rem;
  font-weight: 700;
  gap: 7px;
  justify-content: flex-start;
  min-height: 40px;
  max-width: 180px;
  padding: 0 10px 0 7px;
  white-space: nowrap;
}

.site-user-trigger:hover,
.site-user-trigger:focus,
.site-user-trigger.show {
  background: var(--site-nav-hover-background, var(--ui-forest-soft));
  border-color: var(--site-nav-border, var(--ui-line-strong));
  color: var(--site-nav-active, var(--ui-teal));
}

.site-user-trigger:focus,
.site-user-trigger:focus-visible,
.site-user-trigger:active,
.site-user-trigger.show {
  box-shadow: none;
  outline: 0;
}

.site-user-trigger.dropdown-toggle::after {
  display: none;
}

.site-account-avatar,
.site-account-summary-avatar {
  align-items: center;
  background: var(--site-brand-mark-background, var(--ui-forest));
  border-radius: 50%;
  color: var(--site-brand-mark-color, #fff);
  display: inline-flex;
  flex: 0 0 auto;
  height: 27px;
  justify-content: center;
  width: 27px;
}

.site-account-avatar svg,
.site-account-summary-avatar svg {
  height: 15px;
  width: 15px;
}

.site-user-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-user-trigger-chevron {
  flex: 0 0 14px;
  height: 14px;
  transition: transform 0.2s ease;
  width: 14px;
}

.site-user-trigger.show .site-user-trigger-chevron {
  transform: rotate(180deg);
}

.site-account-submenu {
  min-width: 220px;
}

.site-account-summary {
  align-items: center;
  display: flex;
  gap: 10px;
  padding: 9px 10px 11px;
}

.site-account-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.site-account-summary-copy strong,
.site-account-summary-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-account-summary-copy strong {
  color: var(--ui-ink);
  font-size: 0.9rem;
}

.site-account-summary-copy span {
  color: var(--ui-muted);
  font-size: 0.76rem;
}

.site-account-submenu .dropdown-divider {
  border-color: var(--site-nav-border, var(--ui-line));
  margin: 0 4px 6px;
}

.site-account-action {
  align-items: center;
  border-radius: 6px;
  color: var(--ui-ink);
  display: flex;
  font-size: 0.88rem;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
}

.site-account-action:hover,
.site-account-action:focus {
  background: var(--site-nav-hover-background, var(--ui-forest-soft));
  color: var(--site-nav-active, var(--ui-teal));
}

.site-account-logout,
.site-account-logout:hover,
.site-account-logout:focus {
  color: var(--ui-danger);
}

.site-login-link svg,
.site-account-action svg {
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

.site-menu-button {
  align-items: center;
  background: var(--site-nav-hover-background, var(--ui-forest-soft));
  border: 1px solid var(--site-nav-border, var(--ui-line-strong));
  border-radius: 8px;
  color: var(--site-nav-active, var(--ui-teal));
  display: inline-flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 40px;
}

.site-menu-button svg {
  height: 20px;
  width: 20px;
}

.site-content,
.site-content-fluid {
  flex: 1 0 auto;
  padding-top: 26px;
}

.site-content-fluid {
  padding-left: 24px;
  padding-right: 24px;
}

.site-main {
  min-width: 0;
}

.site-footer {
  background: var(--site-footer-background, var(--ui-forest-deep));
  border-top: 1px solid var(--site-footer-border, transparent);
  color: var(--site-footer-text, #cbd5e1);
  flex: 0 0 auto;
  line-height: 1.5;
  margin-top: 52px;
  padding: 19px 20px;
}

.site-footer-inner {
  align-items: center;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  min-height: 20px;
  width: min(1200px, 100%);
}

.site-footer-text {
  color: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
  text-align: center;
  white-space: normal;
}

@media (min-width: 1200px) {
  .site-main-nav::after {
    background: var(--site-nav-indicator, var(--ui-teal));
    border-radius: 999px;
    bottom: 1px;
    content: "";
    height: 2px;
    left: 0;
    opacity: var(--site-nav-indicator-opacity);
    pointer-events: none;
    position: absolute;
    transform: translate3d(var(--site-nav-indicator-x), 0, 0);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      width 0.24s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.14s ease;
    width: var(--site-nav-indicator-width);
    z-index: 2;
  }

  .site-navbar > .site-nav-inner {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  }

  .site-brand {
    grid-column: 1;
    justify-self: start;
  }

  .site-navbar .site-nav-collapse {
    display: contents !important;
  }

  .site-main-nav {
    grid-column: 2;
    justify-self: center;
  }

  .site-user-nav {
    grid-column: 3;
    justify-self: end;
    margin-left: 0 !important;
  }

  .site-hover-dropdown > .site-account-submenu {
    left: auto;
    right: 0;
  }

  .site-main-nav > .nav-item > .site-nav-link:hover,
  .site-main-nav > .nav-item > .site-nav-link:focus,
  .site-main-nav > .nav-item > .site-nav-link:focus-visible,
  .site-main-nav > .nav-item > .site-module-toggle.show,
  .site-main-nav > .nav-item > .site-module-toggle:active {
    background: transparent;
    box-shadow: none;
    color: var(--site-nav-hover-text, var(--site-nav-active, var(--ui-teal)));
    outline: 0;
  }

  .site-hover-dropdown > .dropdown-menu {
    clip-path: inset(0 0 100% 0 round 8px);
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: clip-path 0.22s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.16s ease,
      visibility 0s linear 0.22s;
    visibility: hidden;
    will-change: clip-path, opacity;
  }

  .site-hover-dropdown > .dropdown-menu.show {
    clip-path: inset(0 round 8px);
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
    visibility: visible;
  }
}

@media (max-width: 1199.98px) {
  .site-nav-inner {
    flex-wrap: wrap;
    padding: 11px 13px;
  }

  .site-nav-collapse {
    background: var(--site-nav-menu-surface, var(--ui-cream));
    border: 1px solid var(--site-nav-border, var(--ui-line));
    border-radius: 8px;
    box-shadow: var(--site-nav-menu-shadow, var(--ui-shadow-soft));
    flex-basis: 100%;
    margin: 10px 0 1px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 10px;
  }

  .site-main-nav,
  .site-user-nav {
    align-items: stretch;
    gap: 3px;
  }

  .site-nav-link {
    justify-content: flex-start;
    min-height: 42px;
    padding: 9px 11px;
    width: 100%;
  }

  .site-nav-link.is-active {
    background: var(--site-nav-active-background, var(--ui-forest-soft));
  }

  .site-user-nav {
    border-top: 1px solid var(--site-nav-border, var(--ui-line));
    margin-top: 8px;
    padding-top: 8px;
  }

  .site-user-trigger,
  .site-login-link {
    justify-content: center;
    max-width: none;
    width: 100%;
  }

  .site-module-menu,
  .site-module-toggle,
  .site-module-submenu,
  .site-account-menu,
  .site-user-trigger,
  .site-account-submenu {
    width: 100%;
  }

  .site-module-toggle {
    justify-content: space-between;
  }

  .site-user-trigger {
    border-radius: 6px;
  }

  .site-user-trigger-chevron {
    margin-left: auto;
  }

  .site-module-submenu,
  .site-module-submenu[data-bs-popper],
  .site-account-submenu,
  .site-account-submenu[data-bs-popper] {
    box-shadow: none;
    margin: 4px 0 8px;
    max-width: none;
    min-width: 0;
    position: static;
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-main-nav::after,
  .site-hover-dropdown > .dropdown-menu,
  .site-module-toggle.dropdown-toggle::after,
  .site-user-trigger-chevron {
    transition: none !important;
  }
}

.ui-eyebrow {
  color: var(--ui-gold);
  font-size: 0.78rem;
  font-weight: 850;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.ui-btn-primary,
.ui-btn-secondary {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 800;
  min-height: 44px;
  padding: 11px 18px;
}

.ui-btn-primary {
  background: var(--ui-forest);
  border-color: var(--ui-forest);
  color: #fff;
}

.ui-btn-primary:hover,
.ui-btn-primary:focus {
  background: var(--ui-teal);
  border-color: var(--ui-teal);
  color: #fff;
}

.ui-btn-secondary {
  background: rgba(255, 250, 242, 0.7);
  border-color: var(--ui-line-strong);
  color: var(--ui-forest);
}

.ui-btn-secondary:hover,
.ui-btn-secondary:focus {
  background: var(--ui-cream);
  border-color: var(--ui-gold);
  color: var(--ui-forest);
}

.home-showcase {
  margin: -26px -24px 0;
}

.home-wrap {
  margin: 0 auto;
  width: min(1180px, calc(100% - 40px));
}

.home-hero-band {
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.96) 0%, rgba(238, 225, 205, 0.92) 58%, rgba(218, 186, 136, 0.58) 100%),
    var(--ui-paper);
  border-bottom: 1px solid rgba(36, 58, 50, 0.1);
  overflow: hidden;
  padding: 86px 0 68px;
  position: relative;
}

.home-hero-band::after {
  background:
    linear-gradient(135deg, rgba(36, 58, 50, 0.08) 0 1px, transparent 1px 18px);
  content: "";
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  position: absolute;
}

.home-hero-grid {
  align-items: center;
  display: grid;
  gap: 58px;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  position: relative;
  z-index: 1;
}

.home-hero-copy h1 {
  color: var(--ui-ink);
  font-size: 4.4rem;
  font-weight: 860;
  line-height: 1.04;
  margin: 0 0 24px;
  max-width: 760px;
}

.home-lead {
  color: #52615b;
  font-size: 1.08rem;
  line-height: 1.85;
  margin: 0 0 30px;
  max-width: 650px;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-hero-notes {
  color: #53615b;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-top: 30px;
}

.home-hero-notes span {
  align-items: center;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 700;
}

.home-hero-notes span::before {
  background: var(--ui-gold);
  border-radius: 999px;
  content: "";
  height: 7px;
  margin-right: 8px;
  width: 7px;
}

.home-hero-visual {
  background:
    linear-gradient(160deg, rgba(36, 58, 50, 0.96), rgba(21, 33, 29, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: var(--ui-shadow);
  min-height: 420px;
  overflow: hidden;
  padding: 20px;
}

.home-visual-toolbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  gap: 7px;
  margin: -2px -2px 18px;
  padding: 0 0 16px;
}

.home-visual-toolbar span {
  background: rgba(255, 250, 242, 0.62);
  border-radius: 999px;
  height: 8px;
  width: 8px;
}

.home-visual-toolbar span:first-child {
  background: var(--ui-gold);
}

.home-visual-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-visual-panel {
  background: rgba(255, 250, 242, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #e8f0eb;
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 18px;
}

.home-visual-panel-main {
  grid-column: 1 / -1;
  min-height: 210px;
}

.home-visual-panel span {
  color: #c8d6cf;
  font-size: 0.76rem;
  font-weight: 800;
}

.home-visual-panel strong {
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
}

.home-visual-bars {
  align-items: end;
  display: flex;
  gap: 10px;
  height: 90px;
  margin-top: auto;
}

.home-visual-bars i {
  background: linear-gradient(180deg, var(--ui-gold), #f4d49d);
  border-radius: 7px 7px 0 0;
  display: block;
  flex: 1 1 0;
  min-height: 18px;
}

.home-stats {
  background: var(--ui-forest);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--ui-shadow);
  color: #fff;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: -34px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.home-stat {
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  gap: 6px;
  min-height: 92px;
  padding: 22px 26px;
}

.home-stat:last-child {
  border-right: 0;
}

.home-stat b {
  font-size: 1.42rem;
  line-height: 1.1;
}

.home-stat span {
  color: #c2d0c9;
  font-size: 0.86rem;
}

.home-modules {
  padding: 78px 0 34px;
}

.home-section-head {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 30px;
}

.home-section-head h2 {
  color: var(--ui-ink);
  font-size: 2.5rem;
  font-weight: 840;
  line-height: 1.12;
  margin: 0;
}

.home-section-head > p {
  color: var(--ui-muted);
  line-height: 1.8;
  margin: 0;
  max-width: 420px;
}

.home-platform-list {
  gap: 30px;
}

.home-platform-section {
  gap: 14px;
}

.home-platform-heading {
  align-items: end;
  border-bottom: 1px solid var(--ui-line);
  padding-bottom: 12px;
}

.home-platform-heading div {
  display: grid;
  gap: 4px;
}

.home-platform-heading span,
.home-platform-heading small {
  color: var(--ui-gold);
  font-size: 0.78rem;
  font-weight: 850;
}

.home-platform-heading h2 {
  color: var(--ui-ink);
  font-size: 1.3rem;
}

.home-feature-grid {
  gap: 16px;
}

.home-feature-card,
.feature-card {
  background: var(--ui-cream);
  border: 1px solid rgba(92, 79, 62, 0.14);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 46, 39, 0.03);
  color: var(--ui-ink);
  min-height: 182px;
  padding: 22px;
}

.home-feature-card:hover,
.feature-card:hover {
  border-color: var(--ui-gold);
  box-shadow: var(--ui-shadow-soft);
  color: var(--ui-ink);
  transform: translateY(-2px);
}

.home-feature-kicker {
  background: #f3eadc;
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  color: var(--ui-gold);
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 14px;
  max-width: 100%;
  overflow: hidden;
  padding: 4px 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-feature-card h3,
.feature-card h3 {
  color: var(--ui-ink);
  font-size: 1.14rem;
}

.home-feature-card p,
.feature-card p {
  color: var(--ui-muted);
  line-height: 1.7;
}

.home-feature-action,
.feature-card > span:not(.home-feature-kicker) {
  color: var(--ui-teal);
  font-weight: 800;
}

.home-empty-state,
.empty-state {
  background: var(--ui-cream);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow-soft);
}

.tool-shell {
  margin-top: 30px;
}

.tool-heading,
.fba-tool-heading,
.cost-profit-heading,
.order-data-heading {
  align-items: flex-end;
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 22px;
  padding-bottom: 16px;
}

.tool-heading h1,
.fba-tool-heading h1,
.cost-profit-heading h1,
.admin-page-header h1 {
  color: var(--ui-ink);
  font-weight: 820;
  line-height: 1.15;
}

.tool-heading p,
.fba-tool-heading p,
.cost-profit-heading p,
.admin-page-header p {
  color: var(--ui-muted);
  line-height: 1.7;
}

.tool-meta {
  background: var(--ui-cream);
  border: 1px solid var(--ui-line);
  border-radius: 999px;
  color: var(--ui-gold);
  font-family: inherit;
  font-weight: 800;
  padding: 7px 11px;
}

.tool-form,
.tool-panel,
.admin-panel,
.settings-form,
.module-card,
.metric-card,
.cost-profit-section,
.cost-profit-result,
.cost-profit-ratebar,
.order-data-sidebar,
.amazon-admin-header,
.admin-pagination,
.table-responsive,
.system-database-table-scroll,
.translation-table-scroll,
.original-status-line,
.fba-status-line {
  background: var(--ui-cream);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(31, 46, 39, 0.03);
}

.tool-form,
.fba-tool-form {
  box-shadow: var(--ui-shadow-soft);
}

.tool-panel,
.admin-panel {
  margin-top: 20px;
}

.tool-panel-header,
.cost-profit-section-header {
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 16px;
  padding-bottom: 13px;
}

.tool-panel-header h2,
.admin-panel h2,
.cost-profit-section-header h2 {
  color: var(--ui-ink);
  font-weight: 780;
}

.tool-panel-header span,
.cost-profit-section-header span {
  color: var(--ui-muted);
}

.metric-grid {
  gap: 14px;
}

.metric-card {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.95), rgba(248, 242, 233, 0.95));
  min-height: 108px;
}

.metric-card span {
  color: var(--ui-muted);
  font-weight: 680;
}

.metric-card strong {
  color: var(--ui-forest);
  font-size: 1.55rem;
  font-weight: 850;
}

.btn {
  border-radius: 8px;
  font-weight: 720;
}

.btn-primary {
  background-color: var(--ui-forest);
  border-color: var(--ui-forest);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--ui-teal);
  border-color: var(--ui-teal);
}

.btn-outline-primary {
  border-color: var(--ui-teal);
  color: var(--ui-teal);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--ui-teal);
  border-color: var(--ui-teal);
  color: #fff;
}

.btn-outline-secondary {
  border-color: var(--ui-line-strong);
  color: #40514c;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background-color: #efe7dc;
  border-color: var(--ui-gold);
  color: var(--ui-ink);
}

.btn-danger {
  border-color: var(--ui-danger);
}

.form-label {
  color: #33423e;
  font-weight: 720;
}

.form-control,
.form-select,
.input-group-text {
  background-color: #fffdf8;
  border-color: var(--ui-line-strong);
  border-radius: 8px;
  color: var(--ui-ink);
}

.input-group > .form-control:not(:first-child),
.input-group > .form-select:not(:first-child) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.input-group > .input-group-text:not(:last-child) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--ui-gold);
  box-shadow: 0 0 0 0.2rem rgba(191, 138, 75, 0.18);
}

.form-check-input:checked {
  background-color: var(--ui-teal);
  border-color: var(--ui-teal);
}

.upload-control,
.original-upload-control {
  background: #fffdf8;
  border-color: var(--ui-line-strong);
  border-radius: 8px;
}

.upload-control:hover,
.upload-control.is-dragging,
.original-upload-control:hover,
.original-upload-control.is-dragging {
  background: #fff9ef;
  border-color: var(--ui-gold);
  box-shadow: var(--ui-shadow-soft);
}

.upload-mark,
.upload-action,
.original-status-badge {
  background: var(--ui-forest-soft);
  border-color: #c8ddd4;
  color: var(--ui-teal);
}

.order-data-center-shell {
  gap: 24px;
}

.order-data-sidebar {
  top: 100px;
}

.order-data-brand {
  border-bottom-color: var(--ui-line);
}

.order-data-brand strong {
  color: var(--ui-ink);
}

.order-data-brand span {
  color: var(--ui-muted);
}

.order-data-menu-link {
  border: 1px solid transparent;
  border-radius: 8px;
  color: #40514c;
  font-weight: 720;
}

.order-data-menu-link:hover,
.order-data-menu-link.is-active {
  background: var(--ui-forest-soft);
  border-color: #c8ddd4;
  color: var(--ui-teal);
}

.cost-profit-tabs,
.admin-tabs,
.amazon-admin-tabs {
  border-bottom-color: var(--ui-line);
}

.cost-profit-tab {
  border-radius: 8px 8px 0 0;
  color: var(--ui-muted);
}

.cost-profit-tab.is-active {
  background: var(--ui-cream);
  border-bottom-color: var(--ui-gold);
  color: var(--ui-teal);
}

.cost-profit-ratebar,
.cost-profit-total {
  background: #f8f2e9;
}

.cost-profit-total {
  border: 1px solid var(--ui-line);
  border-radius: 8px;
}

.cost-profit-total strong,
.cost-profit-rate-copy strong,
.cost-profit-candidate strong {
  color: var(--ui-blue);
}

.cost-profit-candidate {
  background: #fffdf8;
  border-color: var(--ui-line);
  border-radius: 8px;
}

.cost-profit-candidate.is-active {
  background: var(--ui-forest-soft);
  border-color: #9bcfc4;
}

.cost-profit-empty-result {
  border-radius: 8px;
}

.table-responsive,
.system-database-table-scroll,
.translation-table-scroll {
  overflow: auto;
}

.order-table,
.admin-table,
.system-database-table,
.table {
  color: var(--ui-ink);
}

.order-table th,
.admin-table th,
.system-database-table th,
.translation-table-scroll .admin-table thead th {
  background: #f5eee3;
  border-bottom: 1px solid var(--ui-line);
  color: #4b5b57;
  font-weight: 780;
}

.order-table td,
.admin-table td,
.system-database-table td,
.table td,
.table th {
  border-color: #e8ded1;
}

.report-bar-track {
  background: linear-gradient(180deg, #fffaf2 0%, #eee3d4 100%);
  border-color: var(--ui-line);
}

.report-bar-fill {
  background: linear-gradient(180deg, var(--ui-gold) 0%, var(--ui-teal) 100%);
}

.alert {
  border-radius: 8px;
}

.alert-success,
.alert-info {
  background: #e9f6f2;
  border-color: #bfe1d8;
  color: #165f55;
}

.alert-danger {
  background: #fff0ed;
  border-color: #ffd0c7;
  color: var(--ui-danger);
}

.admin-body,
.admin-login-body {
  background:
    linear-gradient(180deg, rgba(255, 250, 242, 0.72), rgba(244, 239, 231, 0.98)),
    var(--ui-paper);
  color: var(--ui-ink);
}

.admin-dashboard {
  background: transparent;
}

.admin-sidebar {
  background:
    linear-gradient(180deg, rgba(36, 58, 50, 0.96), rgba(21, 33, 29, 1));
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 12px 0 34px rgba(31, 46, 39, 0.16);
}

.admin-sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.admin-brand-title {
  color: #fff;
}

.admin-brand-subtitle {
  color: var(--ui-gold-soft);
}

.admin-menu-group h2 {
  color: #9eb1aa;
  font-weight: 700;
}

.admin-menu-link {
  border-radius: 8px;
  color: #dfe9e5;
}

.admin-menu-link:hover {
  background: rgba(255, 250, 242, 0.08);
  border-color: rgba(255, 250, 242, 0.1);
}

.admin-menu-link.is-active {
  background: var(--ui-cream);
  border-color: var(--ui-cream);
  color: var(--ui-forest-deep);
}

.admin-topbar {
  background: rgba(255, 250, 242, 0.9);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--ui-line);
}

.admin-topbar-title span {
  color: var(--ui-gold);
  font-weight: 700;
}

.admin-topbar-title strong {
  color: var(--ui-ink);
}

.admin-user-chip {
  background: var(--ui-forest-soft);
  border-color: #c8ddd4;
  color: var(--ui-teal);
}

.admin-content-inner {
  padding-top: 28px;
}

.admin-page-header {
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 22px;
  padding-bottom: 15px;
}

.admin-panel-title-row {
  border-bottom-color: var(--ui-line);
}

.module-card:hover {
  border-color: var(--ui-gold);
  box-shadow: var(--ui-shadow-soft);
}

.module-key,
.admin-platform-header span {
  background: #f3eadc;
  border-color: var(--ui-line);
  color: var(--ui-muted);
}

.module-status.is-enabled {
  background: #e5f6ed;
  border-color: #b7e3c8;
  color: #137547;
}

.module-status.is-disabled {
  background: #fff0ed;
  border-color: #ffd0c7;
  color: var(--ui-danger);
}

.admin-tab,
.amazon-admin-tabs a {
  border-radius: 8px 8px 0 0;
  color: var(--ui-muted);
}

.admin-tab:hover,
.admin-tab.is-active,
.amazon-admin-tabs a:hover,
.amazon-admin-tabs a.is-active {
  background: var(--ui-cream);
  border-color: var(--ui-line);
  color: var(--ui-teal);
}

.admin-login-page {
  background:
    linear-gradient(135deg, rgba(244, 239, 231, 0.98), rgba(225, 207, 178, 0.72));
}

.admin-login-panel {
  background: var(--ui-cream);
  border-color: var(--ui-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow);
}

.admin-login-side {
  background:
    linear-gradient(160deg, var(--ui-forest), var(--ui-forest-deep));
}

.admin-login-kicker {
  color: var(--ui-gold-soft);
}

.admin-login-side-copy {
  color: #c5d1cb;
}

.admin-login-card h2 {
  color: var(--ui-ink);
}

.modal-content {
  background: var(--ui-cream);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  box-shadow: var(--ui-shadow);
}

.modal-header,
.modal-footer {
  border-color: var(--ui-line);
}

.account-management-title-row {
  align-items: center;
}

.account-management-title-row h2 {
  margin-bottom: 0;
}

.account-management-title-row .btn,
.account-management-filter .btn {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
}

.account-management-title-row .btn svg,
.account-management-filter .btn svg {
  height: 16px;
  width: 16px;
}

.account-management-count {
  color: var(--ui-muted);
  font-size: 0.84rem;
  margin: 4px 0 0;
}

.account-management-filter {
  align-items: end;
  border-top: 1px solid var(--ui-line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(260px, 420px) minmax(140px, 180px) auto;
  justify-content: start;
  margin: 14px 0 16px;
  padding-top: 14px;
}

.account-action-group {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: max-content;
}

.account-action-form {
  display: inline-flex;
  margin: 0;
}

.account-action-button {
  align-items: center;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

.account-action-button svg {
  height: 16px;
  width: 16px;
}

.account-table-empty {
  color: var(--ui-muted);
  padding: 28px 16px !important;
  text-align: center;
}

.admin-form-modal .modal-dialog {
  max-width: none;
  width: min(620px, calc(100vw - 24px));
}

.admin-form-modal .modal-dialog.modal-lg {
  width: min(880px, calc(100vw - 24px));
}

.admin-form-modal .modal-dialog.modal-xl {
  width: min(1120px, calc(100vw - 24px));
}

.admin-form-modal .modal-content {
  overflow: hidden;
}

.admin-form-modal .modal-body {
  padding: 20px;
}

.admin-form-modal .modal-form-grid {
  display: grid;
  gap: 16px;
}

.admin-form-modal .modal-form-grid .form-row {
  margin-bottom: 0;
}

.account-management-modal .modal-dialog {
  width: min(520px, calc(100vw - 24px));
}

.account-management-modal .modal-content {
  overflow: hidden;
}

.account-management-modal .modal-body {
  padding: 20px;
}

.account-management-modal-copy {
  color: var(--ui-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

@media (max-width: 720px) {
  .account-management-title-row {
    align-items: stretch;
  }

  .account-management-title-row .btn {
    width: 100%;
  }

  .account-management-filter {
    grid-template-columns: 1fr;
  }

}

:focus-visible {
  outline: 3px solid rgba(191, 138, 75, 0.55);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .home-hero-copy h1 {
    font-size: 3.4rem;
  }

  .home-hero-grid {
    grid-template-columns: 1fr;
  }

  .home-hero-visual {
    min-height: 360px;
  }
}

@media (max-width: 900px) {
  .home-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-stat:nth-child(2) {
    border-right: 0;
  }

  .home-section-head {
    align-items: start;
    flex-direction: column;
  }

  .order-data-sidebar {
    top: auto;
  }
}

@media (max-width: 720px) {
  .site-brand-subtitle {
    display: none;
  }

  .site-content,
  .site-content-fluid {
    padding-top: 18px;
  }

  .site-content-fluid {
    padding-left: 14px;
    padding-right: 14px;
  }

  .home-showcase {
    margin: -18px -14px 0;
  }

  .home-wrap {
    width: min(100% - 28px, 1180px);
  }

  .home-hero-band {
    padding: 58px 0 44px;
  }

  .home-hero-copy h1 {
    font-size: 2.45rem;
  }

  .home-lead {
    font-size: 1rem;
  }

  .home-hero-notes {
    flex-direction: column;
    gap: 9px;
  }

  .home-hero-visual {
    min-height: 320px;
    padding: 14px;
  }

  .home-visual-grid,
  .home-stats,
  .home-feature-grid {
    grid-template-columns: 1fr;
  }

  .home-stat,
  .home-stat:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .home-stat:last-child {
    border-bottom: 0;
  }

  .home-section-head h2 {
    font-size: 2rem;
  }

  .home-platform-heading {
    align-items: start;
    flex-direction: column;
  }

  .tool-heading,
  .fba-tool-heading,
  .cost-profit-heading,
  .order-data-heading {
    align-items: start;
    flex-direction: column;
  }
}

/* Theme appearance settings and uploaded homepage hero image. */
.home-hero-image-visual {
  height: 420px;
  min-height: 420px;
  padding: 0;
}

.home-hero-image-visual img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.theme-settings-form {
  display: grid;
  gap: 24px;
}

.theme-setting-section {
  display: grid;
  gap: 16px;
}

.theme-setting-section + .theme-setting-section {
  border-top: 1px solid var(--ui-line);
  padding-top: 24px;
}

.theme-setting-heading {
  display: grid;
  gap: 5px;
}

.theme-setting-heading h2 {
  color: var(--ui-ink);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.theme-setting-heading p {
  color: var(--ui-muted);
  font-size: 0.9rem;
  margin: 0;
}

.theme-choice-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.theme-choice {
  cursor: pointer;
  display: block;
  margin: 0;
  min-width: 0;
  position: relative;
}

.theme-choice-input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.theme-choice-content {
  background: color-mix(in srgb, var(--theme-preview-surface, #fff) 96%, var(--theme-preview-bg, #f4f6f8));
  border: 1px solid color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 22%, var(--ui-line));
  border-radius: 8px;
  display: grid;
  gap: 13px;
  height: 100%;
  padding: 12px;
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.theme-choice:hover .theme-choice-content {
  border-color: color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 58%, var(--ui-line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 12%, transparent);
  transform: translateY(-1px);
}

.theme-choice-input:checked + .theme-choice-content {
  background: color-mix(in srgb, var(--theme-preview-surface, #fff) 92%, var(--theme-preview-accent, var(--ui-teal)));
  border-color: var(--theme-preview-accent, var(--ui-teal));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 22%, transparent);
}

.theme-choice-input:focus-visible + .theme-choice-content {
  outline: 3px solid color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 42%, transparent);
  outline-offset: 2px;
}

.theme-choice-preview {
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-radius: 6px;
  display: block;
  height: 94px;
  overflow: hidden;
  position: relative;
}

.theme-choice-preview i {
  display: block;
  position: absolute;
}

.theme-choice-preview {
  background: var(--theme-preview-bg, #f4f6f8);
}

.theme-choice-preview .theme-preview-sidebar {
  background: var(--theme-preview-accent, #2563a6);
  bottom: 0;
  left: 0;
  top: 0;
  width: 24%;
}

.theme-choice-preview .theme-preview-surface {
  background: var(--theme-preview-surface, #fff);
  border: 1px solid rgba(100, 116, 139, 0.24);
  height: 54%;
  left: 31%;
  top: 24%;
  width: 58%;
}

.theme-choice-preview .theme-preview-accent {
  background: var(--theme-preview-accent, #2563a6);
  height: 9px;
  left: 37%;
  top: 37%;
  width: 25%;
}

.theme-choice-preview .theme-preview-secondary {
  background: var(--theme-preview-secondary, var(--theme-preview-accent, #2563a6));
  bottom: 20%;
  height: 8px;
  left: 37%;
  width: 38%;
}

.theme-choice-copy {
  display: grid;
  gap: 4px;
}

.theme-choice-copy strong {
  color: color-mix(in srgb, var(--theme-preview-accent, var(--ui-teal)) 52%, var(--ui-ink));
  font-size: 0.96rem;
}

.theme-choice-copy span {
  color: var(--ui-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.theme-choice-swatches {
  align-items: center;
  display: flex;
  gap: 7px;
}

.theme-choice-swatch {
  border: 1px solid color-mix(in srgb, var(--ui-line-strong) 72%, transparent);
  border-radius: 50%;
  display: block;
  height: 14px;
  width: 14px;
}

.theme-choice-swatch.is-background {
  background: var(--theme-preview-bg, #f4f6f8);
}

.theme-choice-swatch.is-surface {
  background: var(--theme-preview-surface, #fff);
}

.theme-choice-swatch.is-accent {
  background: var(--theme-preview-accent, var(--ui-teal));
}

.theme-choice-swatch.is-secondary {
  background: var(--theme-preview-secondary, var(--theme-preview-accent, var(--ui-teal)));
}

.theme-choice-check {
  align-items: center;
  background: var(--theme-preview-accent, var(--ui-teal));
  border-radius: 50%;
  color: #fff;
  display: none;
  height: 24px;
  padding: 5px;
  position: absolute;
  right: 10px;
  top: 10px;
  width: 24px;
}

.theme-choice-input:checked + .theme-choice-content .theme-choice-check {
  display: flex;
}

.theme-hero-setting {
  gap: 12px;
}

.theme-hero-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 300px) minmax(260px, 480px);
  justify-content: start;
  max-width: 798px;
}

.theme-hero-preview {
  aspect-ratio: 16 / 9;
  background: var(--ui-forest-soft);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
  position: relative;
  width: min(100%, 300px);
}

.theme-hero-preview img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.16s ease;
  width: 100%;
}

.theme-hero-preview.is-cleared img {
  opacity: 0.22;
}

.theme-hero-placeholder {
  align-content: center;
  color: var(--ui-muted);
  display: grid;
  gap: 5px;
  inset: 0;
  justify-items: center;
  font-size: 0.8rem;
  padding: 14px;
  position: absolute;
  text-align: center;
}

.theme-hero-placeholder strong {
  color: var(--ui-ink);
  font-size: 0.88rem;
}

.theme-hero-placeholder.is-hidden {
  display: none;
}

.theme-hero-controls {
  display: grid;
  gap: 12px;
  max-width: 480px;
}

.theme-clear-image {
  align-items: center;
  display: flex;
  gap: 8px;
  margin: 0;
}

.theme-favicon-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: 112px minmax(260px, 1fr);
}

.theme-favicon-preview {
  align-items: center;
  aspect-ratio: 1;
  background: var(--ui-cream);
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 18px;
  position: relative;
  width: 112px;
}

.theme-favicon-preview img {
  display: block;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.16s ease;
  width: 100%;
}

.theme-favicon-preview.is-cleared img {
  opacity: 0.22;
}

.theme-favicon-placeholder {
  color: var(--ui-muted);
  font-size: 0.84rem;
  text-align: center;
}

.theme-favicon-placeholder.is-hidden {
  display: none;
}

.theme-favicon-controls {
  display: grid;
  gap: 12px;
}

.admin-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.admin-tab {
  white-space: nowrap;
}

/* Classic theme: the pre-showcase white and blue-gray workplace palette. */
body[data-theme="classic"] {
  --ui-ink: #172033;
  --ui-forest: #274c77;
  --ui-forest-deep: #1e293b;
  --ui-forest-soft: #eef4fa;
  --ui-paper: #f4f6f8;
  --ui-cream: #ffffff;
  --ui-gold: #3b76a5;
  --ui-gold-soft: #dceaf6;
  --ui-line: #d9e1e8;
  --ui-line-strong: #c3ced8;
  --ui-muted: #64748b;
  --ui-subtle: #8794a6;
  --ui-teal: #2563a6;
  --ui-blue: #2457a6;
  --ui-danger: #b42318;
  --ui-shadow: 0 20px 54px rgba(30, 41, 59, 0.13);
  --ui-shadow-soft: 0 10px 30px rgba(30, 41, 59, 0.08);
  --ui-scrollbar-track: #e5ebf1;
  --ui-scrollbar-thumb: #8798aa;
  --ui-scrollbar-thumb-hover: var(--ui-teal);
  --admin-scrollbar-track: #202d3f;
  --admin-scrollbar-thumb: #62758b;
  --admin-scrollbar-thumb-hover: #9bacc0;

  --admin-bg: var(--ui-paper);
  --admin-surface: var(--ui-cream);
  --admin-surface-soft: #f8fafc;
  --admin-border: var(--ui-line);
  --admin-border-strong: var(--ui-line-strong);
  --admin-text: var(--ui-ink);
  --admin-muted: var(--ui-muted);
  --admin-subtle: var(--ui-subtle);
  --admin-sidebar: var(--ui-forest-deep);
  --admin-sidebar-soft: #334155;
  --admin-sidebar-text: #dfe7ef;
  --admin-primary: var(--ui-teal);
  --admin-primary-hover: #1d4f8a;
  --admin-primary-soft: #e8f1fb;
  --admin-warning: #b7791f;
  --admin-danger: var(--ui-danger);
  --admin-shadow: var(--ui-shadow-soft);
}

body.app-shell[data-theme="classic"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(244, 246, 248, 0) 360px),
    var(--ui-paper);
}

body[data-theme="classic"] .admin-brand-mark {
  box-shadow: 0 10px 24px rgba(37, 99, 166, 0.22);
}

body[data-theme="classic"] .ui-btn-secondary {
  background: rgba(255, 255, 255, 0.76);
}

body[data-theme="classic"] .home-hero-band {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 244, 250, 0.95) 58%, rgba(207, 223, 237, 0.72) 100%),
    var(--ui-paper);
  border-bottom-color: rgba(30, 41, 59, 0.1);
}

body[data-theme="classic"] .home-hero-band::after {
  background: linear-gradient(135deg, rgba(39, 76, 119, 0.07) 0 1px, transparent 1px 18px);
}

body[data-theme="classic"] .home-lead,
body[data-theme="classic"] .home-hero-notes {
  color: #526174;
}

body[data-theme="classic"] .home-hero-visual {
  background: linear-gradient(160deg, rgba(39, 76, 119, 0.98), rgba(30, 41, 59, 1));
}

body[data-theme="classic"] .home-visual-toolbar span {
  background: rgba(255, 255, 255, 0.62);
}

body[data-theme="classic"] .home-visual-panel {
  background: rgba(255, 255, 255, 0.1);
  color: #eef4fa;
}

body[data-theme="classic"] .home-visual-panel span,
body[data-theme="classic"] .home-stat span {
  color: #cbd7e3;
}

body[data-theme="classic"] .home-visual-bars i {
  background: linear-gradient(180deg, var(--ui-gold), #9fc5e4);
}

body[data-theme="classic"] .home-feature-card,
body[data-theme="classic"] .feature-card {
  border-color: rgba(71, 85, 105, 0.16);
}

body[data-theme="classic"] .home-feature-kicker,
body[data-theme="classic"] .module-key,
body[data-theme="classic"] .admin-platform-header span {
  background: #eef4fa;
}

body[data-theme="classic"] .metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

body[data-theme="classic"] .btn-outline-secondary {
  color: #405168;
}

body[data-theme="classic"] .btn-outline-secondary:hover,
body[data-theme="classic"] .btn-outline-secondary:focus {
  background-color: #eef3f8;
  border-color: #9caebe;
}

body[data-theme="classic"] .form-label {
  color: #334155;
}

body[data-theme="classic"] .form-control,
body[data-theme="classic"] .form-select,
body[data-theme="classic"] .input-group-text,
body[data-theme="classic"] .upload-control,
body[data-theme="classic"] .original-upload-control,
body[data-theme="classic"] .cost-profit-candidate {
  background-color: #ffffff;
}

body[data-theme="classic"] .form-control:focus,
body[data-theme="classic"] .form-select:focus,
body[data-theme="classic"] .form-check-input:focus {
  border-color: #4f8fc2;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 166, 0.16);
}

body[data-theme="classic"] .upload-control:hover,
body[data-theme="classic"] .upload-control.is-dragging,
body[data-theme="classic"] .original-upload-control:hover,
body[data-theme="classic"] .original-upload-control.is-dragging {
  background: #f7fbff;
}

body[data-theme="classic"] .order-data-menu-link {
  color: #405168;
}

body[data-theme="classic"] .cost-profit-ratebar,
body[data-theme="classic"] .cost-profit-total {
  background: #f8fafc;
}

body[data-theme="classic"] .order-table th,
body[data-theme="classic"] .admin-table th,
body[data-theme="classic"] .system-database-table th,
body[data-theme="classic"] .translation-table-scroll .admin-table thead th {
  background: #f1f5f9;
  color: #475569;
}

body[data-theme="classic"] .order-table td,
body[data-theme="classic"] .admin-table td,
body[data-theme="classic"] .system-database-table td,
body[data-theme="classic"] .table td,
body[data-theme="classic"] .table th {
  border-color: #e2e8f0;
}

body[data-theme="classic"] .report-bar-track {
  background: linear-gradient(180deg, #ffffff 0%, #e7edf3 100%);
}

body.admin-body[data-theme="classic"],
body.admin-login-body[data-theme="classic"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(244, 246, 248, 0.98)),
    var(--ui-paper);
}

body[data-theme="classic"] .admin-sidebar {
  background: linear-gradient(180deg, rgba(39, 55, 75, 0.98), rgba(30, 41, 59, 1));
  box-shadow: 12px 0 34px rgba(30, 41, 59, 0.16);
}

body[data-theme="classic"] .admin-menu-group h2 {
  color: #9fb0c1;
}

body[data-theme="classic"] .admin-menu-link {
  color: #dfe7ef;
}

body[data-theme="classic"] .admin-menu-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="classic"] .admin-menu-link.is-active,
body[data-theme="classic"] .admin-menu-link.is-active:hover,
body[data-theme="classic"] .admin-menu-link.is-active:focus-visible {
  background: #f8fbff;
  border-color: #d4e3f1;
  box-shadow: inset 3px 0 0 #2563a6;
  color: #172033;
}

body[data-theme="classic"] .admin-topbar {
  background: rgba(255, 255, 255, 0.92);
}

body[data-theme="classic"] .admin-user-chip {
  border-color: #bfd4e8;
}

body[data-theme="classic"] .admin-login-page {
  background: linear-gradient(135deg, rgba(244, 246, 248, 0.98), rgba(218, 229, 239, 0.78));
}

body[data-theme="classic"] .admin-login-side {
  background: linear-gradient(160deg, var(--ui-forest), var(--ui-forest-deep));
}

body[data-theme="classic"]:focus-visible,
body[data-theme="classic"] :focus-visible {
  outline-color: rgba(37, 99, 166, 0.56);
}

@media (max-width: 1100px) {
  .home-hero-image-visual {
    height: 360px;
    min-height: 360px;
  }
}

@media (max-width: 760px) {
  .theme-choice-grid,
  .theme-hero-grid,
  .theme-favicon-grid {
    grid-template-columns: 1fr;
  }

  .theme-hero-preview {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .home-hero-image-visual {
    height: 320px;
    min-height: 320px;
    padding: 0;
  }
}

.order-management-filter {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 220px));
  justify-content: start;
}

.order-management-filter .order-management-search {
  grid-column: span 2;
}

.order-management-filter .form-row-action {
  display: flex;
  gap: 8px;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid #e4ddd1;
  border-left: 1px solid #e4ddd1;
}

.order-detail-grid > div {
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e4ddd1;
  border-bottom: 1px solid #e4ddd1;
}

.order-detail-grid dt {
  margin-bottom: 4px;
  color: #68716d;
  font-size: 0.82rem;
  font-weight: 500;
}

.order-detail-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.order-edit-grid {
  width: 100%;
  max-width: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .order-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .order-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .order-management-filter,
  .order-edit-grid,
  .order-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .order-management-filter .order-management-search {
    grid-column: auto;
  }

  .report-generate-grid .report-filter-quick-range {
    grid-column: auto;
    max-width: none;
  }
}

.operation-toast-region {
  position: fixed;
  top: clamp(16px, calc(18vh - 72px), 78px);
  left: 50%;
  z-index: 1090;
  width: min(480px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.operation-toast {
  position: relative;
  width: 100%;
  max-width: none;
  overflow: hidden;
  background: #fbfefd;
  border: 1px solid #a9d8cf;
  border-radius: 8px;
  box-shadow:
    0 18px 40px rgba(28, 39, 35, 0.18),
    0 3px 10px rgba(28, 39, 35, 0.08);
  color: #1f302b;
  pointer-events: auto;
}

.operation-toast::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: #238576;
  content: "";
}

.operation-toast.fade {
  transition: opacity 300ms ease;
}

.operation-toast-layout {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 30px;
  align-items: start;
  gap: 12px;
  padding: 14px 12px 14px 16px;
}

.operation-toast-icon {
  display: grid;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  background: #dff3ee;
  border-radius: 50%;
  color: #176b5f;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.operation-toast-icon::before {
  content: "i";
}

.operation-toast-copy {
  min-width: 0;
  padding-top: 1px;
}

.operation-toast-title {
  display: block;
  margin-bottom: 2px;
  font-size: 0.88rem;
  font-weight: 780;
  line-height: 1.35;
}

.operation-toast-message {
  font-size: 0.9rem;
  font-weight: 520;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.operation-toast-close {
  width: 30px;
  height: 30px;
  margin: -2px -2px 0 0;
  padding: 0;
  background-size: 12px;
  border-radius: 6px;
  opacity: 0.48;
}

.operation-toast-close:hover,
.operation-toast-close:focus-visible {
  background-color: rgba(31, 48, 43, 0.08);
  opacity: 0.82;
}

.operation-toast-success .operation-toast-icon::before {
  content: "\2713";
}

.operation-toast-info {
  background: #fbfdff;
  border-color: #b4cee7;
  color: #244f73;
}

.operation-toast-info::before {
  background: #3978a9;
}

.operation-toast-info .operation-toast-icon {
  background: #e5f0fa;
  color: #2d6d9e;
}

.operation-toast-warning {
  background: #fffdf7;
  border-color: #e2c478;
  color: #6b4a08;
}

.operation-toast-warning::before {
  background: #b88620;
}

.operation-toast-warning .operation-toast-icon {
  background: #fff0c7;
  color: #855c08;
}

.operation-toast-warning .operation-toast-icon::before,
.operation-toast-danger .operation-toast-icon::before {
  content: "!";
}

.operation-toast-danger {
  background: #fffafa;
  border-color: #e5a69c;
  color: #8d2f25;
}

.operation-toast-danger::before {
  background: #bd4b3f;
}

.operation-toast-danger .operation-toast-icon {
  background: #fde7e3;
  color: #a63c31;
}

@media (max-width: 575.98px) {
  .operation-toast-region {
    width: calc(100vw - 24px);
  }

  .operation-toast-layout {
    grid-template-columns: 32px minmax(0, 1fr) 28px;
    gap: 10px;
    padding: 13px 10px 13px 14px;
  }

  .operation-toast-icon {
    width: 32px;
    height: 32px;
  }

  .operation-toast-close {
    width: 28px;
    height: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .operation-toast.fade {
    transition-duration: 1ms;
  }
}

.operation-confirm-modal {
  z-index: 1100;
}

.operation-confirm-backdrop {
  z-index: 1095;
}

.operation-confirm-modal .modal-dialog {
  width: min(460px, calc(100vw - 24px));
  margin-top: clamp(48px, 7vh, 72px);
  margin-right: auto;
  margin-bottom: 24px;
  margin-left: auto;
}

.operation-confirm-modal.is-wide .modal-dialog {
  max-width: none;
  width: min(720px, calc(100vw - 24px));
}

.operation-confirm-modal .modal-content {
  overflow: hidden;
  border: 1px solid #dfd4c4;
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(35, 31, 25, 0.24);
}

.operation-confirm-header {
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 0;
}

.operation-confirm-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.operation-confirm-heading .modal-title {
  color: #302b26;
  font-weight: 760;
}

.operation-confirm-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  background: #fde9e5;
  border: 1px solid #efc3bc;
  border-radius: 50%;
  color: #a83f34;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.operation-confirm-body {
  padding: 0 20px 20px 66px;
  color: #615951;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.operation-confirm-modal.is-wide .operation-confirm-body {
  max-height: min(70vh, 720px);
  overflow-y: auto;
  padding: 0 20px 20px;
}

.operation-confirm-footer {
  gap: 8px;
  padding: 14px 20px;
  background: #fbfaf8;
  border-top-color: #ebe4da;
}

@media (max-width: 575.98px) {
  .operation-confirm-header {
    padding: 16px 16px 12px;
  }

  .operation-confirm-body {
    padding: 0 16px 18px 62px;
  }

  .operation-confirm-modal.is-wide .operation-confirm-body {
    max-height: 68vh;
    padding: 0 16px 18px;
  }

  .operation-confirm-footer {
    padding: 12px 16px;
  }
}

/* Public company content and administrator content editing. */
.public-content-page {
  margin: 20px auto 0;
  max-width: 920px;
  min-width: 0;
}

.public-content-header {
  border-bottom: 1px solid var(--ui-line);
  margin-bottom: 30px;
  padding: 20px 0 22px;
}

.public-content-header h1 {
  color: var(--ui-ink);
  font-size: 2.2rem;
  font-weight: 820;
  line-height: 1.2;
  margin: 0;
}

.public-rich-content {
  color: var(--ui-ink);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.85;
  min-height: 260px;
  overflow-wrap: anywhere;
  padding: 0;
}

.public-rich-content h2,
.public-rich-content h3 {
  color: var(--ui-forest);
  font-weight: 790;
  letter-spacing: 0;
  margin-bottom: 14px;
  margin-top: 34px;
}

.public-rich-content h2 {
  font-size: 1.55rem;
}

.public-rich-content h3 {
  font-size: 1.22rem;
}

.public-rich-content a,
.public-contact-row a {
  color: var(--ui-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.public-rich-content img {
  display: block;
  height: auto;
  margin: 26px auto;
  max-width: 100%;
}

.public-rich-content blockquote {
  border-left: 4px solid var(--ui-gold);
  color: var(--ui-muted);
  margin: 24px 0;
  padding: 8px 0 8px 18px;
}

.public-contact-list {
  border-top: 1px solid var(--ui-line);
  margin: 0;
}

.public-contact-row {
  align-items: start;
  border-bottom: 1px solid var(--ui-line);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(120px, 0.3fr) minmax(0, 1fr);
  padding: 22px 0;
}

.public-contact-row dt {
  color: var(--ui-muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.public-contact-row dd {
  color: var(--ui-ink);
  font-size: 1rem;
  line-height: 1.7;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.site-content-tabs {
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.site-content-tab {
  border-bottom: 3px solid transparent;
  color: var(--admin-muted);
  flex: 0 0 auto;
  font-weight: 740;
  padding: 11px 16px 10px;
  text-decoration: none;
}

.site-content-tab:hover,
.site-content-tab:focus,
.site-content-tab.is-active {
  border-bottom-color: var(--admin-primary);
  color: var(--admin-primary);
}

.site-content-form {
  padding: 24px;
}

.site-content-form-header,
.site-contact-editor-header {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
}

.site-content-form-header {
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 24px;
  padding-bottom: 20px;
}

.site-content-form-header span {
  color: var(--admin-subtle);
  display: block;
  font-size: 0.78rem;
  font-weight: 760;
  margin-bottom: 5px;
}

.site-content-form-header h2,
.site-contact-editor-header h2 {
  color: var(--admin-text);
  font-size: 1.15rem;
  font-weight: 790;
  letter-spacing: 0;
  margin: 0;
}

.site-content-visibility {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}

.site-content-editor-field {
  min-width: 0;
}

.site-contact-editor-header {
  margin-bottom: 16px;
}

.site-contact-editor-header p {
  color: var(--admin-muted);
  margin: 5px 0 0;
}

.site-contact-list {
  border-top: 1px solid var(--admin-border);
}

.site-contact-row {
  align-items: start;
  border-bottom: 1px solid var(--admin-border);
  display: grid;
  gap: 16px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 18px 0;
}

.site-contact-row.is-recently-moved {
  animation: site-contact-row-moved 3s ease-out;
}

@keyframes site-contact-row-moved {
  0%,
  34% {
    background-color: var(--admin-primary-soft);
  }

  100% {
    background-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-contact-row.is-recently-moved {
    animation: none;
    background-color: var(--admin-primary-soft);
  }
}

.site-contact-order-actions {
  display: grid;
  gap: 6px;
  grid-auto-columns: 34px;
  grid-auto-flow: column;
  grid-template-rows: 34px;
}

.site-contact-icon-button {
  align-items: center;
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border-strong);
  border-radius: 6px;
  color: var(--admin-text);
  display: inline-flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.site-contact-icon-button:hover,
.site-contact-icon-button:focus {
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.site-contact-icon-button.is-danger:hover,
.site-contact-icon-button.is-danger:focus {
  border-color: var(--admin-danger);
  color: var(--admin-danger);
}

.site-contact-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

.site-contact-fields {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(140px, 0.7fr) minmax(220px, 1.15fr) minmax(220px, 1fr);
}

.site-contact-summary-item {
  min-width: 0;
}

.site-contact-summary-item > span:first-child {
  color: var(--admin-subtle);
  display: block;
  font-size: .76rem;
  font-weight: 760;
  margin-bottom: 4px;
}

.site-contact-summary-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.site-contact-link-field {
  grid-column: auto;
}

.site-contact-empty {
  box-shadow: none;
  margin-top: 16px;
  padding: 24px;
  text-align: center;
}

.site-contact-empty h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.site-contact-empty p {
  color: var(--admin-muted);
  margin: 0;
}

.site-contact-empty.is-hidden {
  display: none;
}

.site-content-form-actions {
  align-items: center;
  border-top: 1px solid var(--admin-border);
  display: flex;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
}

@media (max-width: 991.98px) {
  .site-contact-fields {
    grid-template-columns: minmax(140px, 0.34fr) minmax(220px, 0.66fr);
  }

  .site-contact-link-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .public-content-page {
    margin-top: 0;
  }

  .public-content-header {
    margin-bottom: 22px;
    padding-top: 10px;
  }

  .public-content-header h1 {
    font-size: 1.75rem;
  }

  .public-contact-row {
    gap: 7px;
    grid-template-columns: 1fr;
    padding: 18px 0;
  }

  .site-content-form {
    padding: 18px;
  }

  .site-content-form-header,
  .site-contact-editor-header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .site-contact-editor-header .btn {
    width: 100%;
  }

  .site-contact-fields {
    grid-template-columns: 1fr;
  }

  .site-contact-link-field {
    grid-column: auto;
  }
}

@media (max-width: 575.98px) {
  .site-contact-row {
    grid-template-columns: 1fr;
  }

  .site-contact-order-actions {
    display: flex;
  }

  .site-content-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-content-form-actions .btn {
    width: 100%;
  }
}

/* Theme-aware scrollbars for page, sidebar, tables, tabs, and editors. */
html,
body {
  --scrollbar-track: var(--ui-scrollbar-track);
  --scrollbar-thumb: var(--ui-scrollbar-thumb);
  --scrollbar-thumb-hover: var(--ui-scrollbar-thumb-hover);
}

.admin-sidebar {
  --scrollbar-track: var(--admin-scrollbar-track);
  --scrollbar-thumb: var(--admin-scrollbar-thumb);
  --scrollbar-thumb-hover: var(--admin-scrollbar-thumb-hover);
  scrollbar-gutter: stable;
}

* {
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
}

::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active {
  background-color: var(--scrollbar-thumb-hover);
}

::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}

@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
}

/* Collapsible admin navigation and mobile drawer. */
.admin-sidebar {
  display: flex;
  flex-direction: column;
}

.admin-sidebar-header {
  align-items: center;
  display: flex;
  gap: 10px;
}

.admin-sidebar-header .admin-brand {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-menu {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
}

.admin-menu-group {
  display: block;
  min-width: 0;
}

.admin-menu-group.is-pinned {
  border-top: 1px solid rgba(255, 255, 255, .1);
  margin-top: auto;
  padding-top: 10px;
}

.admin-menu-group-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--admin-sidebar-text);
  display: flex;
  font: inherit;
  font-size: .86rem;
  font-weight: 700;
  gap: 10px;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 9px;
  text-align: left;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease;
  width: 100%;
}

.admin-menu-group-toggle:hover,
.admin-menu-group-toggle:focus-visible,
.admin-menu-group-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .08);
  color: #fff;
}

.admin-menu-group-label {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.admin-menu-group-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-menu-group-label svg,
.admin-menu-toggle-indicator svg,
.admin-menu-item-icon,
.admin-sidebar-trigger svg,
.admin-sidebar-close svg {
  display: block;
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.admin-menu-toggle-indicator {
  align-items: center;
  display: inline-flex;
  flex: 0 0 16px;
  justify-content: center;
}

.admin-menu-toggle-indicator .admin-menu-toggle-icon-expanded,
.admin-menu-group-toggle[aria-expanded="true"] .admin-menu-toggle-indicator .admin-menu-toggle-icon-collapsed {
  display: none;
}

.admin-menu-group-toggle[aria-expanded="true"] .admin-menu-toggle-indicator .admin-menu-toggle-icon-expanded {
  display: block;
}

.admin-menu-items {
  display: grid;
  gap: 2px;
  padding: 3px 0 5px 23px;
}

.admin-menu-items[hidden] {
  display: none;
}

.admin-menu-group.is-direct .admin-menu-items {
  padding: 0;
}

.admin-menu-link {
  align-items: center;
  border-radius: 6px;
  display: flex;
  font-size: .86rem;
  gap: 9px;
  justify-content: flex-start;
  min-height: 36px;
  min-width: 0;
  padding: 7px 9px;
  width: 100%;
}

.admin-menu-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-menu-group.is-collapsible .admin-menu-link {
  font-weight: 600;
}

.admin-menu-group.is-direct:not(.is-pinned) .admin-menu-link {
  font-size: .9rem;
  font-weight: 700;
  min-height: 40px;
}

.admin-menu-group.is-pinned .admin-menu-link {
  color: #b9c8c2;
  font-size: .82rem;
}

.admin-menu-item-icon {
  opacity: .88;
}

.admin-menu-link.is-active .admin-menu-item-icon {
  opacity: 1;
}

.admin-sidebar-trigger,
.admin-sidebar-close {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  display: none;
  flex: 0 0 36px;
  height: 36px;
  justify-content: center;
  padding: 0;
}

.admin-sidebar-trigger:hover,
.admin-sidebar-trigger:focus-visible {
  background: var(--admin-primary-soft);
  border-color: var(--admin-border);
  color: var(--admin-primary);
}

.admin-sidebar-close {
  color: var(--admin-sidebar-text);
}

.admin-sidebar-close:hover,
.admin-sidebar-close:focus-visible {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .1);
  color: #fff;
}

.admin-sidebar-backdrop {
  display: none;
}

@media (max-width: 900px) {
  .admin-dashboard {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    bottom: 0;
    height: 100dvh;
    left: 0;
    max-width: calc(100vw - 48px);
    overflow-y: auto;
    padding: 18px 14px;
    position: fixed;
    top: 0;
    transform: translateX(-102%);
    transition: transform .18s ease, visibility .18s ease;
    visibility: hidden;
    width: 292px;
    z-index: 1045;
  }

  .admin-sidebar-open .admin-sidebar {
    transform: translateX(0);
    visibility: visible;
  }

  .admin-sidebar-header {
    margin-bottom: 12px;
  }

  .admin-sidebar-close,
  .admin-sidebar-trigger {
    display: inline-flex;
  }

  .admin-sidebar-backdrop {
    background: rgba(15, 23, 20, .5);
    display: block;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 1040;
  }

  .admin-sidebar-open .admin-sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.admin-sidebar-open {
    overflow: hidden;
  }

  .admin-menu {
    display: flex;
    grid-template-columns: none;
  }

  .admin-menu-group {
    display: block;
    grid-template-columns: none;
  }

  .admin-menu-link {
    justify-content: flex-start;
  }

  .admin-topbar {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 900;
  }

  .admin-topbar-title {
    min-width: 0;
  }

  .admin-topbar-actions {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar,
  .admin-sidebar-backdrop {
    transition: none;
  }
}

/* Unit converter */
.unit-converter-tool {
  max-width: 1360px;
}

.unit-converter-heading {
  display: flex;
  justify-content: space-between;
}

.unit-converter-tabs {
  align-items: stretch;
  background: var(--ui-cream, #fff);
  border: 1px solid var(--ui-line, #d9e1e8);
  border-radius: 8px;
  display: flex;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.unit-converter-tab {
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ui-line, #d9e1e8);
  color: var(--ui-muted, #667085);
  flex: 1 0 132px;
  font: inherit;
  font-weight: 720;
  min-height: 48px;
  padding: 10px 14px;
  position: relative;
  white-space: nowrap;
}

.unit-converter-tab:last-child {
  border-right: 0;
}

.unit-converter-tab:hover,
.unit-converter-tab:focus-visible {
  background: var(--ui-forest-soft, #eef5f1);
  color: var(--ui-ink, #17211e);
}

.unit-converter-tab.is-active {
  background: var(--ui-forest-soft, #eef5f1);
  box-shadow: inset 0 -3px 0 var(--ui-gold, #bf8a4b);
  color: var(--ui-forest, #243a32);
}

.unit-converter-category {
  align-items: start;
  display: grid;
  gap: 18px;
}

.unit-converter-category.is-paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unit-converter-category.is-single {
  margin: 0 auto;
  max-width: 980px;
}

.unit-converter-group {
  background: var(--ui-cream, #fff);
  border: 1px solid var(--ui-line, #d9e1e8);
  border-radius: 8px;
  box-shadow: var(--ui-shadow-soft, 0 10px 30px rgba(31, 46, 39, .08));
  min-width: 0;
  overflow: hidden;
}

.unit-converter-group-header {
  align-items: center;
  border-bottom: 1px solid var(--ui-line, #d9e1e8);
  display: flex;
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 16px;
}

.unit-converter-group-header h2 {
  color: var(--ui-ink, #17211e);
  font-size: 1.02rem;
  font-weight: 780;
  margin: 0;
}

.unit-converter-group-header span {
  color: var(--ui-muted, #667085);
  display: block;
  font-size: .78rem;
  margin-top: 2px;
}

.unit-converter-reset {
  background: transparent;
  border: 1px solid var(--ui-line-strong, #c8d1db);
  border-radius: 6px;
  color: var(--ui-teal, #0f766e);
  flex: 0 0 68px;
  font: inherit;
  font-size: .82rem;
  font-weight: 720;
  height: 34px;
  padding: 0 10px;
}

.unit-converter-reset:hover,
.unit-converter-reset:focus-visible {
  background: var(--ui-forest-soft, #eef5f1);
  border-color: var(--ui-teal, #0f766e);
}

.unit-converter-table-wrap {
  overflow: hidden;
}

.unit-converter-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}

.unit-converter-label-column {
  width: 43%;
}

.unit-converter-table th,
.unit-converter-table td {
  border-bottom: 1px solid var(--ui-line, #e3e8ed);
  padding: 9px 14px;
  vertical-align: middle;
}

.unit-converter-table tr:last-child th,
.unit-converter-table tr:last-child td {
  border-bottom: 0;
}

.unit-converter-unit-row th {
  color: var(--ui-ink, #17211e);
  font-size: .88rem;
  font-weight: 650;
  text-align: left;
}

.unit-converter-unit-row label {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
}

.unit-converter-unit-row label > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.unit-converter-unit-row small {
  color: var(--ui-muted, #667085);
  font-size: .76rem;
  font-weight: 600;
}

.unit-converter-info {
  align-items: center;
  border: 1px solid var(--ui-line-strong, #c8d1db);
  border-radius: 50%;
  color: var(--ui-muted, #667085);
  cursor: help;
  display: inline-flex;
  flex: 0 0 16px;
  font-size: 10px;
  font-style: normal;
  height: 16px;
  justify-content: center;
  line-height: 1;
  width: 16px;
}

.unit-converter-input {
  font-variant-numeric: tabular-nums;
  height: 40px;
  min-width: 0;
  text-align: right;
  width: 100%;
}

.unit-converter-input.is-source {
  border-color: var(--ui-teal, #0f766e);
  box-shadow: 0 0 0 .16rem rgba(15, 118, 110, .12);
}

.unit-converter-input[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 .16rem rgba(180, 35, 24, .11);
}

.unit-converter-section-row th {
  background: var(--ui-forest-soft, #eef5f1);
  color: var(--ui-muted, #667085);
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: 0;
  padding-bottom: 8px;
  padding-top: 8px;
  text-align: left;
}

body[data-theme="classic"] .unit-converter-tabs,
body[data-theme="classic"] .unit-converter-group {
  background: #fff;
}

body[data-theme="classic"] .unit-converter-tab:hover,
body[data-theme="classic"] .unit-converter-tab:focus-visible,
body[data-theme="classic"] .unit-converter-tab.is-active,
body[data-theme="classic"] .unit-converter-section-row th,
body[data-theme="classic"] .unit-converter-reset:hover,
body[data-theme="classic"] .unit-converter-reset:focus-visible {
  background: #eef4fa;
}

@media (max-width: 980px) {
  .unit-converter-category.is-paired {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 575.98px) {
  .unit-converter-tool {
    margin-top: 18px;
  }

  .unit-converter-heading {
    align-items: flex-start;
    gap: 12px;
  }

  .unit-converter-heading .tool-meta {
    display: none;
  }

  .unit-converter-tab {
    flex-basis: 112px;
    min-height: 44px;
    padding: 8px 10px;
  }

  .unit-converter-category {
    gap: 14px;
  }

  .unit-converter-group-header {
    min-height: 58px;
    padding: 10px 12px;
  }

  .unit-converter-label-column {
    width: 48%;
  }

  .unit-converter-table th,
  .unit-converter-table td {
    padding: 8px 10px;
  }

  .unit-converter-unit-row th {
    font-size: .82rem;
  }

  .unit-converter-input {
    font-size: .86rem;
    height: 38px;
    padding-left: 7px;
    padding-right: 7px;
  }
}

/* Admin multi-tab workspace. */
html.admin-workspace-shell-root {
  height: 100%;
  overflow: hidden;
  scroll-padding-top: 0;
}

.admin-workspace-shell-body {
  height: 100dvh;
  overflow: hidden;
}

.admin-workspace-shell {
  height: 100dvh;
  min-height: 0;
}

.admin-workspace-shell-main {
  grid-template-rows: auto minmax(0, 1fr);
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.admin-workspace-tabs {
  align-items: stretch;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  min-height: 38px;
  min-width: 0;
  position: relative;
  z-index: 15;
}

.admin-workspace-tabs > .admin-sidebar-trigger {
  align-self: center;
  flex-basis: 34px;
  height: 34px;
  margin: 1px 4px;
}

.admin-workspace-tab-scroll {
  align-items: stretch;
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.admin-workspace-tab-scroll::-webkit-scrollbar {
  display: none;
}

.admin-workspace-tab-list {
  align-items: flex-end;
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
  min-width: 0;
  padding: 4px 0 0 5px;
}

.admin-workspace-tab {
  align-items: stretch;
  background: var(--admin-primary-soft);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%);
  display: flex;
  flex: 0 1 auto;
  height: 33px;
  max-width: 176px;
  min-width: 104px;
  position: relative;
}

.admin-workspace-tab:hover {
  box-shadow: inset 0 0 0 1px var(--admin-primary);
}

.admin-workspace-tab.is-active {
  background: var(--admin-primary);
}

.admin-workspace-tab-select,
.admin-workspace-tab-close,
.admin-workspace-tab-add {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--admin-muted);
  display: inline-flex;
  font: inherit;
  justify-content: center;
  padding: 0;
}

.admin-workspace-tab-select {
  color: var(--admin-text);
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 400;
  justify-content: flex-start;
  letter-spacing: 0;
  min-width: 0;
  padding: 0 4px 0 12px;
  text-align: left;
}

.admin-workspace-tab-select span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-workspace-tab.is-active .admin-workspace-tab-select {
  color: #fff;
  font-weight: 500;
}

.admin-workspace-tab.is-dirty .admin-workspace-tab-select::before {
  background: #c47a19;
  border-radius: 50%;
  content: "";
  flex: 0 0 6px;
  height: 6px;
  margin-right: 7px;
  width: 6px;
}

.admin-workspace-tab-close {
  flex: 0 0 25px;
  margin-right: 9px;
  opacity: .62;
  width: 25px;
}

.admin-workspace-tab-close:hover,
.admin-workspace-tab-close:focus-visible {
  background: var(--admin-danger-soft);
  color: var(--admin-danger);
  opacity: 1;
}

.admin-workspace-tab-close:disabled {
  cursor: default;
  opacity: .38;
  pointer-events: none;
}

.admin-workspace-tab.is-active .admin-workspace-tab-close {
  color: rgba(255, 255, 255, .86);
}

.admin-workspace-tab.is-active .admin-workspace-tab-close:hover,
.admin-workspace-tab.is-active .admin-workspace-tab-close:focus-visible {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.admin-workspace-tab-close svg,
.admin-workspace-tab-add svg {
  display: block;
  height: 15px;
  width: 15px;
}

.admin-workspace-tab-add {
  align-self: flex-end;
  background: var(--admin-primary-soft);
  border: 0;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  color: var(--admin-primary);
  flex: 0 0 36px;
  height: 33px;
  margin-left: 2px;
  padding-right: 6px;
  width: 36px;
}

.admin-workspace-tab-add:hover,
.admin-workspace-tab-add:focus-visible {
  background: var(--admin-primary);
  color: #fff;
}

.admin-workspace-restart-form {
  align-self: stretch;
  display: flex;
  flex: 0 0 40px;
  margin: 0;
  order: 2;
  width: 40px;
}

.public-rich-content video {
  display: block;
  height: auto;
  margin: 26px auto;
  max-width: 100%;
}

.public-rich-content a[data-w-e-type="attachment"] {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.admin-workspace-restart,
.admin-workspace-home {
  align-items: center;
  align-self: stretch;
  border-left: 1px solid var(--admin-border);
  color: var(--admin-primary);
  display: inline-flex;
  flex: 0 0 40px;
  justify-content: center;
  text-decoration: none;
  width: 40px;
}

.admin-workspace-home {
  order: 1;
}

.admin-workspace-restart {
  background: transparent;
  border-bottom: 0;
  border-right: 0;
  border-top: 0;
  padding: 0;
}

.admin-workspace-restart:hover,
.admin-workspace-restart:focus-visible,
.admin-workspace-home:hover,
.admin-workspace-home:focus-visible {
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
  text-decoration: none;
}

.admin-workspace-restart:disabled {
  color: var(--admin-subtle);
  cursor: not-allowed;
  opacity: .55;
}

.admin-workspace-restart:disabled:hover {
  background: transparent;
}

.admin-workspace-restart svg,
.admin-workspace-home svg {
  display: block;
  height: 17px;
  width: 17px;
}

.admin-workspace-restart-spinner {
  border-width: 2px;
  display: none;
  height: 16px;
  width: 16px;
}

.admin-workspace-restart-form.is-restarting [data-admin-restart-icon] {
  display: none;
}

.admin-workspace-restart-form.is-restarting .admin-workspace-restart-spinner {
  display: inline-block;
}

.admin-website-restart-overlay {
  align-items: center;
  animation: admin-website-restart-overlay-in .18s ease-out;
  background: rgba(20, 29, 31, .58);
  cursor: wait;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1120;
}

.admin-website-restart-overlay[hidden] {
  display: none;
}

.admin-website-restart-status {
  align-items: center;
  animation: admin-website-restart-status-in .24s ease-out;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(18, 27, 29, .28);
  color: var(--admin-text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  padding: 28px 30px 26px;
  text-align: center;
  width: 360px;
}

.admin-website-restart-visual {
  align-items: center;
  color: var(--admin-primary);
  display: flex;
  height: 68px;
  justify-content: center;
  margin-bottom: 2px;
  position: relative;
  width: 68px;
}

.admin-website-restart-visual::before {
  animation: admin-website-restart-pulse 1.5s ease-out infinite;
  border: 1px solid color-mix(in srgb, var(--admin-primary) 36%, transparent);
  border-radius: 50%;
  content: "";
  inset: 0;
  position: absolute;
}

.admin-website-restart-icon {
  animation: admin-website-restart-spin 1.1s linear infinite;
  height: 31px;
  position: relative;
  width: 31px;
}

.admin-website-restart-status strong {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.3;
}

.admin-website-restart-message {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.6;
  min-height: 21px;
  overflow-wrap: anywhere;
}

.admin-website-restart-progress {
  background: #dfe8e6;
  border-radius: 2px;
  display: block;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  position: relative;
  width: min(230px, 100%);
}

.admin-website-restart-progress::after {
  animation: admin-website-restart-progress 1.35s ease-in-out infinite;
  background: var(--admin-primary);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transform: translateX(-160%);
  width: 38%;
}

body.is-website-restarting {
  cursor: wait;
}

@keyframes admin-website-restart-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes admin-website-restart-status-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes admin-website-restart-spin {
  to { transform: rotate(360deg); }
}

@keyframes admin-website-restart-pulse {
  0% {
    opacity: .75;
    transform: scale(.78);
  }
  75%,
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

@keyframes admin-website-restart-progress {
  from { transform: translateX(-160%); }
  to { transform: translateX(420%); }
}

@media (max-width: 575.98px) {
  .admin-website-restart-overlay {
    padding: 16px;
  }

  .admin-website-restart-status {
    padding: 24px 20px 22px;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-website-restart-overlay,
  .admin-website-restart-status,
  .admin-website-restart-icon,
  .admin-website-restart-visual::before,
  .admin-website-restart-progress::after {
    animation: none;
  }

  .admin-website-restart-progress::after {
    transform: translateX(0);
    width: 100%;
  }
}

.admin-workspace-profile {
  align-items: center;
  border-left: 1px solid var(--admin-border);
  display: flex;
  flex: 0 0 auto;
  order: 3;
  padding: 0 6px;
}

.admin-workspace-profile .admin-profile-trigger {
  border-radius: 5px;
  gap: 6px;
  padding: 2px 5px 2px 3px;
}

.admin-workspace-profile .admin-profile-avatar {
  border-width: 1px;
  flex-basis: 26px;
  font-size: .75rem;
  height: 26px;
  width: 26px;
}

.admin-workspace-profile .admin-profile-trigger-copy {
  max-width: 100px;
}

.admin-workspace-profile .admin-profile-trigger-copy strong {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.admin-workspace-profile .admin-profile-trigger-copy small {
  display: none;
}

.admin-workspace-panes {
  background: var(--admin-bg);
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.admin-workspace-pane {
  height: 100%;
  inset: 0;
  min-height: 0;
  min-width: 0;
  position: absolute;
  width: 100%;
}

.admin-workspace-pane[hidden] {
  display: none;
}

.admin-workspace-frame {
  background: var(--admin-bg);
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.admin-workspace-loading {
  align-items: center;
  background: rgba(244, 246, 248, .86);
  color: var(--admin-primary);
  display: none;
  inset: 0;
  justify-content: center;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.admin-workspace-pane.is-loading .admin-workspace-loading {
  display: flex;
}

.admin-workspace-empty {
  align-items: center;
  color: var(--admin-subtle);
  display: flex;
  flex-direction: column;
  font-size: .86rem;
  gap: 10px;
  height: 100%;
  justify-content: center;
}

.admin-workspace-empty svg {
  height: 30px;
  opacity: .58;
  width: 30px;
}

.admin-workspace-frame-body {
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

.admin-workspace-frame-content {
  display: block;
  min-height: 100dvh;
  padding: 0;
  width: 100%;
}

.admin-scroll-top {
  align-items: center;
  background: var(--admin-primary);
  border: 1px solid transparent;
  border-radius: 6px;
  bottom: 20px;
  box-shadow: 0 8px 20px rgba(24, 33, 31, .18);
  color: #fff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  right: 20px;
  transform: translateY(8px);
  transition: background-color .18s ease, box-shadow .18s ease, opacity .18s ease, transform .18s ease, visibility .18s ease;
  visibility: hidden;
  width: 42px;
  z-index: 1030;
}

.admin-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.admin-scroll-top:hover,
.admin-scroll-top:focus-visible {
  background: var(--admin-primary-hover);
  box-shadow: 0 10px 24px rgba(24, 33, 31, .24);
  color: #fff;
}

.admin-scroll-top:focus-visible {
  border-color: rgba(255, 255, 255, .86);
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

.admin-scroll-top svg {
  height: 18px;
  width: 18px;
}

@media (max-width: 575.98px) {
  .admin-scroll-top {
    bottom: 14px;
    height: 40px;
    right: 14px;
    width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-scroll-top {
    transition: none;
  }
}

.order-analysis-workspace-frame-content .admin-content-inner {
  box-sizing: border-box;
  min-height: 100dvh;
  width: 100%;
}

.order-analysis-workspace-frame-content .order-data-content {
  min-width: 0;
  width: 100%;
}

.order-analysis-workspace-frame-content .order-data-page-intro {
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 22px;
  padding-bottom: 14px;
}

.order-analysis-workspace-frame-content .order-data-page-intro p {
  color: var(--admin-muted);
  margin: 0;
}

.order-analysis-workspace-sidebar .admin-menu-group.is-direct .admin-menu-items {
  padding: 0;
}

body[data-theme="classic"] .admin-workspace-tabs {
  background: rgba(255, 255, 255, .96);
}

@media (max-width: 900px) {
  .admin-workspace-shell,
  .admin-workspace-shell-main {
    height: 100dvh;
  }

  .admin-workspace-tab {
    max-width: 164px;
    min-width: 100px;
  }

  .admin-workspace-tab-add {
    flex-basis: 36px;
    width: 36px;
  }
}

@media (max-width: 575.98px) {
  .order-management-commandbar,
  .report-list-commandbar {
    align-items: stretch;
    flex-direction: column;
  }

  .order-management-command-actions {
    justify-content: flex-end;
  }

  .order-management-tabs a {
    flex: 1 1 0;
    text-align: center;
  }

  .order-import-modal .order-options-grid,
  .report-generate-grid {
    grid-template-columns: 1fr;
  }

  .report-create-button {
    width: 100%;
  }

  .admin-workspace-profile .admin-profile-trigger-copy {
    display: none;
  }

  .admin-workspace-profile {
    padding-left: 5px;
    padding-right: 5px;
  }

  .admin-workspace-tab {
    max-width: 150px;
    min-width: 96px;
  }

  .admin-workspace-frame-content .admin-content-inner {
    padding: 20px 14px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-workspace-tab,
  .admin-workspace-tab-scroll {
    scroll-behavior: auto;
  }
}

.amazon-menu-editor-header {
  align-items: center;
  display: flex;
  justify-content: flex-end;
}

.amazon-menu-editor-actions,
.amazon-menu-editor-footer {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.amazon-menu-editor-form {
  display: grid;
  gap: 18px;
}

.amazon-menu-editor-groups {
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  overflow: hidden;
}

.amazon-menu-editor-group {
  background: var(--admin-surface);
  border-bottom: 1px solid var(--admin-border);
  min-width: 0;
}

.amazon-menu-editor-group:last-child {
  border-bottom: 0;
}

.amazon-menu-editor-group.is-dragging,
.amazon-menu-editor-item.is-dragging {
  opacity: .5;
}

.amazon-menu-editor-group-header {
  align-items: center;
  background: var(--admin-primary-soft);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-height: 54px;
  padding: 9px 12px;
}

.amazon-menu-editor-group.is-terminal .amazon-menu-editor-group-header {
  background: color-mix(in srgb, var(--admin-surface) 88%, #edf5ef);
}

.amazon-menu-editor-group-title,
.amazon-menu-editor-item {
  align-items: center;
  display: flex;
  min-width: 0;
}

.amazon-menu-editor-group-title {
  gap: 10px;
}

.amazon-menu-editor-group-title h2 {
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}

.amazon-menu-editor-group-icon,
.amazon-menu-editor-item-icon,
.amazon-menu-editor-open-mode {
  align-items: center;
  display: inline-flex;
  flex: 0 0 18px;
  justify-content: center;
}

.amazon-menu-editor-group-icon svg,
.amazon-menu-editor-item-icon svg,
.amazon-menu-editor-open-mode svg,
.amazon-menu-editor-drag-handle svg,
.amazon-menu-editor-icon-button svg {
  height: 17px;
  width: 17px;
}

.amazon-menu-editor-items {
  display: grid;
  padding: 3px 12px 8px 50px;
}

.amazon-menu-editor-item {
  border-bottom: 1px solid color-mix(in srgb, var(--admin-border) 72%, transparent);
  gap: 10px;
  min-height: 46px;
  padding: 6px 0;
}

.amazon-menu-editor-item:last-child {
  border-bottom: 0;
}

.amazon-menu-editor-item.is-disabled {
  color: var(--admin-muted);
}

.amazon-menu-editor-item-title {
  flex: 1 1 auto;
  font-size: .88rem;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.amazon-menu-editor-drag-handle,
.amazon-menu-editor-icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--admin-muted);
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  padding: 0;
}

button.amazon-menu-editor-drag-handle {
  cursor: grab;
}

button.amazon-menu-editor-drag-handle:active {
  cursor: grabbing;
}

.amazon-menu-editor-drag-handle.is-locked {
  opacity: .72;
}

.amazon-menu-editor-drag-handle:hover,
.amazon-menu-editor-drag-handle:focus-visible,
.amazon-menu-editor-icon-button:hover,
.amazon-menu-editor-icon-button:focus-visible {
  background: var(--admin-surface);
  border-color: var(--admin-border);
  color: var(--admin-text);
}

.amazon-menu-editor-icon-button:disabled {
  opacity: .3;
}

.amazon-menu-editor-move-actions {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
}

.amazon-menu-editor-badge {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 999px;
  color: var(--admin-muted);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  padding: 5px 7px;
}

.amazon-menu-editor-badge.is-disabled {
  background: #fff4f1;
  border-color: #efc7bb;
  color: #a8442f;
}

.amazon-menu-editor-open-mode {
  color: var(--admin-muted);
}

@media (max-width: 575.98px) {
  .amazon-menu-editor-items {
    padding-left: 12px;
  }

  .amazon-menu-editor-group-header {
    gap: 8px;
  }

  .amazon-menu-editor-badge {
    display: none;
  }
}

/* Amazon search-term analysis */
.search-term-result-shell,
.search-term-upload-form {
  display: grid;
  gap: 16px;
}

.search-term-result-shell {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.search-term-result-shell.is-updating {
  cursor: progress;
}

.search-term-update-status {
  align-items: center;
  background: #fff;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15, 31, 46, .14);
  color: var(--admin-text);
  display: flex;
  font-size: .82rem;
  font-weight: 600;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 9px 12px;
  position: fixed;
  right: 22px;
  top: 18px;
  z-index: 1080;
}

.search-term-update-status[hidden] {
  display: none;
}

.search-term-result-shell > * {
  max-width: 100%;
  min-width: 0;
}

.search-term-commandbar,
.search-term-commandbar-meta,
.search-term-row-actions,
.search-term-pagination,
.search-term-selected-scope,
.search-term-ai-section > header,
.settings-command-row {
  align-items: center;
  display: flex;
}

.search-term-commandbar {
  gap: 12px;
  min-height: 40px;
}

.search-term-commandbar-meta {
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.search-term-commandbar-meta strong,
.search-term-commandbar-meta span,
.search-term-file-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-term-commandbar-meta span {
  color: var(--admin-muted);
  font-size: .78rem;
}

.search-term-commandbar .btn svg,
.search-term-upload-action .btn svg,
.search-term-filter-actions .btn svg,
.search-term-ai-section .btn svg,
.search-term-selected-scope a svg {
  height: 16px;
  margin-right: 5px;
  vertical-align: -3px;
  width: 16px;
}

.search-term-overview {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  overflow-x: auto;
}

.search-term-overview > div {
  border-right: 1px solid var(--admin-border);
  display: grid;
  gap: 3px;
  min-width: 92px;
  padding: 11px 12px;
}

.search-term-overview > div:last-child {
  border-right: 0;
}

.search-term-overview span {
  color: var(--admin-muted);
  font-size: .72rem;
}

.search-term-overview strong {
  color: var(--admin-text);
  font-size: .96rem;
  font-variant-numeric: tabular-nums;
}

.search-term-upload-grid,
.search-term-filter-grid {
  display: grid;
  gap: 12px;
}

.search-term-upload-grid {
  align-items: end;
  grid-template-columns: minmax(260px, 2fr) minmax(180px, 1.2fr) minmax(130px, .7fr) minmax(130px, .7fr) auto;
}

.search-term-filter-grid {
  align-items: end;
  grid-template-columns: repeat(7, minmax(112px, 1fr));
}

.search-term-file-picker {
  align-items: center;
  background: var(--admin-surface);
  border: 1px dashed var(--admin-border-strong, #aeb7c2);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  height: 38px;
  min-width: 0;
  padding: 4px 5px 4px 10px;
}

.search-term-file-picker > span:first-of-type {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-term-file-picker svg {
  color: #217346;
  flex: 0 0 17px;
  height: 17px;
  width: 17px;
}

.search-term-file-picker .btn {
  align-items: center;
  display: inline-flex;
  height: 28px;
  padding: 0 10px;
}

.search-term-ai-mode {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  font-size: .8rem;
  gap: 7px;
}

.search-term-ai-mode svg {
  color: #8a5b16;
  height: 16px;
  width: 16px;
}

.search-term-row-actions {
  gap: 7px;
  justify-content: flex-end;
}

.search-term-row-actions form {
  margin: 0;
}

.search-term-filter-panel {
  padding: 14px;
}

.search-term-tip-label,
.search-term-check-tip {
  align-items: center;
  cursor: help;
  display: inline-flex;
  gap: 4px;
  width: fit-content;
}

.search-term-tip-label {
  text-decoration: underline dotted color-mix(in srgb, currentColor 48%, transparent);
  text-underline-offset: 3px;
}

.search-term-tip-label:focus-visible,
.search-term-check-tip:focus-visible {
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, var(--admin-primary) 62%, transparent);
  outline-offset: 3px;
}

.search-term-tip-icon {
  color: var(--admin-muted);
  flex: 0 0 14px;
  height: 14px;
  width: 14px;
}

.search-term-tip-label:hover .search-term-tip-icon,
.search-term-tip-label:focus .search-term-tip-icon,
.search-term-check-tip:hover .search-term-tip-icon,
.search-term-check-tip:focus .search-term-tip-icon {
  color: var(--admin-primary);
}

.search-term-filter-checks {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 38px;
}

.search-term-filter-checks .form-check {
  align-items: center;
  display: flex;
  font-size: .78rem;
  gap: 7px;
  margin: 0;
}

.search-term-filter-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.search-term-keyword-table,
.search-term-record-table {
  min-width: 1320px;
}

.search-term-customer-table-wrap table {
  min-width: 1180px;
}

.search-term-sort-link,
.search-term-sort-button {
  align-items: center;
  color: inherit;
  display: inline-flex;
  font: inherit;
  gap: 5px;
  justify-content: flex-start;
  letter-spacing: 0;
  min-height: 28px;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
}

.search-term-sort-link {
  margin: -5px -7px;
  padding: 5px 7px;
}

.search-term-sort-button {
  background: transparent;
  border: 0;
  padding: 0;
  width: 100%;
}

.search-term-sort-link svg,
.search-term-sort-button svg {
  flex: 0 0 14px;
  height: 14px;
  opacity: .58;
  width: 14px;
}

.search-term-sort-link:hover,
.search-term-sort-link:focus-visible,
.search-term-sort-link.is-active,
.search-term-sort-button:hover,
.search-term-sort-button:focus-visible,
th[aria-sort="ascending"] .search-term-sort-button,
th[aria-sort="descending"] .search-term-sort-button {
  color: var(--admin-primary);
}

.search-term-sort-link.is-active svg,
th[aria-sort="ascending"] .search-term-sort-button svg,
th[aria-sort="descending"] .search-term-sort-button svg {
  opacity: 1;
}

.search-term-record-scroll.is-fixed {
  height: clamp(380px, 58vh, 620px);
  overscroll-behavior: contain;
  overflow: auto;
}

.search-term-record-scroll.is-fixed .search-term-record-table {
  margin-bottom: 0;
}

.search-term-record-scroll.is-fixed thead th {
  background: var(--admin-surface-alt, #f6f7f8);
  position: sticky;
  top: 0;
  z-index: 2;
}

.search-term-keyword-table tr.is-selected td {
  background: color-mix(in srgb, var(--admin-primary-soft) 68%, var(--admin-surface));
}

.search-term-cell-copy {
  min-width: 178px;
  padding-right: 34px !important;
  position: relative;
}

.search-term-cell-copy strong,
.search-term-cell-copy small {
  display: block;
  overflow-wrap: anywhere;
}

.search-term-cell-copy small {
  color: var(--admin-muted);
  font-size: .72rem;
  margin-top: 2px;
}

.search-term-copy-button {
  align-items: center;
  background: var(--admin-surface-alt, #f6f7f8);
  border: 1px solid var(--admin-border);
  border-radius: 5px;
  color: var(--admin-muted);
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  opacity: .82;
  padding: 0;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
  width: 28px;
}

.search-term-copy-button:hover {
  background: var(--admin-primary-soft);
  border-color: var(--admin-primary);
  color: var(--admin-primary);
  opacity: 1;
}

.search-term-copy-button:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
  opacity: 1;
}

.search-term-copy-button.is-copied {
  background: #e8f5ed;
  border-color: #9acdaf;
  color: #217346;
  opacity: 1;
}

.search-term-copy-button svg {
  height: 15px;
  width: 15px;
}

.search-term-suggestion {
  border-radius: 999px;
  display: inline-flex;
  font-size: .72rem;
  font-weight: 650;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.search-term-suggestion-值得搞 {
  background: #e8f5ed;
  color: #17633a;
}

.search-term-suggestion-低效优化 {
  background: #fff3d7;
  color: #815813;
}

.search-term-suggestion-建议屏蔽 {
  background: #fdebe8;
  color: #a1392b;
}

.search-term-suggestion-观察 {
  background: #eef1f4;
  color: #536170;
}

.search-term-pagination {
  gap: 12px;
  justify-content: flex-end;
  padding: 12px 14px;
}

.search-term-pagination span {
  color: var(--admin-muted);
  font-size: .8rem;
}

.search-term-pagination-advanced {
  flex-wrap: wrap;
}

.search-term-pagination-advanced form,
.search-term-pagination-advanced label {
  align-items: center;
  display: flex;
}

.search-term-pagination-advanced form {
  flex-wrap: wrap;
  gap: 8px 12px;
  justify-content: flex-end;
}

.search-term-pagination-advanced label {
  color: var(--admin-muted);
  font-size: .8rem;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

.search-term-pagination-advanced select {
  min-width: 82px;
  width: auto;
}

.search-term-pagination-advanced input {
  text-align: center;
  width: 68px;
}

.search-term-analysis-panel {
  overflow: hidden;
}

.search-term-analysis-panel:focus {
  outline: none;
}

.search-term-analysis-panel:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 3px;
}

.search-term-tabs {
  background: var(--admin-surface-alt, #f6f7f8);
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  gap: 8px;
  min-height: 58px;
  overflow-x: auto;
  padding: 10px 14px;
}

.search-term-tabs a {
  align-items: center;
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
  color: var(--admin-text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .84rem;
  gap: 7px;
  min-height: 38px;
  padding: 7px 13px;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease, transform .15s ease;
}

.search-term-tabs a:hover {
  background: var(--admin-primary-soft);
  border-color: var(--admin-primary);
  color: var(--admin-primary);
  transform: translateY(-1px);
}

.search-term-tabs a:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: 2px;
}

.search-term-tabs a.is-active {
  background: var(--admin-primary);
  border-color: var(--admin-primary);
  box-shadow: 0 2px 6px rgba(15, 74, 145, .22);
  color: #fff;
  font-weight: 650;
}

.search-term-tabs a.is-active:hover {
  color: #fff;
}

.search-term-tabs a svg {
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
}

.search-term-selected-scope {
  background: color-mix(in srgb, var(--admin-primary-soft) 56%, var(--admin-surface));
  border-bottom: 1px solid var(--admin-border);
  gap: 12px;
  justify-content: space-between;
  padding: 10px 16px;
}

.search-term-selected-scope a {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: .8rem;
  text-decoration: none;
}

.search-term-rule-report,
.search-term-ai-section {
  padding: 20px;
}

.search-report-header {
  border-bottom: 1px solid var(--admin-border);
  margin-bottom: 20px;
  padding-bottom: 14px;
}

.search-report-header h2,
.search-term-ai-section h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0;
}

.search-report-header p,
.search-term-ai-section header p {
  color: var(--admin-muted);
  font-size: .8rem;
  margin: 5px 0 0;
}

.search-report-section {
  border-bottom: 1px solid var(--admin-border);
  padding: 18px 0;
}

.search-report-section:last-child {
  border-bottom: 0;
}

.search-report-section h3 {
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
}

.search-report-section > p,
.search-report-section header p {
  color: var(--admin-muted);
  font-size: .78rem;
  margin: 0 0 12px;
}

.search-report-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.search-report-metric {
  border-bottom: 1px solid var(--admin-border);
  border-right: 1px solid var(--admin-border);
  display: grid;
  gap: 4px;
  padding: 10px 12px;
}

.search-report-metric span {
  color: var(--admin-muted);
  font-size: .72rem;
}

.search-report-metric strong {
  font-size: .92rem;
}

.search-report-table-wrap {
  overflow-x: auto;
}

.search-report table {
  border-collapse: collapse;
  font-size: .78rem;
  min-width: 720px;
  width: 100%;
}

.search-report th,
.search-report td {
  border-bottom: 1px solid var(--admin-border);
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
}

.search-report th {
  background: var(--admin-surface-alt, #f6f7f8);
  color: var(--admin-muted);
  font-weight: 650;
}

.search-report ul,
.search-report ol {
  margin-bottom: 0;
  padding-left: 22px;
}

.search-term-ai-section {
  border-top: 1px solid var(--admin-border);
}

.search-term-ai-section > header {
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.search-term-ai-secondary {
  background: color-mix(in srgb, var(--admin-surface) 96%, #edf5ef);
}

.search-term-ai-empty {
  border: 1px dashed var(--admin-border);
  color: var(--admin-muted);
  font-size: .82rem;
  padding: 18px;
  text-align: center;
}

.search-term-ai-status {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .74rem;
  gap: 6px 12px;
  margin-bottom: 14px;
}

.search-term-ai-status > span:first-child {
  border-radius: 999px;
  font-weight: 650;
  padding: 5px 8px;
}

.search-term-ai-status-Completed {
  background: #e8f5ed;
  color: #17633a;
}

.search-term-ai-status-Pending,
.search-term-ai-status-Processing {
  background: #e9f1fb;
  color: #245a91;
}

.search-term-ai-status-Failed,
.search-term-ai-status-SkippedLimit {
  background: #fdebe8;
  color: #a1392b;
}

.search-term-ai-markdown {
  color: var(--admin-text);
  font-size: .85rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.search-term-ai-markdown h1,
.search-term-ai-markdown h2,
.search-term-ai-markdown h3 {
  font-size: .98rem;
  letter-spacing: 0;
  margin: 1.2em 0 .5em;
}

.search-term-ai-markdown pre {
  max-width: 100%;
  overflow-x: auto;
}

.settings-section-title {
  border-bottom: 1px solid var(--admin-border);
  font-size: .96rem;
  letter-spacing: 0;
  margin: 8px 0 16px;
  padding-bottom: 9px;
}

.settings-command-row {
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 1200px) {
  .search-term-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-term-file-field {
    grid-column: 1 / -1;
  }

  .search-term-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .search-report-metrics {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 767.98px) {
  .search-term-commandbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .search-term-commandbar-meta {
    flex: 1 1 calc(100% - 130px);
  }

  .search-term-commandbar .dropdown {
    margin-left: 0 !important;
  }

  .search-term-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-term-ai-section > header,
  .search-term-selected-scope {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-term-pagination-advanced {
    align-items: stretch;
  }

  .search-term-pagination-advanced form {
    flex: 1 1 100%;
    justify-content: flex-start;
    order: 3;
  }
}

@media (max-width: 575.98px) {
  .search-term-upload-grid,
  .search-term-filter-grid,
  .search-report-metrics {
    grid-template-columns: 1fr;
  }

  .search-term-upload-action .btn,
  .search-term-filter-actions .btn,
  .search-term-filter-actions a,
  .search-term-ai-section form,
  .search-term-ai-section form .btn {
    width: 100%;
  }

  .search-term-filter-actions {
    flex-direction: column;
  }

  .search-term-rule-report,
  .search-term-ai-section {
    padding: 16px 12px;
  }

  .search-term-tabs {
    gap: 6px;
    padding: 8px;
  }

  .search-term-tabs a {
    font-size: .8rem;
    padding: 7px 10px;
  }

  .search-term-pagination-advanced > a {
    flex: 1 1 0;
  }

  .search-term-pagination-advanced form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .search-term-pagination-advanced form > span,
  .search-term-pagination-advanced form > button {
    grid-column: 1 / -1;
  }

  .search-term-pagination-advanced form > button {
    width: 100%;
  }
}

/* Phone message administration */
.phone-message-page {
  display: grid;
  gap: 12px;
}

.phone-message-page > .admin-panel,
.phone-message-page > .alert,
.phone-message-page > .admin-pagination {
  margin: 0;
  min-width: 0;
}

.phone-message-page .table-responsive {
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.phone-message-page-header {
  margin-bottom: 0;
  padding-bottom: 10px;
}

.phone-message-page-header p {
  font-size: .88rem;
}

.phone-message-filter-panel,
.phone-message-list-panel,
.phone-message-statistics-panel,
.phone-message-configuration-panel {
  padding: 14px 16px;
}

.phone-message-filter {
  background: transparent;
  border: 0;
  border-radius: 0;
  gap: 10px 12px;
  grid-template-columns: minmax(260px, 1.6fr) minmax(140px, .75fr) minmax(120px, .65fr) repeat(2, minmax(150px, .8fr)) auto;
  margin: 0;
  padding: 0;
  width: 100%;
}

.phone-message-filter .form-label {
  font-size: .78rem;
  margin-bottom: 4px;
}

.phone-message-list-panel .admin-panel-title-row,
.phone-message-configuration-status,
.phone-message-custom-range,
.phone-message-row-actions,
.phone-message-statistics-toolbar,
.phone-message-range-tabs,
.phone-message-statistics-title,
.phone-message-statistics-summary,
.phone-message-statistics-controls,
.phone-message-provider-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-message-list-panel .admin-panel-title-row,
.phone-message-configuration-heading,
.phone-message-statistics-heading {
  justify-content: space-between;
}

.phone-message-list-panel .admin-panel-title-row,
.phone-message-configuration-heading,
.phone-message-statistics-heading {
  align-items: center;
  margin: 0 0 10px;
  padding-bottom: 10px;
}

.phone-message-table {
  font-size: .85rem;
  min-width: 960px;
}

.phone-message-table th,
.phone-message-table td {
  padding: .55rem .65rem;
}

.phone-message-check {
  width: 42px;
  text-align: center;
}

.phone-message-nowrap {
  white-space: nowrap;
}

.phone-message-template-cell {
  min-width: 220px;
  max-width: 420px;
}

.phone-message-template-cell strong,
.phone-message-template-cell code {
  display: block;
}

.phone-message-template-cell code {
  margin-top: 4px;
  overflow: hidden;
  color: var(--admin-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-message-row-actions {
  white-space: nowrap;
}

.phone-message-row-actions .btn {
  width: 32px;
  height: 32px;
  justify-content: center;
  padding: 0;
}

.phone-message-pagination {
  margin-top: 14px;
}

.phone-message-detail-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 1fr);
  gap: 24px;
}

.phone-message-detail-header {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.phone-message-detail-heading {
  min-width: 0;
}

.phone-message-detail-heading h1 {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.phone-message-detail-heading p {
  margin: 5px 0 0;
}

.phone-message-detail-id {
  color: var(--admin-primary);
  font-size: .86em;
  font-variant-numeric: tabular-nums;
}

.phone-message-detail-back {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  justify-content: center;
}

.phone-message-detail-back svg {
  height: 16px;
  width: 16px;
}

.phone-message-detail-grid dl {
  margin: 0;
}

.phone-message-detail-grid dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--admin-border);
}

.phone-message-detail-grid dt {
  color: var(--admin-muted);
}

.phone-message-detail-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.phone-message-json {
  max-height: 300px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  background: var(--admin-surface-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.phone-message-statistics-toolbar {
  flex-wrap: wrap;
  min-height: 52px;
  padding: 9px 14px;
}

.phone-message-statistics-toolbar-label {
  flex: 0 0 auto;
  font-size: .84rem;
  font-weight: 700;
}

.phone-message-range-tabs {
  border: 1px solid var(--admin-border);
  border-radius: 6px;
  gap: 0;
  overflow: hidden;
}

.phone-message-range-tabs a {
  background: var(--admin-surface);
  border-right: 1px solid var(--admin-border);
  color: var(--admin-muted);
  font-size: .82rem;
  line-height: 1;
  padding: 8px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.phone-message-range-tabs a:last-child {
  border-right: 0;
}

.phone-message-range-tabs a:hover,
.phone-message-range-tabs a.is-active {
  background: var(--admin-primary-soft);
  color: var(--admin-primary);
}

.phone-message-custom-range-dropdown .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  min-height: 32px;
}

.phone-message-custom-range-dropdown .btn svg {
  height: 15px;
  width: 15px;
}

.phone-message-date-filter-menu {
  border-color: var(--admin-border);
  min-width: 320px;
  padding: 12px;
}

.phone-message-custom-range {
  align-items: stretch;
  flex-direction: column;
  gap: 10px;
}

.phone-message-custom-range .form-row {
  margin: 0;
  width: 100%;
}

.phone-message-custom-range .form-label {
  font-size: .78rem;
  margin-bottom: 4px;
}

.phone-message-custom-range .form-control {
  width: 100%;
}

.phone-message-custom-range .btn {
  justify-content: center;
  width: 100%;
}

.phone-message-statistics-range {
  align-items: center;
  color: var(--admin-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .82rem;
  gap: 4px;
  margin-left: auto;
}

.phone-message-statistics-range strong {
  color: var(--admin-text);
  font-weight: 600;
}

.phone-message-statistics-title {
  flex-wrap: wrap;
  min-width: 0;
}

.phone-message-statistics-summary {
  flex-wrap: wrap;
  gap: 6px;
}

.phone-message-statistics-summary span {
  background: var(--admin-surface-soft);
  border: 1px solid var(--admin-border);
  border-radius: 4px;
  color: var(--admin-muted);
  font-size: .76rem;
  padding: 4px 8px;
  white-space: nowrap;
}

.phone-message-statistics-summary strong {
  color: var(--admin-text);
  margin-left: 3px;
}

.phone-message-group-toggle {
  flex: 0 0 auto;
}

.phone-message-statistics-controls {
  flex: 0 0 auto;
}

.phone-message-provider-filter .form-select {
  min-width: 136px;
}

.phone-message-statistics-panel .admin-table {
  min-width: 640px;
}

.phone-message-configuration-form {
  display: grid;
  gap: 12px;
}

.phone-message-configuration-form > .alert,
.phone-message-provider-details,
.phone-message-configuration-actions {
  margin: 0;
}

.phone-message-configuration-heading {
  flex-wrap: wrap;
}

.phone-message-configuration-heading h2 {
  margin: 0;
}

.phone-message-configuration-status {
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--admin-muted);
  font-size: .82rem;
}

.phone-message-current-provider {
  color: var(--admin-muted);
  font-size: inherit;
}

.phone-message-configuration-basics {
  display: grid;
  gap: 0;
}

.phone-message-compact-row {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(190px, 220px) minmax(0, 1fr);
  margin: 0;
  min-width: 0;
  padding: 8px 0;
}

.phone-message-compact-row > .form-label {
  align-items: center;
  margin: 0;
}

.phone-message-field-control {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.phone-message-field-control .text-danger {
  font-size: .78rem;
}

.phone-message-number-control {
  max-width: 220px;
}

.phone-message-toggle-control {
  align-items: center;
  display: flex;
  gap: 10px;
}

.phone-message-toggle-control .form-check {
  margin: 0;
}

.phone-message-provider-details .phone-message-compact-row:last-child {
  border-bottom: 0;
}

.phone-message-tip-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  cursor: help;
  text-decoration: none;
}

.phone-message-tip-label:focus-visible {
  border-radius: 3px;
  outline: 2px solid color-mix(in srgb, var(--admin-primary) 62%, transparent);
  outline-offset: 3px;
}

.phone-message-tip-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  color: var(--admin-muted);
}

.phone-message-tip-label:hover .phone-message-tip-icon,
.phone-message-tip-label:focus .phone-message-tip-icon {
  color: var(--admin-primary);
}

.phone-message-help-tooltip {
  --bs-tooltip-max-width: min(360px, calc(100vw - 24px));
}

.phone-message-help-tooltip .tooltip-inner {
  line-height: 1.55;
  max-width: min(360px, calc(100vw - 24px));
  overflow-wrap: anywhere;
  padding: 10px 12px;
  text-align: left;
  white-space: normal;
}

.phone-message-provider-details {
  overflow: hidden;
  border: 1px solid var(--admin-border);
  border-radius: 6px;
}

.phone-message-provider-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--admin-surface-soft);
  color: var(--admin-text);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  user-select: none;
}

.phone-message-provider-details > summary::-webkit-details-marker {
  display: none;
}

.phone-message-provider-details > summary:focus-visible {
  outline: 2px solid var(--admin-primary);
  outline-offset: -2px;
}

.phone-message-details-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.phone-message-details-chevron {
  width: 17px;
  height: 17px;
  transition: transform .16s ease;
}

.phone-message-provider-details[open] .phone-message-details-chevron {
  transform: rotate(90deg);
}

.phone-message-provider-summary {
  color: var(--admin-muted);
  font-size: .84rem;
  font-weight: 400;
}

.phone-message-provider-body {
  display: grid;
  gap: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--admin-border);
}

.phone-message-setup-modal .modal-dialog {
  max-width: 860px;
  width: min(860px, calc(100vw - 24px));
}

.phone-message-setup-modal-title {
  align-items: center;
  display: flex;
  gap: 8px;
}

.phone-message-setup-modal-title > svg {
  color: var(--admin-primary);
  flex: 0 0 20px;
  height: 20px;
  width: 20px;
}

.phone-message-setup-modal .modal-body {
  padding: 20px 22px;
}

.phone-message-setup-intro {
  color: var(--admin-muted);
  font-size: .88rem;
  margin: 0;
}

.phone-message-setup-steps {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  margin: 14px 0;
  padding: 0;
}

.phone-message-setup-steps li {
  align-items: flex-start;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr);
  min-width: 0;
}

.phone-message-setup-step-number {
  align-items: center;
  background: var(--admin-primary);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 700;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.phone-message-setup-steps strong,
.phone-message-setup-steps li div > span {
  display: block;
}

.phone-message-setup-steps strong {
  font-size: .84rem;
  margin-bottom: 2px;
}

.phone-message-setup-steps li div > span {
  color: var(--admin-muted);
  font-size: .8rem;
  line-height: 1.5;
}

.phone-message-setup-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phone-message-setup-guide-actions .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.phone-message-setup-guide-actions svg {
  height: 14px;
  width: 14px;
}

.phone-message-setup-security-note {
  align-items: flex-start;
  background: var(--admin-surface-soft);
  border-left: 3px solid var(--admin-warning);
  color: var(--admin-muted);
  display: flex;
  font-size: .8rem;
  gap: 7px;
  margin: 16px 0 0;
  padding: 10px 12px;
}

.phone-message-setup-security-note svg {
  color: var(--admin-warning);
  flex: 0 0 16px;
  height: 16px;
  margin-top: 1px;
  width: 16px;
}

.phone-message-setup-security-note strong {
  color: var(--admin-text);
}

.phone-message-provider-selector {
  margin-bottom: 0;
}

.phone-message-provider-choice {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.phone-message-provider-guide-trigger {
  display: inline-flex;
}

.phone-message-provider-guide-trigger[hidden] {
  display: none;
}

.phone-message-provider-guide-trigger .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
}

.phone-message-provider-guide-trigger svg {
  height: 14px;
  width: 14px;
}

.phone-message-provider-choice select {
  max-width: 320px;
}

.phone-message-provider-choice .text-danger {
  flex-basis: 100%;
}

.phone-message-provider-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.phone-message-provider-fields[hidden] {
  display: none;
}

.phone-message-provider-endpoint {
  grid-column: auto;
}

.phone-message-configuration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phone-message-configuration-actions .btn,
.phone-message-test-modal .modal-footer .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.phone-message-configuration-actions svg,
.phone-message-test-modal .modal-footer svg {
  width: 16px;
  height: 16px;
}

.phone-message-test-modal .modal-dialog {
  width: min(580px, calc(100vw - 24px));
}

.phone-message-test-notice {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 3px solid var(--admin-warning);
  background: var(--admin-surface-soft);
  color: var(--admin-muted);
  font-size: .88rem;
}

.phone-message-test-modal textarea {
  min-height: 150px;
  resize: vertical;
}

@media (max-width: 1280px) {
  .phone-message-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .phone-message-filter-search,
  .phone-message-filter .admin-filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  .phone-message-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-message-filter-search,
  .phone-message-filter .admin-filter-actions {
    grid-column: 1 / -1;
  }

  .phone-message-detail-grid {
    grid-template-columns: 1fr;
  }

  .phone-message-statistics-toolbar {
    align-items: flex-start;
  }

  .phone-message-statistics-range {
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .phone-message-detail-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .phone-message-setup-steps {
    grid-template-columns: 1fr;
  }

  .phone-message-setup-modal .modal-body {
    padding: 16px;
  }

  .phone-message-setup-guide-actions {
    align-items: stretch;
  }

  .phone-message-setup-guide-actions .btn {
    flex: 1 1 100%;
  }

  .phone-message-compact-row {
    align-items: stretch;
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .phone-message-compact-row > .form-label {
    justify-self: start;
  }

  .phone-message-number-control {
    max-width: none;
  }

  .phone-message-configuration-status,
  .phone-message-configuration-heading,
  .phone-message-statistics-heading,
  .phone-message-list-panel .admin-panel-title-row,
  .phone-message-statistics-title {
    align-items: stretch;
    flex-direction: column;
  }

  .phone-message-configuration-status {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .phone-message-statistics-title {
    gap: 8px;
  }

  .phone-message-statistics-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .phone-message-statistics-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .phone-message-range-tabs {
    max-width: 100%;
    overflow-x: auto;
  }

  .phone-message-statistics-range {
    margin-left: 0;
  }

  .phone-message-date-filter-menu {
    max-width: calc(100vw - 36px);
    min-width: 0;
    width: 320px;
  }

  .phone-message-provider-body {
    padding: 6px 10px 8px;
  }

  .phone-message-provider-summary {
    display: none;
  }

  .phone-message-configuration-actions .btn {
    flex: 1 1 160px;
  }
}

/* Unified admin controls and dense workspace surfaces. */
body.admin-body,
body.admin-login-body {
  --admin-control-height: 38px;
  --admin-control-height-sm: 32px;
  --admin-control-radius: 6px;
  --admin-control-bg: #fffdf8;
  --admin-row-hover: rgba(15, 118, 110, .045);
  --admin-focus-ring: rgba(15, 118, 110, .18);
  font-size: 14px;
  line-height: 1.5;
}

body.admin-body[data-theme="classic"],
body.admin-login-body[data-theme="classic"] {
  --admin-control-bg: #fff;
  --admin-row-hover: rgba(37, 99, 166, .05);
  --admin-focus-ring: rgba(37, 99, 166, .18);
}

body.admin-body h1,
body.admin-body h2,
body.admin-body h3,
body.admin-login-body h1,
body.admin-login-body h2,
body.admin-login-body h3 {
  font-weight: 700;
  letter-spacing: 0;
}

body.admin-body .admin-brand-mark,
body.admin-body .admin-brand-title,
body.admin-login-body .admin-brand-mark,
body.admin-login-body .admin-brand-title,
body.admin-body .operation-toast-icon,
body.admin-body .operation-toast-title,
body.admin-body .operation-confirm-heading .modal-title,
body.admin-body .operation-confirm-icon,
body.admin-login-body .operation-toast-icon,
body.admin-login-body .operation-toast-title,
body.admin-login-body .operation-confirm-heading .modal-title,
body.admin-login-body .operation-confirm-icon {
  font-weight: 700;
}

body.admin-body .admin-brand-subtitle,
body.admin-body .operation-toast-message,
body.admin-login-body .admin-brand-subtitle,
body.admin-login-body .operation-toast-message {
  font-weight: 400;
}

body.admin-body .admin-page-header p,
body.admin-body .form-text,
body.admin-login-body .form-text {
  font-size: 13px;
}

body.admin-body .form-label,
body.admin-login-body .form-label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 5px;
}

body.admin-body .form-control,
body.admin-body .form-select,
body.admin-body .input-group-text,
body.admin-login-body .form-control,
body.admin-login-body .form-select,
body.admin-login-body .input-group-text {
  min-height: var(--admin-control-height);
  border-color: var(--admin-border-strong);
  border-radius: var(--admin-control-radius);
  background-color: var(--admin-control-bg);
  font-size: 14px;
  line-height: 1.4;
}

body.admin-body .form-control-sm,
body.admin-body .form-select-sm,
body.admin-login-body .form-control-sm,
body.admin-login-body .form-select-sm {
  min-height: var(--admin-control-height-sm);
  font-size: 13px;
}

body.admin-body .form-control:focus,
body.admin-body .form-select:focus,
body.admin-body .form-check-input:focus,
body.admin-login-body .form-control:focus,
body.admin-login-body .form-select:focus,
body.admin-login-body .form-check-input:focus {
  border-color: var(--admin-primary);
  box-shadow: 0 0 0 3px var(--admin-focus-ring);
}

body.admin-body input[type="checkbox"],
body.admin-login-body input[type="checkbox"] {
  vertical-align: middle;
}

body.admin-body .btn,
body.admin-login-body .btn {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  justify-content: center;
  min-height: var(--admin-control-height);
  border-radius: var(--admin-control-radius);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  padding: 7px 12px;
}

body.admin-body .btn-sm,
body.admin-login-body .btn-sm {
  min-height: var(--admin-control-height-sm);
  font-size: 13px;
  padding: 5px 9px;
}

body.admin-body .btn svg,
body.admin-login-body .btn svg {
  display: block;
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

body.admin-body .btn:focus-visible,
body.admin-login-body .btn:focus-visible,
body.admin-body .admin-icon-button:focus-visible,
body.admin-login-body .admin-icon-button:focus-visible {
  box-shadow: 0 0 0 3px var(--admin-focus-ring);
  outline: 0;
}

body.admin-body .btn:disabled,
body.admin-body .btn.disabled,
body.admin-login-body .btn:disabled,
body.admin-login-body .btn.disabled {
  box-shadow: none;
  opacity: .52;
}

body.admin-body .btn-outline-danger,
body.admin-login-body .btn-outline-danger {
  border-color: var(--admin-danger);
  color: var(--admin-danger);
}

body.admin-body .btn-outline-danger:hover,
body.admin-body .btn-outline-danger:focus,
body.admin-login-body .btn-outline-danger:hover,
body.admin-login-body .btn-outline-danger:focus {
  background: var(--admin-danger);
  border-color: var(--admin-danger);
  color: #fff;
}

body.admin-body .admin-icon-button,
body.admin-login-body .admin-icon-button {
  flex: 0 0 var(--admin-control-height-sm);
  height: var(--admin-control-height-sm);
  min-height: var(--admin-control-height-sm);
  min-width: var(--admin-control-height-sm);
  padding: 0;
  width: var(--admin-control-height-sm);
}

body.admin-body .admin-icon-button svg,
body.admin-login-body .admin-icon-button svg {
  display: block;
  flex: 0 0 16px;
  height: 16px;
  margin: 0;
  width: 16px;
}

body.admin-body .admin-panel,
body.admin-body .settings-form,
body.admin-body .amazon-admin-header {
  border-color: var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(24, 33, 31, .035);
}

body.admin-body .admin-panel {
  padding: 18px;
}

body.admin-body .admin-panel-title-row {
  align-items: center;
  border-bottom: 1px solid var(--admin-border);
  gap: 12px;
  margin: 0 0 14px;
  padding: 0 0 12px;
}

body.admin-body .admin-panel-title-row h2,
body.admin-body .admin-panel h2 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0;
}

body.admin-body .admin-panel-actions,
body.admin-body .admin-filter-actions,
body.admin-body .admin-action-group {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.admin-body .admin-panel-actions {
  justify-content: flex-end;
}

body.admin-body .admin-filter-form {
  align-items: end;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  justify-content: stretch;
  margin: 0;
  padding: 0;
  width: 100%;
}

body.admin-body .admin-filter-form > .form-row {
  margin-bottom: 0;
  min-width: 0;
}

body.admin-body .admin-filter-actions {
  align-self: end;
  min-height: var(--admin-control-height);
}

body.admin-body .admin-filter-actions .btn {
  min-height: var(--admin-control-height);
}

body.admin-body .table-responsive,
body.admin-body .system-database-table-scroll,
body.admin-body .translation-table-scroll {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 7px;
  box-shadow: none;
  max-width: 100%;
  overflow: auto;
}

body.admin-body .admin-table,
body.admin-body .order-table,
body.admin-body .system-database-table {
  color: var(--admin-text);
  font-size: 14px;
  margin-bottom: 0;
}

body.admin-body .admin-table th,
body.admin-body .order-table th,
body.admin-body .system-database-table th,
body.admin-body .translation-table-scroll .admin-table thead th {
  background: var(--admin-surface-soft);
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  padding: 10px 12px;
  vertical-align: middle;
}

body.admin-body .admin-table td,
body.admin-body .order-table td,
body.admin-body .system-database-table td {
  border-color: var(--admin-border);
  padding: 10px 12px;
  vertical-align: middle;
}

body.admin-body .admin-table tbody tr:hover > *,
body.admin-body .order-table tbody tr:hover > *,
body.admin-body .system-database-table tbody tr:hover > * {
  --bs-table-accent-bg: var(--admin-row-hover);
}

body.admin-body .admin-table-action-cell {
  display: table-cell;
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

body.admin-body .admin-action-group {
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: max-content;
}

body.admin-body .usage-records-table .usage-record-ip-column {
  max-width: 184px;
  min-width: 184px;
  width: 184px;
}

body.admin-body .usage-records-table .usage-record-ip-value {
  display: block;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.admin-body .admin-action-group > form,
body.admin-body .admin-action-group > .d-inline {
  display: inline-flex !important;
  margin: 0;
}

body.admin-body .admin-action-group .btn {
  margin-top: 0;
}

body.admin-body .cost-profit-marketplace-form,
body.admin-body .cost-profit-meta,
body.admin-body .cost-profit-marketplace-list,
body.admin-body .cost-profit-marketplace-section,
body.admin-body .cost-profit-table-wrap {
  min-width: 0;
}

body.admin-body .admin-pagination {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--admin-border);
  border-radius: 0;
  box-shadow: none;
  gap: 10px 14px;
  margin-top: 14px;
  padding: 12px 0 0;
}

body.admin-body .admin-pagination-summary,
body.admin-body .admin-pagination-page-form .form-label,
body.admin-body .admin-pagination-size-form .form-label,
body.admin-body .admin-pagination-page-suffix {
  color: var(--admin-muted);
  font-size: 13px;
  font-weight: 400;
}

body.admin-body .admin-pagination-controls,
body.admin-body .admin-pagination-page-form,
body.admin-body .admin-pagination-size-form {
  gap: 6px;
}

body.admin-body .admin-pagination-controls .btn {
  min-width: var(--admin-control-height-sm);
}

body.admin-body .admin-menu-group-toggle,
body.admin-body .admin-menu-link {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

body.admin-body .admin-menu-group-label svg,
body.admin-body .admin-menu-item-icon,
body.admin-body .admin-sidebar-trigger svg,
body.admin-body .admin-sidebar-close svg,
body.admin-body .admin-workspace-tab-close svg,
body.admin-body .admin-workspace-tab-add svg {
  display: block;
  flex: 0 0 16px;
  height: 16px;
  width: 16px;
}

body.admin-body .modal-content,
body.admin-login-body .modal-content {
  border-color: var(--admin-border);
  border-radius: 8px;
}

body.admin-body .modal-footer,
body.admin-login-body .modal-footer {
  gap: 8px;
}

body.admin-body .modal-footer .btn + .btn,
body.admin-login-body .modal-footer .btn + .btn {
  margin-left: 0;
}

@media (max-width: 760px) {
  body.admin-body .admin-content-inner {
    padding: 16px 12px 24px;
  }

  body.admin-body .admin-panel {
    padding: 14px;
  }

  body.admin-body .admin-panel-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  body.admin-body .admin-panel-actions,
  body.admin-body .admin-filter-actions {
    justify-content: flex-start;
    width: 100%;
  }

  body.admin-body .admin-filter-form {
    grid-template-columns: minmax(0, 1fr);
  }

  body.admin-body .admin-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  body.admin-body .admin-pagination-controls,
  body.admin-body .admin-pagination-page-form,
  body.admin-body .admin-pagination-size-form {
    max-width: 100%;
  }
}

body.admin-body .phone-message-filter {
  grid-template-columns: minmax(260px, 1.6fr) minmax(140px, .75fr) minmax(120px, .65fr) repeat(3, minmax(150px, .8fr)) auto;
}

body.admin-body .phone-message-filter .admin-filter-actions {
  justify-content: flex-end;
  white-space: nowrap;
}

body.admin-body .phone-message-row-actions {
  display: table-cell;
  min-width: 86px;
}

body.admin-body .phone-message-row-action-group {
  gap: 6px;
}

@media (max-width: 1280px) {
  body.admin-body .phone-message-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.admin-body .phone-message-filter-search,
  body.admin-body .phone-message-filter .admin-filter-actions {
    grid-column: span 2;
  }
}

@media (max-width: 980px) {
  body.admin-body .phone-message-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.admin-body .phone-message-filter-search,
  body.admin-body .phone-message-filter .admin-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  body.admin-body .phone-message-filter {
    grid-template-columns: minmax(0, 1fr);
  }

  body.admin-body .phone-message-filter-search,
  body.admin-body .phone-message-filter .admin-filter-actions {
    grid-column: auto;
  }

  body.admin-body .phone-message-filter .admin-filter-actions {
    justify-content: flex-start;
  }

  body.admin-body .phone-message-list-panel .admin-panel-actions .btn {
    flex: 1 1 160px;
  }
}

@media (max-width: 760px) {
  body.admin-body .upload-files-table-wrap {
    overflow: visible;
  }

  body.admin-body .upload-files-table {
    min-width: 0;
    width: 100%;
  }

  body.admin-body .upload-files-table thead {
    display: none;
  }

  body.admin-body .upload-files-table tbody {
    display: block;
    width: 100%;
  }

  body.admin-body .upload-files-table tbody tr {
    align-items: center;
    display: grid;
    gap: 6px 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
    width: 100%;
  }

  body.admin-body .upload-files-table tbody tr + tr {
    border-top: 1px solid var(--admin-border);
  }

  body.admin-body .upload-files-table td {
    border: 0;
    display: block;
    padding: 0;
  }

  body.admin-body .upload-files-table .upload-file-name-cell {
    grid-column: 1 / -1;
    min-width: 0;
  }

  body.admin-body .upload-files-table .upload-file-type-column {
    display: none;
  }

  body.admin-body .upload-files-table .upload-file-size-column,
  body.admin-body .upload-files-table .upload-file-time-column {
    color: var(--admin-muted);
    font-size: 12px;
    min-width: 0;
    white-space: normal;
  }

  body.admin-body .upload-files-table .upload-file-size-column {
    grid-column: 1;
    grid-row: 2;
  }

  body.admin-body .upload-files-table .upload-file-size-column::before {
    content: "大小 ";
  }

  body.admin-body .upload-files-table .upload-file-size-column.is-directory {
    display: none;
  }

  body.admin-body .upload-files-table .upload-file-time-column {
    grid-column: 1;
    grid-row: 3;
  }

  body.admin-body .upload-files-table .upload-file-time-column::before {
    content: "修改 ";
  }

  body.admin-body .upload-files-table .upload-file-size-column.is-directory + .upload-file-time-column {
    grid-row: 2;
  }

  body.admin-body .upload-files-table .upload-file-actions-cell {
    align-self: center;
    grid-column: 2;
    grid-row: 2 / span 2;
    justify-self: end;
    min-width: 0;
    width: auto;
  }

  body.admin-body .upload-files-table .upload-file-actions-cell .admin-action-group {
    gap: 6px;
    min-width: max-content;
  }

  body.admin-body .upload-files-table .upload-file-empty-cell {
    grid-column: 1 / -1;
    padding: 28px 12px !important;
  }
}
