/* Data-registration analytics: calm canvas with direct manipulation. */
.registration-panel {
  display: none;
}

.registration-panel.active {
  display: block;
}

.registration-analysis-panel {
  min-width: 0;
  color: #252d3a;
}

.analysis-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.analysis-page-head small {
  color: #8791a0;
  font-size: 10px;
}

.analysis-page-head h2 {
  margin: 5px 0 4px;
  color: #202735;
  font-size: 25px;
  font-weight: 720;
}

.analysis-page-head p {
  margin: 0;
  color: #8b94a2;
  font-size: 11px;
}

.analysis-dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.analysis-dashboard-actions > select {
  width: min(300px, 32vw);
  min-width: 220px;
  height: 38px;
  border: 1px solid #dfe3e9;
  border-radius: 7px;
  padding: 7px 34px 7px 11px;
  background: #fff;
  color: #3d4655;
  font-size: 11px;
}

.analysis-dashboard-actions > button {
  height: 38px;
}

.analysis-autosave-state {
  display: inline-flex;
  height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 3px;
  color: #7d8795;
  font-size: 10px;
  white-space: nowrap;
}

.analysis-autosave-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #69b58b;
  box-shadow: 0 0 0 3px rgba(105, 181, 139, .12);
}

.analysis-autosave-state.saving i {
  background: #f0a43c;
  box-shadow: 0 0 0 3px rgba(240, 164, 60, .12);
}

.analysis-autosave-state.error {
  color: #a34b51;
}

.analysis-autosave-state.error i {
  background: #d96870;
  box-shadow: 0 0 0 3px rgba(217, 104, 112, .12);
}

.analysis-dashboard-actions > .primary,
.analysis-filter-actions > .primary,
.analysis-empty button {
  border-color: #2f78f6;
  background: #2f78f6;
  color: #fff;
}

.analysis-dashboard-menu {
  position: relative;
}

.analysis-dashboard-menu > summary {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #dfe3e9;
  border-radius: 7px;
  background: #fff;
  color: #687384;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  line-height: 1;
}

.analysis-dashboard-menu > summary::-webkit-details-marker {
  display: none;
}

.analysis-dashboard-menu[open] > summary {
  border-color: #b9d0fb;
  color: #2f78f6;
  box-shadow: 0 0 0 3px rgba(47, 120, 246, .08);
}

.analysis-dashboard-menu > div {
  position: absolute;
  z-index: 40;
  top: 44px;
  right: 0;
  display: grid;
  width: 168px;
  gap: 5px;
  padding: 7px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(35, 44, 61, .14);
}

.analysis-dashboard-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  color: #4d5767;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
}

.analysis-dashboard-menu button:hover {
  background: #f4f6f9;
}

.analysis-dashboard-menu button.danger-link {
  color: #b14f58;
}

.analysis-dashboard-menu button:disabled {
  opacity: .42;
  cursor: not-allowed;
}

#analysisNotice {
  min-height: 0;
  margin: 0 0 10px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #778292;
  font-size: 10px;
}

#analysisNotice.ok {
  background: transparent;
  color: #56806a;
}

#analysisNotice.error {
  padding: 10px 12px;
  border: 1px solid #efc9c7;
  background: #fff5f4;
  color: #984b47;
}

.analysis-filter-band {
  position: sticky;
  top: 10px;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 14px;
  padding: 13px 15px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 7px 20px rgba(35, 44, 61, .05);
  backdrop-filter: blur(10px);
}

.analysis-global-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.analysis-global-filters label {
  display: grid;
  gap: 5px;
  color: #7b8594;
  font-size: 9px;
}

.analysis-global-filters select,
.analysis-global-filters input {
  width: 128px;
  height: 34px;
  border: 1px solid #dfe3e9;
  border-radius: 7px;
  padding: 6px 9px;
  background: #fff;
  color: #3d4655;
  font-size: 11px;
}

.analysis-global-filters select:focus,
.analysis-global-filters input:focus,
.analysis-dashboard-actions select:focus {
  outline: 0;
  border-color: #91b6f9;
  box-shadow: 0 0 0 3px rgba(47, 120, 246, .08);
}

.analysis-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.analysis-filter-actions > span {
  margin-right: 3px;
  color: #8b94a2;
  font-size: 10px;
  white-space: nowrap;
}

