/* ==========================================================================
   Rosidence — web design system (file names keep the `royal`/`rr-` prefixes)
   Shares the SmartLease mobile tokens (brand #EF5A28, Inter / Manrope /
   JetBrains Mono, 12–20px radii): one solid brand orange for every primary
   action and highlight — no gradients — flat ink for emphasis cards, a light
   sidebar, and a selected dark mode. Built on Bootstrap 5.3.
   Mode lives on <html data-mode="light|dark">; Bootstrap follows via
   data-bs-theme (set by royal.js before paint).
   ========================================================================== */

:root {
  --rr-brand: #EF5A28;
  --rr-brand-hover: #D94815;
  --rr-brand-press: #C4410F;
  --rr-brand-soft: #FFF3EE;
  --rr-brand-soft-text: #C4410F;
  --rr-brand-on-dark: #FF8A5C;   /* brand accent text on ink */
  /* kept for older templates: both are the solid brand now (no gradients) */
  --rr-grad: var(--rr-brand);
  --rr-grad-soft: var(--rr-brand-soft);

  --rr-ink: #0A0A0A;
  --rr-shell: #0A0A0A;           /* ink: emphasis cards */
  --rr-shell-fg: #D0D5DD;
  --rr-shell-fg-muted: #98A2B3;

  --rr-canvas: #F7F7F8;
  --rr-surface: #FFFFFF;
  --rr-raised: #FFFFFF;
  --rr-fill: #F2F4F7;
  --rr-fg-1: #101828;
  --rr-fg-2: #344054;
  --rr-fg-3: #667085;
  --rr-fg-4: #98A2B3;
  --rr-border: #E4E7EC;
  --rr-border-strong: #D0D5DD;

  --rr-success: #079455; --rr-success-soft: #ECFDF3; --rr-success-text: #067647;
  --rr-warning: #DC6803; --rr-warning-soft: #FFFAEB; --rr-warning-text: #B54708;
  --rr-danger:  #D92D20; --rr-danger-soft:  #FEF3F2; --rr-danger-text:  #B42318;
  --rr-info:    #1570EF; --rr-info-soft:    #EFF8FF; --rr-info-text:    #175CD3;

  --rr-r-sm: 8px; --rr-r: 12px; --rr-r-lg: 16px; --rr-r-xl: 20px;
  --rr-shadow-sm: 0 1px 2px rgba(16,24,40,.06);
  --rr-shadow: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --rr-shadow-lg: 0 12px 32px -8px rgba(16,24,40,.18);
  --rr-sidebar-w: 264px;
  --rr-topbar-h: 64px;

  --rr-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rr-display: "Manrope", var(--rr-font);
  --rr-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Chart roles (dataviz reference palette; validated light) */
  --viz-1: #2a78d6; --viz-2: #eb6834; --viz-3: #1baf7a; --viz-4: #eda100;
  --viz-5: #e87ba4; --viz-6: #008300; --viz-7: #4a3aa7; --viz-8: #e34948;
  --viz-seq-1: #b7d3f6; --viz-seq-2: #86b6ef; --viz-seq-3: #5598e7; --viz-seq-4: #2a78d6; --viz-seq-5: #1c5cab;
  --viz-grid: #EEF0F3; --viz-axis: #98A2B3; --viz-surface: #FFFFFF;
}

[data-mode="dark"] {
  --rr-brand-soft: rgba(239,90,40,.14);
  --rr-brand-soft-text: #FF8A5C;
  --rr-shell: #1A2335;
  --rr-canvas: #0B0F19;
  --rr-surface: #111827;
  --rr-raised: #172033;
  --rr-fill: #1A2335;
  --rr-fg-1: #F2F4F7;
  --rr-fg-2: #CDD3DE;
  --rr-fg-3: #98A2B3;
  --rr-fg-4: #667085;
  --rr-border: #222C40;
  --rr-border-strong: #2F3A52;
  --rr-success-soft: rgba(7,148,85,.16);  --rr-success-text: #47CD89;
  --rr-warning-soft: rgba(220,104,3,.16); --rr-warning-text: #FDB022;
  --rr-danger-soft:  rgba(217,45,32,.16); --rr-danger-text:  #F97066;
  --rr-info-soft:    rgba(21,112,239,.16);--rr-info-text:    #53B1FD;
  --rr-shadow: 0 1px 3px rgba(0,0,0,.4);
  --rr-shadow-lg: 0 16px 40px -8px rgba(0,0,0,.6);
  /* Dark chart steps (validated against the dark surface) */
  --viz-1: #3987e5; --viz-2: #d95926; --viz-3: #199e70; --viz-4: #c98500;
  --viz-5: #d55181; --viz-6: #008300; --viz-7: #9085e9; --viz-8: #e66767;
  --viz-seq-1: #184f95; --viz-seq-2: #1c5cab; --viz-seq-3: #2a78d6; --viz-seq-4: #5598e7; --viz-seq-5: #86b6ef;
  --viz-grid: #1E2738; --viz-axis: #667085; --viz-surface: #111827;
  color-scheme: dark;
}

