/* Customizable dashboards (docs/dashboard-design.md). Look and feel after @aihive/dashboard (MIT).
   Logical properties (inline-start / inline-end) throughout, so the same rules serve Arabic and English. */

.dsh-root {
  --dsh-surface: #ffffff;
  --dsh-border: #e3e6ea;
  --dsh-border-strong: #c9ced6;
  --dsh-text: #1d2330;
  --dsh-muted: #747c88;
  --dsh-accent: #2e6da4;
  --dsh-accent-soft: #eaf1f8;
  --dsh-danger: #c9302c;
  --dsh-radius: 8px;
  --dsh-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --dsh-shadow-raised: 0 2px 8px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06);
  --dsh-shadow-lifted: 0 12px 32px rgba(16, 24, 40, 0.18), 0 2px 8px rgba(16, 24, 40, 0.08);
  color: var(--dsh-text);
  margin-block-end: 24px;
}

.dsh-root *,
.dsh-root *::before,
.dsh-root *::after {
  box-sizing: border-box;
}

.dsh-muted {
  color: var(--dsh-muted);
}

.dsh-tag {
  display: inline-block;
  padding: 1px 8px;
  font-size: 11px;
  line-height: 18px;
  color: var(--dsh-muted);
  background: #f1f3f5;
  border-radius: 999px;
  white-space: nowrap;
}

/* ------------------------------------------------------------ header */

.dsh-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-block-end: 14px;
}

.dsh-switcher-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding: 6px 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--dsh-text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--dsh-radius);
  cursor: pointer;
}

.dsh-switcher-trigger:hover,
.dsh-switcher.open .dsh-switcher-trigger {
  background: var(--dsh-surface);
  border-color: var(--dsh-border);
}

.dsh-switcher-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsh-switcher-menu {
  min-width: 260px;
  max-height: 60vh;
  overflow-y: auto;
}

.dsh-switcher-menu .dsh-tag {
  margin-inline-start: 6px;
}

.dsh-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-inline-start: auto;
}

/* -------------------------------------------------------------- body */

.dsh-body {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.dsh-body-grid {
  display: block;
  flex: 1;
  min-width: 0;
}

.dsh-is-editing .dsh-body {
  padding: 14px;
}

/* -------------------------------------------------------------- grid */

.dsh-grid {
  position: relative;
  width: 100%;
  border-radius: var(--dsh-radius);
}

/* Edit mode reads as a board: a tinted surface with a line on every cell boundary. */
.dsh-grid-editing {
  --dsh-grid-line: rgba(46, 109, 164, 0.16);
  --dsh-grid-board: #f5f8fb;
  background-color: var(--dsh-grid-board);
  background-image:
    repeating-linear-gradient(to right, var(--dsh-grid-line) 0, var(--dsh-grid-line) 1px, transparent 1px, transparent var(--dsh-step-x, 96px)),
    repeating-linear-gradient(to bottom, var(--dsh-grid-line) 0, var(--dsh-grid-line) 1px, transparent 1px, transparent var(--dsh-step-y, 64px));
  background-position: calc(var(--dsh-gap, 12px) / -2) calc(var(--dsh-gap, 12px) / -2);
  box-shadow: 0 0 0 14px var(--dsh-grid-board);
  outline: 1px dashed rgba(46, 109, 164, 0.35);
  outline-offset: 14px;
}

[dir="rtl"] .dsh-grid-editing {
  background-image:
    repeating-linear-gradient(to left, var(--dsh-grid-line) 0, var(--dsh-grid-line) 1px, transparent 1px, transparent var(--dsh-step-x, 96px)),
    repeating-linear-gradient(to bottom, var(--dsh-grid-line) 0, var(--dsh-grid-line) 1px, transparent 1px, transparent var(--dsh-step-y, 64px));
  background-position: calc(100% + var(--dsh-gap, 12px) / 2) calc(var(--dsh-gap, 12px) / -2);
}

.dsh-grid-placing {
  cursor: copy;
}

.dsh-placing-bar {
  position: absolute;
  inset-block-start: -48px;
  inset-inline-start: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--dsh-surface);
  border: 1px solid var(--dsh-border);
  border-radius: var(--dsh-radius);
  box-shadow: var(--dsh-shadow-raised);
}

