/* ══════════════════════════════════════════════════════════════════════════
   ElephantSqlDB  ·  Report Builder  ·  Scoped Dark Theme
   ──────────────────────────────────────────────────────────────────────────
   ALL rules are gated behind  body.rb-dark-page  which is added to <body>
   ONLY while the /report-builder route is active (ReportBuilderComponent
   injects it on first render and removes it on dispose).
   This file has ZERO effect on any other page or component — same gating
   discipline as dashboard-theme.css so the two surfaces coexist cleanly.

   Palette inherited from dashboard-theme.css:
     bg          #0a0a14
     surfaces    #0e0e1a  #14141f  #181828  #1a1a2a  #1e1e2e  #22223a
     border      #252535
     accent      #FF4F1F   (primary actions, selection, brand glyph)
     secondary   #3B9EFF   (parameters, info)
     text        #ccd / #dde (primary) · #aab / #888 (secondary) · #555/#444/#333 (dim)
     error       #5a1515 / #e08080
     ok-badge    #5a9a5a on #182818 / #2a4a2a
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Page background ────────────────────────────────────────────────────── */
html.rb-dark-page,
body.rb-dark-page {
    background-color: #0a0a14 !important;
    color: #ccd;
    font-family: 'Segoe UI', system-ui, sans-serif;
    overflow-x: hidden;
}

/* ── Strip Blazor default layout chrome (matches dashboard scoping) ─────── */
body.rb-dark-page div.page,
body.rb-dark-page div.page > main,
body.rb-dark-page div.page > main > article,
body.rb-dark-page .content,
body.rb-dark-page .content.px-4 {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
}

body.rb-dark-page div.sidebar,
body.rb-dark-page div.top-row {
    display: none !important;
}

