/* ============================================================
   css/modular-dashboard.css — Dark Core Control Center
   Modular Dashboard 12-Column Grid & Widget Architecture
   Zero-framework, 100% Native CSS Variables (Tokens)
   ============================================================ */

/* ── Container & Topbar Controls ───────────────────────────── */

/* Zero-scroll viewport balancing for modular workspace */
.content:has(.modular-dashboard-container) {
  padding: 14px 20px 24px;
}

.modular-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  width: 100%;
}

/* ── Topbar Left Controls Slot ─────────────────────────────── */

.topbar-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-shrink: 0;
}

.topbar-workspace-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
  line-height: 1;
}

.topbar-workspace-chip i {
  color: var(--accent);
  font-size: 12px;
}

.topbar-widget-count {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 9px;
  padding: 1px 5px;
  color: var(--text-muted);
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.2;
}

.topbar-divider {
  width: 1px;
  height: 14px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

.topbar-btn-text {
  display: inline;
}

/* Mode toggle button (Switch to Classic / Modular) */
.btn-dashboard-mode {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  height: 25px;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  line-height: 1;
}

.btn-dashboard-mode:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
}

.btn-dashboard-edit-toggle {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  height: 25px;
  cursor: pointer;
  transition: all var(--t);
  line-height: 1;
}

.btn-dashboard-edit-toggle:hover {
  background: color-mix(in srgb, var(--accent) 85%, white);
  border-color: color-mix(in srgb, var(--accent) 85%, white);
}

.btn-icon-square {
  width: 25px !important;
  height: 25px !important;
  min-width: 25px;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  text-decoration: none !important;
  color: var(--text) !important;
}

.btn-icon-square:hover {
  color: var(--text) !important;
}

/* ── 12-Column Layout System ───────────────────────────────── */

.modular-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 12px;
  width: 100%;
  align-items: stretch;
  box-sizing: border-box;
}

/* Column span classes */
.col-span-1  { grid-column: span 1 / span 1; }
.col-span-2  { grid-column: span 2 / span 2; }
.col-span-3  { grid-column: span 3 / span 3; }
.col-span-4  { grid-column: span 4 / span 4; }
.col-span-5  { grid-column: span 5 / span 5; }
.col-span-6  { grid-column: span 6 / span 6; }
.col-span-7  { grid-column: span 7 / span 7; }
.col-span-8  { grid-column: span 8 / span 8; }
.col-span-9  { grid-column: span 9 / span 9; }
.col-span-10 { grid-column: span 10 / span 10; }
.col-span-11 { grid-column: span 11 / span 11; }
.col-span-12 { grid-column: span 12 / span 12; }

/* Row span classes (Multi-row height) */
.row-span-1  { grid-row: span 1 / span 1; }
.row-span-2  { grid-row: span 2 / span 2; min-height: 480px; }
.row-span-3  { grid-row: span 3 / span 3; min-height: 720px; }

/* ── Widget Base Card ──────────────────────────────────────── */

.modular-widget {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  position: relative;
}

.modular-widget:hover {
  border-color: var(--border-hover);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.modular-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.modular-widget-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.modular-widget-title i {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}

.modular-widget-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.modular-widget-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Configurable max height constraint with smooth scrollbar */
.modular-widget[data-has-max-height="true"] .modular-widget-body {
  max-height: var(--widget-max-height);
  overflow-y: auto;
  padding-right: 4px;
}

/* ── Error Boundary State ──────────────────────────────────── */

.modular-widget-error {
  padding: 20px 14px;
  border: 1px dashed var(--red);
  background: rgba(239, 68, 68, 0.04);
  border-radius: var(--radius);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

.modular-widget-error i {
  color: var(--red);
  font-size: 18px;
}

.modular-widget-error-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.modular-widget-error-desc {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 260px;
}

/* ── Locked Admin State ────────────────────────────────────── */

.modular-widget-locked {
  padding: 24px 16px;
  background: color-mix(in srgb, var(--surface-alt) 60%, transparent);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 140px;
  height: 100%;
}

.modular-widget-locked-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--red) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--red) 30%, transparent);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.modular-widget-locked-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.modular-widget-locked-desc {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.4;
}

.btn-unlock-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t);
  margin-top: 4px;
}

.btn-unlock-widget:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Specific Widget Content Tweaks ────────────────────────── */

/* Online dynamics chart in widget */
.modular-chart-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
  min-height: 180px;
  flex: 1;
}

/* Quick search bar inside widget */
.modular-quick-search-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

/* Notes widget */
.modular-notes-area {
  width: 100%;
  flex: 1;
  min-height: 110px;
  background: var(--surface-alt);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color var(--t);
  box-sizing: border-box;
}

.modular-notes-area:focus {
  border-color: var(--border-hover);
}

.modular-notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}

/* System status widget */
.modular-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.modular-status-row:last-child {
  border-bottom: none;
}

/* ── Responsive Breakpoints ────────────────────────────────── */