.dsh-widget {
  position: absolute;
  background: var(--dsh-surface);
  border: 1px solid var(--dsh-border);
  border-radius: var(--dsh-radius);
  box-shadow: var(--dsh-shadow);
  transition: left 0.16s cubic-bezier(0.2, 0, 0, 1), right 0.16s cubic-bezier(0.2, 0, 0, 1),
    top 0.16s cubic-bezier(0.2, 0, 0, 1), width 0.16s cubic-bezier(0.2, 0, 0, 1),
    height 0.16s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.14s ease;
}

/* a widget just added from the gallery */
.dsh-widget.dsh-widget-new {
  animation: dsh-widget-new 1.8s ease-out;
}

@keyframes dsh-widget-new {
  0%, 40% { box-shadow: 0 0 0 3px var(--dsh-accent), var(--dsh-shadow-lifted); }
  100% { box-shadow: var(--dsh-shadow); }
}

.dsh-widget-bare {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.dsh-grid-editing .dsh-widget {
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.dsh-grid-editing .dsh-widget:hover {
  border-color: transparent;
  box-shadow: 0 0 0 1.5px rgba(46, 109, 164, 0.55), var(--dsh-shadow-raised);
}

.dsh-grid-editing .dsh-widget.dsh-widget-dragging {
  z-index: 30;
  opacity: 0.92;
  cursor: grabbing;
  transition: box-shadow 0.14s ease;
  box-shadow: 0 0 0 1.5px rgba(46, 109, 164, 0.7), var(--dsh-shadow-lifted);
}

.dsh-placeholder {
  position: absolute;
  z-index: 5;
  background: rgba(46, 109, 164, 0.08);
  border: 1.5px dashed rgba(46, 109, 164, 0.55);
  border-radius: var(--dsh-radius);
  pointer-events: none;
  transition: left 0.12s ease, right 0.12s ease, top 0.12s ease, width 0.12s ease, height 0.12s ease;
}

.dsh-placeholder[hidden] {
  display: none;
}

.dsh-grid-empty {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dsh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 56px;
  text-align: center;
  border: 1.5px dashed var(--dsh-border-strong);
  border-radius: var(--dsh-radius);
}

.dsh-empty p {
  margin: 0;
}

/* ------------------------------------------------------ widget frame */

np-dashboard-widget-host {
  display: block;
  width: 100%;
  height: 100%;
}

.dsh-chrome {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.dsh-chrome-bare {
  overflow: visible;
}

.dsh-widget-title {
  padding: 12px 14px 0;
  padding-inline-end: 64px;
  font-size: 12px;
  font-weight: 600;
  color: var(--dsh-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* auto refresh interval beside the refresh button */
.dsh-auto-refresh {
  margin-inline-start: 4px;
  font-size: 11px;
  color: var(--dsh-muted);
}

.dsh-form-hint {
  margin: 4px 0 0;
  font-size: 12px;
}

.dsh-refreshing {
  margin-inline-start: 6px;
  font-size: 10px;
}

.dsh-widget-body {
  flex: 1;
  min-height: 0;
  padding: 10px 14px 14px;
  overflow: hidden auto;
}

.dsh-chrome-bare > .dsh-widget-body {
  padding: 0;
  overflow: visible;
}

.dsh-grid-editing .dsh-widget-body {
  overflow: hidden;
  pointer-events: none;
}

.dsh-widget-content {
  height: 100%;
}

.dsh-widget-menu {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  z-index: 10;
  display: flex;
  gap: 4px;
}

.dsh-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--dsh-muted);
  background: var(--dsh-surface);
  border: 1px solid var(--dsh-border);
  border-radius: 6px;
  cursor: pointer;
}

.dsh-widget .dsh-chip {
  opacity: 0;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.dsh-widget:hover .dsh-chip,
.dsh-chip:focus {
  opacity: 1;
}

.dsh-chip:hover {
  color: var(--dsh-text);
  border-color: var(--dsh-border-strong);
}

.dsh-chip-danger:hover {
  color: var(--dsh-danger);
}

.dsh-widget-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

.dsh-widget-unknown {
  font-size: 12px;
}

/* Loading: skeleton bars, never a spinner that blocks the board. */
.dsh-skeleton,
.dsh-loading {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dsh-skeleton span,
.dsh-loading span {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 50%, #eef0f3 75%);
  background-size: 200% 100%;
  animation: dsh-shimmer 1.2s linear infinite;
}

.dsh-skeleton span:nth-child(2) { width: 70%; }
.dsh-skeleton span:nth-child(3) { width: 45%; }

.dsh-loading span {
  height: 120px;
}

@keyframes dsh-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ---------------------------------------------------- resize handles */

.dsh-resize {
  position: absolute;
  z-index: 8;
  touch-action: none;
}

.dsh-resize::after {
  content: "";
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.dsh-widget:hover .dsh-resize::after,
.dsh-widget-dragging .dsh-resize::after {
  opacity: 1;
}

.dsh-resize-n,
.dsh-resize-s {
  inset-inline: 24px;
  height: 10px;
  cursor: ns-resize;
}

.dsh-resize-n { inset-block-start: -5px; inset-inline-end: 72px; }
.dsh-resize-s { inset-block-end: -5px; }

.dsh-resize-n::after,
.dsh-resize-s::after {
  top: 50%;
  left: 50%;
  width: 24px;
  height: 3px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--dsh-accent);
}

.dsh-resize-start,
.dsh-resize-end {
  inset-block: 24px;
  width: 10px;
  cursor: ew-resize;
}

.dsh-resize-start { inset-inline-start: -5px; }
.dsh-resize-end { inset-inline-end: -5px; inset-block-start: 40px; }

.dsh-resize-start::after,
.dsh-resize-end::after {
  top: 50%;
  left: 50%;
  width: 3px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: var(--dsh-accent);
}

.dsh-resize-start-n,
.dsh-resize-start-s,
.dsh-resize-end-s {
  width: 14px;
  height: 14px;
}

.dsh-resize-start-n { inset-block-start: -5px; inset-inline-start: -5px; }
.dsh-resize-start-s { inset-block-end: -5px; inset-inline-start: -5px; }
.dsh-resize-end-s { inset-block-end: -5px; inset-inline-end: -5px; }

/* Diagonal cursors depend on the physical corner. */
[dir="ltr"] .dsh-resize-start-n,
[dir="ltr"] .dsh-resize-end-s,
[dir="rtl"] .dsh-resize-start-s { cursor: nwse-resize; }
[dir="ltr"] .dsh-resize-start-s,
[dir="rtl"] .dsh-resize-start-n,
[dir="rtl"] .dsh-resize-end-s { cursor: nesw-resize; }

.dsh-resize-start-n::after,
.dsh-resize-start-s::after,
.dsh-resize-end-s::after {
  width: 10px;
  height: 10px;
  border: 3px solid var(--dsh-accent);
}

.dsh-resize-start-n::after {
  inset-block-start: 2px;
  inset-inline-start: 2px;
  border-inline-end: none;
  border-block-end: none;
  border-start-start-radius: 8px;
}

.dsh-resize-start-s::after {
  inset-block-end: 2px;
  inset-inline-start: 2px;
  border-inline-end: none;
  border-block-start: none;
  border-end-start-radius: 8px;
}

.dsh-resize-end-s::after {
  inset-block-end: 2px;
  inset-inline-end: 2px;
  border-inline-start: none;
  border-block-start: none;
  border-end-end-radius: 8px;
}

/* ------------------------------------------------------------ gallery */

/* Floats over the page instead of taking room from the grid: a narrower grid would switch to the
   tablet layout and the user would unknowingly edit that one. */
np-dashboard-gallery {
  position: fixed;
  inset-block-end: 24px;
  inset-inline-end: 24px;
  z-index: 1030;
  width: 290px;
}

/* collapsed: only the floating button */
np-dashboard-gallery:has(> .dsh-gallery-fab) {
  width: auto;
}

.dsh-gallery-fab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 18px;
  color: #fff;
  background: var(--dsh-accent);
  border: 0;
  border-radius: 50%;
  box-shadow: var(--dsh-shadow-lifted);
  cursor: pointer;
  touch-action: none;
}

.dsh-gallery-moving,
.dsh-gallery-moving * {
  cursor: grabbing !important;
  user-select: none;
}

.dsh-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 120px);
  box-shadow: var(--dsh-shadow-lifted);
  padding: 12px;
  background: var(--dsh-surface);
  border: 1px solid var(--dsh-border);
  border-radius: var(--dsh-radius);
}

.dsh-gallery-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: -12px -12px 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dsh-border);
  cursor: grab;
  touch-action: none;
}