.analysis-filter-actions button {
  height: 34px;
  padding: 0 11px;
  font-size: 10px;
}

.analysis-advanced-filters {
  position: relative;
  align-self: end;
}

.analysis-advanced-filters > summary {
  display: flex;
  height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid #dfe3e9;
  border-radius: 7px;
  background: #f8f9fb;
  color: #606b7a;
  cursor: pointer;
  list-style: none;
  font-size: 10px;
}

.analysis-advanced-filters > summary::-webkit-details-marker {
  display: none;
}

.analysis-advanced-filters > summary::after {
  content: "⌄";
  color: #8b94a2;
}

.analysis-advanced-filters[open] > summary {
  border-color: #b9d0fb;
  background: #f4f8ff;
  color: #2f68c8;
}

.analysis-advanced-filters > div {
  position: absolute;
  z-index: 45;
  top: 41px;
  right: 0;
  display: grid;
  width: 455px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(35, 44, 61, .15);
}

.analysis-advanced-filters > div label,
.analysis-advanced-filters > div select,
.analysis-advanced-filters > div input {
  width: 100%;
  min-width: 0;
}

.analysis-edit-hint {
  display: none;
}

.analysis-grid {
  min-height: 300px;
  margin: 0 -8px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: #f6f7f9;
}

/* GridStack's bundled stylesheet only includes 12- and 1-column geometry.
   The analysis workspace uses six columns on medium desktops, so keep that
   breakpoint measurable instead of leaving every widget at width: auto/0. */
.gs-6 > .grid-stack-item {
  width: 16.666667%;
}

.gs-6 > .grid-stack-item[gs-x="1"] { left: 16.666667%; }
.gs-6 > .grid-stack-item[gs-x="2"] { left: 33.333333%; }
.gs-6 > .grid-stack-item[gs-x="3"] { left: 50%; }
.gs-6 > .grid-stack-item[gs-x="4"] { left: 66.666667%; }
.gs-6 > .grid-stack-item[gs-x="5"] { left: 83.333333%; }
.gs-6 > .grid-stack-item[gs-w="2"] { width: 33.333333%; }
.gs-6 > .grid-stack-item[gs-w="3"] { width: 50%; }
.gs-6 > .grid-stack-item[gs-w="4"] { width: 66.666667%; }
.gs-6 > .grid-stack-item[gs-w="5"] { width: 83.333333%; }
.gs-6 > .grid-stack-item[gs-w="6"] { width: 100%; }

.analysis-grid > .grid-stack-item > .grid-stack-item-content {
  inset: 8px;
  overflow: hidden;
  border: 1px solid #e1e4e9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(35, 44, 61, .035);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.analysis-grid.editable > .grid-stack-item > .grid-stack-item-content:hover {
  border-color: #b9d0fb;
  box-shadow: 0 10px 26px rgba(46, 83, 145, .09);
  transform: translateY(-1px);
}

.analysis-grid.editable > .grid-stack-item.ui-draggable-dragging > .grid-stack-item-content,
.analysis-grid.editable > .grid-stack-item.ui-resizable-resizing > .grid-stack-item-content {
  border-color: #6b9df5;
  box-shadow: 0 16px 34px rgba(47, 120, 246, .15);
}

.analysis-widget {
  display: grid;
  height: 100%;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.analysis-widget-head {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 11px;
  border-bottom: 0;
  background: #fff;
}

.analysis-widget-handle {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
}

.analysis-widget-handle small {
  order: 2;
  color: #9aa2ae;
  font-size: 9px;
}

.analysis-widget-handle strong {
  order: 1;
  overflow: hidden;
  color: #222a38;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-grid.editable .analysis-widget-handle {
  cursor: grab;
}

.analysis-grid.editable .analysis-widget-handle:active {
  cursor: grabbing;
}

.analysis-grid.editable .analysis-widget-handle::after {
  content: "⋮⋮";
  position: absolute;
  top: 2px;
  right: -24px;
  color: #c2c8d0;
  opacity: 0;
  font-size: 10px;
  letter-spacing: 0;
  transition: opacity .16s ease;
}

.analysis-grid.editable .analysis-widget:hover .analysis-widget-handle::after {
  opacity: 1;
}

.analysis-widget-actions {
  display: flex;
  gap: 3px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

.analysis-widget:hover .analysis-widget-actions,
.analysis-widget:focus-within .analysis-widget-actions {
  opacity: 1;
  pointer-events: auto;
}

.analysis-widget-actions button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: #f4f6f9;
  color: #687384;
  cursor: pointer;
}

.analysis-widget-actions button:hover {
  background: #eaf2ff;
  color: #2f68c8;
}

.analysis-widget-actions button.danger:hover {
  background: #fff0f1;
  color: #aa4751;
}

.analysis-grid.editable .ui-resizable-se::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #8cb2f7;
  border-bottom: 2px solid #8cb2f7;
  opacity: 0;
  transition: opacity .16s ease;
}

