/* Dashboards: pinned visuals on a 12-column grid (positions are set inline by dashboard-view.js). */

/* The dashboard replaces the query workspace (and the explorer) while it is open. */
.dashboard-view { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg-app); }
.dashboard-view[hidden] { display: none; }
body.dash-open .workspace, body.dash-open .sidebar, body.dash-open .resizer[data-resize="sidebar"] { display: none; }

.dash-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border);
  background: var(--bg-panel); min-height: 52px; flex-wrap: wrap; }
.dash-switch { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: var(--radius); color: var(--text);
  font-size: 15px; font-weight: 600; max-width: 380px; }
.dash-switch:hover { background: var(--bg-hover); }
.dash-switch > .icon:first-child { color: var(--accent); }
.dash-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-meta { font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.dash-clock { display: none; font-size: 15px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.dash-refresh { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); }
.dash-refresh .select { height: 26px; font-size: 12px; }
.dash-switcher .menu-item.current { color: var(--accent); }
.dash-switcher kbd { margin-left: auto; }

.dash-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px; position: relative; }
.dash-grid { position: relative; min-height: 100%; isolation: isolate; } /* tiles' z-order (floating layers) stays inside */
.dash-empty { position: absolute; inset: 0; display: flex; }
.dash-empty[hidden] { display: none; }

/* Tiles */
.dtile { position: absolute; display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--border);
  background: linear-gradient(180deg, #151923, #12151c); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 6px 18px rgba(0, 0, 0, 0.25);
  overflow: hidden; transition: left 0.18s ease, top 0.18s ease, width 0.18s ease, height 0.18s ease; }
.dtile.dragging { transition: none; z-index: 2000 !important; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); border-color: var(--accent); opacity: 0.94; }
.dtile.has-error { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.dtile-head { display: flex; align-items: center; gap: 8px; padding: 8px 8px 4px 14px; cursor: grab; user-select: none; min-height: 36px; }
body.dash-moving, body.dash-moving * { cursor: grabbing !important; }
body.dash-resizing, body.dash-resizing * { cursor: nwse-resize !important; }
.dtile-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtile-status { display: inline-flex; align-items: center; font-size: 11px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.dtile-err { color: var(--danger); display: inline-flex; }
.dtile-stamp { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.dtile-refresh-icon { width: 12px; height: 12px; flex: none; opacity: 0.85; }
body.dash-tv .dtile-stamp { font-size: 12px; } body.dash-tv .dtile-refresh-icon { width: 14px; height: 14px; }
.dtile-menu { opacity: 0; transition: opacity 0.12s; }
.dtile:hover .dtile-menu, .dtile-menu:focus-visible { opacity: 1; }
.dtile-body { flex: 1; min-height: 0; position: relative; container-type: size; }
.dtile-msg { position: absolute; inset: 0; display: flex; background: inherit; z-index: 1; }
.dtile-loading { margin: auto; }
.dtile .viz-state { padding: 10px; }
.dtile .viz-kpi { padding: 8px 12px; }
.dtile .kpi-value { font-size: var(--kpi-value-px, calc(clamp(26px, 30cqmin, 96px) * var(--kpi-scale, 1))); }
.dtile-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; z-index: 2; opacity: 0; transition: opacity 0.12s;
  background: linear-gradient(135deg, transparent 50%, var(--text-dim) 50%, var(--text-dim) 58%, transparent 58%, transparent 70%, var(--text-dim) 70%, var(--text-dim) 78%, transparent 78%); }
.dtile:hover .dtile-resize { opacity: 0.8; }
.dtile-ghost { position: absolute; border-radius: 12px; border: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent);
  background: var(--accent-soft); transition: left 0.12s, top 0.12s, width 0.12s, height 0.12s; pointer-events: none; z-index: 1999; }
.dash-mobile .dtile-head { cursor: default; }
.dash-mobile .dtile-resize { display: none; }

/* Query tab linked to a dashboard visual */
.tile-link-bar { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 14px; font-size: 12.5px; color: var(--text-muted);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); border-bottom: 1px solid var(--border); }
.tile-link-bar[hidden] { display: none; }
.tlb-icon { color: var(--accent); display: inline-flex; }
.tlb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tlb-text b { color: var(--text); font-weight: 600; }
.tlb-state { font-size: 11px; padding: 1px 8px; border-radius: 10px; color: var(--success); background: var(--success-soft); white-space: nowrap; }
.tlb-state.dirty { color: var(--warning); background: var(--warning-soft); }

/* Shared badge (dashboard header) */
.dash-shared { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 10px; font-size: 11.5px; font-weight: 600;
  color: var(--success); background: var(--success-soft); }
.dash-shared:hover { background: color-mix(in srgb, var(--success) 22%, transparent); }
body.dash-tv .dash-shared { display: none; }

