/* ==========================================================================
   Real Estate Platform — Dashboard Design System
   --------------------------------------------------------------------------
   The single stylesheet for every role dashboard (owner/manager, tenant,
   landlord/agency, realtor, hotel provider, guest, handyman, client, admins).
   Tokens (colours, radius, shadows) are defined in frontend.css :root and are
   overridable from Settings → Theme.

   Sections
     1  Shell            wrap · sidebar · topbar · hero · responsive drawer
     2  KPI cards        .rp-kpi-card + tone modifiers
     3  Layout           .rp-row grids, panels (.rp-section), section headers
     4  Charts           bars · line/area · donut · ring (server-rendered)
     5  Lists & tiles    .rp-list, date tiles, activity, quick actions
     6  Components       chips, tabs, status pills, empty states, notices, cards
     7  Module legacy    handyman / hotel classes mapped onto the same look
     8  Responsive & motion
   ========================================================================== */

/* ── 1 · SHELL ───────────────────────────────────────────────────────────── */
.rp-dash-wrap {
  display: flex; min-height: 100vh; background: var(--rp-bg); color: var(--rp-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--rp-fs-base); line-height: 1.5; position: relative; -webkit-font-smoothing: antialiased;
  --hm-primary: var(--rp-primary); --hm-primary-dark: var(--rp-primary-d);
}
.rp-dash-wrap h1, .rp-dash-wrap h2, .rp-dash-wrap h3, .rp-dash-wrap h4 { font-family: inherit; text-transform: none; letter-spacing: normal; color: var(--rp-text); }
.rp-dash-wrap a { text-decoration: none; }
.rp-dash-wrap .rp-ico { flex-shrink: 0; }

/* Sidebar */
.rp-dash-sidebar {
  width: var(--rp-sidebar-w); flex-shrink: 0; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column; overflow: hidden; z-index: 60; height: 100vh; height: 100dvh;
  background: linear-gradient(180deg, rgba(255,255,255,.045) 0%, rgba(0,0,0,.14) 100%), var(--rp-sidebar-bg);
  transition: width var(--rp-transition);
}
.admin-bar .rp-dash-sidebar { top: 32px; height: calc(100vh - 32px); }