/* ── base ─────────────────────────────────────────────────────────────── */
html, body { background: var(--rr-canvas); }
body {
  font-family: var(--rr-font); color: var(--rr-fg-2); font-size: 14.5px;
  -webkit-font-smoothing: antialiased; letter-spacing: -.003em;
  --bs-body-bg: var(--rr-canvas); --bs-body-color: var(--rr-fg-2);
  --bs-border-color: var(--rr-border); --bs-emphasis-color: var(--rr-fg-1);
  --bs-secondary-color: var(--rr-fg-3); --bs-link-color-rgb: 239,90,40; --bs-link-hover-color-rgb: 217,72,21;
  --bs-primary: var(--rr-brand); --bs-primary-rgb: 239,90,40;
}
h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6 { color: var(--rr-fg-1); font-weight: 700; letter-spacing: -.02em; }
.display-num { font-family: var(--rr-display); font-weight: 800; letter-spacing: -.03em; color: var(--rr-fg-1); }
.mono { font-family: var(--rr-mono); font-size: .86em; }
.text-muted, .rr-muted { color: var(--rr-fg-3) !important; }
.text-fg1 { color: var(--rr-fg-1) !important; }
a { text-decoration: none; }
.overline { font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rr-fg-3); }
::selection { background: rgba(239,90,40,.22); }

/* ── shell ────────────────────────────────────────────────────────────── */
.rr-shell { display: flex; min-height: 100vh; }
.rr-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--rr-sidebar-w); z-index: 1040;
  background: var(--rr-surface); color: var(--rr-fg-2); display: flex; flex-direction: column; border-right: 1px solid var(--rr-border);
  transition: transform .25s ease;
}
.rr-sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 18px 20px; color: var(--rr-fg-1); }
.rr-sidebar .brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.rr-sidebar .brand .name { font-family: var(--rr-display); font-weight: 800; font-size: 16px; line-height: 1.15; letter-spacing: -.02em; }
.rr-sidebar .brand .sub { font-size: 11.5px; color: var(--rr-fg-3); }
.rr-nav { flex: 1; overflow-y: auto; padding: 6px 12px 20px; scrollbar-width: thin; scrollbar-color: var(--rr-border-strong) transparent; }
.rr-nav .group { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rr-fg-4); padding: 16px 12px 6px; }
.rr-nav a {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--rr-fg-2);
  font-weight: 500; font-size: 14px; position: relative; transition: background .15s, color .15s;
}
.rr-nav a i { width: 18px; text-align: center; opacity: .8; font-size: 14px; }
.rr-nav a:hover { background: var(--rr-fill); color: var(--rr-fg-1); }
.rr-nav a.active { background: var(--rr-brand); color: #fff; }
.rr-nav a.active i { opacity: 1; }
.rr-nav a .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--rr-brand-soft); color: var(--rr-brand-soft-text); }
.rr-nav a.active .count { background: rgba(255,255,255,.25); color: #fff; }
.rr-sidebar .foot { padding: 14px 16px; border-top: 1px solid var(--rr-border); font-size: 12px; color: var(--rr-fg-3); }

.rr-main { flex: 1; margin-left: var(--rr-sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.rr-topbar {
  position: sticky; top: 0; z-index: 1030; height: var(--rr-topbar-h); display: flex; align-items: center; gap: 12px;
  padding: 0 28px; background: color-mix(in srgb, var(--rr-canvas) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--rr-border);
}
.rr-topbar .crumbs { font-size: 13px; color: var(--rr-fg-3); }
.rr-topbar .crumbs a { color: var(--rr-fg-3); } .rr-topbar .crumbs a:hover { color: var(--rr-fg-1); }
.rr-topbar .crumbs .sep { margin: 0 6px; opacity: .5; }
.rr-content { padding: 28px; max-width: 1480px; width: 100%; }
.rr-icon-btn.rr-burger { display: none; }
.rr-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--rr-border);
  background: var(--rr-surface); color: var(--rr-fg-2); position: relative; transition: all .15s;
}
.rr-icon-btn:hover { color: var(--rr-fg-1); border-color: var(--rr-border-strong); }
.rr-icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--rr-brand); box-shadow: 0 0 0 2px var(--rr-surface); }
.rr-avatar {
  width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 13px;
  color: #fff; background: var(--rr-brand); flex: none; object-fit: cover;
}
.rr-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.rr-avatar.lg { width: 64px; height: 64px; font-size: 22px; }

@media (max-width: 991.98px) {
  .rr-sidebar { transform: translateX(-100%); }
  .rr-shell.nav-open .rr-sidebar { transform: none; box-shadow: var(--rr-shadow-lg); }
  .rr-shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(10,10,10,.45); z-index: 1035; }
  .rr-main { margin-left: 0; }
  .rr-icon-btn.rr-burger { display: inline-grid; }
  .rr-content { padding: 18px 16px; }
  .rr-topbar { padding: 0 16px; }
}