/* Share dialog */
.share-modal .modal-body { gap: 12px; }
.share-lead { margin: 0; color: var(--text-muted); line-height: 1.55; }
.share-lead b { color: var(--text); }
.share-notes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--text-muted); }
.share-notes li { display: flex; gap: 8px; align-items: flex-start; }
.share-notes .icon { margin-top: 2px; flex: none; color: var(--text-dim); }
.share-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.share-on { display: flex; align-items: center; gap: 8px; color: var(--text-muted); }
.share-on .icon { color: var(--success); }
.share-on b { color: var(--success); }
.share-links { display: flex; flex-direction: column; gap: 6px; }
.share-link { display: flex; gap: 6px; }
.share-link .input { flex: 1; min-width: 0; font-size: 12px; }
.share-hint { margin: -4px 0 0; font-size: 11.5px; color: var(--text-dim); }
.share-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); }
.share-247 { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-sunken); }
.share-247 > .icon { color: var(--text-dim); margin-top: 2px; flex: none; }
.share-247.on { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.share-247.on > .icon { color: var(--success); }
.share-247 > div { flex: 1; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.share-247 b { color: var(--text); font-size: 13px; }
.share-247 .link-btn { align-self: flex-start; color: var(--danger); font-size: 12px; padding: 0; margin-top: 2px; }
.share-247 .link-btn:hover { text-decoration: underline; }
.switch { position: relative; width: 36px; height: 20px; flex: none; margin-top: 2px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--border-strong); transition: background 0.15s; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Shared dashboard page (share.html) */
body.share-page { height: 100vh; overflow: hidden; background: var(--bg-app); }
.share-view { height: 100vh; display: flex; flex-direction: column; }
.share-logo { width: 22px; height: 22px; }
.share-name { pointer-events: none; }
.share-notice { display: flex; align-items: center; gap: 14px; margin: 12px 16px 0; padding: 12px 16px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 10%, var(--bg-panel)); }
.share-notice[hidden] { display: none; }
.share-notice > .icon { color: var(--warning); flex: none; width: 26px; height: 26px; }
.share-notice.server, .share-notice.device { border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, var(--bg-panel)); }
.share-notice.server > .icon, .share-notice.device > .icon { color: var(--danger); }
.share-notice.ok { border-color: color-mix(in srgb, var(--success) 40%, transparent); background: color-mix(in srgb, var(--success) 10%, var(--bg-panel)); }
.share-notice.ok > .icon { color: var(--success); }
.sn-body { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text-muted); }
.sn-body b { color: var(--text); font-size: 14.5px; }
.sn-body small { color: var(--text-dim); font-size: 12px; margin-top: 2px; }
body.dash-tv .share-notice { margin: 10px 22px 0; }
body.dash-tv .sn-body { font-size: 15px; } body.dash-tv .sn-body b { font-size: 18px; }
/* Last data while the dashboard can't be refreshed */
.share-stale .dtile { opacity: 0.55; filter: grayscale(0.6); transition: opacity 0.4s, filter 0.4s; }
.share-invalid { flex: 1; display: flex; min-height: 100vh; }
.share-view .dtile-head { cursor: default; }

