/* =====================================================================
   SME Payroll theme
   Built on Foundation 6.9. Palette "blue and white": deep blue #006AA9 for actions and the
   side menu, bright blue #008BC6 for accents and borders, warm whites and greys for surfaces.
   Green / amber / red are reserved for status and always come with an icon and a word.
   All text pairs meet WCAG AA (white on #008BC6 is NOT used for text).
   ===================================================================== */

:root {
  --pr-ink:        #00507F;   /* side menu */
  --pr-ink-2:      #00608F;
  --pr-ink-line:   #1B7099;
  --pr-ink-text:   #D9EAF5;
  --pr-primary:    #006AA9;   /* actions, links, active menu */
  --pr-primary-dk: #00588C;
  --pr-primary-lt: #E3F0F8;
  --pr-accent:     #008BC6;   /* accents, graphics, focus rings */
  --pr-accent-dk:  #006E9E;
  --pr-accent-lt:  #E0F2FA;
  --pr-gold:       #FFFFFF;
  --pr-canvas:     #F9F9F7;
  --pr-surface:    #FFFFFF;
  --pr-line:       #D3D2D1;
  --pr-line-2:     #EEEDE9;
  --pr-text:       #14222E;
  --pr-muted:      #55616D;
  --pr-faint:      #86909A;

  --pr-ok:         #166534;  --pr-ok-bg:   #DCFCE7;  --pr-ok-line:   #16A34A;
  --pr-warn:       #92400E;  --pr-warn-bg: #FEF3C7;  --pr-warn-line: #F59E0B;
  --pr-bad:        #B91C1C;  --pr-bad-bg:  #FEE2E2;  --pr-bad-text:  #991B1B;
  --pr-neu:        #4A5868;  --pr-neu-bg:  #EEEDE9;

  --pr-radius:     12px;
  --pr-radius-sm:  8px;
  --pr-shadow:     0 1px 2px rgba(0, 60, 100, .08);
  --pr-shadow-lg:  0 12px 32px rgba(0, 60, 100, .18);
  --pr-side-w:     248px;
  --pr-control-h:  2.625rem;
  --pr-field-gap:  16px;
  --pr-font:       'Open Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --pr-head:       'Montserrat', 'Open Sans', system-ui, sans-serif;
}