/* ── page header ──────────────────────────────────────────────────────── */
.rr-page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.rr-page-head h1 { font-size: 26px; margin: 0; }
.rr-page-head .lead { margin: 4px 0 0; color: var(--rr-fg-3); font-size: 14.5px; }
.rr-page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── cards ────────────────────────────────────────────────────────────── */
.rr-card { background: var(--rr-surface); border: 1px solid var(--rr-border); border-radius: var(--rr-r-lg); box-shadow: var(--rr-shadow-sm); }
.rr-card > .hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rr-border); }
.rr-card > .hd h2, .rr-card > .hd h3 { font-size: 15.5px; margin: 0; }
.rr-card > .hd .sub { font-size: 12.5px; color: var(--rr-fg-3); }
.rr-card > .bd { padding: 20px; }
.rr-card > .bd.flush { padding: 0; }
.rr-card > .ft { padding: 12px 20px; border-top: 1px solid var(--rr-border); background: var(--rr-fill); border-radius: 0 0 var(--rr-r-lg) var(--rr-r-lg); }
.rr-card.hero { background: var(--rr-shell); color: var(--rr-shell-fg); border: 0; }
.rr-card.hero h1, .rr-card.hero h2, .rr-card.hero .display-num { color: #fff; }
.rr-card.hero .rr-muted { color: var(--rr-shell-fg-muted) !important; }
.rr-card.hero .overline, .on-dark-accent { color: var(--rr-brand-on-dark) !important; }
.rr-card.hero .rr-progress, .rr-setup-banner .rr-progress { background: rgba(255,255,255,.14); }
.rr-card.link { transition: transform .15s, box-shadow .15s, border-color .15s; display: block; color: inherit; }
.rr-card.link:hover { transform: translateY(-2px); box-shadow: var(--rr-shadow-lg); border-color: var(--rr-border-strong); }

/* KPI tiles */
.rr-kpi { padding: 18px 20px; height: 100%; }
.rr-kpi .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rr-kpi .label { font-size: 13px; color: var(--rr-fg-3); font-weight: 500; }
.rr-kpi .chip { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--rr-brand-soft); color: var(--rr-brand); }
.rr-kpi .chip.green { background: var(--rr-success-soft); color: var(--rr-success); }
.rr-kpi .chip.blue { background: var(--rr-info-soft); color: var(--rr-info); }
.rr-kpi .chip.red { background: var(--rr-danger-soft); color: var(--rr-danger); }
.rr-kpi .chip.amber { background: var(--rr-warning-soft); color: var(--rr-warning); }
.rr-kpi .value { font-family: var(--rr-display); font-weight: 800; font-size: 28px; letter-spacing: -.03em; color: var(--rr-fg-1); line-height: 1.1; }
.rr-kpi .value small { font-size: 15px; font-weight: 700; color: var(--rr-fg-3); }
.rr-kpi .foot { margin-top: 8px; font-size: 12.5px; color: var(--rr-fg-3); display: flex; gap: 6px; align-items: center; }
.rr-delta { font-weight: 600; font-size: 12px; padding: 1px 7px; border-radius: 999px; }
.rr-delta.up { color: var(--rr-success-text); background: var(--rr-success-soft); }
.rr-delta.down { color: var(--rr-danger-text); background: var(--rr-danger-soft); }
.rr-progress { height: 8px; border-radius: 999px; background: var(--rr-fill); overflow: hidden; }
.rr-progress > span { display: block; height: 100%; border-radius: 999px; background: var(--rr-brand); }