.analysis-grid.editable .grid-stack-item:hover .ui-resizable-se::after {
  opacity: 1;
}

.grid-stack-placeholder > .placeholder-content {
  inset: 8px;
  border: 1px dashed #72a0f3;
  border-radius: 8px;
  background: #edf4ff;
}

.analysis-chart {
  width: 100%;
  height: 100%;
  min-height: 130px;
  padding: 0 8px 8px;
}

.analysis-widget-metric .analysis-widget-head {
  min-height: 52px;
  padding: 12px 16px 7px;
}

.analysis-widget-metric .analysis-chart {
  min-height: 0;
  padding: 0 8px 10px;
}

.analysis-metric-body {
  display: grid;
  width: 100%;
  height: 100%;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 4px 14px 10px;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

.analysis-metric-body strong {
  display: block;
  color: var(--analysis-accent, #2f78f6);
  font-size: 32px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1.08;
}

.analysis-metric-body span {
  color: #4d5767;
  font-size: 11px;
  font-weight: 650;
}

.analysis-metric-body small {
  color: #9aa2ae;
  font-size: 9px;
}

.analysis-widget-table {
  height: 100%;
  padding: 0 14px 14px;
  overflow: auto;
}

.analysis-widget-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.analysis-widget-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 9px;
  border-bottom: 1px solid #e2e5ea;
  background: #fff;
  color: #7d8796;
  text-align: right;
  white-space: nowrap;
}

.analysis-widget-table th:first-child,
.analysis-widget-table td:first-child {
  text-align: left;
}

.analysis-widget-table td {
  padding: 10px 9px;
  border-bottom: 1px solid #edf0f3;
  color: #485260;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analysis-widget-table tbody tr {
  cursor: pointer;
}

.analysis-widget-table tbody tr:hover {
  background: #f7f9fc;
}

.analysis-widget-loading,
.analysis-widget-error {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 20px;
  color: #8a94a3;
  font-size: 10px;
}

.analysis-widget-error {
  color: #a34b51;
}

.analysis-empty {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed #d1d6dd;
  border-radius: 8px;
  background: #fafbfc;
  color: #8791a0;
}

.analysis-empty strong {
  color: #303846;
  font-size: 15px;
}

.analysis-empty button {
  margin-top: 7px;
  border: 0;
  border-radius: 7px;
  padding: 9px 13px;
  cursor: pointer;
}

/* Component settings open as a right-side drawer. */
.analysis-settings-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(520px, calc(100vw - 48px));
  height: 100vh;
  max-height: none;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
  box-shadow: -18px 0 48px rgba(28, 36, 50, .18);
}

.analysis-settings-drawer[open] {
  animation: analysis-drawer-in .2s ease-out;
}

.analysis-settings-drawer::backdrop {
  background: rgba(28, 35, 48, .28);
  backdrop-filter: blur(2px);
}

@keyframes analysis-drawer-in {
  from {
    transform: translateX(24px);
    opacity: .7;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.analysis-settings-drawer form {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 0;
}

.analysis-settings-drawer .detail-head {
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid #e8eaee;
}

.analysis-editor-body {
  display: grid;
  min-height: 0;
  flex: 1;
  gap: 18px;
  padding: 18px 20px 24px;
  overflow: auto;
}

.analysis-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.analysis-editor-grid label,
.analysis-save-body > label {
  display: grid;
  gap: 5px;
  color: #687384;
  font-size: 10px;
}

.analysis-editor-grid .wide {
  grid-column: 1 / -1;
}

.analysis-editor-grid input,
.analysis-editor-grid select,
.analysis-save-body input {
  width: 100%;
  height: 37px;
  border: 1px solid #dde1e7;
  border-radius: 7px;
  padding: 7px 9px;
  background: #fff;
  color: #3b4554;
}

.analysis-editor-section {
  display: grid;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #e8eaee;
}

.analysis-editor-section > div:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.analysis-editor-section > div:first-child span {
  flex: 1;
  color: #929ba8;
  font-size: 9px;
}

.analysis-config-list {
  display: grid;
  gap: 7px;
}

.analysis-config-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.15fr) minmax(95px, .8fr) minmax(130px, 1fr) 30px;
  align-items: center;
  gap: 6px;
}

