@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Regular.5aaadb685d3c.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Medium.02ec16345450.woff2") format("woff2"); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-SemiBold.51d76d33ef85.woff2") format("woff2"); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/IBMPlexSans-Bold.ea5f696de389.woff2") format("woff2"); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  --brand-deep: #0b0b31;
  --brand-mid: #101148;
  --brand-on-dark: #e8e8e8;
  --primary: #27285b;
  --primary-dark: #1e1f54;
  --primary-light: #e7e8f4;
  --bg: #f4f5fa;
  --surface: #fff;
  --surface-muted: #f7f8fc;
  --border: #d9dbe9;
  --line-strong: #8589a0;
  --text: #17182f;
  --muted: #626780;
  --muted-strong: #464b66;
  --success: #1f6f55;
  --success-soft: #e9f4ef;
  --warning: #8b5f12;
  --warning-soft: #fff6e4;
  --danger: #a83a32;
  --danger-soft: #fff1ef;
  --info: #44558c;
  --info-soft: #eef1f8;
  --event-consultation: #1f6f55;
  --event-call: #9a4e0a;
  --shadow-card: 0 2px 8px rgba(30, 31, 84, .035);
  --shadow-panel: 0 16px 38px rgba(30, 31, 84, .12);
  --radius-card: 12px;
  --radius-control: 8px;
  --focus: 0 0 0 5px #5557a5;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); color: var(--text); font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif; font-size: 15px; line-height: 1.45; }
body { margin: 0; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: var(--primary); }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: var(--focus); }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; transform: translateY(-140%); background: #fff; padding: 12px 16px; border-radius: var(--radius-control); }
.skip-link:focus { transform: none; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 500; }

