/* CRM UI-kit v1. Loaded after legacy screen styles. */
html[data-crm-theme] :where(button,input,select,textarea,summary) { font-family:var(--si-font-sans); }

html[data-crm-theme] :where(.primary,.secondary,.ghost,.danger-button,.board-add,.request-new,.client-modal-actions button,.dialog-actions button) {
  display:inline-flex;min-height:var(--h-ctl);height:var(--h-ctl);align-items:center;justify-content:center;gap:6px;
  padding:0 14px;border:1px solid var(--si-line);border-radius:var(--r-md);font-size:var(--fs-body);font-weight:500;line-height:1;cursor:pointer;
  transition:color var(--motion-fast) ease,background-color var(--motion-fast) ease,border-color var(--motion-fast) ease,box-shadow var(--motion-fast) ease;
}
html[data-crm-theme] :where(.primary,.board-add,.request-new,.dialog-actions button[type="submit"],.client-next-popover footer button[type="submit"]) {
  border-color:var(--primary-bg)!important;background:var(--primary-bg)!important;color:var(--primary-ink)!important;
}
html[data-crm-theme] :where(.secondary,.ghost) { background:var(--si-surface);color:var(--si-ink); }
html[data-crm-theme] .ghost { border-color:transparent; }
html[data-crm-theme] .secondary { border-color:var(--si-line);background:var(--si-surface-2); }
html[data-crm-theme] .danger-button { border-color:transparent;background:var(--si-danger-soft);color:var(--si-danger); }
html[data-crm-theme] :where(.close,.drawer-head>button,.request-drawer-head button) { min-width:36px;width:36px;padding:0;border-radius:var(--r-md); }
html[data-crm-theme] :where(button,input,select,textarea,summary):focus-visible { outline:2px solid var(--si-accent);outline-offset:2px; }
html[data-crm-theme] .crm-modal-close {
  display:grid!important;flex:0 0 32px;width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important;place-items:center!important;
  padding:0!important;border:0!important;border-radius:var(--r-md)!important;background:transparent!important;box-shadow:none!important;color:var(--si-ink-muted)!important;
  font-family:var(--si-font-sans)!important;font-size:16px!important;font-weight:400!important;line-height:1!important;cursor:pointer;
  transition:color var(--motion-fast) ease,background-color var(--motion-fast) ease;
}
html[data-crm-theme] .crm-modal-close:hover { background:var(--si-surface-2)!important;color:var(--si-ink)!important; }
html[data-crm-theme] .crm-modal-close:focus { outline:0!important; }
html[data-crm-theme] .crm-modal-close:focus-visible { outline:1px solid var(--si-ink)!important;outline-offset:2px!important;background:transparent!important;color:var(--si-ink)!important; }

html[data-crm-theme] :where(input:not([type="checkbox"]):not([type="radio"]),select,.crm-select-trigger) {
  min-height:var(--h-ctl);height:var(--h-ctl);padding:0 12px;border:1px solid var(--si-line);border-radius:var(--r-md);background:var(--si-surface);color:var(--si-ink);font-size:var(--fs-body);
}
html[data-crm-theme] textarea { padding:10px 12px;border:1px solid var(--si-line);border-radius:var(--r-md);background:var(--si-surface);color:var(--si-ink);font-size:var(--fs-body); }
html[data-crm-theme] :where(.clients-search,.request-search) { height:var(--h-ctl)!important;border-radius:var(--r-md)!important; }
html[data-crm-theme] :where(.clients-search,.request-search) svg { width:16px!important;height:16px!important; }

