@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/montserrat-500.717858b67da6.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-700.34bba706c26a.woff2") format("woff2");
}
@font-face {
  font-family: "Material Symbols Outlined";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../fonts/material-symbols-outlined.f4f8cd265b1f.ttf") format("truetype");
}

:root {
  --brand: #e82e44;
  --brand-dark: #b9172d;
  --brand-soft: #fff0f2;
  --ink: #171717;
  --ink-soft: #3f4145;
  --muted: #707278;
  --line: #e5e5e3;
  --line-strong: #d4d4d0;
  --surface: #ffffff;
  --background: #f6f6f3;
  --warning: #fff7d6;
  --success: #e9f8e4;
  --danger: #b42318;
  --shadow-sm: none;
  --shadow-md: none;
  --brand-radius: 16px;
  font-family: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
}
body::before { position: fixed; z-index: 100; top: 0; right: 0; left: 0; height: 5px; background: var(--brand); content: ""; }
a { color: var(--brand-dark); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgb(232 46 68 / 32%); outline-offset: 3px; }
.material-symbols {
  display: inline-block;
  flex-shrink: 0;
  overflow: hidden;
  font-family: "Material Symbols Outlined";
  font-size: 1.25em;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  vertical-align: -.14em;
  white-space: nowrap;
  word-wrap: normal;
}