/* ---------- Base ---------- */
html { font-size: 100%; }
body.pr-app {
  background: var(--pr-canvas);
  color: var(--pr-text);
  font-family: var(--pr-font);
  font-size: .9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5 { font-family: var(--pr-head); color: var(--pr-text); letter-spacing: -.01em; }
h1 { font-size: 1.375rem; font-weight: 700; margin: 0; line-height: 1.25; }
h2 { font-size: 1.0625rem; font-weight: 700; margin: 0; }
h3 { font-size: .9375rem; font-weight: 700; margin: 0 0 .5rem; }
a { color: var(--pr-primary); }
a:hover, a:focus { color: var(--pr-primary-dk); }
:focus-visible { outline: 3px solid rgba(0, 139, 198, .5); outline-offset: 2px; }
.pr-num, .pr-money { font-family: var(--pr-head); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pr-muted { color: var(--pr-muted); }
.pr-faint { color: var(--pr-faint); }
.pr-small { font-size: .8125rem; }
.pr-strong { font-weight: 700; }
.pr-nowrap { white-space: nowrap; }
.pr-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.pr-skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 1000; border-radius: 6px; }
.pr-skip:focus { left: 8px; }

/* ---------- Shell ---------- */
.pr-shell { display: grid; grid-template-columns: var(--pr-side-w) minmax(0, 1fr); min-height: 100vh; }
.pr-side {
  background: var(--pr-ink);
  color: var(--pr-ink-text);
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.pr-brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 18px; color: #fff; text-decoration: none; }
.pr-brand:hover, .pr-brand:focus { color: #fff; }
.pr-brand__logo { height: 40px; min-width: 40px; max-width: 96px; padding: 4px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; }
.pr-brand__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pr-brand__mark { width: 40px; height: 40px; border-radius: 10px; background: var(--pr-gold); color: var(--pr-ink); display: grid; place-items: center; flex: none; }
.pr-brand__name { font-family: var(--pr-head); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.pr-brand__app { display: block; font-family: var(--pr-font); font-weight: 400; font-size: .75rem; color: var(--pr-ink-text); }

.pr-nav { padding: 6px 12px 16px; flex: 1; }
.pr-nav__group { margin-top: 14px; }
.pr-nav__label { font-size: .75rem; color: #7FA0B5; padding: 0 10px 4px; }
.pr-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; margin: 1px 0;
  border-radius: 8px;
  color: var(--pr-ink-text); text-decoration: none; font-size: .9rem;
}
.pr-nav a i { width: 18px; text-align: center; color: #8FB0C4; }
.pr-nav a:hover, .pr-nav a:focus { background: var(--pr-ink-2); color: #fff; }
.pr-nav a.is-active { background: var(--pr-primary); color: #fff; font-weight: 600; }
.pr-nav a.is-active i { color: #fff; }
.pr-nav__count { margin-left: auto; background: var(--pr-bad); color: #fff; font-size: .7rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; }

.pr-side__user { border-top: 1px solid var(--pr-ink-line); padding: 14px 20px 18px; font-size: .8125rem; }
.pr-side__user strong { display: block; color: #fff; font-weight: 600; font-size: .875rem; }
.pr-side__user a { color: var(--pr-ink-text); text-decoration: none; margin-right: 14px; }
.pr-side__user a:hover { color: #fff; text-decoration: underline; }

.pr-main { min-width: 0; display: flex; flex-direction: column; grid-column: 2; }
.pr-scrim { position: fixed; inset: 0; background: rgba(15, 43, 61, .4); z-index: 40; display: none; }
.pr-top {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 32px; background: var(--pr-surface);
  border-bottom: 1px solid var(--pr-line);
  position: sticky; top: 0; z-index: 20;
}
.pr-top::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--pr-primary), var(--pr-accent)); }
.pr-top__back { color: var(--pr-muted); font-size: 1.1rem; text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.pr-top__back:hover { background: var(--pr-line-2); color: var(--pr-text); }
.pr-top__title { flex: 1; min-width: 0; }
.pr-top__sub { color: var(--pr-muted); font-size: .8125rem; margin-top: 2px; }
.pr-top__date { color: var(--pr-muted); font-size: .8125rem; white-space: nowrap; }
.pr-menu-btn { display: none; background: none; border: 0; font-size: 1.25rem; color: var(--pr-text); padding: 4px 8px; cursor: pointer; }
.pr-content { padding: 28px 32px 48px; max-width: 1440px; width: 100%; }

/* ---------- Panels ---------- */
.pr-panel {
  position: relative;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-radius: var(--pr-radius);
  box-shadow: var(--pr-shadow);
  margin-bottom: 24px;
}
.pr-panel__head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--pr-line-2);
}
.pr-panel__head h2 { flex: 1; }
.pr-panel__head .pr-muted { font-size: .8125rem; }
.pr-panel__body { padding: 20px; }
.pr-panel__body--flush { padding: 0; }
.pr-panel__foot { padding: 12px 20px; border-top: 1px solid var(--pr-line-2); font-size: .8125rem; color: var(--pr-muted); }
.pr-grid { display: grid; gap: 24px; }
.pr-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pr-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-grid--side { grid-template-columns: minmax(0, 1fr) 360px; }
.pr-grid > .pr-panel { margin-bottom: 0; display: flex; flex-direction: column; }
.pr-grid > .pr-panel > form:last-child { flex: 1; display: flex; flex-direction: column; }	/* side-by-side forms: buttons at the bottom */
.pr-grid > .pr-panel > form:last-child > .pr-panel__body { flex: 1; }
.pr-stack > * + * { margin-top: 24px; }

/* ---------- Page toolbar (actions + filters) ---------- */
.pr-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.pr-toolbar__spacer { flex: 1; }
/* (filter fields: see "Toolbar fields" after the form styles) */

/* ---------- Stat strip (one panel, segmented) ---------- */
.pr-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pr-stat { padding: 18px 20px; border-right: 1px solid var(--pr-line-2); min-width: 0; }
.pr-stat:last-child { border-right: 0; }
.pr-stat__value { font-family: var(--pr-head); font-size: 1.75rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pr-stat__label { color: var(--pr-muted); font-size: .8125rem; margin-top: 4px; }
.pr-stat__value small { font-size: .9rem; color: var(--pr-muted); font-weight: 600; }
.pr-stat--free .pr-stat__value { color: var(--pr-accent-dk); }
.pr-meter { height: 6px; background: var(--pr-line-2); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.pr-meter span { display: block; height: 100%; background: var(--pr-primary); border-radius: 4px; }

/* ---------- Rent status summary (money tiles) ---------- */
.pr-money-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pr-mtile { border-radius: var(--pr-radius-sm); padding: 14px 16px; border: 1px solid var(--pr-line); background: var(--pr-surface); text-decoration: none; color: inherit; display: block; }
.pr-mtile:hover { border-color: #C3CFDA; color: inherit; }
.pr-mtile__label { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 600; }
.pr-mtile__amount { font-family: var(--pr-head); font-weight: 700; font-size: 1.3rem; margin-top: 6px; font-variant-numeric: tabular-nums; }
.pr-mtile__meta { font-size: .8rem; color: var(--pr-muted); }
.pr-mtile--bad  { border-left: 4px solid var(--pr-bad); }   .pr-mtile--bad .pr-mtile__label  { color: var(--pr-bad); }
.pr-mtile--warn { border-left: 4px solid var(--pr-warn-line); }         .pr-mtile--warn .pr-mtile__label { color: var(--pr-warn); }
.pr-mtile--ok   { border-left: 4px solid var(--pr-ok-line); }         .pr-mtile--ok .pr-mtile__label   { color: var(--pr-ok); }
.pr-mtile--neu  { border-left: 4px solid var(--pr-primary); } .pr-mtile--neu .pr-mtile__label { color: var(--pr-primary-dk); }

/* ---------- Bed board (dashboard signature) ---------- */
.pr-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; padding: 20px; }
.pr-room { border: 1px solid var(--pr-line); border-radius: var(--pr-radius-sm); padding: 14px; background: #F8FAFC; }
.pr-room__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.pr-room__name { font-family: var(--pr-head); font-weight: 700; font-size: 1rem; color: var(--pr-text); text-decoration: none; }
.pr-room__name:hover { color: var(--pr-primary); text-decoration: underline; }
.pr-room__meta { margin-left: auto; font-size: .78rem; color: var(--pr-muted); text-align: right; }
.pr-beds { display: grid; gap: 8px; }
.pr-bed {
  display: flex; align-items: center; gap: 10px;
  background: var(--pr-surface);
  border: 1px solid var(--pr-line);
  border-left: 4px solid var(--pr-primary);
  border-radius: 8px; padding: 8px 10px; min-height: 52px;
  text-decoration: none; color: var(--pr-text);
}
a.pr-bed:hover { box-shadow: 0 0 0 1px #C3CFDA; color: var(--pr-text); background: #FBFDFF; }
.pr-bed__icon { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; background: var(--pr-primary-lt); color: var(--pr-primary-dk); flex: none; }
.pr-bed__body { min-width: 0; flex: 1; }
.pr-bed__who { display: block; font-weight: 600; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-bed__sub { display: block; font-size: .75rem; color: var(--pr-muted); }
.pr-bed--paid    { border-left-color: var(--pr-ok-line); } .pr-bed--paid .pr-bed__icon    { background: var(--pr-ok-bg); color: var(--pr-ok); }
.pr-bed--credit  { border-left-color: var(--pr-ok-line); } .pr-bed--credit .pr-bed__icon  { background: var(--pr-ok-bg); color: var(--pr-ok); }
.pr-bed--due     { border-left-color: var(--pr-warn-line); } .pr-bed--due .pr-bed__icon     { background: var(--pr-warn-bg); color: var(--pr-warn); }
.pr-bed--overdue { border-left-color: var(--pr-bad); } .pr-bed--overdue .pr-bed__icon { background: var(--pr-bad-bg); color: var(--pr-bad-text); }
.pr-bed--upcoming { border-left-color: #9AABB9; }
.pr-bed--reserved { border-left-color: var(--pr-primary); border-style: solid dashed dashed solid; }
.pr-bed--free {
  border: 1.5px dashed #7CC4BA; border-left: 4px solid var(--pr-accent);
  background: #F4FBF9; color: var(--pr-accent-dk);
}
.pr-bed--free .pr-bed__icon { background: var(--pr-accent-lt); color: var(--pr-accent-dk); }
.pr-bed--free .pr-bed__who { color: var(--pr-accent-dk); }
.pr-room--inactive { opacity: .6; }
.pr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .78rem; color: var(--pr-muted); }
.pr-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pr-legend i.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Badges ---------- */
.pr-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; line-height: 1;
  padding: 5px 9px 5px 8px; border-radius: 999px; white-space: nowrap;
}
.pr-badge i { font-size: .75rem; }
.pr-badge--ok      { background: var(--pr-ok-bg);   color: var(--pr-ok); }
.pr-badge--warn    { background: var(--pr-warn-bg); color: var(--pr-warn); }
.pr-badge--bad     { background: var(--pr-bad-bg);  color: var(--pr-bad-text); }
.pr-badge--neutral { background: var(--pr-neu-bg);  color: var(--pr-neu); }
.pr-badge--info    { background: var(--pr-primary-lt); color: var(--pr-primary-dk); }
.pr-badge--free    { background: var(--pr-accent-lt); color: var(--pr-accent-dk); }
.pr-ref { font-family: var(--pr-head); font-weight: 600; font-size: .8125rem; color: var(--pr-primary-dk); background: var(--pr-primary-lt); border-radius: 6px; padding: 2px 7px; white-space: nowrap; text-decoration: none; }
a.pr-ref:hover { background: #D5E5F6; }

/* ---------- Tables ---------- */
.pr-table { width: 100%; border-collapse: collapse; margin: 0; font-size: .875rem; }
.pr-table thead, .pr-table tbody, .pr-table tfoot { background: transparent; border: 0; }
.pr-table th {
  text-align: left; font-weight: 600; font-size: .78rem; color: var(--pr-muted);
  padding: 10px 14px; background: #F6F8FB; border-bottom: 1px solid var(--pr-line);
  white-space: nowrap;
}
.pr-table td { padding: 11px 14px; border-bottom: 1px solid var(--pr-line-2); vertical-align: middle; }
.pr-table tbody tr:nth-child(even) { background: transparent; }
.pr-table tbody tr:hover { background: #F7FAFD; }
.pr-table tbody tr:last-child td { border-bottom: 0; }
.pr-table tfoot td { font-weight: 700; background: #F6F8FB; border-top: 1px solid var(--pr-line); }
.pr-table .r, .pr-table th.r { text-align: right; }
.pr-table .c { text-align: center; }
.pr-table tr.is-voided td { color: var(--pr-faint); }
.pr-table tr.is-voided td.pr-strike .pr-money { text-decoration: line-through; }
.pr-table-wrap { overflow-x: auto; position: relative; }
.pr-table td .pr-sub { display: block; font-size: .78rem; color: var(--pr-muted); }
.pr-row-actions { white-space: nowrap; text-align: right; }

/* DataTables integration */
div.dt-container { padding: 0; font-size: .875rem; }
div.dt-container .dt-layout-row { margin: 0; padding: 12px 16px; }
div.dt-container .dt-layout-row.dt-layout-table { padding: 0; }
div.dt-container .dt-search input, div.dt-container .dt-length select {
  border: 1px solid var(--pr-line); border-radius: 8px; padding: 6px 10px; height: auto; margin-left: 8px; width: auto; display: inline-block;
}
div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
  background: var(--pr-primary) !important; color: #fff !important; border-color: var(--pr-primary) !important; border-radius: 6px;
}
div.dt-container .dt-paging .dt-paging-button:hover { background: var(--pr-primary-lt) !important; border-color: transparent !important; color: var(--pr-primary-dk) !important; }
table.dataTable.pr-table > thead > tr > th { border-bottom: 1px solid var(--pr-line); }
table.dataTable.pr-table > tbody > tr > td { border-top: 0; }
div.dt-container .dt-info { color: var(--pr-muted); font-size: .8125rem; }

/* ---------- Buttons (Foundation .button re-skinned) ---------- */
.button {
  font-family: var(--pr-font); font-weight: 600; font-size: .875rem;
  border-radius: 8px; padding: .65em 1.1em; margin: 0;
  background: var(--pr-primary); color: #fff; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px; line-height: 1.2;
  transition: background-color .15s ease;
}
.button:hover, .button:focus { background: var(--pr-primary-dk); color: #fff; }
.button.small { font-size: .8125rem; padding: .5em .85em; }
.button.tiny { font-size: .75rem; padding: .4em .7em; }
.button.secondary, .button.ghost { background: var(--pr-surface); color: var(--pr-text); border-color: var(--pr-line); }
.button.secondary:hover, .button.secondary:focus, .button.ghost:hover, .button.ghost:focus { background: var(--pr-line-2); color: var(--pr-text); }
.button.success { background: var(--pr-accent); color: #fff; }
.button.success:hover, .button.success:focus { background: var(--pr-accent-dk); color: #fff; }
.button.alert { background: var(--pr-bad); color: #fff; }
.button.alert:hover, .button.alert:focus { background: #B91C1C; color: #fff; }
.button.link { background: none; color: var(--pr-primary); padding-left: .3em; padding-right: .3em; }
.button.link:hover { background: var(--pr-primary-lt); color: var(--pr-primary-dk); }
.button.link.danger { color: var(--pr-bad); }
.button.link.danger:hover { background: var(--pr-bad-bg); }
.button.secondary.danger { color: var(--pr-bad); }
.button.secondary.danger:hover, .button.secondary.danger:focus { background: var(--pr-bad-bg); border-color: #FCA5A5; color: var(--pr-bad-text); }
.button[disabled], .button.disabled { opacity: .5; cursor: not-allowed; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Forms (Foundation inputs + existing project classes) ----------
   Every field is   <label><span class="pr-label">Caption</span> control [help] [error]</label>
   All controls share one height; inside .pr-field-grid each row of fields shares a
   caption line, so controls line up even when one caption wraps onto two lines. */
.pr-form label, label.nlbl {
  display: flex; flex-direction: column; min-width: 0;
  font-size: .8125rem; font-weight: 600; color: #2A3A48; margin: 0 0 var(--pr-field-gap);
}
.pr-label { display: block; margin-bottom: 6px; line-height: 1.35; }
.pr-form input[type=text], .pr-form input[type=email], .pr-form input[type=password], .pr-form input[type=tel],
.pr-form input[type=number], .pr-form input[type=date], .pr-form input[type=search], .pr-form select, .pr-form textarea, .nfld,
.pr-toolbar input, .pr-toolbar select {
  box-sizing: border-box; width: 100%;
  border: 1px solid #CFD9E2; border-radius: 8px; box-shadow: none;
  font-size: .9rem; line-height: 1.4; color: var(--pr-text); background-color: #fff;
  height: var(--pr-control-h); padding: 0 .75rem; margin: 0; font-family: var(--pr-font); font-weight: 400;
}
.pr-form input[type=file] { height: auto; margin: 0; padding: 8px 0; font-size: .85rem; font-weight: 400; }
.pr-form textarea { height: auto; min-height: 90px; padding: .6rem .75rem; resize: vertical; }
.pr-form input:focus, .pr-form select:focus, .pr-form textarea:focus, .pr-toolbar input:focus, .pr-toolbar select:focus {
  border-color: var(--pr-primary); box-shadow: 0 0 0 3px rgba(30, 107, 184, .18); outline: none;
}
.pr-form input[readonly] { background: #F4F7FA; color: var(--pr-muted); }
.pr-form input.flatpickr-input[readonly] { background: #fff; color: var(--pr-text); cursor: pointer; }
.pr-form .req, .req { color: var(--pr-bad); margin-left: 2px; }
.pr-help { display: block; font-weight: 400; color: var(--pr-muted); font-size: .78rem; line-height: 1.4; margin-top: 5px; }
.pr-form .form-error { font-size: .78rem; font-weight: 600; color: var(--pr-bad); margin-top: 5px; margin-bottom: 0; }
.pr-form .pr-help:has(~ .form-error.is-visible) { display: none; }	/* one message under a field at a time */
.pr-form .is-invalid-input:not(:focus) { background: #FFF8F8; border-color: #FCA5A5; }
.pr-form .is-invalid-label { color: var(--pr-bad); }

/* Field grids: caption / control / message rows shared across each row of fields */
.pr-form .pr-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 0; align-items: start; }
.pr-form .pr-field-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-form .pr-field-grid > label {
  display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0;
  margin-bottom: 0; padding-bottom: var(--pr-field-gap);
}
.pr-form .pr-field-grid > label > .pr-label { grid-row: 1; align-self: end; }
.pr-form .pr-field-grid > label > :is(input, select, textarea, .pr-input-prefix) { grid-row: 2; }
.pr-form .pr-field-grid > label > :is(.pr-help, .form-error) { grid-row: 3; }
.pr-form .pr-span-2 { grid-column: span 2; }
.pr-form .pr-span-all { grid-column: 1 / -1; }
.pr-form fieldset { border: 0; padding: 0; margin: 0 0 8px; min-width: 0; }
.pr-form fieldset + fieldset { border-top: 1px solid var(--pr-line-2); padding-top: 18px; }
.pr-form legend { float: left; width: 100%; font-family: var(--pr-head); font-weight: 700; font-size: .9375rem; margin-bottom: 14px; padding: 0; }
.pr-form legend + * { clear: both; }
.pr-check { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; font-weight: 400 !important; cursor: pointer; margin-bottom: var(--pr-field-gap); }
.pr-check input { margin: 3px 0 0 !important; width: auto; height: auto; flex: none; }
.pr-form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--pr-line-2); background: #F8FAFC; border-radius: 0 0 var(--pr-radius) var(--pr-radius); }
.pr-form-actions .pr-left { margin-right: auto; }
.pr-input-prefix { display: flex; align-items: stretch; height: var(--pr-control-h); }
.pr-input-prefix > span { display: flex; align-items: center; background: var(--pr-line-2); border: 1px solid #CFD9E2; border-right: 0; border-radius: 8px 0 0 8px; padding: 0 .75rem; font-size: .85rem; color: var(--pr-muted); font-weight: 600; }
.pr-input-prefix input { flex: 1; min-width: 0; border-radius: 0 8px 8px 0 !important; margin: 0 !important; text-align: right; }

/* Toolbar fields (filters): sit in one row, bottom-aligned with their buttons */
.pr-toolbar label, .pr-form.pr-toolbar label { margin: 0; font-size: .8125rem; color: var(--pr-muted); }
.pr-toolbar .pr-label { margin-bottom: 4px; }
.pr-toolbar select, .pr-toolbar input, .pr-form.pr-toolbar select, .pr-form.pr-toolbar input[type=text], .pr-form.pr-toolbar input[type=search] { width: auto; min-width: 150px; max-width: 260px; }
.pr-toolbar input.pr-date, .pr-form.pr-toolbar input.pr-date { width: 140px; min-width: 140px; }
.pr-toolbar .button { min-height: var(--pr-control-h); }

/* One field with its button on the same line (e.g. Settings: add a payment method) */
.pr-inline-field { display: flex; gap: 10px; align-items: flex-start; }
.pr-inline-field > label { flex: 1; margin: 0; }
.pr-inline-field > .button { min-height: var(--pr-control-h); flex: none; }

/* Forms that are only a button (cancel, block, deactivate…) sit inline */
.pr-inline-form { display: inline; margin: 0; }

/* Form panels: one width for data-entry forms, one for short forms */
.pr-panel--form { max-width: 960px; }
.pr-panel--narrow { max-width: 600px; }
.pr-pw-rules { font-size: .78rem; margin: -6px 0 14px; padding: 0; list-style: none; }
.pr-pw-rules li { color: var(--pr-muted); }
.pr-pw-rules li::before { content: "\2715"; color: var(--pr-bad); margin-right: 6px; font-weight: 700; }
.pr-pw-rules li.valid { color: var(--pr-ok); }
.pr-pw-rules li.valid::before { content: "\2713"; color: var(--pr-ok); }

/* ---------- Key/value summaries ---------- */
.pr-kv { display: grid; grid-template-columns: 125px minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: .875rem; }
.pr-kv dt { color: var(--pr-muted); font-weight: 400; margin: 0; }
.pr-kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pr-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.pr-figure { min-width: 0; }
.pr-figure { background: #F6F8FB; border-radius: 8px; padding: 12px 14px; }
.pr-figure__label { font-size: .78rem; color: var(--pr-muted); }
.pr-figure__value { font-family: var(--pr-head); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-figure--bad .pr-figure__value { color: var(--pr-bad); }
.pr-figure--ok .pr-figure__value { color: var(--pr-ok); }
.pr-figure--warn .pr-figure__value { color: var(--pr-warn); }
.pr-figure--free .pr-figure__value { color: var(--pr-accent-dk); }
.pr-figure__value small { font-size: .75rem; font-weight: 600; }
.pr-figure__note { font-size: .75rem; color: var(--pr-muted); margin-top: 2px; }
.pr-kv--compact { grid-template-columns: 90px minmax(0, 1fr); font-size: .8125rem; }

/* ---------- Sections inside a tab (Manage Room) ---------- */
.pr-section-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 20px 12px; }
.pr-section-head h3 { margin: 0; flex: 1; }
.pr-section-head--sub { border-top: 1px solid var(--pr-line-2); margin-top: 8px; padding-top: 18px; }
.pr-section-head--sub h3 { flex: none; }
.pr-subform { border-top: 1px solid var(--pr-line-2); }
.pr-subform h3 { margin-bottom: 4px; }
.pr-table tr.pr-row-free td { background: #F4FBF9; }
.pr-tabs .tabs-title > a i { margin-right: 4px; opacity: .8; }

/* ---------- Tenant profile header ---------- */
.pr-profile { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 20px; }
.pr-avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--pr-primary-lt); color: var(--pr-primary-dk); display: grid; place-items: center; font-family: var(--pr-head); font-weight: 700; font-size: 1.25rem; flex: none; }
.pr-profile__name { font-family: var(--pr-head); font-weight: 700; font-size: 1.25rem; }
.pr-profile__ref { font-family: var(--pr-head); font-size: 1.05rem; font-weight: 700; color: var(--pr-primary-dk); letter-spacing: .02em; }
.pr-profile__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--pr-muted); margin-top: 4px; }
.pr-profile .pr-actions { margin-left: auto; }

/* Tabs (Foundation tabs restyled) */
.pr-tabs.tabs { border: 0; border-bottom: 1px solid var(--pr-line); background: transparent; padding: 0 12px; display: flex; flex-wrap: wrap; }
.pr-tabs .tabs-title > a { font-size: .875rem; font-weight: 600; color: var(--pr-muted); padding: 14px 14px 12px; background: transparent; border-bottom: 3px solid transparent; }
.pr-tabs .tabs-title > a:hover { background: transparent; color: var(--pr-text); }
.pr-tabs .tabs-title > a[aria-selected=true], .pr-tabs .tabs-title.is-active > a { color: var(--pr-primary-dk); border-bottom-color: var(--pr-primary); background: transparent; }
.pr-tabs-content.tabs-content { border: 0; background: transparent; }
.pr-tabs-content .tabs-panel { padding: 0; }
.pr-tab-count { background: var(--pr-line-2); color: var(--pr-muted); border-radius: 10px; font-size: .72rem; padding: 1px 7px; margin-left: 4px; }

/* ---------- Timeline (history) ---------- */
.pr-timeline { list-style: none; margin: 0; padding: 8px 20px 12px; }
.pr-timeline li { position: relative; padding: 10px 0 10px 26px; border-left: 2px solid var(--pr-line); margin-left: 6px; }
.pr-timeline li::before { content: ""; position: absolute; left: -7px; top: 15px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--pr-primary); }
.pr-timeline li:last-child { border-left-color: transparent; }
.pr-timeline__when { font-size: .78rem; color: var(--pr-muted); }
.pr-timeline__what { font-size: .875rem; }
.pr-timeline__what strong { font-weight: 700; }

/* ---------- Alerts & empty states ---------- */
.pr-flash { display: flex; gap: 12px; align-items: flex-start; border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; border: 1px solid; font-size: .9rem; }
.pr-flash i.fa-solid { margin-top: 3px; }
.pr-flash ul { margin: 6px 0 0 18px; }
.pr-flash__close { margin-left: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .7; font-size: 1rem; padding: 0 4px; }
.pr-flash--success { background: var(--pr-ok-bg); border-color: #86EFAC; color: #14532D; }
.pr-flash--error { background: var(--pr-bad-bg); border-color: #FCA5A5; color: #7F1D1D; }
.pr-flash--warning { background: var(--pr-warn-bg); border-color: #FCD34D; color: #78350F; }
.pr-flash--info { background: var(--pr-primary-lt); border-color: #C3D9F1; color: #103E6B; }
.pr-note { background: #F6F8FB; border: 1px solid var(--pr-line-2); border-radius: 8px; padding: 10px 14px; font-size: .8125rem; color: var(--pr-muted); margin-bottom: 14px; }
.pr-note strong { color: var(--pr-text); }
.pr-note--warn { background: var(--pr-warn-bg); border-color: #FCD34D; color: #78350F; }
.pr-empty { text-align: center; padding: 36px 20px; color: var(--pr-muted); font-size: .9rem; }
.pr-empty i { font-size: 1.5rem; color: #AEBCC8; display: block; margin-bottom: 8px; }

/* ---------- Modals ---------- */
.reveal { border-radius: 14px; border: 0; box-shadow: var(--pr-shadow-lg); padding: 24px; }
.reveal-overlay { background: rgba(15, 43, 61, .45); }
.pr-modal__title { font-family: var(--pr-head); font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.pr-modal__title i { color: var(--pr-warn); }
.pr-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.pr-loader { position: fixed; inset: 0; background: rgba(243, 246, 249, .6); display: none; place-items: center; z-index: 2000; }
.pr-loader.is-on { display: grid; }
.pr-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--pr-primary-lt); border-top-color: var(--pr-primary); animation: pr-spin .8s linear infinite; }
@keyframes pr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pr-spinner { animation-duration: 2.4s; } .button { transition: none; } }

/* ---------- Login ---------- */
body.pr-login { background: var(--pr-ink); min-height: 100vh; display: grid; place-items: center; padding: 24px; font-family: var(--pr-font); }
.pr-login__card { background: #fff; border-radius: 18px; width: 100%; max-width: 420px; padding: 36px 36px 28px; box-shadow: var(--pr-shadow-lg); }
.pr-login__brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.pr-login__brand .pr-brand__mark { width: 48px; height: 48px; }
.pr-login__brand .pr-brand__logo { height: 56px; max-width: 160px; border: 1px solid var(--pr-line); }
.pr-login__brand .pr-brand__mark { border: 0; color: var(--pr-ink); font-size: 1.25rem; }
.pr-login h1 { font-size: 1.35rem; }
.pr-login__sub { color: var(--pr-muted); font-size: .875rem; }
.pr-login .button { width: 100%; justify-content: center; padding: .8em; font-size: .95rem; margin-top: 6px; }
.pr-login__foot { text-align: center; font-size: .78rem; color: #7FA0B5; margin-top: 18px; }

/* ---------- Existing project utility classes (subset) ---------- */
.mgb0 { margin-bottom: 0 !important; } .mgb5 { margin-bottom: 5px !important; } .mgb10 { margin-bottom: 10px !important; } .mgb20 { margin-bottom: 20px !important; }
.mgt0 { margin-top: 0 !important; } .mgt10 { margin-top: 10px !important; } .mgt20 { margin-top: 20px !important; }
.pd0 { padding: 0 !important; } .pd10 { padding: 10px !important; } .pd20 { padding: 20px !important; }
.pdl20 { padding-left: 20px !important; } .pdr20 { padding-right: 20px !important; }
.txac { text-align: center !important; } .txar { text-align: right !important; } .txal { text-align: left !important; }
.hidFld { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .pr-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-stat:nth-child(3) { border-right: 0; }
  .pr-stat:nth-child(-n+3) { border-bottom: 1px solid var(--pr-line-2); }
  .pr-grid--side { grid-template-columns: minmax(0, 1fr); }
  .pr-money-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pr-form .pr-field-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .pr-shell { grid-template-columns: minmax(0, 1fr); }
  .pr-main { grid-column: 1; }
  .pr-side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--pr-side-w); transform: translateX(-100%); transition: transform .2s ease; z-index: 50; visibility: hidden; }
  .pr-side.is-open { transform: none; visibility: visible; box-shadow: var(--pr-shadow-lg); }
  .pr-scrim.is-open { display: block; }
  .pr-menu-btn { display: inline-block; }
  .pr-top { padding: 14px 16px; }
  .pr-content { padding: 20px 16px 40px; }
  .pr-grid--2, .pr-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .pr-top__date { display: none; }
}
@media (max-width: 640px) {
  .pr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-stat { border-right: 0; border-bottom: 1px solid var(--pr-line-2); }
  .pr-money-row { grid-template-columns: minmax(0, 1fr); }
  .pr-form .pr-field-grid, .pr-form .pr-field-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .pr-form .pr-span-2 { grid-column: auto; }
  .pr-toolbar label, .pr-toolbar select, .pr-toolbar input, .pr-toolbar input.pr-date,
  .pr-form.pr-toolbar select, .pr-form.pr-toolbar input[type=text], .pr-form.pr-toolbar input[type=search], .pr-form.pr-toolbar input.pr-date { width: 100%; min-width: 0; max-width: none; }
  .pr-toolbar .button { flex: 1; justify-content: center; }
  .pr-row-actions { white-space: normal; }
  .pr-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pr-kv dd { margin-bottom: 8px; }
  .pr-board { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .pr-form-actions { flex-wrap: wrap; }
}

/* ---------- Print (reports, receipts) ---------- */
.pr-print-only { display: none; }
@media print {
  @page { margin: 14mm; }
  body.pr-app { background: #fff; font-size: 10.5pt; }
  .pr-side, .pr-top, .pr-toolbar, .pr-no-print, .pr-flash, .dt-layout-row:not(.dt-layout-table), .button, .reveal-overlay { display: none !important; }
  .pr-shell { display: block; }
  .pr-content { padding: 0; max-width: none; }
  .pr-panel { border: 0; box-shadow: none; }
  .pr-panel__head { padding: 0 0 8px; }
  .pr-print-only { display: block; }
  .pr-table th { background: #eee !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .pr-badge { padding: 0; background: none !important; color: #000 !important; }
  a { color: #000; text-decoration: none; }
}

/* ---------- Foundation overrides (selects, disabled buttons) ---------- */
.pr-form select, .pr-toolbar select { padding-right: 2rem; background-position: right -1.4rem center; background-size: 9px 6px; text-overflow: ellipsis; }
.button[disabled], .button.disabled, .button[disabled]:hover, .button.disabled:hover { background: var(--pr-primary); color: #fff; opacity: .45; }
.button.secondary[disabled], .button.secondary[disabled]:hover { background: var(--pr-surface); color: var(--pr-text); }
.button.alert[disabled] { background: var(--pr-bad); }
.pr-report td { white-space: nowrap; }
@media print { .pr-report td { white-space: normal; } }

/* DataTables: keep headers left-aligned unless the column is a money/number column */
table.dataTable th.dt-type-numeric, table.dataTable th.dt-type-date,
table.dataTable td.dt-type-numeric, table.dataTable td.dt-type-date { text-align: left; }
table.dataTable th.r, table.dataTable td.r { text-align: right; }
table.dataTable thead > tr > th.dt-orderable-asc, table.dataTable thead > tr > th.dt-orderable-desc { padding-right: 26px; }


/* =====================================================================
   SME Payroll additions: stepper, summary, issues, cards, checklists
   ===================================================================== */
.pr-form .pr-field-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pr-form .pr-span-3 { grid-column: span 3; }
.pr-form .pr-span-4 { grid-column: 1 / -1; }
.pr-panel--tight { margin-bottom: 16px; }
.pr-panel--info { border-left: 4px solid var(--pr-accent); }
.pr-card-big { font-family: var(--pr-head); font-size: 1.9rem; font-weight: 700; line-height: 1.15; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.pr-group-title { margin: 28px 0 12px; font-size: .95rem; color: var(--pr-muted); text-transform: uppercase; letter-spacing: .04em; }
.pr-group-title:first-child { margin-top: 0; }
.button.large { padding: 1em 1.6em; font-size: 1rem; }

/* Cards (settings, reports) */
.pr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 8px; }
.pr-card { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--pr-surface); border: 1px solid var(--pr-line); border-radius: var(--pr-radius); box-shadow: var(--pr-shadow); text-decoration: none; color: var(--pr-text); transition: border-color .15s, box-shadow .15s; }
.pr-card:hover, .pr-card:focus { border-color: var(--pr-accent); color: var(--pr-text); box-shadow: 0 4px 14px rgba(0, 107, 169, .14); }
.pr-card__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--pr-primary-lt); color: var(--pr-primary); display: grid; place-items: center; font-size: 1.1rem; }
.pr-card__title { font-family: var(--pr-head); font-weight: 700; font-size: .98rem; }
.pr-card__text { color: var(--pr-muted); font-size: .84rem; line-height: 1.45; }

/* Stepper (payroll workflow and setup wizard) */
.pr-stepper { list-style: none; margin: 0 0 22px; padding: 0; display: flex; gap: 0; }
.pr-stepper li { flex: 1; position: relative; text-align: center; min-width: 0; }
.pr-stepper li a { text-decoration: none; color: inherit; display: block; }
.pr-stepper li::before { content: ""; position: absolute; top: 16px; left: -50%; width: 100%; height: 3px; background: var(--pr-line); z-index: 0; }
.pr-stepper li:first-child::before { display: none; }
.pr-stepper li.is-done::before, .pr-stepper li.is-current::before { background: var(--pr-primary); }
.pr-stepper li.is-blocked::before { background: var(--pr-bad); }
.pr-stepper__dot { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; background: var(--pr-surface); border: 3px solid var(--pr-line); display: grid; place-items: center; margin: 0 auto 6px; font-weight: 700; font-size: .85rem; color: var(--pr-muted); }
.pr-stepper li.is-done .pr-stepper__dot { background: var(--pr-primary); border-color: var(--pr-primary); color: #fff; }
.pr-stepper li.is-current .pr-stepper__dot { border-color: var(--pr-primary); color: var(--pr-primary-dk); box-shadow: 0 0 0 4px var(--pr-primary-lt); }
.pr-stepper li.is-blocked .pr-stepper__dot { border-color: var(--pr-bad); background: var(--pr-bad-bg); color: var(--pr-bad-text); }
.pr-stepper__label { display: block; font-size: .78rem; color: var(--pr-muted); line-height: 1.25; padding: 0 4px; }
.pr-stepper li.is-current .pr-stepper__label, .pr-stepper li.is-done .pr-stepper__label { color: var(--pr-text); font-weight: 600; }
.pr-stepper li.is-blocked .pr-stepper__label { color: var(--pr-bad-text); font-weight: 600; }
.pr-stepper li a:hover .pr-stepper__label { text-decoration: underline; }
.pr-stepper--8 .pr-stepper__label { font-size: .74rem; }

.pr-nextbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pr-nextbar__text { margin: 6px 0 0; color: var(--pr-text); }

/* Owner summary tiles */
.pr-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pr-summary__tile { background: var(--pr-canvas); border: 1px solid var(--pr-line-2); border-radius: var(--pr-radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr-summary__tile--key { background: var(--pr-primary-lt); border-color: #B6D6EA; }
.pr-summary__label { font-size: .8rem; color: var(--pr-muted); font-weight: 600; }
.pr-summary__amount { font-family: var(--pr-head); font-size: 1.45rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.pr-summary__note { font-size: .76rem; color: var(--pr-muted); }
.pr-summarybar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pr-summarybar a { text-decoration: none; }

/* Review and Fix */
.pr-issue-list { list-style: none; margin: 0; padding: 0; }
.pr-issue-list > li { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--pr-line-2); }
.pr-issue-list > li:last-child { border-bottom: 0; }
.pr-issue__body { min-width: 0; }
.pr-issue__msg { margin: 6px 0 0; font-weight: 600; }
.pr-issue__why { margin: 3px 0 0; color: var(--pr-muted); font-size: .84rem; }
.pr-issues--blocking { border-left: 4px solid var(--pr-bad); }
.pr-issues--warning { border-left: 4px solid var(--pr-warn-line); }
.pr-issues--info { border-left: 4px solid var(--pr-accent); }
.pr-issues .pr-panel__head h2 { display: flex; align-items: center; gap: 8px; }
.pr-row-flag td { background: #FFFBEB; }

/* Employee breakdown */
.pr-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pr-flow__box { background: var(--pr-canvas); border: 1px solid var(--pr-line-2); border-radius: var(--pr-radius-sm); padding: 14px 20px; display: flex; flex-direction: column; min-width: 190px; }
.pr-flow__box--key { background: var(--pr-primary); border-color: var(--pr-primary); color: #fff; }
.pr-flow__label { font-size: .8rem; opacity: .9; font-weight: 600; }
.pr-flow__amount { font-family: var(--pr-head); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pr-flow__op { font-size: 1.6rem; color: var(--pr-muted); }
.pr-why { border: 1px solid var(--pr-line-2); border-radius: var(--pr-radius-sm); margin-bottom: 10px; background: var(--pr-surface); }
.pr-why > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.pr-why > summary::-webkit-details-marker { display: none; }
.pr-why > summary::before { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .7rem; margin-right: 10px; color: var(--pr-primary); transition: transform .15s; }
.pr-why[open] > summary::before { transform: rotate(90deg); }
.pr-why__name { flex: 1; }
.pr-why__amount { font-family: var(--pr-head); font-variant-numeric: tabular-nums; color: var(--pr-primary-dk); }
.pr-why > .pr-plain, .pr-why > .pr-help { margin: 0 16px 12px 36px; }
.pr-plain { margin: 6px 0; padding-left: 18px; }
.pr-plain li { margin: 3px 0; }

/* Lists, checklists, chips, collapsible blocks */
.pr-list { list-style: none; margin: 0; padding: 0; }
.pr-list > li { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--pr-line-2); }
.pr-list > li:last-child { border-bottom: 0; }
.pr-list__text { flex: 1; min-width: 0; }
.pr-list__icon { color: var(--pr-primary); width: 20px; text-align: center; }
.pr-checklist { list-style: none; margin: 0; padding: 12px 20px 16px; }
.pr-checklist li { padding: 6px 0; color: var(--pr-muted); display: flex; gap: 10px; align-items: flex-start; }
.pr-checklist li i { margin-top: 3px; }
.pr-checklist li.is-done { color: var(--pr-text); }
.pr-checklist li.is-done i { color: var(--pr-ok); }
.pr-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pr-chips li { background: var(--pr-primary-lt); color: var(--pr-primary-dk); padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.pr-more > summary { cursor: pointer; font-weight: 600; color: var(--pr-primary); list-style: none; padding: 4px 0; }
.pr-more > summary::-webkit-details-marker { display: none; }
.pr-more > summary i { font-size: .7rem; margin-right: 6px; transition: transform .15s; }
.pr-more[open] > summary i { transform: rotate(90deg); }
.pr-more--panel { padding: 0 20px; border-top: 1px solid var(--pr-line-2); }
.pr-more--panel > summary { padding: 14px 0; }
.pr-diff > summary { cursor: pointer; color: var(--pr-primary); font-size: .82rem; }
.pr-diff pre { white-space: pre-wrap; word-break: break-word; font-size: .75rem; background: var(--pr-canvas); border: 1px solid var(--pr-line-2); border-radius: 6px; padding: 8px; margin: 4px 0; max-width: 460px; }
.pr-checks { display: flex; flex-direction: column; gap: 12px; }
.pr-checks--grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; }
.pr-checks .pr-check > span { display: flex; flex-direction: column; }

/* Matrix and attendance grids */
.pr-matrix th.c, .pr-matrix td.c { text-align: center; }
.pr-matrix th { font-size: .74rem; white-space: normal; min-width: 84px; }
.pr-matrix__group td { background: var(--pr-line-2); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--pr-muted); }
.pr-att input { margin: 0; height: 2.2rem; min-width: 78px; text-align: right; }

/* Payslip viewer */
.pr-pdf { padding: 0; overflow: hidden; }
.pr-pdf__frame { width: 100%; height: 78vh; min-height: 520px; border: 0; display: block; background: #E8E8E6; }

@media (max-width: 1100px) {
  .pr-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-form .pr-field-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-checks--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pr-summary { grid-template-columns: minmax(0, 1fr); }
  .pr-form .pr-field-grid--4 { grid-template-columns: minmax(0, 1fr); }
  .pr-checks--grid { grid-template-columns: minmax(0, 1fr); }
  .pr-stepper { flex-wrap: wrap; row-gap: 12px; }
  .pr-stepper li { flex: 0 0 25%; }
  .pr-stepper li::before { display: none; }
  .pr-issue-list > li { flex-direction: column; align-items: flex-start; }
  .pr-flow__box { min-width: 0; flex: 1 1 100%; }
}
@media print {
  .pr-stepper, .pr-nextbar { display: none !important; }
}

/* Grids of panels keep a gap below them */
.pr-grid { margin-bottom: 24px; }
.pr-grid .pr-grid { margin-bottom: 0; }
.pr-stack { min-width: 0; }

/* Help page */
.pr-walk li { color: var(--pr-text); align-items: center; }
.pr-walk__n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--pr-primary); color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: .8rem; }
.pr-faq__a { margin: 0 16px 14px 36px; line-height: 1.55; }
.pr-panel--form .pr-panel__body #helpSearch { max-width: 480px; }