/* ── pills / badges ───────────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--rr-fill); color: var(--rr-fg-2); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill.plain::before { display: none; }
.pill.success { background: var(--rr-success-soft); color: var(--rr-success-text); }
.pill.warning { background: var(--rr-warning-soft); color: var(--rr-warning-text); }
.pill.danger  { background: var(--rr-danger-soft);  color: var(--rr-danger-text); }
.pill.info    { background: var(--rr-info-soft);    color: var(--rr-info-text); }
.pill.brand   { background: var(--rr-brand-soft);   color: var(--rr-brand-soft-text); }
.pill.dark    { background: var(--rr-fg-1); color: var(--rr-canvas); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn { border-radius: 10px; font-weight: 600; font-size: 14px; padding: 8px 16px; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15.5px; border-radius: 12px; }
.btn-primary, .btn-brand { --bs-btn-bg: var(--rr-brand); --bs-btn-border-color: var(--rr-brand); --bs-btn-hover-bg: var(--rr-brand-hover);
  --bs-btn-hover-border-color: var(--rr-brand-hover); --bs-btn-active-bg: var(--rr-brand-press); --bs-btn-active-border-color: var(--rr-brand-press);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-disabled-bg: var(--rr-brand); --bs-btn-disabled-border-color: var(--rr-brand);
  box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 1px 0 rgba(255,255,255,.12); }
/* .btn-royal is the main call to action: the same solid brand as .btn-primary */
.btn-royal { --bs-btn-bg: var(--rr-brand); --bs-btn-border-color: var(--rr-brand); --bs-btn-hover-bg: var(--rr-brand-hover);
  --bs-btn-hover-border-color: var(--rr-brand-hover); --bs-btn-active-bg: var(--rr-brand-press); --bs-btn-active-border-color: var(--rr-brand-press);
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: var(--rr-fill); --bs-btn-disabled-border-color: var(--rr-border); --bs-btn-disabled-color: var(--rr-fg-4); --bs-btn-disabled-opacity: 1;
  box-shadow: 0 1px 2px rgba(16,24,40,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.btn-primary:disabled, .btn-primary.disabled { --bs-btn-disabled-bg: var(--rr-fill); --bs-btn-disabled-border-color: var(--rr-border);
  --bs-btn-disabled-color: var(--rr-fg-4); --bs-btn-disabled-opacity: 1; box-shadow: none; }
.btn-royal:disabled, .btn-royal.disabled { box-shadow: none; }
.btn-light, .btn-outline { --bs-btn-bg: var(--rr-surface); --bs-btn-border-color: var(--rr-border-strong); --bs-btn-color: var(--rr-fg-1);
  --bs-btn-hover-bg: var(--rr-fill); --bs-btn-hover-border-color: var(--rr-border-strong); --bs-btn-hover-color: var(--rr-fg-1);
  --bs-btn-active-bg: var(--rr-fill); --bs-btn-active-color: var(--rr-fg-1); box-shadow: var(--rr-shadow-sm); }
.btn-ghost { background: transparent; border: 0; color: var(--rr-fg-2); }
.btn-ghost:hover { background: var(--rr-fill); color: var(--rr-fg-1); }
.btn-danger { --bs-btn-bg: var(--rr-danger); --bs-btn-border-color: var(--rr-danger); }
.btn-ink { background: var(--rr-ink); color: #fff; } .btn-ink:hover { background: #222; color: #fff; }
[data-mode="dark"] .btn-ink { background: #fff; color: #0A0A0A; }

/* ── forms ────────────────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: 13.5px; color: var(--rr-fg-1); margin-bottom: 6px; }
.form-control, .form-select { border-radius: 10px; border-color: var(--rr-border-strong); background-color: var(--rr-surface); color: var(--rr-fg-1); padding: 9px 12px; font-size: 14.5px; }
.form-control:focus, .form-select:focus { border-color: var(--rr-brand); box-shadow: 0 0 0 4px rgba(239,90,40,.14); background-color: var(--rr-surface); color: var(--rr-fg-1); }
.form-control::placeholder { color: var(--rr-fg-4); }
.form-text { color: var(--rr-fg-3); font-size: 12.5px; }
.form-check-input:checked { background-color: var(--rr-brand); border-color: var(--rr-brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(239,90,40,.14); border-color: var(--rr-brand); }
.form-switch { padding-left: 3.1em; min-height: 1.4em; }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; margin-left: -3.1em; margin-top: .1em; }
.invalid-feedback { font-size: 12.5px; }
.input-group-text { background: var(--rr-fill); border-color: var(--rr-border-strong); color: var(--rr-fg-3); border-radius: 10px; }
.rr-form-section { padding: 22px 0; border-bottom: 1px solid var(--rr-border); }
.rr-form-section:first-child { padding-top: 0; } .rr-form-section:last-child { border-bottom: 0; }
.rr-form-section .title { font-weight: 700; color: var(--rr-fg-1); font-size: 15px; }
.rr-form-section .hint { font-size: 13px; color: var(--rr-fg-3); }
.rr-choice { display: block; border: 1.5px solid var(--rr-border); border-radius: 12px; padding: 12px 14px; cursor: pointer; transition: all .15s; background: var(--rr-surface); height: 100%; }
.rr-choice:hover { border-color: var(--rr-border-strong); }
.rr-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rr-choice:has(input:checked) { border-color: var(--rr-brand); background: var(--rr-brand-soft); box-shadow: 0 0 0 3px rgba(239,90,40,.10); }
.rr-choice .t { font-weight: 600; color: var(--rr-fg-1); display: block; }
.rr-choice .d { font-size: 12.5px; color: var(--rr-fg-3); }

/* ── tables ───────────────────────────────────────────────────────────── */
.rr-table { width: 100%; margin: 0; --bs-table-bg: transparent; color: var(--rr-fg-2); }
.rr-table th { font-size: 12px; font-weight: 600; color: var(--rr-fg-3); text-transform: uppercase; letter-spacing: .04em; background: var(--rr-fill); padding: 11px 16px; border-bottom: 1px solid var(--rr-border); white-space: nowrap; }
.rr-table td { padding: 13px 16px; border-bottom: 1px solid var(--rr-border); vertical-align: middle; font-size: 14px; }
.rr-table tbody tr:last-child td { border-bottom: 0; }
.rr-table tbody tr { transition: background .1s; }
.rr-table tbody tr:hover { background: color-mix(in srgb, var(--rr-fill) 60%, transparent); }
.rr-table tr[data-href] { cursor: pointer; }
.rr-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rr-table .strong { color: var(--rr-fg-1); font-weight: 600; }
.rr-table .who { display: flex; align-items: center; gap: 10px; }

/* live tables (js/rr-datatable.js): DataTables' controls in the portal's own look */
.rr-dt { position: relative; }
.rr-dt .dt-container > .dt-layout-row:first-child { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--rr-border); }
.rr-dt .dt-container > .dt-layout-row:last-child { padding: 12px 16px; margin: 0; border-top: 1px solid var(--rr-border); font-size: 13px; color: var(--rr-fg-3); }
.rr-dt .dt-layout-row.dt-layout-table { margin: 0; }
.rr-dt .dt-length, .rr-dt .dt-length label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rr-fg-3); white-space: nowrap; margin: 0; }
.rr-dt .dt-length select { width: auto; display: inline-block; padding: .25rem 2rem .25rem .6rem; font-size: 13px; border-radius: 8px; }
.rr-dt .dt-buttons { display: flex; gap: 6px; }
.rr-dt .dt-buttons .btn { border-radius: 8px !important; }
.rr-dt div.dt-container .dt-paging .pagination { margin: 0; gap: 4px; }
.rr-dt .page-link { border-radius: 8px !important; border: 1px solid var(--rr-border); background: var(--rr-surface); color: var(--rr-fg-2); font-size: 13px; padding: .3rem .7rem; }
.rr-dt .page-item.active .page-link { background: var(--rr-brand); border-color: var(--rr-brand); color: #fff; }
.rr-dt .page-item.disabled .page-link { opacity: .45; background: var(--rr-surface); }
.rr-dt table.dataTable { border-collapse: collapse !important; margin: 0 !important; }
.rr-dt table.dataTable > thead > tr > th { border-bottom: 1px solid var(--rr-border); }
.rr-dt table.dataTable > thead .dt-orderable-asc, .rr-dt table.dataTable > thead .dt-orderable-desc { cursor: pointer; }
.rr-dt table.dataTable > thead > tr > th.dt-ordering-asc, .rr-dt table.dataTable > thead > tr > th.dt-ordering-desc { color: var(--rr-fg-1); }
.rr-dt table.dataTable th.num, .rr-dt table.dataTable td.num { text-align: right; }
.rr-dt table.dataTable > thead > tr > th:focus:not(:focus-visible) { outline: none; }
.rr-dt div.dt-processing { background: var(--rr-surface); color: var(--rr-fg-2); border: 1px solid var(--rr-border); border-radius: 10px; box-shadow: var(--rr-shadow-sm); padding: 10px 16px; width: auto; margin-left: 0; transform: translateX(-50%); font-size: 13px; z-index: 5; }
.rr-dt div.dt-processing > div:last-child { display: none; }
.rr-dt td.dt-empty { padding: 0 !important; }
.dt-button-collection .dropdown-menu, div.dt-button-collection { background: var(--rr-surface); border: 1px solid var(--rr-border); border-radius: 10px; box-shadow: var(--rr-shadow-md, 0 8px 24px rgba(16,24,40,.12)); padding: 6px; min-width: 220px; }
div.dt-button-collection .dt-button, div.dt-button-collection .dropdown-item { border-radius: 6px; font-size: 13.5px; color: var(--rr-fg-2); padding: 6px 10px; }
div.dt-button-collection .dt-button.dt-button-active::after, div.dt-button-collection .dropdown-item.dt-button-active::after { color: var(--rr-brand); }
div.dt-button-collection .dt-button-active { color: var(--rr-fg-1); font-weight: 600; }
@media (max-width: 640px) {
  .rr-dt .dt-container > .dt-layout-row:first-child, .rr-dt .dt-container > .dt-layout-row:last-child { flex-direction: column; align-items: flex-start; gap: 8px; }
}
.rr-table .who .n { color: var(--rr-fg-1); font-weight: 600; line-height: 1.2; }
.rr-table .who .s { font-size: 12.5px; color: var(--rr-fg-3); }
.table-responsive { border-radius: 0 0 var(--rr-r-lg) var(--rr-r-lg); }

/* filters bar */
.rr-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rr-border); }
.rr-filters .search { position: relative; flex: 1 1 240px; max-width: 360px; }
.rr-filters .search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--rr-fg-4); }
.rr-filters .search input { padding-left: 36px; }
.rr-filters .form-select, .rr-filters .form-control { width: auto; min-width: 140px; padding-top: 7px; padding-bottom: 7px; font-size: 13.5px; }
.rr-tabs { display: flex; gap: 4px; padding: 4px; background: var(--rr-fill); border-radius: 12px; flex-wrap: wrap; }
.rr-tabs a { padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--rr-fg-3); }
.rr-tabs a.active { background: var(--rr-surface); color: var(--rr-fg-1); box-shadow: var(--rr-shadow); }
.rr-tabs a .count { margin-left: 6px; font-size: 11.5px; color: var(--rr-fg-4); }

