/* PR Payroll: one stylesheet, no build step. Palette and type match the approved mockups. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap");

:root {
  --ground: #F3F5F7; --surface: #FFFFFF; --border: #DDE2E8; --border-strong: #CBD3DC;
  --ink: #17202A; --ink-2: #2C3846; --muted: #4E5B69;
  --accent: #1D5C8C; --accent-dark: #154A72; --accent-soft: #E6EFF6;
  --warn: #8A4209; --warn-soft: #FDF0E3; --error: #8A2C0B;
  --radius: 12px; --brand: #14324A;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink);
  font: 15px/1.5 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }
h1 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -0.01em; }
h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 600; }
.warn { color: var(--warn); } .mt { margin-top: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout */
.shell { min-height: 100vh; display: flex; flex-wrap: wrap; }
.sidebar { flex: 1 1 220px; max-width: 100%; background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.content { flex: 999 1 560px; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px; }
.employer { display: flex; align-items: center; gap: 12px; padding: 0 8px; }
.employer-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; }
.logo-placeholder { width: 44px; height: 44px; border: 1.5px dashed #8A96A3; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 11px; color: var(--muted); flex: none; }
.employer-text { display: flex; flex-direction: column; min-width: 0; }
.employer-name { font-weight: 600; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav-soon { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: #F4F7FA; }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.nav-soon { color: #6B7785; } .nav-soon em, .tab-soon em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #EEF1F4; }
.sidebar-user { margin-top: auto; padding: 12px; border-top: 1px solid #E6EAEF; display: flex; flex-direction: column; gap: 2px; }
.link-button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 32px; text-align: left; }

/* Page pieces */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow-muted { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.notice { padding: 14px 18px; border-radius: 10px; background: var(--warn-soft); color: #6B3407; }
.error-notice { background: #FBE9E4; color: var(--error); }
.note { margin: 12px 0; padding: 12px 14px; border-radius: 8px; background: #F1F5F9; color: var(--ink-2); font-size: 14px; }
.messages { display: flex; flex-direction: column; gap: 8px; }
.message { margin: 0; padding: 12px 16px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-dark); }
.message.error { background: #FBE9E4; color: var(--error); }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { text-decoration: none; font-weight: 500; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; }
.btn:hover { background: #F7F9FB; color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.btn.primary:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn.block { width: 100%; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 20px; }
.form-actions.sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--ground) 30%); }

/* Forms */
label { font-size: 14px; font-weight: 500; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=time],
input[type=search], input[type=password], select, textarea {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-variant-numeric: tabular-nums; }
textarea { min-height: 88px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.help { font-size: 13px; color: var(--muted); }
.error { font-size: 13px; color: var(--error); font-weight: 500; }
.pills { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills legend { width: 100%; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.pills > div { display: contents; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border-strong);
  border-radius: 8px; background: var(--surface); cursor: pointer; font-weight: 500; }
.pill:has(input:checked) { border: 2px solid var(--accent); padding: 0 13px; background: #F4F8FB; font-weight: 600; }
.pill input, .toggle input { margin: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.toggle { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 14px; border: 1px solid var(--border);
  border-radius: 10px; background: #F8F9FB; cursor: pointer; margin-top: 8px; }
.field.check { grid-column: 1 / -1; }
.field.check .toggle { margin-top: 0; }
[hidden] { display: none !important; }

/* Tabs, toolbar, tables */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs a, .tab-soon { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 500; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--ink); font-weight: 600; }
.tab-soon { color: #6B7785; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
.toolbar input[type=search] { flex: 1 1 260px; width: auto; }
.toolbar select { width: auto; }
.table-wrap { overflow-x: auto; padding: 0; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); background: #F8F9FB; }
th, td { padding: 12px 16px; border-bottom: 1px solid #EDF0F3; }
.card > .table-wrap { margin: 0 -24px -22px; }
.num { text-align: right; }
.chip { padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.chip.active { background: var(--accent-soft); color: var(--accent-dark); }
.chip.inactive { background: #ECEFF2; color: #3A4552; }

/* Settings */
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > * { flex: 1 1 320px; min-width: 0; }
.split .grid, .split.wide-left > :first-child { flex: 2 1 420px; }
.logo-box { display: flex; flex-direction: column; gap: 10px; }
.logo-preview { max-width: 220px; max-height: 120px; object-fit: contain; border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #FFFFFF; }
.logo-drop { height: 110px; border: 1.5px dashed #8A96A3; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); background: #F8F9FB; }

/* Employee profile */
.profile-head { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.profile-title { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }
.section-links { display: flex; flex-wrap: wrap; gap: 8px; }
.section-links a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--border-strong);
  border-radius: 99px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 560px) { .sections { grid-template-columns: 1fr; } .content { padding: 20px 16px 40px; } }

/* Sign-in pages (colors come from the firm's branding in config/branding.py) */
body.auth { background: #FFFFFF; --brand: #095344; --brand-accent: #00B46C; --brand-soft: #EAF7F0; }
body.auth a { color: var(--brand); }
body.auth :focus-visible { outline-color: var(--brand-accent); }
.auth-layout { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-brand { flex: 1 1 420px; padding: 40px 48px; background: #FFFFFF; color: var(--brand); display: flex; flex-direction: column; gap: 28px;
  border-right: 1px solid #D7EBE0; }
.firm-logo { width: 100%; max-width: 340px; height: auto; align-self: flex-start; }
.firm { display: flex; flex-direction: column; gap: 2px; }
.firm-name { font-size: 22px; font-weight: 700; color: var(--brand); }
.firm-subtitle { font-size: 15px; font-weight: 600; color: #2E6B5A; letter-spacing: 0.02em; }
.auth-pitch h1 { font-size: 34px; line-height: 1.15; margin-bottom: 12px; color: var(--brand); }
.auth-pitch p { margin: 0; font-size: 17px; color: #2F4A42; max-width: 460px; }
.auth-contact { display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.auth-contact a, .auth-contact span:not(.eyebrow) { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 600; text-decoration: none; }
.auth-contact svg, .auth-foot svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #3F7A69; }
.auth-copy { margin-top: auto; font-size: 13px; color: #4C6B62; }
.auth-main { flex: 1.3 1 480px; padding: 48px 24px; background: var(--brand-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px; background: #FFFFFF; border: 1px solid #CFE6DA; border-radius: 16px; display: flex; flex-direction: column; gap: 16px;
  box-shadow: 0 1px 2px rgba(9, 83, 68, 0.06); }
.auth-card h2 { margin: 0; font-size: 26px; color: var(--brand); }
.auth-card p { margin: 0; }
.auth-card form { display: flex; flex-direction: column; gap: 10px; }
.auth-card input:focus { outline: 2px solid var(--brand-accent); outline-offset: 1px; border-color: var(--brand-accent); }
.auth-card .btn.primary { background: var(--brand); border-color: var(--brand); margin-top: 8px; min-height: 50px; font-size: 16px; }
.auth-card .btn.primary:hover { background: #06402F; border-color: #06402F; }
.auth-card .btn:not(.primary) { border-color: #B9D9C8; color: var(--brand); }
.auth-card .btn:not(.primary):hover { background: var(--brand-soft); }
.auth-card .link-button { color: var(--brand); }
.code-input { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 28px !important; letter-spacing: 0.4em; text-align: center; min-height: 60px !important; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.row-between a { text-decoration: none; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font-size: 13px; color: #2F5C50; }
.auth-foot span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 560px) { .auth-brand { padding: 28px 24px; border-right: 0; border-bottom: 1px solid #D7EBE0; } .auth-pitch h1 { font-size: 28px; } }

/* Users and account pages */
.narrow-card { max-width: 720px; width: 100%; }
.stack { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pills.stacked { flex-direction: column; align-items: stretch; }
.pills.stacked .pill { min-height: 52px; padding: 10px 14px; align-items: flex-start; }
.pills.stacked .pill:has(input:checked) { padding: 9px 13px; }
.pills.stacked .pill input { margin-top: 2px; }
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.role-grid p { margin: 4px 0 0; }