/* Tablets / Medium Desktops (<= 992px) */
@media (max-width: 992px) {
  .modular-dashboard-grid {
    grid-template-columns: repeat(12, 1fr);
    gap: 10px;
  }

  .col-span-1, .col-span-2, .col-span-3, .col-span-4, .col-span-5 {
    grid-column: span 6 / span 6;
  }

  .col-span-6 {
    grid-column: span 6 / span 6;
  }

  .col-span-7, .col-span-8, .col-span-9, .col-span-10, .col-span-11 {
    grid-column: span 12 / span 12;
  }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  .modular-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .modular-dashboard-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .modular-dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Force all widgets to single column on mobile */
  .col-span-1, .col-span-2, .col-span-3, .col-span-4,
  .col-span-5, .col-span-6, .col-span-7, .col-span-8,
  .col-span-9, .col-span-10, .col-span-11, .col-span-12 {
    grid-column: 1 / -1 !important;
  }

  .modular-widget {
    padding: 12px 14px;
  }

  .modular-chart-wrapper {
    height: 190px;
  }
}

/* ============================================================
   EDIT MODE STYLES & TOOLBAR
   ============================================================ */

.modular-editor-toolbar {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  animation: fadeIn 150ms ease;
  position: sticky;
  top: 10px;
  z-index: 100;
}

.modular-editor-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modular-editor-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.modular-editor-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: color-mix(in srgb, var(--accent) 15%, var(--surface));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.modular-editor-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: skeletonPulse 1.2s infinite ease-in-out;
}