html[data-crm-theme] :where(.ui-segment,.client-scope-segment,.request-scope,.request-class-segment,.overview-period,.crm-segmented) {
  position:relative;display:grid!important;width:max-content;height:var(--h-ctl);min-height:var(--h-ctl);grid-template-columns:repeat(var(--ui-segment-count,2),var(--ui-segment-cell,max-content));gap:0!important;padding:3px!important;border:0!important;border-radius:var(--r-md)!important;background:var(--si-surface-2)!important;isolation:isolate;overflow:hidden;
}
html[data-crm-theme] :where(.ui-segment,.client-scope-segment,.request-scope,.request-class-segment,.overview-period,.crm-segmented) > :where(button,label) {
  position:relative;z-index:2;display:flex!important;width:100%;min-width:0;height:30px!important;min-height:30px!important;align-items:center;justify-content:center;gap:5px;margin:0!important;padding:0 10px!important;border:0!important;border-radius:var(--r-sm)!important;background:transparent!important;box-shadow:none!important;color:var(--si-ink-muted)!important;font-size:var(--fs-meta)!important;font-weight:500!important;white-space:nowrap;cursor:pointer;
}
html[data-crm-theme] :where(.ui-segment,.client-scope-segment,.request-scope,.request-class-segment,.overview-period,.crm-segmented) > :where(button.active,label:has(input:checked)) { color:var(--si-ink)!important; }
html[data-crm-theme] .requests-scope :where(.request-scope,.request-class-segment)>button.active,
html[data-crm-theme] .board-topbar :where(.client-scope-segment,.client-stage-segment)>button.active,
html[data-crm-theme] .overview-toolbar .overview-period>button.active { background:transparent!important;box-shadow:none!important;font-weight:500!important; }
html[data-crm-theme] .ui-segment-slider { position:absolute;z-index:1;top:3px;bottom:3px;left:0;width:var(--ui-segment-width,0);border-radius:var(--r-sm);background:var(--si-tab-slider);box-shadow:0 1px 2px rgba(0,0,0,.08);transform:translateX(var(--ui-segment-left,0));transition:transform var(--motion-slide) cubic-bezier(.2,.7,.2,1),width var(--motion-slide) cubic-bezier(.2,.7,.2,1);pointer-events:none; }
html[data-crm-theme] .crm-segmented::before { content:none!important; }
html[data-crm-theme] .request-form-dialog .crm-segmented { --ui-segment-fixed-cell:150px; }
html[data-crm-theme] .crm-segmented input { position:absolute;opacity:0;pointer-events:none; }
html[data-crm-theme] .crm-segmented span { display:grid;place-items:center;height:30px!important;font-size:var(--fs-body);font-weight:500; }

html[data-crm-theme] :where(.crm-v3-card,.request-board-card,.overview-tile,.detail-block,.contact-card) { border-radius:var(--r-lg); }
html[data-crm-theme] :where(.detail-block,.client-v5-section,.request-panel) { border-radius:var(--r-lg);padding:16px; }
html[data-crm-theme] :where(.client-filter-panel,.request-filters>div,.client-next-popover,.client-more-menu>div) { border-radius:var(--r-lg);box-shadow:var(--si-shadow-pop); }
html[data-crm-theme] :where(.request-kind-badge,.request-status-badge,.client-header-chip) { min-height:22px;border-radius:var(--r-xs);font-size:var(--fs-meta);font-weight:500; }
html[data-crm-theme] :where(.toolbar-check,.overview-scope,.request-overdue-count) { min-height:var(--h-chip);border-radius:var(--r-pill);font-size:var(--fs-meta);font-weight:500; }
html[data-crm-theme] .crm-status-bar { min-height:var(--h-bar);height:var(--h-bar);font-size:var(--fs-micro); }
html[data-crm-theme] body .client-v5-main { margin:0!important;padding:0!important; }
html[data-crm-theme] :where(.client-modal,.request-drawer,.request-form-dialog,dialog) { border-radius:var(--r-xl); }
html[data-crm-theme] .request-drawer { transform:translate(-50%,8px) scale(.98);transform-origin:center;transition:transform .2s cubic-bezier(.2,.7,.2,1),opacity .2s ease; }
html[data-crm-theme] .request-drawer.open { transform:translate(-50%,0) scale(1); }
html[data-crm-theme] :where(.request-form-dialog input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),.request-form-dialog .crm-select-trigger) { min-height:var(--h-ctl)!important;height:var(--h-ctl)!important;border-radius:var(--r-md);font-size:var(--fs-body); }
html[data-crm-theme] .request-form-dialog .dialog-actions button { min-height:var(--h-ctl);height:var(--h-ctl);border-radius:var(--r-md);font-size:var(--fs-body);font-weight:500; }
html[data-crm-theme] body>.app-header>:is(.board-topbar,.request-toolbar,.overview-toolbar)[hidden] { display:none!important; }

