/* 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 { 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 { 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 { 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-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: 48px;
  padding: 8px 10px;
  border-right: 1px solid #ebeef5;
  border-bottom: 1px solid #ebeef5;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
}
.clone-table th { height: 49px; color: #3f4349; background: #eef0f4; font-size: 13px; 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-list-page.is-compact .clone-table th,
.clone-list-page.is-compact .clone-table td { height: 38px; padding-block: 4px; }
.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: 18px 14px 38px; background: #343840; }
.clone-periods { display: flex; }
.clone-periods button { min-width: 55px; height: 32px; 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-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.clone-stat-panel { min-width: 0; padding: 16px; border: 1px solid #4c515a; background: #3c414a; }
.clone-stat-panel:nth-child(5) { grid-column: 1 / -1; }
.clone-stat-panel h2,
.clone-rank-grid h2 { margin: 0 0 14px; color: #f4f5f7; font-size: 14px; font-weight: 600; }
.clone-stat-panel > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.clone-stat-panel article { min-height: 83px; padding: 14px; display: grid; align-content: space-between; border-radius: 2px; background: linear-gradient(135deg, #a89a21, #d3c444); }
.clone-stat-panel.panel-1 article { background: linear-gradient(135deg, #c65457, #eb7476); }
.clone-stat-panel.panel-2 article { background: linear-gradient(135deg, #df8d37, #edaa5a); }
.clone-stat-panel.panel-3 article { background: linear-gradient(135deg, #8a6ec4, #a88cdc); }
.clone-stat-panel.panel-4 article { background: linear-gradient(135deg, #3483dc, #57a6eb); }
.clone-stat-panel article span { opacity: .88; font-size: 12px; }
.clone-stat-panel article strong { font-size: 24px; }
.clone-stat-panel article small { margin-left: 4px; font-size: 11px; font-weight: 400; }
.clone-rank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.clone-rank-grid section { padding: 16px; border: 1px solid #4c515a; background: #3c414a; }
.clone-rank-grid section > div { height: 37px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #4d535d; }
.clone-rank-grid b { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #606873; font-size: 10px; }
.clone-rank-grid section > div:nth-of-type(-n+3) b { background: #409eff; }
.clone-rank-grid span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.clone-rank-grid strong { color: #f5bd63; font-size: 12px; }

.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-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-fitment .clone-template-grid { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 16px; }
.clone-template-grid article { min-width: 0; padding: 12px; border: 1px solid #e4e7ed; border-radius: 3px; }
.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 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-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-switch-row { display: flex; flex-wrap: wrap; gap: 16px; padding: 10px 0 2px; color: #606266; }
.clone-switch-row label { display: flex; align-items: center; gap: 5px; }
.clone-switch-row input { width: 16px; height: 16px; }
.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; }
  .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; }
}

@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-stat-grid,
  .clone-rank-grid { grid-template-columns: 1fr; }
  .clone-stat-panel:nth-child(5) { grid-column: auto; }
  .clone-stat-panel > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .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-fitment .clone-template-grid { grid-template-columns: 1fr; }
  .clone-pagination { justify-content: flex-start; overflow-x: auto; }
}
