:root {
  --ink: #403e3d;
  --ink-hover: #51504f;
  --accent: #285ee8;
  --surface: #ffffff;
  --muted: #686562;
  --line: #bfbdbb;
  --subtle: #f9f8f7;
  --error: #b82e14;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--surface); color: var(--ink); font: 16px/1.5 var(--font-body); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink-hover); outline-offset: 4px; }
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: 43% 57%; }
.brand-panel { background: var(--surface); color: var(--ink); padding: 48px 56px 32px; display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-size: 30.4px; font-weight: 750; letter-spacing: -.08em; align-self: flex-start; color: #232426; }
.brand-mark { width: 33px; height: 33px; flex-shrink: 0; display: block; color: #0040ff; }
.brand-period { color: #0040ff; }
.brand-copy { margin: 64px 0 100px; }
.brand-copy h2 { font-size: clamp(36px, 3.6vw, 56px); font-weight: 400; letter-spacing: -.035em; line-height: 1.12; margin: 0 0 28px; }
.brand-copy p { color: var(--muted); line-height: 1.7; font-size: 17px; }
.brand-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 24px; }
.brand-bottom span:last-child { color: var(--ink); font-size: 24px; }
.auth-main { min-width: 0; padding: 48px 64px 24px; display: flex; flex-direction: column; }
.auth-content { width: 100%; max-width: 408px; margin: auto; padding: 56px 0 72px; }
h1 { font-size: 34px; line-height: 1.2; font-weight: 500; letter-spacing: -.03em; margin: 0 0 16px; text-wrap: balance; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 500; margin: 0 0 12px; }
p { margin: 0 0 20px; }
.intro { color: var(--muted); margin-bottom: 32px; line-height: 1.6; }
label, legend { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; }
input { display: block; width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 50px; color: var(--ink); background: var(--surface); margin-bottom: 20px; }
input::placeholder { color: var(--muted); }
input:hover { border-color: var(--muted); }
input:focus { border-color: var(--ink); }
.primary, .secondary { border-radius: 16px; width: 100%; min-height: 50px; padding: 12px 20px; font-weight: 500; }
.primary { background: var(--accent); color: var(--surface); border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center; gap: 24px; }
.primary:hover { background: #1d4ac2; border-color: #1d4ac2; }
.secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.secondary:hover { background: var(--subtle); border-color: var(--muted); }
.primary:active, .secondary:active { transform: translateY(1px); }
.divider { display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 13px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; height: 1px; flex: 1; background: var(--line); }
.footnote { font-size: 13px; color: var(--muted); margin: 24px 0 0; line-height: 1.6; }
.auth-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; gap: 16px; }
.text-button { padding: 8px 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--ink-hover); }
.back { margin: 0 0 20px; text-decoration: none; }
.skip { display: block; margin: 12px auto 0; }
.step-note { font-size: 14px; color: var(--muted); margin-bottom: 20px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.otp-fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp-fields input { height: 60px; padding: 8px 0; text-align: center; font-size: 25px; }
.passkey-note { background: var(--subtle); padding: 20px; border-radius: var(--radius); margin: 0 0 32px; font-size: 14px; }
.passkey-note p { margin: 8px 0 0; color: var(--muted); }
.status { color: var(--muted); font-size: 14px; }
.status:empty { display: none; }
.auth-status[data-ui-busy]::before { display: none; }
.auth-status:not([data-ui-busy]) { display: none; }
.auth-status { align-items: center; gap: 12px; }
.colliding-dots { display: inline-flex; align-items: center; gap: 8px; height: 16px; flex: 0 0 auto; }
.colliding-dots > span { display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--color-accent); animation: auth-dots-collide 1.2s cubic-bezier(.45, 0, .55, 1) infinite; }
.colliding-dots > span:nth-child(1) { --dot-shift: 27px; }
.colliding-dots > span:nth-child(2) { --dot-shift: 9px; }
.colliding-dots > span:nth-child(3) { --dot-shift: -9px; }
.colliding-dots > span:nth-child(4) { --dot-shift: -27px; }
@keyframes auth-dots-collide { 0%, 100% { transform: translateX(0) scale(1); } 48%, 55% { transform: translateX(var(--dot-shift)) scale(.75); } 75% { transform: translateX(0) scale(1.08); } }
.auth-transition { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--color-paper); color: var(--color-ink); }
.auth-transition-content { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; font-family: var(--font-body); font-size: 17px; font-weight: 600; }
.auth-transition-dots { height: 64px; }
.auth-transition-dots > span { width: 12px; height: 12px; }
.auth-success-tick.lucide-icon { width: 72px; height: 72px; color: var(--color-accent); animation: auth-tick-enter 300ms ease-out both; }
.auth-transition[data-state="loading"] .auth-success-tick, .auth-transition[data-state="success"] .auth-transition-dots { display: none; }
@keyframes auth-tick-enter { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
.error { color: var(--error); background: #ffebe6; padding: 16px; border-radius: var(--radius); font-size: 14px; }
.account-heading, .section-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.account-heading h1, .section-heading h2 { margin: 0; }
.account-heading { margin-bottom: 12px; }
.settings-group { padding: 28px 0; border-top: 1px solid var(--line); }
.settings-group > p { color: var(--muted); font-size: 14px; }
.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compact { width: auto; min-height: 44px; font-size: 14px; }
.settings-row { border-bottom: 1px solid var(--line); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.settings-row:last-child { border-bottom: 0; }
.settings-row p { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.key-name { display: flex; gap: 12px; align-items: center; min-width: 0; }
.key-name input { margin: 0; min-width: 0; }
.row-actions { display: flex; gap: 16px; }
.empty-state { color: var(--muted); font-size: 14px; padding-top: 20px; }
.danger { color: var(--error); }
form[data-auth-target="emailChangeForm"] { margin-top: 24px; }
dialog { border: 0; border-radius: 12px; padding: 32px; color: var(--ink); max-width: 480px; width: calc(100% - 32px); }
dialog::backdrop { background: #403e3d99; }
.dialog-actions { display: flex; gap: 12px; margin-top: 24px; }
@media (max-width: 1000px) {
  .brand-panel { padding-inline: 32px; }
  .auth-main { padding-inline: 32px; }
}
@media (max-width: 700px) {
  .auth-shell { display: block; }
  .brand-panel { min-height: auto; padding: 20px 24px; }
  .brand-copy, .brand-bottom { display: none; }
  .wordmark { font-size: 27px; }
  .auth-main { min-height: calc(100svh - 81px); padding: 24px; }
  .auth-content { padding: 32px 0 56px; margin: 0 auto auto; }
  h1 { font-size: 30px; }
  .name-grid { grid-template-columns: 1fr; gap: 0; }
  .settings-row { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .key-name { width: 100%; }
  .section-heading { align-items: flex-start; }
  .dialog-actions { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.turnstile-container:not(:empty) { margin-bottom: 24px; min-height: 65px; }

/* Shared blue controls; every page keeps a white background. */
:focus-visible { outline-color: var(--accent); }
input:focus { border-color: var(--accent); }
.brand-panel { position: relative; overflow: hidden; border-right: 1px solid #dce4f5; border-bottom-right-radius: 160px; }
.brand-panel::after { content: ""; position: absolute; width: 400px; height: 400px; border: 1px solid #dce4f5; border-radius: 50%; right: -260px; top: -220px; pointer-events: none; }
.primary { text-decoration: none; }
.centered-shell, .account-shell { min-height: 100svh; background: var(--surface); }
.centered-topbar, .account-topbar { max-width: 1440px; margin: auto; padding: 24px 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.centered-topbar .wordmark, .account-topbar .wordmark { font-size: 27px; }
.centered-shell .auth-main { padding-top: 16px; min-height: calc(100svh - 98px); }
.onboarding-header { text-align: center; margin: 8px 0 28px; }
.onboarding-header .step-note { margin-bottom: 8px; }
.onboarding-header h2 { font-size: 27px; letter-spacing: -.02em; }
.walkthrough { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; list-style: none; max-width: 640px; width: 100%; margin: 0 auto 44px; }
.walkthrough li { text-align: center; position: relative; color: var(--muted); }
.walkthrough li:not(:last-child)::after { content: ""; position: absolute; top: 20px; height: 1px; background: var(--line); left: calc(50% + 28px); width: calc(100% - 56px); }
.step-number { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 14px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 14px; }
.walkthrough strong { font-size: 14px; font-weight: 500; }
.walkthrough p { font-size: 12px; margin: 4px 8px 0; }
.walkthrough .is-current { color: var(--ink); }
.walkthrough .is-current .step-number { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.walkthrough .is-complete .step-number { color: var(--accent); border-color: var(--accent); }
.centered-shell .auth-content { max-width: 440px; padding: 0 0 48px; margin: 0 auto auto; }
.centered-shell .auth-content h1 { font-size: 32px; }
.centered-shell .auth-content .step-note { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.centered-shell .auth-footer { margin-top: 24px; }
.completion-mark { display: grid; place-items: center; width: 64px; height: 64px; border: 1px solid var(--accent); color: var(--accent); border-radius: 24px; font-size: 28px; margin-bottom: 24px; }
.passkey-note { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.account-topbar { border-bottom: 1px solid #e6e9ef; max-width: none; }
.settings-navigation { margin: 24px auto 0; max-width: 760px; padding: 0 24px; }
.settings-navigation nav { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.settings-navigation a { display: block; padding: 10px 16px; border-radius: 12px; text-decoration: none; font-size: 14px; }
.settings-navigation a:hover, .settings-navigation a:focus-visible { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.account-shell .auth-main { padding: 32px 24px 48px; }
.account-shell .auth-content { max-width: 760px; padding: 0; margin: 0 auto; }
.account-shell .account-heading { justify-content: center; text-align: center; margin-bottom: 8px; }
.account-shell .account-heading .step-note { margin: 0 0 8px; }
.account-shell [data-auth-target="accountEmail"] { text-align: center; margin-bottom: 32px; }
.account-shell .settings-group { border: 1px solid #dce2ed; border-radius: 24px; padding: 28px; margin-bottom: 24px; scroll-margin-top: 24px; }
.account-shell .section-heading { margin-bottom: 8px; }
@media (max-width: 700px) {
  .brand-panel { border-right: 0; border-bottom: 1px solid #e6e9ef; border-radius: 0 0 32px 0; }
  .brand-panel::after { display: none; }
  .centered-topbar, .account-topbar { padding: 16px 24px; }
  .centered-shell .auth-main { padding-top: 12px; }
  .onboarding-header { margin: 4px 0 24px; }
  .onboarding-header h2 { font-size: 24px; }
  .walkthrough { margin-bottom: 32px; }
  .walkthrough p { display: none; }
  .walkthrough strong { font-size: 12px; }
  .walkthrough li:not(:last-child)::after { left: calc(50% + 24px); width: calc(100% - 48px); }
  .account-shell .settings-group { padding: 20px; border-radius: 20px; }
  .settings-navigation { padding-inline: 16px; }
  .settings-navigation a { padding: 8px; font-size: 13px; }
  .account-shell .auth-main { padding-inline: 16px; }
}

.profile-avatar { display: block; border-radius: 28px; margin: 0 0 20px; object-fit: cover; }
.account-heading .profile-avatar { margin-inline: auto; }
.profile-username { color: var(--accent); font-weight: 600; margin: 0 0 12px; }
.field-help { font-size: 13px; color: var(--muted); margin-top: -8px; }
.username-continue { margin-top: 12px; }
.onboarding-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr); gap: 40px; max-width: 1240px; width: 100%; margin: 20px auto auto; }
.onboarding-workspace .walkthrough { display: flex; flex-direction: column; gap: 36px; margin: 0; }
.onboarding-workspace .walkthrough li { display: flex; gap: 16px; text-align: left; align-items: flex-start; }
.onboarding-workspace .step-number { flex: 0 0 40px; margin: 0; }
.onboarding-workspace .walkthrough p { margin: 4px 0 0; }
.onboarding-workspace .walkthrough li:not(:last-child)::after { left: 20px; top: 48px; width: 1px; height: calc(100% - 18px); }
.onboarding-workspace .auth-content { width: 100%; grid-column: 2; }
.onboarding-steps { width: 100%; max-width: 240px; justify-self: start; }
.onboarding-steps > .back { margin: 0 0 24px; }
@media (max-width: 1000px) {
  .onboarding-workspace { grid-template-columns: minmax(0, 440px); justify-content: center; gap: 28px; }
  .onboarding-workspace .auth-content { grid-column: 1; }
  .onboarding-steps { max-width: none; }
}
@media (max-width: 700px) {
  .onboarding-workspace { grid-template-columns: 1fr; gap: 28px; max-width: 440px; margin-top: 0; }
  .onboarding-workspace .walkthrough { gap: 16px; }
  .onboarding-workspace .walkthrough li { align-items: center; }
  .onboarding-workspace .step-number { width: 32px; height: 32px; flex-basis: 32px; }
  .onboarding-workspace .walkthrough li:not(:last-child)::after { left: 16px; top: 36px; height: 10px; }
}

.username-suggestions { margin: 24px 0 16px; }
.username-suggestions-list { display: flex; flex-wrap: wrap; gap: 8px; }
.username-suggestion { width: auto; min-height: 38px; padding: 8px 12px; border-radius: 999px; background: #eef3ff; color: var(--accent); border: 1px solid #d8e3ff; font-size: 13px; overflow-wrap: anywhere; }
.username-suggestion:hover { background: #dfe9ff; }
#username-status { font-size: 13px; min-height: 20px; }

/* Short, quiet feedback; movement is optional for reduced-motion users. */
[data-auth-target="panel"]:not([hidden]) { animation: auth-enter 240ms ease-out both; }
.auth-content input { transition: border-color 160ms ease, box-shadow 160ms ease; }
.auth-content button { transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.auth-content button:not(:disabled):active { transform: translateY(1px); }
.step-number { transition: background-color 220ms ease, border-color 220ms ease, color 220ms ease; }
.username-suggestion { animation: auth-enter 200ms ease-out both; }
.username-suggestion:nth-child(2) { animation-delay: 40ms; }
.username-suggestion:nth-child(3) { animation-delay: 80ms; }
#username-status { display: flex; align-items: center; gap: 8px; transition: color 160ms ease; }
#username-status[data-state="available"] { color: #187344; font-weight: 600; }
#username-status[data-state="available"]::before { content: "✓"; display: inline-grid; place-items: center; flex: 0 0 20px; height: 20px; border-radius: 50%; background: #e4f5eb; animation: username-confirm 220ms ease-out both; }
#username[data-availability="available"] { border-color: #218451; }
#username[data-availability="available"]:focus { outline-color: #218451; box-shadow: 0 0 0 4px #2184511a; }
#username-status[data-state="unavailable"], #username-status[data-state="invalid"] { color: #a33b28; }
#username-status[data-state="checking"]::before { content: ""; flex: 0 0 14px; height: 14px; border: 2px solid #d8e3ff; border-top-color: var(--accent); border-radius: 50%; animation: username-spin 700ms linear infinite; }
@keyframes auth-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes username-confirm { from { opacity: 0; transform: scale(.8); } to { opacity: 1; transform: scale(1); } }
@keyframes username-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .colliding-dots > span, .auth-success-tick.lucide-icon { animation: none; }
  [data-auth-target="panel"]:not([hidden]), .username-suggestion,
  #username-status[data-state]::before { animation: none; }
  .auth-content input, .auth-content button, .step-number, #username-status { transition: none; }
  .auth-content button:not(:disabled):active { transform: none; }
}

.settings-workspace { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 64px; max-width: 1108px; margin: 48px auto; padding: 0 32px; align-items: start; }
.settings-sidebar { position: sticky; top: 32px; }
.settings-sidebar .step-note { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.settings-sidebar h2 { margin: 0 0 24px; font-size: 26px; }
.settings-sidebar nav { display: flex; flex-direction: column; gap: 8px; }
.settings-sidebar a { padding: 14px 16px; border-radius: 14px; text-decoration: none; color: var(--ink); font-size: 14px; transition: background-color 160ms ease, color 160ms ease; }
.settings-sidebar a:hover { background: #f5f7fb; }
.settings-sidebar a[aria-current="page"] { color: var(--accent); background: #eef3ff; font-weight: 600; }
.account-shell .settings-workspace .auth-main { padding: 0; min-width: 0; }
@media (max-width: 800px) {
  .settings-workspace { grid-template-columns: minmax(0, 1fr); gap: 32px; margin: 24px auto; padding: 0 24px; }
  .settings-sidebar { position: static; }
  .settings-sidebar nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-sidebar h2 { margin-bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { .settings-sidebar a { transition: none; } }

.settings-page-heading { margin-bottom: 28px; }
.settings-page-heading h1 { margin-bottom: 12px; }
.settings-page-heading .intro { margin-bottom: 0; }
.current-email { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 24px; margin-bottom: 28px; border-bottom: 1px solid #e6e9ef; }
.current-email > div { min-width: 0; }
.field-label { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.account-shell .email-settings .current-email-value { text-align: left; margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.verified-label { display: inline-flex; gap: 6px; align-items: center; color: #187344; background: #e4f5eb; border-radius: 999px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.email-security { padding: 20px; border: 1px solid #d8e3ff; border-radius: 16px; margin-bottom: 28px; background: #f7f9ff; }
.email-security h2 { font-size: 16px; margin-bottom: 6px; }
.email-security p, .email-description { font-size: 14px; color: var(--muted); line-height: 1.6; }
.email-security p { margin-bottom: 16px; }
.email-update-form, .email-verification-form { max-width: 440px; }
.email-verification-form { border-top: 1px solid #e6e9ef; padding-top: 24px; animation: auth-enter 240ms ease-out both; }
.email-verification-form legend { font-size: 18px; margin-bottom: 12px; }
.email-verification-form strong { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.account-shell .email-settings .email-signout-note { font-size: 13px; margin: 24px 0 0; color: var(--muted); }
@media (max-width: 500px) {
  .current-email { align-items: flex-start; flex-direction: column; gap: 12px; }
  .email-settings .primary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .email-verification-form { animation: none; } }

.email-change-policy { padding: 20px; border: 1px solid #d8e3ff; border-radius: 16px; background: #f7f9ff; overflow-wrap: anywhere; }

/* Programmatically focused headings keep their plain appearance. */
.account-shell h1[tabindex="-1"]:focus { outline: none; }

.account-logs { padding: 0; margin: 0 0 20px; list-style: none; }
.account-log { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 20px 0; border-bottom: 1px solid #e6e9ef; }
.account-log:last-child { border-bottom: 0; }
.account-log strong { font-size: 15px; font-weight: 600; }
.account-log p { font-size: 13px; color: var(--muted); margin: 6px 0; }
.log-device { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.account-log time { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 600px) { .account-log { flex-direction: column; gap: 8px; } }

.workspace-toplinks { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 14px; }
.workspace-directory { max-width: 1100px; margin: 56px auto; padding: 0 28px; }
.workspace-form { max-width: 496px; margin: 64px auto; padding: 0 28px; }
.workspace-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.workspace-actions a { text-decoration: none; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.workspace-card { border: 1px solid #dce2ed; border-radius: 24px; padding: 28px; }
.workspace-card img { object-fit: contain; border-radius: 12px; margin-bottom: 20px; }
.workspace-card p { color: var(--muted); overflow-wrap: anywhere; font-size: 14px; }
.workspace-card .primary { margin-top: 24px; }
.workspace-card .text-button { display: inline-block; margin-top: 12px; }
.workspace-empty { padding: 48px 28px; border: 1px dashed #dce2ed; border-radius: 24px; text-align: center; color: var(--muted); }
.subdomain-field { display: flex; align-items: center; gap: 8px; }
.subdomain-field input { min-width: 0; }
.subdomain-field span { margin-bottom: 20px; color: var(--muted); }
[data-workspace-target="suggestions"] { margin-bottom: 24px; }
[data-workspace-target="availability"].available { color: #187344; }
[data-workspace-target="addressSearch"] { margin-bottom: 20px; }
[data-workspace-target="panel"]:not([hidden]) { animation: auth-enter 240ms ease-out both; }
select { font: inherit; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 14px; padding: 12px; max-width: 100%; margin-bottom: 20px; }
.settings-row select { margin: 0; }
@media (prefers-reduced-motion: reduce) { [data-workspace-target="panel"]:not([hidden]) { animation: none; } }

.workspace-directory-centered { max-width: 960px; margin: clamp(40px, 8vh, 100px) auto; text-align: center; }
.workspace-directory-centered .intro { margin-left: auto; margin-right: auto; max-width: 480px; }
.workspace-directory-centered .workspace-actions { justify-content: center; margin: 28px 0 40px; }
.workspace-icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.workspace-emblem { margin: 0 auto 24px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: #eef3ff; color: var(--accent); }
.workspace-emblem .workspace-icon { width: 30px; height: 30px; }
.workspace-actions a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.workspace-directory-centered .workspace-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 360px)); justify-content: center; }
.workspace-directory-centered .workspace-empty { grid-column: 1 / -1; }
.workspace-directory-centered .workspace-card { text-align: left; background: #fff; }
.subdomain-lock { display: flex; align-items: center; gap: 8px; }
.subdomain-lock .workspace-icon { width: 16px; height: 16px; }
.logo-upload { padding: 24px; margin-bottom: 24px; border: 1px dashed #bbc9df; border-radius: 20px; text-align: center; transition: border-color 160ms, background 160ms; }
.logo-upload.is-dragging { border-color: var(--accent); background: #eef3ff; }
.logo-upload-preview { position: relative; display: grid; place-items: center; margin: 0 auto 14px; width: 72px; height: 72px; background: #f3f6fb; border-radius: 16px; color: var(--accent); }
.logo-upload-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 16px; background: white; }
.logo-upload strong { display: block; overflow-wrap: anywhere; font-size: 14px; }
.logo-upload p { font-size: 12px; color: var(--muted); margin: 8px 0 14px; }
.logo-upload .logo-choose { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
.logo-choose input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.logo-choose:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.logo-upload .text-button { display: block; margin: 12px auto 0; }
.logo-upload .text-button[hidden] { display: none; }
.logo-upload .upload-error { color: #a33b28; margin-bottom: 0; }
.upload-error:empty { display: none; }
.company-phone-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 12px; }
.company-phone-fields select { width: 100%; }
@media (max-width: 500px) { .company-phone-fields { grid-template-columns: 1fr; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .logo-upload { transition: none; } }

[data-workspace-target="addressSearch"] gmp-place-autocomplete { display: block; width: 100%; min-height: 48px; color-scheme: light; border-radius: 14px; }
[data-workspace-target="panel"] input[name^="address_line"] { display: block; width: 100%; box-sizing: border-box; }

.organization-logo, .workspace-card img.organization-logo { display: block; object-fit: contain; box-sizing: border-box; padding: 10px; border: 1px solid #dce2ed; border-radius: 18px; background: white; }
.workspace-directory-centered > .organization-logo { margin: 0 auto 24px; }
.logo-upload-preview { border: 1px solid #dce2ed; box-sizing: border-box; }
.logo-upload-preview img { padding: 6px; box-sizing: border-box; }
.profile-dropdown { position: relative; z-index: 20; text-align: left; }
.profile-dropdown summary { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 10px 6px 6px; border: 1px solid #e5e9f0; border-radius: 999px; list-style: none; font-size: 14px; }
.profile-dropdown summary::-webkit-details-marker { display: none; }
.profile-dropdown summary img { border-radius: 50%; object-fit: contain; background: #f2f5fb; border: 1px solid #e5e9f0; }
.profile-dropdown summary span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dropdown summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-dropdown-menu { position: absolute; right: 0; top: 100%; width: 248px; max-width: calc(100vw - 40px); margin-top: 8px; padding: 10px; border-radius: 18px; background: white; border: 1px solid #e3e8f0; box-shadow: 0 12px 36px #182a4514; }
.profile-dropdown-menu::before { content: ""; position: absolute; height: 10px; top: -10px; left: 0; right: 0; }
.profile-dropdown-menu p { padding: 8px 10px; margin: 0; }
.profile-dropdown-menu a, .profile-dropdown-menu button { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; border: 0; border-radius: 10px; padding: 12px 10px; background: white; color: var(--ink); text-align: left; text-decoration: none; font: inherit; font-size: 14px; cursor: pointer; }
.profile-dropdown-menu a:hover, .profile-dropdown-menu button:hover, .profile-dropdown-menu a:focus-visible, .profile-dropdown-menu button:focus-visible { background: #eef3ff; color: var(--accent); }
.profile-dropdown-menu button { border-top: 1px solid #edf0f5; border-radius: 0 0 10px 10px; margin-top: 4px; }
.workspace-login-card { max-width: 440px; margin: clamp(48px, 12vh, 140px) auto; padding: 0 24px; text-align: center; }
.workspace-login-card > .organization-logo { margin: 0 auto 28px; }
.workspace-login-card h1 { overflow-wrap: anywhere; }
.workspace-login-card .primary { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.workspace-login-card .footnote { margin-top: 24px; }
@media (max-width: 500px) { .profile-dropdown summary span { max-width: 100px; } }

.workspace-login-shell { display: flex; flex-direction: column; min-height: 100svh; background: white; }
.workspace-login-shell .workspace-login-card { width: min(100%, 440px); box-sizing: border-box; margin: auto; padding: 64px 24px 40px; }
.workspace-login-logo { display: block; object-fit: contain; margin: 0 auto 28px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.workspace-login-company { font-size: 22px; font-weight: 600; margin-bottom: 28px; }
.workspace-login-card form { text-align: left; }
.workspace-login-card .primary { width: 100%; }

/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 */
/* PayHR.ca sign-in: full-panel SVG shapes beside a viewport-height auth flow. */
.login-shell {
  --login-ink: var(--color-ink);
  --login-muted: var(--color-muted);
  --login-rule: var(--color-rule);
  --login-accent: var(--color-accent);
  --login-paper: var(--color-paper);
  --login-blue: #0738c8;
  --login-powder: #a8c6ff;
  --login-ice: #d9e7ff;
  --login-white: #f9fbff;
  font-family: var(--font-body);
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  height: 100svh;
  min-height: 0;
  overflow: hidden;
}
.login-shell .brand-panel {
  isolation: isolate;
  background: var(--login-blue);
  color: var(--login-white);
  border: 0;
  border-radius: 0;
  padding: clamp(28px, 4vw, 58px);
  min-width: 0;
  min-height: 0;
  justify-content: flex-start;
}
.login-shell .brand-panel::after { content: none; }
.login-shell .wordmark { position: relative; z-index: 1; color: var(--login-white); }
.login-shell .brand-mark, .login-shell .brand-period { color: var(--login-white); }
.login-shell .brand-copy { position: relative; z-index: 1; margin: clamp(72px, 11vh, 132px) 0 0; max-width: 510px; }
.login-shell .brand-eyebrow { margin: 0 0 22px; color: var(--login-ice); font-size: 11px; font-weight: 700; letter-spacing: .15em; line-height: 1.4; }
.login-shell .brand-copy h2 { color: var(--login-white); margin: 0 0 20px; font-family: var(--font-display); font-size: clamp(38px, 4.5vw, 66px); font-weight: 650; line-height: 1.04; letter-spacing: -.055em; overflow-wrap: anywhere; }
.login-shell .brand-copy > p:last-child { color: var(--login-ice); margin: 0; max-width: 330px; font-size: 16px; line-height: 1.6; }
.login-shell .brand-art { display: block; position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.login-shell .shape { transform-box: fill-box; transform-origin: center; }
.login-shell .shape-orbit { fill: var(--login-powder); animation: login-bounce-a 5s ease-in-out infinite; }
.login-shell .shape-pill { fill: var(--login-ice); animation: login-bounce-b 4.3s ease-in-out infinite; }
.login-shell .shape-disc { fill: var(--login-white); animation: login-bounce-a 4.7s ease-in-out -1.6s infinite; }
.login-shell .shape-dot { fill: var(--login-white); animation: login-bounce-b 3.4s ease-in-out -.7s infinite; }
@keyframes login-bounce-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }
@keyframes login-bounce-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(18px); } }
.login-shell .auth-main { min-height: 0; height: 100%; overflow-y: auto; padding: clamp(24px, 4vh, 48px) clamp(28px, 6.5vw, 112px) 22px; }
.login-shell .auth-content { max-width: 430px; padding: 0; }
.login-shell h1 { color: var(--login-ink); font-family: var(--font-display); font-size: clamp(34px, 3.2vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -.045em; }
.login-shell .intro { max-width: 390px; }
.login-shell label { color: var(--login-ink); }
.login-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 52px; border-radius: 10px; font-size: 15px; }
.login-shell .primary, .login-shell .secondary { min-height: 52px; }
.login-shell .auth-footer { border-top: 1px solid var(--login-rule); padding-top: 14px; line-height: 1.4; }
@media (max-width: 850px) {
  .login-shell { grid-template-columns: minmax(0, 44%) minmax(0, 56%); }
  .login-shell .brand-copy { margin-top: 72px; }
  .login-shell .brand-copy h2 { font-size: clamp(35px, 5vw, 48px); }
  .login-shell .auth-main { padding-inline: 32px; }
}
@media (max-width: 700px) {
  .login-shell { display: flex; flex-direction: column; }
  .login-shell .brand-panel { flex: 0 0 68px; min-height: 0; padding: 17px 24px; border-radius: 0; }
  .login-shell .brand-copy { display: none; }
  .login-shell .brand-art { left: auto; width: 48%; opacity: .5; }
  .login-shell .auth-main { flex: 1 1 auto; height: auto; min-height: 0; padding: 14px 24px 16px; }
  .login-shell .auth-content { width: 100%; max-width: 430px; margin: auto; padding: 0; }
  .login-shell .auth-footer { max-width: 430px; width: 100%; margin-inline: auto; }
  .login-shell h1 { font-size: 30px; margin-bottom: 8px; }
  .login-shell .intro { margin-bottom: 18px; line-height: 1.45; }
  .login-shell label { margin-bottom: 6px; }
  .login-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 46px; margin-bottom: 14px; }
  .login-shell .primary, .login-shell .secondary { min-height: 46px; }
  .login-shell .divider { margin: 14px 0; }
  .login-shell .footnote { margin-top: 12px; line-height: 1.4; }
}
@media (max-width: 380px) {
  .login-shell .auth-footer { flex-direction: column; gap: 3px; }
}
@media (max-height: 650px) {
  .login-shell .auth-main { padding-block: 12px; }
  .login-shell .auth-footer { padding-top: 8px; }
  .login-shell .footnote { margin-top: 10px; }
}
@media (max-width: 700px) and (max-height: 600px) {
  .login-shell .brand-panel { flex-basis: 60px; padding-block: 13px; }
  .login-shell .auth-footer { display: none; }
  .login-shell h1 { font-size: 27px; margin-bottom: 6px; }
  .login-shell .intro { font-size: 14px; margin-bottom: 12px; }
  .login-shell label { margin-bottom: 5px; }
  .login-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 44px; margin-bottom: 10px; }
  .login-shell .primary, .login-shell .secondary { min-height: 44px; }
  .login-shell .divider { margin-block: 10px; }
  .login-shell .footnote { font-size: 12px; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-shell .shape { animation: none; }
}
.workspace-powered-by { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 28px 24px; color: var(--muted); font-size: 12px; }
.workspace-powered-by .wordmark { font-size: 19px; gap: 7px; }
.workspace-powered-by .brand-mark { width: 24px; height: 24px; }

.organization-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100svh - 100px); border-top: 1px solid #edf0f5; }
.organization-sidebar { padding: 28px 16px; border-right: 1px solid #edf0f5; background: #fff; }
.organization-sidebar-heading { margin-bottom: 28px; padding: 0 10px; }
.organization-sidebar-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.organization-sidebar-identity > div { min-width: 0; }
.organization-sidebar-identity .organization-logo { padding: 5px; border-radius: 12px; flex-shrink: 0; }
.organization-sidebar-identity .step-note { display: block; margin: 0 0 4px; font-size: 11px; }
.organization-sidebar-identity strong { display: block; overflow-wrap: anywhere; font-size: 15px; line-height: 1.4; }
.organization-navigation { display: flex; flex-direction: column; gap: 8px; }
.organization-navigation a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 4px; color: var(--ink); font-size: 14px; border-radius: 12px; text-decoration: none; transition: background 160ms, color 160ms; }
.organization-navigation a:hover, .organization-navigation a:focus-visible { background: #f0f3f9; }
.organization-navigation a[aria-current=page] { background: #eaf0ff; color: var(--accent); font-weight: 600; }
.organization-nav-label { margin: 24px 14px 12px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.organization-nav-footer { border-top: 1px solid #e5eaf2; padding-top: 16px; margin-top: 24px; }
.organization-main { min-width: 0; padding: 48px clamp(24px, 5vw, 80px); }
.organization-main > .auth-content { width: 100%; max-width: 880px; margin: 0 auto; }
.organization-overview { padding-top: 24px; }
.organization-nav-toggle { display: none; }
@media (max-width: 800px) {
  .organization-layout { grid-template-columns: minmax(0, 1fr); }
  .organization-sidebar { padding: 16px 24px; border-right: 0; border-bottom: 1px solid #edf0f5; }
  .organization-sidebar-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0; margin: 0; }
  .organization-nav-toggle { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
  .organization-sidebar:not(.is-open) .organization-navigation { display: none; }
  .organization-navigation { margin-top: 20px; }
  .organization-main { padding: 32px 24px; }
}
@media (prefers-reduced-motion: reduce) { .organization-navigation a { transition: none; } }

.organization-shell .organization-layout { min-height: 100svh; border-top: 0; }
.organization-content { min-width: 0; }
.organization-content > .account-topbar { justify-content: flex-end; border-bottom: 1px solid #edf0f5; }
.organization-sidebar { display: flex; flex-direction: column; }
.organization-sidebar-brand { margin-top: auto; padding: 36px 14px 4px; }
.organization-sidebar-brand .wordmark { font-size: 22px; }
.organization-sidebar-heading { padding: 0; }
.workspace-switcher-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.workspace-switcher { flex: 1; min-width: 0; position: relative; }
.workspace-switcher summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; padding: 8px; border-radius: 12px; list-style: none; }
.workspace-switcher summary::-webkit-details-marker { display: none; }
.workspace-switcher summary:hover, .workspace-switcher[open] summary { background: #eef2f8; }
.workspace-switcher summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.workspace-switcher .organization-sidebar-identity { gap: 8px; }
.workspace-switcher .organization-sidebar-identity strong { white-space: normal; overflow-wrap: anywhere; font-size: 14px; }
.workspace-settings-shortcut { display: grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; color: var(--muted); }
.workspace-settings-shortcut[hidden] { display: none; }
.workspace-settings-shortcut:hover { background: #eaf0ff; color: var(--accent); }
.workspace-switcher-menu { position: absolute; z-index: 40; top: calc(100% + 8px); left: 0; width: 300px; max-width: calc(100vw - 48px); padding: 8px; border: 1px solid #e3e8f0; border-radius: 16px; background: white; box-shadow: 0 12px 36px #182a4514; }
.workspace-switcher-menu .organization-nav-label { margin: 8px 10px 12px; }
[data-workspace-target=switcherList] { max-height: 320px; overflow-y: auto; font-size: 13px; }
.workspace-switcher-option { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.workspace-switcher-option:hover, .workspace-switcher-option[aria-current=true] { background: #f0f4ff; }
.workspace-initials { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; background: #edf1f8; border-radius: 10px; color: var(--accent); font-size: 12px; font-weight: 600; }
.workspace-switcher-label { min-width: 0; flex: 1; }
.workspace-switcher-label strong, .workspace-switcher-label small { display: block; white-space: normal; overflow-wrap: anywhere; }
.workspace-switcher-label strong { font-size: 13px; }
.workspace-switcher-label small { font-size: 11px; color: var(--muted); margin-top: 3px; }
.workspace-selected { color: var(--accent); }
.workspace-switcher-all { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 10px 6px; border-top: 1px solid #edf0f5; font-size: 13px; text-decoration: none; color: var(--ink); }
@media (max-width: 800px) { .workspace-switcher-row { flex: 1; } .organization-sidebar-brand { padding-top: 20px; } }

/* Organization chrome stays in view; the workspace content scrolls independently. */
.organization-shell .organization-layout { height: 100dvh; min-height: 0; overflow: hidden; }
.organization-content { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.organization-content > .account-topbar { flex-shrink: 0; }
.organization-main { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; }
.organization-page-footer { flex-shrink: 0; padding: 14px 28px; border-top: 1px solid #edf0f5; font-size: 12px; color: var(--muted); background: white; }
.organization-sidebar { min-height: 0; height: 100%; box-sizing: border-box; padding-bottom: 16px; }
.organization-navigation { flex: 1; min-height: 0; overflow-y: auto; }
.organization-sidebar-bottom { flex-shrink: 0; margin-top: auto; padding-top: 16px; }
.organization-settings-group { margin-bottom: 12px; }
.organization-settings-group summary { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; cursor: pointer; font-size: 14px; list-style: none; }
.organization-settings-group summary::-webkit-details-marker { display: none; }
.organization-settings-group summary > .workspace-icon:last-child { margin-left: auto; transition: transform 160ms; }
.organization-settings-group[open] summary > .workspace-icon:last-child { transform: rotate(180deg); }
.organization-settings-group summary:hover { background: #eef2f8; }
.organization-settings-links { padding-left: 18px; max-height: 160px; overflow-y: auto; }
.organization-settings-links a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--ink); font-size: 14px; border-radius: 10px; text-decoration: none; }
.organization-settings-links a:hover, .organization-settings-links a[aria-current=page] { background: #eaf0ff; color: var(--accent); }
.organization-sidebar-brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 16px 12px 0; margin: 0; border-top: 1px solid #e5eaf2; }
.sidebar-collapse-button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.sidebar-collapse-button:hover { background: #eaf0ff; color: var(--accent); }
.sidebar-collapse-button .workspace-icon { transform: rotate(90deg); }
@media (min-width: 801px) {
  .sidebar-collapsed .organization-layout { grid-template-columns: 80px minmax(0, 1fr); }
  .sidebar-collapsed .organization-sidebar { padding-left: 10px; padding-right: 10px; }
  .sidebar-collapsed .sidebar-label, .sidebar-collapsed .organization-sidebar .workspace-switcher .organization-sidebar-identity > div, .sidebar-collapsed .workspace-settings-shortcut, .sidebar-collapsed .organization-sidebar .workspace-switcher summary > .workspace-icon, .sidebar-collapsed .organization-settings-group summary > .workspace-icon:last-child, .sidebar-collapsed .organization-settings-links { display: none; }
  .sidebar-collapsed .organization-sidebar .workspace-switcher summary { min-height: 40px; padding: 8px 0; justify-content: center; }
  .sidebar-collapsed .organization-sidebar-identity { min-height: 40px; }
  .sidebar-collapsed .organization-sidebar .workspace-switcher summary::after { content: "⌄"; display: block; color: var(--muted); }
  .sidebar-collapsed .organization-sidebar-brand { flex-direction: column; padding: 16px 0 0; }
  .sidebar-collapsed .organization-sidebar-brand .wordmark { font-size: 0; gap: 0; }
  .sidebar-collapsed .sidebar-collapse-button .workspace-icon { transform: rotate(-90deg); }
}
@media (max-width: 800px) {
  .organization-shell .organization-layout { grid-template-rows: auto minmax(0, 1fr); }
  .organization-sidebar { height: auto; max-height: 65dvh; }
  .organization-sidebar:not(.is-open) .organization-sidebar-bottom { display: none; }
  .organization-sidebar.is-open .organization-navigation { flex: 0 1 auto; }
  .sidebar-collapse-button { display: none; }
  .organization-sidebar-brand { padding-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .organization-settings-group summary > .workspace-icon:last-child { transition: none; } }

/* Let organization pages use the entire content column, independent of account form widths. */
.organization-shell { width: 100%; max-width: none; }
.organization-shell .organization-layout { width: 100%; }
.organization-shell .organization-content { width: 100%; min-width: 0; align-items: stretch; }
.organization-shell .organization-content > .account-topbar { width: 100%; margin: 0; }
.organization-shell .organization-main { width: 100%; padding: 32px clamp(20px, 3vw, 48px); }
.organization-shell .organization-main > .auth-content { width: 100%; max-width: none; margin: 0; padding: 0; }
.team-invite-section { margin-bottom: 32px; padding: 24px; background: #f8faff; border: 1px solid #e3e9f3; border-radius: 18px; }
.team-invite-form { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(140px, 200px) auto; align-items: end; gap: 16px; }
.team-invite-form > div { min-width: 0; }
.team-invite-form input, .team-invite-form select { width: 100%; margin: 0; height: 48px; }
.team-invite-form button { margin: 0; height: 48px; white-space: nowrap; }
.team-invite-section .footnote { margin: 14px 0 0; }
.team-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; margin-bottom: 32px; border: 1px solid #e3e8f0; border-radius: 18px; }
.team-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; font-size: 14px; }
.team-table caption { padding: 20px; text-align: left; font-size: 18px; font-weight: 600; color: var(--ink); }
.team-table th { padding: 12px 20px; background: #f8f9fc; font-size: 12px; font-weight: 500; color: var(--muted); border-top: 1px solid #edf0f5; white-space: nowrap; }
.team-table td { padding: 16px 20px; border-top: 1px solid #edf0f5; vertical-align: middle; }
.team-table td:first-child { overflow-wrap: anywhere; max-width: 340px; }
.team-table td strong, .team-table td small { display: block; }
.team-table td small { color: var(--muted); margin-top: 4px; }
.team-table select { margin: 0; min-width: 120px; padding: 9px 12px; font-size: 13px; }
.team-table .text-button { margin: 0; font-size: 13px; white-space: nowrap; }
.team-member-id { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.team-table .team-table-empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.team-status { display: inline-flex; padding: 4px 9px; border-radius: 999px; background: #f0f2f6; color: var(--muted); font-size: 12px; }
.team-status[data-status=pending] { background: #eaf0ff; color: var(--accent); }
.team-status[data-status=joined] { background: #e4f5eb; color: #187344; }
@media (max-width: 1000px) { .team-invite-form { grid-template-columns: minmax(0, 1fr) minmax(120px, 180px); } .team-invite-form button { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 500px) { .team-invite-form { grid-template-columns: minmax(0, 1fr); } .team-invite-form button { width: 100%; } .team-invite-section { padding: 18px; } }

/* The organization header spans the viewport above both sidebar and content. */
.organization-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 0; overflow: hidden; }
.organization-shell > .account-topbar { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: none; margin: 0; padding: 16px 28px; min-height: 80px; flex: 0 0 auto; }
.organization-header-title { flex: 1; min-width: 0; }
.organization-header-title .step-note { display: block; margin: 0 0 3px; font-size: 11px; color: var(--muted); }
.organization-header-title strong { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 17px; line-height: 1.4; }
.organization-shell > .account-topbar > .profile-dropdown { flex-shrink: 0; }
.organization-shell > .organization-layout { flex: 1; height: auto; min-height: 0; }
.workspace-switcher .organization-sidebar-identity { flex: 1; }
.workspace-switcher .organization-sidebar-identity > div { flex: 1; }
.workspace-switcher-option { align-items: flex-start; }
.workspace-switcher-settings { display: flex; align-items: center; gap: 10px; padding: 12px 10px; margin-top: 8px; border-radius: 10px; color: var(--ink); font-size: 13px; text-decoration: none; }
.workspace-switcher-settings:hover, .workspace-switcher-settings:focus-visible { background: #eaf0ff; color: var(--accent); }
@media (max-width: 600px) {
  .organization-shell > .account-topbar { padding: 12px 16px; gap: 12px; }
  .organization-shell > .account-topbar .profile-dropdown summary span { display: none; }
}

.overview-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 20px; margin: 32px 0; }
.overview-option { min-height: 174px; padding: 24px; border: 1px solid #e0e6f0; border-radius: 20px; background: white; }
.overview-option-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 22px; border-radius: 14px; background: #eef3ff; color: var(--accent); }
.overview-option-icon .workspace-icon { width: 24px; height: 24px; }
.overview-option h2 { font-size: 18px; margin-bottom: 6px; }
.overview-option p { font-size: 14px; color: var(--muted); margin: 0; }
.overview-membership { margin-top: 28px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }

.header-workspace-switcher { width: 100%; max-width: 560px; }
.header-workspace-switcher summary { padding: 6px 10px; }
.header-workspace-switcher .organization-sidebar-identity strong { font-size: 17px; }
.header-workspace-switcher .workspace-switcher-menu { width: 340px; max-height: calc(100dvh - 120px); overflow-y: auto; }
.workspace-menu-settings { border-top: 1px solid #edf0f5; margin-top: 8px; padding-top: 6px; }
.workspace-menu-settings .organization-nav-label { display: flex; align-items: center; gap: 8px; }
.workspace-menu-settings .organization-nav-label .workspace-icon { width: 16px; height: 16px; }
.workspace-menu-settings a { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-size: 14px; text-decoration: none; }
.workspace-menu-settings a:hover, .workspace-menu-settings a[aria-current=page] { background: #eaf0ff; color: var(--accent); }
.organization-sidebar .organization-sidebar-heading { margin-bottom: 12px; }

.overview-option[data-color] { background: var(--card-background); border-color: var(--card-border); }
.overview-option[data-color] .overview-option-icon { background: var(--card-icon-background); color: var(--card-ink); }
.overview-option[data-color] h2 { color: var(--card-ink); }
.overview-option[data-color=blue] { --card-background: #eff5ff; --card-border: #d3e2ff; --card-icon-background: #dce9ff; --card-ink: #244c9b; }
.overview-option[data-color=purple] { --card-background: #f5f0ff; --card-border: #e4d7fa; --card-icon-background: #e9defa; --card-ink: #69439a; }
.overview-option[data-color=green] { --card-background: #edf8f1; --card-border: #cfe9d9; --card-icon-background: #d7efdf; --card-ink: #276244; }
.overview-option[data-color=orange] { --card-background: #fff4ec; --card-border: #f3ddcd; --card-icon-background: #fbe4d2; --card-ink: #94502c; }
.overview-option[data-color=rose] { --card-background: #fff0f3; --card-border: #f3d4df; --card-icon-background: #fadce6; --card-ink: #99415f; }

.organization-navigation a[data-color=blue] .workspace-icon { color: #244c9b; }
.organization-navigation a[data-color=purple] .workspace-icon { color: #69439a; }
.organization-navigation a[data-color=green] .workspace-icon { color: #276244; }
.organization-navigation a[data-color=orange] .workspace-icon { color: #94502c; }
.organization-navigation a[data-color=rose] .workspace-icon { color: #99415f; }
.overview-option { scroll-margin-top: 24px; }
.overview-option:target { outline: 2px solid var(--card-ink); outline-offset: 4px; }

.overview-option:has(.overview-card-link) { padding: 0; }
.overview-card-link { display: block; padding: 24px; min-height: 174px; height: 100%; border-radius: inherit; text-decoration: none; }
.overview-card-link:hover { box-shadow: inset 0 0 0 2px var(--card-border); }
.payroll-setup-heading { display: flex; align-items: center; gap: 28px; margin-bottom: 40px; flex-wrap: wrap; }
.payroll-setup-heading h1 { margin-bottom: 0; }
.payroll-setup-heading > div:first-child { flex: 1; }
.payroll-setup-progress { width: min(100%, 390px); }
.payroll-setup-progress progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; background: #e4e9f0; accent-color: #218451; }
.payroll-setup-progress progress::-webkit-progress-bar { background: #e4e9f0; }
.payroll-setup-progress progress::-webkit-progress-value { background: #218451; }
.payroll-setup-progress p { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.payroll-setup-section { border: 1px solid #dfe6ef; border-radius: 20px; padding: 28px; margin-bottom: 24px; }
.payroll-setup-section > h2 { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; font-size: 21px; }
.payroll-section-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #eaf1ff; color: var(--accent); flex-shrink: 0; }
.payroll-section-icon .workspace-icon { width: 25px; height: 25px; }
.payroll-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0 20px 62px; }
.payroll-setup-row + .payroll-setup-row { border-top: 1px solid #edf0f5; }
.payroll-setup-row h3 { font-size: 17px; margin: 0 0 8px; font-weight: 600; }
.payroll-setup-row p { color: var(--muted); font-size: 14px; margin-bottom: 10px; max-width: 620px; }
.payroll-setup-row button { flex-shrink: 0; min-width: 160px; }
.payroll-step-status { font-size: 11px; color: var(--muted); background: #f1f3f6; padding: 4px 8px; border-radius: 999px; }
.payroll-step-status[data-status="not-started"] { color: #fff; background: #b42318; }
.payroll-step-status[data-status="complete"] { color: #fff; background: #187644; }
@media (max-width: 700px) { .payroll-setup-progress { width: 100%; order: 3; } .payroll-setup-section { padding: 20px; } .payroll-setup-row { padding: 20px 0; align-items: flex-start; flex-direction: column; gap: 16px; } }

.signatory-progress { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; background: #f4f7fb; border-radius: 16px; margin-bottom: 32px; }
.signatory-progress > div { width: min(100%, 380px); }
.signatory-progress progress { width: 100%; height: 8px; accent-color: #218451; }
.signatory-progress p { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.signatory-progress a, .payroll-setup-row > a { text-decoration: none; white-space: nowrap; }
.signatory-form { width: 100%; max-width: 900px; border: 1px solid #dfe6ef; border-radius: 20px; padding: 32px; }
.signatory-form fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.signatory-form legend { font-size: 17px; font-weight: 600; margin-bottom: 18px; }
.signatory-form select { width: 100%; }
.signatory-address-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; }
.signatory-actions { display: flex; align-items: center; gap: 24px; margin-top: 28px; }
@media (max-width: 650px) { .signatory-form { padding: 20px; } .signatory-address-grid { grid-template-columns: 1fr; gap: 0; } .signatory-progress { align-items: flex-start; flex-direction: column; } }

.organization-navigation .application-back { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.application-back .workspace-icon { transform: rotate(180deg); }
.application-sidebar-title { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 12px; color: #163776; font-size: 19px; }
.application-sidebar-title .workspace-icon { width: 23px; height: 23px; flex-shrink: 0; }
.payroll-section-empty { padding: 36px; border: 1px solid #e3e8f0; border-radius: 20px; margin-top: 28px; }
.payroll-section-empty p { color: var(--muted); }
.payroll-section-empty a { text-decoration: none; }

/* Compact sizing for signed-in application pages. */
.account-shell, .centered-shell { font-size: 14px; }
.account-shell h1, .centered-shell .auth-content h1 { font-size: 26px; line-height: 1.25; margin-bottom: 12px; }
.account-shell h2, .centered-shell h2 { font-size: 18px; }
.account-shell .intro, .centered-shell .intro { font-size: 14px; line-height: 1.5; margin-bottom: 22px; }
.account-shell label, .centered-shell label { font-size: 13px; }
.account-shell input, .account-shell select, .centered-shell input, .centered-shell select { font-size: 14px; min-height: 42px; padding: 10px 12px; margin-bottom: 16px; }
.account-shell .primary, .account-shell .secondary, .centered-shell .primary, .centered-shell .secondary { font-size: 13px; min-height: 40px; padding: 10px 16px; }
.account-shell .field-help, .centered-shell .field-help { font-size: 12px; }
.account-shell .settings-group { padding: 20px; margin-bottom: 18px; border-radius: 18px; }
.organization-shell > .account-topbar { min-height: 66px; padding: 10px 24px; }
.header-workspace-switcher .organization-sidebar-identity strong { font-size: 15px; }
.header-workspace-switcher .organization-logo { width: 34px; height: 34px; }
.profile-dropdown summary { font-size: 13px; gap: 8px; padding: 4px 8px 4px 4px; }
.profile-dropdown summary img { width: 34px; height: 34px; }
.organization-shell .organization-main { padding: 24px clamp(18px, 2.5vw, 36px); }
.organization-page-footer { padding: 10px 24px; font-size: 11px; }
.organization-sidebar { padding-top: 18px; }
.organization-navigation a { font-size: 13px; padding: 10px 12px; gap: 10px; }
.application-sidebar-title { font-size: 16px; padding: 10px 12px; margin-bottom: 6px; }
.organization-navigation .application-back { font-size: 12px; margin-bottom: 10px; }
.organization-overview { padding-top: 8px; }
.overview-options { gap: 16px; margin: 24px 0; }
.overview-option { min-height: 142px; padding: 20px; border-radius: 16px; }
.overview-option:has(.overview-card-link) { padding: 0; }
.overview-card-link { min-height: 142px; padding: 20px; }
.overview-option-icon { width: 38px; height: 38px; margin-bottom: 16px; border-radius: 12px; }
.overview-option-icon .workspace-icon { width: 21px; height: 21px; }
.overview-option h2 { font-size: 16px; }
.payroll-setup-heading { gap: 20px; margin-bottom: 24px; }
.payroll-setup-section { padding: 20px; margin-bottom: 18px; border-radius: 16px; }
.payroll-setup-section > h2 { font-size: 18px; gap: 12px; margin-bottom: 12px; }
.payroll-section-icon { width: 38px; height: 38px; border-radius: 12px; }
.payroll-section-icon .workspace-icon { width: 21px; height: 21px; }
.payroll-setup-row { padding: 14px 0 14px 50px; gap: 20px; }
.payroll-setup-row h3 { font-size: 15px; margin-bottom: 5px; }
.payroll-setup-row p { font-size: 13px; margin-bottom: 8px; }
.signatory-progress { padding: 16px 20px; margin-bottom: 24px; }
.signatory-form { max-width: 800px; padding: 24px; }
.signatory-form legend { font-size: 15px; margin-bottom: 12px; }
.signatory-form fieldset { margin-bottom: 14px; }
.signatory-actions { margin-top: 20px; }
.team-invite-section { padding: 20px; margin-bottom: 24px; }
.team-invite-form input, .team-invite-form select, .team-invite-form button { height: 42px; margin-bottom: 0; }
.team-table { font-size: 13px; }
.team-table caption { padding: 16px; font-size: 16px; }
.team-table th { padding: 10px 16px; }
.team-table td { padding: 12px 16px; }
.team-table select { min-height: 36px; font-size: 13px; padding: 7px 10px; margin: 0; }
.payroll-section-empty { padding: 24px; margin-top: 20px; }
@media (max-width: 700px) {
  .account-shell h1, .centered-shell .auth-content h1 { font-size: 24px; }
  .account-shell input, .account-shell select, .centered-shell input, .centered-shell select { font-size: 16px; min-height: 44px; }
  .account-shell .primary, .account-shell .secondary, .centered-shell .primary, .centered-shell .secondary { min-height: 44px; }
  .payroll-setup-row { padding-left: 0; }
  .signatory-form { padding: 18px; }
  .organization-shell > .account-topbar { padding: 10px 16px; }
}

/* Payroll business profile walkthrough. */
.business-walkthrough { width: min(100%, 760px); margin: 0 auto; }
.business-intro { max-width: 600px; margin: 48px auto; text-align: center; }
.business-intro-icon { display: inline-flex; padding: 18px; margin: 10px 0 20px; border-radius: 20px; background: #eaf2ff; color: #2563eb; }
.business-intro-icon .workspace-icon { width: 42px; height: 42px; }
.business-intro h1 { max-width: 480px; margin: 0 auto 16px; }
.business-intro .primary { margin-top: 24px; }
.business-profile-form { max-width: none; }
.business-profile-form .business-check { display: flex; align-items: center; gap: 10px; font-weight: 400; margin: 16px 0; }
.business-profile-form .business-check input { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: #2563eb; flex: 0 0 18px; }
.business-profile-form textarea { width: 100%; padding: 12px; border: 1px solid #d6dee9; border-radius: 12px; font: inherit; resize: vertical; }
.business-help-dialog { width: min(620px, calc(100% - 32px)); max-height: 85dvh; border: 1px solid #e1e6ed; border-radius: 20px; padding: 0; color: #17212b; }
.business-help-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.business-dialog-content { padding: 28px; line-height: 1.65; }
.business-dialog-content h2 { font-size: 20px; line-height: 1.3; }
.business-dialog-content form, .business-dialog-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.business-dialog-content li { margin: 8px 0; }
@media (max-width: 600px) { .business-intro { margin: 28px auto; } .business-dialog-content { padding: 20px; } }

.pay-schedule-notice { display: flex; align-items: flex-start; gap: 12px; background: #eff6ff; border: 1px solid #cbdffc; border-radius: 12px; padding: 16px; margin: 24px 0; line-height: 1.6; }
.pay-schedule-notice .workspace-icon { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; color: #2563eb; }
.pay-schedule-form { max-width: none; }
.pay-schedule-form .pay-frequency-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin: 10px 0; border: 1px solid #e1e6ed; border-radius: 12px; cursor: pointer; }
.pay-frequency-option:has(input:checked) { border-color: #2563eb; background: #f5f9ff; }
.pay-frequency-option:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 2px; }
.pay-schedule-form .pay-frequency-option input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 2px 0 0; accent-color: #2563eb; }
.pay-frequency-option .field-help { display: block; margin: 5px 0 0; font-weight: 400; }
.payday-delay-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: center; }
.pay-schedule-form .payday-delay-row input { width: 88px; flex: 0 0 88px; margin: 0; }

.pay-schedule-preview { border-top: 1px solid #e1e6ed; margin-top: 28px; padding-top: 22px; }
.pay-schedule-calendar { display: flex; gap: 12px; margin: 18px 0; }
.pay-calendar-card { width: 120px; border: 1px solid #d6dee9; border-radius: 10px; overflow: hidden; text-align: center; }
.pay-calendar-card > * { display: block; }
.pay-calendar-card > strong { background: #e1efff; color: #1d4ed8; padding: 6px; }
.pay-calendar-card[data-kind="payday_on"] > strong { background: #dcfce7; color: #15803d; }
.pay-calendar-card > span { padding: 5px; font-size: 13px; }
.pay-calendar-card > b { font-size: 28px; line-height: 1.3; }

.schedule-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 18px; margin: 22px 0 12px; }
.schedule-month { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; border: 1px solid #e1e6ed; border-radius: 14px; padding: 8px; font-size: 12px; }
.schedule-month caption { text-align: left; font-size: 15px; font-weight: 600; padding: 0 0 12px 2px; }
.schedule-month th { font-size: 10px; font-weight: 500; color: #64748b; padding: 6px 0; text-align: center; }
.schedule-month td { height: 48px; padding: 3px 0; text-align: center; vertical-align: top; border-radius: 6px; }
.schedule-month td > span { display: block; line-height: 22px; }
.schedule-month td small { display: block; font-size: 8px; line-height: 11px; overflow-wrap: anywhere; }
.schedule-month td.in-period { background: #eff6ff; color: #1e40af; }
.schedule-month td.period-start, .schedule-month td.period-finish { box-shadow: inset 0 0 0 1px #93b8ef; font-weight: 600; }
.schedule-month td.is-payday { background: #dcfce7; color: #166534; box-shadow: inset 0 0 0 1px #86cf9f; font-weight: 600; }
.schedule-calendar-legend { display: flex; gap: 18px; font-size: 12px; margin: 10px 0 20px; }
.schedule-calendar-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: #dbeafe; }
.schedule-calendar-legend .payday-key::before { background: #bbf7d0; }

.pay-schedule-field { margin: 24px 0; min-width: 0; }
.pay-schedule-form .pay-schedule-field > label { margin: 0 0 10px; line-height: 1.5; }
.pay-schedule-form .pay-schedule-field select { display: block; margin: 0; }
.pay-schedule-field .payday-delay-row > span { line-height: 1.5; overflow-wrap: anywhere; }
.pay-schedule-form .pay-schedule-field > .field-help { margin: 10px 0 0; line-height: 1.5; }

.funding-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.funding-method { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 26px 20px; min-height: 240px; border: 1px solid #d6dee9; border-radius: 18px; color: var(--ink); text-decoration: none; }
.funding-method:hover, .funding-method:focus-visible { background: #f5f9ff; border-color: #2563eb; }
.funding-method strong { font-size: 18px; line-height: 1.5; }
.funding-method .business-intro-icon { margin: 0; }
.funding-method .field-help { margin: 0; }
.funding-help { margin: 12px 0 24px; line-height: 1.6; }
.funding-help summary { cursor: pointer; color: #2563eb; font-weight: 600; }
@media (max-width: 520px) { .funding-methods { grid-template-columns: 1fr; } .funding-method { min-height: 190px; } }

.employee-table-heading { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }

.organization-sidebar { background: #fff; color: #000; }
.organization-sidebar .organization-navigation a,
.organization-sidebar .application-sidebar-title,
.organization-sidebar .organization-nav-label,
.organization-sidebar .organization-nav-toggle,
.organization-sidebar .sidebar-collapse-button { color: #000; }

.contractor-additional { padding-top: 20px; }

.team-table td > small { display: block; margin-top: 5px; color: #64748b; font-size: 12px; }
.vendor-type-badge { display: inline-block; padding: 5px 9px; border-radius: 5px; background: #dceeff; color: #175d99; font-size: 12px; font-weight: 600; }
.table-row-actions { display: flex; align-items: flex-start; gap: 12px; }
.table-action-menu summary { cursor: pointer; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid #8aaeff; border-radius: 50%; color: #2563eb; list-style: none; }
.table-action-menu summary::-webkit-details-marker { display: none; }
.table-action-options { display: flex; flex-direction: column; gap: 10px; min-width: 110px; padding: 12px 0; }
.table-action-options button { text-align: left; }
.cheque-guide { margin-top: 28px; padding: 22px; background: #eaf5ff; border-radius: 14px; }
.cheque-example { padding: 20px; border: 1px solid #92b2d5; border-radius: 8px; }
.cheque-numbers { display: flex; gap: 20px; flex-wrap: wrap; }
.cheque-numbers b, .cheque-numbers small { display: block; }
.cheque-numbers b { background: #d4f5df; color: #166534; padding: 5px 8px; letter-spacing: 2px; }
.cheque-numbers small { margin-top: 10px; font-size: 11px; }
.bill-header-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 28px 0; }
.bill-header-fields select, .bill-header-fields textarea { width: 100%; }
.bill-header-fields textarea, .bill-lines textarea { border: 1px solid #d6dee9; border-radius: 10px; padding: 10px; font: inherit; }
.bill-vendor-address { white-space: pre-line; font-size: 13px; line-height: 1.7; }
.bill-lines { min-width: 1000px; }
.bill-lines input, .bill-lines select, .bill-lines textarea { margin: 0; width: 100%; }
.bill-lines td { min-width: 100px; }
.bill-lines td:nth-child(1), .bill-lines td:nth-child(2), .bill-lines td:nth-child(3) { min-width: 160px; }
.bill-lines td:last-child { min-width: 36px; }
.bill-totals { width: min(100%, 350px); margin: 28px 0 28px auto; }
.bill-totals > div { display: flex; justify-content: space-between; gap: 20px; padding: 9px 0; }
.bill-totals dd { margin: 0; font-weight: 600; }
.bill-preview-status { margin: 12px 0; }
.bill-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; margin: 28px 0; }
.bill-filters select { width: 100%; }
.bill-pagination { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
.bill-pagination label { margin: 0 auto 0 0; }
.bill-pagination select { width: auto; margin: 0 8px; }
@media (max-width: 720px) { .bill-header-fields, .bill-filters { grid-template-columns: 1fr; gap: 12px; } }

.run-payroll-links { display: flex; gap: 12px; flex-wrap: wrap; }
.run-payroll-summary { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 8px 28px rgb(30 64 120 / 8%); margin: 24px 0 28px; overflow: hidden; }
.run-payroll-summary > div { padding: 24px; min-width: 0; }
.run-payroll-summary > div + div { border-left: 1px solid #e2e8f0; }
.run-date-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.run-date-cards .pay-calendar-card { width: 100%; min-width: 0; }
.run-date-cards .text-button { display: block; font-size: 12px; padding-bottom: 6px; }
.run-date-pending { min-height: 82px; display: grid !important; place-items: center; color: #64748b; }
.run-payroll-summary .field-help { margin: 14px 0 0; line-height: 1.6; }
.run-payroll-cost, .run-payroll-review { text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.run-payroll-cost > strong { font-size: 25px; font-weight: 500; }
.run-payroll-review h2 { color: #15803d; }
.run-payroll-review .primary { margin-top: 12px; }
.run-payroll-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; }
.run-payroll-services > section { border: 1px solid #dce3ed; border-radius: 14px; padding: 22px; }
.payroll-pending-badge { display: inline-block; font-size: 11px; padding: 5px 7px; margin-left: 6px; background: #eff3f8; color: #475569; border-radius: 5px; vertical-align: middle; }
.run-payroll-bottom { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.run-payroll-bottom > section, .run-payroll-services > section { min-width: 0; overflow-wrap: anywhere; }
.run-payroll-services h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.run-payroll-services .payroll-pending-badge { margin: 0; }
.run-payroll-tasks, .run-important-dates { border: 1px solid #dce3ed; border-radius: 12px; padding: 18px; }
.run-important-dates article + article { border-top: 1px solid #e2e8f0; margin-top: 18px; padding-top: 18px; }
.run-important-dates time { color: #64748b; font-size: 12px; }
.run-important-dates h3 { margin: 8px 0; font-size: 15px; }
.run-important-dates p { margin: 8px 0; font-size: 12px; }
@media (max-width: 1450px) { .run-payroll-summary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .run-payroll-summary > .run-payroll-dates { grid-column: 1 / -1; border-bottom: 1px solid #e2e8f0; } .run-payroll-summary > .run-payroll-cost { border-left: 0; } }
@media (max-width: 1050px) { .run-payroll-bottom, .run-payroll-services { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 650px) { .run-payroll-services, .run-payroll-bottom, .run-payroll-summary { grid-template-columns: 1fr; } .run-payroll-summary > div + div { border-left: 0; border-top: 1px solid #e2e8f0; } .run-payroll-summary > .run-payroll-dates { border-bottom: 0; } .run-payroll-summary > div { padding: 16px; } .run-date-cards { gap: 6px; } }

.holiday-region { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 13px; margin-bottom: 14px; }
.holiday-region select { width: auto; min-width: 130px; margin: 0; }
.holiday-type { display: inline-block; padding: 3px 7px; border-radius: 6px; background: #edf4ff; color: #2253a0; font-size: 11px; font-weight: 600; }
.holiday-type.bank { background: #eef2ee; color: #345640; }
.holiday-calendar-status { margin-top: 16px; font-size: 11px; color: #5c6675; }
.holiday-calendar-status p { margin: 5px 0; }
.holiday-calendar-content > .field-help { margin: 0 0 16px; line-height: 1.6; }
[data-controller="holiday-calendar"] > .field-help { margin: 12px 0 0; line-height: 1.6; }
.holiday-calendar-content .text-button { display: inline-block; height: auto; line-height: 1.5; }
.holiday-calendar-status { line-height: 1.6; overflow-wrap: anywhere; }
.run-important-dates details > summary { cursor: pointer; color: #2253a0; padding: 12px 0; font-size: 13px; }
.run-important-dates details[open] { max-height: 540px; overflow-y: auto; }

.payroll-date-editor { width: min(100%, 460px); min-width: 0; margin: 24px auto; }
.payroll-date-editor > .text-button { display: inline-flex; align-items: center; }
.payroll-date-editor .field-help { margin: 14px 0 20px; line-height: 1.6; }
.payroll-date-editor .signatory-actions { flex-wrap: wrap; gap: 12px 24px; }
.payroll-date-editor .signatory-actions .primary { width: auto; margin: 0; flex: 0 1 auto; }
.payroll-date-editor input[type="date"] { min-width: 0; max-width: 100%; margin-bottom: 0; }
.payroll-date-editor h1 { margin-top: 24px; }
.payroll-month-nav { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 14px; }
.payroll-month-nav a { padding: 8px 14px; border-radius: 8px; background: #f0f5ff; text-decoration: none; }
.payroll-end-calendar { position: relative; padding: 0; border: 0; margin: 0 0 18px; }
.payroll-end-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.payroll-end-calendar .weekday { text-align: center; font-size: 11px; padding-bottom: 8px; }
.payroll-end-calendar label { position: relative; margin: 0; cursor: pointer; }
.payroll-end-calendar input[type="radio"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; min-height: 0; padding: 0; margin: 0; border: 0; cursor: inherit; }
.payroll-end-calendar label span { display: grid; place-items: center; min-height: 44px; border: 1px solid #c9d9f3; border-radius: 9px; background: #f0f5ff; font-size: 13px; }
.payroll-end-calendar input:checked + span { background: #2563eb; color: white; }
.payroll-end-calendar input:focus-visible + span { outline: 2px solid #2563eb; outline-offset: 2px; }
.payroll-end-calendar .unavailable { cursor: not-allowed; }
.payroll-end-calendar .unavailable span { color: #a4aab2; border-color: transparent; background: #f6f7f8; }
.payroll-end-calendar .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 480px) {
  .run-date-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .run-payroll-links { width: 100%; }
  .run-payroll-links a { flex: 1 1 140px; text-align: center; }
  .payroll-end-grid { gap: 3px; }
  .payroll-end-calendar label span { min-height: 40px; }
}
.payroll-period-range { padding: 12px 14px; border-radius: 10px; background: #eff6ff; color: #1e40af; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.payroll-end-calendar .in-period span { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.payroll-end-calendar .period-start span { box-shadow: inset 0 0 0 2px #2563eb; font-weight: 700; }
.payroll-end-calendar .period-end span { background: #2563eb; color: #fff; border-color: #2563eb; font-weight: 700; }
.bill-payment-timing { margin: 12px 0 20px; font-size: 13px; line-height: 1.6; }
.payroll-bill-summary { margin: 28px 0; min-width: 0; }
.payroll-bill-summary .team-table th:last-child { width: 180px; }
.payroll-bill-summary tfoot th, .payroll-bill-statements tfoot th, .payroll-bill-statements tfoot td { padding: 14px 16px; border-top: 1px solid #dce3ed; text-align: left; }
.payroll-bill-statements { margin: 36px 0; }
.payroll-bill-statements > .field-help { margin: 12px 0 20px; line-height: 1.6; }
.payroll-bill-statement { border: 1px solid #dce3ed; border-radius: 12px; margin: 16px 0; overflow: hidden; }
.payroll-bill-statement > summary { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px; cursor: pointer; background: #f8fbff; }
.payroll-bill-statement summary small { display: block; margin-top: 6px; color: #64748b; }
.payroll-statement-body { padding: 20px; min-width: 0; }
.payroll-bank-notice { padding: 12px; border-radius: 8px; background: #fff5e8; font-size: 13px; line-height: 1.6; }
.run-payroll-review a.primary { text-decoration: none; }
.timesheet-week { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 20px; border: 1px solid #dce3ed; border-radius: 14px; margin: 24px 0; }
.timesheet-week a { width: auto; text-decoration: none; }
.timesheet-table { min-width: 1060px; table-layout: fixed; }
.timesheet-table th:first-child { width: 250px; }
.timesheet-table th:not(:first-child), .timesheet-table td { text-align: center; padding: 12px 8px; }
.timesheet-table th small { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; color: #64748b; }
.timesheet-name { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timesheet-table input[type="number"] { width: 100%; margin: 0; padding: 8px; min-width: 0; }
.timesheet-table input:disabled { background: #eef1f5; color: #8b96a6; }
.timesheet-table output { display: block; background: #e2f3ff; border: 1px solid #b9d7f7; padding: 10px 4px; border-radius: 10px; }
.timesheet-table tbody + tbody { border-top: 2px solid #dce3ed; }
.timesheet-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.timesheet-actions .primary, .timesheet-actions .secondary { width: auto; }

.timesheet-table input[data-approved="true"]:disabled { color: #334155; background: #e8eef5; opacity: 1; cursor: not-allowed; -webkit-text-fill-color: #334155; }
.timesheet-table .timesheet-approved-label { color: #245591; font-weight: 600; }

/* Organization settings hub and persistent sidebar entry. */
.organization-settings-link { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 13px; }
.organization-settings-link[hidden] { display: none; }
.organization-settings-link:hover, .organization-settings-link:focus-visible { background: #f0f3f9; }
.organization-settings-link[aria-current=page] { background: #eaf0ff; color: var(--accent); font-weight: 600; }
.organization-settings-page { max-width: 1120px; margin: 0 auto; width: 100%; }
.organization-settings-heading { margin-bottom: 32px; }
.organization-settings-heading h1 { margin-bottom: 8px; }
.organization-settings-heading p, .organization-settings-description { color: var(--muted); line-height: 1.6; }
.organization-settings-section + .organization-settings-section { margin-top: 32px; }
.organization-settings-section h2 { margin: 0 0 6px; }
.organization-settings-description { margin: 0 0 16px; }
.organization-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.organization-settings-card { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid #e0e5ed; border-radius: 16px; color: var(--ink); text-decoration: none; }
.organization-settings-card:hover, .organization-settings-card:focus-visible { border-color: var(--accent); background: #f8faff; }
.organization-settings-icon { display: grid; place-items: center; flex: 0 0 40px; height: 40px; border-radius: 12px; color: var(--accent); background: #eaf0ff; }
.organization-settings-card-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.organization-settings-card-copy strong { font-size: 15px; }
.organization-settings-card-copy > span { color: var(--muted); font-size: 13px; line-height: 1.6; }
.organization-settings-arrow { flex-shrink: 0; align-self: center; color: var(--muted); }
.organization-settings-arrow .workspace-icon { transform: rotate(-90deg); width: 18px; height: 18px; }
@media (min-width: 801px) { .sidebar-collapsed .organization-settings-link { justify-content: center; padding-left: 0; padding-right: 0; } }
@media (max-width: 650px) { .organization-settings-grid { grid-template-columns: 1fr; } .organization-settings-card { padding: 18px; } }

/* One shared navigation, with expandable application sections. */
.workspace-nav-group { flex-shrink: 0; }
.workspace-nav-group > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; list-style: none; font-size: 13px; color: var(--ink); }
.workspace-nav-group > summary::-webkit-details-marker { display: none; }
.workspace-nav-group > summary .sidebar-label { flex: 1; min-width: 0; }
.workspace-nav-group > summary:hover, .workspace-nav-group > summary:focus-visible { background: #f0f3f9; }
.workspace-nav-group > summary[data-active=true] { background: #eaf0ff; color: var(--accent); font-weight: 600; }
.workspace-nav-chevron { display: flex; flex-shrink: 0; }
.workspace-nav-chevron .workspace-icon { width: 14px; height: 14px; }
.workspace-nav-group[open] > summary .workspace-nav-chevron { transform: rotate(180deg); }
.workspace-nav-children { margin: 6px 0 4px 22px; padding-left: 8px; border-left: 1px solid #e0e5ed; }
.organization-navigation .workspace-nav-children a { font-size: 12px; gap: 8px; }
.organization-navigation .workspace-nav-children a[aria-current=page] { color: var(--accent); }
.workspace-nav-group[data-color=purple] > summary > .workspace-icon { color: #69439a; }
.workspace-nav-group[data-color=green] > summary > .workspace-icon { color: #276244; }
.workspace-nav-group[data-color=orange] > summary > .workspace-icon { color: #94502c; }
.workspace-nav-group[data-color=rose] > summary > .workspace-icon { color: #99415f; }
@media (min-width: 801px) {
  .sidebar-collapsed .workspace-nav-group > summary { justify-content: center; }
  .sidebar-collapsed .workspace-nav-chevron, .sidebar-collapsed .workspace-nav-children { display: none; }
}

.roe-dashboard { max-width: 1400px; margin: 0 auto; }
.roe-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 24px; }
.roe-heading h1 { margin-top: 0; }
.roe-heading .intro { margin-bottom: 0; }
.roe-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.roe-option { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid #e0e5ed; border-radius: 16px; }
.roe-option > .workspace-icon { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.roe-option h2 { margin: 0 0 10px; }
.roe-option p { color: var(--muted); line-height: 1.6; margin: 0 0 16px; }
.roe-option button:disabled { cursor: not-allowed; opacity: .65; white-space: normal; }
.roe-tabs, .roe-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; }
.roe-tabs { margin: 16px 0; }
.roe-tabs a { padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.roe-tabs a[aria-current=page] { background: #eaf0ff; color: var(--accent); font-weight: 600; }
.roe-table-scroll { overflow-x: auto; }
.roe-table { width: 100%; min-width: 740px; border-collapse: collapse; }
.roe-table th, .roe-table td { padding: 16px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid #e0e5ed; }
.roe-table td small { display: block; margin-top: 5px; color: var(--muted); }
.roe-table .roe-actions { min-width: 170px; align-items: flex-start; flex-direction: column; gap: 12px; }
.roe-dashboard nav.roe-actions { margin-top: 16px; }
.roe-filing-steps summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.roe-filing-steps li { line-height: 1.7; margin-bottom: 14px; padding-left: 6px; }
@media (max-width: 700px) { .roe-options { grid-template-columns: 1fr; } }

.roe-manual-option { margin-bottom: 28px; }
.roe-heading > div:first-child { flex: 1 1 400px; }
.roe-heading-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; flex-shrink: 0; }
.roe-heading-actions .primary { display: inline-flex; align-items: center; gap: 10px; }
.roe-selection-cell { width: 36px; }
.roe-selection-cell input[type=checkbox] { width: 18px; height: 18px; margin: 2px 0; cursor: pointer; }
.roe-table tr:has(.roe-selection-cell input:checked) { background: #f3f6ff; }
@media (max-width: 600px) { .roe-heading-actions { align-items: flex-start; } }
.roe-issuance-dialog { width: min(540px, calc(100vw - 40px)); max-height: calc(100dvh - 40px); box-sizing: border-box; overflow-y: auto; border: 1px solid #e0e5ed; border-radius: 20px; padding: 28px; color: var(--ink); }
.roe-issuance-dialog::backdrop { background: rgb(15 23 42 / 45%); }
.roe-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.roe-dialog-heading h2 { margin: 0; }
.roe-issuance-names { max-height: 200px; overflow-y: auto; padding-left: 20px; }
.roe-issuance-names li { margin-bottom: 10px; }
.roe-issuance-total { padding: 20px 0; border-top: 1px solid #e0e5ed; border-bottom: 1px solid #e0e5ed; }
.roe-issuance-total > div { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.roe-issuance-total dd { margin: 0; font-size: 24px; font-weight: 700; }

.public-docs { min-height: 100dvh; background: #fff; }
.public-docs-header { max-width: 1100px; margin: 0 auto; padding: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; border-bottom: 1px solid #e0e5ed; }
.public-docs-header > a { color: var(--ink); text-decoration: none; }
.public-docs-header > span { color: var(--muted); font-size: 14px; }
.public-docs-main { max-width: 800px; margin: 0 auto; padding: 52px 24px 64px; }
.public-docs-main h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 12px 0 20px; }
.public-docs-main h2 { font-size: 21px; margin: 0 0 12px; }
.public-docs-main p, .public-docs-main li { line-height: 1.8; }
.public-docs-intro { color: var(--muted); font-size: 18px; }
.public-docs-before, .public-docs-note { padding: 24px; border: 1px solid #e0e5ed; border-radius: 16px; margin: 32px 0; }
.public-docs-before { background: #f8faff; }
.public-docs-before p, .public-docs-note p { margin-bottom: 0; }
.public-docs-main ol { padding-left: 24px; }
.public-docs-main li { padding-left: 10px; margin-bottom: 22px; }
.public-docs-main li::marker { color: var(--accent); font-weight: 700; }
.public-docs-footer { border-top: 1px solid #e0e5ed; text-align: center; padding: 24px; font-size: 13px; color: var(--muted); }

.roe-dashboard > .roe-employee-list, .roe-dashboard > section[aria-labelledby=roe-records-heading] { max-width: none; }
.roe-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.roe-list-heading h2 { margin: 0; }
.roe-filters { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.roe-filters > label { display: grid; gap: 8px; min-width: 210px; margin: 0; font-size: 13px; }
.roe-filters select { width: 100%; margin: 0; }
.roe-filters > button { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-height: 44px; }
.roe-filters > a { align-self: center; }
.roe-table td.roe-empty-list { padding: 32px 16px; text-align: center; color: var(--muted); }
.roe-dashboard > section[aria-labelledby=roe-records-heading] { margin-top: 36px; }
@media (max-width: 600px) { .roe-filters > label { width: 100%; min-width: 0; } }

.roe-header-links { display: flex; align-items: center; gap: 20px; }
.roe-header-links a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--accent); font-size: 13px; text-decoration: none; }
.roe-header-links a:hover { text-decoration: underline; }
.roe-header-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.roe-header-links .workspace-icon { flex-shrink: 0; width: 18px; height: 18px; }
.roe-heading-actions { max-width: 100%; flex-shrink: 1; }
@media (max-width: 420px) { .roe-header-links { gap: 14px; } .roe-header-links a { font-size: 12px; gap: 6px; } }

/* Keep the top organisation switcher fitted to its label. */
.organization-shell > .account-topbar > .organization-header-title {
  flex: 0 1 auto;
  max-width: 360px;
}
.header-workspace-switcher {
  width: max-content;
  max-width: 100%;
}
.header-workspace-switcher summary > .workspace-icon { flex-shrink: 0; }
.header-workspace-switcher .organization-sidebar-identity strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-workspace-switcher .workspace-switcher-menu {
  width: 280px;
  max-width: calc(100vw - 48px);
}

.roe-submit-summary { margin: 24px 0; }
.roe-submit-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--ui-border); }
.roe-submit-summary dt { color: var(--muted); }
.roe-submit-summary dd { margin: 0; font-weight: 600; font-size: 18px; }
.roe-submit-dialog .ui-dialog-actions form { margin: 0; }
.roe-submit-dialog .ui-dialog-actions button { width: auto; min-width: 100px; }

.roe-actions form { margin: 0; }
button.roe-delete-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 40px; padding: 10px 18px; border: 1px solid #b42318; border-radius: 8px; background: #b42318; color: #fff; font-weight: 600; }
button.roe-delete-button:hover { background: #912018; border-color: #912018; color: #fff; }
button.roe-delete-button:focus-visible { outline: 3px solid #fda29b; outline-offset: 3px; }