.dsh-gallery-actions {
  display: inline-flex;
  gap: 4px;
}

.dsh-gallery-hint {
  margin: 0;
  font-size: 12px;
}

.dsh-gallery-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dsh-rail-item {
  padding: 3px 10px;
  font-size: 12px;
  color: var(--dsh-text);
  background: transparent;
  border: 1px solid var(--dsh-border);
  border-radius: 999px;
  cursor: pointer;
}

.dsh-rail-item.active {
  color: var(--dsh-accent);
  background: var(--dsh-accent-soft);
  border-color: transparent;
}

.dsh-gallery-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-height: 0; /* lets the list scroll inside the panel instead of spilling below it */
  overflow-y: auto;
}

.dsh-gallery-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  text-align: start;
  background: var(--dsh-surface);
  border: 1px solid var(--dsh-border);
  border-radius: var(--dsh-radius);
  cursor: grab;
}

.dsh-gallery-card:hover {
  border-color: var(--dsh-accent);
  box-shadow: var(--dsh-shadow-raised);
}

.dsh-gallery-card.dsh-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dsh-gallery-icon {
  margin-block-start: 2px;
  font-size: 18px;
  color: var(--dsh-accent);
}

.dsh-gallery-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dsh-gallery-label {
  font-weight: 600;
}