/* pagination */
.rr-pager { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--rr-border); font-size: 13px; color: var(--rr-fg-3); }
.rr-pager .rr-pagesize { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.rr-pager .rr-pagesize select { width: auto; font-size: 13px; }

/* empty states */
.rr-empty { text-align: center; padding: 48px 20px; }
.rr-empty .ic { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--rr-grad-soft); color: var(--rr-brand); font-size: 22px; }
.rr-empty h3 { font-size: 16px; margin-bottom: 4px; }
.rr-empty p { color: var(--rr-fg-3); max-width: 380px; margin: 0 auto 16px; }

/* key-value lists */
.rr-kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 10px 16px; margin: 0; }
.rr-kv dt { color: var(--rr-fg-3); font-weight: 500; font-size: 13.5px; }
.rr-kv dd { color: var(--rr-fg-1); font-weight: 600; margin: 0; font-size: 14px; word-break: break-word; }

/* lists */
.rr-list { list-style: none; margin: 0; padding: 0; }
.rr-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--rr-border); }
.rr-list > li:last-child { border-bottom: 0; }
.rr-list .grow { flex: 1; min-width: 0; }
.rr-list .t { color: var(--rr-fg-1); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-list .s { font-size: 12.5px; color: var(--rr-fg-3); }
.rr-date-chip { width: 46px; flex: none; text-align: center; border-radius: 10px; border: 1px solid var(--rr-border); overflow: hidden; }
.rr-date-chip .m { background: var(--rr-grad); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.rr-date-chip .d { font-family: var(--rr-display); font-weight: 800; color: var(--rr-fg-1); font-size: 17px; padding: 3px 0; }
.rr-icon-tile { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--rr-fill); color: var(--rr-fg-2); flex: none; }
.rr-icon-tile.brand { background: var(--rr-brand-soft); color: var(--rr-brand); }
.rr-icon-tile.green { background: var(--rr-success-soft); color: var(--rr-success); }
.rr-icon-tile.red { background: var(--rr-danger-soft); color: var(--rr-danger); }
.rr-icon-tile.blue { background: var(--rr-info-soft); color: var(--rr-info); }

/* timeline */
.rr-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.rr-timeline li { position: relative; padding: 0 0 18px 26px; }
.rr-timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--rr-border); }
.rr-timeline li:last-child::before { display: none; }
.rr-timeline li::after { content: ""; position: absolute; left: 2px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--rr-surface); border: 3px solid var(--rr-brand); }
.rr-timeline .when { font-size: 12px; color: var(--rr-fg-3); }

/* charts */
.rr-chart { position: relative; height: 280px; }
.rr-chart.sm { height: 200px; } .rr-chart.lg { height: 340px; }
.rr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--rr-fg-2); }
.rr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rr-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rr-bar-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: center; padding: 7px 0; font-size: 13.5px; }
.rr-bar-row .track { height: 10px; background: var(--rr-fill); border-radius: 999px; overflow: hidden; }
.rr-bar-row .track span { display: block; height: 100%; border-radius: 999px; background: var(--viz-1); }

