@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  src: url("/public/vendor/material-symbols/material-symbols-dashboard.ttf?v=2026072921") format("truetype");
}

.dashboard-grid {
  box-sizing: border-box;
  width: auto;
  margin: 14px 12px 28px;
}

.dashboard-grid-fallback {
  margin: 14px 12px 28px;
}

.dashboard-component-error {
  padding: 28px;
  text-align: center;
}

.dashboard-component-error strong {
  color: #30394b;
  font-size: 16px;
}

.dashboard-component-error p {
  margin: 8px 0 16px;
  color: #7a8496;
}

.dashboard-component-error button {
  min-height: 36px;
  padding: 0 18px;
  border: 0;
  background: #f06700;
  color: #fff;
  cursor: pointer;
}

.dashboard-grid > .grid-stack-item > .grid-stack-item-content.dashboard-widget {
  display: flex;
  box-sizing: border-box;
  height: auto;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid #e1e6ef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(31, 43, 66, .05);
}

.dashboard-widget-header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f5;
  background: #fff;
  cursor: move;
  user-select: none;
}

.dashboard-widget-header h2 {
  margin: 0;
  color: #283143;
  font-size: 16px;
}

.dashboard-widget-header p {
  margin: 5px 0 0;
  color: #7a8496;
  font-size: 12px;
  font-weight: 400;
}

.dashboard-widget-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.dashboard-widget-actions button,
.dashboard-widget-actions a {
  border: 0;
  background: transparent;
  color: #e85f00;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  text-decoration: none;
}

.dashboard-widget-action,
.dashboard-widget-expand {
  display: inline-grid;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  min-height: 26px !important;
  overflow: hidden;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 4px;
  color: #7b8493 !important;
  place-items: center;
}

.dashboard-chart-tool-action {
  color: #7488b8 !important;
}

.dashboard-widget-action:hover,
.dashboard-widget-action:focus-visible,
.dashboard-widget-expand:hover,
.dashboard-widget-expand:focus-visible {
  border-color: #d9dee7 !important;
  background: #f7f8fa !important;
  color: #30394b !important;
  outline: none;
}

.dashboard-widget-action.dashboard-widget-delete {
  color: #c84e45 !important;
}

.dashboard-widget-action.dashboard-widget-delete:hover,
.dashboard-widget-action.dashboard-widget-delete:focus-visible {
  border-color: #efc6c2 !important;
  background: #fff5f4 !important;
  color: #a83730 !important;
}

.dashboard-material-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.dashboard-widget-action,
.dashboard-widget-expand,
.dashboard-drag-hint {
  color: #9aa3b1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

.dashboard-drag-hint {
  display: inline-grid;
  width: 26px;
  height: 26px;
  cursor: move;
  place-items: center;
}

.dashboard-widget:hover .dashboard-widget-action,
.dashboard-widget:hover .dashboard-widget-expand,
.dashboard-widget:hover .dashboard-drag-hint,
.dashboard-widget:focus-within .dashboard-widget-action,
.dashboard-widget:focus-within .dashboard-widget-expand,
.dashboard-widget:focus-within .dashboard-drag-hint {
  opacity: .8;
  pointer-events: auto;
}

.dashboard-widget .dashboard-widget-action:hover,
.dashboard-widget .dashboard-widget-action:focus-visible,
.dashboard-widget .dashboard-widget-expand:hover,
.dashboard-widget .dashboard-widget-expand:focus-visible,
.dashboard-widget .dashboard-drag-hint:hover {
  opacity: 1;
}

.grid-stack-item.ui-draggable-dragging .dashboard-widget,
.grid-stack-item.ui-resizable-resizing .dashboard-widget {
  border-color: #ff9b59;
  box-shadow: 0 12px 30px rgba(240, 95, 0, .16);
}

.grid-stack-placeholder > .placeholder-content {
  border: 1px dashed #f06700;
  background: #fff5ed;
}

.grid-stack-item > .ui-resizable-handle {
  display: block !important;
  opacity: 0 !important;
  transition: opacity .15s ease;
}

.grid-stack-item > .ui-resizable-se {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background-color: rgba(255, 255, 255, .94);
  background-size: 22px 22px;
  box-shadow: 0 0 0 1px rgba(86, 96, 114, .12);
}

.grid-stack-item:hover > .ui-resizable-se,
.grid-stack-item:focus-within > .ui-resizable-se {
  opacity: .72 !important;
}

.grid-stack-item.ui-resizable-resizing > .ui-resizable-handle {
  opacity: .82 !important;
}

body.has-dashboard-widget-expanded {
  overflow: hidden;
}

body.has-dashboard-widget-expanded::before {
  position: fixed;
  z-index: 1390;
  inset: 0;
  background: rgba(28, 35, 48, .56);
  content: "";
}

.dashboard-widget.dashboard-widget-expanded {
  position: fixed !important;
  z-index: 1400;
  inset: 18px !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  border-radius: 10px !important;
  box-shadow: 0 24px 72px rgba(18, 25, 38, .3) !important;
}

.dashboard-sales-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px 6px;
}