.dsh-gallery-description {
  font-size: 12px;
}

/* -------------------------------------------------------------- forms */

.dsh-field-label {
  font-weight: 600;
}

.dsh-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-weight: normal;
  cursor: pointer;
}

.dsh-check input {
  margin: 0;
}

.dsh-color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.dsh-color-field .dsh-field-label {
  min-width: 120px;
  margin: 0;
}

.dsh-color-field input[type="color"] {
  width: 44px;
  height: 26px;
  padding: 0 2px;
  cursor: pointer;
}

.dsh-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-block-start: 12px;
}

/* ----------------------------------------------------------- widgets */

.dsh-root {
  --dsh-ok: #3c9a5f;
  --dsh-warn: #e0a100;
  --dsh-up: #2f8f4e;
  --dsh-down: #c9302c;
}

.dsh-widget-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 100%;
  text-align: center;
  font-size: 12px;
}

.dsh-clickable {
  cursor: pointer;
}

/* Arrows drawn for right-to-left; mirrored on left-to-right pages. */
.dsh-flip {
  display: inline-block;
}

body.en .dsh-flip {
  transform: scaleX(-1);
}

/* notes */

.dsh-notes {
  word-break: break-word;
  min-height: 100%;
}

.dsh-notes p:last-child,
.dsh-notes ul:last-child,
.dsh-notes ol:last-child {
  margin-block-end: 0;
}

