/* Dense operations UI rebuilt from the observed reference layout. */
.admin-brand-logo {
  width: 30px;
  height: 30px;
  display: block !important;
  flex: 0 0 30px;
  border: 0;
  border-radius: 4px;
  object-fit: contain;
}
.admin-sidebar { height: 100vh; position: sticky; top: 0; overflow: hidden; }
.admin-sidebar nav { height: calc(100vh - 112px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4b4b4b #252525; }
.admin-main { width: 100%; min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 12; border-bottom: 1px solid #eceef1; }
.sidebar-toggle { width: 28px; height: 28px; border: 0; border-radius: 0; display: grid; color: #777; font-size: 17px; }
.admin-shell { width: 100%; transition: grid-template-columns .18s ease; }
.admin-sidebar { transition: transform .18s ease; }
.sidebar-collapsed .admin-shell { grid-template-columns: 0 minmax(0, 1fr); }
.sidebar-collapsed .admin-sidebar { transform: translateX(-195px); }
.admin-content { width: 100%; min-height: calc(100vh - 51px); }

.clone-button {
  min-height: 33px;
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  color: #606266;
  background: #fff;
  white-space: nowrap;
  font-size: 13px;
}
.clone-button:hover { border-color: #9fc8f3; color: #409eff; }
.clone-button.primary { color: #fff; border-color: #409eff; background: #409eff; }
.clone-button.danger { color: #f56c6c; border-color: #fbc4c4; background: #fef0f0; }
.btn.danger { color: #fff; border-color: #f56c6c; background: #f56c6c; }
.danger-text { color: #f56c6c !important; }

.clone-list-page { min-width: 0; }
.clone-control-area { min-width: 0; }
.clone-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 16px 10px;
  margin-bottom: 18px;
}
.clone-filters input,
.clone-filters select {
  width: 100%;
  min-width: 0;
  height: 33px;
  padding: 0 12px;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  color: #606266;
  background: #fff;
}
.clone-filters input:focus,
.clone-filters select:focus { outline: 0; border-color: #409eff; }
.clone-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.clone-toolbar .clone-button:not(.primary) { color: #fff; border-color: #8bc0ef; background: #8bc0ef; }
.clone-toolbar .clone-button.active { border-color: #1f70c8; background: #1f70c8; box-shadow: inset 0 -2px 0 rgb(0 0 0 / 14%); }
.clone-toolbar .clone-button.selection-ready { border-color: #1769e0; background: #1769e0; box-shadow: 0 2px 6px rgb(23 105 224 / 24%); }
.clone-product-list .clone-control-area { display: grid; grid-template-columns: repeat(5, minmax(150px, 1fr)); gap: 16px 10px; margin-bottom: 18px; }
.clone-product-list .clone-filters,
.clone-product-list .clone-toolbar { display: contents; }
.clone-product-list .clone-filters > *,
.clone-product-list .clone-toolbar > * { width: 100%; margin: 0; }
.clone-table-scroll { width: 100%; overflow-x: auto; border: 1px solid #ebeef5; }
.clone-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: auto;
  color: #606266;
  font-size: 12px;
}
.clone-table th,
.clone-table td {
  height: 38px;
  padding: 5px 8px;
  border-right: 1px solid #ebeef5;
  border-bottom: 1px solid #ebeef5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}
.clone-table th { height: 39px; color: #3f4349; background: #eef0f4; font-size: 12px; font-weight: 700; }
.clone-table tbody tr:hover { background: #f5f7fa; }
.clone-table .badge { border-radius: 2px; }
.clone-table .badge.success { color: #fff; background: #62a8e9; }
.clone-table .badge.success::before { display: none; }
.clone-table .table-actions { min-width: 120px; justify-content: center; }
.clone-image-thumb { width: 48px; height: 30px; display: block; margin: 0 auto; border: 1px solid #e2e6ed; border-radius: 3px; object-fit: cover; background: #f5f7fa; }
.clone-category-name { display: inline-flex; align-items: center; min-height: 24px; }
.clone-category-name.is-root { font-weight: 700; }
.clone-category-name.is-child { padding-left: 18px; color: #606266; }
.clone-list-page.is-compact .clone-table th,
.clone-list-page.is-compact .clone-table td { height: 34px; padding-block: 3px; }
.clone-image-cell { padding: 3px 7px; color: #409eff; background: #ecf5ff; border-radius: 2px; }
.clone-empty { padding: 45px; color: #909399; }
.clone-pagination {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: #606266;
  font-size: 12px;
}
.clone-pagination button,
.clone-pagination select,
.clone-pagination input { height: 28px; border: 1px solid #dcdfe6; border-radius: 2px; color: #606266; background: #fff; }
.clone-pagination button { min-width: 29px; }
.clone-pagination button.active { color: #fff; border-color: #409eff; background: #409eff; }
.clone-pagination button:disabled { color: #c0c4cc; background: #f4f4f5; cursor: not-allowed; }
.clone-pagination input { width: 42px; padding: 0 5px; text-align: center; }
.clone-pagination select { padding: 0 7px; }

.clone-workbench { min-height: calc(100vh - 107px); color: #eef0f4; }
.clone-workbench-dark { min-height: calc(100vh - 119px); margin-top: 15px; padding: 20px 16px 38px; background: #30363d; }
.clone-periods { max-width: 100%; display: flex; overflow-x: auto; scrollbar-width: thin; }
.clone-periods button { min-width: 66px; height: 34px; flex: 0 0 auto; border: 1px solid #dcdfe6; color: #606266; background: #fff; }
.clone-periods button + button { border-left: 0; }
.clone-periods button.active { color: #fff; border-color: #409eff; background: #409eff; }
.clone-analytics-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.clone-analytics-head > div > span { color: #78b9f8; font-size: 12px; font-weight: 700; }
.clone-analytics-head h2 { margin: 2px 0; color: #f5f7fa; font-size: 20px; }
.clone-analytics-head p { margin: 0; color: #aeb7c1; font-size: 12px; }
.clone-analytics-head > strong { flex: 0 0 auto; color: #78b9f8; font-size: 22px; }
.clone-analytics-summary { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; margin-bottom: 14px; }
.clone-analytics-summary article { min-width: 0; min-height: 104px; padding: 15px; display: grid; align-content: center; gap: 4px; border: 1px solid rgba(255, 255, 255, .08); border-left: 4px solid #4f9ee8; border-radius: 4px; background: #3a414a; }
.clone-analytics-summary article.profit { border-left-color: #39b884; }
.clone-analytics-summary article.recharge { border-left-color: #dfad3d; }
.clone-analytics-summary article.refund { border-left-color: #df715f; }
.clone-analytics-summary article.orders { border-left-color: #3bb0ba; }
.clone-analytics-summary article.members { border-left-color: #ee9748; }
.clone-analytics-summary article.products { border-left-color: #7c92d0; }
.clone-analytics-summary article.stations { border-left-color: #9a7ac0; }
.clone-analytics-summary span { color: #bac3cc; font-size: 12px; }
.clone-analytics-summary strong { min-width: 0; overflow: hidden; color: #fff; font-size: 23px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.clone-analytics-summary small { color: #8f9aa5; }
.clone-analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.clone-analytics-panel { min-width: 0; min-height: 315px; padding: 17px; border: 1px solid #4b545f; background: #394049; }
.clone-trend-panel { grid-column: 1 / -1; min-height: 344px; }
.clone-analytics-panel-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.clone-analytics-panel-head h3 { margin: 0 0 2px; color: #f5f7f9; font-size: 15px; }
.clone-analytics-panel-head p { margin: 0; color: #9faab5; font-size: 12px; }
.clone-analytics-panel-head > span { flex: 0 0 auto; color: #78b9f8; font-size: 16px; font-weight: 700; }
.clone-trend-svg { width: 100%; height: 270px; display: block; overflow: visible; }
.clone-chart-grid { stroke: #505a65; stroke-width: 1; }
.clone-chart-axis { fill: #9eaab5; font-size: 11px; }
.clone-chart-area { fill: rgba(64, 158, 255, .13); }
.clone-chart-line { fill: none; stroke: #65b1f3; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.clone-chart-dot { fill: #f5faff; stroke: #409eff; stroke-width: 3; }
.clone-chart-bar { fill: rgba(59, 184, 136, .44); }
.clone-status-body { min-height: 220px; display: grid; grid-template-columns: minmax(150px, .8fr) minmax(180px, 1.2fr); align-items: center; gap: 20px; }
.clone-status-donut { width: min(188px, 100%); aspect-ratio: 1; margin: auto; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 8px 20px rgba(0, 0, 0, .17); }
.clone-status-donut > div { width: 58%; aspect-ratio: 1; display: grid; place-items: center; align-content: center; border-radius: 50%; background: #394049; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.clone-status-donut strong { color: #fff; font-size: 28px; line-height: 1; }
.clone-status-donut span { color: #9eaab5; font-size: 12px; }
.clone-status-legend { min-width: 0; display: grid; gap: 8px; }
.clone-status-legend > div { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.clone-status-legend i { width: 9px; height: 9px; border-radius: 2px; }
.clone-status-legend span { min-width: 0; overflow: hidden; color: #c5cdd5; text-overflow: ellipsis; white-space: nowrap; }
.clone-status-legend b { color: #fff; font-size: 12px; }
.clone-analytics-muted { color: #9eaab5 !important; }
.clone-analytics-ranking { margin: 0; padding: 0; list-style: none; display: grid; gap: 13px; }
.clone-analytics-ranking li { min-width: 0; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; gap: 10px; }
.clone-analytics-ranking li > b { width: 27px; height: 27px; display: grid; place-items: center; color: #c2cbd4; border: 1px solid #5d6773; border-radius: 4px; font-size: 11px; }
.clone-analytics-ranking li > b.top-1 { color: #fff3bf; border-color: #ae892d; background: #735e22; }
.clone-analytics-ranking li > b.top-2 { color: #edf1f4; border-color: #7c8792; background: #59636c; }
.clone-analytics-ranking li > b.top-3 { color: #ffe0c5; border-color: #9f6b43; background: #70492e; }
.clone-analytics-ranking li > div { min-width: 0; display: grid; gap: 6px; }
.clone-analytics-ranking li > div > span { min-width: 0; display: flex; justify-content: space-between; gap: 12px; }
.clone-analytics-ranking em { min-width: 0; overflow: hidden; color: #eaf0f5; font-style: normal; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.clone-analytics-ranking strong { flex: 0 0 auto; color: #bdc7d0; font-size: 12px; }
.clone-analytics-ranking i { height: 6px; overflow: hidden; border-radius: 3px; background: #48515c; }
.clone-analytics-ranking i span { height: 100%; display: block; border-radius: inherit; background: #4e9ee9; }
.clone-analytics-empty { min-height: 205px; display: grid; place-items: center; align-content: center; gap: 5px; color: #9eaab5; text-align: center; }
.clone-analytics-empty strong { color: #dce3e9; }

.clone-settings,
.clone-form-page,
.clone-product-editor,
.clone-data-clean { border: 1px solid #ebeef5; background: #fff; }
.clone-tabs { min-height: 45px; display: flex; overflow-x: auto; border-bottom: 1px solid #e4e7ed; }
.clone-tabs button { flex: 0 0 auto; min-height: 45px; padding: 0 20px; border: 0; border-bottom: 2px solid transparent; color: #606266; background: #fff; }
.clone-tabs button.active { color: #409eff; border-bottom-color: #409eff; }
.clone-settings-form,
.clone-plain-form { width: min(860px, 100%); padding: 28px 34px; display: grid; gap: 18px; }
.clone-settings-form label,
.clone-plain-form label,
.clone-product-form > .clone-form-column > label {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}
.clone-settings-form label > span,
.clone-plain-form label > span,
.clone-product-form label > span { color: #606266; text-align: right; }
.clone-settings-form input,
.clone-settings-form select,
.clone-settings-form textarea,
.clone-plain-form input,
.clone-plain-form select,
.clone-plain-form textarea,
.clone-product-form input,
.clone-product-form select,
.clone-product-form textarea,
.clone-param-table input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 11px;
  border: 1px solid #dcdfe6;
  border-radius: 3px;
  color: #606266;
  background: #fff;
}
.clone-settings-form textarea,
.clone-plain-form textarea,
.clone-product-form textarea { min-height: 92px; padding-block: 8px; resize: vertical; }
.clone-form-divider { margin-top: 8px; padding: 15px 0 8px; display: flex; align-items: baseline; gap: 12px; border-top: 1px solid #e4e7ed; }
.clone-form-divider strong { color: #303133; font-size: 15px; }
.clone-form-divider span { color: #909399; font-size: 12px; }
.home-flash-product-picker { margin: 0; padding: 14px 16px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 18px; border: 1px solid #dcdfe6; }
.home-flash-product-picker legend { padding: 0 8px; color: #606266; font-weight: 700; }
.clone-plain-form .home-flash-product-picker label { min-width: 0; display: flex; grid-template-columns: none; align-items: center; gap: 8px; }
.clone-plain-form .home-flash-product-picker input { width: 16px; height: 16px; flex: 0 0 auto; }
.clone-plain-form .home-flash-product-picker span { min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.home-flash-product-picker small { margin-left: 5px; color: #a0a6ad; }
.clone-form-actions { padding-left: 163px; display: flex; gap: 10px; }
.clone-form-actions.full { grid-column: 1 / -1; justify-content: center; padding: 20px 0 4px; border-top: 1px solid #ebeef5; }
.clone-page-shortcuts { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; }

.clone-recharge-entry {
  margin-bottom: 18px;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 26px;
  border: 1px solid #d9ecff;
  border-radius: 4px;
  background: #f5faff;
}
.clone-recharge-entry-copy > span { color: #409eff; font-size: 12px; font-weight: 700; }
.clone-recharge-entry-copy h2 { margin: 5px 0 9px; color: #303133; font-size: 20px; }
.clone-recharge-entry-copy p { max-width: 760px; margin: 0; color: #606266; line-height: 1.75; }
.clone-recharge-entry-copy code { margin-top: 12px; padding: 8px 10px; display: block; overflow-wrap: anywhere; border: 1px solid #e4e7ed; color: #4d5662; background: #fff; }
.clone-recharge-entry-actions { margin: 14px 0 10px; display: flex; flex-wrap: wrap; gap: 9px; }
.clone-recharge-entry-copy small { color: #909399; }
.clone-recharge-entry-qr { display: grid; justify-items: center; gap: 8px; }
.clone-recharge-entry-qr img { width: 172px; height: 172px; padding: 8px; border: 1px solid #dcdfe6; background: #fff; object-fit: contain; }
.clone-recharge-entry-qr span { color: #606266; font-size: 12px; }

@media (max-width: 760px) {
  .clone-recharge-entry { grid-template-columns: 1fr; }
  .clone-recharge-entry-qr { grid-row: 1; }
  .clone-recharge-entry-actions .clone-button { flex: 1 1 130px; text-align: center; }
}

.clone-fitment .clone-template-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 16px; }
.clone-template-grid article { min-width: 0; padding: 12px; border: 1px solid #e4e7ed; border-radius: 3px; }
.clone-template-grid article.active { border-color: #409eff; box-shadow: 0 0 0 1px #409eff; }
.clone-template-preview { height: 150px; display: grid; grid-template-columns: 54px 1fr; grid-template-rows: 32px 1fr; gap: 7px; padding: 8px; background: #f3f5f8; }
.clone-template-preview.layout-clean { background: #eef6ff; }
.clone-template-preview.layout-business { background: #eceff2; }
.clone-template-preview span { grid-row: 1 / -1; background: #409eff; }
.clone-template-preview i,
.clone-template-preview b { display: block; background: #fff; }
.clone-template-grid h3 { margin: 12px 0 3px; font-size: 14px; }
.clone-template-grid p { margin-bottom: 12px; color: #909399; font-size: 12px; }
.clone-template-grid article > div:last-child { display: flex; gap: 7px; }
.clone-template-grid button:disabled { cursor: default; opacity: 1; }

.clone-product-editor { padding: 0 24px 24px; }
.clone-segment { padding: 16px 0; border-bottom: 1px solid #ebeef5; }
.clone-segment button { min-width: 92px; height: 34px; border: 1px solid #dcdfe6; color: #606266; background: #fff; }
.clone-segment button + button { margin-left: -1px; }
.clone-segment button.active { position: relative; color: #fff; border-color: #409eff; background: #409eff; }
.clone-product-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 44px; }
.clone-form-column { min-width: 0; padding: 22px 0; display: grid; align-content: start; gap: 15px; }
.clone-form-column h3 { margin: 0 0 4px; padding-bottom: 10px; border-bottom: 1px solid #ebeef5; color: #303133; font-size: 14px; }
.clone-form-note { margin: -4px 0 2px; color: #909399; font-size: 12px; line-height: 1.6; }
.clone-product-form label small { grid-column: 2; color: #909399; font-size: 12px; line-height: 1.5; }
.clone-param-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.clone-param-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.clone-param-table th,
.clone-param-table td { padding: 7px; border: 1px solid #ebeef5; text-align: center; }
.clone-param-table th { background: #f5f7fa; }
.clone-param-table button { border: 0; color: #f56c6c; background: transparent; }

.clone-data-clean { padding: 26px 34px; }
.clone-choice-group { margin-bottom: 26px; }
.clone-choice-group h3 { margin-bottom: 15px; font-size: 14px; }
.clone-choice-group button { min-width: 112px; height: 36px; margin: 0 8px 8px 0; border: 1px solid #dcdfe6; color: #606266; background: #fff; }
.clone-choice-group button i { width: 12px; height: 12px; display: inline-block; margin-right: 6px; border: 1px solid #c0c4cc; border-radius: 50%; vertical-align: -1px; }
.clone-choice-group button.active { color: #409eff; border-color: #a0cfff; background: #ecf5ff; }
.clone-choice-group button.active i { border: 4px solid #409eff; }
.clone-detail-list { margin: 0; }
.clone-detail-list > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); border-bottom: 1px solid #ebeef5; }
.clone-detail-list dt,
.clone-detail-list dd { margin: 0; padding: 10px; word-break: break-all; }
.clone-detail-list dt { color: #909399; background: #f5f7fa; }
.clone-confirm p { color: #606266; }

@media (max-width: 1180px) {
  .admin-sidebar {
    position: fixed;
    left: -210px;
    top: 0;
    width: 195px;
    z-index: 40;
    transition: left .2s ease;
    box-shadow: 8px 0 24px rgba(0, 0, 0, .2);
  }
  .sidebar-open .admin-sidebar { left: 0; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar-collapsed .admin-shell { grid-template-columns: 1fr; }
  .sidebar-collapsed .admin-sidebar { transform: none; }
  .clone-filters { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .clone-product-list .clone-control-area { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
  .clone-fitment .clone-template-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .clone-product-form { grid-template-columns: 1fr; }
  .clone-analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .clone-filters { grid-template-columns: 1fr 1fr; gap: 8px; }
  .clone-product-list .clone-control-area { grid-template-columns: 1fr 1fr; gap: 8px; }
  .clone-workbench-dark { margin: 10px -12px -12px; padding: 12px; }
  .clone-analytics-head { align-items: stretch; flex-direction: column; gap: 8px; }
  .clone-analytics-head > strong { font-size: 19px; }
  .clone-analytics-summary { gap: 8px; }
  .clone-analytics-summary article { min-height: 92px; padding: 12px; }
  .clone-analytics-summary strong { font-size: 19px; }
  .clone-analytics-grid { grid-template-columns: 1fr; }
  .clone-trend-panel { grid-column: auto; }
  .clone-analytics-panel { min-height: 0; padding: 13px; }
  .clone-trend-svg { height: 225px; }
  .clone-status-body { grid-template-columns: 1fr; gap: 15px; }
  .clone-status-donut { width: 158px; }
  .clone-settings-form,
  .clone-plain-form { padding: 18px 14px; }
  .clone-settings-form label,
  .clone-plain-form label,
  .clone-product-form > .clone-form-column > label { grid-template-columns: 1fr; gap: 5px; }
  .clone-settings-form label > span,
  .clone-plain-form label > span,
  .clone-product-form label > span { text-align: left; }
  .clone-form-actions { padding-left: 0; }
  .clone-form-divider { align-items: flex-start; flex-direction: column; gap: 4px; }
  .home-flash-product-picker { grid-template-columns: 1fr; }
  .clone-plain-form .home-flash-product-picker label { display: flex; }
  .clone-fitment .clone-template-grid { grid-template-columns: 1fr; }
  .clone-pagination { justify-content: flex-start; overflow-x: auto; }
}