/* Pin popover (Visualize toolbar) */
.pin-menu { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.pin-head { display: flex; align-items: center; gap: 7px; padding: 6px 8px 8px; font-size: 12px; color: var(--text-muted); }
.pin-head b { color: var(--text); font-weight: 600; }
.pin-head .icon { color: var(--accent); flex: none; }
.pin-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.pin-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 6px; text-align: left; color: var(--text); font-size: 12.5px; }
.pin-item:hover { background: var(--bg-hover); }
.pin-item .icon { color: var(--text-muted); flex: none; }
.pin-item span { display: flex; flex-direction: column; min-width: 0; }
.pin-item small { color: var(--text-dim); font-size: 11px; }
.pin-update .icon { color: var(--accent); }
.pin-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.pin-empty, .pin-note, .pin-loading { padding: 8px 10px; font-size: 12px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.pin-new { display: flex; gap: 6px; padding: 8px 4px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.pin-new .input { flex: 1; min-width: 0; }
.pin-done { display: flex; align-items: center; gap: 8px; padding: 10px; font-size: 13px; color: var(--text); }
.pin-done .icon { color: var(--success); }
.pin-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 4px; }

/* SQL for a visual */
.viz-sql-modal .modal-body { display: flex; flex-direction: column; gap: 8px; }
.viz-sql { margin: 0; padding: 12px 14px; border-radius: 8px; background: var(--bg-sunken); border: 1px solid var(--border); font-size: 12px;
  line-height: 1.55; color: var(--text); max-height: 52vh; overflow: auto; white-space: pre; user-select: text; }

/* TV mode: only the dashboard, bigger type, no editing */
.dash-tv-exit { display: none; }
body.dash-tv .topbar, body.dash-tv .activitybar, body.dash-tv .statusbar { display: none; }
body.dash-tv .dash-head { border-bottom: 0; background: transparent; padding: 14px 22px 4px; }
body.dash-tv .dash-head .btn, body.dash-tv .dash-head .icon-btn, body.dash-tv .dash-refresh, body.dash-tv .dash-switch > .icon:last-child { display: none; }
body.dash-tv .dash-switch { font-size: 22px; pointer-events: none; }
body.dash-tv .dash-clock { display: inline; font-size: 22px; }
body.dash-tv .dash-meta { font-size: 13px; }
body.dash-tv .dash-scroll { padding: 14px 22px 22px; }
body.dash-tv .dtile-head { cursor: default; }
body.dash-tv .dtile-title { font-size: 15px; }
body.dash-tv .dtile-menu, body.dash-tv .dtile-resize { display: none; }
body.dash-tv .dash-tv-exit { display: inline-flex; position: fixed; right: 14px; top: 12px; z-index: 50; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 8px; background: var(--bg-elevated); border: 1px solid var(--border-strong); color: var(--text-muted); font-size: 12px;
  opacity: 0; transition: opacity 0.2s; }
body.dash-tv .dash-tv-exit:hover, body.dash-tv .dash-tv-exit:focus-visible { opacity: 1; }

/* Dashboard files: not-connected banner, snapshot badge, drop target, dialogs ----------------------------------------- */
.dash-banner { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; font-size: 13px;
  color: var(--text-muted); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 9%, var(--bg-panel)); }
.dash-banner[hidden] { display: none; }
.dash-banner > .icon { color: var(--warning); flex: none; }
.dash-banner span { flex: 1; } .dash-banner b { color: var(--text); }
.dtile-snap { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 8px; color: var(--warning); background: var(--warning-soft); }
.dashboard-view.dash-drop .dash-scroll { outline: 2px dashed var(--accent); outline-offset: -8px; background: var(--accent-soft); }
.dfile-modal .modal-body { gap: 12px; }
.dfile-data { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-sunken); cursor: pointer; }
.dfile-data input { margin-top: 3px; }
.dfile-data span { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text); }
.dfile-data small { color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.dfile-summary { display: flex; gap: 12px; align-items: center; }
.dfile-summary > .icon { color: var(--accent); flex: none; width: 28px; height: 28px; }
.dfile-summary div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--text-muted); }
.dfile-summary b { color: var(--text); font-size: 14px; }
.dfile-label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-top: 4px; }
.dfile-sources { display: flex; flex-direction: column; gap: 8px; }
.dfile-source { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg-sunken); }
.dfile-src-info { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.dfile-src-info > .icon { color: var(--text-dim); margin-top: 2px; flex: none; }
.dfile-src-info div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--text); min-width: 0; }
.dfile-src-info small { color: var(--text-muted); font-size: 11.5px; }
.dfile-src-pick { display: flex; gap: 6px; align-items: center; }
.dfile-src-pick .select { min-width: 180px; }
.dfile-modes { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text); }
.dfile-modes label { display: flex; gap: 8px; align-items: center; cursor: pointer; }