.dsh-notes h1,
.dsh-notes h2,
.dsh-notes h3 {
  margin-block: 0 8px;
  font-size: 15px;
  font-weight: 700;
}

.dsh-notes ul,
.dsh-notes ol {
  padding-inline-start: 20px;
}

.dsh-notes-yellow,
.dsh-notes-blue,
.dsh-notes-green,
.dsh-notes-red {
  margin: -10px -14px -14px;
  padding: 10px 14px 14px;
}

.dsh-notes-yellow { background: #fff8db; }
.dsh-notes-blue { background: #e8f2fc; }
.dsh-notes-green { background: #e9f7ee; }
.dsh-notes-red { background: #fdecec; }

.dsh-tones {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

.dsh-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--dsh-border);
  border-radius: 3px;
  vertical-align: middle;
}

/* numbers */

.dsh-kpi {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.dsh-kpi-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-kpi-label {
  margin-block-start: 2px;
  font-size: 12px;
}

.dsh-kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-block-start: 4px;
  font-size: 12px;
  font-weight: 600;
}

.dsh-trend-up { color: var(--dsh-up); }
.dsh-trend-down { color: var(--dsh-down); }
.dsh-trend-flat { color: var(--dsh-muted); }

.dsh-kpi-target {
  margin-block-start: 6px;
  font-size: 11px;
}

.dsh-kpi-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  text-align: center;
}

.dsh-kpi-strip {
  display: flex;
  height: 100%;
  align-items: stretch;
}

.dsh-kpi-strip-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: 12px;
  border-inline-start: 1px solid var(--dsh-border);
}

.dsh-kpi-strip-item:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.dsh-kpi-strip-label {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-kpi-strip-value {
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* bars, progress and gauge */

.dsh-bar {
  display: block;
  height: 6px;
  margin-block: 4px;
  background: #eef0f3;
  border-radius: 999px;
  overflow: hidden;
}

.dsh-bar > span {
  display: block;
  height: 100%;
  background: var(--dsh-accent);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.dsh-bar-lg {
  height: 12px;
  margin-block: 10px 6px;
}

.dsh-bar-done > span {
  background: var(--dsh-ok);
}

.dsh-progress {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.dsh-progress-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.dsh-progress .dsh-kpi-value {
  font-size: 24px;
}

.dsh-gauge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.dsh-gauge svg {
  width: 100%;
  max-height: 100%;
}

.dsh-gauge path {
  fill: none;
  stroke-width: 16;
  stroke-linecap: round;
}

.dsh-gauge-track { stroke: #eef0f3; }
.dsh-gauge-ok { stroke: var(--dsh-accent); }
.dsh-gauge-warn { stroke: var(--dsh-warn); }
.dsh-gauge-danger { stroke: var(--dsh-danger); }

.dsh-gauge-text {
  font-size: 22px;
  font-weight: 700;
  fill: var(--dsh-text);
}

.dsh-gauge-scale {
  font-size: 10px;
  fill: var(--dsh-muted);
}

/* charts */

.dsh-chart,
dsh-chart,
.dsh-chart-box {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
}

.dsh-chart-box canvas {
  position: absolute;
  inset: 0;
}

/* tables and lists */

.dsh-table-wrap {
  overflow: auto;
  max-height: calc(100% - 30px);
}

.dsh-table {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}

.dsh-table th,
.dsh-table td {
  padding: 5px 6px;
  text-align: start;
  border-block-end: 1px solid var(--dsh-border);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dsh-table th {
  position: sticky;
  inset-block-start: 0;
  background: var(--dsh-surface);
  font-weight: 600;
  color: var(--dsh-muted);
}

.dsh-table .dsh-num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.dsh-sort {
  padding: 0;
  border: 0;
  background: none;
  font-weight: inherit;
  color: inherit;
}

.dsh-pager {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-block-start: 6px;
  font-size: 12px;
}

.dsh-pager .dsh-chip {
  opacity: 1;
}

.dsh-pager-total {
  margin-inline-start: auto;
}

.dsh-top-list,
.dsh-upcoming,
.dsh-activity,
.dsh-calendar-events,
.dsh-link-editor {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dsh-top-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 4px;
}

.dsh-top-rank {
  flex: none;
  width: 20px;
  height: 20px;
  font-size: 11px;
  line-height: 20px;
  text-align: center;
  color: var(--dsh-accent);
  background: var(--dsh-accent-soft);
  border-radius: 50%;
}

.dsh-top-main {
  flex: 1;
  min-width: 0;
}

.dsh-top-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.dsh-top-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsh-top-value {
  flex: none;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dsh-top-list .dsh-bar {
  height: 4px;
  margin-block: 2px 0;
}

.dsh-upcoming li,
.dsh-activity li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 6px;
  border-block-end: 1px solid var(--dsh-border);
  font-size: 12px;
}

.dsh-upcoming li:last-child,
.dsh-activity li:last-child {
  border-block-end: 0;
}

.dsh-upcoming-date {
  flex: none;
  width: 40px;
  padding-block: 3px;
  line-height: 1.1;
  text-align: center;
  background: var(--dsh-accent-soft);
  border-radius: 6px;
}

.dsh-upcoming-date b {
  display: block;
  font-size: 15px;
  color: var(--dsh-accent);
}

.dsh-upcoming-date small {
  font-size: 10px;
  color: var(--dsh-muted);
}

.dsh-upcoming-title,
.dsh-activity-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsh-tag-warn { color: #8a6100; background: #fff3cd; }
.dsh-tag-danger { color: #a12622; background: #fbe3e2; }

.dsh-activity li > .fa {
  flex: none;
  font-size: 8px;
  color: var(--dsh-accent);
}

.dsh-tone-warn > .fa { color: var(--dsh-warn); }
.dsh-tone-danger > .fa { color: var(--dsh-danger); }
.dsh-tone-ok > .fa { color: var(--dsh-ok); }

/* calendar */

.dsh-calendar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dsh-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-block-end: 6px;
}

.dsh-calendar-head .dsh-chip {
  opacity: 1;
}

.dsh-calendar-title {
  border: 0;
  background: none;
  font-weight: 600;
}

.dsh-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.dsh-calendar-dow {
  padding-block: 2px;
  font-size: 11px;
}

.dsh-calendar-day {
  position: relative;
  padding: 4px 0;
  font-size: 12px;
  border: 0;
  border-radius: 6px;
  background: none;
}

.dsh-calendar-day:hover { background: #f1f3f5; }
.dsh-calendar-day.dsh-out { color: #c3c8cf; }
.dsh-calendar-day.dsh-today { font-weight: 700; color: var(--dsh-accent); }
.dsh-calendar-day.dsh-selected { background: var(--dsh-accent-soft); }

.dsh-calendar-day i {
  position: absolute;
  inset-block-end: 1px;
  inset-inline-start: calc(50% - 2px);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--dsh-danger);
}

.dsh-calendar-events {
  margin-block-start: 8px;
  overflow: auto;
  font-size: 12px;
}

.dsh-calendar-events li {
  padding-block: 3px;
  border-block-end: 1px dashed var(--dsh-border);
}

/* welcome */

.dsh-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
  padding: 14px 18px;
  color: #fff;
  background: linear-gradient(120deg, #2e6da4, #4a8fca);
  border-radius: var(--dsh-radius);
}

body.ar .dsh-welcome {
  background: linear-gradient(240deg, #2e6da4, #4a8fca);
}

/* follows the card's text color, which the user can change */
.dsh-welcome .dsh-muted {
  color: inherit;
  opacity: 0.85;
}

.dsh-welcome-greeting {
  font-size: 20px;
  font-weight: 700;
}

.dsh-welcome-message,
.dsh-welcome-context {
  margin-block-start: 4px;
}

.dsh-welcome-context {
  font-size: 12px;
}

.dsh-welcome-date {
  flex: none;
  font-size: 12px;
  line-height: 1.5;
  text-align: end;
}

.dsh-welcome-day {
  font-size: 16px;
  font-weight: 600;
}

/* links and reports */

.dsh-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

.dsh-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  overflow: hidden;
  font-size: 12px;
  color: var(--dsh-text);
  background: #f6f8fa;
  border: 1px solid var(--dsh-border);
  border-radius: 6px;
}

.dsh-link:hover,
.dsh-link:focus {
  color: var(--dsh-accent);
  text-decoration: none;
  background: var(--dsh-accent-soft);
}

.dsh-link span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsh-link-editor li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 4px;
  border-block-end: 1px solid var(--dsh-border);
}

.dsh-link-editor li > span {
  flex: 1;
}

.dsh-link-editor .dsh-chip {
  opacity: 1;
}

.dsh-report {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  background: #fbfcfd;
  border: 1px dashed var(--dsh-border-strong);
  border-radius: 6px;
}

.dsh-report:hover {
  background: var(--dsh-accent-soft);
}

.dsh-report .fa {
  font-size: 22px;
  color: var(--dsh-accent);
}

/* settings */

.dsh-check-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 16px;
}

/* share dialog */

.dsh-share-list {
  margin: 8px 0 12px;
  padding: 0;
  list-style: none;
}

.dsh-share-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 4px;
  border-block-end: 1px solid #e3e6ea;
}

.dsh-share-list .dsh-share-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dsh-share-list select {
  width: auto;
}

.dsh-share-list .dsh-chip {
  opacity: 1;
}

.dsh-share-results {
  max-height: 240px;
  overflow: auto;
}

.dsh-share-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-block-end: 10px;
}

.dsh-share-group > strong {
  flex-basis: 100%;
  font-size: 12px;
}

.dsh-share-target {
  padding: 3px 10px;
  font-size: 12px;
  background: #f6f8fa;
  border: 1px solid #e3e6ea;
  border-radius: 999px;
}

.dsh-share-target:hover:not([disabled]) {
  background: #eaf1f8;
}

.dsh-share-target[disabled] {
  opacity: 0.45;
}

/* Menus of the toolbar open from the button's inline end toward the page, so RTL never pushes them off screen
   (bootstrap-rtl flips .dropdown-menu-right the wrong way here). */
.dsh-root .dropdown-menu.dsh-menu-end {
  left: auto !important;
  right: auto !important;
  inset-inline-end: 0 !important;
  inset-inline-start: auto !important;
  text-align: start;
}

/* The themes turn menu icons white on hover, made for a coloured hover background; these menus hover light grey,
   so the icons keep the theme's own colour (style.min.css #f63, next-year-style.css #00BCD4). */
.dsh-root .dropdown-menu > li:not(.disabled) > a:hover .fa,
.dsh-root .dropdown-menu > li:not(.disabled) > a:focus .fa {
  color: #f63 !important;
}

.is-next-year .dsh-root .dropdown-menu > li:not(.disabled) > a:hover .fa,
.is-next-year .dsh-root .dropdown-menu > li:not(.disabled) > a:focus .fa {
  color: #00BCD4 !important;
}

/* the delete item keeps its red */
.dsh-root .dropdown-menu > li:not(.disabled) > a.text-danger:hover .fa,
.is-next-year .dsh-root .dropdown-menu > li:not(.disabled) > a.text-danger:hover .fa {
  color: inherit !important;
}

/* ------------------------------------------------------- small screens */

@media (max-width: 767px) {
  .dsh-body {
    flex-direction: column;
  }

  np-dashboard-gallery {
    inset-block-end: 8px;
    inset-inline: 8px;
    width: auto;
  }

  .dsh-gallery {
    max-height: 50vh;
  }

  .dsh-actions {
    margin-inline-start: 0;
  }

  .dsh-widget .dsh-chip {
    opacity: 1;
  }
}