html[data-crm-theme] body :is(.workspace.board .column,.request-column) { border-radius:var(--r-lg);padding:10px; }
html[data-crm-theme] body :is(.workspace.board .column>h3,.request-column>header) { display:flex;min-height:32px;height:32px;align-items:center;margin:0;padding:0 14px; }
html[data-crm-theme] body :is(.workspace.board .column>h3,.request-column h2) { gap:8px;color:var(--si-ink-2);font-size:13px;font-weight:650;line-height:18px; }
html[data-crm-theme] body .workspace.board .column>h3::before,
html[data-crm-theme] body .request-column h2::before { width:8px;height:8px;flex:0 0 8px; }
html[data-crm-theme] body .workspace.board .column-tools { display:flex;flex:1;align-items:center;gap:6px; }
html[data-crm-theme] body .workspace.board .focus-stage { margin-left:auto; }
html[data-crm-theme] body .workspace.board .column-tools>b,
html[data-crm-theme] body .workspace.board .column>h3>b,
html[data-crm-theme] body .request-column h2>b { display:inline-grid;min-width:18px;height:18px;place-items:center;padding:0 5px;border-radius:var(--r-pill);background:var(--si-line);color:var(--si-ink-muted);font-family:var(--si-font-sans);font-size:11px;font-variant-numeric:tabular-nums;font-weight:500;line-height:18px; }
html[data-crm-theme] :where(.request-column-scroll,.workspace.board .column>.card-list) { gap:16px; }
html[data-crm-theme] .mobile-integrations { display:none!important; }
html[data-crm-theme] body:not(.logged-out) .rail-logo-mark { width:28px!important;height:28px!important; }
html[data-crm-theme] body:not(.logged-out) .rail-brand-label { top:15px!important;width:104px!important;height:28px!important; }
html[data-crm-theme] body:not(.logged-out) .rail-logo-word { width:104px!important;height:28px!important; }
html[data-crm-theme="light"] body:not(.logged-out) :where(.rail-logo-mark-dark,.rail-logo-word-dark),
html[data-crm-theme="dark"] body:not(.logged-out) :where(.rail-logo-mark-light,.rail-logo-word-light) { display:none!important; }
html[data-crm-theme="light"] body:not(.logged-out) :where(.rail-logo-mark-light,.rail-logo-word-light),
html[data-crm-theme="dark"] body:not(.logged-out) :where(.rail-logo-mark-dark,.rail-logo-word-dark) { display:block!important; }

html[data-crm-theme] .section-tabs-clients::before { content:none; }
html[data-crm-theme] .client-stage-segment { --ui-segment-fixed-cell:80px;width:246px;max-width:246px;margin:0;overflow:hidden; }
html[data-crm-theme] :where(.client-scope-segment,.request-scope) { --ui-segment-fixed-cell:49px; }
html[data-crm-theme] .request-class-segment { --ui-segment-count:3;--ui-segment-fixed-cell:72px; }
html[data-crm-theme] .overview-period { --ui-segment-fixed-cell:66px; }
html[data-crm-theme] .client-stage-segment>button { min-width:0!important;padding-inline:8px!important; }
html[data-crm-theme] .client-stage-segment i { width:12px;font-style:normal;font-size:11px;line-height:1;text-align:center; }
html[data-crm-theme] .client-stage-segment [data-section-page="clients"] i,
html[data-crm-theme] .client-stage-segment [data-section-page="success"] i { color:var(--si-ok); }
html[data-crm-theme] .client-stage-segment [data-section-page="declined"] i { color:var(--si-accent); }