/* Text boxes ----------------------------------------------------------------------------------------------------- */
.dtile.dtile-textbox { background: transparent; border: 0; box-shadow: none; overflow: visible; }
.dtext-host { position: absolute; inset: 0; }
.dashboard-view .dtile-textbox .dtext-host { cursor: grab; }
.dashboard-view .dtile-textbox:hover .dtext { outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
body.dash-tv .dtile-textbox:hover .dtext, .share-view .dtile-textbox:hover .dtext { outline: 0; }
.dtile-menu-float { position: absolute; top: 6px; right: 6px; z-index: 2; background: var(--bg-elevated); border: 1px solid var(--border-strong); }
.dtext { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 10px 16px; border-radius: 12px; overflow: auto;
  color: var(--text); line-height: 1.45; overflow-wrap: anywhere; }
/* Vertical position with auto margins: when the text is taller than the box it scrolls from the top instead of being cut off */
.dtext.valign-middle .dtext-inner { margin: auto 0; } .dtext.valign-bottom .dtext-inner { margin-top: auto; }
.dtext.align-left { text-align: left; } .dtext.align-center { text-align: center; } .dtext.align-right { text-align: right; }
.dtext.size-s { font-size: 13px; } .dtext.size-m { font-size: 16px; } .dtext.size-l { font-size: 22px; }
.dtext.size-xl { font-size: 32px; } .dtext.size-xxl { font-size: 48px; }
.dtext.color-muted { color: var(--text-muted); } .dtext.color-accent { color: var(--accent); } .dtext.color-success { color: var(--success); }
.dtext.color-warning { color: var(--warning); } .dtext.color-danger { color: var(--danger); }
.dtext.bg-card { background: linear-gradient(180deg, #151923, #12151c); }
.dtext.bg-accent { background: var(--accent-soft); } .dtext.bg-success { background: var(--success-soft); }
.dtext.bg-warning { background: var(--warning-soft); } .dtext.bg-danger { background: var(--danger-soft); }
.dtext.bordered { border: 1px solid var(--border); }
.dtext.bordered.bg-accent { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.dtext.bordered.bg-success { border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.dtext.bordered.bg-warning { border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.dtext.bordered.bg-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.dtext-inner > :first-child { margin-top: 0; } .dtext-inner > :last-child { margin-bottom: 0; }
.dtext h1, .dtext h2, .dtext h3 { margin: 0.2em 0 0.3em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: inherit; }
.dtext h1 { font-size: 1.9em; } .dtext h2 { font-size: 1.45em; } .dtext h3 { font-size: 1.15em; }
.dtext p { margin: 0 0 0.6em; }
.dtext ul, .dtext ol { margin: 0 0 0.6em; padding-left: 1.3em; text-align: left; }
.dtext.align-center ul, .dtext.align-center ol { display: inline-block; }
.dtext li { margin: 0.15em 0; }
.dtext hr { border: 0; border-top: 1px solid var(--border-strong); margin: 0.6em 0; }
.dtext code { font-family: var(--mono); font-size: 0.9em; padding: 0.05em 0.35em; border-radius: 4px; background: var(--bg-sunken); }
.dtext a { color: var(--accent); }
.dtext strong { font-weight: 700; }
.dtext-placeholder { color: var(--text-dim); font-style: italic; }

/* Pictures */
.dimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; overflow: hidden; }
.dimg img { width: 100%; height: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.dimg.fit-contain img { object-fit: contain; } .dimg.fit-cover img { object-fit: cover; } .dimg.fit-fill img { object-fit: fill; }
.dimg.bg-card { background: linear-gradient(180deg, #151923, #12151c); }
.dimg.bg-card.fit-contain img { padding: 8px; box-sizing: border-box; }
.dimg.bordered { border: 1px solid var(--border); }
.dimg-empty { color: var(--text-dim); font-size: 12px; }
.dashboard-view .dtile-image:hover .dimg { outline: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
body.dash-tv .dtile-image:hover .dimg { outline: 0; }

/* Picture dialog */
.ie-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.ie-preview { position: relative; min-height: 280px; border-radius: 12px; background: var(--bg-app); border: 1px solid var(--border);
  background-image: linear-gradient(45deg, #151922 25%, transparent 25%), linear-gradient(-45deg, #151922 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #151922 75%), linear-gradient(-45deg, transparent 75%, #151922 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.ie-preview .dimg { inset: 10px; }
.ie-drop { position: absolute; inset: 10px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center;
  border: 2px dashed var(--border-strong); border-radius: 10px; color: var(--text-muted); font-size: 13px; }
.ie-drop:hover { border-color: var(--accent); color: var(--text); }
.ie-side { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.ie-hint { font-size: 11.5px; color: var(--text-dim); margin-top: -6px; }
.ie-opt > span { min-width: 74px; }
.ie-side .field { width: 100%; }
@media (max-width: 720px) { .ie-grid { grid-template-columns: 1fr; } }

/* Text box editor */
.text-editor-modal .modal-body { gap: 14px; }
.te-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.te-edit { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.te-tools { display: flex; flex-wrap: wrap; gap: 3px; }
.te-tool { min-width: 30px; height: 28px; padding: 0 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text); font-size: 12.5px; font-weight: 600; }
.te-tool:hover { background: var(--bg-hover); }
.te-italic { font-style: italic; } .te-strike { text-decoration: line-through; }
.te-text { height: 240px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 10px; }
.te-help { font-size: 11px; color: var(--text-dim); } .te-help code { font-size: 10.5px; }
.te-preview-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.te-label { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); height: 28px; display: flex; align-items: flex-end; }
.te-preview { position: relative; flex: 1; min-height: 240px; border-radius: 12px; background: var(--bg-app); border: 1px solid var(--border); padding: 10px; }
.te-preview .dtext { inset: 10px; }
.te-options { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; padding-top: 4px; border-top: 1px solid var(--border); }
.te-opt { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); }
.te-seg button { height: 26px; padding: 0 9px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.te-seg button .icon { display: none; }
.te-swatches { display: flex; gap: 5px; }
.te-swatch { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border-strong); font-weight: 700; font-size: 12px; background: var(--bg-elevated); }
.te-swatch.active { outline: 2px solid var(--accent); outline-offset: 1px; }
.te-swatch.text-default { color: var(--text); } .te-swatch.text-muted { color: var(--text-muted); } .te-swatch.text-accent { color: var(--accent); }
.te-swatch.text-success { color: var(--success); } .te-swatch.text-warning { color: var(--warning); } .te-swatch.text-danger { color: var(--danger); }
.te-swatch.bgs-none { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--border) 4px 5px); }
.te-swatch.bgs-card { background: #171b24; } .te-swatch.bgs-accent { background: var(--accent-soft); } .te-swatch.bgs-success { background: var(--success-soft); }
.te-swatch.bgs-warning { background: var(--warning-soft); } .te-swatch.bgs-danger { background: var(--danger-soft); }
.te-check { cursor: pointer; }
@media (max-width: 760px) { .te-grid { grid-template-columns: 1fr; } }

/* Dashboard filters (slicers) */
.dtile-filter .dtile-head { padding: 6px 6px 2px 12px; min-height: 32px; }
.dtile-filter-icon { display: inline-flex; color: var(--text-dim); }
.dtile-filter.slc-active .dtile-filter-icon { color: var(--accent); }
.dtile-filter.slc-active { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.slc-clear { opacity: 0; pointer-events: none; transition: opacity 0.12s; }
.dtile-filter.slc-active .slc-clear { opacity: 1; pointer-events: auto; }
.slc-host { container-type: normal; }
.slc { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px; padding: 2px 10px 10px; min-height: 0; font-size: 12.5px; }
.slc-search { position: relative; flex: none; }
.slc-search .icon { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--text-dim); }
.slc-search .input { width: 100%; padding-left: 26px; height: 28px; }
.slc-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; }
.slc-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; color: var(--text); line-height: 1.3; }
.slc-item:hover { background: var(--bg-hover); }
.slc-item input { flex: none; accent-color: var(--accent); width: 14px; height: 14px; margin: 0; cursor: pointer; }
.slc-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slc-all { color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--border); border-radius: 6px 6px 0 0; margin-bottom: 2px; }
.slc-blank span { font-style: italic; color: var(--text-muted); }
.slc-gone { opacity: 0.5; }
.slc-note { font-size: 11px; color: var(--text-dim); padding: 2px 0; }
.slc-missing { display: flex; gap: 6px; align-items: flex-start; color: var(--warning); line-height: 1.4; }
.slc-dd { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg-elevated); color: var(--text); font-size: 13px; text-align: left; }
.slc-dd span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slc-dd:hover { border-color: var(--accent); }
.slc-dd.active { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: var(--accent-soft); }
.slc-popover { padding: 8px; }
.slc-pop { position: static; padding: 0; max-height: 340px; }
.slc-pop .slc-list { max-height: 280px; margin: 4px 0 0; }
.slc-buttons { display: flex; flex-wrap: wrap; gap: 6px; overflow: auto; align-content: flex-start; min-height: 0; }
.slc-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text);
  font-size: 12.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slc-chip:hover { border-color: var(--accent); }
.slc-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.slc-range, .slc-dates { display: flex; flex-direction: column; gap: 6px; }
.slc-range-inputs { display: flex; align-items: center; gap: 6px; color: var(--text-dim); }
.slc-range-inputs .input { flex: 1; min-width: 0; height: 30px; }
.slc-dates .select { height: 30px; }
.slc-dates input[type="date"] { color-scheme: dark; }
.slc-slider { position: relative; height: 22px; }
.slc-slider input[type="range"] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 22px; }
.slc-slider input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--border-strong); }
.slc-slider input[type="range"]:last-child::-webkit-slider-runnable-track { background: transparent; }
.slc-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 14px; height: 14px; margin-top: -5px;
  border-radius: 50%; background: var(--accent); border: 2px solid #fff; cursor: pointer; }
.dtile-filtered { display: inline-flex; color: var(--accent); margin-right: 6px; cursor: help; }
.dash-clear-filters { color: var(--accent); }

/* Filter settings dialog */
.slicer-editor .se-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.slicer-editor .se-row > label:first-child { width: 72px; flex: none; padding-top: 6px; font-size: 12.5px; color: var(--text-muted); }
.slicer-editor .se-row > .input, .slicer-editor .se-row > .select { flex: 1; }
.se-fields { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 200px; overflow: auto; padding: 2px; }
.se-fields.se-need { outline: 1px solid var(--danger); border-radius: 8px; }
.se-field { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text); font-size: 12.5px; text-align: left; min-width: 0; }
.se-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-field small { color: var(--text-dim); font-size: 10.5px; }
.se-field:hover { border-color: var(--accent); }
.se-field.on { border-color: var(--accent); background: var(--accent-soft); }
.se-field .icon { color: var(--text-dim); flex: none; }
.se-checks > div { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.se-note { display: flex; gap: 6px; font-size: 12px; color: var(--text-dim); line-height: 1.5; margin: 4px 0 0; }
.se-note .icon { flex: none; margin-top: 3px; }

/* Shared queries: each visual's corner shows its query (one colour per query); a legend lists them with Copy */
.dash-qcount { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.dash-qcount:hover { color: var(--accent); }
.dash-head .btn.active { color: var(--accent); background: var(--accent-soft); }
.dash-show-queries .dtile[data-q] { border-color: color-mix(in srgb, var(--q) 55%, var(--border)); }
.dash-show-queries .dtile[data-q] .dtile-head { padding-left: 50px; }
.dtile-qmark { display: none; position: absolute; left: 0; top: 0; z-index: 3; padding: 4px 10px 4px 9px; border-bottom-right-radius: 10px;
  background: var(--q); color: #0b0d12; font-size: 11px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.dash-show-queries .dtile-qmark { display: block; }
.dtile-qmark:hover { filter: brightness(1.12); }
.dash-qlegend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-panel); }
.dash-qlegend[hidden] { display: none; }
.dql-title { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-right: 4px; }
.dql-chip { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--q) 50%, var(--border));
  background: color-mix(in srgb, var(--q) 12%, transparent); overflow: hidden; }