.skip-link { position: fixed; z-index: 200; top: 12px; left: 12px; padding: .7rem 1rem; border-radius: 16px 16px 16px 4px; background: var(--ink); color: white; transform: translateY(-150%); }
.skip-link:focus { color: white; transform: translateY(0); }
.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 96%); backdrop-filter: blur(16px); }
.header-inner { display: flex; width: min(1780px, 94vw); min-height: 82px; margin: 0 auto; align-items: center; gap: clamp(.75rem, 1.5vw, 2rem); }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand > img { display: block; width: 142px; height: auto; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: .82rem; letter-spacing: .045em; }
.brand-copy small { max-width: 150px; color: var(--muted); font-size: .64rem; font-weight: 500; line-height: 1.25; }
.main-nav { display: flex; min-width: 0; flex: 1; overflow-x: auto; align-items: center; gap: .25rem; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .65rem .8rem; border-radius: 10px; color: var(--ink-soft); font-size: .82rem; font-weight: 500; text-decoration: none; white-space: nowrap; }
.main-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.main-nav a.active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.session { display: flex; flex: 0 0 auto; align-items: center; gap: .65rem; }
.avatar, .client-monogram { display: inline-grid; flex: 0 0 auto; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; place-items: center; }
.avatar { width: 38px; height: 38px; }
.session-copy { display: grid; line-height: 1.15; }
.session-copy strong { max-width: 150px; overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.session-copy small { margin-top: .25rem; color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .055em; }
.session form { margin: 0; }
.link-button { border: 0; padding: .55rem .65rem; border-radius: 12px 12px 12px 4px; background: transparent; color: var(--muted); cursor: pointer; font-size: .78rem; font-weight: 700; }
.link-button:hover { background: #f1f1ef; color: var(--ink); }

.container { width: min(1180px, 92vw); min-height: calc(100vh - 190px); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 5rem; }
.page-content { min-width: 0; }
.site-footer { display: flex; width: min(1180px, 92vw); margin: 0 auto; padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--line); justify-content: space-between; color: var(--muted); font-size: .75rem; }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.page-heading { margin-bottom: 1.7rem; }
.page-heading > div { min-width: 0; }
.page-heading p { max-width: 690px; margin: .45rem 0 0; }
.eyebrow { display: inline-flex; margin-bottom: .5rem; align-items: center; gap: .35rem; color: var(--brand-dark); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow::before { width: 18px; height: 3px; border-radius: 999px; background: var(--brand); content: ""; }
.eyebrow-light { color: var(--brand-dark); }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; }
h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.15rem); font-weight: 700; letter-spacing: -.045em; }
h2 { margin: 0; font-size: 1.14rem; font-weight: 700; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.card { margin-bottom: 1.15rem; padding: clamp(1.1rem, 2.5vw, 1.6rem); border: 1px solid var(--line); border-radius: var(--brand-radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.narrow { max-width: 520px; margin: 7vh auto; }
.form-card { max-width: 820px; }
.subtle-card { background: #fafaf8; box-shadow: none; }

.button, button { display: inline-flex; min-height: 42px; border: 1px solid var(--line-strong); padding: .62rem .9rem; align-items: center; justify-content: center; gap: .35rem; border-radius: 10px; background: white; color: var(--ink); cursor: pointer; font-weight: 700; text-decoration: none; transition: border-color .16s ease, background .16s ease; }
.button:hover, button:hover { border-color: #a9a9a5; color: var(--ink); }
.primary { border-color: var(--brand); background: var(--brand); color: white; }
.primary:hover { border-color: var(--brand-dark); background: var(--brand-dark); color: white; }
.secondary { border-color: var(--line-strong); background: #f0f0ee; color: var(--ink); }
.secondary:hover { border-color: #b8b8b3; background: #e9e9e6; }
.dark { border-color: var(--line-strong); background: #f0f0ee; color: var(--ink); }
.dark:hover { background: #e9e9e6; color: var(--ink); }
.subtle { border-color: transparent; background: #f2f2ef; color: var(--ink-soft); }
.back-link, .text-action { font-size: .82rem; font-weight: 800; text-decoration: none; }
.back-link { display: inline-block; margin-bottom: .55rem; color: var(--muted); }
.text-action { max-width: 100%; color: var(--brand-dark); white-space: normal; }
.section-heading { flex-wrap: wrap; }
.section-heading > .text-action { flex-shrink: 0; }
.section-heading > .section-title { flex: 1 1 16rem; }
.inline-add { display: inline-flex; margin-top: 1rem; }

.message-stack { position: relative; z-index: 5; }
.message { display: flex; margin-bottom: 1rem; padding: .9rem 1rem; align-items: center; gap: .65rem; border: 1px solid #b8dfac; border-radius: 18px 18px 18px 5px; background: var(--success); color: #245b1b; font-weight: 700; }
.message > span { display: grid; width: 24px; height: 24px; border-radius: 50%; background: #428e34; color: white; place-items: center; }
.message.warning { border-color: #e6c35c; background: var(--warning); color: #6d5310; }
.message.warning > span { background: #b58700; }
.field { display: grid; min-width: 0; margin-bottom: 1rem; align-content: start; gap: .4rem; }
label { color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
input, select, textarea { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 15px 15px 15px 5px; padding: .7rem .82rem; background: white; color: var(--ink); transition: border .15s ease, box-shadow .15s ease; }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: auto; accent-color: var(--brand); }
input::placeholder, textarea::placeholder { color: #a0a0a0; }
input:hover, select:hover, textarea:hover { border-color: #a7a7a2; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 0; box-shadow: 0 0 0 4px rgb(232 46 68 / 10%); }
textarea { height: 8rem; min-height: 120px; resize: vertical; }
.field small, .field .helptext { color: var(--muted); font-size: .75rem; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--danger); }
.errorlist { margin: .2rem 0; padding-left: 1.2rem; color: var(--danger); font-size: .78rem; font-weight: 700; }
.form-alert { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 14px 14px 14px 4px; background: #fff0ef; }
.form-intro, .info-banner { display: flex; margin: -.25rem 0 1.5rem; padding: .85rem; align-items: center; gap: .75rem; border-radius: 18px 18px 18px 5px; background: #f5f5f2; }
.form-intro-icon, .info-banner > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); place-items: center; }
.form-intro p, .info-banner p { display: grid; margin: 0; }
.form-intro small, .info-banner small { margin-top: .12rem; color: var(--muted); }
.form-actions, .filter-actions { display: flex; align-items: center; justify-content: flex-end; gap: .65rem; }
.form-actions { padding-top: .5rem; border-top: 1px solid var(--line); }
.budget-over { color: #b5162d; background: #fff0f2; border-left: 4px solid #e72e44; padding: .3rem .5rem; display: inline-block; }
.budget-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin: 1.1rem 0; }
.budget-actions:empty { display: none; }
.budget-form-field, .staff-field { margin: 0 0 1.5rem; }
.staff-field { border: 0; padding: 0; min-width: 0; }
.staff-field legend { font-weight: 700; margin-bottom: .65rem; }
.staff-picker { position: relative; }
.staff-picker > summary { display: flex; align-items: center; gap: .5rem; min-height: 3rem; padding: .6rem .75rem; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; list-style: none; }
.staff-picker > summary::-webkit-details-marker { display: none; }
.staff-picker > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.staff-selection { display: flex; flex-wrap: wrap; gap: .4rem; min-width: 0; }
.staff-selection:not(:has(.staff-tag)) { display: none; }
.staff-selection:has(.staff-tag) + .staff-placeholder { display: none; }
.staff-tag { padding: .25rem .5rem; background: var(--brand-soft); color: var(--brand-dark); border-radius: 6px; overflow-wrap: anywhere; }
.staff-chevron { margin-left: auto; }
.staff-dropdown { position: absolute; top: calc(100% + .35rem); left: 0; right: 0; z-index: 20; padding: .65rem; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow-sm); }
.staff-search { margin-bottom: .65rem; }
.staff-choices { display: grid; gap: .25rem; max-height: 16rem; overflow: auto; padding: .2rem; }
.staff-choice label { display: flex; align-items: center; gap: .7rem; min-height: 2.8rem; padding: .6rem; border: 1px solid transparent; border-radius: 6px; cursor: pointer; overflow-wrap: anywhere; }
.staff-choice input { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin: 0; accent-color: var(--brand); }
.staff-choice label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.staff-choice label:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.staff-choice[hidden], .staff-picker [hidden] { display: none; }
.budget-actions form { margin: 0; min-width: 0; }
.budget-actions .button, .budget-actions button { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 600px) {
  .budget-actions > *, .budget-actions button { width: 100%; }
}

.filter-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1rem; }
.filter-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .75rem; }
.filter-card label { min-height: 1.3rem; }
.filter-card .field { margin-bottom: 0; }
.filter-heading { display: flex; grid-column: 1 / -1; padding-bottom: .9rem; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); }
.filter-heading > span:last-child { display: grid; min-width: 0; overflow-wrap: anywhere; }
.filter-heading small { color: var(--muted); font-size: .7rem; }
.filter-icon { display: grid; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-size: 1.25rem; font-weight: 900; place-items: center; }
.filter-actions { grid-column: 1 / -1; padding-top: .15rem; }
.client-export-links { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; padding: 1rem 1.5rem; border-top: 1px solid var(--line); }
.client-export-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.client-list-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); align-items: start; gap: 1.15rem; }
.client-list-layout .filter-card { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.filter-icon { flex: 0 0 38px; }
.filter-card .field small { overflow-wrap: anywhere; }
.filter-label-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: relative; }
.field-help summary { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; color: var(--muted); font-size: .8rem; list-style: none; }
.field-help summary::-webkit-details-marker { display: none; }
.field-help summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.help-copy { position: absolute; z-index: 5; top: calc(100% + .3rem); right: 0; width: min(20rem, 100%); padding: .8rem; background: white; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px #0002; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.website-domain { display: inline-block; max-width: 17rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.website-star[aria-pressed="true"] { color: var(--brand-dark); background: var(--brand-soft); }
.legacy-platform-references { margin-block: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; }
.client-list-layout .filter-actions > * { min-width: 0; padding-inline: .4rem; font-size: .75rem; }
.user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.local-login-disclosure { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.local-login-disclosure summary { width: fit-content; max-width: 100%; padding: .5rem; border-radius: 8px; cursor: pointer; color: var(--muted); font-size: .75rem; }
.local-login-disclosure summary:hover { background: var(--brand-soft); color: var(--brand-dark); }
.local-login-disclosure > p { font-size: .75rem; }
.login-layout > * { min-width: 0; }
.client-list-layout .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
.client-list-layout .table-card { min-width: 0; }

.table-card { overflow: hidden; padding: 0; }
.table-scroll { overflow-x: auto; }
#budget-results { min-width: 0; }
.container:has(.budget-results) { width: min(1600px, 96vw); }
.client-list-layout.budget-layout { grid-template-columns: 245px minmax(0, 1fr); }
.budget-filter-link { display: none; }
.budget-results { min-width: 0; }
.budget-results-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem 1rem; margin-bottom: 1rem; }
.budget-results-heading h2 { margin: 0; }
.budget-results-heading > span, .budget-caption { font-size: .75rem; }
.budget-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: .8rem; }
.budget-total { min-width: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: #fafaf9; }
.budget-total header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem .7rem; }
.budget-total header > strong { font-size: .85rem; }
.budget-total header > span { color: var(--muted); font-size: .72rem; }
.budget-total dl { display: grid; gap: .6rem; margin: .85rem 0 0; }
.budget-total dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .25rem .8rem; }
.budget-total dt { color: var(--muted); font-size: .8rem; }
.budget-total dd { margin: 0; font-size: 1.05rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.budget-total dd small { font-size: .72rem; font-weight: 500; }
.budget-total-alert { color: #b5162d; }
.budget-total-under, .budget-table .budget-under { color: #1f5f91; }
.budget-total dl > div { position: relative; padding: .25rem 0; }
.budget-total dt a { color: inherit; text-decoration: none; }
.budget-total dt a::after { content: ""; position: absolute; inset: 0; border-radius: 4px; }
.budget-total dt a:hover::after { background: rgb(0 0 0 / 3%); }
.budget-total dt a:focus-visible { outline: none; }
.budget-total dt a:focus-visible::after { outline: 2px solid var(--brand); outline-offset: 3px; }
.budget-caption { margin: .65rem 0 1.25rem; color: var(--muted); line-height: 1.5; }
.budget-table { min-width: 980px; }
.budget-table-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.budget-table { border-collapse: separate; border-spacing: 0; }
.budget-table thead { position: relative; z-index: 2; transform: translateY(var(--budget-header-offset, 0px)); }
.budget-table thead th { background: white; font-size: .75rem; text-transform: none; letter-spacing: 0; vertical-align: bottom; }
.budget-table th.budget-number { max-width: 13rem; }
.budget-table .budget-number { font-variant-numeric: tabular-nums; }
.budget-table .budget-number { text-align: right; }
.budget-table .budget-select { width: 2.5rem; padding-right: .25rem; }
.budget-table .budget-identity { min-width: 12rem; max-width: 20rem; overflow-wrap: anywhere; }
.budget-identity > a { font-weight: 650; text-decoration: none; }
.budget-identity > a:hover { text-decoration: underline; }
.budget-identity > span { display: block; margin-top: .2rem; font-size: .78rem; color: var(--muted); }
.budget-money, .budget-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.budget-next-note { display: block; margin: .35rem 0; color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.5; }
.budget-table .budget-money small { display: inline; font-size: .72rem; margin: 0; }
.budget-line { display: block; margin-top: .4rem; }
.budget-status { display: inline-block; padding: .2rem .5rem; border-radius: 6px; font-size: .72rem; font-weight: 650; white-space: nowrap; background: #f3f3f0; color: #454545; }
.budget-status-alert { background: #fff0f2; color: #b5162d; border: 1px solid #f5c8d0; }
.budget-status-under { background: #edf5fc; color: #1f5f91; border: 1px solid #c9dff1; }
.budget-table .budget-escalated { background: #fff5f6; }
.budget-table .budget-escalated td:first-child { box-shadow: inset 3px 0 #e72e44; }
.budget-status-done { background: #edf6ee; color: #28633b; }
.budget-status-pending { background: #fff5e5; color: #805200; }
.budget-table .budget-ack { min-width: 11rem; max-width: 15rem; }
.budget-table .budget-ack-person { margin-top: .3rem; overflow-wrap: anywhere; }
.budget-ack-history { margin-top: .25rem; font-size: .73rem; }
.budget-ack-history > summary { cursor: pointer; padding: .35rem 0; color: var(--muted); }
.budget-ack-history > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.budget-ack-history > div { padding: .6rem 0; border-top: 1px solid var(--line); }
.budget-table .budget-error { color: #b5162d; }
.budget-bulk { margin-top: 1.2rem; font-size: .8rem; }
@media (max-width: 1400px) {
  .client-list-layout.budget-layout { grid-template-columns: 1fr; }
  .budget-layout .budget-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .budget-layout .budget-filter { order: 2; grid-template-columns: 1fr; scroll-margin-top: 180px; }
  .budget-filter-link { display: inline-block; padding: .5rem 0; font-size: .8rem; }
}
.budget-table td { overflow-wrap: normal; font-size: .85rem; }
.budget-table th, .budget-table td { padding: .85rem .75rem; }
.budget-filter p { margin: 0; }
.budget-filter h2 { grid-column: 1 / -1; font-size: 1.1rem; margin: 0 0 .25rem; }
.assignment-badges { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .4rem; }
.badge.badge-backup { background: #edf5fc; color: #245779; }
.client-row-backup > td { box-shadow: inset 0 1px #d2e6f6, inset 0 -1px #d2e6f6; }
.client-row-backup > td:first-child { box-shadow: inset 2px 0 #bfdcf2, inset 0 1px #d2e6f6, inset 0 -1px #d2e6f6; }
.client-row-backup > td:last-child { box-shadow: inset -2px 0 #bfdcf2, inset 0 1px #d2e6f6, inset 0 -1px #d2e6f6; }
.record-list li.catalog-record { display: block; }
.catalog-record-heading { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.catalog-relations { margin-top: .8rem; }
.catalog-relations summary { cursor: pointer; font-weight: 700; padding: .5rem 0; }
.catalog-relations ul { padding-left: 1rem; }
.catalog-relations li { flex-wrap: wrap; }
.permission-note { margin: 1rem 1.5rem; color: var(--muted); }
.permission-table { min-width: 760px; }
.permission-table th:first-child { min-width: 260px; }
.permission-table td { text-align: center; }
.permission-table tbody th { font-size: .88rem; text-transform: none; letter-spacing: normal; }
.permission-table th small { display: block; font-weight: 400; margin-top: .4rem; text-transform: none; letter-spacing: normal; }
.permission-table caption { text-align: left; padding: 1rem; }
.result-summary { display: flex; padding: 1.05rem 1.25rem; align-items: center; gap: .75rem; border-bottom: 1px solid var(--line); background: #fbfbf9; color: var(--ink-soft); font-size: .78rem; font-weight: 800; }
.result-summary > span { display: grid; padding-left: .75rem; border-left: 4px solid var(--brand); }
.result-summary small { color: var(--muted); font-size: .68rem; font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: white; color: var(--muted); font-size: .68rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fcfcf8; }
tbody tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: .16rem; color: var(--muted); }
.client-link, .user-row { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.client-link > span:last-child, .user-row > span:last-child { display: block; min-width: 0; }
.user-row > span:last-child { display: grid; gap: .12rem; }
.record-badges { display: flex; flex-wrap: wrap; gap: .35rem; }
.record-badges .badge { width: fit-content; }
.client-link { color: var(--ink); font-weight: 850; }
.client-link:hover { color: var(--brand-dark); }
.client-monogram { width: 38px; height: 38px; }
.client-favicon { width: 38px; height: 38px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 50%; background: white; object-fit: contain; padding: 5px; }
.client-favicon-large, .client-monogram-large { width: 54px; height: 54px; }
.client-favicon-large { padding: 7px; }
.client-logo-control { position: relative; display: inline-grid; flex: 0 0 auto; place-items: center; }
.logo-edit-button { position: absolute; right: -7px; bottom: -7px; display: grid; width: 27px; height: 27px; border: 2px solid white; border-radius: 50%; background: var(--brand); color: white; text-decoration: none; box-shadow: var(--shadow-sm); place-items: center; }
.logo-edit-button:hover { background: var(--brand-dark); color: white; }
.logo-edit-button .material-symbols { font-size: 15px; }
.logo-upload-card { display: grid; gap: 1.25rem; }
.logo-upload-preview { display: flex; padding: 1rem; align-items: center; gap: 1rem; border: 1px solid var(--line); border-radius: 16px; background: #fbfbf9; }
.logo-upload-preview > div { display: grid; gap: .2rem; }
.logo-upload-preview small { color: var(--muted); }
.logo-preview-image { width: 84px; height: 84px; flex: 0 0 auto; font-size: 1.6rem; }
.checkbox-control { display: flex; align-items: flex-start; gap: .55rem; }
.checkbox-control input { width: auto; min-width: auto; margin-top: .15rem; flex: 0 0 auto; }
.checkbox-field small { display: block; margin-left: 1.6rem; }
.client-heading-copy { min-width: 0; }
.client-identity { display: flex; margin-top: .55rem; align-items: center; gap: .8rem; }
.client-identity > div { min-width: 0; }
.client-identity h1, .client-identity p { margin-top: 0; }
.client-identity p { margin-bottom: 0; }
.date-value { font-weight: 750; }
.badge { display: inline-flex; margin: .12rem .22rem .12rem 0; padding: .25rem .58rem; align-items: center; border-radius: 999px; background: #ececea; color: #454545; font-size: .68rem; font-weight: 850; letter-spacing: .015em; }
.area-ppc { background: #ffe2e7; color: #9d1728; }
.area-seo { background: #e8f5e9; color: #286134; }
.area-shared { background: #e5eefb; color: #235284; }
.empty-state, .empty-list { padding: 2.8rem 1rem !important; color: var(--muted); text-align: center; }
.empty-state > span { display: grid; width: 52px; height: 52px; margin: 0 auto .8rem; border-radius: 50%; background: #f0f0ed; color: var(--ink); font-size: 1.5rem; place-items: center; }
.empty-state strong, .empty-state small, .empty-list strong, .empty-list small { display: block; }
.empty-state strong, .empty-list strong { color: var(--ink-soft); }
.empty-state small, .empty-list small { margin-top: .3rem; }
.pagination { display: flex; padding: 1rem; align-items: center; justify-content: center; gap: 1rem; border-top: 1px solid var(--line); font-size: .82rem; font-weight: 750; }

.record-list { margin: 0; padding: 0; list-style: none; }
.record-list li { display: flex; padding: 1rem 0; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); }
.record-list li:first-child { padding-top: .7rem; }
.record-list li:last-child { padding-bottom: .2rem; border-bottom: 0; }
.record-list .stacked { display: block; }
.record-meta { color: #939395; font-size: .7rem; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.actions a { display: inline-flex; padding: .36rem .52rem; border-radius: 10px 10px 10px 3px; background: #f2f2ef; color: var(--ink-soft); font-size: .7rem; font-weight: 800; text-decoration: none; }
.actions a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.details { display: grid; grid-template-columns: minmax(150px, 190px) 1fr; margin: 1rem 0 0; gap: .65rem 1rem; }
.details dt { color: var(--muted); font-size: .78rem; font-weight: 750; }
.details dd { margin: 0; color: var(--ink-soft); }
.summary-grid { display: grid; margin: -.25rem 0 1.15rem; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.summary-card { display: grid; min-height: 104px; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; background: white; box-shadow: var(--shadow-sm); align-content: space-between; }
.summary-card strong { overflow: hidden; font-size: 1.4rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.summary-label { color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 10px; height: 10px; margin-right: .45rem; border-radius: 50%; background: #3f8f4f; }
.section-title { display: flex; align-items: center; gap: .8rem; }
.section-title > div { display: grid; }
.section-title p { margin: .22rem 0 0; color: var(--muted); font-size: .76rem; }
.section-icon { display: grid; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 900; place-items: center; }
.section-title.compact .section-icon { width: 32px; height: 32px; }
.warning-card { border-color: #ead47c; background: var(--warning); box-shadow: none; }
.warning-icon { background: #f2ce3e; color: #4d4000; }
.metadata { color: var(--muted); font-size: .82rem; }
.protected-role { padding: .35rem .6rem; border-radius: 999px; background: #f0f0ed; color: var(--muted); font-size: .68rem; font-weight: 750; }

.login-layout { display: grid; max-width: 960px; min-height: min(560px, calc(100vh - 220px)); margin: 0 auto; grid-template-columns: .92fr 1.08fr; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); }
.login-intro { display: flex; padding: clamp(2rem, 5vw, 3.75rem); flex-direction: column; justify-content: center; border-right: 1px solid var(--line); background: #f0efed; color: var(--ink); }
.login-logo { width: 190px; height: auto; margin-bottom: 2.3rem; }
.login-intro h1 { max-width: 360px; color: var(--ink); font-size: clamp(1.9rem, 3.1vw, 2.65rem); line-height: 1.08; overflow-wrap: normal; }
.login-intro h1 span { display: block; white-space: nowrap; }
.login-intro > p { max-width: 390px; margin: 1.2rem 0 2rem; color: var(--muted); font-size: .9rem; }
.login-intro > .login-product-label { margin: .55rem 0 0; color: var(--ink-soft); font-size: .82rem; font-weight: 700; }
.login-context { display: grid; margin: 0; padding-top: 1.15rem; border-top: 1px solid var(--line-strong); gap: .7rem; }
.login-context div { display: grid; gap: .08rem; }
.login-context dt { color: var(--muted); font-size: .64rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.login-context dd { margin: 0; color: var(--ink); font-size: .8rem; font-weight: 700; }
.login-card { width: auto; margin: 0; padding: clamp(2rem, 5vw, 4.25rem); align-self: stretch; border: 0; border-radius: 0; box-shadow: none; }
.login-card-heading { margin-bottom: 2rem; }
.login-card-heading h2 { font-size: clamp(1.65rem, 3vw, 2.2rem); letter-spacing: -.04em; }
.login-card-heading p { margin: .5rem 0 0; }
.login-form .field { margin-bottom: 1.15rem; }
.login-submit { width: 100%; margin-top: .35rem; justify-content: space-between; padding-inline: 1.15rem; }
.login-divider { display: flex; margin: 1.1rem 0; align-items: center; gap: .75rem; color: var(--muted); font-size: .68rem; text-align: center; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.login-note { margin: 1.2rem 0 0; color: var(--muted); font-size: .7rem; text-align: center; }
.login-note .material-symbols { color: var(--muted); }
.access-state-card { text-align: center; }
.access-state-card .section-icon { margin: 0 auto 1rem; }
.access-state-card p { color: var(--muted); }
.access-state-card .details { text-align: left; }
.access-status-pending { background: var(--warning); }
.access-status-rejected { background: #fff0ef; color: var(--danger); }
.access-status-approved { background: var(--success); color: #245b1b; }
.access-decision-actions { flex-wrap: wrap; }

.back-link, .text-action, .copy-button { display: inline-flex; align-items: center; gap: .3rem; }
.copy-actions { display: flex; flex-wrap: wrap; margin-top: .8rem; gap: .5rem; }
.copy-button { min-height: 32px; padding: .35rem .55rem; border-color: var(--line); background: white; color: var(--muted); font-size: .7rem; font-weight: 500; }
.client-detail-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: start; gap: 1rem; }
.section-nav { position: sticky; top: 105px; display: grid; padding: .85rem; border: 1px solid var(--line); border-radius: 12px; background: white; gap: .2rem; }
.section-nav > span { padding: .4rem .55rem; color: var(--muted); font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.section-nav a { display: flex; padding: .55rem; align-items: center; gap: .45rem; border-radius: 8px; color: var(--ink-soft); font-size: .72rem; font-weight: 500; text-decoration: none; }
.section-nav a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.anchor-section { scroll-margin-top: 105px; }
.detail-sections { min-width: 0; }
.link-grid { display: grid; margin-top: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.link-tile { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; align-items: start; gap: .65rem; }
.link-tile > .material-symbols { display: grid; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); place-items: center; }
.link-tile div { display: grid; min-width: 0; gap: .15rem; }
.link-tile small { color: var(--muted); font-size: .68rem; }
.link-tile code, .identifier-list code { overflow: hidden; color: var(--ink); font-family: inherit; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.icon-action { display: grid; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); text-decoration: none; place-items: center; }
.icon-action:hover { background: #f0f0ee; color: var(--brand-dark); }
.service-name { font-size: 1rem; }
.responsibility-chips { display: flex; flex-wrap: wrap; margin-top: .65rem; gap: .4rem; }
.responsibility-chips > span { padding: .28rem .48rem; border-radius: 7px; background: #f1f1ef; font-size: .68rem; }
.nested-references { display: flex; flex-wrap: wrap; margin-top: .7rem; gap: .5rem; }
.nested-references > span { padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; font-size: .7rem; }
.actions form { margin: 0; }
.action-button { min-height: auto; padding: .36rem .52rem; border: 0; border-radius: 8px; background: #f2f2ef; color: var(--ink-soft); font-size: .7rem; }
.danger-action { color: var(--danger); }
.danger-action:hover { border-color: #ffd2cf; background: #fff0ef; color: var(--danger); }
.compact-button { min-height: 36px; padding: .45rem .65rem; font-size: .7rem; }
.compact-note { margin: .75rem 0 0; font-size: .75rem; }
.identifier-list { display: grid; margin-top: .8rem; border-top: 1px solid var(--line); }
.identifier-list > div { display: flex; padding: .65rem 0; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--line); }
.identifier-list > div:last-child { border-bottom: 0; }
.identifier-list span { display: grid; }
.identifier-list small { color: var(--muted); font-size: .65rem; }
.timeline { margin: 1rem 0 0; padding: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: 12px 1fr; padding: .65rem 0; gap: .65rem; }
.timeline-dot { width: 9px; height: 9px; margin-top: .35rem; border-radius: 50%; background: var(--brand); }
.timeline div { display: grid; gap: .15rem; }
.timeline small { color: var(--muted); font-size: .68rem; }
.timeline p { margin: .2rem 0 0; font-size: .72rem; }
.wide-form-card { max-width: none; }
.form-grid { display: grid; margin-top: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.reference-formset { display: grid; margin-top: 1rem; gap: .8rem; }
.reference-form-row { min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; }
.reference-form-row legend { padding: 0 .4rem; color: var(--muted); font-size: .7rem; font-weight: 700; }
.compact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sticky-form-actions { position: sticky; z-index: 4; bottom: 1rem; display: flex; width: fit-content; margin: 1rem 0 0 auto; padding: .55rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / 96%); gap: .5rem; }

/* Shared UAT components: stable widths and compact, accessible actions. */
input, select, textarea { min-width: 0; max-width: 100%; }
select { text-overflow: ellipsis; }
.client-heading .back-link { display: flex; width: fit-content; }
.icon-only { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: .4rem; vertical-align: middle; }
.value-with-copy { display: flex; min-width: 0; align-items: center; gap: .4rem; overflow-wrap: anywhere; }
.value-with-copy code { min-width: 0; overflow-wrap: anywhere; font: inherit; font-size: .8rem; }
.value-with-copy .copy-button { flex: 0 0 auto; }
.copy-feedback { position: fixed; z-index: 100; right: 1rem; bottom: 1rem; max-width: calc(100vw - 2rem); padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); color: white; font-size: .8rem; }
.copy-feedback:empty { display: none; }
.reference-tile { display: grid; min-width: 0; padding: .85rem; border: 1px solid var(--line); border-radius: 10px; align-content: start; gap: .7rem; }
.reference-copy { display: grid; min-width: 0; gap: .2rem; overflow-wrap: anywhere; }
.reference-copy > small { color: var(--muted); font-size: .68rem; }
.reference-tile .actions { border-top: 1px solid var(--line); padding-top: .6rem; }
.service-record > .section-heading { align-items: stretch; flex-direction: column; gap: .7rem; }
.responsibility-chip { display: flex; flex-wrap: wrap; padding: .4rem .6rem; border-radius: 8px; background: #f1f1ef; gap: .25rem .6rem; font-size: .75rem; }
.responsibility-meta { flex-basis: 100%; font-size: .7rem; }
.responsibility-meta summary { color: var(--muted); cursor: pointer; }
.responsibility-meta p { margin: .3rem 0; }
.service-platform-links { display: flex; flex-wrap: wrap; margin-top: .8rem; align-items: center; gap: .5rem; font-size: .75rem; }
.service-platform-links a { border: 1px solid var(--line); border-radius: 8px; padding: .35rem .5rem; text-decoration: none; }
.remove-platform { margin: 1rem 0 .3rem; }
.anchor-section { scroll-margin-top: 190px; }
.record-list li > *, .section-heading > *, .timeline li > * { min-width: 0; }
.record-list, .details dd, .timeline { overflow-wrap: anywhere; }

@media (max-width: 1600px) {
  .header-inner { flex-wrap: wrap; gap: .65rem 1.25rem; padding: .75rem 0; }
  .main-nav { order: 3; width: 100%; flex-basis: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .session { margin-left: auto; }
}
@media (max-width: 1180px) {
  .client-list-layout { grid-template-columns: 1fr; }
  .client-list-layout .filter-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .filter-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .client-detail-layout { grid-template-columns: 1fr; }
  .section-nav { position: static; display: flex; overflow-x: auto; padding: .45rem; }
  .section-nav > span { display: none; }
  .section-nav a { flex: 0 0 auto; }
}
@media (max-width: 820px) {
  .login-layout { max-width: 600px; grid-template-columns: 1fr; }
  .login-intro { min-height: 260px; padding: 2.5rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-logo { margin-bottom: 1.5rem; }
  .login-context { display: none; }
  .login-card { margin-top: 0; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .link-grid, .compact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body::before { height: 4px; }
  .header-inner { width: 92vw; }
  .brand > img { width: 122px; }
  .brand-copy small, .session-copy, .site-footer span:last-child { display: none; }
  .main-nav a { padding: .58rem .68rem; font-size: .78rem; }
  .container { padding-top: 2.25rem; }
  .page-heading, .section-heading, .record-list li { align-items: flex-start; flex-direction: column; }
  .section-heading > .section-title { flex: initial; }
  .page-heading .button { width: 100%; }
  .page-heading > .actions { width: 100%; }
  .page-heading > .actions .button { flex: 1 1 100%; }
  .filter-card { grid-template-columns: 1fr; }
  .client-list-layout .filter-card { grid-template-columns: 1fr; }
  .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .details { grid-template-columns: 1fr; gap: .15rem; }
  .details dd { margin-bottom: .6rem; }
  .summary-card { min-height: 92px; }
  .section-heading .text-action { margin-left: 0; }
  .section-nav { top: 126px; margin-right: -4vw; margin-left: -4vw; border-right: 0; border-left: 0; border-radius: 0; }
  .link-grid, .form-grid { grid-template-columns: 1fr; }
  .link-tile { grid-template-columns: auto minmax(0, 1fr); }
  .link-tile .icon-action { grid-column: 2; }
  .identifier-list > div { align-items: flex-start; flex-direction: column; }
  .sticky-form-actions { right: 0; bottom: .5rem; width: 100%; }
  .sticky-form-actions > * { flex: 1; }
  .login-intro { min-height: 235px; padding: 2rem; }
  .login-intro h1 { font-size: 1.85rem; }
  .login-intro h1 span { white-space: normal; }
  .login-intro > p { font-size: .86rem; }
  .login-points { gap: .65rem; }
  .login-card { margin: .6rem; padding: 1.5rem; }
  .access-decision-actions > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.import-summary { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.issue-list { display: grid; margin: 1rem 0 0; padding: 0; list-style: none; gap: .55rem; }
.issue-list li { display: grid; grid-template-columns: 82px minmax(0, 1fr); padding: .7rem .8rem; border-radius: 10px; background: rgb(255 255 255 / 65%); gap: .75rem; font-size: .78rem; }
.issue-list strong { color: var(--ink-soft); }
.import-errors { border-color: #efb0aa; background: #fff4f2; }
.confirmation-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.confirmation-card p { max-width: 720px; margin: .45rem 0 0; color: var(--muted); }
.import-status-applied { background: #e8f5e9; color: #286134; }
.import-status-failed { background: #ffe2e7; color: #9d1728; }
.import-status-previewed { background: #e5eefb; color: #235284; }
.hash-value { overflow-wrap: anywhere; font-size: .75rem; }

@media (max-width: 620px) {
  .confirmation-card { align-items: stretch; flex-direction: column; }
  .confirmation-card button { width: 100%; }
  .issue-list li { grid-template-columns: 1fr; gap: .2rem; }
}
.badge.agency-klikkmania { background: #e72e44; color: #fff; }
.badge.agency-medigrow { background: #ffd000; color: #000; }
.client-list-links { display: grid; gap: .4rem; margin: .5rem 0 0 3rem; max-width: 24rem; }
.client-list-links a { overflow-wrap: anywhere; font-size: .875rem; }
.client-list-links .client-website { display: flex; align-items: center; gap: .2rem; min-width: 0; }
.client-website .material-symbols { flex: 0 0 auto; }
.client-list-links .material-symbols { font-size: 1rem; vertical-align: middle; }
#client-results td:first-child { min-width: 17rem; }

.pending-request-dot { display: inline-block; flex: 0 0 .5rem; width: .5rem; height: .5rem; border-radius: 50%; background: #e72e44; }
.user-management-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: 1.5rem; }
.user-management-nav [aria-current="page"] { background: #fff0f3; color: #bc1532; border-color: #e72e44; }
.user-history-link { padding: .65rem; color: var(--muted); font-size: .85rem; border-radius: 8px; }