.rp-dash-brand { flex-shrink: 0; display: flex; align-items: center; gap: 11px; padding: 16px 16px 12px; min-height: 66px; overflow: hidden; }
.rp-dash-brand-circle, .rp-dash-brand-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
}
.rp-dash-brand-circle { display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, var(--rp-primary-mid), var(--rp-primary)); box-shadow: 0 6px 16px rgba(37,99,235,.4); }
.rp-dash-brand-circle svg { width: 22px; height: 22px; }
.rp-dash-brand-logo { object-fit: contain; background: #fff; padding: 3px; }
.rp-dash-brand-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.rp-dash-brand-name { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-dash-brand-tag  { color: var(--rp-sidebar-text); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-dash-drawer-close { display: none; }

.rp-dash-nav { flex: 1 1 auto; min-height: 0; padding: 4px 12px 12px; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.rp-dash-nav::-webkit-scrollbar { width: 4px; }
.rp-dash-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }

.rp-dash-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; margin-bottom: 3px;
  border-radius: 12px; cursor: pointer; user-select: none; position: relative;
  color: var(--rp-sidebar-text); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background var(--rp-transition), color var(--rp-transition), box-shadow var(--rp-transition);
}
.rp-dash-nav-item:hover { background: var(--rp-sidebar-hover); color: #fff; }
.rp-dash-nav-item:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.rp-dash-nav-item.active { background: var(--rp-sidebar-active); color: #fff; box-shadow: 0 8px 18px rgba(37,99,235,.38); }
.rp-nav-icon { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rp-nav-icon svg { width: 18px; height: 18px; }
.rp-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }

.rp-dash-nav-divider { padding: 14px 12px 6px; margin-top: 8px; border-top: 1px solid rgba(255,255,255,.08); }
.rp-dash-nav-divider-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(169,184,218,.7); }

.rp-dash-sidebar-foot { flex-shrink: 0; margin: 0 12px 12px; padding: 12px; display: flex; align-items: center; gap: 11px; border-radius: 14px; background: rgba(255,255,255,.07); overflow: hidden; flex-wrap: wrap; }
.rp-dash-foot-avatar { position: relative; overflow: hidden; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rp-primary-mid), var(--rp-primary)); color: #fff; font-size: 13px; font-weight: 700; }
.rp-dash-foot-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-dash-foot-meta { flex: 1; min-width: 0; }
.rp-dash-foot-name { color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-dash-foot-role { color: var(--rp-sidebar-text); font-size: 11.5px; }
.rp-dash-foot-badge { display: inline-flex; align-items: center; gap: 4px; margin-top: 5px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 600; }
.rp-dash-foot-badge svg { width: 11px; height: 11px; }
.rp-dash-foot-badge-success { background: rgba(34,197,94,.2);  color: #86EFAC; }
.rp-dash-foot-badge-warning { background: rgba(245,158,11,.2); color: #FCD34D; }
.rp-dash-foot-badge-danger  { background: rgba(239,68,68,.2);  color: #FCA5A5; }
.rp-dash-foot-logout { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 4px 2px; margin-top: 4px; border-top: 1px solid rgba(255,255,255,.08);
  color: var(--rp-sidebar-text); font-size: 13px; font-weight: 500; transition: color var(--rp-transition); }
.rp-dash-foot-logout:hover { color: #FCA5A5; }

/* Collapsed icon rail (desktop only — below 900px the sidebar is a drawer) */
@media (min-width: 901px) {
  .rp-sidebar-collapsed .rp-dash-sidebar { width: var(--rp-sidebar-w-sm); }
  .rp-sidebar-collapsed .rp-dash-brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .rp-sidebar-collapsed .rp-dash-brand-text,
  .rp-sidebar-collapsed .rp-nav-label,
  .rp-sidebar-collapsed .rp-dash-foot-meta,
  .rp-sidebar-collapsed .rp-dash-foot-logout-text,
  .rp-sidebar-collapsed .rp-dash-nav-divider-label { display: none; }
  .rp-sidebar-collapsed .rp-dash-nav { padding-left: 12px; padding-right: 12px; }
  .rp-sidebar-collapsed .rp-dash-nav-item { justify-content: center; padding: 12px 0; gap: 0; }
  .rp-sidebar-collapsed .rp-dash-nav-divider { padding: 10px 0 0; margin-top: 8px; }
  .rp-sidebar-collapsed .rp-dash-sidebar-foot { margin: 0 12px 14px; padding: 10px 6px; justify-content: center; }
  .rp-sidebar-collapsed .rp-dash-foot-logout { justify-content: center; border-top: 0; padding: 8px 0 0; width: auto; }
}
/* Collapsed-rail labels are shown through each item's native title tooltip: a CSS tooltip needs
   overflow:visible, which stopped the rail from scrolling when the menu is taller than the screen. */

/* Main column */
.rp-dash-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.rp-dash-topbar {
  height: var(--rp-topbar-h); position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rp-border); transition: box-shadow var(--rp-transition);
}
.admin-bar .rp-dash-topbar { top: 32px; }
.rp-topbar-shadow { box-shadow: 0 4px 20px rgba(16,24,40,.07); }

.rp-dash-iconbtn {
  width: 42px; height: 42px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 12px; background: transparent; color: var(--rp-text-2); cursor: pointer; box-shadow: none;
  transition: background var(--rp-transition);
}
.rp-dash-iconbtn:hover, .rp-dash-iconbtn:focus { background: var(--rp-primary-l); color: var(--rp-primary); box-shadow: none; }
.rp-dash-iconbtn:focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 1px; }

.rp-dash-search { position: relative; flex: 1; max-width: 560px; }
.rp-dash-search input[type=search] {
  width: 100%; height: 38px; padding: 0 40px 0 40px; margin: 0; appearance: none; -webkit-appearance: none;
  border: 1.5px solid var(--rp-border); border-radius: 12px; background: #fff; box-shadow: none;
  font: inherit; font-size: 13px; color: var(--rp-text); outline: none;
  transition: border-color var(--rp-transition), box-shadow var(--rp-transition);
}
.rp-dash-search input[type=search]::placeholder { color: #8D98B3; }
.rp-dash-search input[type=search]:focus { border-color: var(--rp-primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.rp-dash-search input[type=search]::-webkit-search-cancel-button { display: none; }
.rp-dash-search-ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #8D98B3; display: flex; pointer-events: none; }
.rp-dash-search-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; font: 600 11px/1 inherit;
  color: #8D98B3; border: 1px solid var(--rp-border); border-radius: 6px; padding: 4px 7px; background: #F7F9FD; }
.rp-dash-search input:focus ~ .rp-dash-search-kbd { display: none; }
.rp-dash-search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 80; margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow-lg); max-height: 320px; overflow-y: auto; }
.rp-dash-search-results[hidden] { display: none; }
.rp-dash-search-results li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-weight: 500; color: var(--rp-text); }
.rp-dash-search-results li.is-sel, .rp-dash-search-results li[data-tab]:hover { background: var(--rp-primary-l); color: var(--rp-primary); }
.rp-dash-search-results .rp-dash-search-empty { color: var(--rp-muted); cursor: default; }
.rp-dash-search-hit-ico { display: flex; } .rp-dash-search-hit-ico svg { width: 18px; height: 18px; }

.rp-dash-topbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* Notifications bell (component lives in rp-notifications.css) as a bordered round button */
.rp-dash-topbar .rp-notif-scope .rp-notif-bell-btn { width: 42px; height: 42px; border: 1px solid var(--rp-border); background: #fff; color: var(--rp-text-2); }
.rp-dash-topbar .rp-notif-scope .rp-notif-bell-btn:hover,
.rp-dash-topbar .rp-notif-scope .rp-notif-bell-btn:focus { background: var(--rp-primary-l); color: var(--rp-primary); border: 1px solid #C7D8FA; }
.rp-dash-topbar .rp-notif-badge { top: -3px; right: -3px; box-shadow: 0 0 0 2px #fff; }

/* User chip + menu */
.rp-dash-user { position: relative; }
.rp-dash-user-btn { display: flex; align-items: center; gap: 11px; padding: 4px 10px 4px 5px; margin: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--rp-text); font: inherit; box-shadow: none; transition: background var(--rp-transition); text-align: left; }
.rp-dash-user-btn:hover, .rp-dash-user-btn:focus { background: #F1F4FA; box-shadow: none; color: var(--rp-text); }
.rp-dash-user-btn:focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 1px; }
.rp-dash-user-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--rp-primary-mid), var(--rp-primary)); color: #fff; font-size: 13px; font-weight: 700; }
.rp-dash-user-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-dash-user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.rp-dash-user-name { font-size: 13px; font-weight: 600; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-dash-role-chip { font-size: 11.5px; color: var(--rp-muted); font-weight: 500; }
.rp-dash-user-btn > svg { color: var(--rp-muted); }
.rp-dash-user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 90; padding: 6px; background: #fff;
  border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow-lg); }
.rp-dash-user-menu[hidden] { display: none; }
.rp-dash-user-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--rp-border); margin-bottom: 6px; display: flex; flex-direction: column; }
.rp-dash-user-menu-head small { color: var(--rp-muted); font-size: 12px; overflow-wrap: anywhere; }
.rp-dash-user-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--rp-text-2); font-weight: 500; }
.rp-dash-user-menu a:hover { background: var(--rp-primary-l); color: var(--rp-primary); }