.dashboard-sales-controls .dashboard-metric-switch {
  display: inline-flex;
  margin: 0 auto 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #f1a365;
  border-radius: 4px;
}

.dashboard-metric-switch legend,
.dashboard-metric-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dashboard-sales-controls .dashboard-metric-switch label {
  gap: 0;
  cursor: pointer;
}

.dashboard-metric-switch label + label {
  border-left: 1px solid #f1a365;
}

.dashboard-metric-switch label > span {
  padding: 8px 10px;
  color: #b85300;
  background: #fff;
}

.dashboard-metric-switch input:checked + span {
  color: #fff;
  background: var(--brand);
}

.dashboard-metric-switch input:focus-visible + span {
  box-shadow: inset 0 0 0 2px #263043;
}

.dashboard-sales-controls label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #657085;
  font-size: 12px;
}

.dashboard-sales-controls label > span {
  white-space: nowrap;
}

.dashboard-sales-controls input[type="month"],
.dashboard-sales-controls select {
  box-sizing: border-box;
  width: 136px;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #d8dde7;
  background: #fff;
  color: #2b3343;
  font: inherit;
}

.dashboard-sales-controls select {
  width: 108px;
}

.dashboard-sales-controls .dashboard-toggle {
  display: flex;
  height: 36px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dashboard-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
}