/* alerts / flash */
.rr-alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; border: 1px solid; font-size: 14px; }
.rr-alert.success { background: var(--rr-success-soft); border-color: color-mix(in srgb, var(--rr-success) 30%, transparent); color: var(--rr-success-text); }
.rr-alert.error, .rr-alert.danger { background: var(--rr-danger-soft); border-color: color-mix(in srgb, var(--rr-danger) 30%, transparent); color: var(--rr-danger-text); }
.rr-alert.warning { background: var(--rr-warning-soft); border-color: color-mix(in srgb, var(--rr-warning) 30%, transparent); color: var(--rr-warning-text); }
.rr-alert.info { background: var(--rr-info-soft); border-color: color-mix(in srgb, var(--rr-info) 30%, transparent); color: var(--rr-info-text); }
.rr-toasts { position: fixed; right: 20px; bottom: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.rr-toasts .rr-alert { box-shadow: var(--rr-shadow-lg); background-color: var(--rr-surface); animation: rr-in .25s ease; }
@keyframes rr-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* dropdown & modal */
.dropdown-menu { border-radius: 12px; border-color: var(--rr-border); box-shadow: var(--rr-shadow-lg); padding: 6px; background: var(--rr-raised); font-size: 14px; }
.dropdown-item { border-radius: 8px; padding: 8px 12px; color: var(--rr-fg-2); display: flex; align-items: center; gap: 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--rr-fill); color: var(--rr-fg-1); }
.dropdown-item.text-danger:hover { background: var(--rr-danger-soft); }
.modal-content { border-radius: var(--rr-r-xl); border: 1px solid var(--rr-border); background: var(--rr-surface); box-shadow: var(--rr-shadow-lg); }
.modal-header, .modal-footer { border-color: var(--rr-border); padding: 16px 22px; }
.modal-body { padding: 22px; }

/* auth */
.rr-auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.rr-auth .art {
  position: relative; overflow: hidden; color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  background: var(--rr-brand);
}
.rr-auth .art .quote { font-family: var(--rr-display); font-weight: 800; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.03em; max-width: 520px; }
.rr-auth .art .grid-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(circle at 60% 40%, #000, transparent 75%); }
.rr-auth .art p, .rr-auth .art span { color: #fff !important; }
.rr-auth .form-side { display: grid; place-items: center; padding: 40px 24px; background: var(--rr-canvas); }
.rr-auth .form-box { width: 100%; max-width: 400px; }
@media (max-width: 991.98px) { .rr-auth { grid-template-columns: 1fr; } .rr-auth .art { display: none; } }

/* misc */
.rr-divider { height: 1px; background: var(--rr-border); margin: 20px 0; }
.rr-code { font-family: var(--rr-mono); background: var(--rr-fill); border: 1px solid var(--rr-border); padding: 2px 8px; border-radius: 6px; font-size: 13px; color: var(--rr-fg-1); }
.rr-copy { cursor: pointer; }
.rr-stack > * + * { margin-top: 20px; }
.rr-map { height: 360px; border-radius: var(--rr-r-lg); overflow: hidden; border: 1px solid var(--rr-border); }
.rr-swatch { width: 18px; height: 18px; border-radius: 6px; display: inline-block; border: 1px solid var(--rr-border); vertical-align: middle; }
.rr-sticky-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--rr-surface) 92%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--rr-border); padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-radius: 0 0 var(--rr-r-lg) var(--rr-r-lg); }
.rr-live { width: 8px; height: 8px; border-radius: 50%; background: var(--rr-danger); display: inline-block; box-shadow: 0 0 0 0 rgba(217,45,32,.6); animation: rr-pulse 1.6s infinite; }
@keyframes rr-pulse { 70% { box-shadow: 0 0 0 10px rgba(217,45,32,0); } 100% { box-shadow: 0 0 0 0 rgba(217,45,32,0); } }
.rr-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.rr-kanban .col-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; color: var(--rr-fg-1); font-size: 13.5px; }
.rr-kanban .item { padding: 14px; margin-bottom: 10px; }
@media print { .rr-sidebar, .rr-topbar, .no-print { display: none !important; } .rr-main { margin: 0; } .rr-content { padding: 0; } }

/* ── setup guide ──────────────────────────────────────────────────────── */
.rr-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 20px; padding: 6px; overflow-x: auto; scrollbar-width: none;
  background: var(--rr-surface); border: 1px solid var(--rr-border); border-radius: var(--rr-r-lg); box-shadow: var(--rr-shadow-sm); }
.rr-steps::-webkit-scrollbar { display: none; }
.rr-steps li { flex: 1 0 auto; }
.rr-steps a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px; color: var(--rr-fg-3); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.rr-steps a:hover { background: var(--rr-fill); color: var(--rr-fg-1); }
.rr-steps .dot { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1.5px solid var(--rr-border-strong); color: var(--rr-fg-3); background: var(--rr-surface); }
.rr-steps .done .dot { background: var(--rr-success); border-color: var(--rr-success); color: #fff; }
.rr-steps .skipped .dot { border-style: dashed; }
.rr-steps .current a { background: var(--rr-brand-soft); color: var(--rr-brand-soft-text); }
.rr-steps .current .dot { background: var(--rr-brand); border-color: var(--rr-brand); color: #fff; }
.rr-steps .opt { font-weight: 500; font-size: 11.5px; color: var(--rr-fg-4); }

.rr-step-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.rr-step-head .ic { width: 52px; height: 52px; flex: none; border-radius: 15px; display: grid; place-items: center; font-size: 22px;
  background: var(--rr-grad-soft); color: var(--rr-brand); }
.rr-step-head h1 { font-size: 24px; margin: 2px 0 4px; }
.rr-step-head p { margin: 0; color: var(--rr-fg-3); max-width: 640px; }

.rr-why { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--rr-info-soft); color: var(--rr-info-text); font-size: 13.5px; }
.rr-why i { margin-top: 3px; }

.rr-step-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--rr-border); }
.rr-step-foot .right { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

.rr-path { display: block; height: 100%; padding: 18px; border: 1.5px solid var(--rr-border); border-radius: 16px; background: var(--rr-surface);
  color: var(--rr-fg-2); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.rr-path:hover, button.rr-path:hover { border-color: var(--rr-brand); box-shadow: 0 0 0 3px rgba(239,90,40,.10); transform: translateY(-1px); color: var(--rr-fg-2); }
.rr-path .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--rr-brand-soft); color: var(--rr-brand); font-size: 18px; margin-bottom: 12px; }
.rr-path .t { display: block; font-weight: 700; color: var(--rr-fg-1); font-size: 15px; margin-bottom: 4px; }
.rr-path .d { font-size: 13px; color: var(--rr-fg-3); }
.rr-path .tag { display: inline-block; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--rr-success-text); background: var(--rr-success-soft); border-radius: 999px; padding: 2px 9px; }
button.rr-path { width: 100%; text-align: left; }