/* Content + hero */
.rp-dash-content { flex: 1; padding: 22px 24px 36px; min-width: 0; }
.rp-dash-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.rp-dash-wrap .rp-dash-page-title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.2px; color: var(--rp-text); }
.rp-dash-page-sub { margin: 4px 0 0; color: var(--rp-muted); font-size: 13px; }
.rp-dash-page-sub[hidden] { display: none; }
.rp-dash-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-chip { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 10px; font-size: 12px; font-weight: 500; color: var(--rp-text-2); }
.rp-chip-date { background: #fff; border: 1px solid var(--rp-border); box-shadow: var(--rp-shadow); }
.rp-chip-date svg { color: var(--rp-muted); }
.rp-chip-tz { padding: 0 4px; color: var(--rp-muted); }
.rp-chip-status { padding: 0 4px; color: var(--rp-t-green); font-weight: 600; }
.rp-chip-status i { width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.rp-chip-status.is-offline { color: var(--rp-danger); }
.rp-chip-status.is-offline i { background: #EF4444; box-shadow: 0 0 0 4px rgba(239,68,68,.18); }

/* Drawer overlay (mobile) */
.rp-dash-overlay { display: none; }

/* ── 2 · KPI CARDS ───────────────────────────────────────────────────────── */
.rp-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.rp-kpi-card {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px;
  background: var(--rp-bg-card); border: 1px solid var(--rp-border); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow);
  color: var(--rp-text); transition: box-shadow var(--rp-transition), transform var(--rp-transition);
}
a.rp-kpi-card:hover { box-shadow: var(--rp-shadow-md); transform: translateY(-2px); }
a.rp-kpi-card:focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 2px; }
.rp-kpi-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rp-kpi-icon svg { width: 20px; height: 20px; }
.rp-kpi-data { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.rp-kpi-label { font-size: 12px; font-weight: 500; color: var(--rp-text-2); line-height: 1.3; }
.rp-kpi-valrow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.rp-kpi-value { font-size: var(--rp-fs-stat); font-weight: 700; letter-spacing: -.4px; line-height: 1.15; color: var(--rp-text); overflow-wrap: anywhere; }
.rp-kpi-sub { font-size: 11.5px; color: var(--rp-muted); }
.rp-kpi-card-warning { border-color: #FAD7A0; background: var(--rp-warning-bg); }
.rp-trend { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.rp-trend svg { stroke-width: 2.6; }
.rp-trend-up { color: #16A34A; } .rp-trend-down { color: #DC2626; } .rp-trend-flat { color: var(--rp-muted); }

/* Pastel tone modifiers — tinted card, solid circular icon */
.rp-kpi-card[class*="rp-tone-"] { border-color: transparent; box-shadow: none; }
.rp-kpi-card[class*="rp-tone-"] .rp-kpi-icon { border-radius: 50%; width: 46px; height: 46px; color: #fff; }
.rp-kpi-card[class*="rp-tone-"] .rp-kpi-label { color: var(--rp-text); font-weight: 600; }
.rp-tone-blue   { --t: var(--rp-t-blue);   --tb: var(--rp-t-blue-bg); }
.rp-tone-green  { --t: var(--rp-t-green);  --tb: var(--rp-t-green-bg); }
.rp-tone-orange { --t: var(--rp-t-orange); --tb: var(--rp-t-orange-bg); }
.rp-tone-purple { --t: var(--rp-t-purple); --tb: var(--rp-t-purple-bg); }
.rp-tone-red    { --t: var(--rp-t-red);    --tb: var(--rp-t-red-bg); }
.rp-tone-teal   { --t: var(--rp-t-teal);   --tb: var(--rp-t-teal-bg); }
.rp-tone-amber  { --t: var(--rp-t-amber);  --tb: var(--rp-t-amber-bg); }
.rp-tone-slate  { --t: var(--rp-t-slate);  --tb: var(--rp-t-slate-bg); }
.rp-kpi-card[class*="rp-tone-"] { background: var(--tb); }
.rp-kpi-card[class*="rp-tone-"] .rp-kpi-icon { background: var(--t); box-shadow: 0 6px 14px color-mix(in srgb, var(--t) 35%, transparent); }

/* ── 3 · LAYOUT & PANELS ─────────────────────────────────────────────────── */
.rp-wrap { max-width: none; font-family: inherit; }
.rp-row { display: grid; gap: 16px; margin-bottom: 16px; align-items: stretch; }
.rp-row > * { min-width: 0; }
.rp-row > .rp-section { margin-bottom: 0; }
.rp-row-2   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-row-3   { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-row-3w  { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, .85fr); }
.rp-row-21  { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.rp-row-12  { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.rp-row-4   { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rp-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.rp-section-header h3, .rp-dash-wrap .rp-section-header h3 { margin: 0; font-size: var(--rp-fs-h3); font-weight: 600; color: var(--rp-text); line-height: 1.3; }
.rp-section-header > div { min-width: 0; }
.rp-section-header select, .rp-select-pill {
  height: 36px; padding: 0 30px 0 12px; border: 1px solid var(--rp-border); border-radius: 10px; background: #fff; color: var(--rp-text-2); font: inherit; font-size: 12.5px; cursor: pointer;
}
.rp-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--rp-primary); white-space: nowrap; }
.rp-link:hover { color: var(--rp-primary-d); }
.rp-link svg { transition: transform var(--rp-transition); }
.rp-link:hover svg { transform: translateX(3px); }

/* ── 4 · CHARTS ──────────────────────────────────────────────────────────── */
.rp-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "legend legend" "y plot" ". x"; column-gap: 10px; --plot-h: 180px; }
.rp-chart-legend { grid-area: legend; display: flex; gap: 18px; margin-bottom: 14px; font-size: 12.5px; color: var(--rp-text-2); }
.rp-chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.rp-chart-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rp-chart-yaxis { grid-area: y; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; height: calc(var(--plot-h) + 14px); font-size: 11px; line-height: 14px; color: var(--rp-muted); font-variant-numeric: tabular-nums; }
.rp-chart-plot { grid-area: plot; position: relative; height: var(--plot-h); margin: 7px 0; }
.rp-chart-grid { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.rp-chart-grid i { display: block; height: 0; border-top: 1px dashed #E3E8F2; }
.rp-chart-grid i:last-child { border-top: 1px solid #D7DEEC; }
.rp-chart-xaxis { grid-area: x; display: flex; font-size: 11px; color: var(--rp-muted); margin-top: 4px; }
.rp-chart-xaxis span { flex: 1; text-align: center; }

.rp-bars { position: absolute; inset: 0; display: flex; }
.rp-bar-col { flex: 1; display: flex; align-items: flex-end; justify-content: center; position: relative; outline: none; }
.rp-bar { position: relative; display: block; width: 56%; max-width: 38px; min-height: 3px; border-radius: 9px 9px 2px 2px; background: linear-gradient(180deg, #9DBEF9, #BFD5FB); transition: filter var(--rp-transition); }
.rp-bar-col.is-last .rp-bar { background: linear-gradient(180deg, var(--rp-primary-mid), var(--rp-primary)); }
.rp-bar-col:hover .rp-bar, .rp-bar-col:focus-visible .rp-bar { filter: brightness(.94); }

.rp-bar-tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 10px; border-radius: 8px; white-space: nowrap;
  background: #0A1740; color: #fff; font-size: 12px; font-weight: 600; line-height: 1.3; opacity: 0; pointer-events: none; transition: opacity var(--rp-transition); box-shadow: 0 6px 18px rgba(10,23,64,.3); }
.rp-bar-col:hover .rp-bar-tip, .rp-bar-col:focus-visible .rp-bar-tip, .rp-dot:hover .rp-bar-tip, .rp-dot:focus-visible .rp-bar-tip { opacity: 1; z-index: 8; }
.rp-bar-col:first-child .rp-bar-tip { left: 0; transform: none; }
.rp-bar-col:last-child  .rp-bar-tip { left: auto; right: 0; transform: none; }
/* the bar's own value tooltip is always shown on the latest bar */
.rp-bar-col.is-last .rp-bar-tip { opacity: 1; }

.rp-chart-line svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rp-line { fill: none; stroke-width: 2.6; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.rp-area { stroke: none; fill-opacity: .12; }
.rp-line.rp-s1, .rp-area.rp-s1 { stroke: var(--rp-c1); } .rp-area.rp-s1 { fill: var(--rp-c1); stroke: none; }
.rp-line.rp-s2, .rp-area.rp-s2 { stroke: var(--rp-c2); } .rp-area.rp-s2 { fill: var(--rp-c2); stroke: none; }
.rp-line.rp-s3, .rp-area.rp-s3 { stroke: var(--rp-c3); } .rp-area.rp-s3 { fill: var(--rp-c3); stroke: none; }
.rp-chart-legend i.rp-s1 { background: var(--rp-c1); } .rp-chart-legend i.rp-s2 { background: var(--rp-c2); } .rp-chart-legend i.rp-s3 { background: var(--rp-c3); }
.rp-dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #fff; border: 2.5px solid var(--rp-c1); outline: none; cursor: default; }
.rp-dot.rp-s2 { border-color: var(--rp-c2); } .rp-dot.rp-s3 { border-color: var(--rp-c3); }
.rp-dot:hover, .rp-dot:focus-visible { transform: scale(1.25); }

.rp-donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.rp-donut { position: relative; width: 140px; height: 140px; flex-shrink: 0; }
.rp-donut svg { width: 100%; height: 100%; transform: scale(1); }
.rp-arc-track { stroke: #EEF1F7; }
.rp-arc.rp-c1 { stroke: var(--rp-c1); } .rp-arc.rp-c2 { stroke: var(--rp-c2); } .rp-arc.rp-c3 { stroke: var(--rp-c3); }
.rp-arc.rp-c4 { stroke: var(--rp-c4); } .rp-arc.rp-c5 { stroke: var(--rp-c5); } .rp-arc.rp-c6 { stroke: var(--rp-c6); }
.rp-donut-center, .rp-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.15; }
.rp-donut-center b { font-size: var(--rp-fs-stat); font-weight: 700; letter-spacing: -.5px; color: var(--rp-text); }
.rp-donut-center span, .rp-ring-center span { font-size: 12.5px; color: var(--rp-muted); }
.rp-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 11px; }
.rp-legend li { display: grid; grid-template-columns: 10px 1fr auto auto; align-items: center; gap: 8px; font-size: 12px; color: var(--rp-text-2); }
.rp-legend i { width: 11px; height: 11px; border-radius: 3px; display: block; }
.rp-legend i.rp-c1 { background: var(--rp-c1); } .rp-legend i.rp-c2 { background: var(--rp-c2); } .rp-legend i.rp-c3 { background: var(--rp-c3); }
.rp-legend i.rp-c4 { background: var(--rp-c4); } .rp-legend i.rp-c5 { background: var(--rp-c5); } .rp-legend i.rp-c6 { background: var(--rp-c6); }
.rp-legend b { font-weight: 700; color: var(--rp-text); font-variant-numeric: tabular-nums; }
.rp-legend em { font-style: normal; color: var(--rp-muted); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

.rp-ring { position: relative; width: 112px; height: 112px; flex-shrink: 0; }
.rp-ring svg { width: 100%; height: 100%; }
.rp-ring-track { stroke: #E6EBF4; }
.rp-ring-val { stroke: var(--t, var(--rp-t-green)); transition: stroke-dasharray .8s ease; }
.rp-ring-center b { font-size: 19px; font-weight: 700; letter-spacing: -.4px; color: var(--rp-text); }

/* progress bars */
.rp-progress { background: #E6EBF4; border-radius: 999px; height: 10px; overflow: hidden; }
.rp-progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--rp-primary), var(--rp-primary-mid)); transition: width .7s ease; }

/* ── 5 · LISTS & TILES ───────────────────────────────────────────────────── */
.rp-list { list-style: none; margin: 0; padding: 0; }
.rp-list-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEF1F7; min-width: 0; }
.rp-list-item:first-child { padding-top: 2px; }
.rp-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.rp-list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rp-list-main strong { font-size: 13px; font-weight: 600; color: var(--rp-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-list-main small { font-size: 11.5px; color: var(--rp-muted); display: flex; align-items: center; gap: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-list-main small svg { width: 13px; height: 13px; flex-shrink: 0; }
.rp-list-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; flex-shrink: 0; font-size: 12.5px; font-weight: 600; color: var(--rp-text); }
.rp-list-aside small { font-weight: 500; font-size: 12px; color: var(--rp-muted); }
.rp-thumb { width: 52px; height: 42px; border-radius: 10px; flex-shrink: 0; background: var(--rp-t-slate-bg) center / cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--rp-t-slate); overflow: hidden; }
.rp-thumb svg { width: 22px; height: 22px; }
.rp-avatar-sm { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  background: var(--tb, var(--rp-primary-l)); color: var(--t, var(--rp-primary)); overflow: hidden; background-size: cover; background-position: center; }
.rp-datebox { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  background: var(--rp-primary-l); color: var(--rp-primary); }
.rp-datebox b { font-size: 16px; font-weight: 700; } .rp-datebox span { font-size: 11px; font-weight: 600; text-transform: uppercase; }
.rp-activity-ico { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--tb); color: var(--t); }
.rp-activity-ico svg { width: 19px; height: 19px; }
.rp-list-time { font-size: 11.5px; font-weight: 500; color: var(--rp-muted); white-space: nowrap; }

.rp-actions-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 4px; }
.rp-quick-action {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-width: 0; border-radius: var(--rp-radius);
  background: var(--tb, var(--rp-primary-l)); border: 1px solid transparent; color: var(--rp-text); text-align: left;
  transition: transform var(--rp-transition), box-shadow var(--rp-transition);
}
.rp-quick-action:hover { transform: translateY(-2px); box-shadow: var(--rp-shadow-md); }
.rp-quick-action:focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 2px; }
.rp-qa-icon { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--t, var(--rp-primary)); color: #fff; box-shadow: 0 6px 14px color-mix(in srgb, var(--t, var(--rp-primary)) 32%, transparent); }
.rp-qa-icon svg { width: 22px; height: 22px; }
.rp-qa-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 1px; }
.rp-qa-text strong { font-size: 13px; font-weight: 600; color: var(--rp-text); }
.rp-qa-text small { font-size: 11.5px; color: var(--rp-text-2); opacity: .75; }
.rp-qa-go { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--t, var(--rp-primary)) 14%, transparent); color: var(--t, var(--rp-primary)); transition: transform var(--rp-transition); }
.rp-quick-action:hover .rp-qa-go { transform: translateX(3px); }
.rp-quick-action:not([class*="rp-tone-"]) { --t: var(--rp-primary); --tb: var(--rp-primary-l); }

/* ── 6 · COMPONENTS ──────────────────────────────────────────────────────── */
.rp-badge-success { background: var(--rp-success-bg); color: var(--rp-success); }
.rp-badge-warning { background: var(--rp-warning-bg); color: var(--rp-warning); }
.rp-badge-danger  { background: var(--rp-danger-bg);  color: var(--rp-danger); }
.rp-badge-info    { background: var(--rp-info-bg);    color: #1D4ED8; }
.rp-badge-neutral { background: #EEF1F6; color: #4B5873; }

.rp-notice { border-radius: 12px; }
.rp-empty-compact { padding: 34px 16px; }
.rp-empty-compact .rp-empty-icon { width: 56px; height: 56px; border-radius: 16px; margin-bottom: 10px; }
.rp-empty-compact h4 { font-size: var(--rp-fs-h4); margin: 0 0 2px; }
.rp-empty-compact p { margin: 4px 0 0; font-size: 13px; }

.rp-status-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; overflow-x: auto; padding-bottom: 4px; }
.rp-status-tab { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--rp-border); background: #fff; font-size: 13px; font-weight: 500; color: var(--rp-text-2); white-space: nowrap; }
.rp-status-tab:hover { border-color: var(--rp-primary); color: var(--rp-primary); }
.rp-status-tab.active { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.3); }

.rp-header h2, .rp-dash-wrap .rp-header h2 { font-size: var(--rp-fs-h2); font-weight: 700; letter-spacing: -.2px; }

/* Shared cards */
.rp-card { background: var(--rp-bg-card); border: 1px solid var(--rp-border); border-radius: var(--rp-radius); padding: 22px; box-shadow: var(--rp-shadow); margin-bottom: 20px; }
.rp-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rp-card-header h3 { margin: 0; font-size: var(--rp-fs-h3); font-weight: 600; }

/* skeleton */
.rp-skel-kpi { height: 96px; border-radius: var(--rp-radius); }
.rp-skel-table { height: 280px; border-radius: var(--rp-radius); }

/* ── 7 · MODULE LEGACY CLASSES → same look ───────────────────────────────── */
.rp-dash-wrap .rp-stats-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.rp-dash-wrap .rp-stat-card { border: 1px solid var(--rp-border); border-left-width: 1px; border-radius: var(--rp-radius); padding: 20px; box-shadow: var(--rp-shadow); background: var(--rp-bg-card); }
.rp-dash-wrap .rp-stat-value { font-size: var(--rp-fs-stat); letter-spacing: -.4px; }
.rp-dash-wrap .rp-dash-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rp-dash-wrap .rp-dash-header h2 { margin: 0; font-size: var(--rp-fs-h2); font-weight: 700; }
.rp-dash-wrap .hm-profile-completion .hm-progress-bar { height: 10px; border-radius: 999px; background: #E6EBF4; overflow: hidden; }
.rp-dash-wrap .hm-progress-fill { background: linear-gradient(90deg, var(--rp-primary), var(--rp-primary-mid)); height: 100%; border-radius: inherit; }
.rp-dash-wrap .rp-btn-outline { background: #fff; border: 1.5px solid var(--rp-primary); color: var(--rp-primary); }
.rp-dash-wrap .rp-btn-outline:hover { background: var(--rp-primary-l); }
.rp-dash-wrap .rp-prop-tab.active, .rp-dash-wrap .rp-prop-tab[aria-selected="true"] { color: var(--rp-primary); border-color: var(--rp-primary); }

/* ── 8 · RESPONSIVE & MOTION ─────────────────────────────────────────────── */
@media (max-width: 1280px) {
  .rp-row-3, .rp-row-3w { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-row-3 > :last-child, .rp-row-3w > :last-child { grid-column: 1 / -1; }
  .rp-row-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .rp-dash-content { padding: 22px 20px 36px; }
  .rp-dash-topbar { padding: 0 20px; }
  .rp-row-21, .rp-row-12 { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet & mobile: the sidebar becomes an off-canvas drawer */
@media (max-width: 900px) {
  .rp-dash-sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100vh; height: 100dvh; width: min(300px, 86vw); z-index: 99991;
    transform: translateX(-102%); transition: transform var(--rp-transition); }
  .admin-bar .rp-dash-sidebar { top: 32px; height: calc(100dvh - 32px); }
  .rp-mob-sidebar-open .rp-dash-sidebar { transform: none; box-shadow: 10px 0 40px rgba(0,0,0,.35); }
  .rp-dash-overlay { position: fixed; inset: 0; z-index: 99990; background: var(--rp-overlay); backdrop-filter: blur(2px); }
  .rp-mob-sidebar-open .rp-dash-overlay { display: block; }
  .rp-dash-drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; margin: 0; border: 0; border-radius: 10px;
    background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
  .rp-dash-main { width: 100%; }
  .rp-dash-search { max-width: none; }
  .rp-dash-user-meta, .rp-dash-user-btn > svg { display: none; }
  .rp-dash-user-btn { padding: 3px; }
}
@media (max-width: 782px) {
  .admin-bar .rp-dash-sidebar { top: 46px; height: calc(100dvh - 46px); }
  .admin-bar .rp-dash-topbar { top: 46px; }
}
@media (max-width: 768px) {
  .rp-dash-content { padding: 18px 14px 32px; }
  .rp-dash-topbar { gap: 8px; padding: 0 12px; height: 60px; }
  .rp-dash-wrap .rp-dash-page-title { font-size: 18px; }
  .rp-dash-search-kbd { display: none; }
  .rp-row-2, .rp-row-3, .rp-row-3w, .rp-row-4 { grid-template-columns: minmax(0, 1fr); }
  .rp-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rp-kpi-card { padding: 14px; gap: 12px; flex-direction: column; align-items: flex-start; }
  .rp-kpi-card[class*="rp-tone-"] .rp-kpi-icon, .rp-kpi-icon { width: 44px; height: 44px; }
  .rp-kpi-value { font-size: var(--rp-fs-stat); }
  .rp-section, .rp-card { padding: 16px; border-radius: 14px; }
  .rp-chart { --plot-h: 170px; }
  .rp-chip-tz { display: none; }
  .rp-table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  .rp-modal-content { max-height: 94vh; }
}
@media (max-width: 520px) {
  .rp-kpi-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-kpi-card { flex-direction: row; align-items: center; }
  .rp-donut { width: 150px; height: 150px; }
  .rp-donut-wrap { justify-content: flex-start; }
  .rp-actions-row { grid-template-columns: minmax(0, 1fr); }
  .rp-dash-hero-meta { width: 100%; }
}
@media (pointer: coarse) {
  .rp-dash-nav-item { min-height: 46px; }
  .rp-btn { min-height: 40px; }
  .rp-btn-sm { min-height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-dash-wrap *, .rp-dash-wrap *::before, .rp-dash-wrap *::after { transition: none !important; animation: none !important; }
}

/* extra badge tones used by listing-type pills */
.rp-badge-purple { background: var(--rp-t-purple-bg); color: var(--rp-t-purple); }
.rp-badge-teal   { background: var(--rp-t-teal-bg);   color: var(--rp-t-teal); }
.rp-kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1024px) { .rp-kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px)  { .rp-kpi-grid-3 { grid-template-columns: minmax(0, 1fr); } }
.rp-panel-note { font-size: 12px; font-weight: 500; color: var(--rp-muted); background: #F1F4FA; border-radius: 999px; padding: 4px 11px; }
.rp-split-stats { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid #EEF1F7; }
.rp-split-stats div { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--rp-muted); }
.rp-split-stats b { font-size: 20px; font-weight: 800; color: var(--rp-text); letter-spacing: -.3px; }
.rp-center-col { display: flex; flex-direction: column; align-items: center; gap: 18px; }

/* handyman */
.hm-score { font-size: 18px; font-weight: 800; color: var(--rp-primary); }
.hm-rating-num { font-size: var(--rp-fs-display); font-weight: 800; line-height: 1; color: var(--rp-text); }
.hm-stars { display: flex; gap: 2px; font-size: 18px; color: var(--rp-border, #E6EBF4); }
.hm-stars .on { color: #FBBF24; }
.hm-muted { color: var(--rp-muted); font-size: 13px; text-align: center; }
.rp-ov .rp-table code { font-size: 12px; background: var(--rp-primary-l); color: var(--rp-primary); padding: 2px 6px; border-radius: 4px; }

/* hotel */
.rp-hotel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--rp-surface, #fff); border-radius: 16px; padding: 18px 22px; box-shadow: 0 1px 3px rgba(16,24,40,.06); margin-bottom: 18px; }
.rp-hotel-head-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.rp-hotel-head h2 { margin: 0; font-size: var(--rp-fs-h2); font-weight: 800; letter-spacing: -.3px; }
.rp-hotel-meta { font-size: 12.5px; color: var(--rp-muted); margin-top: 3px; }
.rp-hotel-stars { color: #F59E0B; letter-spacing: 1px; }
.rp-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rp-checklist li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.rp-checklist .rp-ck { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; background: #EEF1F6; color: #8A94A8; }
.rp-checklist li.is-done .rp-ck { background: #DCFCE7; color: #15803D; }
.rp-checklist li.is-done span.rp-ck-text { color: var(--rp-muted); }
.rp-checklist a { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.rp-subhead { margin: 14px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--rp-muted); }
.rp-guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.rp-guest-card { background: var(--rp-surface, #fff); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.06); display: flex; flex-direction: column; }
.rp-guest-card img { width: 100%; height: 150px; object-fit: cover; display: block; }
.rp-guest-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rp-booking-card { display: flex; flex-direction: column; gap: 12px; }
.rp-booking-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; font-size: 13px; }
.rp-booking-facts span { display: block; color: var(--rp-muted); font-size: 12px; }
.rp-chart-bars { padding-top: 30px; }

/* ── Typography hierarchy (inside every dashboard/portal) ────────────────────
   Same --rp-fs-* tokens as the public pages (see rp-typography.css); dashboards just run them at a denser
   density (the .rp-dash-wrap block there re-points the tokens). Nothing in here owns a private font size.
   Re-stated with scope so theme/page-builder heading, table and form rules can't inflate it. */
.rp-dash-wrap h2 { font-size: var(--rp-fs-h2); font-weight: 700; line-height: 1.3; margin-top: 0; }
.rp-dash-wrap h3 { font-size: var(--rp-fs-h3); font-weight: 600; line-height: 1.35; }
.rp-dash-wrap h4 { font-size: var(--rp-fs-h4); font-weight: 600; line-height: 1.4; }
.rp-dash-wrap h5, .rp-dash-wrap h6 { font-size: var(--rp-fs-h5); font-weight: 600; }
.rp-dash-wrap p { font-size: inherit; line-height: 1.55; }
.rp-dash-wrap .rp-table, .rp-dash-wrap .rp-table td, .rp-dash-wrap .rp-table th { font-size: var(--rp-fs-sm); line-height: 1.45; }
.rp-dash-wrap .rp-table thead th { font-size: var(--rp-fs-xs); }
.rp-dash-wrap .rp-table tbody td { padding: 11px 14px; }
.rp-dash-wrap .rp-btn { font-size: var(--rp-fs-sm); padding: 7px 14px; }
.rp-dash-wrap .rp-btn-sm { font-size: var(--rp-fs-xs); padding: 5px 10px; }
.rp-dash-wrap .rp-btn-lg { font-size: var(--rp-fs-md); padding: 10px 22px; }
.rp-dash-wrap .rp-form-group label { font-size: var(--rp-fs-sm); }
.rp-dash-wrap .rp-form-group input, .rp-dash-wrap .rp-form-group select, .rp-dash-wrap .rp-form-group textarea,
.rp-dash-wrap select, .rp-dash-wrap input[type=text], .rp-dash-wrap input[type=email], .rp-dash-wrap input[type=number],
.rp-dash-wrap input[type=tel], .rp-dash-wrap input[type=password], .rp-dash-wrap input[type=date], .rp-dash-wrap textarea { font-size: var(--rp-fs-base); }
.rp-dash-wrap .rp-form-group input, .rp-dash-wrap .rp-form-group select, .rp-dash-wrap .rp-form-group textarea { padding: 8px 11px; }
.rp-dash-wrap .rp-form-group small, .rp-dash-wrap small { font-size: var(--rp-fs-xs); }
.rp-dash-wrap .rp-badge { font-size: var(--rp-fs-xs); padding: 3px 9px; }
.rp-dash-wrap .rp-notice { font-size: var(--rp-fs-sm); padding: 11px 14px; }
.rp-dash-wrap .rp-section { padding: 18px; margin-bottom: 16px; }
.rp-dash-wrap .rp-section-title { font-size: var(--rp-fs-h3); }
.rp-dash-wrap .rp-modal-header h3 { font-size: var(--rp-fs-h3); }
.rp-dash-wrap .rp-empty-state h4 { font-size: var(--rp-fs-h3); }
.rp-dash-wrap .rp-empty-state p { font-size: var(--rp-fs-sm); }
.rp-dash-wrap .rp-status-tab { font-size: var(--rp-fs-sm); padding: 6px 13px; }
@media (max-width: 768px) {
  .rp-dash-wrap .rp-dash-page-title { font-size: 18px; }
  .rp-kpi-value { font-size: 19px; }
  .rp-dash-wrap .rp-section { padding: 14px; }
}

/* ── Upload field states (rpUpload helper) ─────────────────────────────── */
.rp-upfield { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.rp-upfield-file { font-size: 12px; color: var(--rp-muted); min-width: 0; overflow-wrap: anywhere; }
.rp-upfield-file a { color: var(--rp-primary); text-decoration: none; }
.rp-upfield-msg { font-size: 11.5px; color: var(--rp-muted); }
.rp-upfield[data-state="success"] .rp-upfield-msg { color: #059669; font-weight: 600; }
.rp-upfield[data-state="success"] .rp-upfield-msg::before { content: "✓ "; }
.rp-upfield[data-state="error"] .rp-upfield-msg { color: #DC2626; font-weight: 600; }
.rp-upfield[data-state="loading"] .rp-upfield-msg { color: var(--rp-primary); }
.rp-upfield-bar { display: none; flex: 1 0 100%; height: 4px; border-radius: 4px; background: #E6EBF4; overflow: hidden; }
.rp-upfield-bar span { display: block; height: 100%; width: 0; background: var(--rp-primary); transition: width .15s; }
.rp-upfield .is-disabled { opacity: .5; pointer-events: none; }

/* One heading per dashboard page: the shell title above is the page's heading, so a panel that opens with the same
   words (e.g. "Welcome, Test company" under "Welcome back, Test!") has that repeat hidden by the dashboard script. */
#rp-dash-panel .rp-dup-heading { display: none !important; }
#rp-dash-panel .rp-dup-keep-actions { justify-content: flex-end; }