.analysis-config-row select,
.analysis-config-row input {
  width: 100%;
  min-width: 0;
  height: 35px;
  border: 1px solid #dde1e7;
  border-radius: 7px;
  padding: 6px 8px;
  background: #fff;
  color: #46505f;
  font-size: 10px;
}

.analysis-config-row button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: #fff0f1;
  color: #a34b53;
  cursor: pointer;
}

.analysis-config-empty {
  padding: 11px;
  border: 1px dashed #d6dae0;
  border-radius: 7px;
  color: #929ba8;
  text-align: center;
  font-size: 10px;
}

.analysis-style-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px;
  border-radius: 7px;
  background: #f6f7f9;
}

.analysis-style-options label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5e6877;
  font-size: 10px;
}

.analysis-style-options input[type="color"] {
  width: 35px;
  height: 28px;
  border: 1px solid #d9dde3;
  border-radius: 5px;
  padding: 2px;
  background: #fff;
}

.analysis-editor-actions {
  position: static;
  flex: 0 0 auto;
  border-top: 1px solid #e8eaee;
  background: #fff;
}

.analysis-editor-actions span {
  flex: 1;
}

.analysis-save-dialog {
  width: min(520px, calc(100vw - 36px));
}

.analysis-save-body {
  display: grid;
  gap: 13px;
  padding: 20px 22px;
}

.analysis-save-body .analysis-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analysis-save-body .analysis-check input {
  width: auto;
  height: auto;
}

.analysis-save-body p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: #f5f7fa;
  color: #7f8998;
  font-size: 10px;
  line-height: 1.55;
}

.analysis-detail-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100vh - 30px);
}

.analysis-detail-body {
  padding: 16px 20px;
  overflow: auto;
}

.analysis-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 10px;
  color: #7d8796;
  font-size: 10px;
}

.analysis-detail-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
  font-size: 10px;
}

.analysis-detail-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 9px 8px;
  border-bottom: 1px solid #dde1e7;
  background: #f5f7fa;
  color: #6e7887;
  text-align: left;
  white-space: nowrap;
}

.analysis-detail-table td {
  padding: 9px 8px;
  border-bottom: 1px solid #eceef2;
  color: #46505f;
  white-space: nowrap;
}

.analysis-detail-table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analysis-detail-table a {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: #2f68c8;
  text-overflow: ellipsis;
  text-decoration: none;
}

.analysis-detail-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  border-top: 1px solid #e5e8ec;
  background: #fff;
}

.analysis-detail-pagination span {
  color: #748090;
  font-size: 10px;
}

.analysis-detail-pagination button:disabled {
  opacity: .4;
}