/* Edit Mode Widget Styling */
.modular-widget-editing {
  border: 2px dashed var(--accent) !important;
  background: color-mix(in srgb, var(--surface) 97%, var(--accent) 3%);
  position: relative;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.modular-widget-editing.is-dragging {
  opacity: 0.45;
  transform: scale(0.98);
  border-style: dotted !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.modular-widget-editing.drag-over {
  border-color: var(--accent) !important;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  transform: translateY(-2px);
}

/* Blueprint 12-Column Guide Overlay (Edit Mode Background) */
.modular-dashboard-grid.is-editing {
  position: relative;
  min-height: 480px;
  background-image: radial-gradient(rgba(99, 102, 241, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: var(--radius);
}

.modular-grid-blueprint {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  pointer-events: none;
  z-index: 0;
  height: 100%;
}

.modular-blueprint-col {
  border: 1px dashed rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.02);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding-top: 6px;
  min-height: 100%;
  box-sizing: border-box;
}

.modular-blueprint-num {
  font-family: 'Space Grotesk', monospace, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.45;
  user-select: none;
}

/* Card editor top bar (Compact single line: never wraps, fits 3c) */
.modular-widget-editor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 8px;
  margin: -10px -12px 10px -12px;
  background: var(--surface-alt);
  border-bottom: 1px dashed var(--border-hover);
  border-radius: calc(var(--radius) - 2px) calc(var(--radius) - 2px) 0 0;
  flex-wrap: nowrap;
  min-height: 32px;
}

.modular-drag-handle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition: all var(--t);
  height: 22px;
  flex-shrink: 0;
}

.modular-drag-handle:hover {
  color: var(--text);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.modular-drag-handle:active {
  cursor: grabbing;
}

/* Span & Height quick interactive pills */
.modular-span-pill,
.modular-height-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: calc(var(--radius) - 2px);
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  transition: all var(--t);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.modular-span-pill:hover,
.modular-height-pill:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

/* Windows OS-Style Card Resizers */
.modular-resizer {
  position: absolute;
  z-index: 25;
  user-select: none;
  touch-action: none;
}

/* Right Edge Handle (Horizontal resize -> Column span) */
.modular-resizer-right {
  top: 0;
  right: -5px;
  width: 10px;
  height: 100%;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modular-resizer-line-v {
  width: 3px;
  height: 36px;
  background: var(--border-hover);
  border-radius: 2px;
  opacity: 0.6;
  transition: all var(--t);
}

.modular-resizer-right:hover .modular-resizer-line-v,
.modular-resizer-right.is-resizing .modular-resizer-line-v {
  background: var(--accent);
  opacity: 1;
  width: 4px;
  height: 54px;
  box-shadow: 0 0 8px var(--accent);
}

/* Bottom Edge Handle (Vertical resize -> Height px) */
.modular-resizer-bottom {
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 10px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modular-resizer-line-h {
  width: 36px;
  height: 3px;
  background: var(--border-hover);
  border-radius: 2px;
  opacity: 0.6;
  transition: all var(--t);
}

.modular-resizer-bottom:hover .modular-resizer-line-h,
.modular-resizer-bottom.is-resizing .modular-resizer-line-h {
  background: var(--accent);
  opacity: 1;
  width: 54px;
  height: 4px;
  box-shadow: 0 0 8px var(--accent);
}

/* Bottom-Right Corner Handle (Both width & height) */
.modular-resizer-corner {
  bottom: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 3px;
  opacity: 0.7;
  transition: all var(--t);
  z-index: 26;
}

.modular-resizer-corner:hover,
.modular-resizer-corner.is-resizing {
  opacity: 1;
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 10px var(--accent);
}

/* Live resize floating dimension badge */
.modular-resize-dimension-badge {
  position: fixed;
  z-index: 100000;
  pointer-events: none;
  background: var(--surface);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -140%);
  animation: fadeIn 0.1s ease;
}

/* Card Height handling: when fixed/custom height is set, apply height and flex body */
.modular-widget[data-has-custom-height="true"] {
  height: var(--widget-height) !important;
  min-height: var(--widget-height) !important;
}

.modular-widget[data-has-custom-height="true"] .modular-widget-body {
  height: 100%;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

/* ── Widget Small-Size Adaptations (3c, 4c, narrow widths) ── */

.modular-widget {
  container-type: inline-size;
}

/* 1. Moderation Incidents in small card: stack into 1 column */
@container (max-width: 460px) {
  .modular-widget .dashboard-mod-cols {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}
.modular-widget.col-span-1 .dashboard-mod-cols,
.modular-widget.col-span-2 .dashboard-mod-cols,
.modular-widget.col-span-3 .dashboard-mod-cols,
.modular-widget.col-span-4 .dashboard-mod-cols {
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

/* 2. Staff On-Duty Radar in small card: stack into 1 column & uncap height */
.modular-widget .staff-duty-grid {
  max-height: 100% !important;
  flex: 1;
}

@container (max-width: 380px) {
  .modular-widget .staff-duty-grid {
    grid-template-columns: 1fr !important;
  }
}
.modular-widget.col-span-1 .staff-duty-grid,
.modular-widget.col-span-2 .staff-duty-grid,
.modular-widget.col-span-3 .staff-duty-grid,
.modular-widget.col-span-4 .staff-duty-grid {
  grid-template-columns: 1fr !important;
}

/* 3. Wipe Season Tracker dates in small card: stack into 1 column */
.modular-wipe-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

@container (max-width: 380px) {
  .modular-widget .modular-wipe-dates {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}
.modular-widget.col-span-1 .modular-wipe-dates,
.modular-widget.col-span-2 .modular-wipe-dates,
.modular-widget.col-span-3 .modular-wipe-dates,
.modular-widget.col-span-4 .modular-wipe-dates {
  grid-template-columns: 1fr !important;
  gap: 8px !important;
}

/* Width selection chips */
.modular-width-selector {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  padding: 2px;
}

.modular-width-chip {
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 3px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--t);
  line-height: 1.3;
}

.modular-width-chip:hover {
  color: var(--text);
  background: var(--surface-alt);
}

.modular-width-chip.active {
  background: var(--accent);
  color: #ffffff;
}

/* Quick height button in card editor bar */
.modular-btn-quick-height {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: calc(var(--radius) - 2px);
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  transition: all var(--t);
  line-height: 1;
}

.modular-btn-quick-height:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  color: var(--text);
}

.modular-btn-quick-height i {
  color: var(--accent);
  font-size: 9px;
}

/* Reorder & delete action buttons in card editor bar */
.modular-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modular-btn-icon-action {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--t);
}

.modular-btn-icon-action:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.modular-btn-delete:hover {
  color: #ffffff;
  background: var(--red);
  border-color: var(--red);
}

/* Unsaved changes pulse dot on Save button */
.unsaved-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
  animation: skeletonPulse 1s infinite ease-in-out;
  margin-left: 2px;
}

/* ── Widget Settings Modal ─────────────────────────────────── */
.setting-chip-btn,
.setting-height-chip-btn {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--t);
  line-height: 1.2;
}

.setting-chip-btn:hover,
.setting-height-chip-btn:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  color: var(--text);
}

.setting-chip-btn.active,
.setting-height-chip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff !important;
  font-weight: 600;
}

/* Widget Library Modal Custom Tweaks */
.modular-library-item:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
}

.modular-library-item.is-added {
  opacity: 0.8;
  border-style: dashed;
}

@media (max-width: 768px) {
  .modular-editor-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
    position: static;
  }

  .modular-editor-toolbar-left,
  .modular-editor-toolbar-right {
    justify-content: space-between;
    width: 100%;
  }

  .modular-editor-badge {
    padding: 3px 6px;
    font-size: 10px;
  }

  .modular-widget-editor-bar {
    gap: 6px;
  }

  .topbar-workspace-chip,
  .topbar-divider {
    display: none !important;
  }

  .topbar-btn-text {
    display: none !important;
  }

  .topbar-left {
    gap: 6px;
  }

  .btn-dashboard-mode,
  .btn-dashboard-edit-toggle {
    padding: 0 !important;
    width: 25px !important;
    height: 25px !important;
    min-width: 25px;
    justify-content: center !important;
  }
}

@media (max-width: 992px) {
  .topbar-workspace-chip .topbar-workspace-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .topbar-left {
    gap: 4px;
  }
}