.dashboard-sales-controls button {
  height: 36px;
  padding: 0 18px;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.dashboard-sales-controls button:disabled {
  cursor: wait;
  opacity: .6;
}

.dashboard-sales-summary {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 6px 16px 0;
  border: 1px solid #e4e8ef;
}

.dashboard-sales-summary > div {
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid #e4e8ef;
}

.dashboard-sales-summary > div:last-child {
  border-right: 0;
}

.dashboard-sales-summary span {
  display: block;
  margin-bottom: 4px;
  color: #758095;
  font-size: 11px;
}

.dashboard-sales-summary strong {
  color: #263043;
  font-size: 18px;
}

.dashboard-sales-summary em {
  margin-left: 8px;
  font-size: 11px;
  font-style: normal;
}

.dashboard-sales-summary em.up {
  color: #15945d;
}

.dashboard-sales-summary em.down {
  color: #d45145;
}

.dashboard-cost-coverage {
  display: flex;
  flex: 0 0 auto;
  gap: 18px;
  margin: 8px 16px 0;
  padding: 8px 12px;
  border: 1px solid #f5d5b8;
  background: #fff8f1;
  color: #89501f;
  font-size: 12px;
}

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

.dashboard-cost-coverage span {
  display: inline-flex;
  gap: 6px;
}

.dashboard-cost-coverage b,
.dashboard-cost-coverage em {
  font-style: normal;
  font-weight: 500;
}

.dashboard-cost-coverage em {
  color: #9a7353;
}

.dashboard-sales-chart,
.dashboard-custom-chart {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  width: 100%;
  height: auto;
  overflow: hidden;
}

[data-default-sales-content] {
  display: flex;
  height: 100%;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

[data-default-sales-content] .dashboard-sales-chart {
  height: auto;
}

.dashboard-chart-error {
  min-height: 16px;
  flex: 0 0 auto;
  margin: 0 16px 6px;
  color: #c44536;
  font-size: 12px;
  pointer-events: none;
}

.dashboard-number-chart {
  display: grid;
  height: 100%;
  place-content: center;
  gap: 12px;
  text-align: center;
}

.dashboard-number-chart strong {
  color: #2c3443;
  font-size: clamp(20px, 3.33vw, 40px);
  font-weight: 500;
}

.dashboard-number-chart span {
  color: #737e91;
}

.crm-panel header.dashboard-metric-handle {
  box-sizing: border-box;
  min-height: 40px;
  padding: 5px 10px;
  color: #707b8e;
  font-size: 12px;
}

.dashboard-metric-link {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  place-content: center;
  gap: 2px;
  color: #253044;
  text-align: center;
  text-decoration: none;
}

.dashboard-metric-link strong {
  font-size: clamp(16px, 1.67vw, 24px);
  font-weight: 500;
}

.dashboard-metric-link small {
  color: #e85f00;
}

.dashboard-recent-table {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
}

.dashboard-config-backdrop {
  position: fixed;
  z-index: 1250;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(31, 38, 51, .5);
}

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

.dashboard-chart-editor {
  display: flex;
  width: min(1180px, calc(100vw - 36px));
  height: min(780px, calc(100vh - 36px));
  flex-direction: column;
  background: #fff;
  box-shadow: 0 24px 70px rgba(20, 27, 38, .28);
}

.dashboard-chart-editor > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid #e2e6ed;
}

.dashboard-chart-editor > header h3 {
  margin: 0;
  font-size: 20px;
}

.dashboard-chart-editor > header p {
  margin: 6px 0 0;
  color: #7b8495;
  font-size: 12px;
}

.dashboard-chart-editor > header button {
  border: 0;
  background: transparent;
  color: #667085;
  cursor: pointer;
  font-size: 28px;
}

.dashboard-chart-editor form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

.dashboard-chart-editor-body {
  display: grid;
  min-height: 0;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 350px;
}

.dashboard-chart-preview {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 22px;
  background: #f7f8fa;
}

.dashboard-chart-preview [data-chart-preview] {
  width: 100%;
  flex: 1 1 auto;
  min-height: 420px;
  background: #fff;
}

.dashboard-chart-preview [data-chart-preview-error] {
  position: absolute;
  bottom: 30px;
  left: 36px;
  margin: 0;
  color: #a66526;
  font-size: 12px;
}

.dashboard-chart-editor aside {
  overflow: auto;
  padding: 0;
  border-left: 1px solid #e2e6ed;
}

.dashboard-chart-editor-panel {
  display: grid;
  align-content: start;
  gap: 15px;
  padding: 18px 20px 28px;
}

.dashboard-chart-editor-panel[hidden] {
  display: none;
}

.dashboard-chart-editor-panel > label,
.dashboard-style-section > label,
.dashboard-custom-dates label {
  display: grid;
  gap: 6px;
  color: #596275;
  font-size: 12px;
}

.dashboard-chart-editor-panel label[hidden],
.dashboard-style-section label[hidden] {
  display: none;
}

.dashboard-chart-editor-tabs {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid #e2e6ed;
  background: #fff;
}

.dashboard-chart-editor-tabs button {
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #3d4656;
  cursor: pointer;
  font-weight: 600;
}

.dashboard-chart-editor-tabs button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.dashboard-chart-editor input:not([type="radio"]):not([type="checkbox"]),
.dashboard-chart-editor select {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d7dce6;
  background: #fff;
  color: #293244;
  font: inherit;
}

.dashboard-chart-editor fieldset {
  margin: 0;
  padding: 10px;
  border: 1px solid #dfe3eb;
}

.dashboard-inline-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
}

.dashboard-inline-toggle input {
  appearance: none;
  position: relative;
  width: 38px;
  height: 20px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: #cfd6e2;
  cursor: pointer;
  transition: background 0.16s ease;
}