/* ── Form element overrides (mirroring dashboard-theme.css conventions) ─── */
body.rb-dark-page select {
    background-color: #181828;
    border: 1px solid #252535;
    color: #aab;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
body.rb-dark-page select:focus {
    outline: none;
    border-color: rgba(255, 79, 31, 0.27);
}
body.rb-dark-page select option {
    background: #181828;
    color: #aab;
}

body.rb-dark-page input[type=text],
body.rb-dark-page input[type=number],
body.rb-dark-page input[type=search],
body.rb-dark-page textarea {
    background-color: #0e0e1a !important;
    border: 1px solid #252535 !important;
    color: #dde !important;
    font-family: 'Segoe UI', system-ui, sans-serif;
}
body.rb-dark-page input[type=text]:focus,
body.rb-dark-page input[type=number]:focus,
body.rb-dark-page input[type=search]:focus,
body.rb-dark-page textarea:focus {
    border-color: rgba(255, 79, 31, 0.27) !important;
    outline: none !important;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
body.rb-dark-page ::-webkit-scrollbar              { width: 6px; height: 6px; }
body.rb-dark-page ::-webkit-scrollbar-track        { background: #0e0e1c; }
body.rb-dark-page ::-webkit-scrollbar-thumb        { background: #2a2a3a; border-radius: 3px; }
body.rb-dark-page ::-webkit-scrollbar-thumb:hover  { background: #3a3a4a; }

/* ── Toolbar (mirrors .db-toolbar primitives exactly) ───────────────────── */
body.rb-dark-page .rb-toolbar {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 0 14px !important;
    height: 52px !important;
    background: #0a0a14 !important;
    border-bottom: 1px solid #1a1a2a !important;
}

body.rb-dark-page .tb-hex    { color: #FF4F1F !important; font-size: 18px !important; line-height: 1 !important; flex-shrink: 0 !important; }
body.rb-dark-page .tb-brand  { color: #dde !important; font-weight: 600 !important; font-size: 14px !important; flex-shrink: 0 !important; }
body.rb-dark-page .tb-sub    { color: #555 !important; font-size: 11px !important; flex-shrink: 0 !important; }
body.rb-dark-page .tb-sep    { color: #1e1e2e !important; font-size: 20px !important; flex-shrink: 0 !important; }
body.rb-dark-page .tb-lbl    { font-size: 8.5px !important; letter-spacing: 1px !important; color: #444 !important; text-transform: uppercase !important; flex-shrink: 0 !important; }
body.rb-dark-page .db-group  { display: flex !important; align-items: center !important; gap: 5px !important; flex-shrink: 0 !important; }

body.rb-dark-page .tb-sel {
    background: #181828 !important; border: 1px solid #252535 !important;
    border-radius: 4px !important; color: #aab !important;
    font-size: 11px !important; padding: 3px 7px !important;
    height: 28px !important; cursor: pointer !important;
    min-width: 110px !important;
}

body.rb-dark-page .tb-btn {
    background: #181828 !important; border: 1px solid #252535 !important;
    border-radius: 4px !important; color: #888 !important;
    font-size: 10.5px !important; padding: 0 9px !important;
    height: 26px !important; cursor: pointer !important; transition: all .12s !important;
    display: inline-flex !important; align-items: center !important; gap: 4px !important;
}
body.rb-dark-page .tb-btn:hover {
    color: #ccd !important; border-color: rgba(255, 79, 31, 0.27) !important;
}
body.rb-dark-page .tb-btn.danger:hover {
    color: #e08080 !important; border-color: #5a1515 !important;
}
body.rb-dark-page .tb-btn:disabled {
    opacity: 0.4 !important; cursor: not-allowed !important;
}

body.rb-dark-page .tb-action-btn {
    background: #FF4F1F !important; border: none !important;
    border-radius: 5px !important; color: #fff !important;
    font-size: 11px !important; font-weight: 600 !important;
    padding: 0 13px !important; height: 30px !important;
    cursor: pointer !important; transition: background .12s !important;
}
body.rb-dark-page .tb-action-btn:hover { background: #e84618 !important; }
body.rb-dark-page .tb-action-btn:disabled { opacity: 0.5 !important; cursor: not-allowed !important; }

body.rb-dark-page .tb-action-btn.secondary {
    background: #1a1a2a !important; border: 1px solid #252535 !important; color: #aab !important;
}
body.rb-dark-page .tb-action-btn.secondary:hover {
    color: #ccd !important; border-color: rgba(255, 79, 31, 0.27) !important;
}

body.rb-dark-page .tb-new-input {
    background: #0e0e1a !important; border: 1px solid #FF4F1F !important;
    border-radius: 4px !important; color: #dde !important;
    font-size: 11px !important; padding: 3px 7px !important; height: 28px !important;
    min-width: 140px !important; outline: none !important;
}

body.rb-dark-page .tb-right {
    margin-left: auto !important; display: flex !important; align-items: center !important; gap: 7px !important;
}
body.rb-dark-page .tb-count { color: #2a2a3a !important; font-size: 11px !important; }

body.rb-dark-page .rf-badge {
    background: #182818 !important; border: 1px solid #2a4a2a !important;
    border-radius: 3px !important; color: #5a9a5a !important;
    font-size: 10px !important; padding: 2px 10px !important;
    min-width: 36px !important; text-align: center !important;
    font-family: Consolas, monospace !important;
}
body.rb-dark-page .rf-badge.flash {
    background: #2a1818 !important; border-color: #5a1515 !important; color: #e08080 !important;
}

body.rb-dark-page .sb-err {
    color: #e08080 !important; font-size: 10.5px !important;
    background: #2a1818 !important; border: 1px solid #5a1515 !important;
    padding: 2px 7px !important; border-radius: 3px !important;
}

/* ── 3-pane workspace ───────────────────────────────────────────────────── */
body.rb-dark-page .rb-canvas {
    display: grid !important;
    grid-template-columns: 232px 1fr 280px !important;
    height: calc(100vh - 52px - 28px) !important;   /* toolbar + datasources strip */
    background: #1e1e2e !important;                  /* matches canvas wrap (mockup) */
    overflow: hidden !important;
}

/* ── Toolbox (left) ─────────────────────────────────────────────────────── */
body.rb-dark-page .rb-toolbox {
    background: #0e0e1a !important;
    border-right: 1px solid #1a1a2a !important;
    overflow-y: auto !important;
}
body.rb-dark-page .rb-toolbox .tb-search { padding: 9px 10px; border-bottom: 1px solid #1a1a2a; }
body.rb-dark-page .rb-toolbox .tb-search input {
    width: 100% !important; padding: 5px 9px !important;
    background: #0e0e1a !important; border: 1px solid #252535 !important; color: #aab !important;
    font-size: 11px !important; border-radius: 3px !important;
}
body.rb-dark-page .rb-toolbox .tb-search input::placeholder { color: #333 !important; }

body.rb-dark-page .tb-group-sec   { padding: 4px 0; border-bottom: 1px solid #14141f; }
body.rb-dark-page .tb-group-title {
    padding: 7px 12px; font-size: 8.5px; text-transform: uppercase;
    letter-spacing: 1px; color: #444; font-weight: 600;
    display: flex; align-items: center; justify-content: space-between;
}
body.rb-dark-page .tb-group-title .chev { font-size: 9px; color: #2a2a3a; }

body.rb-dark-page .tb-item {
    padding: 6px 12px 6px 14px; display: flex; align-items: center; gap: 9px;
    cursor: grab; color: #888; font-size: 11px; transition: all .1s;
    user-select: none;
}
body.rb-dark-page .tb-item:hover { background: rgba(255, 79, 31, 0.08); color: #ccd; }
body.rb-dark-page .tb-item:active { cursor: grabbing; }
body.rb-dark-page .tb-item .ico {
    width: 20px; height: 20px; background: #181828; border-radius: 3px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #FF4F1F; font-size: 11px; border: 1px solid #1e1e2e;
}
body.rb-dark-page .tb-item:hover .ico {
    background: #22223a; border-color: rgba(255, 79, 31, 0.27);
}

/* ── Canvas (center) ────────────────────────────────────────────────────── */
body.rb-dark-page .rb-canvas-wrap {
    /* Flex column with horizontal centering. The mockup centers the tabs,
       ruler, and page horizontally within the canvas. The previous rule
       relied on `margin: 0 auto` on each child, which was being defeated
       by an ancestor's layout. align-items:center is bulletproof — it
       centers every child regardless of width / overflow / parent quirks. */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    background: #1e1e2e !important;          /* mockup canvas color (RGB 30,30,46) */
    overflow: auto !important;
    padding: 18px 18px 36px !important;
    background-image: radial-gradient(circle at center, rgba(255, 79, 31, 0.025) 0%, transparent 60%) !important;
}

/* Multi-page tab strip */
body.rb-dark-page .report-tabs {
    display: flex; gap: 2px; max-width: 816px; margin: 0 auto 0;
    align-items: stretch; padding: 0 4px;
}
body.rb-dark-page .rt {
    background: #14141f; color: #888; padding: 8px 16px; font-size: 11px;
    border: 1px solid #1e1e2e; border-bottom: none;
    border-radius: 4px 4px 0 0; cursor: pointer; transition: all .12s;
    display: flex; align-items: center; gap: 6px;
    user-select: none;
}
body.rb-dark-page .rt:hover { color: #ccd; background: #181828; }
body.rb-dark-page .rt.active {
    background: #1e1e2e; color: #FF4F1F; border-color: #252535;
    border-bottom: 1px solid #1e1e2e; position: relative; top: 1px; font-weight: 600;
}
body.rb-dark-page .rt .rt-ico { font-size: 11px; }
body.rb-dark-page .rt-rename {
    background: #0e0e1a !important; border: 1px solid #FF4F1F !important;
    color: #dde !important; font-size: 11px !important;
    padding: 2px 5px !important; min-width: 100px !important;
}
body.rb-dark-page .rt-add {
    background: transparent; color: #444; padding: 8px 12px; font-size: 14px;
    border: 1px dashed #1e1e2e; border-bottom: none; border-radius: 4px 4px 0 0;
    cursor: pointer; transition: all .12s;
}
body.rb-dark-page .rt-add:hover { color: #FF4F1F; border-color: rgba(255, 79, 31, 0.27); }

/* Ruler */
body.rb-dark-page .ruler-h {
    height: 16px; background: #14141f; border: 1px solid #1e1e2e;
    border-bottom: none; margin: 0 auto; max-width: 816px;
    display: flex; font-size: 8px; color: #333;
}
body.rb-dark-page .ruler-h span { flex: 1; border-right: 1px solid #1a1a2a; padding: 3px 0 0 3px; }

/* The page — darker than the canvas wrap so it reads as "paper on a
   workbench". Matches the mockup, which uses #0a0a14 for the page and
   #1e1e2e for the surrounding canvas (the previous values were swapped). */
body.rb-dark-page .page {
    background: #0a0a14 !important;
    margin: 0 auto !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.6) !important;
    border: 1px solid #252535 !important;
    position: relative !important;
}

/* Bands */
body.rb-dark-page .band {
    border-bottom: 1px dashed #2a2a3a;
    position: relative;
    padding: 14px 42px;
    min-height: 60px;
}
body.rb-dark-page .band-label {
    position: absolute; left: 0; top: 0;
    background: #14141f; color: #555;
    font-size: 8.5px; padding: 2px 8px;
    border-bottom-right-radius: 3px;
    letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
    border-right: 1px solid #252535; border-bottom: 1px solid #252535;
}
body.rb-dark-page .band.detail { min-height: 240px; }
body.rb-dark-page .band.detail .band-label { color: #FF4F1F; }
body.rb-dark-page .band.group-header .band-label,
body.rb-dark-page .band.group-footer .band-label { color: #3B9EFF; }
body.rb-dark-page .band.report-header .band-label,
body.rb-dark-page .band.report-footer .band-label { color: #aab; }

/* Active drop-target band — receives new items added from the toolbox.
   The user picks the target by clicking on the band; defaults to Detail. */
body.rb-dark-page .band {
    cursor: pointer;
    transition: box-shadow .12s, background .12s;
}
body.rb-dark-page .band:hover {
    background: rgba(255, 79, 31, 0.015);
}
body.rb-dark-page .band.active-target {
    box-shadow: inset 4px 0 0 0 #FF4F1F;
    background: rgba(255, 79, 31, 0.025);
}
body.rb-dark-page .band.active-target .band-label {
    color: #FF4F1F !important;
    background: #1a1a2a;
}

/* Toolbox "ADDING TO" indicator — shows the active drop target. */
body.rb-dark-page .tb-target-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #0a0a14;
    border-bottom: 1px solid #1a1a2a;
}
body.rb-dark-page .tb-target-lbl {
    font-size: 8.5px;
    letter-spacing: 1px;
    color: #444;
    text-transform: uppercase;
    font-weight: 600;
}
body.rb-dark-page .tb-target-band {
    font-size: 10.5px;
    color: #FF4F1F;
    font-weight: 600;
    flex: 1;
}

/* ── Page tab close (✕) button ─────────────────────────────────────────── */
body.rb-dark-page .rt-close {
    margin-left: 6px;
    color: #444;
    font-size: 9.5px;
    padding: 0 4px;
    border-radius: 2px;
    cursor: pointer;
    line-height: 1;
    transition: all .1s;
    user-select: none;
}
body.rb-dark-page .rt-close:hover {
    color: #e08080;
    background: rgba(192, 64, 64, 0.12);
}
body.rb-dark-page .rt-close.disabled {
    color: #1e1e2e;
    cursor: not-allowed;
    pointer-events: none;
}
body.rb-dark-page .rt.active .rt-close { color: #888; }
body.rb-dark-page .rt.active .rt-close:hover { color: #e08080; background: rgba(192, 64, 64, 0.2); }

/* ── Data Source strip — column count badge on chips ───────────────────── */
body.rb-dark-page .ds-col-count {
    margin-left: 5px;
    padding: 1px 5px;
    background: rgba(255, 79, 31, 0.15);
    color: #FF4F1F;
    border-radius: 2px;
    font-size: 9.5px;
    font-weight: 600;
}

/* ── Data sources panel: extra header + NL row + status ────────────────── */
body.rb-dark-page .rb-ds-name-input {
    background: #0a0a14 !important;
    border: 1px solid #252535 !important;
    color: #FF4F1F !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    padding: 3px 7px !important;
    height: 26px !important;
    border-radius: 3px !important;
    flex: 0 0 200px !important;
}
body.rb-dark-page .rb-ds-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #888;
    font-size: 10.5px;
    margin-left: 6px;
}

body.rb-dark-page .rb-nl-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 8px 0 8px;
}
body.rb-dark-page .rb-nl-lbl {
    font-size: 8.5px;
    letter-spacing: 1px;
    color: #3B9EFF;
    text-transform: uppercase;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 50px;
}
body.rb-dark-page .rb-nl-input {
    flex: 1;
    background: #0a0a14 !important;
    border: 1px solid #252535 !important;
    color: #dde !important;
    font-size: 11.5px !important;
    padding: 5px 9px !important;
    height: 28px !important;
    border-radius: 3px !important;
}
body.rb-dark-page .rb-nl-input:focus {
    border-color: rgba(59, 158, 255, 0.45) !important;
}

body.rb-dark-page .rb-ds-status {
    padding: 5px 0;
    font-size: 10.5px;
    border-top: 1px solid #1a1a2a;
    margin-top: 6px;
}
body.rb-dark-page .rb-ds-ok   { color: #5a9a5a; }
body.rb-dark-page .rb-ds-err  { color: #e08080; }
body.rb-dark-page .rb-ds-hint { color: #444; font-style: italic; }

/* ── Preview grid ──────────────────────────────────────────────────────── */
body.rb-dark-page .rb-ds-preview {
    flex: 1;
    overflow: auto;
    border: 1px solid #252535;
    border-radius: 3px;
    margin-top: 4px;
    background: #0a0a14;
}
body.rb-dark-page .rb-ds-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
body.rb-dark-page .rb-ds-preview-table thead th {
    background: #14141f;
    color: #aab;
    padding: 5px 8px;
    text-align: left;
    border-bottom: 1px solid #FF4F1F;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
body.rb-dark-page .rb-ds-preview-table .rb-ds-coltype {
    display: block;
    color: #555;
    font-size: 8.5px;
    font-weight: 400;
    text-transform: lowercase;
    letter-spacing: 0;
    margin-top: 1px;
}
body.rb-dark-page .rb-ds-preview-table tbody td {
    padding: 4px 8px;
    color: #ccd;
    border-bottom: 1px solid #1a1a2a;
    font-family: Consolas, monospace;
    font-size: 10.5px;
    white-space: nowrap;
}
body.rb-dark-page .rb-ds-preview-table tbody tr:nth-child(even) td {
    background: #14141f;
}

/* ── Inspector: data source picker row with ＋ New button ───────────────── */
body.rb-dark-page .insp-ds-picker {
    display: flex;
    gap: 5px;
    align-items: center;
    width: 100%;
}
body.rb-dark-page .insp-ds-picker select {
    flex: 1;
    min-width: 0;
}
body.rb-dark-page .insp-ds-picker .tb-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 10px !important;
    height: 26px !important;
}

/* ── Reusable Data Source Editor root + Compact mode for the inspector ── */
body.rb-dark-page .rb-dse-root {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}
body.rb-dark-page .rb-dse-root.compact .rb-nl-row {
    gap: 4px;
    margin: 4px 0;
}
body.rb-dark-page .rb-dse-root.compact .rb-nl-lbl {
    min-width: 38px;
    font-size: 8px;
}
body.rb-dark-page .rb-dse-root.compact .rb-nl-input {
    font-size: 10.5px !important;
    height: 24px !important;
    padding: 3px 7px !important;
}
body.rb-dark-page .rb-dse-root.compact .rb-ds-sql {
    height: 110px !important;
    font-size: 10.5px !important;
    padding: 6px !important;
    min-height: 80px !important;
}
body.rb-dark-page .rb-dse-root.compact .rb-dse-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}
body.rb-dark-page .rb-dse-root.compact .tb-action-btn {
    height: 24px !important;
    font-size: 10px !important;
    padding: 0 9px !important;
}
body.rb-dark-page .rb-dse-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 2px 0;
}

/* ── Inspector: DataTable Columns editor ───────────────────────────────── */
body.rb-dark-page .insp-col-card {
    background: #0a0a14;
    border: 1px solid #252535;
    border-radius: 3px;
    padding: 6px;
    margin-bottom: 6px;
}
body.rb-dark-page .insp-col-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}
body.rb-dark-page .insp-col-row:last-child { margin-bottom: 0; }
body.rb-dark-page .insp-col-row input,
body.rb-dark-page .insp-col-row select {
    flex: 1;
    height: 24px !important;
    font-size: 10.5px !important;
    padding: 2px 6px !important;
}

/* Active state for B/I/U style toggle buttons */
body.rb-dark-page .tb-btn.active {
    background: rgba(255, 79, 31, 0.18) !important;
    border-color: rgba(255, 79, 31, 0.5) !important;
    color: #FF4F1F !important;
}

/* ── InputFile styling (override Blazor default appearance) ────────────── */
body.rb-dark-page .rb-file-input {
    width: 100%;
    color: #aab;
    font-size: 10.5px;
}
body.rb-dark-page .rb-file-input::file-selector-button {
    background: #181828;
    border: 1px solid #252535;
    color: #ccd;
    padding: 3px 9px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10.5px;
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin-right: 8px;
}
body.rb-dark-page .rb-file-input::file-selector-button:hover {
    border-color: rgba(255, 79, 31, 0.4);
    color: #FF4F1F;
}

/* Report items */
body.rb-dark-page .ri {
    position: absolute;
    cursor: pointer;
    transition: outline .08s;
    overflow: hidden;
}
body.rb-dark-page .ri.selected { outline: 1px solid #FF4F1F; outline-offset: 3px; }
body.rb-dark-page .ri.selected::after {
    content: ''; position: absolute; right: -7px; bottom: -7px;
    width: 9px; height: 9px; background: #FF4F1F; border: 1px solid #0a0a14;
    cursor: nwse-resize;
}
body.rb-dark-page .ri.selected::before {
    content: ''; position: absolute; left: -7px; top: -7px;
    width: 9px; height: 9px; background: #FF4F1F; border: 1px solid #0a0a14;
}

/* Item designer-time placeholders (v0 — full rendering comes from the renderer) */
body.rb-dark-page .ri-placeholder {
    width: 100%; height: 100%;
    background: #14141f;
    border: 1px dashed #252535;
    color: #555;
    font-size: 10.5px;
    display: flex; align-items: center; justify-content: center;
    letter-spacing: 0.4px;
}
body.rb-dark-page .ri-table-ph { color: #FF4F1F; border-color: rgba(255, 79, 31, 0.27); }
body.rb-dark-page .ri-chart-ph { color: #FF4F1F; border-color: rgba(255, 79, 31, 0.27); }
body.rb-dark-page .ri-gauge-ph { color: #5a9a5a; border-color: #2a4a2a; }
body.rb-dark-page .ri-kpi-ph   { color: #3B9EFF; border-color: rgba(59, 158, 255, 0.27); }
body.rb-dark-page .ri-image-ph { color: #888; }
body.rb-dark-page .ri-line     { width: 100%; }
body.rb-dark-page .ri-pagebreak {
    width: 100%; height: 100%;
    color: #555; font-size: 10px; text-align: center;
    border-top: 1px dashed #FF4F1F; border-bottom: 1px dashed #FF4F1F;
    padding-top: 4px; background: rgba(255, 79, 31, 0.04);
}
body.rb-dark-page .ri-textblock {
    width: 100%; height: 100%;
    display: flex; align-items: center;
}

/* Empty canvas state */
body.rb-dark-page .rb-empty {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: #444;
}
body.rb-dark-page .rb-empty-inner { text-align: center; }
body.rb-dark-page .rb-empty-glyph { font-size: 64px; color: #1e1e2e; }
body.rb-dark-page .rb-empty-title { font-size: 16px; color: #555; margin-top: 16px; }
body.rb-dark-page .rb-empty-sub   { font-size: 11px; color: #333; margin-top: 4px; }

/* ── Inspector (right) ──────────────────────────────────────────────────── */
body.rb-dark-page .rb-inspector {
    background: #0e0e1a !important;
    border-left: 1px solid #1a1a2a !important;
    display: flex !important; flex-direction: column !important;
    overflow: hidden !important;
}
body.rb-dark-page .insp-tabs {
    display: flex; border-bottom: 1px solid #1a1a2a; background: #0a0a14;
}
body.rb-dark-page .insp-tab {
    flex: 1; text-align: center; padding: 9px 0;
    font-size: 10.5px; cursor: pointer; color: #555;
    border-bottom: 2px solid transparent;
    letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600;
}
body.rb-dark-page .insp-tab:hover  { color: #aab; }
body.rb-dark-page .insp-tab.active { color: #FF4F1F; border-bottom-color: #FF4F1F; }
body.rb-dark-page .insp-body { padding: 12px; overflow-y: auto; flex: 1; }

body.rb-dark-page .insp-header {
    background: rgba(255, 79, 31, 0.08); border: 1px solid rgba(255, 79, 31, 0.27);
    padding: 8px 10px; border-radius: 3px; margin-bottom: 14px;
}
body.rb-dark-page .insp-header .name { font-weight: 600; color: #FF4F1F; font-size: 12px; }
body.rb-dark-page .insp-header .type { font-size: 10px; color: #888; margin-top: 2px; letter-spacing: 0.4px; }

body.rb-dark-page .insp-section {
    font-size: 8.5px; text-transform: uppercase; letter-spacing: 1px;
    color: #444; font-weight: 600; margin: 14px 0 8px;
    padding-bottom: 4px; border-bottom: 1px solid #1a1a2a;
}
body.rb-dark-page .insp-row {
    display: grid; grid-template-columns: 88px 1fr; gap: 8px;
    margin-bottom: 7px; align-items: center;
}
body.rb-dark-page .insp-row label { font-size: 10.5px; color: #888; }
body.rb-dark-page .insp-row input,
body.rb-dark-page .insp-row select {
    padding: 4px 7px !important; border-radius: 3px !important;
    font-size: 10.5px !important; width: 100% !important;
}
body.rb-dark-page .insp-row .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
body.rb-dark-page .insp-todo { color: #444; font-size: 10.5px; font-style: italic; }

body.rb-dark-page .insp-empty {
    text-align: center; color: #444; padding: 40px 12px;
}
body.rb-dark-page .insp-empty-glyph { font-size: 48px; color: #1e1e2e; }
body.rb-dark-page .insp-empty-title { font-size: 13px; color: #555; margin-top: 12px; }
body.rb-dark-page .insp-empty-sub   { font-size: 10.5px; color: #333; margin-top: 4px; }

/* ── Data sources strip (bottom) ────────────────────────────────────────── */
body.rb-dark-page .rb-datasources {
    background: #0e0e1a !important;
    border-top: 1px solid #1a1a2a !important;
    height: 28px !important;
    display: flex !important; align-items: center !important;
    padding: 0 14px !important;
    font-size: 10px !important; gap: 12px !important;
    cursor: pointer !important; letter-spacing: 0.4px !important;
    color: #555 !important; text-transform: uppercase !important;
}
body.rb-dark-page .rb-datasources .chev { color: #444; }
body.rb-dark-page .ds-chip {
    background: #181828; padding: 2px 9px; border-radius: 3px;
    font-family: Consolas, monospace; font-size: 10px;
    color: #aab; text-transform: none; letter-spacing: 0;
    border: 1px solid #252535;
}
body.rb-dark-page .ds-chip:hover { border-color: rgba(255, 79, 31, 0.4); }
body.rb-dark-page .ds-chip .dot {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: #5a9a5a; margin-right: 5px; vertical-align: middle;
}
body.rb-dark-page .ds-chip.warn { color: #e8a04b; }
body.rb-dark-page .ds-chip.warn .dot { background: #e8a04b; }
body.rb-dark-page .ds-actions { margin-left: auto; color: #555; }
body.rb-dark-page .ds-actions:hover { color: #FF4F1F; }

/* Expanded data sources panel (under the strip) */
body.rb-dark-page .rb-datasources-panel {
    position: fixed; bottom: 28px; left: 232px; right: 280px;
    background: #0e0e1a; border-top: 1px solid #252535;
    height: 220px; padding: 12px; overflow: hidden;
    z-index: 50;
    box-shadow: 0 -8px 24px rgba(0,0,0,0.5);
    display: flex; flex-direction: column;
}
body.rb-dark-page .rb-ds-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
body.rb-dark-page .rb-ds-name  { color: #FF4F1F; font-weight: 600; font-size: 12px; }
body.rb-dark-page .rb-ds-mode  { color: #888; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
body.rb-dark-page .rb-ds-sql {
    flex: 1; width: 100% !important;
    background: #0a0a14 !important; border: 1px solid #252535 !important;
    color: #dde !important; font-family: Consolas, monospace !important;
    font-size: 12px !important; padding: 8px !important;
    border-radius: 3px !important; resize: none !important;
}
body.rb-dark-page .rb-ds-empty {
    color: #444; font-size: 11px; text-align: center;
    padding: 32px; font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════
   Preview modal — fullscreen overlay rendering the report with REAL data
   from PreviewRows. Hides editor chrome; shows the report as it would
   appear in the final PDF/HTML export target.
   ══════════════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────────────────
   Preview modal uses the native <dialog> element with showModal() so it
   renders in the browser's top layer — escapes any ancestor's transform/
   filter/perspective stacking context without moving the DOM node (which
   would corrupt Blazor's render tree). The browser handles scroll-lock
   on the page behind, ESC dismissal, and z-stacking natively.
   ────────────────────────────────────────────────────────────────────── */

/* The <dialog> default is display:none until showModal() adds the [open]
   attribute. Override the default block layout with our flex column.    */
body.rb-dark-page dialog.rb-preview-overlay {
    margin: 0;
    padding: 0;
    border: none;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    color: inherit;
    overflow: hidden;
    z-index: 2147483647;                         /* belt + suspenders */
}
body.rb-dark-page dialog.rb-preview-overlay[open] {
    display: flex;
    flex-direction: column;
}
body.rb-dark-page dialog.rb-preview-overlay::backdrop {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

body.rb-dark-page .rb-preview-frame {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.rb-dark-page .rb-preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    height: 52px;
    background: #0a0a14;
    border-bottom: 1px solid #1a1a2a;
    flex-shrink: 0;
}
body.rb-dark-page .rb-preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dde;
    font-size: 14px;
    font-weight: 600;
}
body.rb-dark-page .rb-preview-sub {
    color: #555;
    font-size: 11px;
    font-weight: 400;
}
body.rb-dark-page .rb-preview-pages {
    display: flex;
    gap: 2px;
    margin-left: 18px;
    flex: 1;
}
body.rb-dark-page .rb-preview-page-tab {
    background: #14141f;
    border: 1px solid #1e1e2e;
    color: #888;
    font-size: 11px;
    padding: 5px 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: all .12s;
}
body.rb-dark-page .rb-preview-page-tab:hover {
    color: #ccd;
    border-color: rgba(255, 79, 31, 0.4);
}
body.rb-dark-page .rb-preview-page-tab.active {
    background: #1e1e2e;
    color: #FF4F1F;
    border-color: #FF4F1F;
    font-weight: 600;
}
body.rb-dark-page .rb-preview-close {
    margin-left: auto;
    background: #1a1a2a;
    border: 1px solid #252535;
    color: #aab;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .12s;
}
body.rb-dark-page .rb-preview-close:hover {
    color: #e08080;
    border-color: #5a1515;
    background: #2a1818;
}

body.rb-dark-page .rb-preview-body {
    flex: 1;
    overflow: auto;
    padding: 32px 18px;
    background-image: radial-gradient(circle at center, rgba(255, 79, 31, 0.04) 0%, transparent 60%);
}

body.rb-dark-page .rb-preview-paper {
    background: #ffffff;
    color: #1a1a2a;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4), 0 12px 36px rgba(0,0,0,0.8);
    position: relative;
}

/* Bands in preview — borderless, no labels */
body.rb-dark-page .rb-preview-band {
    position: relative;
    padding: 14px 42px;
}

/* Individual item containers (positioned absolutely inside the band) */
body.rb-dark-page .rb-preview-item {
    position: absolute;
    overflow: hidden;
}

/* DataTable items grow to their natural height instead of clipping rows.
   The inline style outputs `min-height:Xpx` (not `height`) for these so
   the table extends as far as it needs while still anchoring its top-left
   at the user-positioned X/Y. */
body.rb-dark-page .rb-preview-item.rpv-item-grow {
    overflow: visible;
}

/* ── Text block (preview) ──────────────────────────────────────────────── */
body.rb-dark-page .rpv-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

/* ── DataTable (preview) ─────────────────────────────────────────────────
   table-layout: fixed makes the browser treat each <th>'s inline width
   as a *proportion* of the table's 100% width instead of an absolute
   pixel value. With ~12 columns of 100px each on Letter-portrait paper
   (816px), absolute widths would overflow by ~400px and bleed off the
   right edge of the paper. Fixed-layout keeps everything inside.

   word-break + overflow-wrap allow long cell values (UUIDs, JSON blobs)
   to wrap onto multiple lines rather than stretching the column wider.
   ──────────────────────────────────────────────────────────────────── */
body.rb-dark-page .rpv-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background: #ffffff;
    color: #1a1a2a;
}
body.rb-dark-page .rpv-table thead th {
    padding: 8px 10px;
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: anywhere;
}
body.rb-dark-page .rpv-table tbody td {
    color: #1a1a2a;
    background: transparent;       /* uniform — no alt-row banding */
    word-break: break-word;
    overflow-wrap: anywhere;
    vertical-align: top;
}

/* ── KPI card (preview) ────────────────────────────────────────────────── */
body.rb-dark-page .rpv-kpi {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}
body.rb-dark-page .rpv-kpi-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 600;
}
body.rb-dark-page .rpv-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2a;
    font-variant-numeric: tabular-nums;
    margin-top: 4px;
    line-height: 1.1;
}
body.rb-dark-page .rpv-kpi-delta {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 600;
}
body.rb-dark-page .rpv-kpi-delta.good { color: #2a8a2a; }
body.rb-dark-page .rpv-kpi-delta.bad  { color: #c84040; }

/* ── Gauge (preview) ───────────────────────────────────────────────────── */
body.rb-dark-page .rpv-gauge {
    overflow: hidden;
}
body.rb-dark-page .rpv-gauge-label {
    color: #555;
    font-size: 11px;
    text-align: center;
    margin-top: 4px;
}

/* ── Empty / error placeholders inside preview items ───────────────────── */
body.rb-dark-page .rpv-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f7f9;
    border: 1px dashed #d0d0d8;
    color: #888;
    font-size: 11px;
    padding: 8px;
    text-align: center;
    font-style: italic;
}

body.rb-dark-page .rb-preview-empty {
    color: #888;
    text-align: center;
    padding: 64px;
    font-style: italic;
}

/* ══════════════════════════════════════════════════════════════════════════
   Parameters — toolbox chips + inspector header
   ══════════════════════════════════════════════════════════════════════════ */

/* Toolbox parameter row */
body.rb-dark-page .tb-item.tb-param {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #14141f;
    border: 1px solid #1e1e2e;
}
body.rb-dark-page .tb-item.tb-param:hover {
    border-color: rgba(255, 79, 31, 0.35);
}
body.rb-dark-page .tb-item.tb-param.selected {
    border-color: #FF4F1F;
    background: rgba(255, 79, 31, 0.08);
}
body.rb-dark-page .tb-item.tb-param .tb-param-type {
    margin-left: auto;
    font-size: 8.5px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* "Add Parameter…" stub row */
body.rb-dark-page .tb-item.tb-add {
    color: #888;
    font-style: italic;
    border-style: dashed;
}
body.rb-dark-page .tb-item.tb-add:hover {
    color: #FF4F1F;
    border-color: rgba(255, 79, 31, 0.5);
}

/* Inspector: orange @ accent on the parameter header */
body.rb-dark-page .insp-header .name .rb-param-at {
    color: #FF4F1F;
    font-weight: 700;
    margin-right: 1px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Inspector: collapsible SQL Editor section
   The <details>/<summary> default styling on dark backgrounds is unreadable,
   so explicit color, weight, and hover affordances go here.
   ══════════════════════════════════════════════════════════════════════════ */

body.rb-dark-page .rb-insp-sql-section {
    margin: 8px 0 12px;
    padding: 0;
    background: transparent;
    border: none;
}

/* The clickable summary row — "▸ SQL Editor ✓ N cols loaded" */
body.rb-dark-page .insp-section-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    user-select: none;
    background: #14141f;
    border: 1px solid #2a2a3a;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #d8d8e8;                  /* Light primary text — was dark-on-dark */
    list-style: none;                /* Hide native <summary> disclosure marker */
}
body.rb-dark-page .insp-section-toggle::-webkit-details-marker {
    display: none;                   /* Webkit/Blink variant of the same */
}
body.rb-dark-page .insp-section-toggle:hover {
    background: #1c1c2a;
    border-color: #3a3a4a;
}

/* The "SQL Editor" label takes the remaining flex space so status sits right */
body.rb-dark-page .insp-section-toggle > span:nth-child(2) {
    flex: 1;
    color: #e4e4ee;                  /* Slightly brighter than parent */
    letter-spacing: 0.2px;
}

/* Chevron — rotates open when <details open> */
body.rb-dark-page .insp-section-toggle .chev {
    font-size: 10px;
    color: #888;
    transition: transform 0.12s ease;
    width: 10px;
    text-align: center;
}
body.rb-dark-page .rb-insp-sql-section[open] > .insp-section-toggle .chev {
    transform: rotate(90deg);
}

/* Status pills — "✓ 17 cols loaded" or "⚠ click to write SQL" */
body.rb-dark-page .rb-status-ok {
    color: #7fc97f;                  /* Soft green — readable on dark */
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(127, 201, 127, 0.08);
    border-radius: 3px;
    white-space: nowrap;
}
body.rb-dark-page .rb-status-warn {
    color: #f0b76b;                  /* Soft amber — readable on dark */
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    background: rgba(240, 183, 107, 0.08);
    border-radius: 3px;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════════════
   Band label row + delete affordance
   Group Header / Group Footer / Report Header / Report Footer bands can be
   removed via an X button on the label. Detail bands cannot — every page
   needs at least one Detail, and the store enforces this server-side.
   ══════════════════════════════════════════════════════════════════════════ */

body.rb-dark-page .band-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

body.rb-dark-page .band-label-row .band-label {
    flex: 1;                              /* push delete X to the far right */
}

body.rb-dark-page .band-delete {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #888;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;                           /* hidden until band hover */
    transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

body.rb-dark-page .band:hover .band-delete {
    opacity: 1;                           /* reveal when hovering the band */
}

body.rb-dark-page .band-delete:hover {
    color: #ff6b6b;                       /* destructive-action red on hover */
    background: rgba(255, 107, 107, 0.12);
    border-color: rgba(255, 107, 107, 0.4);
}

/* Subreport placeholder on the canvas — mirrors the other ri-*-ph styles */
body.rb-dark-page .ri-placeholder.ri-subreport-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(255, 79, 31, 0.06);
    border: 1px dashed rgba(255, 79, 31, 0.35);
    border-radius: 3px;
    color: #b0b0c0;
    font-size: 11px;
    font-style: italic;
    padding: 8px;
}

/* ══════════════════════════════════════════════════════════════════════════
   Data items: List placeholder + Field / Aggregate hint styling
   ══════════════════════════════════════════════════════════════════════════ */

/* List placeholder — taller dashed box, similar to Subreport but blue-tinted
   to distinguish "data-bound repeating container" from "embedded report". */
body.rb-dark-page .ri-placeholder.ri-list-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: rgba(59, 158, 255, 0.05);
    border: 1px dashed rgba(59, 158, 255, 0.4);
    border-radius: 3px;
    color: #a0b0c8;
    font-size: 11px;
    font-style: italic;
    padding: 8px;
}

/* Field — bound display. The {fieldname} placeholder text gets a subtle
   pill-style background so users see "this is a binding slot, not literal
   text". Real rendering replaces with the actual value at render time. */
body.rb-dark-page .ri-field {
    background: rgba(59, 158, 255, 0.08);
    border: 1px solid rgba(59, 158, 255, 0.25);
    border-radius: 2px;
    color: #6ab0ff;
}

/* Aggregate — emphasis on right-aligned, bold, accent-colored to read like
   a subtotal. Hint shows function and field, e.g., "Total: SUM(Revenue)". */
body.rb-dark-page .ri-aggregate {
    background: rgba(255, 79, 31, 0.06);
    border: 1px solid rgba(255, 79, 31, 0.25);
    border-radius: 2px;
    color: #ff9966;
}

/* ══════════════════════════════════════════════════════════════════════════
   Item drag & drop — visual affordances
   ══════════════════════════════════════════════════════════════════════════ */

/* Hover hint that the item is grabbable. Move cursor only on the item chrome
   itself; child interactives (button/input/select) get their own cursors via
   their own rules below. */
body.rb-dark-page .ri[data-item-id] {
    cursor: move;
}

/* Don't override cursor for interactive children inside an item */
body.rb-dark-page .ri[data-item-id] button,
body.rb-dark-page .ri[data-item-id] input,
body.rb-dark-page .ri[data-item-id] select,
body.rb-dark-page .ri[data-item-id] textarea {
    cursor: auto;
}

/* Active-drag state — set by rbDrag JS during the drag.
   Faint highlight + softer opacity makes it feel like the item is lifted
   off the canvas while being moved. */
body.rb-dark-page .ri.rb-dragging {
    opacity: 0.85;
    cursor: grabbing;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 79, 31, 0.6);
    transition: none;        /* immediate response — no smoothing during drag */
    z-index: 9999;           /* float above siblings while dragging */
}

/* ── Card item ──────────────────────────────────────────────────────────────
   Designer-time chrome for CardItem. Most styling is inline (computed from
   model properties) — this just adds hover affordance and the "drop items
   here" hint typography. */
.ri-card {
    transition: box-shadow 0.12s ease-out;
}
.ri-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.30),
                0 2px 4px rgba(0, 0, 0, 0.20),
                0 0 0 1px rgba(255, 79, 31, 0.20) !important;
}

/* Preview-modal card surface */
.rpv-card {
    /* All styling is computed inline from model properties — placeholder rule
       reserved for future hover/selection states in the preview modal. */
}

/* ── Authorized Users panel ─────────────────────────────────────────────────
   Mirrors the Query Dashboard panel exactly: floating card pinned to the
   top-right of the canvas, dark surface with orange accent header, list of
   authorized users with per-row access-level select + remove ✕, and an
   add-user form at the bottom. */
.rb-users-panel {
    position: fixed;
    top: 72px;          /* below the toolbar */
    right: 16px;
    width: 380px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    background: #16161f;
    border: 1px solid #2a2a3a;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 79, 31, 0.25);
    z-index: 5000;
    font-family: "Segoe UI", system-ui, sans-serif;
    color: #e4e4ee;
}
.rb-users-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: linear-gradient(180deg, #1c1c28, #14141e);
    border-bottom: 1px solid #FF4F1F;
    border-radius: 6px 6px 0 0;
}
.rb-users-title {
    font-size: 13px;
    font-weight: 700;
    color: #FF4F1F;
    letter-spacing: 0.5px;
}
.rb-users-close {
    background: transparent;
    border: none;
    color: #a0a0b0;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.1s, color 0.1s;
}
.rb-users-close:hover {
    background: rgba(255, 79, 31, 0.15);
    color: #FF4F1F;
}
.rb-users-prompt {
    padding: 14px;
    background: rgba(255, 179, 71, 0.10);
    border-left: 3px solid #FFB347;
    color: #d4d4e0;
    font-size: 11px;
    line-height: 1.5;
}
.rb-users-meta {
    padding: 10px 14px;
    font-size: 11px;
    color: #a0a0b0;
    background: rgba(255, 79, 31, 0.04);
    border-bottom: 1px solid #252535;
}
.rb-users-meta strong {
    color: #e4e4ee;
}
.rb-users-readonly {
    color: #FFB347;
    margin-left: 4px;
    font-style: italic;
}
.rb-users-list {
    padding: 8px 0;
    max-height: 280px;
    overflow-y: auto;
}
.rb-users-empty {
    padding: 14px;
    color: #6a6a7a;
    font-style: italic;
    font-size: 11px;
    text-align: center;
}
.rb-users-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-bottom: 1px solid #1f1f2a;
    font-size: 11.5px;
}
.rb-users-row:last-child {
    border-bottom: none;
}
.rb-users-row.is-creator {
    background: rgba(255, 79, 31, 0.04);
}
.rb-users-name {
    flex: 1;
    color: #e4e4ee;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rb-users-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    background: #FF4F1F;
    color: #fff;
    text-transform: uppercase;
}
.rb-users-badge.alt {
    background: #3B9EFF;
}
.rb-users-rights {
    font-size: 10.5px;
    color: #a0a0b0;
    padding: 2px 6px;
}
.rb-users-select {
    background: #0e0e16;
    border: 1px solid #2a2a3a;
    color: #e4e4ee;
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
}
.rb-users-select:focus {
    outline: none;
    border-color: #FF4F1F;
}
.rb-users-remove {
    background: rgba(160, 64, 64, 0.20);
    border: 1px solid rgba(160, 64, 64, 0.40);
    color: #ff6b6b;
    font-size: 10px;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.1s;
}
.rb-users-remove:hover {
    background: rgba(160, 64, 64, 0.40);
}
.rb-users-add {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: #0e0e16;
    border-top: 1px solid #252535;
    border-bottom: 1px solid #252535;
}
.rb-users-input {
    flex: 1;
    background: #1a1a24;
    border: 1px solid #2a2a3a;
    color: #e4e4ee;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 3px;
}
.rb-users-input:focus {
    outline: none;
    border-color: #FF4F1F;
}
.rb-users-add-btn {
    background: #FF4F1F;
    border: none;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.1s;
}
.rb-users-add-btn:hover:not(:disabled) {
    background: #e04518;
}
.rb-users-add-btn:disabled {
    background: #3a2a24;
    color: #886a60;
    cursor: not-allowed;
}
.rb-users-msg {
    padding: 8px 14px;
    font-size: 11px;
    line-height: 1.4;
}
.rb-users-msg.ok {
    background: rgba(93, 202, 165, 0.10);
    color: #5DCAA5;
    border-left: 3px solid #5DCAA5;
}
.rb-users-msg.err {
    background: rgba(255, 107, 107, 0.10);
    color: #ff8a8a;
    border-left: 3px solid #ff6b6b;
}
.rb-users-hint {
    padding: 10px 14px;
    font-size: 10px;
    color: #6a6a7a;
    line-height: 1.5;
    border-top: 1px solid #1f1f2a;
}
.rb-users-hint code {
    background: #0e0e16;
    color: #FF4F1F;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
}

/* Active state for the toolbar Users button */
.rb-toolbar .tb-btn.active {
    background: rgba(255, 79, 31, 0.18);
    color: #FF4F1F;
    border-color: #FF4F1F;
}

/* ── Access-denied toast ────────────────────────────────────────────────────
   Floating bottom-right card matching the dashboard's "missing right + contact
   creator" pattern. Click anywhere on the toast to dismiss. */
.rb-access-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a24;
    border: 1px solid #ff6b6b;
    border-left: 4px solid #ff6b6b;
    border-radius: 4px;
    padding: 12px 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    z-index: 6000;
    cursor: pointer;
    color: #e4e4ee;
    font-size: 12px;
    line-height: 1.4;
    animation: rb-toast-in 0.18s ease-out;
}
.rb-access-icon {
    color: #ff6b6b;
    font-size: 18px;
    flex: 0 0 auto;
}
.rb-access-text {
    flex: 1;
}
.rb-access-close {
    background: transparent;
    border: none;
    color: #a0a0b0;
    font-size: 13px;
    cursor: pointer;
    padding: 2px 6px;
    flex: 0 0 auto;
}
.rb-access-close:hover {
    color: #ff6b6b;
}
@keyframes rb-toast-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0);   }
}

/* ── Band resize handle ─────────────────────────────────────────────────────
   Pinned to the bottom edge of every band on the canvas. Default state is a
   barely-visible 6px strip; on hover the strip turns orange to clearly
   advertise the affordance. Cursor switches to ns-resize so users instantly
   recognize this as a vertical-resize control. Z-index keeps it above
   absolutely-positioned items inside the band so the user can always grab it
   even when the band is densely populated. */
.band {
    position: relative;          /* anchors the absolutely-positioned handle */
}
.band-resize-handle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    cursor: ns-resize;
    background: transparent;
    z-index: 100;                /* above items, below toolbar/overlays */
    transition: background 0.12s ease-out;

    /* Subtle visual hint — invisible until hovered */
    border-bottom: 2px solid transparent;
}
.band-resize-handle:hover {
    background: rgba(255, 79, 31, 0.15);
    border-bottom-color: #FF4F1F;
}

/* Active resize state — applied by rb-drag.js to the band element while the
   pointer is engaged. Stronger orange to make the in-progress resize obvious,
   plus disable transitions so the resize tracks the pointer immediately. */
.band.rb-band-resizing {
    outline: 1px dashed rgba(255, 79, 31, 0.65);
    outline-offset: -1px;
    transition: none;
}
.band.rb-band-resizing .band-resize-handle {
    background: rgba(255, 79, 31, 0.28);
    border-bottom-color: #FF4F1F;
}