.dql-name { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 9px; font-size: 12px; font-weight: 700; color: var(--text); }
.dql-name i { width: 9px; height: 9px; border-radius: 50%; background: var(--q); }
.dql-name small { font-weight: 500; color: var(--text-muted); font-size: 11.5px; }
.dql-copy { display: inline-flex; padding: 5px 9px 5px 6px; color: var(--text-muted); }
.dql-copy:hover, .dql-name:hover { color: var(--q); }
.dq-popover { padding: 0; overflow: hidden; }
.dq-pop { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-top: 3px solid var(--q); }
.dq-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dq-badge { padding: 2px 8px; border-radius: 6px; background: var(--q); color: #0b0d12; font-size: 11px; font-weight: 800; }
.dq-meta { font-size: 11.5px; color: var(--text-dim); }
.dq-visuals { display: flex; flex-wrap: wrap; gap: 4px; }
.dq-visual { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); font-size: 11.5px; max-width: 100%; }
.dq-visual span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dq-visual:hover { border-color: var(--q); }
.dq-sql { margin: 0; max-height: 260px; overflow: auto; padding: 10px; border-radius: 8px; background: var(--bg-app); border: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.dq-actions { display: flex; justify-content: flex-end; }
.dtile.dq-flash { box-shadow: 0 0 0 3px var(--q), 0 6px 18px rgba(0, 0, 0, 0.25); }
body.dash-tv .dtile-qmark, body.dash-tv .dash-qlegend { display: none !important; }
body.dash-tv .dash-show-queries .dtile[data-q] .dtile-head { padding-left: 14px; }
body.dash-tv .dash-show-queries .dtile[data-q] { border-color: var(--border); }

/* Pages (tabs) */
.dtile[hidden] { display: none; }
.dash-tabs { display: flex; align-items: flex-end; gap: 6px; padding: 6px 16px 0; border-bottom: 1px solid var(--border); background: var(--bg-panel); min-height: 40px; }
.dash-tabs[hidden] { display: none; }
.dash-tablist { display: flex; align-items: flex-end; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.dash-tab { position: relative; display: inline-flex; align-items: center; gap: 4px; max-width: 220px; padding: 7px 8px 8px 14px; border-radius: 8px 8px 0 0;
  border: 1px solid transparent; border-bottom: 0; color: var(--text-muted); font-size: 13px; font-weight: 500; white-space: nowrap; margin-bottom: -1px; }
.dash-tab > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.dash-tab:hover { color: var(--text); background: var(--bg-hover); }
.dash-tab.active { color: var(--text); background: var(--bg-app); border-color: var(--border); font-weight: 600; }
.dash-tab.active::after { content: ''; position: absolute; left: 10px; right: 10px; top: 0; height: 2px; border-radius: 2px; background: var(--accent); }
.dash-tab.dragging { opacity: 0.5; }
.dash-tab-menu { display: inline-flex; padding: 2px; border-radius: 4px; opacity: 0; color: var(--text-dim); }
.dash-tab:hover .dash-tab-menu, .dash-tab.active .dash-tab-menu { opacity: 1; }
.dash-tab-menu:hover { background: var(--bg-elevated); color: var(--text); }
.dash-tab-add { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 4px; border-radius: 8px; color: var(--text-muted); }
.dash-tab-add:hover { background: var(--bg-hover); color: var(--accent); }
.dash-rotate { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.dash-rotate .select { height: 26px; font-size: 12px; }
body.dash-tv .dash-tabs { padding-top: 4px; min-height: 34px; }
body.dash-tv .dash-tab { font-size: 14px; padding: 6px 16px 7px; }
.pin-pages { display: flex; flex-direction: column; gap: 1px; margin: -2px 0 4px 26px; padding-left: 8px; border-left: 1px solid var(--border); }
.pin-page { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; font-size: 12px; color: var(--text-muted); text-align: left; }
.pin-page:hover { background: var(--bg-hover); color: var(--text); }
.pin-page span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Converted dashboards (QueryX BI Studio): review banner + report */
.dash-origin > .icon { color: var(--accent); }
.dash-origin { background: color-mix(in srgb, var(--accent) 10%, var(--bg-panel)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); }
.dash-origin > span { flex: 1; min-width: 0; }
.origin-report .or-meta { margin: 0 0 12px; font-size: 12.5px; color: var(--text-dim); }
.or-group { margin-bottom: 14px; }
.or-group h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; }
.or-group h4 small { color: var(--text-dim); font-weight: 500; }
.or-unsupported h4 .icon { color: var(--danger); }
.or-approximated h4 .icon { color: var(--warning); }
.or-info h4 .icon { color: var(--text-dim); }
.or-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow: auto; }
.or-group li { display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 8px; background: var(--bg-elevated); font-size: 12.5px; }
.or-group li b { font-weight: 600; color: var(--text); }
.or-group li span { color: var(--text-muted); }

/* Floating tiles (tile menu › Float): placed freely, may overlap; z-order set inline from their layer */
.dtile.dtile-floating:not(.dtile-textbox) { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 14px 34px rgba(0, 0, 0, 0.45); }
body:not(.dash-tv) .dashboard-view .dtile.dtile-floating:hover { outline: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* Filters pane (dashboard filters) */
.dash-body { flex: 1; min-height: 0; display: flex; }
.dash-body > .dash-scroll { min-width: 0; }
.dash-fpane { width: 280px; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--border); background: var(--bg-panel); min-height: 0; }
.dash-fpane[hidden] { display: none; }
.dfp-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 10px 14px; border-bottom: 1px solid var(--border); font-size: 13px; }
.dfp-head > .icon { color: var(--accent); }
.dfp-count { font-size: 11px; color: var(--text-dim); }
.dfp-list { flex: 1; min-height: 0; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.dfp-foot { padding: 10px; border-top: 1px solid var(--border); }
.dfp-foot[hidden] { display: none; }
.dfp-add { width: 100%; justify-content: center; }
.dfp-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 10px; text-align: center; color: var(--text-dim); font-size: 12.5px; line-height: 1.5; }
.dfp-empty p { margin: 0; }
.dfp-card { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-elevated); }
.dfp-card.dfp-active { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.dfp-card-head { display: flex; align-items: center; gap: 2px; padding: 4px 4px 0 6px; }
.dfp-card-head .icon-btn { width: 24px; height: 24px; opacity: 0.6; }
.dfp-card-head .icon-btn:hover { opacity: 1; }
.dfp-card:not(.dfp-active) .dfp-reset { visibility: hidden; }
.dfp-name { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px; text-align: left; color: var(--text); font-weight: 600; font-size: 12.5px; }
.dfp-name span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfp-name small { margin-left: auto; font-weight: 400; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.dfp-card.dfp-active .dfp-name small { color: var(--accent); }
.dfp-name .icon { flex: none; color: var(--text-dim); transition: transform 0.12s; }
.dfp-collapsed .dfp-name .icon { transform: rotate(-90deg); }
.dfp-scope { display: flex; align-items: center; gap: 5px; padding: 0 10px 6px 30px; font-size: 11px; color: var(--text-dim); }
.dfp-body { padding: 0 8px 10px; }
.dfp-collapsed .dfp-body, .dfp-collapsed .dfp-scope { display: none; }
.dfp-readonly [data-dfp="edit"], .dfp-readonly [data-dfp="remove"] { display: none; }
.dash-fcount { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10.5px; font-weight: 600; display: inline-flex;
  align-items: center; justify-content: center; background: var(--bg-hover); color: var(--text-muted); }
.dash-filters-on .dash-fcount { background: var(--accent); color: #fff; }
.dash-mobile ~ .dash-fpane, .dash-body:has(.dash-mobile) .dash-fpane { width: 240px; }
@media (max-width: 720px) { .dash-fpane { position: absolute; right: 0; top: 0; bottom: 0; z-index: 30; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4); }
  .dash-body { position: relative; } }

/* Dashboard filter editor: scope */
.dfe-scope { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dfe-scope .segmented button { display: inline-flex; align-items: center; gap: 5px; }
.dfe-visuals { width: 100%; max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.dfe-visuals[hidden] { display: none; }
.dfe-visuals.se-need { border-color: var(--danger); }
.dfe-vtools { display: flex; gap: 4px; margin-bottom: 2px; }
.dfe-vpage { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-top: 6px; }
.dfe-visual { font-size: 12.5px; }
.dfe-visual small { color: var(--warning); font-size: 10.5px; }
.dfe-visual.dfe-nofield span { color: var(--text-dim); }
/* In the pane the control flows with its card (in a tile it fills the tile body) */
.dfp-body .slc { position: static; padding: 0 2px; }
.dfp-body .slc-list { max-height: 210px; flex: none; }

/* Floating tiles: placed to the pixel (no easing while they move), selected one, position read-out */
.dtile.dtile-floating { transition: none; }
body:not(.dash-tv) .dashboard-view .dtile.dtile-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.dtile-pos { position: absolute; left: 6px; bottom: 6px; z-index: 6; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.75); color: #fff; pointer-events: none; white-space: nowrap; }

/* Title + subtitle in a tile's title bar */
.dtile-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dtile-titles .dtile-title { flex: none; }
.dtile-sub { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 400; }
.dtile-sub[hidden] { display: none; }

/* Undo / redo */
.dash-undo { display: inline-flex; gap: 2px; }
.dash-undo .icon-btn[disabled] { opacity: 0.35; cursor: default; }
body.dash-tv .dash-undo { display: none; }

/* Visual options dialog */
.to-sub { flex: 1; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.to-sub .segmented { align-self: flex-start; }
.to-sub [hidden] { display: none !important; }
.to-tokens { display: flex; flex-wrap: wrap; gap: 4px; max-height: 140px; overflow: auto; }
.to-hint { width: 100%; font-size: 11.5px; color: var(--text-dim); }
.to-token { font-size: 11.5px; padding: 2px 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); }
.to-token:hover { border-color: var(--accent); color: var(--text); }
.to-preview { font-size: 12.5px; color: var(--text); padding: 6px 10px; border-radius: 8px; background: var(--bg-panel); border: 1px dashed var(--border); }
.to-preview span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-right: 6px; }

/* A required filter (always one value): no clear button */
.dtile-filter.slc-required .slc-clear { display: none; }

/* Header off (Visual options / tile menu): just the visual - no title bar, not even on hover. Right-click the tile for its
   menu, Alt + drag to move it. */
.dtile.dtile-noheader > .dtile-head, .dtile.dtile-noheader-view > .dtile-head { display: none; }
body.dash-moving .dtile, body.dash-moving .dtile * { cursor: grabbing; }

/* Page size: a fixed page (W x H) drawn at its own size and scaled to the window */
.dash-canvas { position: relative; }
.dash-fixed .dash-canvas { margin: 0 auto; background: color-mix(in srgb, var(--bg-panel) 55%, transparent); border-radius: 6px;
  box-shadow: 0 0 0 1px var(--border); }
.dash-fixed .dash-grid { position: absolute; left: 0; top: 0; transform-origin: 0 0; min-height: 0; }
.dash-page-edge { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed color-mix(in srgb, var(--accent) 45%, transparent);
  pointer-events: none; z-index: 1; }
.dash-page-edge span { position: absolute; right: 6px; top: 2px; font-size: 10.5px; color: var(--text-dim); }
body.dash-tv .dash-page-edge { display: none; }

/* Page size dialog */
.ps-modes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ps-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.ps-mode:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.ps-mode span { display: flex; flex-direction: column; gap: 2px; }
.ps-mode small { color: var(--text-dim); font-size: 12px; }
.ps-fixed.ps-off { opacity: 0.45; }
.page-size .se-row .input[type="number"] { width: 100px; flex: none; }
.ps-x, .ps-unit { padding-top: 6px; color: var(--text-dim); }

/* Border & background off (tile menu / Visual options): no card - the tile blends into the dashboard's background */
.dtile.dtile-noborder { background: transparent; border-color: transparent; box-shadow: none; }
.dtile.dtile-noborder.slc-active { border-color: transparent; }
.dtile.dtile-noborder .dtile-head { background: transparent; }
body:not(.dash-tv) .dashboard-view .dtile.dtile-noborder:hover { outline: 1px dashed color-mix(in srgb, var(--border-strong) 70%, transparent); outline-offset: -1px; }

/* The tile clicked last (what Ctrl+C copies) */
body:not(.dash-tv) .dashboard-view .dtile.dtile-picked:not(.dtile-selected):not(.dtile-noborder) { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 6px 18px rgba(0, 0, 0, 0.25); }