@media (max-width: 1100px) {
  .analysis-page-head,
  .analysis-filter-band {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-dashboard-actions,
  .analysis-filter-actions {
    justify-content: flex-start;
  }

  .analysis-dashboard-actions > select {
    width: min(360px, 100%);
  }

  .analysis-advanced-filters > div {
    right: auto;
    left: 0;
  }
}

@media (max-width: 760px) {
  .analysis-page-head {
    gap: 12px;
    margin-bottom: 12px;
  }

  .analysis-page-head h2 {
    font-size: 22px;
  }

  .analysis-page-head p {
    font-size: 11px;
    line-height: 1.6;
  }

  .analysis-dashboard-actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .analysis-dashboard-actions > select {
    width: 100%;
    min-width: 0;
    grid-column: 1 / -1;
  }

  .analysis-dashboard-menu {
    justify-self: end;
  }

  .analysis-filter-band {
    position: static;
    gap: 12px;
    padding: 12px;
  }

  .analysis-global-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-global-filters label,
  .analysis-advanced-filters,
  .analysis-global-filters select,
  .analysis-global-filters input {
    width: 100%;
    min-width: 0;
  }

  .analysis-advanced-filters > summary {
    justify-content: space-between;
  }

  .analysis-advanced-filters > div {
    right: 0;
    left: auto;
    width: min(455px, calc(100vw - 68px));
    max-height: 62vh;
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .analysis-filter-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-filter-actions > span {
    margin: 0;
    grid-column: 1 / -1;
  }

  .analysis-filter-actions button {
    width: 100%;
  }

  .analysis-grid {
    margin: 0 -4px;
    padding: 4px;
  }

  .analysis-grid > .grid-stack-item > .grid-stack-item-content,
  .grid-stack-placeholder > .placeholder-content {
    inset: 4px;
  }

  .analysis-widget-head {
    min-height: 56px;
    padding: 12px 13px 9px;
  }

  .analysis-widget-actions {
    opacity: 1;
    pointer-events: auto;
  }

  .analysis-widget-actions button {
    width: 34px;
    height: 34px;
  }

  .analysis-settings-drawer {
    inset: 0;
    width: 100%;
    max-width: none;
  }

  .analysis-settings-drawer .detail-head,
  .analysis-editor-body {
    padding-right: 16px;
    padding-left: 16px;
  }

  .analysis-editor-grid {
    grid-template-columns: 1fr;
  }

  .analysis-editor-grid .wide {
    grid-column: auto;
  }

  .analysis-editor-section > div:first-child {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .analysis-editor-section > div:first-child span {
    min-width: 100%;
    order: 3;
  }

  .analysis-config-row {
    grid-template-columns: minmax(0, 1fr) 34px;
  }

  .analysis-config-row > :nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .analysis-config-row > :nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .analysis-config-row > :nth-child(3) {
    grid-column: 1;
    grid-row: 3;
  }

  .analysis-config-row > button {
    align-self: center;
    grid-column: 2;
    grid-row: 1 / 4;
  }

  .analysis-editor-actions {
    flex-wrap: wrap;
  }

  .analysis-editor-actions span {
    display: none;
  }

  .analysis-detail-dialog {
    width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .analysis-detail-body {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .analysis-global-filters {
    grid-template-columns: 1fr;
  }

  .analysis-advanced-filters > div {
    width: 100%;
  }

  .analysis-style-options {
    display: grid;
    grid-template-columns: 1fr;
  }

  .analysis-detail-summary {
    align-items: stretch;
    flex-direction: column;
  }
}

/* 驭风商业版保留藏风社完整看板能力，同时统一为客户工作台视觉。 */
body.commercial-mode .commercial-analysis-workspace {
  color: #263b5c;
}

body.commercial-mode .commercial-analysis-workspace .analysis-page-head {
  margin-top: 2px;
  padding: 20px 22px;
  border: 1px solid #e0e7f0;
  border-radius: 12px;
  background: #fff;
}

body.commercial-mode .commercial-analysis-workspace .analysis-page-head small {
  color: #537ce1;
  font-weight: 750;
}

body.commercial-mode .commercial-analysis-workspace .analysis-page-head h2,
body.commercial-mode .commercial-analysis-workspace .analysis-widget-handle strong {
  color: #283c60;
}

body.commercial-mode .commercial-analysis-workspace .analysis-page-head p,
body.commercial-mode .commercial-analysis-workspace .analysis-widget-handle small {
  color: #8191aa;
}

body.commercial-mode .commercial-analysis-workspace .analysis-filter-band,
body.commercial-mode .commercial-analysis-workspace .analysis-grid > .grid-stack-item > .grid-stack-item-content {
  border-color: #e0e7f0;
  box-shadow: none;
}

body.commercial-mode .commercial-analysis-workspace .analysis-filter-band {
  background: rgba(255, 255, 255, .98);
}

body.commercial-mode .commercial-analysis-workspace .analysis-grid {
  background: #f3f6fc;
}

body.commercial-mode .commercial-analysis-workspace .analysis-dashboard-actions > select,
body.commercial-mode .commercial-analysis-workspace .analysis-global-filters select,
body.commercial-mode .commercial-analysis-workspace .analysis-global-filters input,
body.commercial-mode .commercial-analysis-workspace .analysis-advanced-filters > summary {
  border-color: #dce3ee;
  color: #405574;
}

body.commercial-mode .commercial-analysis-workspace .analysis-dashboard-actions > .primary,
body.commercial-mode .commercial-analysis-workspace .analysis-filter-actions > .primary,
body.commercial-mode .commercial-analysis-workspace .analysis-empty button {
  border-color: #416fde;
  background: #416fde;
}

body.commercial-mode .commercial-analysis-workspace.module-read-only .analysis-page-head {
  border-color: #ead9b6;
}

body.commercial-mode .commercial-analysis-workspace #analysisNotice.readonly {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f0d6a1;
  border-radius: 8px;
  background: #fff9eb;
  color: #805d20;
}

@media (max-width: 700px) {
  .analysis-page-head {
    gap: 16px;
  }

  .analysis-dashboard-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .analysis-dashboard-actions > select {
    width: 100%;
    min-width: 0;
    flex: 1 1 220px;
  }

  .analysis-filter-band {
    position: static;
    padding: 13px;
  }

  .analysis-global-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analysis-global-filters label,
  .analysis-global-filters select,
  .analysis-global-filters input,
  .analysis-advanced-filters {
    width: 100%;
    min-width: 0;
  }

  .analysis-advanced-filters {
    grid-column: 1 / -1;
  }

  .analysis-advanced-filters > summary {
    justify-content: space-between;
  }

  .analysis-advanced-filters > div {
    position: static;
    width: 100%;
    grid-template-columns: 1fr;
    margin-top: 8px;
    box-shadow: none;
  }

  .analysis-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .analysis-filter-actions > span {
    width: 100%;
  }

  .analysis-filter-actions button {
    flex: 1 1 120px;
  }

  .analysis-grid {
    margin: 0;
    padding: 4px;
  }

  .analysis-grid > .grid-stack-item > .grid-stack-item-content {
    inset: 5px;
  }

  .analysis-editor-grid,
  .analysis-config-row {
    grid-template-columns: 1fr;
  }

  .analysis-editor-grid .wide {
    grid-column: auto;
  }

  .analysis-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-editor-actions button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  body.commercial-mode .commercial-analysis-workspace .analysis-page-head {
    padding: 17px;
  }

  .analysis-global-filters {
    grid-template-columns: 1fr;
  }

  .analysis-advanced-filters {
    grid-column: auto;
  }

  .analysis-dashboard-actions > select,
  .analysis-autosave-state {
    flex-basis: 100%;
  }
}

/* 常用模板优先的渐进式图表编辑器。 */
.analysis-editor-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-bottom:16px}.analysis-editor-presets>button{display:flex;min-width:0;gap:9px;align-items:center;border:1px solid #dce3ee;border-radius:10px;padding:11px;background:#fff;color:#526784;text-align:left;cursor:pointer}.analysis-editor-presets>button:hover,.analysis-editor-presets>button.active{border-color:#7695e6;background:#f3f7ff;color:#315dcc}.analysis-editor-presets i{display:grid;width:30px;height:30px;flex:none;place-items:center;border-radius:8px;background:#edf3ff;color:#416fde;font-size:10px;font-style:normal;font-weight:800}.analysis-editor-presets span,.analysis-editor-presets strong,.analysis-editor-presets small{display:block;min-width:0}.analysis-editor-presets strong{font-size:11px}.analysis-editor-presets small{margin-top:3px;overflow:hidden;color:#8a97aa;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.analysis-editor-advanced{margin-top:14px;border:1px solid #e1e6ef;border-radius:11px;background:#fafbfe}.analysis-editor-advanced>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 15px;cursor:pointer;list-style:none}.analysis-editor-advanced>summary::-webkit-details-marker{display:none}.analysis-editor-advanced>summary span,.analysis-editor-advanced>summary strong,.analysis-editor-advanced>summary small{display:block}.analysis-editor-advanced>summary strong{color:#526784;font-size:11px}.analysis-editor-advanced>summary small{margin-top:3px;color:#8a97aa;font-size:9px}.analysis-editor-advanced>summary i{color:#7385a1;font-style:normal;transition:transform .18s}.analysis-editor-advanced[open]>summary i{transform:rotate(180deg)}.analysis-editor-advanced>.analysis-editor-grid,.analysis-editor-advanced>.analysis-editor-section,.analysis-editor-advanced>.analysis-style-options{margin:0 14px 14px}.analysis-editor-grid--advanced{padding-top:13px;border-top:1px solid #e4e9f1}
@media(max-width:850px){.analysis-editor-presets{grid-template-columns:1fr 1fr}}
