:root {
  --rp-navy: #0d315b;
  --rp-navy-2: #123f72;
  --rp-blue: #1677ff;
  --rp-blue-dark: #0b61d8;
  --rp-bg: #f5f8fc;
  --rp-panel: #ffffff;
  --rp-border: #dfe7f1;
  --rp-text: #102a4c;
  --rp-muted: #64758d;
  --rp-soft: #edf4fb;
  --rp-radius: 14px;
  --rp-shadow: 0 10px 30px rgba(16, 42, 76, 0.06);
  --rp-sidebar: 260px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.rp-app-page, body.rp-login-body {
  background: var(--rp-bg);
  color: var(--rp-text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.rp-app { min-height: 100vh; display: grid; grid-template-columns: var(--rp-sidebar) 1fr; }
.rp-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--rp-navy) 0%, #092a50 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
.rp-brand { display: flex; gap: 12px; align-items: center; padding: 24px 20px 20px; border-bottom: 1px solid rgba(255,255,255,.10); }
.rp-brand-mark, .rp-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  font-weight: 800;
}
.rp-brand-mark { width: 42px; height: 42px; background: #d7ecff; color: var(--rp-navy); font-size: 19px; }
.rp-brand-copy { min-width: 0; }
.rp-brand-copy strong { display: block; font-size: 19px; }
.rp-brand-copy span { display: block; font-size: 13px; color: rgba(255,255,255,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-nav { padding: 16px 10px; overflow-y: auto; }
.rp-nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 11px 14px; border-radius: 10px; text-decoration: none; color: rgba(255,255,255,.90); font-weight: 600; margin: 3px 0; }
.rp-nav-item:hover { background: rgba(255,255,255,.08); }
.rp-nav-item.is-active { background: var(--rp-blue); color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.15); }
.rp-nav-icon { width: 24px; text-align: center; font-size: 18px; }
.rp-nav-separator { height: 1px; background: rgba(255,255,255,.11); margin: 14px 10px; }
.rp-master-item { background: rgba(255,255,255,.05); }
.rp-sidebar-footer { margin-top: auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.10); }
.rp-account-mini { display: flex; align-items: center; gap: 10px; }
.rp-avatar { width: 38px; height: 38px; background: #d8eaff; color: var(--rp-navy); }
.rp-account-mini strong { display: block; font-size: 14px; }
.rp-account-mini span { display: block; font-size: 12px; color: rgba(255,255,255,.68); }
.rp-logout { display: block; margin-top: 12px; font-size: 13px; color: rgba(255,255,255,.75); text-decoration: none; }

.rp-main-wrap { min-width: 0; }
.rp-topbar { height: 72px; background: #fff; border-bottom: 1px solid var(--rp-border); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 20; }
.rp-menu-toggle { display: none; width: 42px; height: 42px; border: 0; background: transparent; font-size: 24px; color: var(--rp-text); }
.rp-search-wrap { display: flex; align-items: center; gap: 10px; background: #f0f4f9; min-width: 360px; max-width: 560px; flex: 1; border-radius: 10px; padding: 0 14px; height: 44px; }
.rp-search-wrap input { border: 0; outline: none; width: 100%; background: transparent; color: var(--rp-muted); }
.rp-top-actions { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.rp-icon-button { width: 40px; height: 40px; border: 1px solid var(--rp-border); background: #fff; border-radius: 10px; color: var(--rp-text); }
.rp-top-user { display: flex; align-items: center; gap: 9px; padding-left: 8px; }
.rp-top-user-copy strong, .rp-top-user-copy span { display: block; }
.rp-top-user-copy span { color: var(--rp-muted); font-size: 12px; }

.rp-content { padding: 30px; }
.rp-page-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.rp-page-head h1 { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.1; letter-spacing: -.025em; }
.rp-page-head-compact { margin-bottom: 18px; }
.rp-page-subtitle { margin: 7px 0 0; color: var(--rp-muted); font-size: 16px; }
.rp-eyebrow { margin: 0 0 5px; color: var(--rp-blue); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 800; }
.rp-primary-button, .rp-secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border-radius: 10px; padding: 0 18px; text-decoration: none; font-weight: 750; border: 1px solid transparent; }
.rp-primary-button { background: var(--rp-blue); color: #fff; }
.rp-primary-button:hover { background: var(--rp-blue-dark); }
.rp-secondary-button { background: #fff; color: var(--rp-text); border-color: var(--rp-border); }
button.rp-primary-button:disabled { opacity: .55; cursor: not-allowed; }

.rp-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.rp-kpi-card { background: var(--rp-panel); border: 1px solid var(--rp-border); border-radius: var(--rp-radius); padding: 20px; box-shadow: var(--rp-shadow); }
.rp-kpi-card span { display: block; color: var(--rp-muted); font-weight: 650; }
.rp-kpi-card strong { display: block; font-size: 34px; line-height: 1; margin: 12px 0 7px; }
.rp-kpi-card small { color: var(--rp-muted); }
.rp-dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.rp-panel { background: var(--rp-panel); border: 1px solid var(--rp-border); border-radius: var(--rp-radius); box-shadow: var(--rp-shadow); padding: 22px; }
.rp-panel h2 { margin: 0 0 8px; font-size: 20px; }
.rp-panel p { color: var(--rp-muted); }
.rp-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rp-empty-state { min-height: 240px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; padding: 28px; }
.rp-empty-state h2, .rp-empty-state h3 { margin: 8px 0 6px; }
.rp-empty-state p { max-width: 520px; margin: 0; color: var(--rp-muted); }
.rp-empty-icon { width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; background: var(--rp-soft); color: var(--rp-blue); font-size: 28px; }
.rp-quick-links { display: grid; gap: 10px; margin-top: 18px; }
.rp-quick-links a { padding: 14px 15px; border: 1px solid var(--rp-border); border-radius: 10px; text-decoration: none; background: #fbfdff; font-weight: 700; }
.rp-quick-links a:hover { border-color: #b8d5f7; background: #f5faff; }

.rp-toolbar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--rp-border); border-radius: 12px; padding: 10px; margin-bottom: 14px; overflow-x: auto; }
.rp-toolbar button { min-height: 40px; background: #fff; border: 1px solid var(--rp-border); border-radius: 9px; padding: 0 13px; white-space: nowrap; }
.rp-toolbar button:disabled { opacity: .75; }
.rp-week-label { min-width: max-content; font-weight: 800; padding: 0 10px; }
.rp-toolbar-spacer { flex: 1; }
.rp-rota-wrap { background: #fff; border: 1px solid var(--rp-border); border-radius: 12px; overflow: auto; box-shadow: var(--rp-shadow); }
.rp-rota-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1080px; table-layout: fixed; }
.rp-rota-table th, .rp-rota-table td { border-right: 1px solid var(--rp-border); border-bottom: 1px solid var(--rp-border); padding: 14px; vertical-align: top; }
.rp-rota-table th { background: #f8fbff; text-align: center; font-size: 14px; position: sticky; top: 0; z-index: 5; }
.rp-rota-table th span, .rp-rota-table th strong { display: block; }
.rp-rota-table th strong { margin-top: 3px; font-size: 13px; }
.rp-rota-table th:first-child, .rp-rota-table td:first-child { width: 230px; text-align: left; }
.rp-rota-table th:last-child, .rp-rota-table td:last-child { width: 80px; text-align: center; }
.rp-sticky-staff { position: sticky !important; left: 0; z-index: 7 !important; background: #fff !important; }
.rp-rota-table thead .rp-sticky-staff { background: #f8fbff !important; z-index: 9 !important; }
.rp-empty-rota-row td { height: 130px; }
.rp-empty-rota-row td:first-child span { display: block; margin-top: 5px; color: var(--rp-muted); font-size: 13px; }
.rp-info-strip { display: flex; gap: 8px; align-items: center; margin-top: 12px; padding: 13px 15px; border-radius: 10px; background: #eef7ff; border: 1px solid #d1e8ff; color: #275983; }
.rp-system-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.rp-placeholder-panel { min-height: 430px; }

.rp-login-body { min-height: 100vh; }
.rp-login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; }
.rp-login-brand { background: linear-gradient(135deg, var(--rp-navy), #0d4d86); color: #fff; padding: clamp(40px, 8vw, 110px); display: flex; align-items: center; gap: 18px; }
.rp-login-brand .rp-brand-mark { width: 66px; height: 66px; font-size: 28px; }
.rp-login-brand h1 { margin: 0; font-size: clamp(34px, 5vw, 62px); line-height: 1; }
.rp-login-brand p { margin: 12px 0 0; color: rgba(255,255,255,.78); font-size: 18px; }
.rp-login-card { align-self: center; justify-self: center; width: min(440px, 88%); background: #fff; border: 1px solid var(--rp-border); border-radius: 18px; padding: 34px; box-shadow: var(--rp-shadow); }
.rp-login-card h2 { margin: 0; font-size: 30px; }
.rp-muted { color: var(--rp-muted); }
.rp-login-card label { display: block; font-weight: 700; margin-bottom: 7px; }
.rp-login-card input[type="text"], .rp-login-card input[type="password"] { width: 100%; min-height: 46px; border: 1px solid var(--rp-border); border-radius: 10px; padding: 0 12px; }
.rp-login-card .login-remember label { font-weight: 500; }
.rp-login-card input[type="submit"] { width: 100%; min-height: 46px; border: 0; border-radius: 10px; background: var(--rp-blue); color: #fff; font-weight: 800; cursor: pointer; }
.rp-forgot { display: inline-block; margin-top: 12px; color: var(--rp-blue); text-decoration: none; font-weight: 650; }
.rp-standalone-message { min-height: 100vh; display: grid; place-items: center; padding: 30px; }

@media (max-width: 1100px) {
  .rp-kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rp-dashboard-grid { grid-template-columns: 1fr; }
  .rp-system-grid { grid-template-columns: 1fr; }
  .rp-search-wrap { min-width: 220px; }
}

@media (max-width: 860px) {
  .rp-app { grid-template-columns: 1fr; }
  .rp-sidebar { position: fixed; left: -280px; width: 260px; transition: left .2s ease; box-shadow: 12px 0 30px rgba(0,0,0,.18); }
  .rp-sidebar.is-open { left: 0; }
  .rp-menu-toggle { display: inline-grid; place-items: center; }
  .rp-topbar { padding: 0 14px; }
  .rp-top-user-copy { display: none; }
  .rp-search-wrap { min-width: 0; }
  .rp-content { padding: 20px 14px; }
  .rp-page-head { align-items: flex-start; flex-direction: column; }
  .rp-login-shell { grid-template-columns: 1fr; }
  .rp-login-brand { padding: 34px 24px; }
  .rp-login-card { margin: 28px auto; }
}

@media (max-width: 600px) {
  .rp-kpi-grid { grid-template-columns: 1fr; }
  .rp-top-actions .rp-icon-button { display: none; }
  .rp-search-wrap { display: none; }
  .rp-page-head h1 { font-size: 30px; }
  .rp-info-strip { align-items: flex-start; flex-direction: column; }
}

/* Client/workplace module */
.rp-alert {
  margin: 0 0 16px;
  padding: 13px 16px;
  border: 1px solid #b9ddc8;
  background: #effaf3;
  border-radius: 10px;
  color: #205b38;
  font-weight: 700;
}
.rp-kpi-grid-small { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: 0 0 16px;
  border: 1px solid var(--rp-border);
  border-radius: 10px;
  background: #fff;
}
.rp-tab {
  min-width: 120px;
  padding: 10px 16px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  font-weight: 750;
  color: var(--rp-muted);
}
.rp-tab.is-active { background: var(--rp-blue); color: #fff; }
.rp-module-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: start;
}
.rp-panel-table { padding: 0; overflow: hidden; }
.rp-panel-table > .rp-panel-head { padding: 20px 22px 14px; }
.rp-panel-head p { margin: 4px 0 0; }
.rp-data-table-wrap { overflow-x: auto; }
.rp-data-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.rp-data-table th,
.rp-data-table td { padding: 14px 18px; border-top: 1px solid var(--rp-border); text-align: left; vertical-align: middle; }
.rp-data-table th { color: var(--rp-muted); font-size: 14px; background: #f8fbff; }
.rp-data-table td strong { display: block; }
.rp-data-table td span { display: block; margin-top: 4px; color: var(--rp-muted); font-size: 14px; }
.rp-row-actions { white-space: nowrap; }
.rp-row-actions a,
.rp-card-actions a { color: var(--rp-blue); font-weight: 700; text-decoration: none; margin-right: 12px; }
.rp-status {
  display: inline-flex !important;
  width: max-content;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 14px !important;
  font-weight: 800;
}
.rp-status-active { background: #e8f8ee; color: #207a43 !important; }
.rp-status-inactive { background: #edf1f5; color: #64758d !important; }
.rp-form-panel { position: sticky; top: 90px; }
.rp-form-panel h2 { margin-bottom: 4px; }
.rp-form-intro { margin-top: 0; }
.rp-form-stack { display: grid; gap: 14px; }
.rp-form-stack label { display: grid; gap: 7px; color: var(--rp-text); font-weight: 700; }
.rp-form-stack input,
.rp-form-stack select,
.rp-form-stack textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--rp-border);
  border-radius: 9px;
  background: #fff;
  color: var(--rp-text);
  padding: 10px 12px;
  outline: none;
  font-weight: 500;
}
.rp-form-stack textarea { min-height: 92px; resize: vertical; }
.rp-form-stack input:focus,
.rp-form-stack select:focus,
.rp-form-stack textarea:focus { border-color: #8dbdf7; box-shadow: 0 0 0 3px rgba(22,119,255,.08); }
.rp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-form-stack .rp-primary-button,
.rp-form-stack .rp-secondary-button { width: 100%; }
.rp-empty-state-compact { min-height: 260px; }
.rp-location-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; padding: 0 20px 20px; }
.rp-location-card { border: 1px solid var(--rp-border); border-radius: 12px; padding: 16px; background: #fbfdff; }
.rp-location-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.rp-location-card h3 { margin: 3px 0 3px; font-size: 18px; }
.rp-location-card p { margin: 0; color: var(--rp-muted); }
.rp-location-type { color: var(--rp-blue); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 800; }
.rp-location-meta { display: grid; gap: 4px; margin: 14px 0; color: var(--rp-muted); font-size: 14px; }
.rp-card-actions { padding-top: 10px; border-top: 1px solid var(--rp-border); }

@media (max-width: 1100px) {
  .rp-module-grid { grid-template-columns: 1fr; }
  .rp-form-panel { position: static; }
}

@media (max-width: 760px) {
  .rp-kpi-grid-small { grid-template-columns: 1fr; }
  .rp-location-grid { grid-template-columns: 1fr; }
  .rp-form-row { grid-template-columns: 1fr; }
  .rp-tabs { display: flex; width: 100%; }
  .rp-tab { flex: 1; min-width: 0; }
}

/* Simplified client/workplace setup */
.rp-client-module-grid { grid-template-columns: minmax(0, 1.9fr) minmax(340px, .72fr); }
.rp-client-table td { font-size: 16px; }
.rp-client-table td:first-child strong { font-size: 16px; }
.rp-optional { color: var(--rp-muted); font-weight: 600; font-size: 14px; margin-left: 4px; }
.rp-form-stack label { font-size: 16px; }
.rp-form-stack input, .rp-form-stack select, .rp-form-stack textarea { font-size: 16px; }
@media (max-width: 1100px) { .rp-client-module-grid { grid-template-columns: 1fr; } }

/* Phase 2: staff management */
.rp-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-alert-warning { border-color: #f0d7a4; background: #fff8e8; color: #7a5610; }
.rp-staff-kpis { margin-bottom: 16px; }
.rp-staff-kpis .rp-kpi-card { padding: 17px 20px; }
.rp-staff-kpis .rp-kpi-card strong { font-size: 30px; margin-bottom: 0; }
.rp-staff-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  box-shadow: var(--rp-shadow);
}
.rp-staff-search-form { display: flex; align-items: center; gap: 9px; flex: 1; }
.rp-staff-search-form input[type="search"],
.rp-staff-search-form select {
  min-height: 44px;
  border: 1px solid var(--rp-border);
  border-radius: 9px;
  background: #fff;
  color: var(--rp-text);
  padding: 0 12px;
  font-size: 16px;
}
.rp-staff-search-form input[type="search"] { width: min(420px, 100%); }
.rp-staff-search-form select { min-width: 150px; }
.rp-layout-toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--rp-border); border-radius: 9px; background: #f8fbff; }
.rp-layout-toggle a { padding: 8px 13px; text-decoration: none; border-radius: 7px; font-weight: 750; color: var(--rp-muted); }
.rp-layout-toggle a.is-active { background: #fff; color: var(--rp-blue); box-shadow: 0 2px 8px rgba(16,42,76,.08); }
.rp-staff-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.rp-staff-card {
  background: #fff;
  border: 1px solid var(--rp-border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--rp-shadow);
}
.rp-staff-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rp-staff-photo, .rp-staff-initials { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.rp-staff-initials { display: grid; place-items: center; background: #e8f2ff; color: var(--rp-navy); font-weight: 850; }
.rp-staff-card-photo { width: 58px; height: 58px; font-size: 18px; }
.rp-staff-card h2 { margin: 16px 0 2px; font-size: 21px; line-height: 1.2; }
.rp-staff-role { margin: 0; color: var(--rp-muted); min-height: 24px; }
.rp-staff-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--rp-border); border-bottom: 1px solid var(--rp-border); }
.rp-staff-card-meta span, .rp-staff-card-meta strong { display: block; }
.rp-staff-card-meta span { color: var(--rp-muted); font-size: 13px; margin-bottom: 3px; }
.rp-staff-card-meta strong { font-size: 15px; }
.rp-staff-view-button { width: 100%; }
.rp-empty-button { margin-top: 18px; }
.rp-staff-list-panel { padding-top: 0; }
.rp-staff-table-person { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--rp-text); }
.rp-staff-table-person strong, .rp-staff-table-person small { display: block; }
.rp-staff-table-person small { color: var(--rp-muted); margin-top: 2px; font-size: 13px; }
.rp-staff-form-shell { max-width: 920px; }
.rp-staff-form { gap: 20px; }
.rp-form-section { border-bottom: 1px solid var(--rp-border); padding-bottom: 20px; }
.rp-form-section:last-of-type { border-bottom: 0; }
.rp-form-section-head { margin-bottom: 14px; }
.rp-form-section-head h2 { margin: 0; font-size: 20px; }
.rp-form-grid-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rp-login-reference { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--rp-border); border-radius: 9px; background: #f8fbff; }
.rp-login-reference span { color: var(--rp-muted); }
.rp-form-actions { display: flex; gap: 10px; align-items: center; }
.rp-form-actions .rp-primary-button, .rp-form-actions .rp-secondary-button { width: auto; min-width: 140px; }
.rp-staff-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.rp-staff-profile-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.rp-staff-photo-large, .rp-staff-initials-large { width: 78px; height: 78px; font-size: 24px; }
.rp-staff-profile-copy { min-width: 0; }
.rp-staff-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rp-staff-title-row h2 { margin: 0; font-size: 26px; }
.rp-staff-profile-copy > p { margin: 5px 0 10px; color: var(--rp-muted); font-size: 16px; }
.rp-staff-meta-line { display: flex; flex-wrap: wrap; gap: 9px 16px; color: var(--rp-muted); font-size: 14px; }
.rp-status-action { color: var(--rp-blue); text-decoration: none; font-weight: 750; white-space: nowrap; }
.rp-profile-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; margin-bottom: 16px; border: 1px solid var(--rp-border); border-radius: 11px; background: #fff; }
.rp-profile-tab { flex: 0 0 auto; min-width: 105px; text-align: center; padding: 10px 13px; border-radius: 8px; text-decoration: none; color: var(--rp-muted); font-weight: 750; }
.rp-profile-tab.is-active { color: #fff; background: var(--rp-blue); }
.rp-profile-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(300px,.7fr); gap: 16px; }
.rp-detail-list { margin: 14px 0 0; }
.rp-detail-list > div { display: grid; grid-template-columns: minmax(160px,.65fr) 1fr; gap: 18px; padding: 13px 0; border-top: 1px solid var(--rp-border); }
.rp-detail-list dt { color: var(--rp-muted); font-weight: 650; }
.rp-detail-list dd { margin: 0; font-weight: 700; }
.rp-profile-note { margin: 12px 0 0; color: var(--rp-text) !important; white-space: normal; }
.rp-profile-empty { min-height: 360px; }
.rp-staff-holding-body { min-height: 100vh; background: var(--rp-bg); }
.rp-staff-holding-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.rp-staff-holding-card { width: min(560px,100%); text-align: center; padding: 44px; background: #fff; border: 1px solid var(--rp-border); border-radius: 18px; box-shadow: var(--rp-shadow); }
.rp-staff-holding-card .rp-brand-mark { margin: 0 auto 18px; }
.rp-staff-holding-card h1 { margin: 0 0 10px; font-size: 32px; }
.rp-staff-holding-card > p:not(.rp-eyebrow) { color: var(--rp-muted); margin: 0 auto 22px; max-width: 430px; }
.rp-staff-holding-id { display: inline-flex; padding: 8px 12px; margin: 0 0 20px; border-radius: 999px; background: var(--rp-soft); color: var(--rp-navy); font-weight: 800; }

@media (max-width: 1180px) {
  .rp-staff-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rp-profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .rp-staff-toolbar { align-items: stretch; flex-direction: column; }
  .rp-staff-search-form { align-items: stretch; flex-direction: column; }
  .rp-staff-search-form input[type="search"], .rp-staff-search-form select { width: 100%; }
  .rp-layout-toggle { align-self: flex-start; }
  .rp-staff-card-grid { grid-template-columns: 1fr; }
  .rp-form-grid-two { grid-template-columns: 1fr; }
  .rp-form-actions { align-items: stretch; flex-direction: column; }
  .rp-form-actions .rp-primary-button, .rp-form-actions .rp-secondary-button { width: 100%; }
  .rp-staff-profile-head { align-items: flex-start; flex-direction: column; }
  .rp-staff-profile-main { align-items: flex-start; }
  .rp-staff-meta-line { flex-direction: column; gap: 3px; }
  .rp-detail-list > div { grid-template-columns: 1fr; gap: 4px; }
  .rp-staff-holding-card { padding: 30px 22px; }
}

/* Phase 3: private staff document management */
.rp-document-toolbar {
  margin-bottom: 16px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  box-shadow: var(--rp-shadow);
}
.rp-document-filter-form { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rp-document-filter-form input[type="search"],
.rp-document-filter-form select {
  min-height: 44px;
  border: 1px solid var(--rp-border);
  border-radius: 9px;
  background: #fff;
  color: var(--rp-text);
  padding: 0 12px;
  font-size: 16px;
}
.rp-document-filter-form input[type="search"] { width: min(360px, 100%); }
.rp-document-filter-form select { min-width: 170px; }
.rp-documents-panel .rp-panel-head { padding: 20px 22px 14px; }
.rp-document-staff-link { text-decoration: none; color: var(--rp-text); }
.rp-document-staff-link strong, .rp-document-staff-link span { display: block; }
.rp-document-staff-link span { color: var(--rp-muted); font-size: 13px; margin-top: 2px; }
.rp-danger-link { color: #b42318 !important; }
.rp-staff-documents-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, .65fr);
  gap: 16px;
  align-items: start;
}
.rp-document-upload-panel { position: sticky; top: 90px; }
.rp-document-upload-panel .rp-panel-head { margin-bottom: 4px; }
.rp-document-upload-panel .rp-form-intro { margin: 0 0 16px; }
.rp-documents-table td strong { overflow-wrap: anywhere; }

.rp-staff-portal-shell { min-height: 100vh; background: var(--rp-bg); }
.rp-staff-portal-head {
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 36px);
  background: #fff;
  border-bottom: 1px solid var(--rp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.rp-staff-portal-brand { display: flex; align-items: center; gap: 11px; }
.rp-staff-portal-brand strong, .rp-staff-portal-brand span { display: block; }
.rp-staff-portal-brand strong { font-size: 18px; }
.rp-staff-portal-brand span { color: var(--rp-muted); font-size: 13px; }
.rp-staff-portal-user { text-align: right; }
.rp-staff-portal-user strong, .rp-staff-portal-user a { display: block; }
.rp-staff-portal-user a { color: var(--rp-blue); text-decoration: none; font-size: 13px; margin-top: 2px; }
.rp-staff-portal-content { width: min(1180px, 100%); margin: 0 auto; padding: 28px clamp(14px, 4vw, 28px) 44px; }
.rp-staff-documents-grid-portal { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr); }

@media (max-width: 980px) {
  .rp-staff-documents-grid,
  .rp-staff-documents-grid-portal { grid-template-columns: 1fr; }
  .rp-document-upload-panel { position: static; }
}

@media (max-width: 760px) {
  .rp-document-filter-form { align-items: stretch; flex-direction: column; }
  .rp-document-filter-form input[type="search"],
  .rp-document-filter-form select,
  .rp-document-filter-form .rp-secondary-button { width: 100%; }
  .rp-staff-portal-head { align-items: flex-start; }
  .rp-staff-portal-user strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* Phase 4: client/workplace management and readability baseline */
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rp-client-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 16px;
}
.rp-client-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #c9d8e7;
  border-radius: 10px;
  background: #fff;
  color: var(--rp-text);
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 3px 10px rgba(16, 42, 76, 0.04);
}
.rp-client-summary strong { font-size: 18px; }

.rp-client-form-panel {
  border-color: #c9d8e7;
  box-shadow: 0 12px 30px rgba(16, 42, 76, 0.08);
}

.rp-form-stack input,
.rp-form-stack select,
.rp-form-stack textarea,
.rp-staff-search-form input[type="search"],
.rp-staff-search-form select,
.rp-document-filter-form input[type="search"],
.rp-document-filter-form select {
  min-height: 50px;
  border: 2px solid #c9d8e7;
  border-radius: 10px;
  background: #fff;
}
.rp-form-stack textarea { min-height: 104px; }
.rp-form-stack input:focus,
.rp-form-stack select:focus,
.rp-form-stack textarea:focus,
.rp-staff-search-form input[type="search"]:focus,
.rp-staff-search-form select:focus,
.rp-document-filter-form input[type="search"]:focus,
.rp-document-filter-form select:focus {
  border-color: var(--rp-blue);
  box-shadow: 0 0 0 3px rgba(22,119,255,.13);
}

.rp-primary-button,
.rp-secondary-button {
  min-height: 48px;
  font-size: 16px;
}

.rp-client-table th {
  color: #40546f;
  font-size: 15px;
  font-weight: 800;
}
.rp-client-table td {
  padding-top: 16px;
  padding-bottom: 16px;
}
.rp-client-table td:first-child strong { font-size: 17px; }
.rp-client-table .rp-row-actions a { display: inline-block; padding: 5px 0; }

@media (max-width: 760px) {
  .rp-client-summary { width: 100%; }
  .rp-client-summary span { flex: 1 1 140px; }
  .rp-client-table { min-width: 720px; }
}

/* Phase 5: live weekly rota engine */
.rp-rota-page-head { margin-bottom: 16px; }
.rp-title-with-state { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rp-title-with-state h1 { margin: 0; }
.rp-rota-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--rp-border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.rp-rota-state-empty { background: #f5f7fa; color: #5f6f83; }
.rp-rota-state-draft { background: #fff7df; border-color: #ecd28a; color: #76540a; }
.rp-rota-state-published { background: #eaf8ef; border-color: #b9ddc8; color: #1f6d3d; }

.rp-rota-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}
.rp-rota-summary > div {
  min-height: 74px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(16,42,76,.04);
}
.rp-rota-summary span,
.rp-rota-summary strong { display: block; }
.rp-rota-summary span { color: var(--rp-muted); font-size: 14px; font-weight: 650; }
.rp-rota-summary strong { margin-top: 4px; color: var(--rp-text); font-size: 20px; }

.rp-rota-toolbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  background: #fff;
  border: 1px solid #cbd9e8;
  border-radius: 12px;
  box-shadow: var(--rp-shadow);
}
.rp-week-navigation,
.rp-rota-actions,
.rp-rota-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-week-label {
  min-width: 210px;
  text-align: center;
  font-size: 16px;
  color: var(--rp-text);
}
.rp-rota-toolbar .rp-secondary-button,
.rp-rota-toolbar .rp-primary-button {
  min-height: 44px;
  white-space: nowrap;
  text-decoration: none;
}
.rp-rota-filters { justify-content: center; }
.rp-rota-filters select {
  min-height: 44px;
  min-width: 160px;
  padding: 0 36px 0 12px;
  border: 1px solid #bfcfe0;
  border-radius: 9px;
  background: #fff;
  color: var(--rp-text);
  font-size: 16px;
  font-weight: 600;
}
.rp-rota-filters select:focus { border-color: var(--rp-blue); box-shadow: 0 0 0 3px rgba(22,119,255,.12); outline: none; }
.rp-rota-actions { justify-content: flex-end; }
.rp-rota-actions form { margin: 0; }
.rp-text-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  color: var(--rp-blue);
  font-weight: 750;
  text-decoration: none;
}

.rp-rota-wrap { border-color: #c6d5e5; }
.rp-rota-table-live { min-width: 1260px; table-layout: fixed; }
.rp-rota-table-live th,
.rp-rota-table-live td { padding: 0; }
.rp-rota-table-live th {
  min-height: 62px;
  padding: 12px 8px;
  background: #f5f9fd;
  border-color: #d7e1ec;
  color: #314a67;
  font-size: 15px;
}
.rp-rota-table-live th strong { margin-top: 4px; font-size: 14px; color: var(--rp-text); }
.rp-rota-table-live th.is-today { background: #eaf4ff; box-shadow: inset 0 3px 0 var(--rp-blue); }
.rp-rota-table-live th:first-child,
.rp-rota-table-live td:first-child { width: 230px; }
.rp-rota-table-live th:last-child,
.rp-rota-table-live td:last-child { width: 92px; }
.rp-rota-table-live tbody tr { min-height: 104px; }
.rp-rota-table-live td { border-color: #dbe4ee; background: #fff; }
.rp-rota-table-live td.is-today { background: #fbfdff; }

.rp-rota-staff-cell {
  padding: 14px !important;
  vertical-align: middle !important;
  background: #fff !important;
}
.rp-rota-staff-cell > a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--rp-text);
  text-decoration: none;
}
.rp-rota-staff-cell > a > span:last-child { min-width: 0; }
.rp-rota-staff-cell strong,
.rp-rota-staff-cell small { display: block; }
.rp-rota-staff-cell strong { font-size: 16px; line-height: 1.25; }
.rp-rota-staff-cell small { margin-top: 4px; color: var(--rp-muted); font-size: 13px; line-height: 1.3; }
.rp-rota-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #cbd9e8;
}
.rp-rota-initials {
  display: inline-grid;
  place-items: center;
  background: #e8f2ff;
  color: var(--rp-navy);
  font-weight: 850;
}

.rp-rota-cell {
  position: relative;
  min-height: 104px;
  padding: 8px !important;
  vertical-align: top !important;
  transition: background .15s ease, box-shadow .15s ease;
}
.rp-rota-cell:hover { background: #f8fbff; }
.rp-rota-cell.is-drop-target { background: #eaf4ff !important; box-shadow: inset 0 0 0 2px var(--rp-blue); }
.rp-rota-cell-shifts { display: grid; gap: 7px; min-height: 66px; }
.rp-cell-add {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #bfd1e5;
  border-radius: 8px;
  background: #fff;
  color: var(--rp-blue);
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  opacity: .15;
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease;
}
.rp-rota-cell:hover .rp-cell-add,
.rp-cell-add:focus { opacity: 1; }
.rp-cell-add:hover { border-color: var(--rp-blue); transform: translateY(-1px); }
.rp-cell-add:focus { outline: 3px solid rgba(22,119,255,.16); outline-offset: 1px; }

.rp-shift-card {
  width: 100%;
  min-height: 66px;
  padding: 9px 10px;
  border: 1px solid #9fc6f4;
  border-left: 4px solid var(--rp-blue);
  border-radius: 9px;
  background: #edf6ff;
  color: #163a60;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 7px rgba(16,42,76,.06);
}
.rp-shift-card:hover { border-color: #6eacee; background: #e5f2ff; }
.rp-shift-card:focus { outline: 3px solid rgba(22,119,255,.16); outline-offset: 1px; }
.rp-shift-card.is-draft { border-left-color: #d79c12; background: #fff8e8; border-color: #ead291; color: #684b08; }
.rp-shift-card.is-dragging { opacity: .48; }
.rp-shift-workplace,
.rp-shift-time,
.rp-shift-draft { display: block; }
.rp-shift-workplace { font-size: 14px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.rp-shift-time { margin-top: 5px; font-size: 14px; line-height: 1.2; font-weight: 700; }
.rp-shift-draft { margin-top: 5px; color: #86600c; font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.rp-rota-hours { padding: 16px 8px !important; text-align: center; vertical-align: middle !important; background: #fbfdff !important; }
.rp-rota-hours strong { font-size: 15px; white-space: nowrap; }
.rp-rota-help { margin: 12px 2px 0; color: var(--rp-muted); font-size: 14px; }

.rp-shift-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--rp-text);
  box-shadow: 0 28px 80px rgba(8,34,65,.28);
}
.rp-shift-dialog::backdrop { background: rgba(7,28,52,.55); }
.rp-shift-dialog-card { padding: 24px; }
.rp-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rp-dialog-head h2 { margin: 0; font-size: 28px; line-height: 1.15; }
.rp-dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 1px solid #cbd9e8;
  border-radius: 10px;
  background: #fff;
  color: var(--rp-text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.rp-dialog-close:hover { background: #f5f8fc; }
.rp-shift-form label { font-size: 16px; }
.rp-shift-form input,
.rp-shift-form select,
.rp-shift-form textarea {
  min-height: 48px;
  border-color: #b9cadb;
  font-size: 17px;
}
.rp-shift-form textarea { min-height: 88px; }
.rp-dialog-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 4px; }
.rp-dialog-actions .rp-primary-button,
.rp-dialog-actions .rp-secondary-button { min-height: 48px; }
.rp-delete-shift-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rp-border); }
.rp-danger-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #e4b6b0;
  border-radius: 9px;
  background: #fff5f4;
  color: #a6281d;
  font-weight: 800;
  cursor: pointer;
}
.rp-danger-button:hover { background: #ffeceb; }
body.rp-rota-busy { cursor: progress; }
body.rp-rota-busy .rp-rota-wrap { opacity: .65; pointer-events: none; }

@media (max-width: 1320px) {
  .rp-rota-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .rp-week-navigation,
  .rp-rota-actions,
  .rp-rota-filters { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .rp-rota-summary { grid-template-columns: 1fr; }
  .rp-week-navigation,
  .rp-rota-actions,
  .rp-rota-filters { align-items: stretch; flex-direction: column; }
  .rp-week-label { min-width: 0; padding: 8px 0; text-align: left; }
  .rp-rota-toolbar .rp-secondary-button,
  .rp-rota-toolbar .rp-primary-button,
  .rp-rota-filters select,
  .rp-rota-actions form,
  .rp-rota-actions form button { width: 100%; }
  .rp-rota-table-live { min-width: 1160px; }
  .rp-cell-add { opacity: .85; }
  .rp-shift-dialog-card { padding: 20px 16px; }
  .rp-dialog-actions { flex-direction: column; }
  .rp-dialog-actions .rp-primary-button,
  .rp-dialog-actions .rp-secondary-button,
  .rp-delete-shift-form .rp-danger-button { width: 100%; }
}

@media print {
  .rp-sidebar,
  .rp-topbar,
  .rp-page-head .rp-head-actions,
  .rp-rota-toolbar,
  .rp-rota-help,
  .rp-cell-add,
  .rp-alert,
  .rp-shift-dialog { display: none !important; }
  body.rp-app-page { background: #fff; }
  .rp-app { display: block; }
  .rp-content { padding: 0; }
  .rp-rota-summary { grid-template-columns: repeat(3, 1fr); }
  .rp-rota-wrap { overflow: visible; box-shadow: none; border-color: #777; }
  .rp-rota-table-live { min-width: 0; width: 100%; table-layout: fixed; }
  .rp-rota-table-live th,
  .rp-rota-table-live td { border-color: #aaa; }
  .rp-sticky-staff { position: static !important; }
  .rp-shift-card { box-shadow: none; }
}
.rp-rota-cell.is-inactive-staff { background: #f7f8fa; }
.rp-rota-cell.is-inactive-staff::after {
  content: "Inactive";
  position: absolute;
  right: 7px;
  bottom: 7px;
  color: #8794a5;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Phase 6: staff PWA and presentation-ready sample data */
:root {
  --rp-staff-purple: #5b4bd8;
  --rp-staff-purple-dark: #4536b8;
  --rp-staff-purple-soft: #f1efff;
  --rp-staff-green: #167a58;
}

.rp-login-shell-phase6 .rp-login-brand {
  background: linear-gradient(145deg, #352a83 0%, #5b4bd8 54%, #6d62e7 100%);
}
.rp-login-brand-inner { display: flex; align-items: center; gap: 20px; }
.rp-login-app-icon { width: 74px; height: 74px; border-radius: 18px; box-shadow: 0 16px 40px rgba(11,18,62,.28); }
.rp-login-panel { display: grid; place-items: center; padding: 28px 18px; }
.rp-login-card { border-color: #d9ddeb; box-shadow: 0 18px 55px rgba(32,42,78,.11); }
.rp-login-card input[type="text"], .rp-login-card input[type="password"] { min-height: 52px; border-color: #bfc9da; font-size: 17px; }
.rp-login-card input[type="submit"] { min-height: 52px; background: var(--rp-staff-purple); font-size: 17px; }
.rp-login-card input[type="submit"]:hover { background: var(--rp-staff-purple-dark); }
.rp-login-links { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 15px; }
.rp-login-install { border: 0; background: transparent; color: var(--rp-staff-purple); font-weight: 800; cursor: pointer; }
.rp-login-install[hidden] { display: none !important; }

.rp-staff-app-body { margin: 0; background: #f6f7fb; color: #17213a; }
.rp-staff-app { min-height: 100vh; background: #f6f7fb; }
.rp-staff-app-header {
  min-height: 74px;
  padding: 10px clamp(16px,4vw,32px);
  background: #fff;
  border-bottom: 1px solid #dce1ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.rp-staff-app-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.rp-staff-app-brand img { width: 46px; height: 46px; border-radius: 12px; flex: 0 0 auto; }
.rp-staff-app-brand strong, .rp-staff-app-brand small { display: block; }
.rp-staff-app-brand strong { font-size: 19px; color: #17213a; }
.rp-staff-app-brand small { margin-top: 2px; font-size: 13px; color: #66728a; }
.rp-staff-header-actions { display: flex; align-items: center; gap: 10px; }
.rp-staff-install-button, .rp-staff-logout {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d3d9e6;
  background: #fff;
  color: #27344f;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rp-staff-install-button { border-color: #c9c3ff; color: var(--rp-staff-purple); cursor: pointer; }
.rp-staff-install-button[hidden] { display: none !important; }
.rp-staff-app-layout { width: min(1280px,100%); margin: 0 auto; display: grid; grid-template-columns: 220px minmax(0,1fr); }
.rp-staff-side-nav { padding: 26px 14px; position: sticky; top: 74px; height: calc(100vh - 74px); border-right: 1px solid #dce1ec; background: #fff; }
.rp-staff-side-nav a { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 10px 13px; margin: 3px 0; border-radius: 11px; text-decoration: none; color: #44506a; }
.rp-staff-side-nav a > span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: #f0f2f8; font-size: 18px; }
.rp-staff-side-nav a strong { font-size: 15px; }
.rp-staff-side-nav a.is-active { background: var(--rp-staff-purple-soft); color: var(--rp-staff-purple-dark); }
.rp-staff-side-nav a.is-active > span { background: var(--rp-staff-purple); color: #fff; }
.rp-staff-app-main { min-width: 0; padding: 30px clamp(18px,4vw,38px) 60px; }
.rp-staff-welcome { margin-bottom: 22px; }
.rp-staff-welcome p, .rp-staff-page-title p { margin: 0 0 5px; color: #65718a; font-weight: 700; }
.rp-staff-welcome h1, .rp-staff-page-title h1 { margin: 0; font-size: clamp(30px,4vw,42px); line-height: 1.1; letter-spacing: -.025em; }
.rp-staff-page-title { margin-bottom: 20px; }
.rp-staff-mobile-panel { background: #fff; border: 1px solid #d9dfeb; border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(38,47,80,.05); margin-bottom: 18px; }
.rp-staff-today-panel { border-top: 4px solid var(--rp-staff-purple); }
.rp-staff-section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.rp-staff-section-head h2 { margin: 0; font-size: 21px; }
.rp-staff-section-head a { color: var(--rp-staff-purple); font-weight: 800; text-decoration: none; }
.rp-staff-shift-card { display: grid; grid-template-columns: 120px minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 17px; border: 1px solid #dce2ee; border-radius: 13px; background: #fbfcff; }
.rp-staff-shift-card + .rp-staff-shift-card { margin-top: 10px; }
.rp-staff-shift-date { font-weight: 800; color: #5c6880; }
.rp-staff-shift-main strong, .rp-staff-shift-main span { display: block; }
.rp-staff-shift-main strong { font-size: 19px; color: #17213a; }
.rp-staff-shift-main span { margin-top: 4px; color: #68758d; font-size: 15px; }
.rp-staff-shift-time { font-size: 18px; font-weight: 850; color: #24304a; white-space: nowrap; }
.rp-staff-simple-empty { min-height: 82px; display: grid; place-items: center; color: #67748b; border: 1px dashed #cbd3e1; border-radius: 12px; background: #fbfcfe; }
.rp-staff-simple-empty-large { min-height: 260px; }
.rp-staff-week-list { border: 1px solid #dde3ed; border-radius: 13px; overflow: hidden; }
.rp-staff-week-row { display: grid; grid-template-columns: 92px 1fr; min-height: 74px; border-top: 1px solid #e3e7ef; }
.rp-staff-week-row:first-child { border-top: 0; }
.rp-staff-week-row.is-today { background: #f5f2ff; }
.rp-staff-week-day { padding: 14px; border-right: 1px solid #e3e7ef; display: flex; flex-direction: column; justify-content: center; }
.rp-staff-week-day strong { font-size: 16px; }
.rp-staff-week-day span { color: #6a758b; font-size: 14px; margin-top: 2px; }
.rp-staff-week-shifts { padding: 12px 15px; display: grid; align-content: center; gap: 7px; }
.rp-staff-week-shifts div { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rp-staff-week-shifts div strong { font-size: 16px; }
.rp-staff-week-shifts div span, .rp-staff-no-shift { color: #647087; font-size: 15px; }
.rp-staff-week-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 14px; padding: 10px; border: 1px solid #d9dfeb; border-radius: 12px; background: #fff; }
.rp-staff-week-nav a { min-height: 44px; padding: 0 12px; border: 1px solid #d8deea; border-radius: 9px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 800; }
.rp-staff-week-nav a:last-child { justify-self: end; }
.rp-staff-week-nav strong { text-align: center; font-size: 16px; }
.rp-staff-rota-list { padding: 0; overflow: hidden; }
.rp-staff-rota-item { display: grid; grid-template-columns: 86px minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 18px 20px; border-top: 1px solid #e1e6ef; }
.rp-staff-rota-item:first-child { border-top: 0; }
.rp-staff-rota-date strong, .rp-staff-rota-date span, .rp-staff-rota-place strong, .rp-staff-rota-place span { display: block; }
.rp-staff-rota-date span, .rp-staff-rota-place span { color: #67738a; margin-top: 3px; }
.rp-staff-rota-place strong { font-size: 18px; }
.rp-staff-rota-time { font-size: 18px; font-weight: 850; white-space: nowrap; }
.rp-staff-bottom-nav { display: none; }

.rp-pwa-help { width: min(92vw,430px); border: 0; border-radius: 18px; padding: 28px; box-shadow: 0 24px 80px rgba(27,34,67,.28); color: #17213a; }
.rp-pwa-help::backdrop { background: rgba(18,24,45,.55); }
.rp-pwa-help h2 { margin: 0 30px 10px 0; font-size: 26px; }
.rp-pwa-help p { color: #58647b; font-size: 16px; line-height: 1.55; }
.rp-pwa-help-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f1f3f7; font-size: 25px; cursor: pointer; }

.rp-dashboard-side-stack { display: grid; gap: 18px; align-content: start; }
.rp-dashboard-shift-list { margin-top: 14px; border: 1px solid var(--rp-border); border-radius: 12px; overflow: hidden; }
.rp-dashboard-shift-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--rp-border); }
.rp-dashboard-shift-row:first-child { border-top: 0; }
.rp-dashboard-shift-row strong, .rp-dashboard-shift-row span { display: block; }
.rp-dashboard-shift-row span { color: var(--rp-muted); font-size: 14px; margin-top: 2px; }
.rp-dashboard-shift-time { font-weight: 850; white-space: nowrap; }
.rp-demo-panel .rp-panel-head p { margin: 2px 0 0; }
.rp-demo-login { margin: 15px 0; padding: 13px; border-radius: 10px; background: #f5f3ff; border: 1px solid #d8d2ff; }
.rp-demo-login span, .rp-demo-login strong, .rp-demo-login small { display: block; }
.rp-demo-login span { color: var(--rp-muted); font-size: 13px; }
.rp-demo-login strong { margin: 3px 0; font-size: 17px; }
.rp-demo-login small { color: #5d6680; }
.rp-demo-password-form { display: grid; gap: 9px; margin-bottom: 10px; }
.rp-demo-password-form label { font-weight: 750; }
.rp-demo-password-form input { width: 100%; min-height: 46px; margin-top: 6px; padding: 0 11px; border: 1px solid #bfc9da; border-radius: 9px; }
.rp-demo-clear { width: 100%; }

@media (max-width: 900px) {
  .rp-staff-app-layout { grid-template-columns: 1fr; }
  .rp-staff-side-nav { display: none; }
  .rp-staff-app-main { padding-bottom: 110px; }
  .rp-staff-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    padding: 8px max(8px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    background: #fff;
    border-top: 1px solid #d8deea;
    overflow-x: auto;
    box-shadow: 0 -10px 30px rgba(35,44,75,.08);
  }
  .rp-staff-bottom-nav a { flex: 1 0 72px; min-height: 58px; padding: 5px; text-decoration: none; display: grid; place-items: center; align-content: center; gap: 3px; color: #65718a; border-radius: 10px; }
  .rp-staff-bottom-nav a span { font-size: 20px; line-height: 1; }
  .rp-staff-bottom-nav a strong { font-size: 13px; white-space: nowrap; }
  .rp-staff-bottom-nav a.is-active { background: var(--rp-staff-purple-soft); color: var(--rp-staff-purple-dark); }
}

@media (max-width: 640px) {
  .rp-login-brand { min-height: 205px; padding: 30px 22px; }
  .rp-login-brand-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .rp-login-app-icon { width: 62px; height: 62px; }
  .rp-login-brand h1 { font-size: 36px; }
  .rp-login-brand p { font-size: 17px; }
  .rp-login-panel { padding: 20px 14px 34px; }
  .rp-login-card { width: 100%; padding: 26px 20px; margin: 0; }
  .rp-login-card h2 { font-size: 28px; }
  .rp-login-links { align-items: flex-start; flex-direction: column; }
  .rp-staff-app-header { min-height: 68px; padding: 9px 12px; }
  .rp-staff-app-brand img { width: 42px; height: 42px; }
  .rp-staff-app-brand strong { font-size: 17px; }
  .rp-staff-app-brand small { font-size: 12px; }
  .rp-staff-header-actions { gap: 6px; }
  .rp-staff-install-button, .rp-staff-logout { min-height: 42px; padding: 0 10px; font-size: 14px; }
  .rp-staff-app-main { padding: 22px 12px 112px; }
  .rp-staff-welcome h1, .rp-staff-page-title h1 { font-size: 32px; }
  .rp-staff-mobile-panel { padding: 16px; border-radius: 14px; }
  .rp-staff-shift-card { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 15px; }
  .rp-staff-shift-date { grid-column: 1 / -1; font-size: 14px; }
  .rp-staff-shift-main strong { font-size: 18px; }
  .rp-staff-shift-time { font-size: 17px; }
  .rp-staff-week-row { grid-template-columns: 76px 1fr; }
  .rp-staff-week-day { padding: 12px 10px; }
  .rp-staff-week-shifts { padding: 11px 12px; }
  .rp-staff-week-shifts div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .rp-staff-week-nav { grid-template-columns: auto 1fr auto; }
  .rp-staff-week-nav a { min-width: 46px; font-size: 0; }
  .rp-staff-week-nav a:first-child::after { content: '‹'; font-size: 24px; }
  .rp-staff-week-nav a:last-child::after { content: '›'; font-size: 24px; }
  .rp-staff-week-nav strong { font-size: 14px; }
  .rp-staff-rota-item { grid-template-columns: 62px 1fr; gap: 12px; padding: 16px 14px; }
  .rp-staff-rota-time { grid-column: 2; font-size: 17px; }
  .rp-dashboard-shift-row { grid-template-columns: 1fr; gap: 7px; }
}

/* Phase 7: digital timesheets and client confirmation */
.rp-staff-shift-action { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.rp-staff-shift-action a,
.rp-staff-rota-action a {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 9px;
  background: var(--rp-staff-purple);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rp-staff-rota-action { justify-self: end; }
.rp-mini-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #44516a;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.rp-timesheet-entry-panel { max-width: 720px; }
.rp-timesheet-shift-reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  margin-bottom: 22px;
  padding: 14px 16px;
  border: 1px solid #cbd5e3;
  border-radius: 12px;
  background: #f8faff;
}
.rp-timesheet-shift-reference span { color: #5d6a82; font-weight: 750; }
.rp-timesheet-shift-reference strong { font-size: 19px; color: #17213a; }
.rp-timesheet-simple-form { display: grid; gap: 18px; }
.rp-timesheet-simple-form label,
.rp-client-sign-form label,
.rp-no-signature-box label {
  display: grid;
  gap: 8px;
  color: #1d2a42;
  font-size: 17px;
  font-weight: 800;
}
.rp-timesheet-simple-form input[type="time"],
.rp-client-sign-form input[type="text"],
.rp-timesheet-simple-form textarea,
.rp-no-signature-box textarea {
  width: 100%;
  min-height: 54px;
  border: 2px solid #b8c5d7;
  border-radius: 11px;
  background: #fff;
  color: #14213a;
  padding: 10px 13px;
  font-size: 18px;
  outline: none;
}
.rp-timesheet-simple-form textarea,
.rp-no-signature-box textarea { min-height: 104px; resize: vertical; }
.rp-timesheet-simple-form input:focus,
.rp-client-sign-form input:focus,
.rp-timesheet-simple-form textarea:focus,
.rp-no-signature-box textarea:focus,
.rp-signature-canvas:focus-visible {
  border-color: var(--rp-staff-purple);
  box-shadow: 0 0 0 4px rgba(91,75,216,.14);
}
.rp-timesheet-complete-button,
.rp-client-confirm-button { min-height: 56px; font-size: 18px; }
.rp-staff-back-link { display: inline-flex; margin: 2px 0 20px; color: var(--rp-staff-purple-dark); font-weight: 800; text-decoration: none; }
.rp-client-confirmation-head { max-width: 760px; margin-bottom: 18px; }
.rp-client-confirmation-head p { margin: 0 0 5px; color: #65718a; font-weight: 800; }
.rp-client-confirmation-head h1 { margin: 0; font-size: clamp(28px,4vw,38px); line-height: 1.15; }
.rp-client-sign-panel {
  max-width: 760px;
  background: #fff;
  border: 2px solid #cbd4e2;
  border-radius: 18px;
  padding: clamp(18px,4vw,28px);
  box-shadow: 0 14px 36px rgba(32,42,74,.07);
}
.rp-client-timesheet-summary {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.rp-client-timesheet-summary > div {
  min-height: 74px;
  padding: 13px 15px;
  border: 1px solid #d7dee9;
  border-radius: 11px;
  background: #f9fbfe;
}
.rp-client-timesheet-summary span,
.rp-client-timesheet-summary strong { display: block; }
.rp-client-timesheet-summary span { color: #66738b; font-size: 14px; font-weight: 750; }
.rp-client-timesheet-summary strong { margin-top: 5px; color: #17213a; font-size: 18px; }
.rp-client-sign-form { display: grid; gap: 18px; }
.rp-signature-field { display: grid; gap: 8px; }
.rp-signature-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 17px; }
.rp-signature-label button {
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid #c6d0df;
  border-radius: 8px;
  background: #fff;
  color: #3d4a63;
  font-weight: 800;
  cursor: pointer;
}
.rp-signature-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border: 2px solid #9faec3;
  border-radius: 12px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.rp-no-signature-box {
  margin-top: 24px;
  border-top: 1px solid #d7dee9;
  padding-top: 18px;
}
.rp-no-signature-box summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: #38455e;
  font-weight: 850;
  cursor: pointer;
}
.rp-no-signature-box form { margin-top: 12px; }
.rp-staff-hours-summary {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.rp-staff-hours-summary article {
  min-height: 112px;
  padding: 20px;
  border: 1px solid #d6deea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(38,47,80,.05);
}
.rp-staff-hours-summary span,
.rp-staff-hours-summary strong { display: block; }
.rp-staff-hours-summary span { color: #65718a; font-weight: 800; }
.rp-staff-hours-summary strong { margin-top: 8px; color: #18233b; font-size: 30px; line-height: 1; }
.rp-timesheet-due-list,
.rp-staff-timesheet-list { display: grid; gap: 9px; }
.rp-timesheet-due-list a,
.rp-staff-timesheet-list a {
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid #d8e0eb;
  border-radius: 11px;
  background: #fbfcff;
  color: #17213a;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.rp-timesheet-due-list span strong,
.rp-timesheet-due-list span small,
.rp-staff-timesheet-place strong,
.rp-staff-timesheet-place small { display: block; }
.rp-timesheet-due-list small,
.rp-staff-timesheet-place small { margin-top: 3px; color: #66738a; font-size: 14px; }
.rp-timesheet-due-list b { color: var(--rp-staff-purple-dark); }
.rp-staff-timesheet-date { width: 52px; flex: 0 0 auto; color: #5f6b81; font-weight: 850; }
.rp-staff-timesheet-place { min-width: 0; flex: 1; }
.rp-staff-timesheet-done { max-width: 680px; }
.rp-success-mark { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: #e8f7ee; color: #167541; font-size: 30px; font-weight: 900; }
.rp-staff-timesheet-done h2 { margin: 14px 0 18px; font-size: 26px; }
.rp-staff-timesheet-done dl { margin: 0; }
.rp-staff-timesheet-done dl > div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid #e0e5ed; }
.rp-staff-timesheet-done dt { color: #66738a; font-weight: 750; }
.rp-staff-timesheet-done dd { margin: 0; font-weight: 850; }

.rp-timesheet-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--rp-shadow);
}
.rp-range-links { display: flex; gap: 6px; flex-wrap: wrap; }
.rp-range-links a {
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #cbd5e2;
  border-radius: 9px;
  color: #34415a;
  text-decoration: none;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
}
.rp-range-links a.is-active { background: var(--rp-blue); border-color: var(--rp-blue); color: #fff; }
.rp-timesheet-filter-form { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.rp-timesheet-filter-form label { display: grid; gap: 5px; color: var(--rp-muted); font-size: 13px; font-weight: 750; }
.rp-timesheet-filter-form input,
.rp-timesheet-filter-form select { min-height: 44px; padding: 0 10px; border: 1px solid #bfcbd9; border-radius: 8px; background: #fff; font-size: 15px; }
.rp-timesheet-kpis { margin-bottom: 16px; }
.rp-timesheet-staff-summary,
.rp-timesheet-records,
.rp-timesheet-detail { margin-bottom: 16px; }
.rp-panel-head-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.rp-panel-head-between p { margin: 4px 0 0; color: var(--rp-muted); }
.rp-timesheet-detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 22px 18px; }
.rp-timesheet-detail-grid > div { padding: 13px; border: 1px solid var(--rp-border); border-radius: 9px; background: #f8fbfe; }
.rp-timesheet-detail-grid span,
.rp-timesheet-detail-grid strong { display: block; }
.rp-timesheet-detail-grid span { color: var(--rp-muted); font-size: 13px; font-weight: 700; }
.rp-timesheet-detail-grid strong { margin-top: 4px; font-size: 17px; }
.rp-timesheet-note { margin: 0 22px 16px; padding: 14px; border: 1px solid var(--rp-border); border-radius: 9px; }
.rp-timesheet-note p { margin: 6px 0 0; }
.rp-timesheet-signature-record { margin: 0 22px 22px; }
.rp-timesheet-signature-record span { display: block; margin-bottom: 7px; color: var(--rp-muted); font-weight: 750; }
.rp-timesheet-signature-record img { width: min(520px,100%); max-height: 220px; object-fit: contain; object-position: left center; border: 1px solid #cbd5e2; border-radius: 9px; background: #fff; }
.rp-timesheet-status-signed,
.rp-timesheet-status-verified { background: #e8f7ee; color: #16683d; }
.rp-timesheet-status-awaiting_review { background: #fff3d7; color: #855d00; }
.rp-timesheet-status-awaiting_signature { background: #eef2f7; color: #536078; }

@media (max-width: 900px) {
  .rp-timesheet-toolbar { align-items: stretch; flex-direction: column; }
  .rp-timesheet-filter-form { align-items: stretch; }
  .rp-timesheet-filter-form label { flex: 1 1 180px; }
  .rp-timesheet-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 640px) {
  .rp-staff-shift-action { justify-content: stretch; }
  .rp-staff-shift-action a { width: 100%; }
  .rp-staff-rota-action { grid-column: 2; justify-self: stretch; }
  .rp-staff-rota-action a { width: 100%; }
  .rp-timesheet-shift-reference { align-items: flex-start; flex-direction: column; gap: 5px; }
  .rp-client-sign-panel { padding: 16px; border-radius: 14px; }
  .rp-client-timesheet-summary { grid-template-columns: 1fr; }
  .rp-signature-canvas { height: 190px; }
  .rp-staff-hours-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .rp-staff-hours-summary article { min-height: 96px; padding: 15px; }
  .rp-staff-hours-summary strong { font-size: 24px; }
  .rp-timesheet-due-list a,
  .rp-staff-timesheet-list a { align-items: flex-start; }
  .rp-staff-timesheet-list a { display: grid; grid-template-columns: 48px 1fr; }
  .rp-staff-timesheet-list .rp-mini-status { grid-column: 2; justify-self: start; }
  .rp-staff-timesheet-done dl > div { grid-template-columns: 1fr; gap: 3px; }
  .rp-timesheet-filter-form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .rp-timesheet-filter-form label:last-of-type { grid-column: 1 / -1; }
  .rp-timesheet-filter-form .rp-secondary-button { grid-column: 1 / -1; width: 100%; }
  .rp-timesheet-detail-grid { grid-template-columns: 1fr; padding: 0 16px 16px; }
  .rp-timesheet-note, .rp-timesheet-signature-record { margin-left: 16px; margin-right: 16px; }
  .rp-panel-head-between { align-items: flex-start; flex-direction: column; }
}

.rp-dashboard-timesheet-list { display: grid; gap: 8px; }
.rp-dashboard-timesheet-list a {
  min-height: 62px;
  padding: 11px 12px;
  border: 1px solid var(--rp-border);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--rp-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.rp-dashboard-timesheet-list span { min-width: 0; }
.rp-dashboard-timesheet-list strong,
.rp-dashboard-timesheet-list small { display: block; }
.rp-dashboard-timesheet-list small { margin-top: 3px; color: var(--rp-muted); }
.rp-dashboard-timesheet-list a > span:last-child { text-align: right; }
.rp-shift-timesheet {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  color: #43506a;
  font-size: 11px;
  font-weight: 850;
}
.rp-shift-timesheet-signed,
.rp-shift-timesheet-verified { color: #16683d; }
.rp-shift-timesheet-awaiting_review { color: #855d00; }

/* Phase 8: professional messaging and identity polish */
.rp-nav-item { position: relative; }
.rp-nav-badge,
.rp-staff-nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--rp-navy);
  font-size: 12px;
  font-weight: 850;
  margin-left: auto;
}
.rp-top-message-button { position: relative; display: inline-grid; place-items: center; text-decoration: none; }
.rp-top-message-button b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #d93025;
  color: #fff;
  font-size: 11px;
  border: 2px solid #fff;
}
.rp-edit-photo-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--rp-border); border-radius: 12px; background: #f8fbff; }
.rp-edit-photo-preview img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.rp-check-label { display: inline-flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 700 !important; }
.rp-check-label input { width: 18px !important; height: 18px !important; min-height: 0 !important; }
.rp-rota-table th:last-child, .rp-rota-table td:last-child { width: 128px; }
.rp-rota-hours strong { font-size: 14px; line-height: 1.3; }

.rp-messaging-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 650px;
  background: #fff;
  border: 1px solid var(--rp-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--rp-shadow);
}
.rp-conversations-panel { border-right: 1px solid var(--rp-border); background: #fbfdff; min-width: 0; }
.rp-conversations-head { min-height: 82px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rp-border); background: #fff; }
.rp-conversations-head span, .rp-conversations-head strong { display: block; }
.rp-conversations-head span { color: var(--rp-muted); font-size: 13px; font-weight: 700; }
.rp-conversations-head strong { margin-top: 2px; font-size: 20px; }
.rp-message-new-button { width: 42px; height: 42px; border: 0; border-radius: 11px; background: var(--rp-blue); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.rp-conversation-empty { padding: 24px 18px; color: var(--rp-muted); }
.rp-conversation-list { max-height: 670px; overflow-y: auto; }
.rp-conversation-row { display: flex; gap: 12px; align-items: center; padding: 15px 16px; border-bottom: 1px solid var(--rp-border); text-decoration: none; color: var(--rp-text); }
.rp-conversation-row:hover, .rp-conversation-row.is-active { background: #eef6ff; }
.rp-message-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.rp-message-avatar-large { width: 52px; height: 52px; }
.rp-message-initials { display: inline-grid; place-items: center; background: #e4effc; color: var(--rp-navy); font-weight: 850; }
.rp-conversation-copy { flex: 1; min-width: 0; }
.rp-conversation-top, .rp-conversation-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rp-conversation-top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.rp-conversation-top time { color: var(--rp-muted); font-size: 12px; flex: 0 0 auto; }
.rp-conversation-bottom { margin-top: 4px; }
.rp-conversation-bottom small { color: var(--rp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-conversation-bottom b { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--rp-blue); color: #fff; font-size: 11px; }
.rp-chat-panel { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; background: #fff; }
.rp-chat-head { min-height: 82px; display: flex; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--rp-border); }
.rp-chat-person { display: flex; align-items: center; gap: 12px; }
.rp-chat-person strong, .rp-chat-person small { display: block; }
.rp-chat-person strong { font-size: 17px; }
.rp-chat-person small { margin-top: 2px; color: var(--rp-muted); }
.rp-chat-messages { overflow-y: auto; padding: 24px; background: #f8fbff; display: flex; flex-direction: column; gap: 10px; }
.rp-chat-start { margin: auto; color: var(--rp-muted); text-align: center; }
.rp-message-bubble { max-width: min(640px, 78%); padding: 12px 14px 9px; border-radius: 15px; border: 1px solid var(--rp-border); font-size: 16px; line-height: 1.45; }
.rp-message-bubble.is-theirs { align-self: flex-start; background: #fff; border-bottom-left-radius: 5px; }
.rp-message-bubble.is-mine { align-self: flex-end; background: #e7f2ff; border-color: #c9e0fb; border-bottom-right-radius: 5px; }
.rp-message-bubble footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 7px; color: var(--rp-muted); font-size: 12px; }
.rp-message-bubble.is-theirs footer { justify-content: flex-start; }
.rp-message-compose { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; padding: 14px 16px; border-top: 1px solid var(--rp-border); background: #fff; }
.rp-message-compose textarea { width: 100%; min-height: 52px; max-height: 140px; resize: vertical; border: 1px solid #bdc9d9; border-radius: 12px; padding: 12px 13px; font-size: 16px; color: var(--rp-text); background: #fff; }
.rp-message-compose textarea:focus { outline: 3px solid rgba(22,119,255,.12); border-color: var(--rp-blue); }
.rp-message-compose .rp-primary-button { min-width: 92px; min-height: 52px; border: 0; cursor: pointer; }
.rp-message-error { margin: 0 16px 14px; color: #9f261f; font-weight: 700; }
.rp-chat-placeholder { min-height: 650px; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.rp-chat-placeholder h2 { margin: 13px 0 5px; }
.rp-chat-placeholder p { color: var(--rp-muted); margin: 0 0 18px; }
.rp-new-message-dialog { width: min(520px, calc(100vw - 30px)); border: 0; border-radius: 16px; padding: 0; box-shadow: 0 24px 70px rgba(16,42,76,.28); }
.rp-new-message-dialog::backdrop { background: rgba(6,28,50,.48); }
.rp-new-message-card { padding: 20px; }
.rp-new-message-contacts { display: grid; gap: 8px; max-height: 440px; overflow-y: auto; margin-top: 12px; }
.rp-new-message-contacts a { display: flex; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--rp-border); border-radius: 11px; text-decoration: none; color: var(--rp-text); background: #fff; }
.rp-new-message-contacts a:hover { background: #f3f8ff; border-color: #b9d6f7; }
.rp-new-message-contacts strong, .rp-new-message-contacts small { display: block; }
.rp-new-message-contacts small { color: var(--rp-muted); margin-top: 2px; }
.rp-messaging-shell-staff { min-height: 560px; border-radius: 14px; }
.rp-messaging-shell-staff .rp-conversations-panel { width: auto; }
.rp-messaging-shell-staff .rp-chat-placeholder { min-height: 560px; }
.rp-staff-nav-badge { position: absolute; top: 2px; right: 13px; background: #d93025; color: #fff; min-width: 18px; height: 18px; font-size: 10px; }
.rp-staff-bottom-nav a { position: relative; }

@media (max-width: 900px) {
  .rp-messaging-shell { grid-template-columns: 280px minmax(0,1fr); }
}
@media (max-width: 700px) {
  .rp-messaging-shell { display: block; min-height: 0; }
  .rp-conversations-panel { border-right: 0; border-bottom: 1px solid var(--rp-border); }
  .rp-conversation-list { max-height: 260px; }
  .rp-chat-panel { min-height: 520px; }
  .rp-chat-placeholder { min-height: 420px; }
  .rp-chat-messages { min-height: 360px; padding: 16px 12px; }
  .rp-message-bubble { max-width: 88%; }
  .rp-message-compose { grid-template-columns: 1fr; }
  .rp-message-compose .rp-primary-button { width: 100%; }
}
.rp-staff-header-identity { display: inline-flex; align-items: center; gap: 8px; }
.rp-staff-header-identity img,
.rp-staff-header-identity > span { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.rp-staff-header-identity > span { display: inline-grid; place-items: center; background: #e6f0fc; color: var(--rp-navy); font-weight: 850; }
.rp-staff-header-identity strong { font-size: 14px; }
.rp-staff-side-nav a { position: relative; }
.rp-staff-side-badge { top: 50%; right: 14px; transform: translateY(-50%); }
@media (max-width: 760px) {
  .rp-staff-header-identity strong { display: none; }
}

/* Phase 9: Notice Board + visible company Team directory */
.rp-nav-badge-soft { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.24); }
.rp-message-team-button { width: auto; min-width: 66px; padding: 0 14px; font-size: 14px; font-weight: 850; }
.rp-dialog-subtitle { margin: 4px 0 0; color: var(--rp-muted); font-size: 14px; }
.rp-message-avatar-small { width: 38px; height: 38px; }
.rp-team-directory { border-top: 1px solid var(--rp-border); background: #fff; }
.rp-team-directory-head { min-height: 48px; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rp-team-directory-head strong { font-size: 14px; text-transform: uppercase; letter-spacing: .035em; color: #59667d; }
.rp-team-directory-head span { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: #edf3fa; color: #46546b; font-size: 12px; font-weight: 850; }
.rp-team-directory-list { max-height: 320px; overflow-y: auto; border-top: 1px solid var(--rp-border); }
.rp-team-directory-list > a { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 9px 14px; border-bottom: 1px solid #edf0f5; color: var(--rp-text); text-decoration: none; }
.rp-team-directory-list > a:hover,
.rp-team-directory-list > a.is-active { background: #eef6ff; }
.rp-team-directory-list strong,
.rp-team-directory-list small { display: block; }
.rp-team-directory-list strong { font-size: 14px; }
.rp-team-directory-list small { margin-top: 2px; color: var(--rp-muted); font-size: 12px; }

.rp-notice-admin-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.rp-notice-compose-panel textarea { min-height: 160px; }
.rp-management-notice-list { display: grid; gap: 12px; }
.rp-management-notice-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: start; padding: 18px; border: 1px solid var(--rp-border); border-radius: 13px; background: #fff; }
.rp-management-notice-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.rp-management-notice-title-row h3 { margin: 0; color: var(--rp-text); font-size: 18px; }
.rp-management-notice-title-row > span { flex: 0 0 auto; color: var(--rp-muted); font-size: 13px; font-weight: 700; }
.rp-management-notice-body { margin-top: 10px; color: #3f4b62; font-size: 15px; line-height: 1.6; }
.rp-management-notice-body p:first-child { margin-top: 0; }
.rp-management-notice-body p:last-child { margin-bottom: 0; }
.rp-management-notice-meta { margin-top: 12px; color: var(--rp-muted); font-size: 13px; }
.rp-text-danger { min-height: 40px; border: 1px solid #e6b8b4; border-radius: 9px; background: #fff7f6; color: #a32c22; padding: 0 12px; font-weight: 800; cursor: pointer; }
.rp-text-danger:hover { background: #ffedeb; }

.rp-staff-latest-notice { border-left: 4px solid var(--rp-staff-purple); }
.rp-staff-notice-preview { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid #dfe4ef; border-radius: 12px; background: #faf9ff; color: #17213a; text-decoration: none; }
.rp-staff-notice-preview span { min-width: 0; }
.rp-staff-notice-preview strong,
.rp-staff-notice-preview small { display: block; }
.rp-staff-notice-preview strong { font-size: 17px; }
.rp-staff-notice-preview small { margin-top: 5px; color: #66728a; font-size: 14px; line-height: 1.45; }
.rp-staff-notice-preview > b,
.rp-staff-notice-list > a > b { flex: 0 0 auto; border-radius: 999px; background: #e9e4ff; color: #4a39b5; padding: 5px 9px; font-size: 12px; }
.rp-staff-notice-list { display: grid; border: 1px solid #dfe4ee; border-radius: 13px; overflow: hidden; }
.rp-staff-notice-list > a { display: grid; grid-template-columns: 76px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 84px; padding: 14px 16px; border-top: 1px solid #e5e9f0; color: #17213a; text-decoration: none; background: #fff; }
.rp-staff-notice-list > a:first-child { border-top: 0; }
.rp-staff-notice-list > a.is-unread { background: #faf9ff; }
.rp-staff-notice-list > a:hover { background: #f4f7fb; }
.rp-staff-notice-date { color: #68758c; font-weight: 800; }
.rp-staff-notice-copy { min-width: 0; }
.rp-staff-notice-copy strong,
.rp-staff-notice-copy small { display: block; }
.rp-staff-notice-copy strong { font-size: 17px; }
.rp-staff-notice-copy small { margin-top: 4px; color: #68758c; font-size: 14px; line-height: 1.4; }
.rp-staff-notice-detail { border-top: 4px solid var(--rp-staff-purple); }
.rp-staff-notice-detail-head span { color: #6a758b; font-size: 14px; font-weight: 700; }
.rp-staff-notice-detail-head h2 { margin: 5px 0 0; font-size: clamp(24px,4vw,32px); line-height: 1.2; }
.rp-staff-notice-detail-body { margin-top: 18px; color: #334057; font-size: 17px; line-height: 1.7; }
.rp-staff-notice-detail-body p:first-child { margin-top: 0; }
.rp-staff-notice-detail-body p:last-child { margin-bottom: 0; }

@media (max-width: 980px) {
  .rp-notice-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .rp-team-directory-list { max-height: 260px; }
  .rp-management-notice-card { grid-template-columns: 1fr; }
  .rp-management-notice-title-row { display: block; }
  .rp-management-notice-title-row > span { display: block; margin-top: 5px; }
  .rp-staff-notice-list > a { grid-template-columns: 58px minmax(0,1fr) auto; gap: 10px; padding: 13px 12px; }
  .rp-staff-notice-preview { align-items: flex-start; }
}


/* Phase 9.1 targeted notices */
.rp-notice-audience{border:1px solid #d7e0eb;border-radius:14px;padding:14px 16px;background:#fbfdff}.rp-notice-audience legend{font-weight:800;color:#15345b;padding:0 6px}.rp-choice-row{display:flex!important;align-items:center;gap:10px;min-height:42px;margin:0!important;font-weight:700}.rp-choice-row input{width:20px;height:20px;margin:0}.rp-notice-staff-picker{margin-top:12px;border-top:1px solid #e4eaf1;padding-top:12px}.rp-notice-staff-picker>input[type=search]{width:100%;min-height:46px;border:1px solid #b9c7d8;border-radius:10px;padding:0 13px;font-size:16px}.rp-notice-staff-list{margin-top:10px;max-height:330px;overflow:auto;border:1px solid #e0e7ef;border-radius:12px;background:#fff}.rp-notice-staff-option{display:flex!important;align-items:center;gap:11px;padding:10px 12px;margin:0!important;border-bottom:1px solid #edf1f5;cursor:pointer}.rp-notice-staff-option:last-child{border-bottom:0}.rp-notice-staff-option:hover{background:#f5f9ff}.rp-notice-staff-option>input{width:20px;height:20px;flex:0 0 auto}.rp-notice-staff-option img,.rp-notice-staff-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;display:grid;place-items:center;background:#e8f1ff;color:#1455a0;font-weight:800}.rp-notice-staff-option>span:last-child{display:flex;flex-direction:column;min-width:0}.rp-notice-staff-option small{color:#69798c;margin-top:2px}.rp-management-notice-meta{display:flex;gap:16px;flex-wrap:wrap;align-items:center}.rp-notice-staff-list{max-height:330px;overflow:auto;border:1px solid #e0e7ef;border-radius:12px;background:#fff}@media(max-width:720px){.rp-notice-staff-list{max-height:280px}}

/* Phase 10 reports */
.rp-report-toolbar { align-items: flex-end; }
.rp-report-filter-form label { font-size: 14px; }
.rp-report-filter-form input,
.rp-report-filter-form select { font-size: 16px; min-width: 145px; }
.rp-report-export { min-width: 140px; }
.rp-report-kpis .rp-kpi-card strong { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.08; }
.rp-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.rp-report-grid .rp-panel { min-width: 0; }
.rp-report-table { min-width: 760px; }
.rp-report-person { display: inline-flex; align-items: center; gap: 11px; color: var(--rp-text); text-decoration: none; }
.rp-report-person > span:last-child { min-width: 0; }
.rp-report-person strong,
.rp-report-person small { display: block; }
.rp-report-person small { margin-top: 3px; color: var(--rp-muted); font-size: 14px; }
.rp-report-photo { width: 44px; height: 44px; }
.rp-report-activity-panel { margin-bottom: 18px; }
.rp-report-activity-table { min-width: 1180px; }
.rp-report-status-scheduled { background: #eef5ff; color: #315f9a; }
.rp-report-status-missing { background: #fff0ef; color: #9b3535; }

@media (max-width: 1180px) {
  .rp-report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .rp-report-filter-form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .rp-report-filter-form label { min-width: 0; }
  .rp-report-filter-form input,
  .rp-report-filter-form select,
  .rp-report-filter-form button { width: 100%; min-width: 0; }
  .rp-report-export { width: 100%; }
}

@media (max-width: 520px) {
  .rp-report-filter-form { grid-template-columns: 1fr; }
}

/* Phase 11: management activity log */
.rp-activity-toolbar { align-items: flex-end; }
.rp-activity-filter-form label { font-size: 14px; }
.rp-activity-filter-form input,
.rp-activity-filter-form select { min-width: 145px; font-size: 16px; }
.rp-activity-search-label { min-width: 210px; }
.rp-activity-search-label input { width: 100%; }
.rp-activity-panel { margin-bottom: 18px; }
.rp-activity-table { min-width: 980px; }
.rp-activity-time { white-space: nowrap; }
.rp-activity-time span { margin-top: 3px; }
.rp-activity-description { min-width: 330px; line-height: 1.45; }
.rp-activity-category { display: inline-flex !important; align-items: center; min-height: 30px; margin: 0 !important; padding: 5px 10px; border-radius: 999px; background: #eef4fb; color: #315f9a !important; font-size: 13px !important; font-weight: 750; }
.rp-activity-category-timesheet { background: #e9f8ef; color: #1f7545 !important; }
.rp-activity-category-staff { background: #f1efff; color: #5941a9 !important; }
.rp-activity-category-document { background: #fff4df; color: #8a5a13 !important; }
.rp-activity-category-workplace { background: #edf7f8; color: #2c6970 !important; }
.rp-activity-category-notice { background: #fff0ef; color: #91443d !important; }
.rp-activity-person { display: inline-flex; align-items: center; gap: 10px; min-width: 180px; }
.rp-activity-person > span:last-child { min-width: 0; }
.rp-activity-person strong,
.rp-activity-person small { display: block; }
.rp-activity-person small { margin-top: 2px; color: var(--rp-muted); font-size: 13px; }
.rp-activity-photo { width: 38px; height: 38px; flex: 0 0 38px; }
.rp-activity-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--rp-border); }
.rp-activity-pagination span { color: var(--rp-muted); font-weight: 650; }

@media (max-width: 900px) {
  .rp-activity-filter-form { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .rp-activity-filter-form label,
  .rp-activity-filter-form input,
  .rp-activity-filter-form select,
  .rp-activity-filter-form button { width: 100%; min-width: 0; }
}
@media (max-width: 620px) {
  .rp-activity-filter-form { grid-template-columns: 1fr; }
  .rp-activity-pagination { justify-content: space-between; }
}

/* 0.13.1 - Management portal density + rota viewport usability correction */

/* Management pages are application screens, not marketing pages. Keep the page label compact. */
.rp-content {
  min-width: 0;
  padding: 20px 22px 24px;
}
.rp-content > .rp-page-head,
.rp-content > .rp-page-head.rp-page-head-compact {
  min-height: 40px;
  margin: 0 0 12px;
  gap: 12px;
  align-items: center;
}
.rp-content > .rp-page-head .rp-eyebrow {
  display: none;
}
.rp-content > .rp-page-head h1,
.rp-content > .rp-page-head .rp-title-with-state h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -.01em;
}
.rp-content > .rp-page-head .rp-page-subtitle {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.35;
}
.rp-content > .rp-page-head .rp-head-actions {
  margin-left: auto;
}
.rp-topbar {
  height: 64px;
}

/* Rota should behave like an application grid: both axes scroll inside the grid,
   the date header stays visible, the staff column stays fixed, and the horizontal
   scrollbar remains reachable without travelling to the end of a long page. */
.rp-rota-page-head {
  margin-bottom: 10px !important;
}
.rp-rota-summary {
  gap: 8px;
  margin-bottom: 10px;
}
.rp-rota-summary > div {
  min-height: 54px;
  padding: 9px 12px;
  border-radius: 10px;
  box-shadow: none;
}
.rp-rota-summary span {
  font-size: 12px;
}
.rp-rota-summary strong {
  margin-top: 1px;
  font-size: 16px;
}
.rp-rota-toolbar {
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border-radius: 10px;
  box-shadow: none;
}
.rp-rota-toolbar .rp-secondary-button,
.rp-rota-toolbar .rp-primary-button,
.rp-rota-filters select {
  min-height: 40px;
}
.rp-rota-wrap {
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 275px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
  box-shadow: none;
}
.rp-rota-wrap::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}
.rp-rota-wrap::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 10px;
}
.rp-rota-wrap::-webkit-scrollbar-thumb {
  background: #9aabba;
  border: 3px solid #eef2f7;
  border-radius: 10px;
}
.rp-rota-wrap::-webkit-scrollbar-thumb:hover {
  background: #74889b;
}
.rp-rota-table-live thead th {
  position: sticky;
  top: 0;
  z-index: 8;
  box-shadow: 0 1px 0 #cbd9e8;
}
.rp-rota-table-live thead .rp-sticky-staff {
  z-index: 12 !important;
}
.rp-rota-table-live .rp-sticky-staff {
  box-shadow: 1px 0 0 #cbd9e8;
}

/* Messages and other management modules should begin immediately after a small page label. */
.rp-content > .rp-page-head + .rp-messaging-shell {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .rp-content { padding: 16px; }
  .rp-rota-toolbar { grid-template-columns: 1fr; }
  .rp-rota-filters,
  .rp-rota-actions { justify-content: flex-start; }
  .rp-rota-wrap { max-height: calc(100vh - 235px); }
}

@media (max-width: 760px) {
  .rp-content { padding: 14px 12px 20px; }
  .rp-content > .rp-page-head,
  .rp-content > .rp-page-head.rp-page-head-compact {
    min-height: 34px;
    margin-bottom: 10px;
    align-items: flex-start;
  }
  .rp-content > .rp-page-head h1,
  .rp-content > .rp-page-head .rp-title-with-state h1 {
    font-size: 21px;
  }
  .rp-content > .rp-page-head .rp-page-subtitle {
    font-size: 13px;
  }
  .rp-topbar { height: 60px; }
  .rp-rota-wrap { max-height: none; }
}

/* 0.13.2 - Full-workspace rota correction.
   The rota is a primary management workspace, not a small scroll widget. */
@media (min-width: 861px) {
  .rp-app[data-view="rota"] {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .rp-app[data-view="rota"] .rp-sidebar .rp-brand {
    padding-left: 16px;
    padding-right: 16px;
  }
  .rp-app[data-view="rota"] .rp-nav-item {
    padding-left: 12px;
    padding-right: 12px;
  }
  .rp-app[data-view="rota"] .rp-content {
    padding: 16px 18px 28px;
  }
  .rp-app[data-view="rota"].is-rota-focus {
    grid-template-columns: 78px minmax(0, 1fr);
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-brand {
    justify-content: center;
    padding: 15px 8px;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-brand-copy,
  .rp-app[data-view="rota"].is-rota-focus .rp-nav-item > span:not(.rp-nav-icon),
  .rp-app[data-view="rota"].is-rota-focus .rp-nav-badge,
  .rp-app[data-view="rota"].is-rota-focus .rp-account-mini > div,
  .rp-app[data-view="rota"].is-rota-focus .rp-logout {
    display: none;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-nav {
    padding-left: 8px;
    padding-right: 8px;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-nav-item {
    justify-content: center;
    padding: 11px 8px;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-nav-icon {
    width: 30px;
    font-size: 19px;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-sidebar-footer {
    padding: 12px 8px;
  }
  .rp-app[data-view="rota"].is-rota-focus .rp-account-mini {
    justify-content: center;
  }
}

.rp-rota-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rp-rota-focus-button {
  min-width: 118px;
}

/* Let the staff list use the page height naturally. Only horizontal movement belongs to the grid. */
.rp-rota-wrap {
  max-height: none !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  overscroll-behavior-x: contain;
  scrollbar-gutter: auto;
  box-shadow: none;
}
.rp-rota-table-live {
  min-width: 1060px;
  width: 100%;
}
.rp-rota-table-live th:first-child,
.rp-rota-table-live td:first-child {
  width: 210px;
}
.rp-rota-table-live th:last-child,
.rp-rota-table-live td:last-child {
  width: 84px;
}
.rp-rota-table-live tbody tr {
  min-height: 108px;
}
.rp-rota-cell {
  min-height: 108px;
  padding: 9px !important;
}
.rp-rota-cell-shifts {
  min-height: 72px;
}
.rp-shift-card {
  min-height: 68px;
}
.rp-rota-staff-cell {
  padding: 14px 12px !important;
}
.rp-rota-avatar {
  width: 44px;
  height: 44px;
}
.rp-rota-staff-cell strong {
  font-size: 16px;
}
.rp-rota-staff-cell small {
  font-size: 13px;
}

/* Compact controls, but no tiny type. Keep the working grid high on the screen. */
.rp-rota-summary {
  margin-bottom: 9px;
}
.rp-rota-summary > div {
  min-height: 50px;
  padding: 8px 12px;
}
.rp-rota-summary span {
  font-size: 12px;
}
.rp-rota-summary strong {
  font-size: 16px;
}
.rp-rota-toolbar {
  grid-template-columns: minmax(360px, 1fr) minmax(320px, auto);
  gap: 8px 12px;
  padding: 9px;
  margin-bottom: 10px;
}
.rp-week-navigation {
  justify-content: flex-start;
}
.rp-rota-filters {
  justify-content: flex-end;
}
.rp-rota-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}
.rp-week-label {
  min-width: 190px;
  font-size: 16px;
}
.rp-rota-toolbar .rp-secondary-button,
.rp-rota-toolbar .rp-primary-button,
.rp-rota-filters select {
  min-height: 42px;
}

/* A dedicated scroll rail stays at the bottom of the browser while the wide rota is in view. */
.rp-rota-floating-scroll {
  position: fixed;
  z-index: 45;
  bottom: 8px;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid #b9c7d7;
  border-radius: 9px;
  background: rgba(244, 247, 251, .98);
  box-shadow: 0 5px 18px rgba(15, 49, 91, .16);
}
.rp-rota-floating-scroll[hidden] {
  display: none !important;
}
.rp-rota-floating-scroll-inner {
  height: 1px;
}
.rp-rota-floating-scroll::-webkit-scrollbar {
  height: 16px;
}
.rp-rota-floating-scroll::-webkit-scrollbar-track {
  background: #eef2f7;
  border-radius: 9px;
}
.rp-rota-floating-scroll::-webkit-scrollbar-thumb {
  background: #7f93a8;
  border: 3px solid #eef2f7;
  border-radius: 9px;
}
.rp-rota-floating-scroll::-webkit-scrollbar-thumb:hover {
  background: #61778e;
}

/* WordPress toolbar should not cover the management application header. */
body.admin-bar .rp-topbar {
  top: 32px;
}
@media (max-width: 782px) {
  body.admin-bar .rp-topbar { top: 46px; }
}

@media (max-width: 1180px) and (min-width: 861px) {
  .rp-rota-toolbar {
    grid-template-columns: 1fr;
  }
  .rp-rota-filters,
  .rp-rota-actions {
    justify-content: flex-start;
  }
  .rp-rota-actions {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .rp-rota-focus-button { display: none; }
  .rp-rota-wrap {
    overflow-x: auto !important;
    overflow-y: visible !important;
  }
  .rp-rota-table-live { min-width: 1160px; }
}

@media print {
  .rp-rota-floating-scroll,
  .rp-rota-focus-button { display: none !important; }
}


/* 0.13.3 - Clear management actions and natural rota scrolling. */
.rp-top-action-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #cfdae7;
  border-radius: 11px;
  background: #fff;
  color: var(--rp-text);
  text-decoration: none;
  font-weight: 750;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rp-top-action-link:hover,
.rp-top-action-link:focus-visible {
  border-color: #95bce8;
  background: #f7fbff;
  box-shadow: 0 0 0 3px rgba(22,119,255,.08);
  outline: none;
}
.rp-top-action-link:active { transform: translateY(1px); }
.rp-top-action-icon {
  width: 21px;
  height: 21px;
  display: inline-grid;
  place-items: center;
  color: #123f72;
}
.rp-top-action-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-top-action-label { white-space: nowrap; font-size: 14px; }
.rp-top-message-button { display: inline-flex; }
.rp-top-message-button b {
  top: -7px;
  right: -7px;
}

/* The rota may scroll horizontally, but a normal mouse wheel anywhere over the
   grid should move the management page vertically. JS handles the wheel event
   so the wide schedule never feels like a trapped embedded widget. */
.rp-rota-wrap { touch-action: pan-x pan-y; }

@media (max-width: 1120px) {
  .rp-top-action-link { width: 42px; padding: 0; }
  .rp-top-action-label { display: none; }
}
@media (max-width: 600px) {
  .rp-top-actions .rp-top-action-link { display: inline-flex; }
}


/* 0.13.4 - Operational workspace density polish.
   Management modules should open directly onto the work, not a website-style banner. */
.rp-app[data-view="messages"] .rp-content,
.rp-app[data-view="clients"] .rp-content {
  padding-top: 14px;
}

/* Messages: the workspace itself is the page. */
.rp-app[data-view="messages"] .rp-messaging-shell {
  margin-top: 0;
  min-height: calc(100vh - 102px);
  height: calc(100vh - 102px);
}
body.admin-bar .rp-app[data-view="messages"] .rp-messaging-shell {
  min-height: calc(100vh - 134px);
  height: calc(100vh - 134px);
}
.rp-app[data-view="messages"] .rp-conversations-head {
  min-height: 62px;
  padding: 10px 14px 10px 16px;
}
.rp-app[data-view="messages"] .rp-conversations-head > strong {
  font-size: 19px;
  line-height: 1.2;
}
.rp-app[data-view="messages"] .rp-message-team-button {
  width: auto;
  min-width: 112px;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.rp-app[data-view="messages"] .rp-conversation-empty {
  padding: 12px 16px;
  font-size: 14px;
}
.rp-app[data-view="messages"] .rp-team-directory-head {
  min-height: 46px;
}
.rp-app[data-view="messages"] .rp-chat-placeholder {
  min-height: 0;
  padding: 24px;
}
.rp-app[data-view="messages"] .rp-chat-placeholder h2 {
  margin-top: 0;
}

/* Clients / workplaces: list and add form start together at the top. */
.rp-app[data-view="clients"] .rp-client-module-grid {
  margin-top: 0;
  align-items: start;
}
.rp-app[data-view="clients"] .rp-panel-table > .rp-panel-head {
  padding: 16px 18px 12px;
}
.rp-app[data-view="clients"] .rp-panel-table > .rp-panel-head h2,
.rp-app[data-view="clients"] .rp-client-form-panel h2 {
  font-size: 20px;
}
.rp-app[data-view="clients"] .rp-panel-table > .rp-panel-head p {
  margin-top: 3px;
  font-size: 13px;
}
.rp-app[data-view="clients"] .rp-client-form-panel {
  top: 78px;
  padding: 18px;
}
body.admin-bar .rp-app[data-view="clients"] .rp-client-form-panel {
  top: 110px;
}

@media (max-width: 1100px) {
  .rp-app[data-view="messages"] .rp-messaging-shell,
  body.admin-bar .rp-app[data-view="messages"] .rp-messaging-shell {
    min-height: 620px;
    height: auto;
  }
  .rp-app[data-view="clients"] .rp-client-form-panel,
  body.admin-bar .rp-app[data-view="clients"] .rp-client-form-panel {
    position: static;
    top: auto;
  }
}
.rp-management-correction-badge{display:inline-flex;margin-top:12px;padding:5px 9px;border-radius:999px;background:#fff4d8;border:1px solid #f1d58a;color:#6d5211;font-size:12px;font-weight:800;}

/* 0.13.6 - Compact management dashboard.
   Keep key figures readable while bringing Today's Schedule above the fold. */
.rp-app[data-view="dashboard"] .rp-content {
  padding-top: 18px;
}
.rp-dashboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 8px;
}
.rp-dashboard-head h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -.02em;
}
.rp-dashboard-open-rota {
  min-height: 40px;
  padding-inline: 15px;
}
/* Backward-compatible cleanup if an older dashboard template is cached. */
.rp-app[data-view="dashboard"] > .rp-main-wrap .rp-page-head {
  margin-bottom: 8px;
}
.rp-app[data-view="dashboard"] > .rp-main-wrap .rp-page-head h1 {
  font-size: 22px;
}
.rp-app[data-view="dashboard"] > .rp-main-wrap .rp-page-subtitle {
  display: none;
}
.rp-dashboard-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.rp-dashboard-kpis .rp-kpi-card {
  min-height: 62px;
  padding: 9px 11px;
  border-radius: 10px;
  box-shadow: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label value"
    "meta meta";
  column-gap: 8px;
  row-gap: 2px;
  align-content: center;
}
.rp-dashboard-kpis .rp-kpi-card > span {
  grid-area: label;
  min-width: 0;
  font-size: 13px;
  line-height: 1.15;
  font-weight: 750;
}
.rp-dashboard-kpis .rp-kpi-card > strong {
  grid-area: value;
  margin: 0;
  font-size: 21px;
  line-height: 1;
  text-align: right;
  white-space: nowrap;
}
.rp-dashboard-kpis .rp-kpi-card > small {
  grid-area: meta;
  min-width: 0;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-dashboard-grid {
  gap: 12px;
}
.rp-dashboard-grid > .rp-panel,
.rp-dashboard-side-stack > .rp-panel {
  padding: 16px;
}
.rp-dashboard-shift-list {
  margin-top: 8px;
}
a.rp-dashboard-shift-row {
  color: inherit;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
a.rp-dashboard-shift-row:hover {
  background: #f4f8ff;
}
.rp-dashboard-edit-hint {
  display: block;
  margin-top: 3px !important;
  color: var(--rp-blue) !important;
  font-size: 12px !important;
  font-weight: 800;
  text-align: right;
}
.rp-timesheet-admin-edit {
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--rp-border);
  border-radius: 11px;
  background: #f8fbff;
  display: grid;
  grid-template-columns: auto minmax(150px,190px) minmax(150px,190px) auto;
  gap: 10px;
  align-items: end;
}
.rp-timesheet-admin-edit > strong { align-self: center; }
.rp-timesheet-admin-edit label { font-weight: 750; font-size: 13px; }
.rp-timesheet-admin-edit input {
  display: block;
  width: 100%;
  min-height: 42px;
  margin-top: 5px;
  padding: 0 10px;
  border: 1px solid #bfcce0;
  border-radius: 9px;
  background: #fff;
}
@media (max-width: 1180px) {
  .rp-dashboard-kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .rp-dashboard-head { align-items: center; }
  .rp-dashboard-head h1 { font-size: 21px; }
  .rp-dashboard-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
  .rp-dashboard-kpis .rp-kpi-card { min-height: 60px; }
  .rp-timesheet-admin-edit { grid-template-columns: 1fr 1fr; }
  .rp-timesheet-admin-edit > strong,
  .rp-timesheet-admin-edit button { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .rp-dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .rp-dashboard-kpis .rp-kpi-card { padding: 8px 9px; }
  .rp-dashboard-kpis .rp-kpi-card > strong { font-size: 19px; }
  .rp-timesheet-admin-edit { grid-template-columns: 1fr; }
  .rp-timesheet-admin-edit > strong,
  .rp-timesheet-admin-edit button { grid-column: auto; }
}


/* 0.13.7 - Dashboard visual hierarchy polish.
   Keep the compact layout, but give summary cards and Today's Schedule
   stronger contrast and separation for quick scanning. The values below
   are deliberately variable-driven so management surfaces can be recoloured
   later without rebuilding the templates. */
:root {
  --rp-dashboard-card-bg: #ffffff;
  --rp-dashboard-card-border: #cfdced;
  --rp-dashboard-card-accent: #1677ff;
  --rp-dashboard-card-soft: #f5f9ff;
  --rp-dashboard-panel-accent: #0d315b;
  --rp-dashboard-shift-soft: #f7fbff;
}

.rp-dashboard-kpis .rp-kpi-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--rp-dashboard-card-soft) 100%);
  border: 1px solid var(--rp-dashboard-card-border);
  border-top: 3px solid var(--rp-dashboard-card-accent);
  box-shadow: 0 5px 14px rgba(16, 42, 76, .08);
}
.rp-dashboard-kpis .rp-kpi-card::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(22, 119, 255, .055);
  pointer-events: none;
}
.rp-dashboard-kpis .rp-kpi-card > span {
  color: #425975;
  font-weight: 800;
}
.rp-dashboard-kpis .rp-kpi-card > strong {
  color: #0a2e59;
  font-weight: 850;
  letter-spacing: -.02em;
}
.rp-dashboard-kpis .rp-kpi-card > small {
  color: #64758d;
  font-weight: 600;
}
.rp-dashboard-kpis .rp-kpi-card:nth-child(3),
.rp-dashboard-kpis .rp-kpi-card:nth-child(4) {
  --rp-dashboard-card-soft: #f3f8ff;
}
.rp-dashboard-kpis .rp-kpi-card:nth-child(5) {
  --rp-dashboard-card-soft: #f7fbff;
  --rp-dashboard-card-accent: #0d5fc5;
}
.rp-dashboard-kpis .rp-kpi-card:nth-child(6) {
  --rp-dashboard-card-soft: #fffaf0;
  --rp-dashboard-card-accent: #d69517;
}

.rp-app[data-view="dashboard"] .rp-dashboard-grid > .rp-panel-large {
  position: relative;
  overflow: hidden;
  border: 1px solid #c8d8eb;
  border-top: 4px solid var(--rp-dashboard-panel-accent);
  box-shadow: 0 7px 20px rgba(16, 42, 76, .085);
  background: #fff;
}
.rp-app[data-view="dashboard"] .rp-dashboard-grid > .rp-panel-large > .rp-panel-head {
  margin: -16px -16px 10px;
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, #f7fbff 0%, #f2f7fc 100%);
  border-bottom: 1px solid #dbe6f2;
}
.rp-app[data-view="dashboard"] .rp-dashboard-grid > .rp-panel-large > .rp-panel-head h2 {
  margin: 0 0 2px;
  color: #0d315b;
  font-size: 21px;
  font-weight: 850;
}
.rp-app[data-view="dashboard"] .rp-dashboard-grid > .rp-panel-large > .rp-panel-head p {
  margin: 0;
  color: #5f7188;
  font-weight: 600;
}
.rp-dashboard-shift-list {
  display: grid;
  gap: 8px;
}
a.rp-dashboard-shift-row {
  border: 1px solid #ceddec;
  border-left: 4px solid var(--rp-blue);
  border-radius: 11px;
  background: var(--rp-dashboard-shift-soft);
  padding: 12px 14px;
  box-shadow: 0 2px 7px rgba(16, 42, 76, .045);
}
a.rp-dashboard-shift-row:first-child {
  border-top: 1px solid #ceddec;
}
a.rp-dashboard-shift-row:hover,
a.rp-dashboard-shift-row:focus-visible {
  background: #eef6ff;
  border-color: #a9caee;
  border-left-color: var(--rp-blue-dark);
  outline: none;
  box-shadow: 0 4px 12px rgba(22, 119, 255, .10);
}
.rp-dashboard-shift-row strong {
  color: #102a4c;
  font-weight: 820;
}
.rp-dashboard-shift-time {
  min-width: 124px;
  padding: 7px 10px;
  border-radius: 9px;
  background: #eaf3ff;
  border: 1px solid #c8dcf5;
  color: #0d315b;
  font-weight: 850;
  text-align: right;
}
.rp-dashboard-edit-hint {
  color: #0b61d8 !important;
  font-weight: 850;
}

/* Keep supporting dashboard panels clear without competing with the schedule. */
.rp-app[data-view="dashboard"] .rp-dashboard-side-stack > .rp-panel {
  border-color: #d4dfeb;
  box-shadow: 0 4px 14px rgba(16, 42, 76, .055);
}
.rp-app[data-view="dashboard"] .rp-dashboard-side-stack .rp-panel-head h2 {
  color: #173b66;
  font-weight: 820;
}

@media (max-width: 760px) {
  .rp-dashboard-kpis .rp-kpi-card {
    border-top-width: 3px;
    box-shadow: 0 3px 10px rgba(16, 42, 76, .075);
  }
  .rp-app[data-view="dashboard"] .rp-dashboard-grid > .rp-panel-large > .rp-panel-head {
    margin: -16px -16px 9px;
  }
  .rp-dashboard-shift-time {
    min-width: 0;
    text-align: left;
  }
}

/* 0.13.8 - Staff Portal / PWA purple polish.
   Staff and management palettes remain intentionally separate. */
.rp-staff-app-body {
  --rp-staff-purple: #6d5ce8;
  --rp-staff-purple-dark: #5141c7;
  --rp-staff-purple-soft: #f2efff;
  --rp-staff-purple-softer: #faf8ff;
  --rp-staff-border: #ddd7f7;
  --rp-staff-ink: #211b3f;
  --rp-staff-muted: #6b6681;
  background: #f7f6fb;
  color: var(--rp-staff-ink);
}
.rp-staff-app {
  background:
    radial-gradient(circle at top right, rgba(109,92,232,.08), transparent 30%),
    #f7f6fb;
}
.rp-staff-app-header {
  min-height: 70px;
  background: linear-gradient(90deg, #fff 0%, #fbf9ff 100%);
  border-bottom: 1px solid var(--rp-staff-border);
  box-shadow: 0 4px 18px rgba(66,52,125,.06);
}
.rp-staff-app-brand img,
.rp-staff-app-brand .rp-brand-mark {
  box-shadow: 0 7px 18px rgba(83,65,199,.15);
}
.rp-staff-app-brand strong { color: var(--rp-staff-ink); }
.rp-staff-app-brand small { color: var(--rp-staff-muted); }
.rp-staff-header-identity > span {
  background: var(--rp-staff-purple-soft);
  color: var(--rp-staff-purple-dark);
}
.rp-staff-install-button {
  background: var(--rp-staff-purple-soft);
  border-color: #cfc7fb;
  color: var(--rp-staff-purple-dark);
}
.rp-staff-logout { color: #554f66; }

.rp-staff-app-layout { width: min(1240px, 100%); }
.rp-staff-side-nav {
  padding: 20px 12px;
  border-right: 1px solid var(--rp-staff-border);
  background: rgba(255,255,255,.92);
}
.rp-staff-side-nav a {
  min-height: 54px;
  color: #514c65;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.rp-staff-side-nav a:hover {
  background: #f7f5ff;
  border-color: #e3defa;
}
.rp-staff-side-nav a.is-active {
  background: linear-gradient(90deg, #eeeaff 0%, #f7f5ff 100%);
  border-color: #d8d0ff;
  color: var(--rp-staff-purple-dark);
  box-shadow: inset 3px 0 0 var(--rp-staff-purple);
}
.rp-staff-nav-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f2f0f8;
  color: #625c73;
}
.rp-staff-nav-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rp-staff-side-nav a.is-active .rp-staff-nav-icon {
  background: var(--rp-staff-purple);
  color: #fff;
  box-shadow: 0 6px 14px rgba(81,65,199,.18);
}
.rp-staff-side-nav a > span { width: auto; height: auto; background: transparent; font-size: inherit; }
.rp-staff-side-nav a.is-active > span { background: transparent; color: inherit; }
.rp-staff-side-nav a.is-active > .rp-staff-nav-icon { background: var(--rp-staff-purple); color: #fff; }

.rp-staff-app-main { padding: 24px clamp(16px,3vw,30px) 58px; }
.rp-staff-welcome { margin-bottom: 16px; }
.rp-staff-welcome p { margin-bottom: 3px; color: var(--rp-staff-muted); font-size: 14px; }
.rp-staff-welcome h1 {
  font-size: clamp(27px,3vw,34px);
  color: var(--rp-staff-ink);
  letter-spacing: -.02em;
}
.rp-staff-page-title {
  margin: 0 0 14px;
  padding: 0;
}
.rp-staff-page-title h1 {
  margin: 0;
  font-size: clamp(25px,3vw,31px);
  line-height: 1.15;
  color: var(--rp-staff-ink);
  letter-spacing: -.02em;
}
.rp-staff-page-title p { display: none; }

.rp-staff-home-priority {
  display: grid;
  grid-template-columns: minmax(0,1.15fr) minmax(0,.85fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}
.rp-staff-home-priority .rp-staff-mobile-panel { margin-bottom: 0; }
.rp-staff-mobile-panel {
  border-color: var(--rp-staff-border);
  border-radius: 15px;
  box-shadow: 0 8px 24px rgba(72,56,135,.055);
}
.rp-staff-today-panel {
  border: 1px solid #cec5fb;
  border-top: 4px solid var(--rp-staff-purple);
  background: linear-gradient(180deg, #fff 0%, #faf8ff 100%);
  box-shadow: 0 12px 28px rgba(81,65,199,.09);
}
.rp-staff-next-panel {
  border-color: #ded9f8;
  background: linear-gradient(180deg, #fff 0%, #fcfbff 100%);
}
.rp-staff-week-panel { background: rgba(255,255,255,.96); }
.rp-staff-section-head { margin-bottom: 12px; }
.rp-staff-section-head h2 { color: var(--rp-staff-ink); font-size: 19px; }
.rp-staff-section-head a { color: var(--rp-staff-purple-dark); }

.rp-staff-shift-card {
  grid-template-columns: 112px minmax(0,1fr) auto;
  border-color: #d9d3f5;
  border-left: 4px solid var(--rp-staff-purple);
  background: #fff;
  box-shadow: 0 5px 14px rgba(64,50,122,.05);
}
.rp-staff-shift-date { color: #625b76; }
.rp-staff-shift-main strong,
.rp-staff-shift-time { color: var(--rp-staff-ink); }
.rp-staff-shift-main span { color: var(--rp-staff-muted); }
.rp-staff-shift-action a,
.rp-staff-rota-action a {
  min-height: 42px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 9px;
  background: var(--rp-staff-purple);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}

.rp-staff-week-list { border-color: #ddd8ef; background: #fff; }
.rp-staff-week-row { border-color: #ece8f6; }
.rp-staff-week-row.is-today {
  background: linear-gradient(90deg, #f0edff 0%, #faf9ff 100%);
  box-shadow: inset 4px 0 0 var(--rp-staff-purple);
}
.rp-staff-week-day { border-color: #e5e0f5; }
.rp-staff-week-shifts div strong { color: var(--rp-staff-ink); }
.rp-staff-week-shifts div span,
.rp-staff-no-shift { color: var(--rp-staff-muted); }

.rp-staff-week-nav {
  border-color: var(--rp-staff-border);
  background: #fff;
  box-shadow: 0 5px 16px rgba(72,56,135,.045);
}
.rp-staff-week-nav a {
  border-color: #d7d0f4;
  color: var(--rp-staff-purple-dark);
  background: #faf9ff;
}
.rp-staff-rota-list { border-color: var(--rp-staff-border); }
.rp-staff-rota-item { border-color: #ebe7f4; }
.rp-staff-rota-item:hover { background: #faf9ff; }
.rp-staff-rota-place strong,
.rp-staff-rota-time { color: var(--rp-staff-ink); }
.rp-staff-rota-date span,
.rp-staff-rota-place span { color: var(--rp-staff-muted); }

.rp-staff-hours-summary { gap: 12px; margin-bottom: 14px; }
.rp-staff-hours-summary article {
  min-height: 96px;
  padding: 16px 18px;
  border-color: #d8d1f6;
  background: linear-gradient(180deg, #fff 0%, #f8f6ff 100%);
  box-shadow: 0 8px 20px rgba(80,61,154,.07);
}
.rp-staff-hours-summary span { color: var(--rp-staff-muted); }
.rp-staff-hours-summary strong {
  margin-top: 6px;
  color: var(--rp-staff-purple-dark);
  font-size: 27px;
}
.rp-timesheet-due-list a,
.rp-staff-timesheet-list a {
  border-color: #dfdaf3;
  background: #fff;
}
.rp-timesheet-due-list a:hover,
.rp-staff-timesheet-list a:hover { background: #faf9ff; }

.rp-timesheet-entry-panel {
  border-top: 4px solid var(--rp-staff-purple);
  max-width: 760px;
}
.rp-timesheet-shift-reference {
  border-color: #d9d2f6;
  background: #f9f7ff;
}
.rp-timesheet-simple-form input[type="time"],
.rp-client-sign-form input[type="text"],
.rp-timesheet-simple-form textarea,
.rp-no-signature-box textarea {
  border-color: #bbb1eb;
  background: #fff;
}
.rp-timesheet-complete-button,
.rp-client-confirm-button {
  background: var(--rp-staff-purple);
  border-color: var(--rp-staff-purple);
}
.rp-timesheet-complete-button:hover,
.rp-client-confirm-button:hover { background: var(--rp-staff-purple-dark); }

.rp-client-confirmation-head { margin-bottom: 12px; }
.rp-client-confirmation-head p {
  margin: 0 0 4px;
  color: var(--rp-staff-purple-dark);
  font-size: 14px;
}
.rp-client-confirmation-head h1 {
  font-size: clamp(24px,3vw,31px);
  color: var(--rp-staff-ink);
}
.rp-client-sign-panel {
  border-color: #cfc6f5;
  box-shadow: 0 14px 34px rgba(81,65,199,.09);
}
.rp-client-timesheet-summary > div {
  border-color: #e0daf5;
  background: #faf9ff;
}
.rp-client-timesheet-summary strong { color: var(--rp-staff-ink); }
.rp-signature-canvas {
  border-color: #9487d8;
  box-shadow: inset 0 0 0 1px rgba(109,92,232,.05);
}
.rp-no-signature-box { border-color: #e0dbef; }

.rp-staff-latest-notice { border-left: 0; border-top: 4px solid var(--rp-staff-purple); }
.rp-staff-notice-preview,
.rp-staff-notice-list > a.is-unread {
  background: #f8f6ff;
  border-color: #ddd7f8;
}
.rp-staff-notice-preview > b,
.rp-staff-notice-list > a > b {
  background: #e9e4ff;
  color: var(--rp-staff-purple-dark);
}
.rp-staff-notice-detail { border-top-color: var(--rp-staff-purple); }

.rp-staff-app .rp-messaging-shell-staff {
  border: 1px solid var(--rp-staff-border);
  box-shadow: 0 10px 28px rgba(72,56,135,.06);
  overflow: hidden;
}
.rp-staff-app .rp-conversations-panel { background: #fcfbff; border-color: var(--rp-staff-border); }
.rp-staff-app .rp-conversations-head,
.rp-staff-app .rp-chat-head,
.rp-staff-app .rp-message-compose { border-color: var(--rp-staff-border); }
.rp-staff-app .rp-message-new-button,
.rp-staff-app .rp-message-compose .rp-primary-button { background: var(--rp-staff-purple); }
.rp-staff-app .rp-conversation-row:hover,
.rp-staff-app .rp-conversation-row.is-active,
.rp-staff-app .rp-team-directory-list > a:hover,
.rp-staff-app .rp-team-directory-list > a.is-active { background: #f1eeff; }
.rp-staff-app .rp-conversation-bottom b { background: var(--rp-staff-purple); }
.rp-staff-app .rp-message-initials { background: #ece8ff; color: var(--rp-staff-purple-dark); }
.rp-staff-app .rp-chat-messages { background: #f8f7fc; }
.rp-staff-app .rp-message-bubble.is-mine {
  background: #eeeaff;
  border-color: #d6cff8;
}
.rp-staff-app .rp-message-compose textarea:focus {
  border-color: var(--rp-staff-purple);
  outline-color: rgba(109,92,232,.13);
}
.rp-staff-app .rp-team-directory-head span { background: #eeeaff; color: var(--rp-staff-purple-dark); }

.rp-staff-app .rp-documents-panel,
.rp-staff-app .rp-document-upload-panel,
.rp-staff-app .rp-panel {
  border-color: var(--rp-staff-border);
}
.rp-staff-app .rp-document-upload-panel { box-shadow: 0 8px 22px rgba(72,56,135,.06); }
.rp-staff-app .rp-primary-button { background: var(--rp-staff-purple); }
.rp-staff-app .rp-primary-button:hover { background: var(--rp-staff-purple-dark); }

@media (max-width: 900px) {
  .rp-staff-home-priority { grid-template-columns: 1fr; }
  .rp-staff-app-main { padding: 18px 14px 106px; }
  .rp-staff-welcome h1 { font-size: 28px; }
  .rp-staff-page-title h1 { font-size: 25px; }
  .rp-staff-bottom-nav {
    background: rgba(255,255,255,.97);
    border-top-color: #d9d3f1;
    box-shadow: 0 -10px 28px rgba(72,56,135,.10);
  }
  .rp-staff-bottom-nav a { color: #6c667d; }
  .rp-staff-bottom-nav a.is-active {
    background: #efebff;
    color: var(--rp-staff-purple-dark);
  }
  .rp-staff-bottom-nav .rp-staff-nav-icon {
    width: 28px;
    height: 28px;
    background: transparent;
  }
  .rp-staff-bottom-nav a.is-active .rp-staff-nav-icon {
    background: var(--rp-staff-purple);
    color: #fff;
  }
  .rp-staff-app-header { min-height: 64px; padding: 8px 12px; }
  .rp-staff-app-brand img { width: 40px; height: 40px; }
  .rp-staff-app-brand strong { font-size: 17px; }
  .rp-staff-app-brand small { display: none; }
  .rp-staff-install-button { min-height: 40px; padding: 0 11px; }
  .rp-staff-logout { display: none; }
  .rp-staff-shift-card { grid-template-columns: 1fr auto; gap: 8px 12px; padding: 14px; }
  .rp-staff-shift-date { grid-column: 1 / -1; font-size: 14px; }
  .rp-staff-shift-main strong { font-size: 18px; }
  .rp-staff-shift-time { font-size: 17px; }
}

@media (max-width: 560px) {
  .rp-staff-header-actions { gap: 6px; }
  .rp-staff-header-identity img,
  .rp-staff-header-identity > span { width: 36px; height: 36px; }
  .rp-staff-install-button { font-size: 13px; }
  .rp-staff-mobile-panel { padding: 15px; border-radius: 13px; }
  .rp-staff-hours-summary { grid-template-columns: 1fr 1fr; }
  .rp-staff-hours-summary article { min-height: 84px; padding: 13px; }
  .rp-staff-hours-summary strong { font-size: 23px; }
  .rp-client-timesheet-summary { grid-template-columns: 1fr; gap: 8px; }
  .rp-client-timesheet-summary > div { min-height: 62px; padding: 11px 12px; }
  .rp-signature-canvas { height: 190px; }
}


/* 0.13.10 - manageable activity + pinned notices */
.rp-activity-actions { width: 54px; text-align: right; }
.rp-activity-delete-button { min-height: 36px; padding: 0 11px; border: 1px solid #e7c6c6; border-radius: 9px; background: #fff; color: #a22c2c; font-size: 13px; font-weight: 800; cursor: pointer; }
.rp-activity-delete-button:hover { background: #fff3f3; border-color: #dca7a7; }
.rp-notice-pin-choice { display: flex !important; align-items: center; gap: 10px; min-height: 44px; margin: 0 !important; font-weight: 800; color: #263650; }
.rp-notice-pin-choice input { width: 20px; height: 20px; margin: 0; }
.rp-management-notice-card.is-pinned { border-color: #cfc5ff; box-shadow: 0 8px 20px rgba(82,63,171,.08); }
.rp-management-notice-heading { min-width: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.rp-pinned-badge, .rp-notice-list-pin, .rp-staff-detail-pinned { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 9px; border-radius: 999px; background: #eeeaff; color: #4e3eaf; font-size: 12px; font-weight: 900; letter-spacing: .01em; }
.rp-management-notice-actions { display: flex; align-items: center; gap: 12px; }
.rp-management-notice-actions form { margin: 0; }
.rp-text-button { border: 0; background: transparent; color: #315b94; font-weight: 800; cursor: pointer; padding: 4px; }
.rp-text-button:hover { text-decoration: underline; }
.rp-staff-pinned-zone { display: grid; gap: 10px; margin: 0 0 14px; }
.rp-staff-pinned-zone:empty { display: none; }
.rp-staff-pinned-notice { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 12px; align-items: center; min-height: 68px; padding: 12px 14px; border: 2px solid #cfc6ff; border-radius: 14px; background: linear-gradient(135deg,#fbfaff 0%,#f3f0ff 100%); color: #1f2440; text-decoration: none; box-shadow: 0 8px 22px rgba(77,59,157,.08); }
.rp-staff-pinned-notice:hover { border-color: #a89bf3; background: #f5f2ff; }
.rp-staff-pin-icon { width: 38px; height: 38px; border-radius: 11px; background: var(--rp-staff-purple); color: #fff; display: grid; place-items: center; font-size: 19px; font-weight: 900; }
.rp-staff-pinned-copy { min-width: 0; }
.rp-staff-pinned-copy strong, .rp-staff-pinned-copy small { display: block; }
.rp-staff-pinned-copy strong { font-size: 16px; line-height: 1.25; }
.rp-staff-pinned-copy small { margin-top: 3px; color: #626a82; font-size: 14px; line-height: 1.35; }
.rp-staff-pinned-label { border-radius: 999px; background: #e8e2ff; color: #4d3ba8; padding: 5px 9px; font-size: 12px; font-weight: 900; }
.rp-staff-detail-pinned { margin-left: 8px; vertical-align: middle; }
@media (max-width: 680px) {
  .rp-staff-pinned-notice { grid-template-columns: 38px minmax(0,1fr); padding: 11px 12px; }
  .rp-staff-pinned-label { grid-column: 2; justify-self: start; margin-top: -3px; }
  .rp-management-notice-actions { justify-content: flex-start; }
}

/* 0.13.11 - Staff Portal compact polish.
   Keep staff work visible immediately and preserve the light-purple app identity. */
.rp-staff-app-body {
  --rp-staff-purple: #6d5ce8;
  --rp-staff-purple-dark: #5141c7;
  --rp-staff-purple-soft: #f2efff;
  --rp-staff-purple-softer: #faf8ff;
  --rp-staff-border: #ddd7f7;
  --rp-staff-ink: #211b3f;
  --rp-staff-muted: #6b6681;
}

/* Compact application chrome: useful content should begin quickly. */
.rp-staff-app-header {
  min-height: 60px;
  padding: 6px clamp(14px,3vw,24px);
  background: linear-gradient(90deg,#fff 0%,#faf8ff 100%);
  border-bottom: 1px solid #d9d2f6;
  box-shadow: 0 3px 14px rgba(72,56,135,.055);
}
.rp-staff-app-brand { gap: 9px; }
.rp-staff-app-brand img,
.rp-staff-app-brand .rp-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}
.rp-staff-app-brand strong { font-size: 17px; }
.rp-staff-app-brand small { margin-top: 0; font-size: 12px; }
.rp-staff-header-identity img,
.rp-staff-header-identity > span { width: 34px; height: 34px; }
.rp-staff-header-identity strong { font-size: 14px; }
.rp-staff-install-button,
.rp-staff-logout { min-height: 38px; padding: 0 11px; font-size: 13px; }

.rp-staff-app-layout { grid-template-columns: 205px minmax(0,1fr); }
.rp-staff-side-nav {
  top: 60px;
  height: calc(100vh - 60px);
  padding: 14px 10px;
}
.rp-staff-side-nav a {
  min-height: 46px;
  padding: 7px 10px;
  margin: 2px 0;
}
.rp-staff-nav-icon { width: 28px; height: 28px; flex-basis: 28px; }
.rp-staff-nav-icon svg { width: 18px; height: 18px; }
.rp-staff-side-nav a strong { font-size: 14px; }
.rp-staff-app-main { padding: 14px clamp(14px,2.6vw,24px) 44px; }

/* Home greeting becomes a slim context row, not a banner. */
.rp-staff-welcome {
  min-height: 38px;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.rp-staff-welcome h1 {
  margin: 0;
  font-size: clamp(22px,2.2vw,27px);
  line-height: 1.1;
}
.rp-staff-welcome p {
  margin: 0;
  color: var(--rp-staff-muted);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

/* Other staff pages retain a clear label but do not consume working space. */
.rp-staff-page-title { margin: 0 0 8px; }
.rp-staff-page-title h1 {
  font-size: clamp(21px,2.1vw,25px);
  line-height: 1.1;
}

.rp-staff-home-priority { gap: 10px; margin-bottom: 10px; }
.rp-staff-mobile-panel {
  padding: 14px;
  border-radius: 13px;
  margin-bottom: 10px;
  box-shadow: 0 6px 18px rgba(72,56,135,.055);
}
.rp-staff-today-panel {
  border-top-width: 3px;
  box-shadow: 0 8px 22px rgba(81,65,199,.085);
}
.rp-staff-section-head { margin-bottom: 8px; }
.rp-staff-section-head h2 { font-size: 17px; }
.rp-staff-section-head a { font-size: 13px; }
.rp-staff-shift-card {
  grid-template-columns: 98px minmax(0,1fr) auto;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 11px;
  border-left-width: 3px;
}
.rp-staff-shift-date { font-size: 13px; }
.rp-staff-shift-main strong { font-size: 17px; }
.rp-staff-shift-main span { margin-top: 2px; font-size: 13px; }
.rp-staff-shift-time { font-size: 16px; }
.rp-staff-shift-action a,
.rp-staff-rota-action a { min-height: 36px; padding: 0 11px; font-size: 13px; }
.rp-staff-week-row { min-height: 58px; }
.rp-staff-week-day { padding: 9px 12px; }
.rp-staff-week-day strong { font-size: 14px; }
.rp-staff-week-day span { font-size: 12px; }
.rp-staff-week-shifts { padding: 9px 12px; gap: 4px; }
.rp-staff-week-shifts div strong { font-size: 14px; }
.rp-staff-week-shifts div span,
.rp-staff-no-shift { font-size: 13px; }

/* Pinned management notices remain above every staff page and stay prominent. */
.rp-staff-pinned-zone { margin-bottom: 10px; }
.rp-staff-pinned-notice {
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg,#fbfaff 0%,#f1edff 100%);
}
.rp-staff-pin-icon { width: 34px; height: 34px; border-radius: 10px; }
.rp-staff-pinned-copy strong { font-size: 15px; }
.rp-staff-pinned-copy small { font-size: 13px; }

/* Messages: no second page banner. The actual messaging workspace starts immediately. */
.rp-staff-app-main[data-staff-view="messages"] { padding-top: 10px; }
.rp-staff-app-main[data-staff-view="messages"] > .rp-staff-pinned-zone:empty + .rp-alert + .rp-messaging-shell,
.rp-staff-app-main[data-staff-view="messages"] > .rp-messaging-shell { margin-top: 0; }
.rp-staff-app .rp-messaging-shell-staff {
  min-height: 600px;
  border-color: #d7cff8;
  border-radius: 13px;
  box-shadow: 0 8px 24px rgba(72,56,135,.07);
}
.rp-staff-app .rp-conversations-head {
  min-height: 58px;
  padding: 10px 12px;
  background: linear-gradient(90deg,#f4f0ff 0%,#fbfaff 100%);
}
.rp-staff-app .rp-conversations-head > strong {
  margin: 0;
  color: var(--rp-staff-purple-dark);
  font-size: 18px;
}
.rp-staff-app .rp-message-team-button {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
}
.rp-staff-app .rp-conversation-empty { padding: 14px 12px; font-size: 13px; }
.rp-staff-app .rp-team-directory-head {
  min-height: 40px;
  padding: 7px 12px;
  background: #fcfbff;
}
.rp-staff-app .rp-team-directory-list > a {
  min-height: 52px;
  padding: 7px 11px;
}
.rp-staff-app .rp-message-avatar-small { width: 34px; height: 34px; }
.rp-staff-app .rp-chat-head {
  min-height: 58px;
  padding: 8px 14px;
  background: #fdfcff;
}
.rp-staff-app .rp-message-avatar-large { width: 40px; height: 40px; }
.rp-staff-app .rp-chat-person strong { font-size: 15px; }
.rp-staff-app .rp-chat-person small { font-size: 12px; }
.rp-staff-app .rp-chat-messages { padding: 16px; background: #faf9fe; }
.rp-staff-app .rp-message-compose { padding: 10px 12px; background: #fff; }
.rp-staff-app .rp-message-compose textarea {
  min-height: 44px;
  padding: 9px 11px;
  border-color: #c9c1ee;
}
.rp-staff-app .rp-message-compose .rp-primary-button { min-height: 44px; }
.rp-staff-app .rp-chat-placeholder { min-height: 500px; }
.rp-staff-app .rp-chat-placeholder h2 { color: var(--rp-staff-purple-dark); }

/* Rota, timesheets, notices and documents use the same compact rhythm. */
.rp-staff-week-nav { margin-bottom: 9px; padding: 7px; }
.rp-staff-week-nav a { min-height: 38px; }
.rp-staff-rota-item { padding: 13px 16px; }
.rp-staff-hours-summary { margin-bottom: 10px; }
.rp-staff-hours-summary article { min-height: 82px; padding: 13px 15px; }
.rp-staff-hours-summary strong { font-size: 24px; }
.rp-staff-notice-list > a { padding-top: 11px; padding-bottom: 11px; }

@media (max-width: 900px) {
  .rp-staff-app-layout { grid-template-columns: 1fr; }
  .rp-staff-app-main { padding: 12px 12px 104px; }
  .rp-staff-welcome { min-height: 34px; }
  .rp-staff-welcome h1 { font-size: 23px; }
  .rp-staff-page-title h1 { font-size: 22px; }
  .rp-staff-app .rp-messaging-shell-staff { min-height: 0; }
}

@media (max-width: 560px) {
  .rp-staff-app-header { min-height: 58px; padding: 6px 10px; }
  .rp-staff-app-brand img,
  .rp-staff-app-brand .rp-brand-mark { width: 36px; height: 36px; }
  .rp-staff-header-identity strong { display: none; }
  .rp-staff-welcome { align-items: flex-start; flex-direction: column; gap: 2px; }
  .rp-staff-mobile-panel { padding: 12px; }
  .rp-staff-shift-card { grid-template-columns: 1fr auto; padding: 11px; }
  .rp-staff-app-main[data-staff-view="messages"] { padding-top: 8px; }
  .rp-staff-app .rp-conversations-head { min-height: 54px; }
  .rp-staff-app .rp-chat-placeholder { min-height: 340px; }
}

/* 0.13.14 - Messaging workspace polish.
   Messaging behaves like an application workspace: contact list and thread scroll
   independently, while the composer remains visible at all times. */
.rp-chat-mobile-back { display: none; }

@media (min-width: 701px) {
  .rp-messaging-shell {
    overflow: hidden;
  }
  .rp-conversations-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }
  .rp-conversations-head,
  .rp-conversation-empty { flex: 0 0 auto; }
  .rp-conversation-list {
    flex: 0 1 34%;
    min-height: 0;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rp-team-directory {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .rp-team-directory-head { flex: 0 0 auto; }
  .rp-team-directory-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rp-chat-panel {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .rp-chat-messages {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .rp-message-compose {
    position: relative;
    z-index: 3;
    box-shadow: 0 -8px 22px rgba(21,35,59,.06);
  }
  .rp-message-compose textarea { resize: none; }

  /* Management and staff share the same compact interaction model. */
  .rp-app[data-view="messages"] .rp-messaging-shell {
    grid-template-columns: 300px minmax(0,1fr);
  }
  .rp-app[data-view="messages"] .rp-chat-head {
    min-height: 58px;
    padding: 8px 16px;
  }
  .rp-app[data-view="messages"] .rp-message-avatar-large {
    width: 40px;
    height: 40px;
  }

  /* Staff messages fill the visible workspace below the header.  Pinned notices
     consume only their own height; the chat automatically shrinks underneath. */
  .rp-staff-app-main[data-staff-view="messages"] {
    box-sizing: border-box;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 10px;
  }
  body.admin-bar .rp-staff-app-main[data-staff-view="messages"] {
    height: calc(100vh - 92px);
    height: calc(100dvh - 92px);
  }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-staff-pinned-zone,
  .rp-staff-app-main[data-staff-view="messages"] > .rp-alert {
    flex: 0 0 auto;
  }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-staff-pinned-zone {
    max-height: 148px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-messaging-shell {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
  }
  .rp-staff-app .rp-messaging-shell-staff {
    grid-template-columns: 300px minmax(0,1fr);
    min-height: 0;
  }
  .rp-staff-app .rp-chat-head {
    border-bottom-color: #ded8f6;
    background: linear-gradient(90deg,#fff 0%,#faf8ff 100%);
    box-shadow: 0 4px 14px rgba(76,61,145,.045);
  }
  .rp-staff-app .rp-chat-messages {
    background: linear-gradient(180deg,#fbfaff 0%,#f7f5fd 100%);
  }
  .rp-staff-app .rp-message-compose {
    border-top-color: #ded8f6;
    background: #fcfbff;
    box-shadow: 0 -8px 22px rgba(76,61,145,.07);
  }
  .rp-staff-app .rp-message-bubble.is-mine {
    background: #eeeaff;
    border-color: #d8cffc;
  }
  .rp-staff-app .rp-conversation-row:hover,
  .rp-staff-app .rp-conversation-row.is-active,
  .rp-staff-app .rp-team-directory-list > a:hover,
  .rp-staff-app .rp-team-directory-list > a.is-active {
    background: #f1eeff;
  }
}

/* Mobile/PWA: list first, then a focused conversation screen. */
@media (max-width: 900px) {
  .rp-staff-app-main[data-staff-view="messages"] {
    box-sizing: border-box;
    height: calc(100vh - 138px);
    height: calc(100dvh - 138px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 8px;
  }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-staff-pinned-zone,
  .rp-staff-app-main[data-staff-view="messages"] > .rp-alert { flex: 0 0 auto; }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-staff-pinned-zone {
    max-height: 124px;
    overflow-y: auto;
  }
  .rp-staff-app-main[data-staff-view="messages"] > .rp-messaging-shell {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
  }
  .rp-staff-app .rp-messaging-shell-staff {
    min-height: 0;
    height: 100%;
  }
}

@media (max-width: 700px) {
  .rp-messaging-shell.has-selection .rp-conversations-panel { display: none; }
  .rp-messaging-shell.no-selection .rp-chat-panel { display: none; }
  .rp-messaging-shell.has-selection .rp-chat-panel {
    display: grid;
    height: 100%;
    min-height: 0;
  }
  .rp-messaging-shell.no-selection .rp-conversations-panel {
    display: flex;
    height: 100%;
    min-height: 0;
  }
  .rp-chat-mobile-back {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #d7ddea;
    border-radius: 10px;
    background: #fff;
    color: var(--rp-text);
    text-decoration: none;
    font-size: 25px;
    line-height: 1;
  }
  .rp-chat-head { gap: 9px; }
  .rp-conversation-list,
  .rp-team-directory-list {
    max-height: none;
    min-height: 0;
    overflow-y: auto;
  }
  .rp-team-directory {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .rp-team-directory-list { flex: 1 1 auto; }
  .rp-chat-messages {
    min-height: 0;
    padding: 12px;
    overflow-y: auto;
  }
  .rp-message-compose {
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px;
    padding: 8px;
  }
  .rp-message-compose textarea {
    min-height: 42px;
    max-height: 96px;
    resize: none;
  }
  .rp-message-compose .rp-primary-button {
    width: auto;
    min-width: 74px;
    min-height: 42px;
  }
}

/* 0.13.14 - Messaging workspace + permanent management contact.
   Staff should always be able to find management immediately. Management threads
   stay above ordinary team conversations, and the message composer remains in-view. */
.rp-management-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e9e4ff;
  color: #4e3eaf;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.4;
  vertical-align: middle;
}
.rp-conversation-row.is-management {
  border-left: 3px solid #6d5ce8;
  background: #faf8ff;
}
.rp-conversation-row.is-management:hover,
.rp-conversation-row.is-management.is-active {
  background: #f1edff;
}
.rp-management-directory {
  flex: 0 0 auto;
  border-top: 0;
  border-bottom: 1px solid #ddd7f7;
  background: #faf8ff;
}
.rp-management-directory-head {
  min-height: 38px !important;
  background: #f4f0ff !important;
}
.rp-management-directory-head strong {
  color: #4e3eaf !important;
}
.rp-management-directory-head span {
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  padding: 4px 8px;
  background: #e9e4ff !important;
  color: #4e3eaf !important;
  font-size: 10px !important;
}
.rp-management-directory-list {
  max-height: 118px !important;
  border-top-color: #ded7fb !important;
  overflow-y: auto;
}
.rp-management-directory-list > a,
.rp-new-message-contacts a.is-management-contact {
  background: #fbf9ff;
  border-left: 3px solid #6d5ce8;
}
.rp-management-directory-list > a:hover,
.rp-management-directory-list > a.is-active,
.rp-new-message-contacts a.is-management-contact:hover {
  background: #f1edff;
}
.rp-chat-head.is-management-chat {
  background: linear-gradient(90deg,#f5f1ff 0%,#fcfbff 100%) !important;
  border-bottom-color: #d8d0fb !important;
}
.rp-chat-head.is-management-chat .rp-message-avatar,
.rp-chat-head.is-management-chat .rp-message-initials {
  box-shadow: 0 0 0 3px #ece7ff;
}

/* The left column must remain compact even with the permanent Management row. */
@media (min-width: 701px) {
  .rp-conversations-panel > .rp-management-directory + .rp-team-directory {
    flex: 1 1 auto;
    min-height: 0;
  }
  .rp-conversations-panel > .rp-management-directory + .rp-team-directory .rp-team-directory-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
}

@media (max-width: 700px) {
  .rp-management-directory-list { max-height: none !important; }
  .rp-management-chip { font-size: 9px; margin-left: 5px; }
}


/* 0.13.15 - Private staff hours + safe signature handover. */
.rp-staff-page-title-actions {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
}
.rp-staff-page-title-actions > div { min-width:0; }
.rp-staff-title-close {
  display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:0 18px;
  border:1px solid #d6cff5; border-radius:12px; background:#fff; color:var(--rp-staff-purple-dark);
  text-decoration:none; font-weight:850; box-shadow:0 4px 12px rgba(72,56,135,.05);
}
.rp-staff-title-close:hover { background:#f5f1ff; }

.rp-private-hours-note {
  margin:-2px 0 14px; color:#625d72; font-size:14px; line-height:1.45;
}
.rp-staff-hours-private {
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:900px;
}
.rp-staff-hours-private article {
  min-height:94px; border-color:#d8cff8; background:linear-gradient(145deg,#fff 0%,#f8f5ff 100%);
  box-shadow:0 8px 20px rgba(79,56,152,.06);
}
.rp-staff-hours-private strong { color:var(--rp-staff-purple-dark); }

/* While a supervisor is signing, remove every private staff navigation surface. */
body.rp-timesheet-handover-body { background:#f6f4fb; }
.rp-staff-app.is-handover { min-height:100vh; background:#f6f4fb; }
.rp-staff-app-layout.is-handover {
  display:block; width:min(760px,100%); min-height:100vh; margin:0 auto; padding:28px 18px;
}
.rp-staff-app-layout.is-handover .rp-staff-app-main {
  width:100%; padding:0;
}
.rp-staff-app-layout.is-handover .rp-client-confirmation-head {
  max-width:720px; margin:0 auto 14px; text-align:center;
}
.rp-client-confirmation-head > span {
  display:block; margin-top:7px; color:#6e687d; font-size:13px; line-height:1.4;
}
.rp-staff-app-layout.is-handover .rp-client-sign-panel {
  max-width:720px; margin:0 auto; background:#fff; border:1px solid #d7d0f2;
  box-shadow:0 18px 46px rgba(58,42,116,.10);
}
.rp-staff-app-layout.is-handover .rp-client-timesheet-summary {
  background:#faf8ff; border-color:#ddd6f5;
}
.rp-staff-app-layout.is-handover .rp-client-timesheet-summary > div {
  background:#fff; border-color:#e4def6;
}
.rp-handover-complete {
  max-width:620px; margin:8vh auto 0; padding:34px 28px; text-align:center;
  background:#fff; border:1px solid #d8d1f3; border-radius:22px; box-shadow:0 18px 50px rgba(59,43,116,.10);
}
.rp-handover-success-mark {
  width:64px; height:64px; margin:0 auto 16px; display:grid; place-items:center; border-radius:50%;
  background:#e8f7ef; color:#178b55; font-size:32px; font-weight:900;
}
.rp-handover-complete h1 { margin:0 0 8px; color:#17122f; font-size:30px; }
.rp-handover-complete p { margin:0 0 22px; color:#625d72; font-size:16px; }
.rp-handover-complete .rp-primary-button { display:inline-flex; text-decoration:none; align-items:center; justify-content:center; }

@media (max-width:700px) {
  .rp-staff-hours-private { grid-template-columns:1fr; }
  .rp-staff-hours-private article { min-height:78px; }
  .rp-staff-app-layout.is-handover { padding:16px 10px; }
  .rp-staff-app-layout.is-handover .rp-client-sign-panel { padding:14px; border-radius:15px; }
  .rp-handover-complete { margin-top:5vh; padding:28px 18px; border-radius:18px; }
  .rp-handover-complete h1 { font-size:26px; }
}


/* 0.13.16 - Staff messaging directory simplification.
   The staff sidebar contains Management plus real conversations only. The full
   colleague directory lives behind New message and is searchable, so there is
   never a second long TEAM scrollbar or duplicated people. */
.rp-message-contact-search { display:block; margin:14px 0 8px; }
.rp-message-contact-search input {
  width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--rp-border);
  border-radius:11px; background:#fff; color:var(--rp-text); font-size:15px;
}
.rp-message-contact-search input:focus {
  outline:3px solid rgba(109,92,232,.12); border-color:#7868e8;
}
.rp-message-contact-none { margin:12px 0 0; color:var(--rp-muted); text-align:center; }
.rp-management-contact-copy { flex:1; min-width:0; }
.rp-management-unread {
  min-width:22px; height:22px; padding:0 6px; border-radius:999px; display:grid;
  place-items:center; background:#6d5ce8; color:#fff; font-size:11px; flex:0 0 auto;
}

/* Staff: Management is fixed at the top; one conversation list uses the rest. */
.rp-staff-app .rp-conversations-panel > .rp-management-directory {
  order:1; flex:0 0 auto; border-bottom:1px solid #ddd7f7;
}
.rp-staff-app .rp-conversations-panel > .rp-conversation-list,
.rp-staff-app .rp-conversations-panel > .rp-conversation-empty { order:2; }
.rp-staff-app .rp-conversations-panel > .rp-conversation-list {
  flex:1 1 auto; min-height:0; max-height:none; overflow-y:auto;
  overscroll-behavior:contain;
}
.rp-staff-app .rp-conversations-panel > .rp-conversation-empty {
  flex:1 1 auto; min-height:90px; display:flex; align-items:flex-start;
}
.rp-staff-app .rp-management-directory-list {
  max-height:none !important; overflow:visible !important;
}
.rp-staff-app .rp-management-directory-list > a {
  min-height:58px; padding:9px 12px;
}
.rp-staff-app .rp-management-directory-list small {
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

@media (max-width:700px) {
  .rp-message-contact-search { margin-top:10px; }
  .rp-message-contact-search input { min-height:46px; font-size:16px; }
}

/* 0.13.17 - Login visibility + unified messaging controls. */
.rp-password-field {
  position: relative;
  display: block;
  width: 100%;
}
.rp-password-field input[type="password"],
.rp-password-field input[type="text"] {
  width: 100%;
  padding-right: 52px !important;
}
.rp-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #5d6879;
  cursor: pointer;
}
.rp-password-toggle:hover,
.rp-password-toggle:focus-visible {
  background: #f0edff;
  color: var(--rp-staff-purple-dark);
  outline: none;
}
.rp-password-toggle svg { width: 22px; height: 22px; display: block; }
.rp-password-toggle.is-visible { color: var(--rp-staff-purple-dark); background: #f4f0ff; }

.rp-message-delete {
  appearance: none;
  border: 0;
  background: transparent;
  color: #8a5560;
  padding: 0 2px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.rp-message-delete:hover,
.rp-message-delete:focus-visible {
  color: #b42318;
  text-decoration: underline;
  outline: none;
}
.rp-message-delete:disabled { opacity: .45; cursor: wait; }

/* Management Messages follows the same scalable model as Staff Messages:
   actual conversations only in the left column; New Message opens the searchable directory. */
.rp-app[data-view="messages"] .rp-conversations-panel > .rp-conversation-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.rp-app[data-view="messages"] .rp-conversations-panel > .rp-conversation-empty {
  flex: 1 1 auto;
  min-height: 90px;
}

/* 0.13.18 - Professional message/thread controls + compact emoji picker. */
.rp-conversation-row-wrap {
  position: relative;
  border-bottom: 1px solid var(--rp-border);
  background: transparent;
}
.rp-conversation-row-wrap .rp-conversation-row {
  width: 100%;
  min-height: 64px;
  box-sizing: border-box;
  border-bottom: 0;
  padding-right: 48px;
}
.rp-conversation-row-wrap:hover,
.rp-conversation-row-wrap.is-active { background: #eef6ff; }
.rp-conversation-row-wrap:hover .rp-conversation-row,
.rp-conversation-row-wrap.is-active .rp-conversation-row { background: transparent; }
.rp-conversation-row-wrap.is-management {
  border-left: 3px solid #6d5ce8;
  background: #faf8ff;
}
.rp-conversation-row-wrap.is-management:hover,
.rp-conversation-row-wrap.is-management.is-active { background: #f1edff; }
.rp-staff-app .rp-conversation-row-wrap:hover,
.rp-staff-app .rp-conversation-row-wrap.is-active { background: #f1eeff; }

.rp-message-menu { position: relative; flex: 0 0 auto; }
.rp-message-menu-toggle {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}
.rp-message-menu-toggle:hover,
.rp-message-menu-toggle:focus-visible,
.rp-message-menu-toggle[aria-expanded="true"] {
  background: #eef2f7;
  color: var(--rp-text);
  outline: none;
}
.rp-staff-app .rp-message-menu-toggle:hover,
.rp-staff-app .rp-message-menu-toggle:focus-visible,
.rp-staff-app .rp-message-menu-toggle[aria-expanded="true"] {
  background: #eee9ff;
  color: var(--rp-staff-purple-dark);
}
.rp-message-menu-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 5px);
  right: 0;
  min-width: 176px;
  padding: 6px;
  border: 1px solid #d9e0e9;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15,41,71,.16);
}
.rp-message-menu-action {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--rp-text);
  text-align: left;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.rp-message-menu-action:hover,
.rp-message-menu-action:focus-visible { background: #f4f6f9; outline: none; }
.rp-message-menu-danger { color: #b42318; }
.rp-message-menu-danger:hover,
.rp-message-menu-danger:focus-visible { background: #fff0ee; }
.rp-thread-row-menu {
  position: absolute;
  z-index: 5;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  opacity: .62;
}
.rp-conversation-row-wrap:hover .rp-thread-row-menu,
.rp-conversation-row-wrap:focus-within .rp-thread-row-menu,
.rp-thread-row-menu:has(.rp-message-menu-toggle[aria-expanded="true"]) { opacity: 1; }
.rp-chat-head { justify-content: space-between; gap: 12px; }
.rp-chat-thread-menu { margin-left: auto; }
.rp-bubble-menu { margin-left: 1px; }
.rp-bubble-menu-toggle { width: 24px; height: 22px; font-size: 18px; border-radius: 7px; }
.rp-bubble-menu .rp-message-menu-popover {
  top: auto;
  bottom: calc(100% + 5px);
  min-width: 150px;
}

.rp-message-compose {
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: end;
}
.rp-emoji-control { position: relative; align-self: end; }
.rp-emoji-toggle {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cfd8e4;
  border-radius: 11px;
  background: #fff;
  color: #56657a;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.rp-emoji-toggle:hover,
.rp-emoji-toggle:focus-visible,
.rp-emoji-toggle[aria-expanded="true"] {
  border-color: #9fb7d4;
  background: #f6f9fc;
  color: var(--rp-text);
  outline: none;
}
.rp-staff-app .rp-emoji-toggle:hover,
.rp-staff-app .rp-emoji-toggle:focus-visible,
.rp-staff-app .rp-emoji-toggle[aria-expanded="true"] {
  border-color: #bcb0f2;
  background: #f3efff;
  color: var(--rp-staff-purple-dark);
}
.rp-emoji-picker[hidden] {
  display: none !important;
}
.rp-emoji-picker {
  position: absolute;
  z-index: 90;
  left: 0;
  bottom: calc(100% + 8px);
  width: 222px;
  max-width: calc(100vw - 36px);
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
  border: 1px solid #d9e0e9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15,41,71,.16);
}
.rp-emoji-picker button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.rp-emoji-picker button:hover,
.rp-emoji-picker button:focus-visible { background: #f0edff; outline: none; }

@media (max-width: 700px) {
  .rp-message-compose { grid-template-columns: auto minmax(0,1fr) auto; }
  .rp-emoji-toggle { width: 42px; height: 42px; }
  .rp-thread-row-menu { opacity: .82; }
  .rp-message-menu-popover { min-width: 168px; }
}


/* 0.13.20 - Staff pinned notice is the only notice alert. No floating toast. */
.rp-staff-pinned-notice {
  border: 1px solid #8f7cf4;
  border-left: 5px solid var(--rp-staff-purple);
  background: linear-gradient(90deg,#ece7ff 0%,#f8f6ff 68%,#ffffff 100%);
  box-shadow: 0 5px 16px rgba(81,65,199,.12);
  color: #1d1740;
}
.rp-staff-pinned-notice:hover {
  border-color: #7460e8;
  border-left-color: var(--rp-staff-purple-dark);
  background: linear-gradient(90deg,#e7e0ff 0%,#f6f3ff 68%,#ffffff 100%);
}
.rp-staff-pin-icon {
  background: var(--rp-staff-purple);
  box-shadow: 0 3px 9px rgba(81,65,199,.18);
}
.rp-staff-pinned-copy strong { color: #2b216d; font-weight: 900; }
.rp-staff-pinned-copy small { color: #545c75; }
.rp-staff-pinned-label {
  background: var(--rp-staff-purple);
  color: #fff;
  border: 1px solid var(--rp-staff-purple);
}

/* 0.13.21 - Pinned notice readability polish.
   Compact, unmistakable and easy to read for older staff users. */
.rp-staff-pinned-zone {
  gap: 8px;
  margin-bottom: 12px;
}
.rp-staff-pinned-notice {
  grid-template-columns: 42px minmax(0,1fr) auto;
  gap: 13px;
  min-height: 66px;
  padding: 11px 14px;
  border: 1px solid #8b77ef;
  border-left: 5px solid var(--rp-staff-purple);
  border-radius: 13px;
  background: linear-gradient(90deg,#e9e3ff 0%,#f3efff 58%,#fbfaff 100%);
  box-shadow: 0 7px 18px rgba(81,65,199,.14);
  color: #1b1831;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.rp-staff-pinned-notice:hover {
  border-color: #715ce2;
  border-left-color: var(--rp-staff-purple-dark);
  background: linear-gradient(90deg,#e4dcff 0%,#f0ebff 58%,#faf8ff 100%);
  box-shadow: 0 9px 22px rgba(81,65,199,.18);
  transform: translateY(-1px);
}
.rp-staff-pin-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg,var(--rp-staff-purple),var(--rp-staff-purple-dark));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 4px 10px rgba(81,65,199,.22);
}
.rp-staff-pinned-copy {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
}
.rp-staff-pinned-copy strong {
  color: #24195f;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -.01em;
}
.rp-staff-pinned-copy small {
  margin: 0;
  color: #33394f;
  font-size: 14.5px;
  line-height: 1.35;
  font-weight: 600;
}
.rp-staff-pinned-label {
  align-self: center;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--rp-staff-purple);
  color: #fff;
  border: 1px solid var(--rp-staff-purple-dark);
  box-shadow: 0 3px 8px rgba(81,65,199,.16);
  font-size: 12px;
  font-weight: 900;
}
.rp-staff-pinned-notice:focus-visible {
  outline: 3px solid rgba(109,92,232,.28);
  outline-offset: 2px;
}
@media (max-width: 680px) {
  .rp-staff-pinned-notice {
    grid-template-columns: 38px minmax(0,1fr);
    gap: 10px;
    min-height: 64px;
    padding: 10px 11px;
  }
  .rp-staff-pin-icon { width: 36px; height: 36px; font-size: 18px; }
  .rp-staff-pinned-copy strong { font-size: 15.5px; }
  .rp-staff-pinned-copy small { font-size: 14px; }
  .rp-staff-pinned-label {
    grid-column: 2;
    justify-self: start;
    min-height: 25px;
    margin-top: 1px;
    padding: 3px 9px;
    font-size: 11.5px;
  }
}

/* 0.13.22 - Management Staff + Timesheets operational density polish.
   Working pages should open onto the work, not large presentation cards. */
.rp-app[data-view="timesheets"] .rp-content,
.rp-app[data-view="staff"] .rp-content {
  padding-top: 14px;
}

.rp-timesheets-page-head,
.rp-staff-list-page-head {
  margin-bottom: 9px !important;
}
.rp-timesheets-page-head .rp-page-subtitle,
.rp-staff-list-page-head .rp-page-subtitle {
  margin-top: 1px !important;
  font-size: 12.5px !important;
  line-height: 1.25 !important;
}
.rp-staff-list-page-head .rp-primary-button {
  min-height: 42px;
  padding: 0 16px;
}

/* Staff: one compact three-part status strip, then search, then people. */
.rp-staff-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 10px;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16,42,76,.055);
  overflow: hidden;
}
.rp-staff-summary-strip article {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}
.rp-staff-summary-strip article + article { border-left: 1px solid var(--rp-border); }
.rp-staff-summary-strip span {
  color: var(--rp-muted);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
}
.rp-staff-summary-strip strong {
  color: var(--rp-text);
  font-size: 25px;
  line-height: 1;
  font-weight: 900;
}
.rp-staff-summary-strip article:nth-child(2) strong { color: #167541; }
.rp-staff-summary-strip article:nth-child(3) strong { color: #7a4a4a; }

.rp-app[data-view="staff"] .rp-staff-toolbar {
  min-height: 62px;
  margin-bottom: 11px;
  padding: 8px 10px;
  gap: 10px;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(16,42,76,.05);
}
.rp-app[data-view="staff"] .rp-staff-search-form { gap: 8px; }
.rp-app[data-view="staff"] .rp-staff-search-form input[type="search"],
.rp-app[data-view="staff"] .rp-staff-search-form select {
  min-height: 42px;
  font-size: 15px;
}
.rp-app[data-view="staff"] .rp-staff-search-form input[type="search"] { width: min(420px, 100%); }
.rp-app[data-view="staff"] .rp-staff-search-form .rp-secondary-button { min-height: 42px; }
.rp-app[data-view="staff"] .rp-layout-toggle { padding: 3px; }
.rp-app[data-view="staff"] .rp-layout-toggle a { padding: 7px 12px; }

/* Make the actual staff records feel denser without sacrificing readability. */
.rp-app[data-view="staff"] .rp-staff-card-grid { gap: 13px; }
.rp-app[data-view="staff"] .rp-staff-card { padding: 16px; }
.rp-app[data-view="staff"] .rp-staff-card-photo { width: 52px; height: 52px; }
.rp-app[data-view="staff"] .rp-staff-card h2 { margin: 12px 0 2px; font-size: 19px; }
.rp-app[data-view="staff"] .rp-staff-card-meta { margin: 13px 0; padding: 11px 0; }
.rp-app[data-view="staff"] .rp-staff-view-button { min-height: 40px; }

/* Timesheets: filters stay compact, then a single four-part summary strip. */
.rp-app[data-view="timesheets"] .rp-timesheet-toolbar {
  align-items: center;
  margin-bottom: 10px;
  padding: 9px 11px;
  gap: 10px 14px;
  border-radius: 11px;
  box-shadow: 0 4px 14px rgba(16,42,76,.05);
}
.rp-app[data-view="timesheets"] .rp-range-links a {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
}
.rp-app[data-view="timesheets"] .rp-timesheet-filter-form { gap: 8px; }
.rp-app[data-view="timesheets"] .rp-timesheet-filter-form label {
  gap: 3px;
  font-size: 12px;
}
.rp-app[data-view="timesheets"] .rp-timesheet-filter-form input,
.rp-app[data-view="timesheets"] .rp-timesheet-filter-form select {
  min-height: 40px;
  font-size: 14px;
}
.rp-app[data-view="timesheets"] .rp-timesheet-filter-form .rp-secondary-button { min-height: 40px; }

.rp-timesheet-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 11px;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16,42,76,.055);
  overflow: hidden;
}
.rp-timesheet-summary-strip article {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}
.rp-timesheet-summary-strip article + article { border-left: 1px solid var(--rp-border); }
.rp-timesheet-summary-strip span {
  color: var(--rp-muted);
  font-size: 13.5px;
  line-height: 1.2;
  font-weight: 800;
}
.rp-timesheet-summary-strip strong {
  color: var(--rp-text);
  font-size: 23px;
  line-height: 1.05;
  font-weight: 900;
  text-align: right;
}
.rp-timesheet-summary-strip article:nth-child(2) strong { color: #167541; }
.rp-timesheet-summary-strip article:nth-child(3) strong { color: #9a6500; }

.rp-app[data-view="timesheets"] .rp-timesheet-staff-summary,
.rp-app[data-view="timesheets"] .rp-timesheet-records,
.rp-app[data-view="timesheets"] .rp-timesheet-detail { margin-bottom: 12px; }
.rp-app[data-view="timesheets"] .rp-timesheet-staff-summary > .rp-panel-head,
.rp-app[data-view="timesheets"] .rp-timesheet-records > .rp-panel-head {
  padding-top: 0;
}

@media (max-width: 980px) {
  .rp-timesheet-summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-timesheet-summary-strip article:nth-child(3) { border-left: 0; border-top: 1px solid var(--rp-border); }
  .rp-timesheet-summary-strip article:nth-child(4) { border-top: 1px solid var(--rp-border); }
  .rp-app[data-view="staff"] .rp-staff-card-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .rp-staff-summary-strip { grid-template-columns: 1fr; }
  .rp-staff-summary-strip article + article { border-left: 0; border-top: 1px solid var(--rp-border); }
  .rp-staff-summary-strip article { min-height: 54px; }
  .rp-app[data-view="staff"] .rp-staff-toolbar { align-items: stretch; flex-direction: column; }
  .rp-app[data-view="staff"] .rp-staff-search-form { flex-wrap: wrap; }
  .rp-app[data-view="staff"] .rp-staff-search-form input[type="search"] { width: 100%; flex: 1 1 100%; }
  .rp-app[data-view="staff"] .rp-staff-search-form select { flex: 1 1 160px; min-width: 0; }
  .rp-app[data-view="staff"] .rp-layout-toggle { align-self: flex-start; }
  .rp-app[data-view="staff"] .rp-staff-card-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .rp-timesheet-summary-strip { grid-template-columns: 1fr; }
  .rp-timesheet-summary-strip article + article { border-left: 0; border-top: 1px solid var(--rp-border); }
  .rp-timesheet-summary-strip article { min-height: 54px; }
}


/* 0.13.23 - Staff Messages mobile/PWA layout correction.
   On phones Messages is one focused screen at a time: conversation list OR chat.
   The desktop two-column grid must never leak into the mobile layout. */
@media (max-width: 700px) {
  .rp-staff-app .rp-messaging-shell-staff,
  .rp-staff-app .rp-messaging-shell-staff.no-selection,
  .rp-staff-app .rp-messaging-shell-staff.has-selection {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .rp-staff-app .rp-messaging-shell-staff.no-selection .rp-conversations-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    border-right: 0;
  }

  .rp-staff-app .rp-messaging-shell-staff.has-selection .rp-chat-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
  }

  .rp-staff-app .rp-conversations-head,
  .rp-staff-app .rp-management-directory,
  .rp-staff-app .rp-management-directory-list,
  .rp-staff-app .rp-conversation-list,
  .rp-staff-app .rp-conversation-empty {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .rp-staff-app .rp-conversations-head {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    min-height: 52px;
    padding: 8px 10px;
  }

  .rp-staff-app .rp-message-team-button {
    min-height: 38px;
    height: 38px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .rp-staff-app .rp-management-directory {
    flex: 0 0 auto;
    overflow: visible;
  }

  .rp-staff-app .rp-management-directory-head {
    min-height: 38px;
    padding: 6px 10px;
  }

  .rp-staff-app .rp-management-directory-list > a {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 9px 10px;
  }

  .rp-staff-app .rp-conversation-list {
    flex: 1 1 auto;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .rp-staff-app .rp-conversation-row-wrap,
  .rp-staff-app .rp-conversation-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .rp-staff-app .rp-conversation-row {
    padding: 10px;
  }

  .rp-staff-app .rp-chat-head {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 9px;
  }

  .rp-staff-app .rp-chat-person {
    min-width: 0;
    flex: 1 1 auto;
  }

  .rp-staff-app .rp-chat-person > span:last-child {
    min-width: 0;
  }

  .rp-staff-app .rp-chat-person strong,
  .rp-staff-app .rp-chat-person small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rp-staff-app .rp-chat-messages,
  .rp-staff-app .rp-message-compose {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .rp-staff-app .rp-message-compose {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px;
    padding: 7px;
  }

  .rp-staff-app .rp-message-compose textarea {
    min-width: 0;
    min-height: 42px;
    padding: 8px 9px;
  }

  .rp-staff-app .rp-message-compose .rp-primary-button {
    min-width: 66px;
    min-height: 42px;
    padding-left: 10px;
    padding-right: 10px;
  }

  /* Keep the pinned notice obvious, but do not let it consume half the phone. */
  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pinned-zone {
    max-height: none;
    overflow: visible;
    margin-bottom: 8px;
  }

  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pinned-notice {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 9px;
    min-height: 0;
    padding: 9px 10px;
  }

  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pin-icon {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pinned-copy strong {
    font-size: 15px;
  }

  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pinned-copy small {
    font-size: 13px;
    line-height: 1.3;
  }

  .rp-staff-app-main[data-staff-view="messages"] .rp-staff-pinned-label {
    grid-column: auto;
    align-self: start;
    justify-self: end;
    min-height: 24px;
    margin: 0;
    padding: 3px 8px;
    font-size: 11px;
  }
}

/* 0.13.24 — simple leave management for staff + management */
.rp-leave-heading { margin-bottom: 10px; }
.rp-leave-toolbar { margin-bottom: 12px; }
.rp-leave-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: #fff;
}
.rp-leave-summary-strip a {
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #516176;
  text-decoration: none;
  font-weight: 750;
}
.rp-leave-summary-strip a strong { color: #102c4d; font-size: 22px; }
.rp-leave-summary-strip a:hover,
.rp-leave-summary-strip a.is-active { background: #eef5ff; border-color: #bdd5ff; color: #1768da; }
.rp-leave-list-panel { overflow: hidden; }
.rp-leave-admin-list { display: grid; }
.rp-leave-admin-row {
  display: grid;
  grid-template-columns: minmax(180px,1.1fr) minmax(240px,1.4fr) minmax(180px,1fr) 110px auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid #e6ebf2;
}
.rp-leave-admin-row:first-child { border-top: 0; }
.rp-leave-person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.rp-leave-person img,
.rp-leave-avatar-fallback { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: 0 0 42px; }
.rp-leave-avatar-fallback { display: grid; place-items: center; background: #eaf2ff; color: #174b8f; font-weight: 850; }
.rp-leave-person span,
.rp-leave-dates { min-width: 0; display: grid; gap: 3px; }
.rp-leave-person strong,
.rp-leave-dates strong { color: #0d2948; }
.rp-leave-person small,
.rp-leave-dates small,
.rp-leave-impact { color: #66768a; }
.rp-leave-dates small { white-space: normal; }
.rp-leave-impact-warning { color: #a65b00; font-weight: 800; }
.rp-leave-status { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.rp-leave-status.is-pending { background: #fff4d9; color: #8c5a00; }
.rp-leave-status.is-approved { background: #e7f7ef; color: #147b4a; }
.rp-leave-status.is-declined { background: #ffeaea; color: #b22d2d; }
.rp-leave-status.is-cancelled { background: #eef1f5; color: #647184; }
.rp-leave-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.rp-leave-actions form { margin: 0; }
.rp-leave-actions button,
.rp-leave-message-button { min-height: 38px; padding: 0 12px; border-radius: 9px; font-weight: 800; font-size: 13px; }
.rp-leave-approve { border: 1px solid #a8dcc3; background: #eaf8f1; color: #147b4a; }
.rp-leave-decline { border: 1px solid #efc0c0; background: #fff1f1; color: #b22d2d; }
.rp-leave-message-button { display: inline-flex; align-items: center; text-decoration: none; }

.rp-staff-leave-title { margin-bottom: 10px; }
.rp-staff-leave-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0,1.2fr); gap: 14px; align-items: start; }
.rp-staff-leave-request-panel,
.rp-staff-leave-history-panel { margin: 0; }
.rp-staff-leave-form { display: grid; gap: 14px; }
.rp-staff-leave-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rp-staff-leave-form label { display: grid; gap: 6px; color: var(--rp-staff-ink); font-weight: 800; }
.rp-staff-leave-form input[type="date"],
.rp-staff-leave-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #bbb1eb;
  border-radius: 10px;
  background: #fff;
  color: var(--rp-staff-ink);
  font: inherit;
}
.rp-staff-leave-form textarea { min-height: 86px; resize: vertical; }
.rp-staff-leave-list { display: grid; gap: 9px; }
.rp-staff-leave-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid #ddd7f5;
  border-radius: 12px;
  background: #fff;
}
.rp-staff-leave-row-main { min-width: 0; display: grid; gap: 5px; }
.rp-staff-leave-row-main strong { color: var(--rp-staff-ink); }
.rp-staff-leave-row-main small { color: var(--rp-staff-muted); line-height: 1.4; }
.rp-staff-leave-row-side { display: grid; justify-items: end; gap: 7px; }
.rp-staff-leave-cancel { border: 0; background: transparent; color: #a13d3d; font-weight: 800; cursor: pointer; }
.rp-leave-nav-badge { margin-left: auto; }

@media (max-width: 1100px) {
  .rp-leave-admin-row { grid-template-columns: minmax(180px,1fr) minmax(220px,1.2fr) 130px auto; }
  .rp-leave-impact { grid-column: 2 / 3; }
  .rp-leave-status-wrap { grid-column: 3 / 4; grid-row: 1; }
  .rp-leave-actions { grid-column: 4 / 5; grid-row: 1; }
}

@media (max-width: 900px) {
  .rp-leave-summary-strip { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rp-leave-admin-row { grid-template-columns: 1fr; gap: 9px; padding: 14px; }
  .rp-leave-impact,
  .rp-leave-status-wrap,
  .rp-leave-actions { grid-column: auto; grid-row: auto; }
  .rp-leave-actions { justify-content: flex-start; }
  .rp-staff-leave-layout { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .rp-staff-leave-dates { grid-template-columns: 1fr; }
  .rp-staff-leave-row { grid-template-columns: 1fr; }
  .rp-staff-leave-row-side { justify-items: start; }
}

/* Operational settings */
.rp-brand-logo { width: 42px; height: 42px; border-radius: 11px; object-fit: cover; background: #fff; padding: 2px; flex: 0 0 auto; }
.rp-settings-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.rp-settings-head h1 { margin: 0; font-size: 28px; line-height: 1.1; }
.rp-settings-head p { margin: 5px 0 0; color: var(--rp-muted); }
.rp-settings-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.rp-settings-card { background: #fff; border: 1px solid var(--rp-border); border-radius: 14px; box-shadow: var(--rp-shadow); padding: 18px; }
.rp-settings-company { grid-column: 1 / -1; }
.rp-settings-card-head { margin-bottom: 14px; }
.rp-settings-card-head h2 { margin: 0; font-size: 18px; }
.rp-settings-card-head p { margin: 4px 0 0; color: var(--rp-muted); font-size: 14px; }
.rp-settings-card label:not(.rp-settings-check) { display: grid; gap: 6px; color: var(--rp-text); font-weight: 700; font-size: 14px; }
.rp-settings-card input[type="text"],
.rp-settings-card input[type="email"],
.rp-settings-card select,
.rp-settings-card textarea { width: 100%; border: 1px solid #cfd9e6; border-radius: 9px; background: #fff; color: var(--rp-text); padding: 10px 11px; outline: none; }
.rp-settings-card input[type="text"], .rp-settings-card input[type="email"], .rp-settings-card select { min-height: 42px; }
.rp-settings-card input:focus, .rp-settings-card select:focus, .rp-settings-card textarea:focus { border-color: #8fbdf6; box-shadow: 0 0 0 3px rgba(22,119,255,.10); }
.rp-settings-two { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.rp-settings-company-grid { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 18px; align-items: start; }
.rp-settings-fields { display: grid; gap: 12px; }
.rp-settings-logo-box { display: grid; gap: 10px; }
.rp-settings-logo-preview { width: 84px; height: 84px; border-radius: 16px; border: 1px solid var(--rp-border); background: #f4f8fc; display: grid; place-items: center; overflow: hidden; }
.rp-settings-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.rp-settings-logo-preview span { font-size: 24px; font-weight: 850; color: var(--rp-navy); }
.rp-file-label input { font-weight: 500; font-size: 13px; }
.rp-settings-toggle-list { display: grid; gap: 8px; }
.rp-settings-check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border: 1px solid var(--rp-border); border-radius: 10px; background: #fbfdff; cursor: pointer; }
.rp-settings-check input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 auto; }
.rp-settings-check span { display: grid; gap: 2px; }
.rp-settings-check strong { font-size: 14px; }
.rp-settings-check small { color: var(--rp-muted); font-size: 13px; line-height: 1.35; }
.rp-settings-remove { padding: 8px 9px; }
.rp-settings-hint { margin: 10px 0 0; color: var(--rp-muted); font-size: 13px; }
.rp-settings-save-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 2px; }
@media (max-width: 900px) {
  .rp-settings-form { grid-template-columns: 1fr; }
  .rp-settings-company { grid-column: auto; }
  .rp-settings-company-grid { grid-template-columns: 1fr; }
  .rp-settings-logo-box { grid-template-columns: auto minmax(0,1fr); align-items: center; }
  .rp-settings-logo-preview { grid-row: 1 / span 2; }
}
@media (max-width: 600px) {
  .rp-settings-head { align-items: flex-start; }
  .rp-settings-head h1 { font-size: 25px; }
  .rp-settings-two { grid-template-columns: 1fr; }
  .rp-settings-card { padding: 15px; }
  .rp-settings-head .rp-primary-button { min-height: 40px; padding: 0 14px; }
}


/* 0.13.27 - Mobile account menu and clear Log out access.
   Staff and management should never need to hunt through navigation to sign out. */
.rp-account-menu-wrap { position: relative; }
.rp-account-toggle { font: inherit; color: inherit; }
.rp-top-user.rp-account-toggle,
.rp-staff-header-identity.rp-account-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.rp-top-user.rp-account-toggle { padding: 4px 6px 4px 8px; border-radius: 11px; }
.rp-staff-header-identity.rp-account-toggle { padding: 3px 5px; border-radius: 11px; }
.rp-account-toggle:hover,
.rp-account-menu-wrap.is-open .rp-account-toggle { background: rgba(92,75,216,.07); }
.rp-account-chevron { margin-left: 1px; color: #77728a; font-size: 14px; line-height: 1; }
.rp-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: 220px;
  padding: 7px;
  border: 1px solid #d8ddea;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(26,35,63,.18);
}
.rp-account-menu[hidden] { display: none !important; }
.rp-account-menu-head { padding: 9px 10px 10px; border-bottom: 1px solid #edf0f5; margin-bottom: 5px; }
.rp-account-menu-head strong,
.rp-account-menu-head span { display: block; }
.rp-account-menu-head strong { font-size: 14px; color: #1f2d43; }
.rp-account-menu-head span { margin-top: 2px; font-size: 12px; color: #758096; }
.rp-account-menu a {
  min-height: 42px;
  padding: 0 10px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  color: #26354c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
}
.rp-account-menu a:hover { background: #f5f3ff; color: #4e3eaf; }
.rp-account-menu .rp-account-logout { color: #a23232; }
.rp-account-menu .rp-account-logout:hover { background: #fff3f3; color: #8f2626; }

@media (min-width: 901px) {
  /* Desktop already exposes Log out directly; keep the new menu focused on mobile. */
  .rp-management-account-menu .rp-account-chevron,
  .rp-staff-account-menu .rp-account-chevron { display: none; }
  .rp-management-account-menu .rp-account-menu,
  .rp-staff-account-menu .rp-account-menu { display: none !important; }
  .rp-management-account-menu .rp-account-toggle,
  .rp-staff-account-menu .rp-account-toggle { cursor: default; }
  .rp-management-account-menu .rp-account-toggle:hover,
  .rp-staff-account-menu .rp-account-toggle:hover { background: transparent; }
}

@media (max-width: 900px) {
  .rp-account-chevron { display: inline-block; }
  .rp-top-user.rp-account-toggle { padding: 3px; }
  .rp-top-user.rp-account-toggle .rp-avatar { width: 38px; height: 38px; }
  .rp-management-account-menu .rp-account-menu { right: 0; }
  .rp-staff-account-menu .rp-account-menu { right: 0; }
  .rp-staff-header-identity.rp-account-toggle strong { display: none; }
}

@media (max-width: 560px) {
  .rp-account-menu { width: min(220px, calc(100vw - 24px)); }
  .rp-staff-header-actions { min-width: 0; }
  .rp-staff-account-menu .rp-account-chevron { margin-left: -1px; }
}


/* 0.13.28 - Management mobile usability gap fix.
   Keep the approved desktop UI unchanged. On phones the navigation is a true
   dismissible drawer, the application itself cannot drift sideways, the wide
   rota scrolls only inside its own viewport, and management timesheets become
   readable stacked records instead of desktop tables. */
.rp-menu-close,
.rp-menu-backdrop { display: none; }

@media (max-width: 860px) {
  body.rp-app-page { overflow-x: hidden; }
  body.rp-menu-open { overflow: hidden; touch-action: none; }

  .rp-app,
  .rp-main-wrap,
  .rp-content,
  .rp-topbar { min-width: 0; max-width: 100%; width: 100%; }

  .rp-sidebar {
    left: 0;
    width: min(280px, 86vw);
    max-width: 86vw;
    transform: translateX(-105%);
    transition: transform .2s ease;
    z-index: 70;
    overflow: hidden;
  }
  .rp-sidebar.is-open { left: 0; transform: translateX(0); }
  .rp-sidebar .rp-brand { padding-right: 58px; }
  .rp-nav { overscroll-behavior: contain; }

  .rp-menu-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 11px;
    background: rgba(255,255,255,.10);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
  }
  .rp-menu-close:focus-visible,
  .rp-menu-toggle:focus-visible {
    outline: 3px solid rgba(22,119,255,.28);
    outline-offset: 2px;
  }

  .rp-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(7,24,44,.42);
    cursor: default;
  }
  .rp-menu-backdrop[hidden] { display: none !important; }

  /* The toolbar itself must fit the handset. Only the rota grid may be wider. */
  .rp-app[data-view="rota"] .rp-rota-toolbar {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
  }
  .rp-app[data-view="rota"] .rp-week-navigation,
  .rp-app[data-view="rota"] .rp-rota-filters,
  .rp-app[data-view="rota"] .rp-rota-actions {
    min-width: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .rp-app[data-view="rota"] .rp-rota-actions { grid-column: auto; }
  .rp-app[data-view="rota"] .rp-week-label {
    min-width: 0;
    flex: 1 1 100%;
    width: 100%;
    padding: 3px 0;
    text-align: left;
  }
  .rp-app[data-view="rota"] .rp-rota-filters label {
    flex: 1 1 180px;
    min-width: 0;
  }
  .rp-app[data-view="rota"] .rp-rota-filters select {
    width: 100%;
    min-width: 0;
  }
  .rp-app[data-view="rota"] .rp-rota-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: visible !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .rp-app[data-view="rota"] .rp-rota-table-live { min-width: 1160px; }
}

@media (max-width: 760px) {
  /* Management timesheet tables become touch-friendly cards on phones. */
  .rp-app[data-view="timesheets"] .rp-timesheet-staff-summary,
  .rp-app[data-view="timesheets"] .rp-timesheet-records {
    overflow: visible;
    padding: 0 11px 11px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .rp-app[data-view="timesheets"] .rp-timesheet-staff-summary > .rp-panel-head,
  .rp-app[data-view="timesheets"] .rp-timesheet-records > .rp-panel-head {
    padding: 12px 1px 8px;
  }
  .rp-app[data-view="timesheets"] .rp-data-table-wrap { overflow: visible; }
  .rp-app[data-view="timesheets"] .rp-data-table {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .rp-app[data-view="timesheets"] .rp-data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .rp-app[data-view="timesheets"] .rp-data-table tbody {
    display: grid;
    gap: 10px;
  }
  .rp-app[data-view="timesheets"] .rp-data-table tr {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--rp-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16,42,76,.055);
  }
  .rp-app[data-view="timesheets"] .rp-data-table td {
    position: relative;
    display: block;
    min-height: 37px;
    padding: 8px 0 8px 118px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    overflow-wrap: anywhere;
  }
  .rp-app[data-view="timesheets"] .rp-data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    top: 8px;
    width: 106px;
    color: var(--rp-muted);
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1.3;
  }
  .rp-app[data-view="timesheets"] .rp-data-table td:last-child { border-bottom: 0; }
  .rp-app[data-view="timesheets"] .rp-data-table .rp-row-actions {
    min-height: 44px;
    padding: 10px 0 0;
    white-space: normal;
  }
  .rp-app[data-view="timesheets"] .rp-data-table .rp-row-actions::before { display: none; }
  .rp-app[data-view="timesheets"] .rp-data-table .rp-row-actions a {
    width: 100%;
    min-height: 44px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd8e7;
    border-radius: 9px;
    background: #f7fbff;
  }
}

@media (max-width: 430px) {
  .rp-app[data-view="rota"] .rp-rota-summary { grid-template-columns: 1fr; }
  .rp-app[data-view="rota"] .rp-rota-summary > div { min-height: 46px; }
  .rp-app[data-view="timesheets"] .rp-data-table td { padding-left: 104px; }
  .rp-app[data-view="timesheets"] .rp-data-table td::before { width: 94px; }
}


/* 0.13.29 - Mobile management correction.
   The phone viewport must never become the rota canvas. The management drawer
   is a fixed layer on every view, and the weekly rota switches to stacked staff
   cards on phones instead of forcing a 1160px table through the viewport. */
.rp-rota-mobile-list { display: none; }

@media (max-width: 860px) {
  html,
  body.rp-app-page {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
  }
  body.rp-menu-open { overflow: hidden !important; }

  .rp-app {
    display: block;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    overflow-x: hidden;
  }
  .rp-main-wrap,
  .rp-content,
  .rp-topbar {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }
  .rp-topbar {
    left: 0;
    right: 0;
    z-index: 55;
  }

  .rp-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(280px, 86vw);
    max-width: 86vw;
    height: 100vh;
    height: 100dvh;
    transform: translate3d(-105%,0,0);
    transition: transform .2s ease, visibility 0s linear .2s;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .rp-sidebar.is-open {
    transform: translate3d(0,0,0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .2s ease, visibility 0s;
  }
  .rp-sidebar .rp-nav { overflow: visible; }
  .rp-menu-backdrop { z-index: 90; }
  .rp-menu-close { z-index: 110; }

  /* On phones the management rota is deliberately vertical. Desktop keeps the
     full seven-day grid. This prevents page-level sideways movement entirely. */
  .rp-app[data-view="rota"] .rp-rota-wrap { display: none !important; }
  .rp-app[data-view="rota"] .rp-rota-mobile-list {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .rp-rota-mobile-empty {
    padding: 18px;
    border: 1px dashed #c8d5e4;
    border-radius: 12px;
    background: #fff;
    color: var(--rp-muted);
    text-align: center;
  }
  .rp-rota-mobile-staff {
    width: 100%;
    min-width: 0;
    border: 1px solid #cbd8e6;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(16,42,76,.045);
    overflow: hidden;
  }
  .rp-rota-mobile-staff > summary {
    list-style: none;
    min-height: 68px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    user-select: none;
  }
  .rp-rota-mobile-staff > summary::-webkit-details-marker { display: none; }
  .rp-rota-mobile-staff > summary::after {
    content: '›';
    flex: 0 0 auto;
    color: #64758d;
    font-size: 25px;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
  }
  .rp-rota-mobile-staff[open] > summary::after { transform: rotate(-90deg); }
  .rp-rota-mobile-person {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
  }
  .rp-rota-mobile-person > span:last-child { min-width: 0; }
  .rp-rota-mobile-person strong,
  .rp-rota-mobile-person small { display: block; }
  .rp-rota-mobile-person strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
  }
  .rp-rota-mobile-person small {
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--rp-muted);
    font-size: 12px;
  }
  .rp-rota-mobile-staff .rp-rota-avatar { width: 38px; height: 38px; }
  .rp-rota-mobile-hours {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef5fc;
    color: var(--rp-navy);
    font-size: 12px;
    font-weight: 850;
  }
  .rp-rota-mobile-week {
    border-top: 1px solid #e1e8f0;
    background: #f7f9fc;
  }
  .rp-rota-mobile-day {
    position: relative;
    min-height: 0;
    padding: 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #e1e8f0 !important;
    background: #fff;
  }
  .rp-rota-mobile-day:last-child { border-bottom: 0 !important; }
  .rp-rota-mobile-day.is-today { background: #f7fbff; }
  .rp-rota-mobile-day.is-inactive-staff::after { display: none; }
  .rp-rota-mobile-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
  }
  .rp-rota-mobile-day-head span strong,
  .rp-rota-mobile-day-head span small { display: inline; }
  .rp-rota-mobile-day-head span small {
    margin-left: 6px;
    color: var(--rp-muted);
  }
  .rp-rota-mobile-add {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: 36px !important;
    min-height: 36px;
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 10px;
    border: 1px solid #c7d5e5;
    border-radius: 9px;
    background: #fff;
    color: var(--rp-blue-dark);
    font-size: 13px !important;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;
    opacity: 1 !important;
    transform: none !important;
    box-sizing: border-box;
  }
  .rp-rota-mobile-add:hover,
  .rp-rota-mobile-add:focus {
    transform: none !important;
  }
  .rp-rota-mobile-day-shifts { display: grid; gap: 7px; }
  .rp-rota-mobile-day-shifts .rp-shift-card {
    width: 100%;
    min-width: 0;
    min-height: 60px;
    text-align: left;
  }
  .rp-rota-mobile-no-shift {
    min-height: 38px;
    display: flex;
    align-items: center;
    color: #8794a5;
    font-size: 13px;
  }
  .rp-app[data-view="rota"] .rp-rota-help { margin-bottom: 0; }
}

@media (max-width: 600px) {
  .rp-app[data-view="rota"] .rp-rota-toolbar,
  .rp-app[data-view="rota"] .rp-week-navigation,
  .rp-app[data-view="rota"] .rp-rota-filters,
  .rp-app[data-view="rota"] .rp-rota-actions {
    width: 100%;
    min-width: 0;
  }
  .rp-app[data-view="rota"] .rp-week-navigation,
  .rp-app[data-view="rota"] .rp-rota-filters,
  .rp-app[data-view="rota"] .rp-rota-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .rp-app[data-view="rota"] .rp-rota-toolbar .rp-secondary-button,
  .rp-app[data-view="rota"] .rp-rota-toolbar .rp-primary-button,
  .rp-app[data-view="rota"] .rp-rota-filters label,
  .rp-app[data-view="rota"] .rp-rota-filters select,
  .rp-app[data-view="rota"] .rp-rota-actions form,
  .rp-app[data-view="rota"] .rp-rota-actions form button,
  .rp-app[data-view="rota"] .rp-rota-actions > a,
  .rp-app[data-view="rota"] .rp-rota-actions > button {
    width: 100%;
    min-width: 0;
  }
}

/* 0.13.31 - Complete front-end authentication / password recovery shell. */
.rp-login-shell {
  --rp-auth-purple: #6d5ce8;
  --rp-auth-purple-dark: #5141c7;
  --rp-auth-purple-soft: #f2efff;
}
.rp-login-brand {
  background: linear-gradient(145deg, #4f3fc1 0%, #6d5ce8 58%, #8275ee 100%);
}
.rp-login-card input[type="text"],
.rp-login-card input[type="email"],
.rp-login-card input[type="password"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 52px;
  border-color: #c9c4df;
  font-size: 16px;
}
.rp-login-card input:focus {
  outline: 3px solid rgba(109,92,232,.14);
  border-color: var(--rp-auth-purple);
}
.rp-login-card input[type="submit"] {
  min-height: 52px;
  background: var(--rp-auth-purple);
  font-size: 17px;
}
.rp-login-card input[type="submit"]:hover,
.rp-login-card input[type="submit"]:focus-visible {
  background: var(--rp-auth-purple-dark);
}
.rp-forgot,
.rp-auth-back { color: var(--rp-auth-purple-dark); }
.rp-auth-form { margin-top: 22px; }
.rp-auth-form p { margin: 0 0 16px; }
.rp-auth-form label { margin-bottom: 8px; }
.rp-auth-alert {
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 11px;
  font-weight: 650;
  line-height: 1.45;
}
.rp-auth-alert.is-error {
  background: #fff2f3;
  border: 1px solid #f0c5ca;
  color: #8a2633;
}
.rp-auth-help {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--rp-auth-purple-soft);
  color: #4b4666;
  line-height: 1.45;
}
.rp-auth-back {
  display: inline-flex;
  margin-top: 10px;
  font-weight: 800;
  text-decoration: none;
}
.rp-auth-primary-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 50px;
  margin-top: 12px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--rp-auth-purple);
  color: #fff;
  text-decoration: none;
  font-weight: 850;
}
.rp-auth-primary-link:hover,
.rp-auth-primary-link:focus-visible { background: var(--rp-auth-purple-dark); color: #fff; }
.rp-auth-success-icon {
  width: 58px;
  height: 58px;
  margin: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--rp-auth-purple-soft);
  color: var(--rp-auth-purple-dark);
  font-size: 30px;
  font-weight: 900;
}
@media (max-width: 600px) {
  .rp-login-brand { padding: 24px 20px; }
  .rp-login-brand h1 { font-size: 30px; }
  .rp-login-brand p { font-size: 15px; }
  .rp-login-panel { padding: 0 14px 24px; }
  .rp-login-card { width: 100%; box-sizing: border-box; margin: 18px auto; padding: 24px 20px; border-radius: 16px; }
  .rp-login-card h2 { font-size: 27px; }
}

/* 0.13.32 - Monthly hours, workplace breakdown and print workflow */
.rp-workplace-hours-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.rp-workplace-hours-inline a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #dfe4ee;
  border-radius: 9px;
  background: #f8f9fc;
  color: var(--rp-text);
  text-decoration: none;
}
.rp-workplace-hours-inline a:hover { border-color: #b9acef; background: #f5f2ff; }
.rp-workplace-hours-inline a strong { font-size: 12.5px; }
.rp-workplace-hours-inline a span { color: var(--rp-muted); font-size: 12.5px; font-weight: 800; }
.rp-hours-total-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: 9px;
  background: #f0edff;
  color: #5134b8;
  font-weight: 900;
  text-decoration: none;
}
.rp-hours-total-link:hover { background: #e8e2ff; }
.rp-staff-hours-drilldown { margin-bottom: 12px; }
.rp-hours-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}
.rp-hours-breakdown-card {
  position: relative;
  min-height: 112px;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
a.rp-hours-breakdown-card,
.rp-hours-breakdown-main {
  color: var(--rp-text);
  text-decoration: none;
}
.rp-hours-breakdown-main,
a.rp-hours-breakdown-card {
  display: flex;
  min-height: 112px;
  padding: 14px 15px 38px;
  flex-direction: column;
  justify-content: center;
}
.rp-hours-breakdown-card span { color: var(--rp-muted); font-size: 13px; font-weight: 800; }
.rp-hours-breakdown-card strong { margin-top: 5px; font-size: 24px; line-height: 1.1; font-weight: 900; }
.rp-hours-breakdown-card small { margin-top: 5px; color: var(--rp-muted); font-weight: 700; }
.rp-hours-breakdown-card.is-active { border-color: #8d79df; box-shadow: 0 0 0 2px rgba(93,61,190,.08); }
.rp-hours-total-card { background: linear-gradient(135deg,#f5f2ff,#fff); }
.rp-hours-print-link {
  position: absolute;
  right: 10px;
  bottom: 9px;
  color: #5a3bc2;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}
.rp-hours-print-link:hover { text-decoration: underline; }

.rp-staff-hours-print-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #cfc6f4;
  border-radius: 10px;
  background: #fff;
  color: var(--rp-staff-purple-dark);
  font-weight: 900;
  text-decoration: none;
}
.rp-staff-hours-month-form {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-bottom: 12px;
}
.rp-staff-hours-month-form label {
  display: grid;
  gap: 4px;
  color: var(--rp-staff-muted);
  font-size: 12px;
  font-weight: 850;
}
.rp-staff-hours-month-form input[type="month"] {
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid #d7ddea;
  border-radius: 10px;
  background: #fff;
  color: #17213a;
  font: inherit;
}
.rp-staff-hours-month-total { display: block; }
.rp-staff-hours-month-total > a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 16px;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid #d6deea;
  border-radius: 16px;
  background: linear-gradient(135deg,#f5f2ff,#fff);
  color: #17213a;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(38,47,80,.05);
}
.rp-staff-hours-month-total > a.is-active { border-color: #8d79df; }
.rp-staff-hours-month-total > a span { color: var(--rp-staff-muted); font-weight: 850; }
.rp-staff-hours-month-total > a strong { grid-row: 1 / span 2; grid-column: 2; margin: 0; font-size: 30px; color: var(--rp-staff-purple-dark); }
.rp-staff-hours-month-total > a small { color: var(--rp-staff-muted); font-weight: 750; }
.rp-staff-workplace-hours-list { display: grid; gap: 8px; }
.rp-staff-workplace-hours-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #dce2ec;
  border-radius: 11px;
  background: #fbfcff;
  overflow: hidden;
}
.rp-staff-workplace-hours-row.is-active { border-color: #8d79df; background: #f7f4ff; }
.rp-staff-workplace-hours-main {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  color: #17213a;
  text-decoration: none;
}
.rp-staff-workplace-hours-main span { min-width: 0; }
.rp-staff-workplace-hours-main strong,
.rp-staff-workplace-hours-main small { display: block; }
.rp-staff-workplace-hours-main small { margin-top: 2px; color: var(--rp-staff-muted); }
.rp-staff-workplace-hours-main b { flex: 0 0 auto; color: var(--rp-staff-purple-dark); font-size: 17px; }
.rp-staff-workplace-print {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  border-left: 1px solid #dce2ec;
  color: var(--rp-staff-purple-dark);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}
.rp-staff-hours-entry-list { display: grid; gap: 7px; }
.rp-staff-hours-entry-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid #e0e5ed;
  border-radius: 10px;
  background: #fff;
}
.rp-staff-hours-entry-list article > div:first-child { min-width: 0; }
.rp-staff-hours-entry-list strong,
.rp-staff-hours-entry-list small { display: block; }
.rp-staff-hours-entry-list small { margin-top: 2px; color: var(--rp-staff-muted); }
.rp-staff-hours-entry-time { flex: 0 0 auto; text-align: right; }
.rp-staff-hours-entry-time span,
.rp-staff-hours-entry-time b { display: block; }
.rp-staff-hours-entry-time span { color: var(--rp-staff-muted); font-size: 12.5px; }
.rp-staff-hours-entry-time b { margin-top: 3px; color: var(--rp-staff-purple-dark); }

@media (max-width: 760px) {
  .rp-timesheet-hours-table .rp-workplace-hours-inline { justify-content: flex-end; }
  .rp-hours-breakdown-grid { grid-template-columns: 1fr 1fr; }
  .rp-staff-hours-month-form { align-items: stretch; }
  .rp-staff-hours-month-form label { flex: 1; }
}
@media (max-width: 520px) {
  .rp-hours-breakdown-grid { grid-template-columns: 1fr; }
  .rp-staff-hours-month-total > a { grid-template-columns: 1fr; }
  .rp-staff-hours-month-total > a strong { grid-row: auto; grid-column: auto; }
  .rp-staff-workplace-hours-main { align-items: flex-start; }
  .rp-staff-hours-entry-list article { align-items: flex-start; flex-direction: column; }
  .rp-staff-hours-entry-time { width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; }
}

.rp-monthly-signatures{margin-top:20px}.rp-monthly-signature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;padding:0 22px 22px}.rp-monthly-signature-card{padding:16px;border:1px solid #dfe4ed;border-radius:12px;min-width:0}.rp-monthly-signature-card h3{margin:0 0 12px}.rp-monthly-signature-card summary{cursor:pointer;font-weight:700;padding:10px 0}.rp-monthly-signature-form{display:grid;gap:12px}.rp-monthly-signature-form p{font-size:13px;color:var(--rp-muted);margin:4px 0}.rp-monthly-signature-form label{display:grid;gap:5px}.rp-monthly-signature-form input:not([type=hidden]){width:100%;border:1px solid #cfd7e5;border-radius:8px;padding:10px;background:#fff;color:#17213a}.rp-monthly-signature-form canvas{width:100%;height:140px;border:1px solid #cfd7e5;border-radius:8px;background:#fff;touch-action:none}.rp-monthly-signature-actions{display:flex;flex-wrap:wrap;gap:10px}.rp-monthly-signature-saved{display:grid;gap:6px}.rp-monthly-signature-saved img{max-width:100%;height:100px;object-fit:contain;object-position:left;background:#fff;border:1px solid #e2e6ed}.rp-monthly-signature-saved small{color:var(--rp-muted)}.rp-monthly-initials{font-size:24px;font-style:italic}.rp-monthly-signature-changed{font-size:13px;color:#805813}@media(max-width:600px){.rp-monthly-signature-grid{padding:0 14px 14px}}
.rp-timesheet-filter-form label{min-width:0}.rp-timesheet-filter-form input,.rp-timesheet-filter-form select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}

/* Four selectable periods and a clear custom date search. */
.rp-hours-period-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
.rp-hours-period-cards > a { display:block; min-width:0; padding:16px; border:1px solid #d8d1f6; border-radius:14px; background:linear-gradient(180deg,#fff,#f8f6ff); text-decoration:none; box-shadow:0 8px 20px rgba(80,61,154,.07); }
.rp-hours-period-cards > a:hover,.rp-hours-period-cards > a.is-active { border-color:#8d79df; background:#f0ebff; }
.rp-hours-period-cards > a:focus-visible { outline:3px solid #8d79df; outline-offset:2px; }
.rp-hours-period-cards small { display:block; margin-top:8px; color:#65718a; font-size:12px; }
.rp-staff-hours-date-form { display:grid; grid-template-columns:1fr 1fr auto; gap:10px; align-items:end; }
.rp-staff-hours-date-form label { display:grid; gap:5px; min-width:0; font-weight:800; }
.rp-staff-hours-date-form input { width:100%; min-width:0; max-width:100%; box-sizing:border-box; min-height:44px; padding:9px; border:1px solid #d7ddea; border-radius:9px; font:inherit; background:#fff; }
.rp-hours-date-panel > p,.rp-hours-date-hint { color:#65718a; font-size:13px; }
.rp-staff-hours-month-total > a > small { grid-column:1; }
.rp-staff-hours-month-total > a > strong { grid-column:2; grid-row:1 / span 3; }
@media(min-width:900px){ .rp-hours-period-cards { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:600px){ .rp-staff-hours-date-form { grid-template-columns:1fr 1fr; } .rp-staff-hours-date-form button { grid-column:1 / -1; width:100%; } .rp-hours-period-cards > a { padding:13px; } }

/* Reports: one clear worked-hours view, with supporting detail on request. */
.rp-simple-reports { min-width: 0; }
.rp-report-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rp-report-guidance { color: var(--rp-muted); font-size: 13px; margin: 12px 0; }
.rp-report-total { padding: 22px; background: #fff; border: 1px solid var(--rp-border); border-radius: 12px; margin: 16px 0; }
.rp-report-total > span { display: block; font-weight: 600; }
.rp-report-total > strong { display: block; font-size: 36px; margin: 6px 0; }
.rp-report-total > p { color: var(--rp-muted); margin: 0 0 12px; }
.rp-report-tabs { margin: 0 0 16px; }
.rp-simple-report-table { min-width: 0; width: 100%; }
.rp-simple-report-table td { vertical-align: top; }
.rp-simple-report-table th:first-child { width: 40%; }
.rp-simple-report-table th:nth-child(2) { width: 20%; }
.rp-report-hours { font-size: 20px; font-weight: 700; }
.rp-report-details { margin-top: 10px; font-size: 13px; }
.rp-report-details summary, .rp-report-activity-panel > summary { cursor: pointer; font-weight: 600; color: var(--rp-primary); }
.rp-report-details dl { margin: 12px 0 0; }
.rp-report-details dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; }
.rp-report-details dd { margin: 0; font-weight: 600; white-space: nowrap; }
.rp-report-activity-panel { margin-top: 16px; }
.rp-report-activity-panel > summary { padding: 18px; }
.rp-report-activity-panel > p { padding: 0 18px; }
@media (max-width: 760px) {
  .rp-simple-report-table thead { display: none; }
  .rp-simple-report-table, .rp-simple-report-table tbody, .rp-simple-report-table tr, .rp-simple-report-table td { display: block; width: auto; }
  .rp-simple-report-table tr { border-bottom: 1px solid var(--rp-border); padding: 10px 0; }
  .rp-simple-report-table td { border: 0; padding: 8px 16px; }
  .rp-simple-report-table td:nth-child(2)::before { content: 'Hours Worked: '; font-weight: 600; margin-right: 8px; }
  .rp-simple-reports .rp-page-head { flex-wrap: wrap; gap: 16px; }
}
@media print {
  .rp-simple-reports .rp-report-actions, .rp-simple-reports .rp-report-toolbar, .rp-simple-reports .rp-report-tabs,
  .rp-simple-reports .rp-report-details, .rp-simple-reports .rp-report-activity-panel, .rp-simple-reports .rp-report-row-tools { display: none !important; }
  .rp-simple-reports .rp-data-table-wrap { overflow: visible; }
  .rp-simple-report-table, .rp-simple-report-table tbody { display: table; width: 100%; }
  .rp-simple-report-table tbody { display: table-row-group; }
  .rp-simple-report-table thead { display: table-header-group; }
  .rp-simple-report-table tr { display: table-row; break-inside: avoid; }
  .rp-simple-report-table td { display: table-cell; }
  .rp-simple-report-table th:last-child { display: none; }
  .rp-simple-report-table td:nth-child(2)::before { content: none; }
  .rp-simple-reports a { color: #000; text-decoration: none; }
}

.rp-staff-account-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 290px; }
.rp-staff-account-actions small { color: var(--rp-muted); line-height: 1.5; }

.rp-lifecycle-page{min-height:100vh;background:radial-gradient(circle at 15% 10%,#e8f2ff 0,transparent 34%),linear-gradient(135deg,#f5f8fd,#eef3fb);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.rp-lifecycle-wrap{min-height:100vh;display:grid;place-items:center;padding:24px}.rp-lifecycle-card{width:min(680px,100%);background:#fff;border:1px solid #e1e8f2;border-radius:24px;padding:38px;box-shadow:0 22px 65px rgba(24,43,79,.13)}.rp-lifecycle-kicker{display:inline-block;padding:7px 11px;border-radius:999px;background:#eef4ff;color:#315bb3;font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.rp-lifecycle-card h1{font-size:34px;line-height:1.1;margin:18px 0 12px;color:#10213f}.rp-lifecycle-card p{font-size:16px;line-height:1.65;color:#5b677c}.rp-lifecycle-deadline{margin:24px 0;padding:18px 20px;border-radius:16px;background:linear-gradient(135deg,#fff7ed,#fff);border:1px solid #fed7aa}.rp-lifecycle-deadline small,.rp-lifecycle-deadline span{display:block;color:#9a5a14}.rp-lifecycle-deadline strong{display:block;font-size:21px;color:#9a3412;margin:4px 0}.rp-lifecycle-note{padding:14px 16px;border-radius:14px;background:#f5f8fd}.rp-lifecycle-actions{display:flex;gap:12px;align-items:center;margin-top:24px}.rp-lifecycle-button{display:inline-flex;align-items:center;justify-content:center;background:#173a73;color:#fff;text-decoration:none;padding:12px 18px;border-radius:12px;font-weight:800}.rp-lifecycle-link{color:#42526b;font-weight:700}@media(max-width:640px){.rp-lifecycle-card{padding:26px}.rp-lifecycle-card h1{font-size:28px}.rp-lifecycle-actions{align-items:stretch;flex-direction:column}}