@media(min-width:901px){
  html[data-crm-theme] body:not(.logged-out)>.app-header { display:grid;grid-template-columns:minmax(0,1fr) max-content;height:56px!important;min-height:56px!important;align-items:center!important;gap:4px;padding:0 16px!important;overflow:visible; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>:where(.board-topbar,.request-toolbar,.overview-toolbar) { display:grid!important;width:100%;min-width:0;height:55px!important;min-height:55px!important;align-items:center;align-content:center;gap:6px;overflow:visible;border:0; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>:where(.board-topbar,.request-toolbar,.overview-toolbar) { grid-column:1;grid-row:1; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.session { grid-column:2;grid-row:1; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar { grid-template-columns:max-content 246px max-content minmax(220px,360px) max-content max-content max-content minmax(0,1fr) max-content; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar { grid-template-columns:max-content max-content max-content minmax(220px,360px) max-content minmax(0,1fr) max-content max-content max-content; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar { grid-template-columns:max-content max-content max-content minmax(0,1fr) max-content max-content; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>h1 { grid-column:1;min-width:max-content; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>time { grid-column:2;min-width:max-content;margin-left:6px; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>.overview-period { grid-column:3; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>.overview-toolbar-spacer { grid-column:4; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>.overview-live { grid-column:5; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.overview-toolbar>.overview-scope { grid-column:6; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>:where(.board-topbar,.request-toolbar,.overview-toolbar)>* { grid-row:1; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.board-title { grid-column:1; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.client-stage-segment { grid-column:2; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.client-scope-segment { grid-column:3; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.clients-search { grid-column:4; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.client-filters { grid-column:5; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>#noNextFilter { grid-column:6; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>#newReplyLabel { grid-column:7; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.board-topbar-spacer { grid-column:8; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>#newLead { grid-column:9; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>h1 { grid-column:1; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-class-segment { grid-column:2; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-scope { grid-column:3; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-search { grid-column:4; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-filters { grid-column:5; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-toolbar-spacer { grid-column:6; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-overdue-count { grid-column:7; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.call-request-toolbar-slot { grid-column:8; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.request-toolbar>.request-new { grid-column:9; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.session { display:flex;flex:0 0 auto;align-items:center;gap:6px;margin:0!important; }
  html[data-crm-theme] body:not(.logged-out)>.app-header h1 { flex:0 0 auto;margin:0;font-size:var(--fs-section-title);font-weight:650; }
  html[data-crm-theme] body:not(.logged-out)>.app-header :where(.clients-search,.request-search) { width:100%;min-width:220px!important;max-width:360px; }
  html[data-crm-theme] body:not(.logged-out)>.app-header :where(.clients-search,.request-search) input { border-radius:var(--r-md)!important; }
  html[data-crm-theme] body:not(.logged-out)>.app-header :where(.client-filters summary,.request-filters summary,#newLead,.request-new,.session>button,.session>select) { height:var(--h-ctl);min-height:var(--h-ctl);border-radius:var(--r-md)!important; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #sessionLabel { display:inline-block;max-width:118px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #adminViewAs { max-width:104px; }
  html[data-crm-theme] body:not(.logged-out)>main { padding-top:66px!important; }
  html[data-crm-theme] body.requests-page-active .workspace.page-requests { height:calc(100vh - 80px); }
}
@media(min-width:901px) and (max-width:1440px){
  html[data-crm-theme] body:not(.logged-out)>.app-header .board-counter,
  html[data-crm-theme] body:not(.logged-out)>.app-header>.board-topbar>.toolbar-check,
  html[data-crm-theme] body:not(.logged-out)>.app-header .request-overdue-count { display:none; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #sessionLabel { width:36px;max-width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--si-surface-2);font-size:0; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #sessionLabel::before { content:attr(data-compact);font-size:13px; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #adminViewAs { width:68px;max-width:68px;padding-inline:8px; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #logout { min-width:68px;padding-inline:10px; }
}

@media(prefers-reduced-motion:reduce){
  html[data-crm-theme] .ui-segment-slider { transition:none; }
}
@media(max-width:768px){html[data-crm-theme] .mobile-integrations{display:inline-flex!important}}
@media(max-width:700px){html[data-crm-theme] .request-drawer,html[data-crm-theme] .request-drawer.open{border-radius:0;transform:none}}

/* Monolithic screen header. */
@media(min-width:901px) {
  html[data-crm-theme] body:not(.logged-out)>.app-header { grid-template-columns:minmax(0,1fr) 78px!important; }
  html[data-crm-theme] body:not(.logged-out)>.app-header>.session { display:grid!important;width:78px!important;grid-template-columns:36px 36px!important;gap:6px;justify-content:end; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #themeToggle { width:36px!important;min-width:36px!important;padding:0!important; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #sessionLabel { width:36px!important;max-width:36px!important;height:36px;border-radius:50%;display:grid!important;place-items:center;background:var(--si-surface-2);font-size:0;overflow:hidden; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .session #sessionLabel::before { content:attr(data-compact);font-size:13px; }
  html[data-crm-theme] body:not(.logged-out)>.app-header .board-counter,
  html[data-crm-theme] body:not(.logged-out)>.app-header>#newReplyLabel,
  html[data-crm-theme] body:not(.logged-out)>.app-header .request-overdue-count { display:none!important; }
}
.session-profile{position:relative;width:36px;height:36px}.session-profile>summary{list-style:none;cursor:pointer}.session-profile>summary::-webkit-details-marker{display:none}.session-profile-menu{position:absolute;z-index:80;top:42px;right:0;display:grid;width:210px;gap:8px;padding:10px;border:1px solid var(--si-line);border-radius:10px;background:var(--si-surface);box-shadow:0 14px 30px -16px rgba(0,0,0,.42)}.session-profile-menu strong{padding:2px 4px;color:var(--si-ink-2);font-size:11.5px;font-weight:600}.session-profile-menu #adminViewAs{display:block;width:100%!important;max-width:none!important}.session-profile-menu #adminViewAs[hidden]{display:none!important}.session-profile-menu #logout{display:block!important;width:100%;height:34px;min-height:34px;text-align:left}
.settings-logout { display:flex;justify-content:flex-end;margin-top:24px;padding-top:16px;border-top:1px solid var(--si-line); }
@media(min-width:901px) {
  html[data-crm-theme] body.clients-page-active:not(.logged-out)>.app-header,
  html[data-crm-theme] body.requests-page-active:not(.logged-out)>.app-header,
  html[data-crm-theme] body.overview-page-active:not(.logged-out)>.app-header { height:56px!important;min-height:56px!important;align-items:center!important;padding-block:0!important; }
  html[data-crm-theme] body.clients-page-active:not(.logged-out)>.app-header>.session,
  html[data-crm-theme] body.requests-page-active:not(.logged-out)>.app-header>.session,
  html[data-crm-theme] body.overview-page-active:not(.logged-out)>.app-header>.session { display:grid!important;order:initial!important;margin:0!important; }
  html[data-crm-theme] body.clients-page-active:not(.logged-out)>.app-header .session #sessionLabel,
  html[data-crm-theme] body.requests-page-active:not(.logged-out)>.app-header .session #sessionLabel,
  html[data-crm-theme] body.overview-page-active:not(.logged-out)>.app-header .session #sessionLabel { display:grid!important; }
  html[data-crm-theme] body.clients-page-active:not(.logged-out)>.app-header>.board-topbar { display:grid!important;width:100%!important;height:55px!important;min-height:55px!important;flex:none!important; }
  html[data-crm-theme] body.clients-page-active:not(.logged-out)>main { padding-top:64px!important; }
  html[data-crm-theme] body.requests-page-active:not(.logged-out)>main { padding-top:68px!important; }
}
html[data-crm-theme] :where(.client-filter-chips,.communication-channel-tabs,.history-filters)>button.active { border-color:transparent!important;background:transparent!important;color:var(--si-ink)!important;box-shadow:none!important; }
html[data-crm-theme] :where(.client-filter-chips,.communication-channel-tabs,.history-filters)>.ui-segment-slider { background:var(--si-tab-slider)!important; }
html[data-crm-theme] body:not(.logged-out)>.app-header>:is(.board-topbar,.request-toolbar,.overview-toolbar)[hidden] { display:none!important; }
html[data-crm-theme] .client-result-actions>button { height:52px!important;min-height:52px!important;padding:0!important;flex-direction:column!important; }
html[data-crm-theme] .client-result-actions>button svg { width:18px!important;height:18px!important; }
html[data-crm-theme] .client-modal :where(.client-filter-chips,.communication-channel-tabs,.history-filters)>button.active {
  border-color:transparent!important;background:transparent!important;color:var(--si-ink)!important;box-shadow:none!important;
}

/* Unified CRM form geometry. Keep this after legacy screen rules. */
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(label:not(.check):not(.toolbar-check):not(.employee-owner-switch):not(.employee-exclude),.crm-form-field) {
  display:grid;align-content:start;gap:6px;margin:0;color:var(--si-ink-muted);font-size:var(--form-label-size);font-weight:500;line-height:14px;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,.crm-select-trigger) {
  box-sizing:border-box;width:100%;min-height:var(--form-control-height)!important;height:var(--form-control-height)!important;padding:0 12px!important;border:var(--form-control-border) solid var(--si-line)!important;border-radius:var(--form-control-radius)!important;background:var(--si-surface);box-shadow:none!important;color:var(--si-ink);font-family:var(--si-font-sans);font-size:13px!important;font-weight:400;line-height:1.2;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) select {
  appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--si-ink-muted) 50%),linear-gradient(135deg,var(--si-ink-muted) 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(.primary,.secondary,.ghost,.danger-button,button[type="submit"]):not(.close):not(.icon-button):not(.crm-icon-button):not(.crm-quiet-button) {
  box-sizing:border-box;min-height:var(--form-control-height)!important;height:var(--form-control-height)!important;padding:0 12px!important;border-width:var(--form-control-border)!important;border-radius:var(--form-control-radius)!important;font-size:13px!important;line-height:1;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,.crm-select-trigger):hover {
  border-color:var(--si-line-strong)!important;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),select,.crm-select-trigger):focus-visible {
  outline:0;box-shadow:0 0 0 3px rgba(196,80,26,.15)!important;border-color:var(--si-accent)!important;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(.crm-field-hint,.crm-field-error,.field-help,label>small) {
  min-height:14px;color:var(--si-ink-muted);font-size:var(--form-hint-size)!important;font-weight:400;line-height:14px;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) .crm-field-error { color:var(--si-danger)!important; }
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) .crm-custom-select.is-warning .crm-select-trigger {
  border-color:#c98a2b!important;box-shadow:none!important;
}
html[data-crm-theme] :where(dialog form,.login-card,.stack-form) :where(.is-error,[aria-invalid="true"]) {
  border-color:var(--si-danger)!important;box-shadow:none!important;
}
html[data-crm-theme] :where(.request-form-grid,.request-price-fields,.request-drag-price-fields) > label {
  grid-template-rows:14px var(--form-control-height) minmax(14px,auto);min-height:calc(28px + var(--form-control-height) + 12px);padding-bottom:0!important;
}
html[data-crm-theme] :where(.request-form-grid,.request-price-fields,.request-drag-price-fields) > label > :where(.crm-field-hint,.crm-field-error,small) {
  position:static!important;align-self:start;
}

@media(max-width:700px){
  :root[data-crm-theme] { --form-control-height:40px; }
}

/* Administrator hard-delete controls. */
html[data-crm-theme] .hard-delete-menu-action{width:100%;justify-content:flex-start;border:0!important;background:transparent!important;color:var(--si-danger)!important;text-align:left}
html[data-crm-theme] :where(.client-more-menu,.request-more-menu,.request-more-popover) hr{width:100%;margin:5px 0;border:0;border-top:1px solid var(--si-line)}
html[data-crm-theme] .hard-delete-dialog{box-sizing:border-box;width:min(480px,calc(100vw - 32px));max-height:min(720px,calc(100dvh - 32px));padding:0;overflow:hidden;border:1px solid var(--si-line);border-radius:16px;background:var(--si-surface);color:var(--si-ink);box-shadow:0 28px 80px rgba(0,0,0,.35)}
html[data-crm-theme] .hard-delete-dialog::backdrop{background:rgba(18,18,17,.58);backdrop-filter:blur(2px)}
html[data-crm-theme] .hard-delete-dialog form{box-sizing:border-box;display:grid;max-height:min(718px,calc(100dvh - 34px));gap:14px;padding:20px;overflow:auto}
html[data-crm-theme] .hard-delete-dialog header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
html[data-crm-theme] .hard-delete-dialog :where(h2,p){margin:0}
html[data-crm-theme] .hard-delete-dialog header small{color:var(--si-danger);font-size:11.5px;font-weight:600}
html[data-crm-theme] .hard-delete-dialog ul{display:grid;max-height:260px;margin:0;padding:0;overflow:auto;border-block:1px solid var(--si-line);list-style:none}
html[data-crm-theme] .hard-delete-dialog li{display:flex;min-height:36px;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--si-line);font-size:13px}
html[data-crm-theme] .hard-delete-dialog li:last-child{border-bottom:0}
html[data-crm-theme] .hard-delete-dialog footer{display:flex;justify-content:flex-end;gap:8px}
html[data-crm-theme] .hard-delete-dialog .danger-button{background:var(--si-danger)!important;color:#fff!important}
html[data-crm-theme] .hard-delete-audit{margin-top:20px;padding-top:18px;border-top:1px solid var(--si-line)}
html[data-crm-theme] .hard-delete-audit ul{display:grid;margin:10px 0 0;padding:0;list-style:none}
html[data-crm-theme] .hard-delete-audit li{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;padding:10px 0;border-bottom:1px solid var(--si-line);font-size:12px;color:var(--si-ink-muted)}
html[data-crm-theme] .hard-delete-audit li span:first-child{overflow:hidden;color:var(--si-ink);text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){
  html[data-crm-theme] .hard-delete-dialog{width:100vw;max-width:none;max-height:calc(100dvh - env(safe-area-inset-top));margin:auto 0 0;border-radius:18px 18px 0 0}
  html[data-crm-theme] .hard-delete-dialog form{padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
  html[data-crm-theme] .hard-delete-audit li{grid-template-columns:minmax(0,1fr) auto}
  html[data-crm-theme] .hard-delete-audit time{grid-column:1/-1}
}