.app-shell { min-height: 100vh; padding-left: 96px; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 120; width: 96px; height: 100dvh; min-height: 0; overflow: clip; display: flex; flex-direction: column; padding: 24px 16px 16px; background: var(--brand-deep); color: var(--brand-on-dark); transition: width 400ms cubic-bezier(.22,1,.36,1), transform 400ms cubic-bezier(.22,1,.36,1), box-shadow 400ms ease; }
.sidebar__head { flex: 0 0 auto; margin-bottom: 32px; }
.brand { width: 228px; min-height: 56px; display: flex; align-items: center; gap: 12px; color: var(--brand-on-dark); text-decoration: none; }
.brand__logo { width: 56px; height: 56px; flex: 0 0 56px; object-fit: contain; }
.brand span { display: grid; flex: 0 0 120px; gap: 2px; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 350ms ease, visibility 0s linear 350ms; }
.brand strong { font-size: 17px; font-weight: 600; line-height: 1.3; }
.brand small { color: var(--brand-on-dark); font-size: 12px; white-space: nowrap; }
.ui-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon, .main-nav svg, .button svg, .icon-button svg, .user-card svg { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.main-nav { min-height: 0; display: flex; flex-direction: column; flex: 1; gap: 8px; padding: 4px; margin: 0 -4px; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--brand-mid) transparent; }
.main-nav a, .nav-group__summary, .sidebar .user-card, .sidebar .button--ghost-on-dark { position: relative; width: 64px; min-height: 48px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--brand-on-dark); font-size: 14px; font-weight: 400; line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer; }
.main-nav a:hover, .main-nav a.is-active, .nav-group__summary:hover, .nav-group__summary.is-active, .sidebar .user-card:hover, .sidebar .user-card.is-active, .sidebar .button--ghost-on-dark:hover { background: var(--primary); color: #fff; }
.nav-text { min-width: 0; display: none; }
.nav-group { flex: 0 0 auto; min-width: 0; border: 0; border-radius: 12px; }
.nav-group__summary { list-style: none; }
.nav-group__summary::-webkit-details-marker { display: none; }
.nav-group__summary::after { content: "›"; display: none; flex: 0 0 1em; margin-left: auto; font-size: 18px; line-height: 1; text-align: center; transition: transform .16s; }
.nav-group[open] > .nav-group__summary::after { transform: rotate(90deg); }
.nav-group__items { display: none; }
.sidebar__footer { flex: 0 0 auto; display: grid; gap: 8px; padding-top: 16px; }
.sidebar .user-card .nav-text { text-align: left; }
.user-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; }
.user-card .nav-text > span { color: var(--brand-on-dark); font-size: 12px; }
.sidebar .sidebar-close { display: none; position: absolute; top: 8px; left: 224px; width: 44px; height: 44px; padding: 8px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--brand-on-dark); cursor: pointer; }
.sidebar .sidebar-close:hover { background: var(--primary); }
.nav-open .sidebar { width: 280px; box-shadow: 12px 0 32px rgba(11,11,49,.16); }
.nav-open .brand span { opacity: 1; visibility: visible; transition-delay: 0s; }
.nav-open .sidebar-close:not([hidden]) { display: grid; place-items: center; }
.nav-open .main-nav a, .nav-open .nav-group__summary, .nav-open .sidebar .user-card, .nav-open .sidebar .button--ghost-on-dark { width: 248px; justify-content: flex-start; padding-inline: 16px; }
.nav-open .nav-text { display: inline; white-space: nowrap; }
.nav-open .user-card .nav-text { display: grid; gap: 3px; }
.nav-open .nav-group__summary::after { display: block; }
.nav-open .nav-group[open] > .nav-group__items { display: grid; gap: 4px; padding-top: 4px; }
.nav-open .nav-group__items a { min-height: 44px; gap: 10px; padding: 10px 12px 10px 24px; border-radius: 10px; font-size: 13px; }
.nav-group__items svg { width: 18px; height: 18px; flex-basis: 18px; }
.sidebar-backdrop { position: fixed; inset: 0; z-index: 110; border: 0; background: rgba(11,11,49,.18); }
.sidebar-backdrop[hidden], .sidebar-close[hidden] { display: none; }
.sidebar :is(a, button, summary):focus-visible { outline: 2px solid currentColor; outline-offset: -3px; box-shadow: none; }
.workspace-status .sidebar-toggle { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; padding: 8px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--primary); cursor: pointer; }
.workspace-status .sidebar-toggle:hover { background: var(--primary-light); }
.workspace { min-width: 0; }
.workspace-status { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 24px 8px; }
.save-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-strong); font-size: 13px; font-weight: 600; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.save-status--dirty .status-dot, .save-status--saving .status-dot { background: #9a6a16; }
.save-status--error .status-dot { background: var(--danger); }
.environment-badge { margin-left: auto; padding: 5px 9px; border: 1px solid #c7cde0; border-radius: 999px; background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 500; }
.mobile-account { display: none; align-items: center; gap: 8px; min-width: 0; }.mobile-account__link { max-width: 150px; min-height: 44px; display: flex; align-items: center; overflow: hidden; padding: 0 8px; border: 1px solid transparent; border-radius: var(--radius-control); color: var(--muted-strong); font-size: 12px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }.mobile-account__link:hover, .mobile-account__link.is-active { border-color: var(--line-strong); background: var(--primary-light); color: var(--primary-dark); }.mobile-account .icon-button { width: 44px; height: 44px; min-height: 44px; flex-basis: 44px; }
.main-content { min-width: 0; padding: 16px 24px 32px; }
.message-stack { display: grid; gap: 8px; margin-bottom: 16px; }

.page-head { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.page-head__title { display: flex; gap: 14px; align-items: flex-start; }
.page-head__title > img { display: none; }
.page-head h1 { margin: 0; color: var(--text); font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.page-head p:not(.eyebrow) { max-width: 760px; margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.page-head__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.current-employee { min-width: 190px; display: grid; gap: 2px; text-align: right; }
.current-employee span { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.current-employee strong { max-width: 300px; overflow: hidden; color: var(--primary-dark); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.page-head--compact { max-width: 820px; }
.panel { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); padding: 20px; }
.panel--narrow { max-width: 720px; }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: -2px -2px 18px; padding: 0 2px 16px; border-bottom: 1px solid var(--border); }
.panel__head h2 { margin: 0; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.panel__head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.account-grid { max-width: 1040px; display: grid; grid-template-columns: minmax(260px, .78fr) minmax(360px, 1.22fr); gap: 18px; align-items: start; }
.account-facts { display: grid; gap: 0; margin: 0; }
.account-facts div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.account-facts div:first-child { padding-top: 0; }
.account-facts div:last-child { padding-bottom: 0; border-bottom: 0; }
.account-facts dt { color: var(--muted); font-size: 13px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.account-facts dd { min-width: 0; overflow-wrap: anywhere; margin: 0; color: var(--primary-dark); font-size: 16px; font-weight: 600; }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-control); cursor: pointer; font-weight: 500; line-height: 1.2; text-decoration: none; transition: color .16s, background-color .16s, border-color .16s, transform .1s; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button--primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.button--primary:hover { border-color: var(--primary-dark); background: var(--primary-dark); }
.button--secondary { border-color: var(--border); background: #fff; color: var(--primary-dark); }
.button--secondary:hover, .button--ghost:hover { border-color: #8c90b6; background: var(--primary-light); }
.button--ghost { border-color: transparent; background: transparent; color: var(--primary); }
.button--ghost-on-dark { width: 100%; border-color: #4b4d85; background: transparent; color: #fff; }
.button--ghost-on-dark:hover { background: #34356b; }
.button--danger-ghost { border-color: #ecc4bf; background: var(--danger-soft); color: var(--danger); }
.button--danger-ghost:hover { border-color: #d6938b; background: #ffe7e3; color: #842b25; }
.button--success { border-color: var(--success); background: var(--success); color: #fff; }
.button--success:hover { border-color: #185a45; background: #185a45; }
.button--danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button--danger:hover { border-color: #842e28; background: #842e28; }
.button--full { width: 100%; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 44px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-control); background: #fff; color: var(--primary); cursor: pointer; }
.icon-button:hover { border-color: #8c90b6; background: var(--primary-light); }

.button-press-glinting { --button-press-glint-color: rgba(39, 40, 91, .22); background-image: linear-gradient(110deg, transparent 35%, var(--button-press-glint-color) 47%, var(--button-press-glint-color) 53%, transparent 65%)!important; background-repeat: no-repeat!important; background-size: 300% 100%!important; animation: button-press-glint-sweep 280ms linear both; }
.main-nav a.button-press-glinting, .user-card.button-press-glinting { animation-duration: 480ms; }
.button-press-glinting.button-press-glint-light { --button-press-glint-color: rgba(255, 255, 255, .25); }
@keyframes button-press-glint-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

.filter-toolbar { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.search-field { position: relative; width: min(430px, 100%); }
.search-field svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 1.6; }
.search-field input { width: 100%; padding-left: 40px; border-color: var(--border); border-radius: var(--radius-control); font-size: 13px; }
.compact-filter { display: grid; gap: 4px; }
.compact-filter span { color: var(--muted-strong); font-size: 13px; font-weight: 500; }
.date-range-filter { min-width: 290px; display: grid; grid-template-columns: repeat(2,minmax(135px,1fr)); gap: 6px 8px; margin: 0; padding: 0; border: 0; }
.date-range-filter legend { grid-column: 1/-1; padding: 0; color: var(--muted-strong); font-size: 13px; font-weight: 500; }
.date-range-filter label { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 6px; }
.date-range-filter label span { color: var(--muted); font-size: 13px; font-weight: 500; }
input:not(:where([type="checkbox"], [type="radio"], [type="hidden"])), select, textarea { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-control); background: #fff; color: var(--text); }
textarea { resize: vertical; min-height: 92px; }
input:hover, select:hover, textarea:hover { border-color: #8c90b6; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-muted); color: var(--muted-strong); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; flex: 0 0 20px; margin: 0; accent-color: var(--primary); }
input::placeholder, textarea::placeholder { color: #6d7188; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--primary); }
input[readonly], textarea[readonly] { background: var(--surface-muted); color: var(--muted-strong); }
.password-control { position: relative; width: 100%; }
.password-control input { padding-right: 48px; }
.password-toggle { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: var(--primary-light); color: var(--primary-dark); }
.password-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.table-wrap { max-height: min(68vh, 720px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-control); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { position: sticky; top: 0; z-index: 2; padding: 11px 10px; border-bottom: 1px solid var(--line-strong); background: #eff0f8; color: var(--muted-strong); font-size: 12px; text-align: left; white-space: nowrap; }
td { padding: 9px 10px; border-bottom: 1px solid #e7e8f1; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { background: #fff; transition: background-color .16s; }
tbody tr:hover { background: #fbfbfe; }
.panel :is(.client-table, .management-table) :is(th, td) { padding: 12px; }
.panel :is(.client-table, .management-table) th { color: var(--muted); font-size: 13px; font-weight: 500; }
.panel :is(.client-table, .management-table) tr:focus-within { background: var(--primary-light); }
.client-table { min-width: 1380px; font-size: 13px; }
.client-table th:nth-child(1) { width: 90px; }.client-table th:nth-child(2) { width: 180px; }.client-table th:nth-child(3) { width: 145px; }.client-table th:nth-child(4) { width: 150px; }.client-table th:nth-child(6), .client-table th:nth-child(9) { width: 200px; }.client-table th:last-child { width: 112px; }
.client-table th:last-child, .client-table td:last-child { position: sticky; right: 0; background: inherit; box-shadow: -10px 0 16px -14px rgba(30,31,84,.75); }
.client-table th:last-child { z-index: 4; background: #eff0f8; }
.client-table td:last-child { z-index: 1; }
.table-open-button { min-height: 44px; padding: 7px 10px; white-space: nowrap; }
.table-open-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.row--success td { background: var(--success-soft); }
.row--blocked td { background: var(--danger-soft); }
.row--success td:first-child { border-left: 4px solid var(--success); }
.row--blocked td:first-child { border-left: 4px solid var(--danger); }
.row--focused { animation: row-focus 2.4s ease-out; }
@keyframes row-focus { 0%,35% { box-shadow: inset 0 0 0 3px var(--primary); } 100% { box-shadow: none; } }
.client-name { color: var(--text); font-size: 17px; font-weight: 600; }
.clamp-text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.35; }
.date-value, .call-date { font-variant-numeric: tabular-nums; white-space: nowrap; }
.call-date--danger { color: var(--danger); font-weight: 600; }
.call-date--warning { color: var(--warning); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 6px; max-width: 160px; min-height: 26px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; background: #eef0f6; color: var(--muted-strong); font-size: 13px; font-weight: 500; line-height: 1.2; }
.badge > span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.badge__icon { width: 14px; height: 14px; flex: 0 0 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.badge--success { border-color: #b9ddce; background: var(--success-soft); color: var(--success); }
.badge--danger { border-color: #ecc4bf; background: var(--danger-soft); color: var(--danger); }
.badge--neutral { color: var(--muted-strong); }
.micro-badge { display: inline-block; margin-top: 4px; padding: 3px 6px; border-radius: 999px; background: #eef0f6; color: var(--muted-strong); font-size: 11px; font-weight: 700; }
.micro-badge--danger { background: var(--danger-soft); color: var(--danger); }.micro-badge--warning { background: var(--warning-soft); color: var(--warning); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; color: var(--muted); }.pagination > div { display: flex; gap: 8px; }
.empty-state { padding: 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius-card); font-size: 13px; background: var(--surface-muted); text-align: center; }.empty-state h3 { margin: 0; font-size: 15px; font-weight: 600; color: var(--primary-dark); }.empty-state p { margin: 7px 0 0; color: var(--muted); }.empty-state--compact { padding: 16px; }

.app-dialog { width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; overflow: auto; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-panel); color: var(--text); }
.app-dialog--wide { width: min(1120px, calc(100vw - 32px)); }
.app-dialog::backdrop { background: rgba(11,11,49,.38); }
.dialog-form, .client-detail { padding: 20px; }
.detail-dialog-shell { padding: 20px; }
.detail-dialog-shell__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.detail-dialog-shell__bar h2 { margin: 0; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
.detail-dialog-shell [data-detail-content] > .client-detail { padding: 20px 0 0; }
.detail-load-error { margin-top: 20px; }.detail-load-error h3 { margin: 0; }.detail-load-error p { margin-top: 6px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.client-detail__head { position: sticky; top: 0; z-index: 7; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.98); box-shadow: var(--shadow-card); }
.dialog-head h1, .dialog-head h2 { margin: 0; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.2px; }.dialog-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.dialog-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 20px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--border); background: rgba(255,255,255,.97); }
.dialog-loading { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--primary-light); border-top-color: var(--primary); border-radius: 50%; animation: spin .75s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-top: 18px; }.field { display: grid; align-content: start; gap: 6px; }.field--wide, .create-user-form .field--full_name { grid-column: 1 / -1; }.field label, .field-label { color: var(--muted-strong); font-size: 13px; font-weight: 500; }.readonly-value { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-muted); color: var(--text); }.field-error { margin: 0; color: var(--danger); font-size: 13px; line-height: 1.35; }.field-hint { margin: 0; color: var(--muted); font-size: 13px; }.field [aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }.stack-form { display: grid; gap: 16px; }.form-actions { display: flex; justify-content: flex-end; gap: 8px; }.form-errors { margin-bottom: 16px; padding: 11px 12px; border-left: 4px solid var(--danger); border-radius: var(--radius-control); background: var(--danger-soft); color: var(--danger); }.form-errors p { margin: 0; }
.admin-date-change { margin-top: 18px; padding: 16px; border: 1px solid #d9b35b; border-left: 5px solid #9a6a16; border-radius: 8px; background: var(--warning-soft); }
.admin-date-change__head { position: relative; display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; align-items: start; padding-right: 34px; cursor: pointer; list-style: none; }
.admin-date-change__head::-webkit-details-marker { display: none; }
.admin-date-change__head::after { content: "⌄"; position: absolute; top: 7px; right: 4px; color: var(--warning); font-size: 24px; font-weight: 700; line-height: 1; transition: transform .16s; }
.admin-date-change[open] .admin-date-change__head::after { transform: rotate(180deg); }
.admin-date-change__head > svg { width: 38px; height: 38px; padding: 8px; border-radius: var(--radius-control); background: #fff; color: var(--warning); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.admin-date-change__head h3 { margin: 0; color: var(--primary-dark); font-size: 17px; }
.admin-date-change__head p:not(.eyebrow) { margin: 5px 0 0; color: var(--warning); font-size: 13px; line-height: 1.45; }
.admin-date-change__fields { display: grid; grid-template-columns: minmax(220px,.75fr) minmax(0,1.25fr); gap: 14px; margin-top: 14px; }
.admin-date-change .field--wide { grid-column: auto; }
.notice { padding: 11px 14px; border-left: 4px solid var(--info); border-radius: var(--radius-control); background: var(--info-soft); color: var(--info); line-height: 1.45; }.notice p { margin: 3px 0 0; }.notice ul { margin: 8px 0; }.notice--success { border-color: var(--success); background: var(--success-soft); color: var(--success); }.notice--warning { border-color: #9a6a16; background: var(--warning-soft); color: var(--warning); }.notice--danger, .notice--error { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.autosave-duplicate { margin: 16px 0; }.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.detail-save-status { display: flex; justify-content: flex-end; margin: -4px 0 10px; }
.detail-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; padding: 4px; border-radius: var(--radius-card); background: var(--primary-light); }.detail-tabs button { min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: var(--radius-control); background: transparent; color: var(--muted-strong); cursor: pointer; font-weight: 500; }.detail-tabs button[aria-selected="true"] { border-color: transparent; background: #fff; color: var(--primary-dark); box-shadow: 0 1px 4px rgba(30,31,84,.08); }
.detail-tabs button:hover { background: #fff; color: var(--primary-dark); }.detail-tabs span { margin-left: 4px; padding: 2px 6px; border-radius: 999px; background: var(--primary-light); font-size: 11px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.inline-call-form { display: grid; grid-template-columns: minmax(150px,.75fr) minmax(170px,1fr) minmax(120px,.65fr) auto; align-items: end; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-muted); }.inline-call-form .field { max-width: 320px; }.inline-call-form .form-errors, .complete-call-form .form-errors { grid-column: 1 / -1; margin-bottom: 0; }
.call-timeline { position: relative; display: grid; gap: 12px; margin-top: 18px; }.call-timeline::before { content: ""; position: absolute; left: 11px; top: 15px; bottom: 15px; width: 2px; background: var(--border); }.call-card { position: relative; display: grid; grid-template-columns: 24px minmax(0,1fr); gap: 12px; }.call-card__marker { z-index: 1; width: 24px; height: 24px; border: 5px solid #eef0f6; border-radius: 50%; background: #6d708f; }.call-card--completed .call-card__marker { border-color: var(--success-soft); background: var(--success); }.call-card--cancelled .call-card__marker { border-color: var(--danger-soft); background: var(--danger); }.call-card__body { padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }.call-card__body header { display: flex; justify-content: space-between; gap: 14px; }.call-card__body header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }.call-card__body small { color: var(--muted); }.call-card__body > p { margin: 12px 0 0; line-height: 1.5; }
.complete-call-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,380px); align-items: end; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }.complete-call-form .form-errors { grid-column: 1 / -1; }.event-completion-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; justify-self: end; width: min(100%,380px); }.event-completion-actions__next { grid-column: 1 / -1; width: 100%; }
.next-event-dialog { width: min(620px,calc(100vw - 32px)); }
.call-edit-block { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }.call-edit-block > summary { width: max-content; min-height: 44px; display: flex; align-items: center; color: var(--primary); cursor: pointer; font-weight: 500; }.call-edit-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 12px; margin-top: 12px; padding: 14px; border-radius: var(--radius-control); background: var(--surface-muted); }.call-edit-form .form-errors, .call-edit-form__result { grid-column: 1 / -1; }.call-edit-form > .button { justify-self: end; grid-column: 1 / -1; }

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.inline-add-form { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: end; gap: 10px; padding: 14px; border-radius: var(--radius-control); background: var(--surface-muted); }
.checkbox-field { min-height: 44px; align-content: center; padding: 0 8px; }
.checkbox-field label { display: inline-flex; align-items: center; gap: 8px; color: var(--text); white-space: nowrap; cursor: pointer; }
.directory-reorder-hint { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.directory-reorder-hint svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; }
.settings-list { display: grid; gap: 8px; margin-top: 10px; }
.settings-row { position: relative; min-height: 66px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text); transition: border-color .16s, background-color .16s, box-shadow .16s, opacity .16s, transform .16s; }
.settings-row:hover { border-color: #8c90b6; background: #fbfbfe; box-shadow: var(--shadow-card); }
.settings-row__link { min-width: 0; align-self: stretch; display: flex; align-items: center; color: var(--text); text-decoration: none; border-radius: 5px; }
.settings-row__link:hover strong { color: var(--primary); }
.settings-row__copy { min-width: 0; display: grid; gap: 3px; }
.settings-row__copy strong { overflow: hidden; text-overflow: ellipsis; }
.settings-row small { color: var(--muted); }
.directory-drag-handle { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid transparent; border-radius: var(--radius-control); color: #777c98; cursor: grab; user-select: none; touch-action: pan-y; transition: color .16s, border-color .16s, background-color .16s, box-shadow .16s; }
.directory-drag-handle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
.directory-drag-handle:hover, .directory-drag-handle:focus-visible { border-color: #b7bad5; background: var(--primary-light); color: var(--primary-dark); }
.directory-drag-handle:active { cursor: grabbing; }
.directory-move-controls { display: inline-flex; gap: 8px; padding: 3px; border: 1px solid #d5d7e6; border-radius: 9px; background: #f1f2f8; }
.directory-move-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--primary); cursor: pointer; transition: color .16s, background-color .16s, box-shadow .16s, transform .12s; }
.directory-move-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.directory-move-button:hover:not(:disabled) { background: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(39,40,91,.22); transform: translateY(-1px); }
.directory-move-button:active:not(:disabled) { transform: translateY(0); }
.directory-move-button:disabled { color: #aeb1c3; cursor: not-allowed; opacity: .52; }
.settings-row.is-dragging { z-index: 2; border-style: dashed; opacity: .4; box-shadow: var(--shadow-card); transform: scale(.985); cursor: grabbing; }
.settings-row.drop-before::before, .settings-row.drop-after::after { content: ""; position: absolute; z-index: 3; right: 8px; left: 8px; height: 3px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); pointer-events: none; }
.settings-row.drop-before::before { top: -6px; }
.settings-row.drop-after::after { bottom: -6px; }
.settings-list[aria-busy="true"] .settings-row { cursor: progress; }
.management-table { min-width: 760px; }.row-actions { display: grid; grid-template-columns: 100px 108px minmax(300px,1fr); align-items: start; gap: 8px; }.row-actions > form:not(.reset-form) .button { width: 100%; }.reset-form { min-width: 0; display: grid; grid-template-columns: minmax(190px,1fr) 98px; gap: 6px; }.reset-form input, .reset-form .password-control { min-width: 0; width: 100%; }.reset-form .password-control input { width: 100%; }.reset-form .field-error { grid-column: 1 / -1; margin-top: 2px; }
.audit-list { display: grid; }.audit-item { min-width: 0; overflow-wrap: anywhere; display: grid; grid-template-columns: 92px minmax(0,1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }.audit-item:last-child { border-bottom: 0; }.audit-item__time { display: grid; align-content: start; color: var(--muted); font-size: 12px; }.audit-item__time strong { color: var(--primary-dark); font-size: 18px; }.audit-item h3 { margin: 0; font-size: 15px; }.audit-item p { margin: 4px 0 8px; color: var(--muted); }.audit-item summary { min-height: 44px; align-content: center; color: var(--primary); cursor: pointer; font-weight: 500; }.audit-diff { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 10px; }.audit-diff > div { min-width: 0; padding: 10px; border-radius: var(--radius-control); background: var(--surface-muted); }.audit-diff pre { overflow: auto; margin: 6px 0 0; font: 12px/1.4 Consolas,"Courier New",monospace; white-space: pre-wrap; }
.backup-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; padding: 18px 20px; border: 1px solid #b9ddce; border-radius: 8px; background: var(--success-soft); color: var(--success); }.backup-hero > div { display: flex; align-items: center; gap: 12px; }.backup-hero .status-dot { width: 12px; height: 12px; }.backup-hero small, .backup-hero strong { display: block; }.backup-hero p { margin: 0; }.backup-hero--danger { border-color: #ecc4bf; background: var(--danger-soft); color: var(--danger); }

.toast-region { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }.toast { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border-left: 4px solid var(--info); border-radius: var(--radius-control); background: #fff; box-shadow: var(--shadow-panel); }.toast--success { border-color: var(--success); }.toast--danger { border-color: var(--danger); }.toast button { width: 44px; min-height: 44px; flex: 0 0 44px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; }
.auth-layout { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: var(--brand-deep); }
.auth-card { width: min(420px,100%); padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-card); background: #fff; box-shadow: 0 18px 42px rgba(23,24,47,.12); }
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; color: var(--text); }
.auth-brand img { width: 58px; height: 58px; flex: 0 0 58px; object-fit: contain; }
.auth-brand div { min-width: 0; display: grid; }
.auth-brand strong { font-size: 17px; font-weight: 600; }
.auth-brand span { color: var(--muted); font-size: 13px; }
.auth-copy h1 { margin: 0; color: var(--text); font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.auth-copy > p:last-child { margin: 4px 0 20px; color: var(--muted); font-size: 13px; }

.standalone-detail { max-width: 1080px; }.standalone-detail .client-detail { padding: 0; }

@media (max-width: 1240px) {
  .complete-call-form { grid-template-columns: 1fr; }.event-completion-actions { justify-self: stretch; width: 100%; }
  .inline-add-form { grid-template-columns: 1fr auto; }.inline-add-form .button { grid-column: 1/-1; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .row-actions { grid-template-columns: 100px 108px; }
  .reset-form { grid-column: 1 / -1; }
}
@media (max-width: 1023px) {
  .app-shell { padding-left: 0; }
  .sidebar { width: 280px; visibility: hidden; transform: translateX(-100%); transition: transform 400ms cubic-bezier(.22,1,.36,1), visibility 0s 400ms; }
  .nav-open .sidebar { visibility: visible; transform: none; transition-delay: 0s; }
  body.nav-open { overflow: hidden; }
  .workspace-status { min-height: 64px; gap: 16px; padding: 12px 16px 4px; }
  .mobile-account { display: flex; margin-left: auto; }
  .main-content { padding: 16px; }
}
@media (max-width: 980px) { .settings-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .client-table :is(.nowrap, .date-value, .call-date) { white-space: normal; overflow-wrap: anywhere; }
  .client-table td[colspan], .management-table td[colspan] { grid-template-columns: minmax(0,1fr); }.client-table td[colspan]::before, .management-table td[colspan]::before { display: none; }
  .account-grid { grid-template-columns: 1fr; }.client-table, .management-table { min-width: 0; }.client-table thead, .management-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }.client-table tbody, .management-table tbody { display: grid; gap: 12px; padding: 12px; background: var(--bg); }.client-table tr, .management-table tr { display: grid; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow-card); }.client-table td, .management-table td { display: grid; grid-template-columns: 115px minmax(0,1fr); gap: 10px; align-items: start; min-height: 42px; border-bottom: 1px solid var(--border); background: inherit; }.client-table td::before, .management-table td::before { content: attr(data-label); min-width: 0; overflow-wrap: anywhere; color: var(--muted); font-size: 13px; font-weight: 500; }.client-table td:last-child, .management-table td:last-child { position: static; border-bottom: 0; box-shadow: none; }.client-table .table-open-button { width: 100%; justify-self: stretch; }.table-wrap { max-height: none; overflow: visible; border: 0; }.row--success td:first-child, .row--blocked td:first-child { border-left: 0; }.row--success { border-left: 4px solid var(--success)!important; }.row--blocked { border-left: 4px solid var(--danger)!important; }
}
@media (max-width: 700px) {
  .page-head { flex-direction: column; align-items: stretch; }.page-head__actions { width: 100%; align-items: stretch; flex-direction: column; }.current-employee { min-width: 0; text-align: left; }.page-head__actions .button { width: 100%; }.filter-toolbar { align-items: stretch; }.search-field, .compact-filter, .date-range-filter, .filter-toolbar > .button { width: 100%; }.form-grid { grid-template-columns: 1fr; }.field--wide, .create-user-form .field--full_name { grid-column: auto; }.admin-date-change__fields { grid-template-columns: 1fr; }.settings-grid { display: block; }.settings-grid .panel + .panel { margin-top: 16px; }.inline-add-form { grid-template-columns: 1fr; }.inline-add-form .button { grid-column: auto; width: 100%; }.checkbox-field { padding: 0; }.event-completion-actions { grid-template-columns: 1fr; }.event-completion-actions__next { grid-column: auto; }.call-edit-form { grid-template-columns: 1fr; }.call-edit-form__result { grid-column: auto; }.call-card__body header { flex-direction: column; }.inline-call-form { grid-template-columns: 1fr; align-items: stretch; }.inline-call-form .field { max-width: none; }.inline-call-form .button { width: 100%; }.audit-diff { grid-template-columns: 1fr; }.backup-hero { align-items: flex-start; flex-direction: column; }.row-actions, .reset-form { display: flex; align-items: stretch; flex-direction: column; }.reset-form input, .reset-form .password-control { width: 100%; }

}
@media (max-width: 599px) {
  .page-head { gap: 12px; margin-bottom: 16px; }
  .page-head h1, .auth-copy h1 { font-size: 26px; }
  .panel { padding: 16px; }
  .app-dialog { border-radius: 12px; max-height: calc(100dvh - 32px); }
  .auth-card { padding: 24px; }
}
@media (max-width: 560px) {
  .date-range-filter { min-width: 0; grid-template-columns: 1fr; }
  .environment-badge { display: none; }.mobile-account__link { max-width: 105px; }.dialog-form, .client-detail, .detail-dialog-shell { padding: 16px; }.detail-dialog-shell [data-detail-content] > .client-detail { padding-top: 16px; }.dialog-actions { margin: 18px -16px -16px; padding: 12px 16px; }.dialog-actions .button { flex: 1; }.client-table td, .management-table td { grid-template-columns: 86px minmax(0,1fr); }.pagination { align-items: stretch; flex-direction: column; }.pagination > div .button { flex: 1; }.detail-actions { display: grid; }.detail-actions form, .detail-actions .button { width: 100%; }.audit-item { grid-template-columns: 70px minmax(0,1fr); }.settings-row { grid-template-columns: 44px minmax(0,1fr) auto; gap: 8px; padding: 9px 8px; }.directory-drag-handle { grid-row: 1 / span 2; align-self: center; }.settings-row > .badge { grid-column: 2; justify-self: start; }.directory-move-controls { grid-column: 3; grid-row: 1 / span 2; }.directory-move-button { width: 44px; height: 44px; }
}
@media (pointer: coarse) {
  button, .button, input:not(:where([type="checkbox"], [type="radio"], [type="hidden"])), select, .mobile-account__link { min-width: 44px; min-height: 44px; }
  .password-toggle { top: 0; right: 0; width: 44px; height: 44px; }
  .checkbox-field, .checkbox-field label, .calendar-completed-toggle { min-height: 44px; }
  .directory-move-button { width: 44px; height: 44px; }

}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto!important; animation-duration: .01ms!important; animation-iteration-count: 1!important; transition-duration: .01ms!important; }.sidebar, .sidebar * { transition: none!important; }.button-press-glinting { background-image: none!important; animation: none!important; } }
@media (forced-colors: active) { :focus-visible { outline: 2px solid Highlight; outline-offset: 2px; box-shadow: none; }.brand__logo { forced-color-adjust: none; border-radius: var(--radius-control); background: var(--brand-deep); }.badge, .micro-badge, .button, input, select, textarea, .panel, .settings-row, .directory-drag-handle, .directory-move-controls, .user-card, .mobile-account__link { border: 1px solid CanvasText; }.directory-move-button:disabled { color: GrayText; }.status-dot, .badge > span, .legend__dot { forced-color-adjust: none; }.row--success, .row--blocked { outline: 2px solid CanvasText; } }

@media print {
  .sidebar, .sidebar-backdrop, .workspace-status, .skip-link, .toast-region { display: none!important; }
  .app-shell { padding-left: 0; }
  .main-content { padding: 0; }
}
