.dashboard-mode-panel {
  --dash-navy: #082a52;
  --dash-blue: #0b67b2;
  --dash-sky: #e8f4ff;
  --dash-ink: #172536;
  --dash-muted: #607086;
  --dash-line: #d7e2ed;
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #cdddea;
  border-radius: 16px;
  background:
    linear-gradient(110deg, rgba(232, 244, 255, .94), rgba(255, 255, 255, .98) 56%),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(8, 42, 82, .025) 14px 15px);
  box-shadow: 0 9px 26px rgba(8, 42, 82, .07);
}

.dashboard-mode-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-mode-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.dashboard-mode-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(145deg, #082a52, #0b74b8);
  box-shadow: 0 7px 15px rgba(8, 42, 82, .18);
}

.dashboard-mode-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.dashboard-mode-heading strong {
  display: block;
  color: var(--dash-ink);
  font-size: 14px;
}

.dashboard-mode-heading small {
  display: block;
  margin-top: 2px;
  color: var(--dash-muted);
  font-size: 11px;
}

.dashboard-mode-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-width: min(460px, 100%);
  padding: 4px;
  border: 1px solid #bfd0df;
  border-radius: 12px;
  background: #dfeaf3;
}

.dashboard-mode-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 7px 12px;
  color: #526276;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dashboard-mode-choice strong,
.dashboard-mode-choice small {
  display: block;
}

.dashboard-mode-choice strong {
  color: inherit;
  font-size: 13px;
}

.dashboard-mode-choice small {
  margin-top: 1px;
  font-size: 10px;
  opacity: .78;
}

.dashboard-mode-choice.active {
  color: #fff;
  background: var(--dash-navy);
  box-shadow: 0 5px 12px rgba(8, 42, 82, .18);
}

.dashboard-mode-choice .dashboard-choice-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: rgba(255,255,255,.25);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-ai-focus {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.dashboard-ai-focus[hidden] {
  display: none;
}

.dashboard-focus-item {
  min-width: 0;
  padding: 11px 12px;
  color: var(--dash-ink);
  border: 1px solid #d3e0eb;
  border-radius: 11px;
  background: rgba(255,255,255,.86);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.dashboard-focus-item:hover {
  border-color: #8fb8d6;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(8, 42, 82, .09);
}

.dashboard-focus-rank {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  margin-right: 5px;
  color: #fff;
  border-radius: 7px;
  background: var(--dash-blue);
  font-size: 10px;
  font-weight: 900;
}

.dashboard-focus-item strong {
  display: inline;
  font-size: 12px;
}

.dashboard-focus-item small {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: var(--dash-muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-user-bar[hidden] {
  display: none;
}

.dashboard-user-bar p {
  margin: 0;
  color: var(--dash-muted);
  font-size: 12px;
}

.dashboard-customize-button {
  min-height: 37px;
  padding: 0 13px;
  color: #fff;
  border: 0;
  border-radius: 9px;
  background: var(--dash-blue);
  font-weight: 800;
  cursor: pointer;
}

.dashboard-customize-button.active {
  color: var(--dash-navy);
  outline: 1px solid #a9c5db;
  background: #fff;
}

.dashboard-customizer {
  padding: 13px;
  border: 1px solid #cdddea;
  border-radius: 12px;
  background: #fff;
}

.dashboard-customizer[hidden] {
  display: none;
}

.dashboard-customizer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.dashboard-customizer-head strong {
  color: var(--dash-ink);
  font-size: 13px;
}

.dashboard-customizer-head button {
  padding: 6px 9px;
  color: var(--dash-blue);
  border: 1px solid #b8cede;
  border-radius: 8px;
  background: var(--dash-sky);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.dashboard-customizer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.dashboard-panel-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px auto;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 7px 8px;
  border: 1px solid #e0e7ee;
  border-radius: 9px;
  background: #f9fbfd;
}

.dashboard-panel-visibility {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  color: var(--dash-ink);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-panel-visibility span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-panel-setting select {
  min-height: 30px;
  border: 1px solid #c7d4df;
  border-radius: 7px;
  background: #fff;
  color: var(--dash-ink);
  font-size: 11px;
}

.dashboard-move-buttons {
  display: flex;
  gap: 3px;
}

.dashboard-move-buttons button {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  color: var(--dash-navy);
  border: 1px solid #c7d4df;
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.dashboard-user-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.dashboard-user-grid[hidden] {
  display: none;
}

#page-content.dashboard-user-mode > .metrics-grid,
#page-content.dashboard-user-mode > .dashboard-grid {
  display: none !important;
}

.dashboard-user-grid > .dashboard-managed-panel {
  position: relative;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  height: 100%;
  margin: 0 !important;
}

.dashboard-user-grid > .dashboard-managed-panel.dash-size-small {
  grid-column: span 4;
}

.dashboard-user-grid > .dashboard-managed-panel.dash-size-medium {
  grid-column: span 6;
}

.dashboard-user-grid > .dashboard-managed-panel.dash-size-large {
  grid-column: span 12;
}

.dashboard-user-grid .dashboard-panel-user-hidden {
  display: none !important;
}

.dashboard-card-drag-handle {
  display: none;
  position: absolute;
  z-index: 7;
  top: 8px;
  right: 8px;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  border-radius: 8px;
  background: rgba(8, 42, 82, .9);
  box-shadow: 0 4px 10px rgba(8, 42, 82, .18);
  cursor: grab;
}

.dashboard-user-grid.customizing .dashboard-card-drag-handle {
  display: grid;
}

.dashboard-user-grid.customizing > .dashboard-managed-panel {
  outline: 2px dashed rgba(11, 103, 178, .35);
  outline-offset: -4px;
}

.dashboard-managed-panel.dashboard-dragging {
  opacity: .45;
}

.dashboard-ai-top {
  border-color: #84b9dc !important;
  box-shadow: 0 10px 24px rgba(11, 103, 178, .12) !important;
}

.dashboard-ai-top::after {
  content: "AI PRIORITY";
  position: absolute;
  top: 7px;
  right: 8px;
  padding: 3px 6px;
  color: #075985;
  border-radius: 999px;
  background: #dff2ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .06em;
}

.dashboard-managed-panel.dashboard-ai-top {
  position: relative;
}

@media (max-width: 1180px) {
  .dashboard-ai-focus { grid-template-columns: repeat(3, 1fr); }
  .dashboard-customizer-list { grid-template-columns: 1fr; }
  .dashboard-user-grid > .dashboard-managed-panel.dash-size-small,
  .dashboard-user-grid > .dashboard-managed-panel.dash-size-medium { grid-column: span 6; }
}

@media (max-width: 820px) {
  .dashboard-mode-top { align-items: stretch; flex-direction: column; }
  .dashboard-mode-selector { min-width: 0; width: 100%; }
  .dashboard-ai-focus { grid-template-columns: 1fr 1fr; }
  .dashboard-user-grid > .dashboard-managed-panel { grid-column: span 12 !important; }
}

@media (max-width: 560px) {
  .dashboard-mode-panel { padding: 13px; }
  .dashboard-mode-selector { grid-template-columns: 1fr; }
  .dashboard-ai-focus { grid-template-columns: 1fr; }
  .dashboard-user-bar { align-items: stretch; flex-direction: column; }
  .dashboard-panel-setting { grid-template-columns: minmax(0, 1fr) 86px; }
  .dashboard-move-buttons { grid-column: 1 / -1; justify-content: flex-end; }
}