.rr-drop { position: relative; display: grid; place-items: center; text-align: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--rr-border-strong);
  border-radius: 16px; background: var(--rr-fill); cursor: pointer; transition: border-color .15s, background .15s; }
.rr-drop:hover, .rr-drop.over { border-color: var(--rr-brand); background: var(--rr-brand-soft); }
.rr-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rr-drop .ic { font-size: 26px; color: var(--rr-brand); }
.rr-drop .t { font-weight: 700; color: var(--rr-fg-1); }
.rr-drop .d { font-size: 12.5px; color: var(--rr-fg-3); }
.rr-drop .file { font-family: var(--rr-mono); font-size: 12.5px; color: var(--rr-fg-1); }

.rr-model { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.rr-model .lvl { position: relative; padding: 14px 12px; border-radius: 14px; background: var(--rr-fill); text-align: center; }
.rr-model .lvl i { font-size: 20px; color: var(--rr-brand); }
.rr-model .lvl b { display: block; color: var(--rr-fg-1); margin-top: 6px; font-size: 14px; }
.rr-model .lvl span { display: block; font-size: 12px; color: var(--rr-fg-3); }
.rr-model .lvl + .lvl::before { content: "\f054"; font: var(--fa-font-solid); position: absolute; left: -11px; top: 50%; transform: translateY(-50%); font-size: 10px; color: var(--rr-fg-4); }
@media (max-width: 575.98px) { .rr-model { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rr-model .lvl:nth-child(3)::before { display: none; } }

.rr-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rr-who > div { padding: 12px; border-radius: 12px; border: 1px solid var(--rr-border); background: var(--rr-surface); }
.rr-who b { display: block; color: var(--rr-fg-1); font-size: 13.5px; }
.rr-who span { font-size: 12.5px; color: var(--rr-fg-3); }
@media (max-width: 575.98px) { .rr-who { grid-template-columns: 1fr; } }

.rr-checklist { list-style: none; margin: 0; padding: 0; }
.rr-checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rr-border); }
.rr-checklist li:last-child { border-bottom: 0; }
.rr-checklist .st { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.rr-checklist .st.done { background: var(--rr-success-soft); color: var(--rr-success-text); }
.rr-checklist .st.todo { background: var(--rr-fill); color: var(--rr-fg-3); }
.rr-checklist .st.skipped { background: var(--rr-warning-soft); color: var(--rr-warning-text); }
.rr-checklist .grow { flex: 1; min-width: 0; }
.rr-checklist .t { font-weight: 600; color: var(--rr-fg-1); }
.rr-checklist .s { font-size: 12.5px; color: var(--rr-fg-3); }

.rr-faq .accordion-item { background: transparent; border: 0; border-bottom: 1px solid var(--rr-border); }
.rr-faq .accordion-item:last-child { border-bottom: 0; }
.rr-faq .accordion-button { background: transparent; box-shadow: none; padding: 12px 0; font-size: 13.5px; font-weight: 600; color: var(--rr-fg-1); }
.rr-faq .accordion-button:not(.collapsed) { color: var(--rr-brand-soft-text); }
.rr-faq .accordion-body { padding: 0 0 12px; font-size: 13px; color: var(--rr-fg-3); }

.rr-row-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.rr-row-status.new { color: var(--rr-success-text); }
.rr-row-status.exists { color: var(--rr-fg-3); }
.rr-row-status.error { color: var(--rr-danger-text); }
.rr-table tr.is-error td { background: var(--rr-danger-soft); }
.rr-table .note { font-size: 12px; color: var(--rr-fg-3); }
.rr-table .note.bad { color: var(--rr-danger-text); }

.rr-setup-banner { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 20px 22px; border-radius: var(--rr-r-xl);
  background: var(--rr-shell); color: var(--rr-shell-fg); box-shadow: var(--rr-shadow); position: relative; overflow: hidden; }

.rr-setup-banner h2 { color: #fff; font-size: 18px; margin: 0 0 2px; }
.rr-setup-banner .grow { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.rr-setup-banner .rr-progress { background: rgba(255,255,255,.12); }
.rr-setup-banner .btn { position: relative; z-index: 1; }

.rr-poster { max-width: 720px; margin: 0 auto; text-align: center; padding: 48px 40px; background: #fff; color: #101828; border: 1px solid #E4E7EC; border-radius: 20px; }
.rr-poster h1 { color: #101828; font-size: 40px; font-family: var(--rr-display); font-weight: 800; letter-spacing: -.03em; }
.rr-poster img.qr { width: 300px; height: 300px; }
@media print {
  .rr-sidebar, .rr-topbar, .no-print, .rr-toasts { display: none !important; }
  .rr-main, .rr-content { margin: 0 !important; padding: 0 !important; }
  .rr-poster { border: 0; }
  body, html { background: #fff !important; }
}
.rr-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--rr-fg-3); }
.rr-tabs button.active { background: var(--rr-surface); color: var(--rr-fg-1); box-shadow: var(--rr-shadow); }

/* apartment editor (one building) */
.rr-apartments .rr-apt { display: flex; gap: 8px; align-items: center; padding: 6px 0; }
.rr-apartments .rr-apt .form-control { flex: 1; min-width: 0; }
.rr-apartments .rr-apt .rr-icon-tile { width: 34px; height: 34px; border-radius: 9px; }

/* ── setup guide: "what to do here" ─────────────────────────────────── */
.rr-howto { counter-reset: howto; list-style: none; padding: 0; display: grid; gap: 8px; }
.rr-howto li { counter-increment: howto; display: flex; gap: 10px; align-items: baseline; font-size: 14px; color: var(--rr-fg-1); }
.rr-howto li::before { content: counter(howto); flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--rr-brand-soft, rgba(239,90,40,.12)); color: var(--rr-brand); }

/* ── searchable selects (Tom Select) ─────────────────────────────────
   The wrapper keeps the select's .form-select class, so it is the visible box (border, caret, focus ring);
   the inner .ts-control only lays out the text and chips. */
.ts-wrapper.form-select { padding: 0 !important; min-height: 42px; cursor: pointer; }
.ts-wrapper.form-select.multi { background-image: none; cursor: text; }
.ts-wrapper.form-select .ts-control { padding: 9px 36px 9px 12px; font-size: 14.5px; min-height: 40px; border-radius: 10px; cursor: inherit; }
.ts-wrapper.form-select.multi .ts-control { padding: 5px 34px 5px 6px; gap: 4px; }
.ts-wrapper.form-select.focus { border-color: var(--rr-brand); box-shadow: 0 0 0 4px rgba(239,90,40,.14) !important; }
.ts-wrapper.form-select.focus .ts-control { box-shadow: none !important; outline: 0; }
.ts-wrapper.form-select.is-invalid { border-color: var(--rr-danger); }
.ts-wrapper.form-select.disabled { opacity: .6; cursor: not-allowed; }
.ts-control input, .ts-control .item { color: var(--rr-fg-1); font-size: inherit; }
.ts-control input::placeholder { color: var(--rr-fg-3); }
.ts-wrapper.multi .ts-control > .item { background: var(--rr-brand-soft); color: var(--rr-brand-soft-text, var(--rr-brand)); border: 0; border-radius: 999px; padding: 3px 2px 3px 10px; margin: 0; font-size: 13px; font-weight: 600; }
.ts-wrapper.plugin-remove_button .item .remove { border-left: 0 !important; color: inherit; padding: 0 8px; margin-left: 2px; border-radius: 0 999px 999px 0; font-size: 15px; line-height: 1; }
.ts-wrapper.plugin-remove_button .item .remove:hover { background: rgba(0,0,0,.06); }
.ts-wrapper .clear-button { color: var(--rr-fg-3); }
.ts-dropdown { background: var(--rr-surface); color: var(--rr-fg-1); border: 1px solid var(--rr-border); border-radius: 12px; box-shadow: var(--rr-shadow-lg); margin-top: 6px; overflow: hidden; z-index: 1060; font-size: 14px; }
.modal .ts-dropdown { z-index: 1065; }
.ts-dropdown .ts-dropdown-content { max-height: 280px; padding: 4px 0; }
.ts-dropdown .option { padding: 8px 12px; }
.ts-dropdown .active { background: var(--rr-brand-soft) !important; color: var(--rr-fg-1) !important; }
.ts-dropdown .option.selected { font-weight: 600; }
.ts-dropdown .optgroup-header { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--rr-fg-3); background: var(--rr-surface); }
.ts-dropdown .no-results { padding: 10px 12px; color: var(--rr-fg-3); }
.ts-dropdown .dropdown-input-wrap { padding: 8px; border-bottom: 1px solid var(--rr-border); }
.ts-dropdown .dropdown-input, .plugin-dropdown_input .dropdown-input { border: 1px solid var(--rr-border-strong) !important; border-radius: 8px; padding: 7px 10px; background: var(--rr-surface); color: var(--rr-fg-1); box-shadow: none !important; outline: 0; }
.ts-dropdown .dropdown-input:focus { border-color: var(--rr-brand) !important; }
.rr-filters .ts-wrapper { width: auto; min-width: 160px; }
.rr-filters .ts-wrapper.form-select { min-height: 0; }
.rr-filters .ts-wrapper .ts-control { min-height: 0; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.input-group > .ts-wrapper { flex: 1 1 auto; width: 1%; }
.rr-icon-tile.amber { background: var(--rr-warning-soft); color: var(--rr-warning); }

/* dashboard: "Needs you", each role's own to-do list */
.rr-needs { background: var(--rr-surface); border: 1px solid var(--rr-border); border-radius: 16px; padding: 14px 16px; }
.rr-needs .overline { margin-bottom: 10px; }
.rr-needs .items { display: flex; flex-wrap: wrap; gap: 10px; }
.rr-needs .item { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 1px solid var(--rr-border);
  color: var(--rr-fg-1); font-weight: 600; font-size: 14px; text-decoration: none; transition: border-color .15s, background .15s; }
.rr-needs .item:hover { border-color: var(--rr-brand); background: var(--rr-brand-soft); }
.rr-needs .item .rr-icon-tile { width: 32px; height: 32px; border-radius: 9px; }
.rr-needs .item .go { color: var(--rr-fg-3); font-size: 12px; }
.rr-needs .clear { color: var(--rr-success-text); font-weight: 600; font-size: 14.5px; }
@media (max-width: 575.98px) { .rr-needs .item { flex: 1 1 100%; } .rr-needs .item .t { flex: 1; } }