.dashboard-inline-toggle input::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(31 42 61 / 24%);
  content: "";
  transition: transform 0.16s ease;
}

.dashboard-inline-toggle input:checked {
  background: var(--brand);
}

.dashboard-inline-toggle input:checked::after {
  transform: translateX(18px);
}

.dashboard-inline-toggle input:focus-visible {
  outline: 2px solid rgb(255 102 0 / 30%);
  outline-offset: 2px;
}

.dashboard-segmented-field {
  display: grid;
  gap: 6px;
  padding: 0 !important;
  border: 0 !important;
}

.dashboard-segmented-field > legend {
  padding: 0;
}

.dashboard-segmented-field > div {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #d7dce6;
}

.dashboard-segmented-field label {
  cursor: pointer;
}

.dashboard-segmented-field label + label {
  border-left: 1px solid #d7dce6;
}

.dashboard-segmented-field input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.dashboard-segmented-field span {
  display: grid;
  min-height: 36px;
  place-items: center;
  background: #fff;
  color: #394357;
}

.dashboard-segmented-field input:checked + span {
  background: var(--brand);
  color: #fff;
}

.dashboard-segmented-field input:focus-visible + span {
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 70%);
}

.dashboard-style-section {
  display: grid;
  gap: 13px;
  padding-top: 4px;
  border-top: 1px solid #e5e8ee;
}

.dashboard-style-section h4 {
  margin: 0;
  color: #30394a;
  font-size: 13px;
}

.dashboard-unit-input {
  display: grid;
  grid-template-columns: 1fr 40px;
}

.dashboard-unit-input em {
  display: grid;
  place-items: center;
  border: 1px solid #d7dce6;
  border-left: 0;
  background: #fafbfc;
  color: #596275;
  font-style: normal;
}

.dashboard-chart-editor legend {
  padding: 0 5px;
  color: #596275;
  font-size: 12px;
}

.dashboard-chart-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.dashboard-chart-type-grid label {
  min-width: 0;
  cursor: pointer;
}

.dashboard-chart-type-grid input {
  position: absolute;
  opacity: 0;
}

.dashboard-chart-type-grid span {
  display: grid;
  min-height: 66px;
  place-content: center;
  gap: 5px;
  border: 1px solid #dfe3eb;
  color: #5d6779;
  text-align: center;
  font-size: 11px;
}

.dashboard-chart-type-grid b {
  color: #5288ee;
  font-size: 22px;
}

.dashboard-chart-type-grid input:checked + span {
  border-color: #f06700;
  background: #fff7f1;
  color: #d95700;
}

.dashboard-custom-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

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

.dashboard-entity-options {
  display: grid;
  max-height: 150px;
  gap: 7px;
  overflow: auto;
}

.dashboard-entity-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #444e60;
  font-size: 12px;
}

.dashboard-entity-options > span {
  color: #8a93a3;
  font-size: 12px;
}

.dashboard-chart-editor footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid #e2e6ed;
}

.dashboard-chart-editor footer button {
  min-width: 92px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid #d7dce6;
  background: #fff;
  cursor: pointer;
}

.dashboard-chart-editor footer .primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

@media (max-width: 900px) {
  .dashboard-grid {
    margin: 12px 4px 22px;
  }

  .dashboard-chart-editor-body {
    display: block;
    overflow: auto;
  }

  .dashboard-chart-preview {
    min-height: 360px;
  }

  .dashboard-chart-editor aside {
    overflow: visible;
    border-top: 1px solid #e2e6ed;
    border-left: 0;
  }

  .dashboard-chart-type-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dashboard-sales-controls {
    justify-content: flex-start;
  }

  .dashboard-sales-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-sales-summary > div:nth-child(2) {
    border-right: 0;
  }

  .dashboard-sales-summary > div:nth-child(-n + 2) {
    border-bottom: 1px solid #e4e8ef;
  }

  .dashboard-widget.dashboard-widget-expanded {
    inset: 8px !important;
  }
}
