/* Counterparty directory and card. Shared platform controls supply popovers. */
#view-counterparties,
#counterparty-layer.counterparties-layer {
  --cp-selected: color-mix(in srgb, var(--c-accent-soft) 42%, var(--c-surface));
  font-family: "Noto Sans", "Segoe UI", system-ui, sans-serif;
}
#view-counterparties .counterparties-workspace,
#view-counterparties.counterparties-workspace { min-width: 0; }
#view-counterparties .cp-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 20px; }
#view-counterparties .cp-title-block { display: flex; align-items: center; gap: 13px; min-width: 0; }
#view-counterparties .cp-title-icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; background: var(--cp-selected); color: var(--c-text); }
#view-counterparties .cp-title-icon .ui-icon { width: 25px; height: 25px; }
#view-counterparties .cp-title-copy { min-width: 0; }
#view-counterparties .cp-heading h1 { margin: 0; color: var(--c-text); font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.4px; }
#view-counterparties .cp-sync { margin: 5px 0 0; min-height: 16px; color: var(--c-text-3); font-size: 12px; line-height: 1.4; font-variant-numeric: tabular-nums; }
#view-counterparties .cp-add { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; border-radius: 8px; font-size: 13px; }
#view-counterparties .cp-add .ui-icon { width: 18px; height: 18px; }
#view-counterparties .cp-toolbar { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(150px, 210px) 40px; align-items: end; gap: 10px; margin: 0 0 14px; padding: 0; border: 0; background: transparent; }
#view-counterparties .cp-toolbar :is(.form-field, .cp-field) { min-width: 0; margin: 0; }
#view-counterparties .cp-toolbar :is(input:not(.ui-native-control), select:not(.ui-native-control), .ui-control-trigger) { width: 100%; min-width: 0; min-height: 40px; height: 40px; padding: 8px 11px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 12px; }
#view-counterparties .cp-toolbar .ui-control-trigger { gap: 8px; }
#view-counterparties .cp-toolbar :is(input, select, .ui-control-trigger):hover { border-color: var(--c-border-2); }
#view-counterparties .cp-search { position: relative; grid-column: 1; min-width: 0; }
#view-counterparties .cp-search:has(.cp-search-icon) input:not(.ui-native-control) { padding-left: 37px; }
#view-counterparties .cp-search-icon { position: absolute; left: 11px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--c-text-3); pointer-events: none; }
#view-counterparties .cp-search input::placeholder { color: var(--c-text-3); opacity: 1; }
#view-counterparties .cp-filter-group { grid-column: 2; }
#view-counterparties .cp-filter-toggle { grid-column: 3; display: inline-flex; align-items: center; justify-content: center; gap: 7px; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-text-2); font: inherit; font-size: 12px; cursor: pointer; }
#view-counterparties .cp-filter-toggle .ui-icon { width: 18px; height: 18px; flex: none; }
#view-counterparties .cp-filter-toggle > span { display: none; }
#view-counterparties .cp-filter-toggle[aria-expanded="true"],
#view-counterparties .cp-filter-toggle.is-active { border-color: var(--c-accent-border); background: var(--cp-selected); color: var(--c-accent-text); }
#view-counterparties .cp-extra-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 10px; padding: 11px 12px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); }
#view-counterparties .cp-extra-filters > * { min-width: 0; }
#view-counterparties .cp-extra-filters .form-field > label { font-size: 12px; color: var(--c-text-2); }
#view-counterparties .cp-warning { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--c-border-soft); border-radius: 8px; background: var(--c-warn-bg); color: var(--c-warn-text); font-size: 12px; line-height: 1.5; }
#view-counterparties .cp-filter-context { margin: -4px 0 12px; color: var(--c-text-3); font-size: 12px; line-height: 1.45; }
#view-counterparties .cp-table-frame { min-width: 0; max-width: 100%; overflow: auto; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); }
#view-counterparties .cp-table { width: 100%; min-width: 700px; margin: 0; border-collapse: separate; border-spacing: 0; table-layout: fixed; color: var(--c-text); font-size: 13px; }
#view-counterparties .cp-table thead th { position: sticky; top: 0; z-index: 1; padding: 9px 14px; border: 0; border-bottom: 1px solid var(--c-border-soft); background: var(--c-surface-2); color: var(--c-text-2); text-align: left; font-size: 12px; font-weight: 600; line-height: 1.5; }
#view-counterparties .cp-table :is(th, td) { box-sizing: border-box; min-width: 0; text-align: left; }
#view-counterparties .cp-table tbody td { padding: 6px 14px; border: 0; border-bottom: 1px solid var(--c-border-soft); background: var(--c-surface); vertical-align: middle; line-height: 1.45; overflow-wrap: anywhere; }
#view-counterparties .cp-table tr:last-child > td { border-bottom: 0; }
#view-counterparties .cp-table :is(th, td):first-child { width: 36%; }
#view-counterparties .cp-table :is(th, td):nth-child(2) { width: 19%; }
#view-counterparties .cp-table :is(th, td):nth-child(3) { width: 26%; }
#view-counterparties .cp-table :is(th, td):nth-child(4) { width: 15%; }
#view-counterparties .cp-table :is(th, td):last-child { width: 4%; padding-right: 12px; padding-left: 4px; text-align: right; }
#view-counterparties .cp-row { cursor: pointer; }
#view-counterparties .cp-row:hover > td { background: var(--c-surface-2); }
#view-counterparties .cp-row:is(.is-selected, [aria-selected="true"]) > td { background: var(--cp-selected); }
#view-counterparties .cp-row:is(.is-selected, [aria-selected="true"]) > td:first-child { box-shadow: inset 3px 0 var(--c-accent); }
#view-counterparties .cp-row:focus-visible { outline: 2px solid var(--c-accent); outline-offset: -2px; }
#view-counterparties .cp-name { display: block; min-width: 0; color: var(--c-text); font-size: 13px; font-weight: 650; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
#view-counterparties button.cp-name { padding: 0; border: 0; border-radius: 3px; background: transparent; text-align: left; cursor: pointer; }
#view-counterparties .cp-type { display: inline-block; margin-top: 3px; color: var(--c-text-3); font-size: 12px; line-height: 1.45; font-weight: 400; }
#view-counterparties .cp-linkmark { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; margin-left: 7px; color: var(--c-text-3); font-size: 12px; font-weight: 400; vertical-align: middle; white-space: nowrap; }
#view-counterparties .cp-linkmark .ui-icon { flex: none; width: 13px; height: 13px; }
#view-counterparties .cp-groups { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
#view-counterparties .cp-group { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 7px; border: 0; border-radius: 5px; background: var(--c-surface-3); color: var(--c-text-2); font-size: 12px; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
#view-counterparties .cp-contact { display: grid; gap: 3px; min-width: 0; font-size: 12px; line-height: 1.45; }
#view-counterparties .cp-contact > :not(:first-child) { color: var(--c-text-3); font-size: 12px; }
#view-counterparties .cp-contact :is(small, a),
#view-counterparties .cp-contact-detail { color: var(--c-text-3); font: inherit; font-size: 12px; overflow-wrap: anywhere; text-decoration: none; }
#view-counterparties .cp-contact a:hover { color: var(--c-accent-text); text-decoration: underline; }
#view-counterparties .cp-inn-cell { color: var(--c-text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
#view-counterparties .cp-empty-value { color: var(--c-text-3); font-size: 12px; font-weight: 400; }
#view-counterparties .cp-action-cell .ui-icon { width: 15px; height: 15px; color: var(--c-text-3); }
#view-counterparties .cp-archive-label { display: inline-flex; margin-left: 7px; padding: 2px 5px; border-radius: 4px; background: var(--c-surface-3); color: var(--c-text-3); font-size: 12px; font-weight: 500; }
#view-counterparties .cp-row.is-archived .cp-name { color: var(--c-text-2); }
#view-counterparties :is(.cp-name, .cp-add, .cp-filter-toggle, .cp-toolbar input, .cp-toolbar select, .cp-toolbar .ui-control-trigger):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
#view-counterparties .cp-list-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; margin-top: 12px; color: var(--c-text-3); font-size: 12px; }

#view-counterparties .cp-merge-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 12px; }
#view-counterparties .cp-merge-toolbar .dds-form-help { flex: 1 1 300px; margin: 0; }
#view-counterparties .cp-table .cp-name-choice { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; }
#view-counterparties .cp-merge-select { width: 17px; height: 17px; margin: 0; accent-color: var(--c-accent); cursor: pointer; }
.cp-merge-dialog { box-sizing: border-box; width: min(700px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); color: var(--c-text); box-shadow: 0 18px 70px var(--c-shadow-strong); }
.cp-merge-dialog::backdrop { background: var(--c-overlay-soft); }
.cp-merge-heading, .cp-merge-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 18px 22px; }
.cp-merge-heading { border-bottom: 1px solid var(--c-border-soft); }
.cp-merge-heading h2 { margin: 0; font-size: 18px; }
.cp-merge-body { display: grid; gap: 16px; padding: 20px 22px; overflow-wrap: anywhere; }
.cp-merge-body > p { margin: 0; }
.cp-merge-body .form-field { display: grid; gap: 7px; min-width: 0; font-size: 13px; }
.cp-merge-body select { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--c-border); border-radius: 7px; background: var(--c-surface); color: var(--c-text); font: inherit; }
.cp-merge-members { display: grid; gap: 5px; margin: 0; padding-left: 20px; font-size: 13px; }
.cp-merge-conflicts { display: grid; gap: 14px; }
.cp-merge-conflicts h3 { margin: 0; font-size: 16px; }
.cp-merge-result summary { font-size: 14px; font-weight: 600; cursor: pointer; }
.cp-merge-result dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 8px 14px; margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
.cp-merge-result dt { color: var(--c-text-2); }
.cp-merge-result dd { margin: 0; white-space: pre-wrap; }
.cp-merge-confirmation { padding: 12px; border: 1px solid var(--c-accent-border); border-radius: 8px; background: var(--c-surface-2); font-size: 13px; line-height: 1.5; }
.cp-merge-dialog .cp-warning { margin: 0; padding: 12px; border-radius: 8px; background: var(--c-warn-bg); color: var(--c-warn-text); }
.cp-merge-footer { position: sticky; bottom: 0; border-top: 1px solid var(--c-border-soft); background: var(--c-surface); }
.cp-merge-dialog :is(select, button):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
@media (max-width: 540px) { .cp-merge-heading, .cp-merge-footer, .cp-merge-body { padding: 15px; } .cp-merge-footer > button { flex: 1 1 200px; } }

/* Compact card: optional groups disclose inside one scrollable form. */
#counterparty-layer.counterparties-layer { align-items: center; justify-items: center; padding: 20px; background: var(--c-overlay-soft); }
#counterparty-layer .counterparties-sheet { display: flex; flex-direction: column; width: min(520px, 100%); max-width: 520px; max-height: calc(100dvh - 40px); min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); box-shadow: 0 18px 64px var(--c-shadow-strong); }
#counterparty-layer .counterparties-sheet > .dds-modal-heading { flex: none; align-items: flex-start; gap: 14px; margin: 0; padding: 20px 22px 16px; }
#counterparty-layer .counterparties-sheet .dds-modal-heading > :first-child { min-width: 0; }
#counterparty-layer .counterparties-sheet .dds-modal-heading h2 { color: var(--c-text); font-size: 18px; line-height: 1.35; letter-spacing: 0; font-weight: 700; }
#counterparty-layer .counterparties-sheet .dds-eyebrow { margin: 0 0 8px; color: var(--c-text-3); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
#counterparty-layer .cp-card-subtitle { margin: 6px 0 0; color: var(--c-text-3); font-size: 12px; line-height: 1.45; }
#counterparty-layer .counterparties-sheet .dds-modal-heading > .ui-icon-button { width: 34px; height: 34px; min-height: 34px; margin: -3px -7px 0 0; padding: 7px; border: 0; background: transparent; box-shadow: none; border-radius: 7px; }
#counterparty-layer .cp-card-back { display: none; }
#counterparty-layer #counterparty-form { display: flex; flex: 0 1 auto; flex-direction: column; min-height: 0; margin: 0; padding: 0 22px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
#counterparty-layer #counterparty-fields { display: flex; flex: none; flex-direction: column; gap: 8px; min-width: 0; margin: 0 0 14px; padding: 0; }
#counterparty-layer #counterparty-fields > .dds-form-help { margin: 0; padding: 0; border-radius: 0; background: transparent; color: var(--c-text-3); font-size: 12px; line-height: 1.45; }
#counterparty-layer #counterparty-employee-link { flex: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 7px; background: var(--c-surface-2); color: var(--c-text-2); font-size: 12px; line-height: 1.5; }
#counterparty-layer .cp-form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
#counterparty-layer :is(.cp-field, .form-field) { display: grid; grid-template-columns: 122px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; margin: 0; }
#counterparty-layer .cp-span-2 { grid-column: 1 / -1; }
#counterparty-layer :is(.cp-field, .form-field) > label,
#counterparty-layer .cp-field-label { color: var(--c-text-2); font-size: 13px; font-weight: 500; line-height: 1.45; }
#counterparty-layer :is(input:not(.ui-native-control):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select:not(.ui-native-control), textarea, .ui-control-trigger) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 36px; margin: 0; padding: 7px 10px; border: 1px solid var(--c-control-border); border-radius: 6px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 13px; line-height: 1.45; }
#counterparty-layer .ui-control-trigger { gap: 8px; }
#counterparty-layer textarea { min-height: 76px; max-height: 240px; resize: vertical; }
#counterparty-layer input::placeholder,
#counterparty-layer textarea::placeholder { color: var(--c-text-3); opacity: 1; }
#counterparty-layer :is(input, textarea)[readonly],
#counterparty-layer :is(input, select, textarea, .ui-control-trigger):disabled { background: var(--c-surface-2); color: var(--c-text-2); }
#counterparty-layer :is(input, select, textarea, button, summary, a):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
#counterparty-layer :is(input, select, textarea)[aria-invalid="true"],
#counterparty-layer .dds-field-invalid :is(input, select, textarea, .ui-control-trigger) { border-color: var(--c-danger-text); }
#counterparty-layer .cp-field .dds-field-note { min-height: 0; margin: 0; color: var(--c-text-3); font-size: 12px; line-height: 1.45; }
#counterparty-layer .cp-group-choices,
#counterparty-layer .dds-group-choices { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; }
#counterparty-layer :is(.cp-group-choices, .dds-group-choices) label { display: inline-flex; align-items: center; justify-content: flex-start; gap: 7px; min-width: 0; min-height: 34px; margin: 0; padding: 5px 6px; border: 1px solid var(--c-border); border-radius: 7px; background: var(--c-surface); color: var(--c-text-2); font-size: 13px; line-height: 1.35; cursor: pointer; }
#counterparty-layer :is(.cp-group-choices, .dds-group-choices) label:has(input:checked) { background: var(--cp-selected); border-color: var(--c-accent); color: var(--c-text); }
#counterparty-layer :is(.cp-group-choices, .dds-group-choices) label:has(input:disabled) { cursor: default; }
#counterparty-layer :is(.cp-group-choices, .dds-group-choices) input[type="checkbox"] { flex: none; width: 15px; height: 15px; margin: 0; accent-color: var(--c-accent); }
#counterparty-layer .dds-counterparty-rules { display: grid; grid-template-columns: 122px minmax(0, 1fr); align-items: center; gap: 8px; padding: 0; margin: 0; border: 0; border-radius: 0; }
#counterparty-layer .dds-counterparty-rules legend { padding: 0; margin: 0 0 6px; color: var(--c-text-2); font-size: 12px; font-weight: 500; }
#counterparty-layer .cp-section { grid-column: 1 / -1; margin: 16px 0 0; padding: 0; border: 0; border-top: 1px solid var(--c-border-soft); border-radius: 0; background: transparent; }
#counterparty-layer #counterparty-fields > .cp-section { margin-top: 0; }
#counterparty-layer .cp-section > summary { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 10px 0; color: var(--c-text); font-size: 13px; font-weight: 650; line-height: 1.4; list-style: none; cursor: pointer; }
#counterparty-layer .cp-section > summary::-webkit-details-marker { display: none; }
#counterparty-layer .cp-section > summary > .ui-icon:first-child { flex: none; width: 19px; height: 19px; }
#counterparty-layer .cp-section-title { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
#counterparty-layer .cp-section-hint { display: block; color: var(--c-text-3); font-size: 12px; font-weight: 400; }
#counterparty-layer .cp-section-chevron { flex: none; width: 15px; height: 15px; margin-left: auto; color: var(--c-text-3); transition: transform .15s ease; }
#counterparty-layer .cp-section[open] > summary .cp-section-chevron { transform: rotate(180deg); }
#counterparty-layer .cp-section > summary:has(> .cp-section-title) { display: grid; grid-template-columns: minmax(0, 1fr) 15px; gap: 2px 10px; }
#counterparty-layer .cp-section > summary > .cp-section-title { grid-column: 1; grid-row: 1; }
#counterparty-layer .cp-section > summary > .cp-section-hint { grid-column: 1; grid-row: 2; }
#counterparty-layer .cp-section > summary > .ui-icon:last-child { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 15px; height: 15px; margin-left: auto; color: var(--c-text-3); transition: transform .15s ease; }
#counterparty-layer .cp-section[open] > summary > .ui-icon:last-child { transform: rotate(180deg); }
#counterparty-layer .cp-section[open] > summary .cp-section-hint { display: none; }
#counterparty-layer .cp-section-body { display: grid; gap: 12px; min-width: 0; padding: 0 0 1px; }
#counterparty-layer .cp-bank-account { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0 0 12px; border: 0; border-bottom: 1px solid var(--c-border-soft); border-radius: 0; }
#counterparty-layer .cp-bank-account:last-of-type { padding-bottom: 0; border-bottom: 0; }
#counterparty-layer #counterparty-bank-accounts { display: grid; gap: 16px; }
#counterparty-layer .cp-bank-account > h3 { margin: 0; color: var(--c-text-2); font-size: 12px; font-weight: 600; }
#counterparty-layer #counterparty-bank-accounts > .dds-form-help { margin: 0; padding: 0; background: transparent; color: var(--c-text-3); font-size: 12px; }
#counterparty-layer :is(#counterparty-add-account, #counterparty-use-name),
#counterparty-layer .cp-bank-account > .dds-small-button { align-self: flex-start; justify-self: start; min-height: 30px; padding: 3px 0; border: 0; background: transparent; color: var(--c-accent-text); text-align: left; font-size: 12px; }
#counterparty-layer .cp-bank-account > .dds-small-button { color: var(--c-text-3); }
#counterparty-layer .cp-bank-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--c-text-2); font-size: 12px; }
#counterparty-layer .cp-bank-heading :is(h3, h4) { margin: 0; color: inherit; font: inherit; font-weight: 600; }
#counterparty-layer .cp-inline-action { display: inline-flex; align-items: center; gap: 5px; justify-self: start; min-height: 32px; padding: 4px 0; border: 0; border-radius: 4px; background: transparent; color: var(--c-accent-text); font: inherit; font-size: 12px; cursor: pointer; }
#counterparty-layer .cp-inline-action .ui-icon { width: 15px; height: 15px; }
#counterparty-layer .cp-inline-action:hover { text-decoration: underline; }
#counterparty-layer .cp-remove-account { flex: none; width: 30px; height: 30px; min-height: 30px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--c-text-3); cursor: pointer; }
#counterparty-layer .cp-remove-account:hover { background: var(--c-danger-bg); color: var(--c-danger-text); }
#counterparty-layer .cp-card-footer { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; flex: none; gap: 8px; margin: 0 -22px 0; padding: 12px 22px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--c-border-soft); background: var(--c-surface); }
#counterparty-layer .cp-card-footer :is(.ui-action-button, .dds-action) { min-height: 36px; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
#counterparty-layer .cp-card-footer .primary { min-width: 108px; }
#counterparty-layer .cp-sync { margin: 8px 0 0; color: var(--c-text-3); font-size: 12px; line-height: 1.45; }
#counterparty-layer .cp-warning { margin: 0 0 13px; padding: 10px 12px; border: 1px solid var(--c-border-soft); border-radius: 7px; background: var(--c-warn-bg); color: var(--c-warn-text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#counterparty-layer .cp-warning .ui-icon { width: 15px; height: 15px; margin-right: 5px; vertical-align: -.2em; }
#counterparty-layer .cp-warning.is-neutral { background: var(--c-surface-2); color: var(--c-text-2); }
#counterparty-layer #counterparty-actions { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; gap: 4px; width: min(300px, calc(100vw - 48px)); margin: 0; padding: 6px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); box-shadow: 0 8px 24px var(--c-shadow-strong); }
#counterparty-layer #counterparty-actions:empty { display: none; }
#counterparty-layer #counterparty-actions .dds-small-button { min-height: 36px; padding: 7px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--c-text-2); text-align: left; font-size: 13px; }
#counterparty-layer #counterparty-message { flex: none; margin: 0 0 12px; font-size: 12px; }
#view-counterparties [hidden],
#counterparty-layer.counterparties-layer[hidden],
#counterparty-layer.counterparties-layer [hidden] { display: none !important; }

/* Visible labels share the toolbar row; merge keeps its existing two-step flow. */
#view-counterparties .cp-toolbar { grid-template-columns: minmax(260px, 1fr) minmax(190px, .5fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); }
#view-counterparties .cp-toolbar :is(.cp-search, .cp-filter-group) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px; }
#view-counterparties .cp-toolbar .form-field > label { color: var(--c-text); font-size: 13px; }
#view-counterparties .cp-toolbar :is(input:not(.ui-native-control), select:not(.ui-native-control), .ui-control-trigger) { min-height: 36px; height: 36px; padding: 7px 10px; border-color: var(--c-control-border); border-radius: 6px; font-size: 13px; }
#view-counterparties .cp-filter-toggle { width: auto; height: 36px; min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 6px; }
#view-counterparties .cp-filter-toggle > span { display: inline; }
#counterparty-merge-toolbar { grid-column: 4; min-width: 0; }
#counterparty-merge-toolbar:empty { display: none; }
#counterparty-merge-toolbar:has(.dds-form-help) { grid-column: 1 / -1; }
#view-counterparties #counterparty-merge-toolbar .cp-merge-toolbar { justify-content: flex-end; margin: 0; gap: 8px; }
#view-counterparties .cp-merge-toolbar .dds-small-button { min-height: 36px; padding: 7px 12px; border-radius: 6px; font-size: 13px; }
#counterparty-layer .cp-field .dds-field-note { grid-column: 2; }
#counterparty-layer #counterparty-use-name { margin: 0 0 0 130px; font-size: 12px; }
#counterparty-layer :is(#counterparty-inn, #counterparty-kpp) { max-width: 220px; }
#counterparty-layer .cp-extra-actions { position: relative; flex: none; margin-right: auto; }
#counterparty-layer .cp-extra-actions:has(#counterparty-actions:empty) { display: none; }
#counterparty-layer .cp-extra-actions > summary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--c-border); border-radius: 6px; background: var(--c-surface); color: var(--c-text); font-size: 13px; line-height: 1.4; list-style: none; cursor: pointer; }
#counterparty-layer .cp-extra-actions > summary::-webkit-details-marker { display: none; }
#counterparty-layer .cp-extra-actions > summary .ui-icon { width: 14px; height: 14px; }
#counterparty-layer .cp-extra-actions[open] > summary { background: var(--c-surface-2); }
#counterparty-layer #counterparty-actions .dds-small-button:hover { background: var(--c-surface-2); }
#counterparty-layer #counterparty-actions .dds-small-button.danger { color: var(--c-danger-text); }
#counterparty-layer #counterparty-actions > p { margin: 0; padding: 6px 8px; font-size: 12px; }
.cp-merge-dialog { width: min(620px, calc(100vw - 32px)); font-size: 13px; }
.cp-merge-heading h2 { font-size: 18px; }
.cp-merge-heading .cp-merge-close { display: grid; place-items: center; width: 34px; height: 34px; min-height: 34px; padding: 7px; border: 0; border-radius: 6px; background: transparent; color: var(--c-text-2); }
.cp-merge-close .ui-icon { width: 20px; height: 20px; }
.cp-merge-body .form-field { grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 8px; }
.cp-merge-body :is(select:not(.ui-native-control), .ui-control-trigger) { min-height: 36px; padding: 7px 10px; border: 1px solid var(--c-control-border); border-radius: 6px; background: var(--c-surface); color: var(--c-text); font-size: 13px; }
.cp-merge-body .dds-form-help { font-size: 12px; }
.cp-merge-footer { justify-content: flex-end; gap: 8px; }
.cp-merge-footer > button { min-height: 36px; font-size: 13px; }

@media (max-width: 1200px) and (min-width: 769px) {
  #view-counterparties .cp-toolbar { grid-template-columns: minmax(200px, 1fr) minmax(180px, .7fr) auto; }
  #counterparty-merge-toolbar { grid-column: 1 / -1; }
  #view-counterparties .cp-table tbody td { padding-inline: 10px; }
}
@media (max-width: 768px) {
  #view-counterparties .cp-heading { gap: 10px; margin-bottom: 16px; }
  #view-counterparties .cp-title-block { gap: 9px; }
  #view-counterparties .cp-title-icon { flex-basis: 32px; width: 32px; height: 32px; border-radius: 6px; }
  #view-counterparties .cp-title-icon .ui-icon { width: 22px; height: 22px; }
  #view-counterparties .cp-sync { font-size: 12px; }
  #view-counterparties .cp-add { width: 44px; height: 44px; min-height: 44px; padding: 10px; }
  #view-counterparties .cp-add > span { display: none; }
  #view-counterparties .cp-toolbar { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  #view-counterparties .cp-search { grid-column: 1 / -1; }
  #view-counterparties .cp-toolbar :is(.cp-search, .cp-filter-group) { grid-template-columns: 48px minmax(0, 1fr); gap: 8px; }
  #view-counterparties .cp-filter-group { grid-column: 1; }
  #view-counterparties .cp-filter-toggle { grid-column: 2; }
  #view-counterparties .cp-toolbar :is(input:not(.ui-native-control), select:not(.ui-native-control), .ui-control-trigger),
  #view-counterparties .cp-filter-toggle,
  #view-counterparties .cp-merge-toolbar .dds-small-button { min-height: 44px; height: auto; }
  #counterparty-merge-toolbar { grid-column: 1 / -1; }
  #view-counterparties .cp-extra-filters { grid-template-columns: minmax(0, 1fr); padding: 10px; }
  #view-counterparties .cp-table-frame { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  #view-counterparties .cp-table { display: block; width: 100%; min-width: 0; max-width: 100%; table-layout: auto; }
  #view-counterparties .cp-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  #view-counterparties .cp-table tbody { display: grid; min-width: 0; width: 100%; gap: 7px; }
  #view-counterparties .cp-table .cp-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-content: center; align-items: start; gap: 3px 8px; min-width: 0; width: 100%; min-height: 82px; padding: 12px; border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-surface); box-shadow: none; }
  #view-counterparties .cp-table .cp-row > td { display: block; min-width: 0; width: auto; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; font-size: 13px; line-height: 1.4; }
  #view-counterparties .cp-table .cp-row > td::before { content: none; }
  #view-counterparties .cp-table .cp-row:hover { background: var(--c-surface-2); }
  #view-counterparties .cp-table .cp-row:is(.is-selected, [aria-selected="true"]) { border-color: var(--c-accent); background: var(--cp-selected); }
  #view-counterparties .cp-table .cp-row:is(.is-selected, [aria-selected="true"]) > td:first-child { box-shadow: none; }
  #view-counterparties .cp-table .cp-name-cell { grid-column: 1; grid-row: 1; }
  #view-counterparties .cp-name { font-size: 13px; font-weight: 650; line-height: 1.4; }
  #view-counterparties .cp-type { margin-top: 3px; font-size: 12px; }
  #view-counterparties .cp-linkmark { font-size: 12px; }
  #view-counterparties .cp-table .cp-groups-cell { grid-column: 1; grid-row: 2; }
  #view-counterparties .cp-groups { gap: 4px; }
  #view-counterparties .cp-group { padding: 0; border-radius: 0; background: transparent; color: var(--c-text-2); font-size: 12px; }
  #view-counterparties .cp-group + .cp-group::before { content: "·"; margin-right: 4px; color: var(--c-text-3); }
  #view-counterparties .cp-table .cp-contact-cell { grid-column: 1; grid-row: 3; }
  #view-counterparties .cp-row:has(.cp-linkmark) .cp-contact-cell:has(.cp-contact > .cp-empty-value:only-child) { display: none; }
  #view-counterparties .cp-contact { display: flex; flex-wrap: wrap; gap: 2px 5px; }
  #view-counterparties .cp-contact > * { min-width: 0; max-width: 100%; font-size: 12px; }
  #view-counterparties .cp-contact > :not(:first-child)::before { content: "·"; margin-right: 5px; color: var(--c-text-3); }
  #view-counterparties .cp-table .cp-row > td.cp-inn-cell { display: none; }
  #view-counterparties .cp-table .cp-action-cell { display: flex; grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-content: flex-end; }
}
@media (max-width: 540px) {
  #counterparty-layer.counterparties-layer { padding: 12px; }
  #counterparty-layer .counterparties-sheet { width: 100%; max-height: calc(100dvh - 24px); }
  #counterparty-layer .counterparties-sheet > .dds-modal-heading { padding: 16px 16px 12px; }
  #counterparty-layer .counterparties-sheet .dds-modal-heading > .ui-icon-button { width: 44px; height: 44px; min-height: 44px; margin: -6px -8px 0 0; }
  #counterparty-layer #counterparty-form { padding-inline: 16px; scrollbar-gutter: auto; }
  #counterparty-layer :is(.cp-field, .form-field),
  #counterparty-layer .dds-counterparty-rules { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  #counterparty-layer :is(input:not(.ui-native-control):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select:not(.ui-native-control), textarea, .ui-control-trigger) { min-height: 44px; padding: 10px; font-size: 13px; }
  #counterparty-layer .cp-field .dds-field-note { grid-column: 1; }
  #counterparty-layer #counterparty-use-name { margin-left: 0; min-height: 44px; }
  #counterparty-layer :is(.cp-group-choices, .dds-group-choices) label { min-height: 44px; padding-inline: 7px; }
  #counterparty-layer .cp-section > summary { min-height: 44px; }
  #counterparty-layer .cp-card-footer { gap: 8px; margin-inline: -16px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  #counterparty-layer .cp-card-footer :is(.ui-action-button, .dds-action),
  #counterparty-layer .cp-extra-actions > summary,
  #counterparty-layer #counterparty-actions .dds-small-button,
  #counterparty-layer #counterparty-add-account,
  #counterparty-layer .cp-bank-account > .dds-small-button { min-height: 44px; font-size: 13px; }
  #counterparty-layer .cp-card-footer .primary { min-width: 0; }
  #counterparty-layer .cp-extra-actions { flex-basis: 100%; }
  #counterparty-layer #counterparty-actions { width: min(300px, calc(100vw - 70px)); }
  #counterparty-layer .cp-card-footer > button { flex: 1 1 auto; }
  .cp-merge-heading, .cp-merge-footer, .cp-merge-body { padding: 16px; }
  .cp-merge-body .form-field { grid-template-columns: minmax(0, 1fr); }
  .cp-merge-heading .cp-merge-close,
  .cp-merge-footer > button,
  .cp-merge-body :is(select:not(.ui-native-control), .ui-control-trigger) { min-height: 44px; }
  .cp-merge-footer > button { flex: 1 1 200px; }
}
@media (prefers-reduced-motion: reduce) {
  #counterparty-layer .cp-section-chevron,
  #counterparty-layer .cp-section > summary > .ui-icon:last-child { transition: none; }
}

/* Personal workspace: read-only identity/access with explicit security actions. */
#view-profile.profile-workspace { --pf-tint: color-mix(in srgb, var(--c-accent-soft) 55%, var(--c-surface)); min-width: 0; font-family: "Noto Sans", "Segoe UI", system-ui, sans-serif; }
#view-profile .pf-page-heading { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
#view-profile .pf-page-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--pf-tint); color: var(--c-text); }
#view-profile .pf-page-icon .ui-icon { width: 27px; height: 27px; }
#view-profile .pf-heading-copy { min-width: 0; }
#view-profile .pf-heading-copy h1 { margin: 0; color: var(--c-text); font-size: 26px; font-weight: 700; line-height: 1.25; letter-spacing: -.4px; }
#view-profile .pf-heading-copy p { margin: 5px 0 0; color: var(--c-text-2); font-size: 13px; line-height: 1.4; }
#view-profile .pf-updated { flex: none; margin: 0 0 0 auto; color: var(--c-text-3); font-size: 11px; line-height: 1.45; font-variant-numeric: tabular-nums; }
#view-profile .pf-load-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
#view-profile .pf-load-status:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
#view-profile .pf-load-status .dds-inline-message { margin: 0; font-size: 12px; }
#view-profile .pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
#view-profile .pf-card { min-width: 0; margin: 0; padding: 20px; border: 1px solid var(--c-border); border-radius: 10px; background: var(--c-surface); box-shadow: none; }
#view-profile .pf-identity { grid-column: 1; grid-row: 1; }
#view-profile .pf-security { grid-column: 2; grid-row: 1; }
#view-profile .pf-access { grid-column: 1; grid-row: 2; }
#view-profile .pf-sessions { grid-column: 2; grid-row: 2; }
#view-profile .pf-card-heading { display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 18px; }
#view-profile .pf-card-heading > .ui-icon { flex: none; width: 23px; height: 23px; color: var(--c-text); }
#view-profile .pf-card-heading h2 { min-width: 0; margin: 0; color: var(--c-text); font-size: 17px; font-weight: 700; line-height: 1.4; }
#view-profile .pf-count { display: inline-grid; place-items: center; min-width: 23px; height: 22px; margin-left: 1px; padding: 1px 6px; border-radius: 10px; background: var(--c-surface-3); color: var(--c-text-2); font-size: 11px; font-variant-numeric: tabular-nums; }
#view-profile .pf-person { display: flex; align-items: center; gap: 13px; min-width: 0; margin-bottom: 17px; }
#view-profile .pf-person > div { min-width: 0; }
#view-profile .pf-avatar { display: grid; place-items: center; flex: none; width: 47px; height: 47px; border-radius: 50%; background: var(--pf-tint); color: var(--c-text); font-size: 16px; font-weight: 500; }
#view-profile .pf-person h3 { margin: 0; color: var(--c-text); font-size: 17px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
#view-profile .pf-person p { margin: 4px 0 0; color: var(--c-text-2); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
#view-profile .pf-person-details { display: grid; gap: 11px; margin: 0; }
#view-profile .pf-person-details > div { display: grid; grid-template-columns: minmax(105px, .75fr) minmax(0, 1.25fr); gap: 12px; min-width: 0; }
#view-profile .pf-person-details dt { color: var(--c-text-3); font-size: 12px; line-height: 1.5; }
#view-profile .pf-person-details dd { min-width: 0; margin: 0; color: var(--c-text); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
#view-profile .pf-card-note { margin: 16px 0 0; padding-top: 9px; border-top: 1px solid var(--c-border-soft); color: var(--c-text-3); font-size: 10px; line-height: 1.45; }
#view-profile .pf-security-row { display: grid; grid-template-columns: 21px minmax(0, 1fr) auto; align-items: start; gap: 12px; min-width: 0; padding: 6px 0 20px; }
#view-profile .pf-security-row + .pf-security-row { padding-top: 20px; padding-bottom: 0; border-top: 1px solid var(--c-border-soft); }
#view-profile .pf-security-row > .ui-icon { width: 21px; height: 21px; margin-top: 3px; color: var(--c-text); }
#view-profile .pf-security-copy { min-width: 0; }
#view-profile .pf-security-copy h3 { margin: 0; font-size: 13px; font-weight: 650; line-height: 1.5; }
#view-profile .pf-security-copy p { margin: 4px 0 0; color: var(--c-text-3); font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
#view-profile .pf-security-copy .pf-security-help { margin-top: 11px; font-size: 10px; }
#view-profile .pf-security-row .ui-action-button { min-height: 36px; padding: 7px 12px; border-radius: 7px; font-size: 11px; white-space: nowrap; }
#view-profile .pf-security-row .dds-inline-message { grid-column: 2 / -1; margin: 0; font-size: 11px; overflow-wrap: anywhere; }
#view-profile .pf-required { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding: 13px 16px; border: 1px solid var(--c-border); border-left: 3px solid var(--c-accent); border-radius: 8px; background: var(--pf-tint); color: var(--c-text); }
#view-profile .pf-required > .ui-icon { flex: none; width: 23px; height: 23px; }
#view-profile .pf-required > div { min-width: 0; flex: 1; }
#view-profile .pf-required strong { font-size: 13px; font-weight: 650; }
#view-profile .pf-required p { margin: 4px 0 0; color: var(--c-text-2); font-size: 11px; line-height: 1.45; }
#view-profile .pf-required .ui-action-button { flex: none; min-height: 36px; border-radius: 7px; font-size: 12px; }
#view-profile :is(.dds-session-list, .pf-session-list) { display: grid; gap: 0; min-width: 0; }
#view-profile :is(.dds-session-card, .pf-session) { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; margin: 0; padding: 0 0 15px; border: 0; border-bottom: 1px solid var(--c-border-soft); border-radius: 0; background: transparent; box-shadow: none; }
#view-profile :is(.dds-session-card, .pf-session) + :is(.dds-session-card, .pf-session) { padding-top: 15px; }
#view-profile :is(.dds-session-card, .pf-session) > div { min-width: 0; }
#view-profile :is(.dds-session-heading, .pf-session-heading) { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#view-profile :is(.dds-session-card, .pf-session) h3 { margin: 0; color: var(--c-text); font-size: 13px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
#view-profile :is(.dds-session-card, .pf-session) :is(.dds-muted, .pf-session-meta) { display: block; margin: 4px 0 0; color: var(--c-text-3); font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
#view-profile :is(.dds-session-heading .status-badge, .pf-session-current) { padding: 2px 6px; border: 0; border-radius: 5px; background: var(--pf-tint); color: var(--c-text); font-size: 10px; font-weight: 500; line-height: 1.4; }
#view-profile :is(.dds-session-card .dds-small-button, .pf-session-end) { flex: none; min-height: 28px; margin-top: -3px; padding: 3px 0; border: 0; background: transparent; color: var(--c-danger-text); font-size: 11px; font-weight: 400; cursor: pointer; }
#view-profile .pf-sessions-footer { display: grid; justify-items: start; gap: 7px; margin-top: 15px; }
#view-profile .pf-sessions-footer .ui-action-button { min-height: 36px; padding: 7px 12px; border-radius: 7px; font-size: 11px; }
#view-profile .pf-sessions-footer p { margin: 0; color: var(--c-text-3); font-size: 10px; line-height: 1.45; }
#view-profile .pf-access-list { margin: 0; }
#view-profile .pf-access-row { display: grid; grid-template-columns: minmax(115px, .75fr) minmax(0, 1.25fr); align-items: baseline; gap: 8px 14px; padding: 8px 0; border-bottom: 1px solid var(--c-border-soft); }
#view-profile .pf-access-row:first-child { padding-top: 0; }
#view-profile .pf-access-row dt { min-width: 0; color: var(--c-text); font-size: 12px; font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
#view-profile .pf-access-description { display: grid; gap: 3px; min-width: 0; margin: 0; color: var(--c-text-2); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#view-profile .pf-access-source { color: var(--c-warn-text); font-size: 10px; }
#view-profile .pf-access-row.is-blocked .pf-access-description { color: var(--c-text-3); }
#view-profile .pf-access-warning { margin: 0 0 12px; padding: 9px 10px; border-radius: 7px; background: var(--c-warn-bg); color: var(--c-warn-text); font-size: 11px; line-height: 1.5; }
#view-profile .pf-wallets { margin: 0; border-bottom: 1px solid var(--c-border-soft); }
#view-profile .pf-wallets > summary { display: grid; grid-template-columns: minmax(115px, .75fr) minmax(0, 1.25fr) 16px; align-items: center; gap: 10px; min-height: 39px; padding: 8px 0; color: var(--c-text); font-size: 12px; line-height: 1.45; list-style: none; cursor: pointer; }
#view-profile .pf-wallets > summary::-webkit-details-marker { display: none; }
#view-profile #profile-wallets-count { color: var(--c-text-3); font-size: 11px; }
#view-profile .pf-wallets > summary .ui-icon { width: 15px; height: 15px; color: var(--c-text-2); transition: transform .15s ease; }
#view-profile .pf-wallets[open] > summary .ui-icon { transform: rotate(180deg); }
#view-profile .pf-wallet-list { display: grid; gap: 12px; padding: 3px 0 12px; }
#view-profile .pf-wallet-item { min-width: 0; padding: 10px 12px; border: 1px solid var(--c-border-soft); border-radius: 7px; background: var(--c-surface-2); }
#view-profile .pf-wallet-item h3 { margin: 0; font-size: 12px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
#view-profile .pf-wallet-item p { margin: 5px 0 0; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
#view-profile .pf-wallet-capabilities { color: var(--c-text-2); }
#view-profile .pf-wallet-source { color: var(--c-text-3); }
#view-profile .pf-wallet-blocker { color: var(--c-warn-text); }
#view-profile .pf-access-note { margin: 18px 0 0; color: var(--c-text-3); font-size: 10px; line-height: 1.45; }
#view-profile .pf-empty { margin: 6px 0 12px; color: var(--c-text-3); font-size: 12px; line-height: 1.5; }
#view-profile .dds-empty { padding: 12px 0; border: 0; background: transparent; }
#view-profile .dds-empty h3 { font-size: 13px; }
#view-profile .dds-empty p { font-size: 11px; }
#view-profile :is(button, summary):focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
#profile-password-modal .pf-password-sheet { width: min(430px, 100%); padding: 22px; border-radius: 11px; }
#profile-password-modal .dds-modal-heading { margin-bottom: 18px; }
#profile-password-modal .dds-modal-heading h2 { font-size: 21px; line-height: 1.3; }
#profile-password-modal #password-fields { display: grid; gap: 13px; }
#profile-password-modal .form-field { margin: 0; gap: 5px; }
#profile-password-modal .form-field > label { color: var(--c-text-2); font-size: 12px; }
#profile-password-modal input { box-sizing: border-box; min-width: 0; width: 100%; min-height: 40px; border: 1px solid var(--c-border); border-radius: 7px; background: var(--c-surface); color: var(--c-text); font: inherit; font-size: 14px; }
#profile-password-modal #password-requirements { margin: 0; padding: 0; border-radius: 0; background: transparent; color: var(--c-text-3); font-size: 11px; line-height: 1.5; }
#profile-password-modal .pf-password-warning { display: flex; align-items: flex-start; gap: 8px; margin: 16px 0 0; padding: 10px; border-radius: 7px; background: var(--c-surface-2); color: var(--c-text-2); font-size: 11px; line-height: 1.5; }
#profile-password-modal .pf-password-warning .ui-icon { flex: none; width: 16px; height: 16px; margin-top: 1px; }
#profile-password-modal #password-message { margin: 12px 0 0; font-size: 12px; }
#profile-password-modal .dds-modal-actions { margin-top: 18px; }
#profile-password-modal .dds-modal-actions .ui-action-button { min-height: 39px; border-radius: 7px; font-size: 12px; }
#view-profile [hidden], #profile-password-modal[hidden], #profile-password-modal [hidden] { display: none !important; }
@media (min-width: 761px) and (max-width: 1150px) {
  #view-profile .pf-card { padding: 17px; }
  #view-profile .pf-security-row { grid-template-columns: 20px minmax(0, 1fr); gap: 8px 10px; }
  #view-profile .pf-security-row > button { grid-column: 2; justify-self: start; }
  #view-profile .pf-card-heading { gap: 9px; }
  #view-profile .pf-card-heading h2 { font-size: 16px; }
  #view-profile .pf-access-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
@media (max-width: 760px) {
  #view-profile .pf-page-heading { align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
  #view-profile .pf-page-icon { width: 37px; height: 37px; border-radius: 8px; }
  #view-profile .pf-page-icon .ui-icon { width: 24px; height: 24px; }
  #view-profile .pf-heading-copy { flex: 1; }
  #view-profile .pf-heading-copy h1 { font-size: 22px; line-height: 1.25; }
  #view-profile .pf-heading-copy p { margin-top: 4px; font-size: 11px; }
  #view-profile .pf-updated { flex-basis: 100%; margin: -2px 0 0 47px; font-size: 10px; }
  #view-profile .pf-grid { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  #view-profile .pf-grid > .pf-card { grid-column: 1; grid-row: auto; padding: 16px; }
  #view-profile .pf-card-heading { gap: 10px; margin-bottom: 16px; }
  #view-profile .pf-card-heading h2 { font-size: 17px; }
  #view-profile .pf-card-heading > .ui-icon { width: 22px; height: 22px; }
  #view-profile .pf-person { gap: 12px; margin-bottom: 16px; }
  #view-profile .pf-person h3 { font-size: 17px; }
  #view-profile .pf-person p { font-size: 12px; }
  #view-profile .pf-person-details { gap: 0; }
  #view-profile .pf-person-details > div { grid-template-columns: minmax(100px, .85fr) minmax(0, 1.15fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--c-border-soft); }
  #view-profile .pf-person-details :is(dt, dd) { font-size: 12px; }
  #view-profile .pf-card-note { margin-top: 7px; padding-top: 0; border-top: 0; font-size: 10px; }
  #view-profile .pf-security-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding-top: 0; padding-bottom: 17px; }
  #view-profile .pf-security-row > .ui-icon { display: none; }
  #view-profile .pf-security-row + .pf-security-row { padding-top: 17px; }
  #view-profile .pf-security-row .ui-action-button { min-height: 40px; padding-inline: 10px; font-size: 11px; }
  #view-profile .pf-security-row .dds-inline-message { grid-column: 1 / -1; }
  #view-profile .pf-security-copy h3 { font-size: 13px; }
  #view-profile .pf-security-copy p { font-size: 11px; }
  #view-profile .pf-required { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
  #view-profile .pf-required .ui-action-button { min-height: 40px; margin-left: 35px; }
  #view-profile :is(.dds-session-card, .pf-session) { padding-bottom: 13px; }
  #view-profile :is(.dds-session-card, .pf-session) + :is(.dds-session-card, .pf-session) { padding-top: 13px; }
  #view-profile :is(.dds-session-card .dds-small-button, .pf-session-end) { min-height: 40px; }
  #view-profile .pf-sessions-footer { margin-top: 13px; justify-items: stretch; }
  #view-profile .pf-sessions-footer .ui-action-button { width: 100%; justify-content: center; min-height: 40px; }
  #view-profile .pf-access-row { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 9px 0; }
  #view-profile .pf-access-row dt { font-size: 13px; font-weight: 600; }
  #view-profile .pf-access-description { font-size: 11px; }
  #view-profile .pf-wallets > summary { grid-template-columns: minmax(0, 1fr) auto 15px; padding-block: 12px; }
  #view-profile .pf-wallets > summary > :first-child { font-size: 13px; font-weight: 600; }
  #view-profile .pf-access-note { margin-top: 13px; }
  #profile-password-modal { padding: 14px; }
  #profile-password-modal .pf-password-sheet { padding: 18px; max-height: calc(100dvh - 28px); }
  #profile-password-modal .dds-modal-actions .ui-action-button { flex: 1; min-height: 42px; }
}
@media (max-width: 360px) {
  #view-profile .pf-heading-copy h1 { font-size: 20px; }
  #view-profile .pf-security-row { grid-template-columns: minmax(0, 1fr); }
  #view-profile .pf-security-row > button { justify-self: start; }
  #view-profile .pf-card-heading h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { #view-profile .pf-wallets > summary .ui-icon { transition: none; } }

/* Administration / Team. Scoped additions to the platform's shared shell. */
#view-admin-users { min-width: 0; }
#view-admin-users .ui-card { box-shadow:none; border-radius:10px; }
#view-admin-users .team-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 18px; }
#view-admin-users .team-page-heading h1 { font-size:26px; margin:0; }
#view-admin-users .team-page-heading p { margin:5px 0 0; font-size:14px; }
#team-sync-status { color:var(--c-text-3); font-size:11px; white-space:nowrap; }
#team-sync-status[data-tone=error] { color:var(--c-danger-text); }
#view-admin-users .dds-team-tabs { display:flex; width:100%; max-width:100%; gap:0; padding:0; margin:0 0 20px; border-bottom:1px solid var(--c-border); border-radius:0; background:transparent; overflow-x:auto; }
#view-admin-users .dds-team-tabs [role=tab] { flex:1 0 auto; padding:12px 14px; font-family:inherit; font-size:14px; font-weight:500; min-height:44px; background:transparent; border:0; border-bottom:3px solid transparent; border-radius:0; box-shadow:none; white-space:nowrap; }
#view-admin-users .dds-team-tabs [role=tab][aria-selected=true] { color:var(--c-text); border-bottom-color:var(--c-accent); font-weight:600; }
#view-admin-users .dds-team-tabs [hidden] { display:none; }
.team-mobile-nav { display:none; }
#view-admin-users #admin-users-content { background:var(--c-surface); border:1px solid var(--c-border); border-radius:10px; padding:20px; min-width:0; font-family:inherit; font-size:14px; line-height:1.5; }
#view-admin-users .team-directory-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
#view-admin-users .team-directory-heading h2 { font-size:24px; line-height:1.3; margin:0; }
#view-admin-users .team-directory-heading>button { min-height:44px; padding:9px 18px; border-radius:8px; font-family:inherit; font-size:14px; line-height:1.4; font-weight:600; box-shadow:none; }
#view-admin-users .team-directory-heading>button.primary { background:var(--c-accent); color:var(--c-on-accent); border-color:var(--c-accent-border); }
#view-admin-users .team-directory-filters { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,.9fr) minmax(0,1fr) minmax(0,.8fr); gap:12px; margin:22px 0 14px; }
#view-admin-users .team-directory-filters label { min-width:0; }
#view-admin-users .team-directory-filters label>span:first-child { display:block; font-size:14px; font-weight:400; margin-bottom:7px; color:var(--c-text-2); }
#view-admin-users .team-directory-filters :is(input:not(.ui-native-control),select:not(.ui-native-control),.ui-control-trigger) { box-sizing:border-box; width:100%; min-width:0; min-height:44px; font-family:inherit; font-size:14px; line-height:1.4; font-weight:400; padding:10px 12px; border:1px solid var(--c-border-2); border-radius:8px; background:var(--c-surface); color:var(--c-text); }
#view-admin-users .dds-team-count { margin:0 0 12px; font-size:14px; color:var(--c-text-2); }
#view-admin-users .team-directory-list { min-width:0; overflow-x:auto; }
#view-admin-users .team-directory-table { border-collapse:separate; border-spacing:0; width:100%; min-width:0; font-size:14px; border:1px solid var(--c-border); border-radius:8px; overflow:hidden; }
#view-admin-users .team-directory-table thead { background:var(--c-surface-2); }
#view-admin-users .team-directory-table th { padding:12px 16px; text-align:left; font-size:13px; font-weight:500; color:var(--c-text-3); }
#view-admin-users .team-directory-table td { border-top:1px solid var(--c-border-soft); padding:10px 16px; vertical-align:middle; font-size:14px; }
#view-admin-users .team-directory-table .dds-employee-name-link { min-height:28px; padding:2px 0; border:0; background:transparent; color:var(--c-text); text-align:left; font-family:inherit; font-size:14px; line-height:1.4; font-weight:700; cursor:pointer; box-shadow:none; }
#view-admin-users .team-directory-table .team-directory-position { margin:0; font-size:13px; line-height:1.4; color:var(--c-text-3); }
#view-admin-users .team-directory-table :is(.ui-action-button,.dds-small-button) { min-height:36px; padding:7px 12px; margin-top:6px; border-radius:6px; font-family:inherit; font-size:13px; line-height:1.4; font-weight:500; box-shadow:none; }
#view-admin-users .team-directory-stage .employee-stage-badge { font-size:13px; font-weight:400; padding:4px 10px; }
#view-admin-users .team-directory-stage .employee-stage-decision { margin:4px 0 0; font-size:13px; }
#view-admin-users .team-directory-login .team-directory-login-name { margin:3px 0 0; color:var(--c-text-3); font-size:12px; line-height:1.4; }
#view-admin-users .team-directory-access { font-size:14px; color:var(--c-text-2); }
#view-admin-users .team-directory-access::before { content:""; display:inline-block; height:8px; width:8px; background:var(--c-text-3); border-radius:50%; margin-right:8px; vertical-align:middle; }
#view-admin-users .team-directory-access[data-state=active]::before { background:var(--c-success-text); }
#view-admin-users .team-directory-access[data-state=disabled],#view-admin-users .team-directory-access[data-state=expired],#view-admin-users .team-directory-access[data-state=temporary] { color:var(--c-warn-text); }
#view-admin-users .team-directory-archive { display:inline-block; color:var(--c-text-3); font-size:12px; background:var(--c-surface-2); border-radius:5px; padding:3px 6px; }
#view-admin-users .team-directory-empty { text-align:center; padding:36px 12px; color:var(--c-text-3); font-size:14px; }
#view-admin-users .team-directory-notice { margin:10px 0; }
#view-admin-users .team-directory-notice .ui-action-button { min-height:40px; padding:8px 14px; font-family:inherit; font-size:14px; line-height:1.4; font-weight:500; border-radius:8px; }
#view-admin-users :focus-visible { outline:2px solid var(--c-accent); outline-offset:3px; }
#employee-card-layer .dds-profile-details { border:0; padding:0; background:transparent; }
#employee-card-layer .dds-profile-details>div { padding:10px 0; border-bottom:1px solid var(--c-border-soft); }
#employee-card-layer .dds-employee-overview { gap:18px; }
#employee-card-layer .dds-employee-overview h3 { font-size:16px; }
#employee-card-layer .dds-modal-heading>.ui-icon-button { width:40px; height:40px; }
.dds-employee-photo-editor { display:flex; align-items:flex-start; gap:16px; }
.dds-employee-photo-frame { display:flex; flex:0 0 104px; width:104px; height:104px; align-items:center; justify-content:center; border:1px solid var(--c-border); border-radius:10px; background:var(--c-surface-2); overflow:hidden; font-size:12px; }
.dds-employee-photo-image { display:block; width:104px; height:104px; border-radius:10px; object-fit:contain; background:var(--c-surface-2); }
.dds-employee-photo-image[hidden] { display:none; }
.dds-employee-photo-controls { min-width:0; flex:1; }
.dds-employee-photo-controls input[type=file] { max-width:100%; width:100%; min-width:0; padding:7px; font-size:12px; }
.dds-employee-photo-controls button { margin-top:8px; min-height:40px; }
#employee-card-layer .dds-employee-summary dd { overflow-wrap:anywhere; }
@media (max-width:900px) {
 #view-admin-users .team-page-heading { flex-wrap:wrap; gap:8px; }
 #view-admin-users .team-page-heading h1 { font-size:23px; }
 #view-admin-users .dds-team-tabs { display:none; }
 .team-mobile-nav { display:block; margin-bottom:16px; }
 #view-admin-users .team-mobile-nav select { width:100%; min-height:44px; background:var(--c-surface); color:var(--c-text); border:1px solid var(--c-border); border-radius:8px; padding:10px 12px; font:inherit; font-size:14px; font-weight:600; }
 #view-admin-users #admin-users-content { padding:0; border:0; background:transparent; }
 #view-admin-users .team-directory-heading { flex-wrap:wrap; }
 #view-admin-users .team-directory-heading h2 { display:none; }
 #view-admin-users .team-directory-heading>button { width:100%; min-height:44px; }
 #view-admin-users .team-directory-filters { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
 #view-admin-users .team-directory-filters .form-field:first-child { grid-column:1/-1; }
 #view-admin-users .team-directory-table { display:block; border:0; background:transparent; overflow:visible; }
 #view-admin-users .team-directory-table thead { display:none; }
 #view-admin-users .team-directory-table tbody { display:grid; gap:10px; }
 #view-admin-users .team-directory-table tr { display:grid; grid-template-columns:1fr; gap:5px; border:1px solid var(--c-border); border-radius:10px; background:var(--c-surface); padding:12px 14px; }
 #view-admin-users .team-directory-table td { display:block; border:0; padding:0; }
 #view-admin-users .team-directory-table td::before { content:none; }
 #view-admin-users .team-directory-table td[data-label=Руководитель]::before { content:"Руководитель: "; color:var(--c-text-3); font-size:13px; }
 #view-admin-users .team-directory-table .dds-employee-name-link { min-height:40px; font-size:16px; }
 #view-admin-users .team-directory-table .team-directory-position { font-size:13px; }
 #view-admin-users .team-directory-table :is(.ui-action-button,.dds-small-button) { min-height:44px; }
 #view-admin-users .team-directory-table .team-directory-login { margin-top:5px; padding-top:8px; border-top:1px solid var(--c-border-soft); display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
 #view-admin-users .team-directory-login .team-directory-login-name { margin:0; }
 #employee-card-layer .dds-employee-overview { grid-template-columns:1fr; }
 #employee-card-layer .dds-modal-heading h2 { font-size:21px; }
 #employee-card-layer #employee-form-mount .dds-form-grid { grid-template-columns:1fr; }
 .dds-employee-photo-editor { flex-wrap:wrap; gap:12px; }
 .dds-employee-photo-controls { flex-basis:100%; }
}

/* Employee access drawer: shared platform tokens, compact desktop table and mobile cards. */
#employee-card-layer #employee-panel-access { padding-bottom:0; }
.access-login-summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:54px; padding:8px 10px; border:1px solid var(--c-border-soft); border-radius:6px; margin-bottom:12px; }
.access-login-status { display:flex; align-items:center; gap:10px; font-size:13px; line-height:1.45; }
.access-status-dot { width:10px; height:10px; flex:none; border-radius:50%; background:var(--c-text-3); }
.access-login-status.is-allowed .access-status-dot { background:var(--c-success-text); }
.access-login-tools { display:flex; align-items:center; gap:8px; min-width:0; }
.access-login-summary .dds-access-preview-create { padding:0; margin:0; border:0; }
.access-login-summary .dds-access-preview-create>p { display:none; }
.access-login-summary .dds-small-button { min-height:36px; font-size:13px; padding:7px 13px; border-radius:6px; }
.access-login-summary:has(.dds-access-preview-link) { align-items:flex-start; flex-wrap:wrap; }
.access-login-summary:has(.dds-access-preview-link) .access-login-tools { flex:1 1 100%; align-items:flex-start; }
.access-login-summary .dds-access-preview-link { max-width:100%; }
.access-login-options { position:relative; flex:none; }
.access-login-options>summary { display:flex; align-items:center; justify-content:center; width:36px; height:36px; list-style:none; cursor:pointer; border-radius:6px; color:var(--c-text-2); }
.access-login-options>summary::-webkit-details-marker { display:none; }
.access-login-options>summary:hover,.access-login-options[open]>summary { background:var(--c-surface-2); }
#employee-login-actions { position:absolute; top:calc(100% + 8px); right:0; z-index:9; margin:0; padding:14px; width:280px; max-width:calc(100vw - 40px); display:flex; flex-direction:column; gap:10px; background:var(--c-surface); border:1px solid var(--c-border); border-radius:8px; box-shadow:0 10px 30px var(--c-shadow); }
#employee-login-actions .dds-profile-details { display:grid; width:100%; gap:6px; margin:0 0 4px; }
#employee-login-actions .dds-profile-details>div { display:grid; grid-template-columns:80px 1fr; gap:10px; padding:3px 0; border:0; }
#employee-login-actions .dds-profile-details dt,#employee-login-actions .dds-profile-details dd { font-size:12px; font-weight:400; margin:0; }
#employee-login-actions .dds-small-button { width:100%; }
.access-editor { font-size:13px; line-height:1.45; min-width:0; }
.access-editor * { box-sizing:border-box; }
.access-editor h3 { font-size:16px; font-weight:700; margin:0; line-height:1.35; }
.access-editor p { margin:4px 0; overflow-wrap:anywhere; }
.access-editor .dds-muted { font-size:13px; color:var(--c-text-3); }
.access-editor button,.access-editor input,.access-editor select { font:inherit; }
.access-editor button:focus-visible,.access-editor summary:focus-visible,.access-login-options>summary:focus-visible { outline:2px solid var(--c-accent); outline-offset:3px; }
.access-editor .ui-action-button { min-height:38px; padding:8px 13px; border-radius:6px; box-shadow:none; font-weight:400; gap:7px; }
.access-editor .access-link { border:0; background:transparent; color:var(--c-text-2); padding:5px 0; text-align:left; min-height:30px; text-decoration:none; font-size:12px; }
.access-editor .access-link:hover { text-decoration:underline; text-underline-offset:3px; }
.access-editor .ui-icon { width:18px; height:18px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.access-roles { border:1px solid var(--c-border-soft); border-radius:6px; padding:8px 10px; margin:0 0 22px; }
.access-section-heading { display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.access-role-summary { flex:1; display:flex; align-items:baseline; gap:14px; min-width:0; }
.access-role-label { color:var(--c-text-3); font-size:13px; white-space:nowrap; font-weight:400; }
.access-role-names { color:var(--c-text); font-size:13px; font-weight:500; overflow-wrap:anywhere; }
.access-editor button.access-role-names { display:inline-flex; align-items:center; gap:6px; padding:5px 0; min-height:32px; text-align:left; background:transparent; border:0; }
.access-role-names>.ui-icon { width:14px; height:14px; }
.access-role-names[aria-expanded=true]>.ui-icon { transform:rotate(180deg); }
.access-role-controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin-left:auto; }
.access-role-position { display:flex; align-items:baseline; gap:14px; border-right:1px solid var(--c-border-soft); padding-right:24px; margin-right:4px; min-width:0; }
.access-role-position>span:first-child { color:var(--c-text-3); font-size:13px; }
.access-role-help { max-width:640px; }
.access-assignments:empty { display:none; }
.access-assignments[hidden] { display:none; }
.access-assignment-hint { margin-left:12px; font-size:12px; font-weight:400; color:var(--c-text-3); }
.access-assignment { margin-top:8px; padding:9px 10px; background:var(--c-surface-2); border:1px solid var(--c-border-soft); border-radius:6px; }
.access-assignment>summary { font-weight:500; cursor:pointer; min-height:24px; }
.access-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; }
.access-editor-title { padding:0; }
.access-layout { display:grid; grid-template-columns:250px minmax(0,1fr); align-items:start; gap:18px; padding-bottom:18px; }
.access-tree { min-width:0; border-right:1px solid var(--c-border-soft); padding-right:18px; }
.access-navigation { min-width:0; position:sticky; top:0; max-height:calc(100dvh - 210px); overflow:auto; }
.access-editor .access-mobile-menu { display:none; }
.access-editor input:not([type=checkbox]),.access-editor select { width:100%; min-width:0; min-height:38px; color:var(--c-text); background:var(--c-surface); border:1px solid var(--c-border); border-radius:6px; padding:8px 10px; }
.access-editor .ui-control-trigger { min-height:38px; font-size:13px; font-weight:400; padding:8px 11px; border-radius:6px; box-shadow:none; }
.access-editor .ui-control-value { line-height:1.35; }
.access-tree>input,.access-tree-search { margin-bottom:12px; }
.access-tree-search { position:relative; }
.access-tree-search>.ui-icon { position:absolute; left:11px; top:11px; color:var(--c-text-3); pointer-events:none; }
.access-tree-search>input { padding-left:37px!important; min-height:40px!important; }
.access-tree-group>summary { display:flex; align-items:center; gap:10px; cursor:pointer; list-style:none; padding:11px 2px; color:var(--c-text); font-weight:400; }
.access-tree-group>summary { gap:8px; font-size:13px; }
.access-tree-group>summary::-webkit-details-marker { display:none; }
.access-tree-group>summary>.access-tree-chevron { width:14px; height:14px; }
.access-tree-group[open]>summary>.access-tree-chevron { transform:rotate(90deg); color:var(--c-accent-text); }
.access-tree-label { min-width:0; overflow-wrap:anywhere; }
.access-tree-state { margin-left:auto; color:var(--c-text-3); font-size:10px; font-weight:400; flex:none; }
.access-tree-icon { display:inline-flex; align-items:center; flex:none; }
.access-group-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.access-tree-level .access-tree-level { margin-left:20px; }
.access-editor .access-tree-leaf { display:flex; align-items:center; gap:10px; width:100%; padding:8px 10px; margin:1px 0; border:0; text-align:left; line-height:1.4; background:transparent; color:var(--c-text); white-space:normal; border-radius:5px; min-height:36px; }
.access-editor .access-tree-leaf[aria-current=page] { background:color-mix(in srgb,var(--c-accent-soft) 58%,var(--c-surface)); color:var(--c-text); font-weight:500; }
.access-editor .access-tree-leaf:hover { background:var(--c-surface-2); }
.access-resource { min-width:0; }
.access-resource-heading { margin-bottom:14px; }
.access-resource h3 { font-size:16px; }
.access-resource-heading h3>.ui-icon { display:none; }
.access-resource-heading>.dds-muted { font-size:13px; margin-top:4px; }
.access-breadcrumb { display:none; }
.access-editor .access-resource-path { display:none; width:100%; text-align:left; border:0; border-radius:0; background:transparent; }
.access-action-head,.access-action-row { display:grid; grid-template-columns:minmax(115px,.87fr) minmax(165px,1.08fr) minmax(175px,1.2fr); gap:14px; }
.access-action-head { padding:10px 12px; background:var(--c-surface-2); font-size:12px; border-radius:4px 4px 0 0; }
.access-action-row { border-bottom:1px solid var(--c-border-soft); padding:10px 12px; align-items:start; }
.access-action-name { padding-top:9px; font-weight:400; display:flex; align-items:center; gap:9px; overflow-wrap:anywhere; }
.access-personal { min-width:0; }
.access-personal select { font-size:13px; }
.access-result { min-width:0; padding-top:2px; }
.access-result strong { font-weight:500; font-size:13px; }
.access-result p { font-size:13px; }
.access-result p { margin:0; }
.access-result-source p { font-size:12px; }
.access-result-value,.access-result-source { min-width:0; overflow-wrap:anywhere; }
.access-result-source,.access-source { color:var(--c-text-3); font-size:12px; }
.access-result-source { margin-top:4px; }
.access-metric-result-details { margin-top:3px; font-size:12px; color:var(--c-text-3); }
.access-metric-result-details>summary { cursor:pointer; }
.access-metric-result-details>p { font-size:12px; padding-top:4px; }
.access-meta-label { display:block; font-size:12px; color:var(--c-text-3); margin-bottom:4px; }
.access-blocker { color:var(--c-warn-text); }
.access-change-marker { display:inline-block; flex:none; width:8px; height:8px; border-radius:50%; background:var(--c-accent); }
.access-personal-scope { font-size:11px; margin:4px 0 0; }
.access-personal-scope>summary { cursor:pointer; color:var(--c-text-3); overflow-wrap:anywhere; }
.access-personal-scope[open] { padding:8px; border:1px solid var(--c-border-soft); border-radius:6px; background:var(--c-surface-2); }
.access-action-group { border-bottom:1px solid var(--c-border-soft); }
.access-action-group>summary { min-height:42px; display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--c-surface-2); list-style:none; cursor:pointer; font-size:13px; font-weight:600; }
.access-action-group>summary::-webkit-details-marker { display:none; }
.access-action-group>summary>.access-group-chevron { width:15px; height:15px; }
.access-action-group[open]>summary>.access-group-chevron { transform:rotate(90deg); }
.access-action-group-title { display:flex; align-items:center; gap:9px; }
.access-action-group-state { margin-left:auto; font-size:12px; color:var(--c-text-3); font-weight:400; text-align:right; }
.access-overview,.access-note { background:color-mix(in srgb,var(--c-accent-soft) 20%,var(--c-surface)); border:1px solid var(--c-border-soft); color:var(--c-text); border-radius:6px; padding:13px 14px; font-size:13px; line-height:1.6; margin:16px 0 0!important; }
.access-overview { display:flex; align-items:flex-start; gap:12px; }
.access-overview>.ui-icon { width:20px; height:20px; margin-top:2px; }
.access-overview p { margin:0; }
.access-overview-content p { display:inline; }
.access-overview-content p::after { content:' '; }
.access-context-note { font-size:12px; color:var(--c-text-3); margin-top:8px!important; }
.access-field { display:block; margin:12px 0; min-width:0; }
.access-field>span { display:block; font-size:12px; color:var(--c-text-3); margin-bottom:6px; }
.access-scope-editor { margin-top:8px; min-width:0; }
.access-scope-choices { border:1px solid var(--c-border-soft); border-radius:6px; padding:6px 10px; margin-top:8px; max-height:220px; overflow:auto; }
.access-check { display:flex; align-items:flex-start; gap:8px; padding:8px 0; font-size:12px; line-height:1.5; }
.access-check input[type=checkbox] { width:16px; height:16px; flex:none; margin:2px 0 0; accent-color:var(--c-accent-text); }
.access-dates { display:grid; grid-template-columns:1fr; gap:0; }
.access-savebar { position:sticky; z-index:6; bottom:0; display:flex; align-items:center; gap:12px; margin:0 -20px; padding:12px 20px max(16px,env(safe-area-inset-bottom)); background:var(--c-surface); border-top:1px solid var(--c-border-soft); }
.access-save-status { margin-right:auto; flex:1; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.access-save-status strong { font-size:13px; font-weight:500; }
.access-save-status p { flex-basis:100%; max-width:530px; font-size:12px; }
.access-savebar .ui-action-button { min-width:140px; min-height:44px; font-weight:600; }
.access-save-status .access-preview-retry { max-width:100%; min-width:0; white-space:normal; text-align:left; }
.access-error { color:var(--c-danger-text); }
.access-role-rules { margin:16px 0; }
.access-role-rules>details { border-bottom:1px solid var(--c-border-soft); padding:12px 0; }
.access-role-rules summary { cursor:pointer; }
.access-role-actions { position:sticky; bottom:0; display:flex; flex-wrap:wrap; gap:10px; padding:12px 0; background:var(--c-surface); }
.access-role-impact,.access-history-event { padding:12px 0; border-bottom:1px solid var(--c-border-soft); }
.access-history { margin:0 0 16px; font-size:12px; }
.access-history>summary { padding:8px 0; cursor:pointer; color:var(--c-text-3); }
@media (max-width:1100px) {
 .access-layout { grid-template-columns:205px minmax(0,1fr); gap:16px; }
 .access-action-head,.access-action-row { grid-template-columns:minmax(95px,.8fr) minmax(130px,1fr) minmax(140px,1.1fr); gap:10px; }
 .access-role-position { padding-right:14px; }
}
@media (max-width:860px) {
 .access-editor { font-size:13px; }
 .access-login-summary { padding:8px 10px; gap:8px; min-height:60px; }
 .access-login-status { font-size:13px; gap:7px; }
 .access-login-status.is-allowed { color:var(--c-success-text); font-weight:600; }
 .access-login-summary .dds-small-button { padding:8px 10px; min-height:44px; font-size:12px; }
 .access-login-options>summary { width:44px; height:44px; }
 .access-login-tools { gap:2px; }
 #employee-login-actions .dds-small-button { min-height:44px; }
 .access-roles { padding:10px; margin-bottom:22px; }
 .access-section-heading { gap:10px; flex-wrap:nowrap; }
 .access-role-summary { display:block; }
 .access-role-label { display:block; font-size:12px; margin-bottom:3px; }
 .access-role-names { display:block; font-size:13px; }
 .access-editor button.access-role-names { min-height:44px; }
 .access-role-position { display:none; }
 .access-role-controls { gap:6px; }
 .access-role-controls .access-link { font-size:11px; min-height:44px; }
 .access-role-controls .ui-action-button { min-height:44px; padding:8px 10px; white-space:nowrap; }
 .access-assignment>summary,.access-history>summary { min-height:44px; }
 .access-editor-heading { gap:8px; margin-bottom:12px; }
 .access-editor h3.access-editor-title { font-size:16px; }
 .access-editor .access-mobile-menu { display:flex; align-items:center; gap:6px; padding:5px 0; min-height:44px; color:var(--c-text-2); background:transparent; border:0; font-size:13px; white-space:nowrap; }
 .access-layout { display:flex; flex-direction:column; gap:14px; padding-bottom:16px; }
 .access-navigation { width:100%; position:static; max-height:none; overflow:visible; }
 .access-navigation[data-mobile-open=false] { display:none; }
 .access-tree { width:100%; border:1px solid var(--c-border-soft); padding:10px; border-radius:6px; }
 .access-tree-level { width:100%; }
 .access-tree-group>summary,.access-editor .access-tree-leaf { min-height:44px; }
 .access-resource { width:100%; }
 .access-resource-heading { border:1px solid var(--c-border-soft); border-radius:6px; overflow:hidden; margin-bottom:14px; }
 .access-resource-heading>.dds-muted,.access-resource-heading>.access-breadcrumb { display:none; }
 .access-editor .access-resource-path { display:flex; align-items:center; gap:10px; padding:11px 12px; min-height:46px; font-size:13px; }
 .access-resource-path>.ui-icon:last-child { margin-left:auto; }
 .access-resource-heading h3 { display:flex; align-items:center; gap:10px; border-left:4px solid var(--c-accent); padding:12px 10px; font-size:13px; font-weight:500; background:color-mix(in srgb,var(--c-accent-soft) 45%,var(--c-surface)); }
 .access-resource-heading h3>.ui-icon { display:block; }
 .access-actions { border:1px solid var(--c-border-soft); border-radius:7px; overflow:hidden; }
 .access-action-head { display:none; }
 .access-action-row { display:grid; grid-template-columns:1fr; gap:9px; padding:14px; }
 .access-action-row:last-child { border-bottom:0; }
 .access-action-name { padding:0; font-size:13px; font-weight:600; }
 .access-personal .ui-control-trigger,.access-personal select,.access-editor input:not([type=checkbox]) { min-height:44px; font-size:13px; }
 .access-personal>.ui-control { max-width:260px; }
 .access-personal-scope { margin:4px 0 0; font-size:11px; }
 .access-personal-scope>summary { min-height:44px; line-height:44px; }
 .access-result { padding:0; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; margin-top:2px; }
 .access-result-source { border-left:1px solid var(--c-border-soft); padding-left:12px; margin:0; }
 .access-result strong { font-size:13px; font-weight:400; }
 .access-result p { font-size:13px; margin-top:3px; }
 .access-meta-label { display:block; font-size:12px; color:var(--c-text-3); margin-bottom:4px; }
 .access-action-group { border:1px solid var(--c-border-soft); border-radius:6px; margin-top:12px; overflow:hidden; }
 .access-actions>.access-action-group { border:0; border-top:1px solid var(--c-border-soft); border-radius:0; margin-top:0; }
 .access-action-group>summary { min-height:48px; padding:13px; font-size:13px; font-weight:500; background:var(--c-surface); }
 .access-action-group-state { font-size:12px; }
 .access-overview,.access-note { padding:12px; font-size:12px; margin-top:14px!important; }
 .access-check { min-height:44px; align-items:center; font-size:13px; }
 .access-savebar { margin:0 -16px; padding:12px 16px max(12px,env(safe-area-inset-bottom)); display:flex; gap:8px; flex-wrap:wrap; }
 .access-save-status { flex:1; min-width:80px; }
 .access-save-status strong { font-size:12px; }
 .access-save-status .access-change-marker { width:7px; height:7px; }
 .access-save-status .access-preview-retry { min-height:44px; }
 .access-savebar .ui-action-button { min-width:0; min-height:44px; padding:9px 12px; font-size:13px; }
 .access-save-status:has(.access-error) { flex:1 1 100%; }
 .access-savebar:has(.access-error) .ui-action-button { flex:1; }
 .access-dates { grid-template-columns:1fr 1fr; gap:10px; }
 .access-role-actions button { flex:1; }
}
@media (max-width:370px) {
 .access-role-controls { flex-direction:column; align-items:flex-end; gap:0; }
 .access-login-summary .dds-small-button { font-size:11px; padding:8px; }
 .access-login-status { font-size:12px; }
}
.access-metrics-resource { font-size:13px; }
.access-metrics-resource h3 { font-size:18px; }
.access-metrics-resource .access-action-head,.access-metrics-resource .access-action-row { gap:10px; grid-template-columns:minmax(125px,1fr) minmax(145px,1fr) minmax(140px,1fr); padding:7px 8px; }
.access-metrics-resource .access-action-name { padding-top:7px; }
.access-metrics-resource .access-personal select,.access-metrics-resource .ui-control-trigger { min-height:34px; font-size:13px; padding:6px 8px; }
.access-metric-tools { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.access-metric-tools>.ui-action-button { flex:1 1 180px; font-size:12px; }
.access-metric-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 10px; }
.access-metric-filters .access-field { margin:5px 0; }
.access-metric-source { display:block; color:var(--c-text-3); font-size:11px; line-height:1.4; }
.access-metric-preview-filters { display:grid; grid-template-columns:minmax(0,1fr) 160px; gap:10px; }
.access-metric-preview-table { border:1px solid var(--c-border-soft); border-radius:6px; margin:12px 0; overflow:hidden; }
.access-metric-preview-row { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(90px,.8fr) minmax(0,1fr); gap:8px; padding:8px; border-bottom:1px solid var(--c-border-soft); font-size:12px; overflow-wrap:anywhere; }
.access-metric-preview-row:first-child { background:var(--c-surface-2); }
.access-metric-preview-row:last-child { border-bottom:0; }
.access-metric-allowed,.access-metric-denied { align-self:start; padding:2px 6px; border-radius:6px; }
.access-metric-allowed { background:var(--c-success-bg); color:var(--c-success-text); }
.access-metric-denied { background:var(--c-danger-bg); color:var(--c-danger-text); }
.access-metric-policy-summary { border:1px solid var(--c-border-soft); border-radius:6px; padding:10px; margin:12px 0; }
.access-metric-policy-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:10px; padding:5px 0; border-bottom:1px solid var(--c-border-soft); font-size:12px; }
.access-metric-layer { position:fixed; inset:0; z-index:75; display:grid; place-items:center; padding:20px; background:var(--c-overlay-strong); }
.access-metric-dialog { width:min(520px,100%); max-height:calc(100dvh - 40px); overflow:auto; padding:20px; border:1px solid var(--c-border); border-radius:7px; background:var(--c-surface); color:var(--c-text); box-shadow:0 18px 54px var(--c-shadow-strong); }
.access-metric-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.access-metric-dialog h3 { font-size:18px; }
.access-editor .access-metric-close { display:grid; place-items:center; min-width:34px; min-height:34px; padding:0; border:0; background:transparent; color:var(--c-text-2); font-size:24px; }
.access-metric-dialog .access-field { display:grid; grid-template-columns:minmax(95px,.7fr) minmax(0,1fr); align-items:center; gap:8px; margin:7px 0; }
.access-metric-dialog .access-field>span { margin:0; }
.access-metric-dialog .access-metric-filters { grid-template-columns:minmax(0,1fr); }
.access-metric-dialog .access-metric-filters .access-field { margin:4px 0; }
.access-metric-dialog .access-scope-choices { max-height:180px; }
.access-metric-dialog .access-dates { display:block; }
.access-metric-dialog-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; padding-top:14px; margin-top:12px; border-top:1px solid var(--c-border-soft); }
@media (max-width:860px) {
 .access-metrics-resource .access-action-row { grid-template-columns:minmax(0,1fr); padding:12px; }
 .access-metrics-resource .access-personal select,.access-metrics-resource .ui-control-trigger,.access-metric-dialog input:not([type=checkbox]),.access-metric-dialog .ui-control-trigger,.access-metric-dialog .access-metric-close { min-height:44px; }
 .access-metric-layer { padding:12px; }
 .access-metric-dialog { max-height:calc(100dvh - 24px); padding:16px; }
 .access-metric-dialog .access-field { grid-template-columns:minmax(0,1fr); gap:4px; }
 .access-metric-preview-filters,.access-metric-filters { grid-template-columns:minmax(0,1fr); gap:0; }
 .access-metric-preview-row { grid-template-columns:minmax(0,1fr); gap:5px; }
 .access-metric-preview-row:first-child { display:none; }
 .access-metric-dialog-actions>.ui-action-button { min-height:44px; }
 .access-metric-tools>.ui-action-button { min-height:44px; }
}

.access-personal-help { color:var(--c-text-3); font-size:12px!important; line-height:1.45; margin:4px 0 8px!important; }
.access-result-state { display:block; font-size:13px; font-weight:500; }

/* One employee-card shell for all four tabs (DESIGN_SYSTEM 31.9). */
#employee-card-layer { display:flex; justify-content:center; align-items:stretch; padding:20px; }
#employee-card-layer[hidden] { display:none; }
#employee-card-layer .dds-employee-card { width:100%; max-width:none; height:100%; max-height:100%; margin:0; padding:0; display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--c-border); border-radius:8px; font-size:13px; line-height:1.5; }
#employee-card-layer .dds-employee-card-heading { flex:none; align-items:flex-start; padding:16px 20px 10px; gap:12px; margin:0; }
#employee-card-layer .dds-employee-card-heading>div { min-width:0; flex:1; }
#employee-card-layer .dds-employee-card-heading>.ui-icon-button { flex:none; width:44px; height:44px; min-height:44px; margin:0; padding:10px; border:0; background:transparent; box-shadow:none; }
#employee-card-layer .dds-employee-card-heading .dds-eyebrow { margin:0 0 6px; font-size:12px; line-height:1.5; letter-spacing:0; text-transform:none; }
#employee-card-layer #employee-card-title { margin:0; font-size:24px; font-weight:700; line-height:1.25; overflow-wrap:anywhere; }
#employee-card-layer #employee-card-subtitle { margin:5px 0 0; font-size:13px; line-height:1.5; color:var(--c-text-3); }
.employee-heading-identity { display:flex; align-items:center; gap:12px; min-width:0; }
.employee-heading-text { min-width:0; flex:1; }
.dds-employee-profile-avatar { width:48px; height:48px; flex:none; border-radius:50%; overflow:hidden; background:var(--c-surface-2); display:grid; place-items:center; color:var(--c-text-2); font-size:18px; }
.dds-employee-profile-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.employee-heading-state { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; max-width:35%; }
.dds-employee-profile-status { display:inline-flex; align-items:center; gap:7px; font-size:13px; white-space:nowrap; }
.dds-employee-profile-dot { width:7px; height:7px; border-radius:50%; flex:none; background:var(--c-text-3); }
.dds-employee-profile-status.is-active .dds-employee-profile-dot { background:var(--c-success-text); }

#employee-card-layer .dds-employee-tabs { display:flex; flex:none; width:auto; margin:0; padding:0 20px; gap:24px; border:0; border-bottom:1px solid var(--c-border); border-radius:0; background:var(--c-surface); box-shadow:none; justify-content:flex-start; }
#employee-card-layer .dds-employee-tabs [role=tab] { flex:0 0 auto; min-width:72px; min-height:44px; padding:10px 3px; border:0; border-bottom:3px solid transparent; border-radius:0; background:transparent; color:var(--c-text-3); font:inherit; font-size:13px; line-height:20px; box-shadow:none; }
#employee-card-layer .dds-employee-tabs [role=tab][aria-selected=true] { border-bottom-color:var(--c-accent); color:var(--c-text); font-weight:650; }
#employee-card-layer [role=tabpanel] { flex:1; min-height:0; min-width:0; overflow:auto; padding:16px 20px 20px; scrollbar-gutter:stable; font-size:13px; }
#employee-card-layer [role=tabpanel][hidden] { display:none; }
#employee-card-layer [role=tabpanel] h3 { font-size:16px; }
#employee-card-layer #employee-panel-person { display:flex; flex-direction:column; }
#employee-card-layer #employee-panel-access { padding-bottom:0; }
#employee-card-layer #employee-panel-person[hidden], #employee-card-layer .dds-employee-profile[hidden] { display:none; }
#employee-card-layer :is(.dds-small-button,.ui-action-button) { min-height:36px; padding:6px 11px; border:1px solid var(--c-border); border-radius:6px; background:var(--c-surface); color:var(--c-text); font-family:inherit; font-size:13px; font-weight:400; line-height:20px; box-shadow:none; }
#employee-card-layer :is(.dds-small-button,.ui-action-button):hover:not(:disabled) { background:var(--c-surface-2); border-color:var(--c-text-3); }
#employee-card-layer :is(.dds-small-button,.ui-action-button).primary { background:var(--c-accent); border-color:var(--c-accent); color:var(--c-on-accent); font-weight:500; }
#employee-card-layer :is(.dds-small-button,.ui-action-button).primary:hover:not(:disabled) { background:var(--c-accent); border-color:var(--c-accent); filter:brightness(.97); }
#employee-card-layer :is(.dds-small-button,.ui-action-button).danger { color:var(--c-danger-text); border-color:color-mix(in srgb,var(--c-danger-text) 40%,var(--c-border)); }
#employee-card-layer :is(.dds-small-button,.ui-action-button).danger:hover:not(:disabled) { background:var(--c-danger-bg); border-color:var(--c-danger-text); }
#employee-card-layer :is(.dds-small-button,.ui-action-button):disabled { opacity:.5; cursor:default; }
#employee-card-layer :is(input,select,textarea,.ui-control-trigger) { font-size:13px; }
#employee-card-layer :focus-visible { outline:2px solid var(--c-accent); outline-offset:3px; }

.dds-employee-profile { color:var(--c-text); font-size:13px; line-height:1.5; }
#employee-panel-person .dds-employee-profile { display:grid; gap:16px; padding:0 0 18px; min-width:0; }
#employee-panel-person .dds-employee-profile-section { --employee-profile-label-width:clamp(132px,18vw,200px); position:relative; min-width:0; padding:16px 18px; border:1px solid var(--c-border); border-radius:7px; background:var(--c-surface); }
#employee-panel-person .employee-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; margin:0 0 14px; }
#employee-panel-person .dds-employee-profile-section h3 { margin:0; padding:0; border:0; font-size:16px; font-weight:700; line-height:1.4; }
#employee-panel-person .dds-employee-profile-fields { display:grid; grid-template-columns:minmax(0,1fr); row-gap:9px; margin:0; }
#employee-panel-person .dds-employee-profile-field { display:grid; grid-template-columns:var(--employee-profile-label-width) minmax(0,1fr); align-items:start; gap:14px; min-width:0; }
#employee-panel-person .dds-employee-profile-field dt { color:var(--c-text-3); margin:0; font-size:13px; }
#employee-panel-person .dds-employee-profile-field dd { margin:0; overflow-wrap:anywhere; min-width:0; font-size:13px; }
.employee-work-meta,.employee-section-meta { margin:10px 0 0; color:var(--c-text-3); font-size:12px; line-height:1.5; }
.employee-context-actions { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; min-width:0; }
.employee-context-actions:empty,.employee-stage-row-actions:empty { display:none; }
#employee-panel-person .employee-section-heading>.employee-context-actions { flex:none; margin:0; }
#employee-panel-person :is(.dds-small-button,.ui-action-button) { min-height:36px; padding:6px 11px; font-size:13px; }
#employee-card-layer .employee-context-actions>.employee-quiet-action { min-height:32px; padding:5px 7px; border-color:transparent; background:transparent; color:var(--c-info-text); font-size:13px; }
#employee-card-layer .employee-context-actions>.employee-quiet-action:hover:not(:disabled) { background:var(--c-surface-2); text-decoration:underline; }
.employee-stage-badge { display:inline-flex; align-items:center; width:fit-content; max-width:100%; padding:4px 9px; border-radius:6px; color:var(--c-text-2); background:var(--c-surface-2); font-size:12px; font-weight:500; line-height:1.4; }
.employee-stage-badge[data-stage=trainee] { color:var(--c-warn-text); background:var(--c-warn-bg); }
.employee-stage-badge[data-stage=probation] { color:var(--c-info-text); background:var(--c-info-bg); }
.employee-stage-badge[data-stage=regular] { color:var(--c-success-text); background:var(--c-success-bg); }
.employee-stage-decision { color:var(--c-warn-text); font-size:12px; margin:7px 0 0; }
#employee-panel-person .employee-active-stages { display:grid; gap:12px; margin:14px 0 0; padding:14px 0 0; border-top:1px solid var(--c-border-soft); }
#employee-panel-person .employee-active-stages .dds-employee-profile-field { grid-template-columns:minmax(0,1fr) auto; gap:3px 14px; }
#employee-panel-person .employee-active-stages .dds-employee-profile-field>dt { grid-column:1; color:var(--c-text); font-weight:500; }
#employee-panel-person .employee-active-stages .dds-employee-profile-field>dd { grid-column:1; color:var(--c-text-3); }
.employee-stage-row-actions { grid-column:2; grid-row:1/span 2; align-self:center; display:flex; flex-wrap:wrap; gap:8px; }
#employee-panel-person .dds-employee-profile .dds-form-help { padding:0; margin:8px 0 0; background:transparent; border:0; color:var(--c-text-3); font-size:12px; }
#employee-panel-person .employee-overview-schedule { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:14px; margin:14px 0 0; padding:12px 0 0; border-top:1px solid var(--c-border-soft); font-size:13px; }
#employee-panel-person .employee-overview-schedule :is(dt,.employee-schedule-label) { margin:0; color:var(--c-text-3); }
#employee-panel-person .employee-overview-schedule :is(dd,.employee-schedule-value) { min-width:0; margin:0; overflow-wrap:anywhere; }
#employee-panel-person .employee-overview-schedule>.employee-context-actions { margin:0; justify-content:flex-end; }
#employee-panel-person .employee-personnel-menu { position:relative; max-width:100%; }
#employee-panel-person .employee-personnel-trigger { display:flex; align-items:center; justify-content:center; gap:10px; min-height:36px; box-sizing:border-box; padding:6px 11px; border:1px solid var(--c-control-border); border-radius:6px; color:var(--c-text); background:var(--c-surface); font-size:13px; line-height:20px; list-style:none; cursor:pointer; }
#employee-panel-person .employee-personnel-trigger::-webkit-details-marker { display:none; }
#employee-panel-person .employee-personnel-trigger::after { content:''; width:7px; height:7px; flex:none; margin-top:-4px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(45deg); }
#employee-panel-person .employee-personnel-menu[open]>.employee-personnel-trigger { background:var(--c-surface-2); }
#employee-panel-person .employee-personnel-menu[open]>.employee-personnel-trigger::after { margin-top:4px; transform:rotate(225deg); }
#employee-panel-person .employee-personnel-options { position:absolute; top:calc(100% + 6px); right:0; z-index:6; display:flex; flex-direction:column; width:300px; max-width:calc(100vw - 80px); max-height:min(60dvh,420px); overflow:auto; padding:6px; border:1px solid var(--c-border); border-radius:7px; background:var(--c-surface); box-shadow:0 10px 30px var(--c-shadow-strong); }
#employee-panel-person .employee-personnel-options>button { flex:none; display:block; width:100%; min-height:38px; padding:8px 10px; border-color:transparent; border-radius:4px; background:transparent; text-align:left; line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
#employee-panel-person .employee-personnel-options>button:hover:not(:disabled) { border-color:transparent; background:var(--c-surface-2); }
#employee-panel-person .employee-personnel-options>button.danger { border-color:transparent; }
#employee-panel-person .employee-personnel-options>button.danger:hover:not(:disabled) { border-color:transparent; background:var(--c-danger-bg); }
#employee-panel-person .employee-personnel-divider { flex:none; height:0; margin:5px 4px; border:0; border-top:1px solid var(--c-border-soft); }
#employee-panel-person .employee-overview-assignments { min-width:0; margin-top:14px; padding:0 18px; border:1px solid var(--c-border); border-radius:7px; background:var(--c-surface); }
#employee-panel-person .employee-overview-assignments>summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:12px 0; list-style:none; font-size:14px; font-weight:600; cursor:pointer; }
#employee-panel-person .employee-overview-assignments>summary::-webkit-details-marker { display:none; }
#employee-panel-person .employee-overview-assignments>summary::after { content:''; width:8px; height:8px; flex:none; margin-right:3px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); }
#employee-panel-person .employee-overview-assignments[open]>summary::after { margin-top:-5px; transform:rotate(45deg); }
#employee-panel-person .employee-assignment-item { min-width:0; padding:12px 0; border-top:1px solid var(--c-border-soft); }
#employee-panel-person .employee-assignment-context { margin:0 0 9px; color:var(--c-text); font-size:13px; font-weight:600; overflow-wrap:anywhere; }
#employee-panel-person .employee-assignment-item .employee-context-actions { margin-top:8px; }
#employee-panel-person .employee-overview-assignments-error { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:12px 0 0; color:var(--c-text-3); font-size:12px; }


.employee-editor-heading { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:0 0 16px; border-bottom:1px solid var(--c-border-soft); }
.employee-editor-heading h3 { margin:0; font-size:18px; }
.dds-employment-editor .employee-hr-action { padding:16px 18px; margin:16px 0; border:1px solid var(--c-border); border-radius:7px; background:var(--c-surface); }
.dds-employment-frame .employee-hr-action>h3 { display:none; }
.dds-employment-editor .employee-hr-action .dds-form-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.dds-employment-editor .employee-hr-action .form-field { display:grid; grid-template-columns:minmax(170px,1fr) minmax(200px,280px); align-items:center; gap:12px; margin:8px 0; font-size:13px; }
.dds-employment-editor .employee-hr-action .form-field>:is(input,select,.ui-calendar,.ui-control) { min-width:0; width:100%; }
.dds-employment-editor .employee-hr-summary { display:grid; grid-template-columns:minmax(150px,220px) minmax(0,1fr); gap:8px 14px; margin:16px 0; font-size:13px; }
.dds-employment-editor .employee-hr-summary :is(dt,dd) { margin:0; }
.dds-employment-editor .employee-hr-summary dt { color:var(--c-text-3); }
.dds-employment-editor .employee-hr-history { margin:16px 0; padding:12px 0; border-top:1px solid var(--c-border-soft); font-size:13px; }
.dds-employment-editor .employee-hr-history p { margin:8px 0; font-size:12px; color:var(--c-text-3); }
.dds-employment-editor .employee-hr-start-actions { justify-content:flex-end; margin-top:16px; padding-top:12px; border-top:1px solid var(--c-border-soft); }
.dds-employment-editor .employee-hr-tenure { margin:0 0 4px; padding:0; border:0; background:transparent; color:var(--c-text-3); font-size:12px; }
@media(max-width:650px) {
  .dds-employment-editor .employee-hr-action { padding:12px; }
  .dds-employment-editor .employee-hr-action .form-field { grid-template-columns:minmax(0,1fr); gap:5px; }
  .dds-employment-editor .employee-hr-summary { grid-template-columns:minmax(110px,140px) minmax(0,1fr); }
}
.employee-login-management { margin:18px 0; padding:16px; border:1px solid var(--c-border-soft); border-radius:8px; }
.employee-login-management h3 { font-size:18px; margin:0 0 12px; }
.employee-login-management .dds-row-actions { display:flex; flex-wrap:wrap; gap:8px; }
.employee-login-management .dds-profile-details { flex-basis:100%; width:100%; }
#employee-card-layer .employee-login-management>#employee-login-actions { position:static; top:auto; right:auto; z-index:auto; margin:0; padding:0; width:auto; max-width:none; flex-direction:row; background:transparent; border:0; border-radius:0; box-shadow:none; }
#employee-card-layer .employee-login-management #employee-login-actions>.dds-small-button { width:auto; }
#employee-card-layer .employee-login-management #employee-login-actions .dds-profile-details :is(dt,dd) { font-size:13px; }
#employee-card-layer .access-action-name:has(>.dds-form-help) { display:block; min-width:0; }
#employee-card-layer .access-action-name>.dds-form-help { margin:6px 0 0; padding:0; border:0; border-radius:0; background:transparent; color:var(--c-text-3); font-size:12px; font-weight:400; line-height:1.45; }
.employee-history-filters { display:flex; gap:8px; flex-wrap:wrap; margin:0 0 16px; }
#employee-card-layer .employee-history-filters [aria-pressed=true] { background:var(--c-accent-soft); border-color:var(--c-accent-border); color:var(--c-accent-text); }
#employee-card-layer #employee-card-actions { display:flex; flex-direction:column; align-items:stretch; margin:8px 0 18px; gap:12px; }
#employee-card-layer #employee-card-actions:empty,#employee-card-layer #employee-form-mount:empty { display:none; }
#employee-card-layer #employee-profile-actions { position:sticky; bottom:0; z-index:2; display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin:auto -20px 0; padding:12px 20px; border-top:1px solid var(--c-border-soft); background:var(--c-surface); }
#employee-card-layer #employee-profile-actions[hidden] { display:none; }
#employee-card-layer #employee-profile-actions>button { min-width:160px; }

@media (max-width:900px) {
  #employee-card-layer { padding:0; }
  #employee-card-layer .dds-employee-card { border:0; border-radius:0; }
  #employee-card-layer .dds-employee-card-heading { padding:16px 16px 10px; }
  #employee-card-layer #employee-card-title { font-size:24px; }
  #employee-card-layer [role=tabpanel] { padding:16px; }
  #employee-card-layer .dds-employee-tabs { padding-right:16px; padding-left:16px; gap:18px; }
  #employee-card-layer #employee-profile-actions { margin-right:-16px; margin-left:-16px; padding:12px 16px max(12px,env(safe-area-inset-bottom)); }
}
@media (max-width:650px) {
  #employee-card-layer .dds-employee-card-heading .dds-eyebrow { margin-bottom:6px; }
  #employee-card-layer #employee-card-title { font-size:24px; }
  .employee-heading-identity { display:grid; grid-template-columns:44px minmax(0,1fr); gap:6px 10px; }
  .dds-employee-profile-avatar { width:44px; height:44px; font-size:17px; }
  .employee-heading-state { grid-column:2; justify-content:flex-start; max-width:none; gap:8px; }
  .dds-employee-profile-status { font-size:13px; }
  #employee-card-layer .dds-employee-tabs { gap:8px; }
  #employee-card-layer .dds-employee-tabs [role=tab] { flex:1 1 0; min-width:0; padding:10px 0; font-size:13px; white-space:nowrap; }
  #employee-card-layer :is(.dds-small-button,.ui-action-button) { min-height:44px; padding:10px 12px; }
  #employee-card-layer .employee-context-actions>.employee-quiet-action { min-height:44px; }
  #employee-card-layer .access-roles>.access-section-heading { flex-wrap:wrap; }
  #employee-card-layer .access-roles>.access-section-heading>.access-role-summary { flex-basis:100%; }
  #employee-card-layer .access-roles>.access-section-heading>.access-role-controls { margin-left:0; }
  #employee-panel-person .dds-employee-profile { gap:12px; padding-top:0; }
  #employee-panel-person .dds-employee-profile-section { --employee-profile-label-width:104px; padding:14px; }
  #employee-panel-person .employee-section-heading { gap:8px; margin-bottom:12px; }
  #employee-panel-person .dds-employee-profile-section h3 { font-size:16px; }
  #employee-panel-person .dds-employee-profile-field { grid-template-columns:var(--employee-profile-label-width) minmax(0,1fr); gap:10px; }
  #employee-panel-person :is(.dds-small-button,.ui-action-button),#employee-card-layer #employee-panel-person .employee-quiet-action { min-height:44px; }
  #employee-panel-person .employee-section-heading>.employee-context-actions { max-width:64%; }
  #employee-panel-person .employee-section-heading>.employee-context-actions>button { flex:none; }
  #employee-panel-person .employee-active-stages .dds-employee-profile-field { grid-template-columns:minmax(0,1fr); gap:3px; }
  #employee-panel-person .employee-stage-row-actions { grid-column:1; grid-row:auto; justify-self:stretch; margin-top:4px; max-width:100%; }
  #employee-panel-person .employee-stage-row-actions>button { flex:1; min-width:0; white-space:normal; }
  #employee-panel-person .employee-overview-schedule { grid-template-columns:minmax(0,1fr); gap:4px; }
  #employee-panel-person .employee-overview-schedule>.employee-context-actions { justify-content:flex-start; margin-left:calc(var(--employee-profile-label-width) + 3px); }
  #employee-panel-person .employee-personnel-trigger { min-height:44px; gap:8px; padding:8px; font-size:12px; }
  #employee-panel-person .employee-personnel-options { position:fixed; inset:auto 12px max(12px,env(safe-area-inset-bottom)); width:auto; max-width:none; max-height:min(70dvh,460px); padding:8px; border-radius:8px; }
  #employee-panel-person .employee-personnel-options>button { min-height:44px; padding:10px; font-size:13px; }
  #employee-panel-person .employee-overview-assignments { padding:0 14px; }
  #employee-panel-person .employee-assignment-item .employee-context-actions>button { flex:1 1 130px; min-width:0; white-space:normal; }
  #employee-card-layer #employee-profile-actions>button { flex:1; min-width:0; }
  .employee-login-management { padding:12px; }
  .employee-login-management .dds-row-actions>button { flex:1 1 150px; }
  .employee-history-filters { gap:6px; }
  .employee-history-filters button { flex:1 0 auto; }
}

/* Employee history shares the access drawer's flat surfaces and theme tokens. */
.dds-employee-history { min-width:0; color:var(--c-text); font-size:13px; line-height:1.5; }
.dds-employee-history * { box-sizing:border-box; }
.dds-employee-history-heading { margin:0 0 16px; }
.dds-employee-history-heading h2 { margin:0 0 3px; font-size:16px; line-height:1.35; font-weight:700; }
.dds-employee-history-heading p { margin:0; color:var(--c-text-3); font-size:12px; }
.employee-history-salary { margin:0 0 16px; }
.employee-history-salary-body,.employee-history-salary-groups,.employee-history-salary-group { min-width:0; }
.employee-history-salary-group { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; margin-bottom:10px; }
.employee-history-salary-group h3 { margin:0; font-size:16px; }
.dds-employee-history-section { min-width:0; margin:0 0 16px; border:1px solid var(--c-border-soft); border-radius:6px; background:var(--c-surface); }
.dds-employee-history-section:last-child { margin-bottom:0; }
.dds-employee-history-section-heading { display:flex; align-items:center; gap:12px; min-height:48px; padding:11px 16px; border-radius:5px; list-style:none; cursor:pointer; background:var(--c-surface-2); }
.dds-employee-history-section-heading::-webkit-details-marker { display:none; }
.dds-employee-history-section[open]>.dds-employee-history-section-heading { border-radius:5px 5px 0 0; }
.dds-employee-history-section-heading h3 { flex:1; min-width:0; margin:0; font-size:15px; font-weight:650; line-height:1.4; }
.dds-employee-history-section-heading:focus-visible { outline:2px solid var(--c-accent); outline-offset:2px; }
.dds-employee-history-section-heading:hover { color:var(--c-text); background:color-mix(in srgb,var(--c-border-soft) 45%,var(--c-surface-2)); }
.dds-employee-history-icon { width:20px; height:20px; flex:none; }
.dds-employee-history-section-heading>.dds-employee-history-icon:last-child { width:16px; height:16px; transition:transform .15s ease; }
.dds-employee-history-section[open]>.dds-employee-history-section-heading>.dds-employee-history-icon:last-child { transform:rotate(180deg); }
.dds-employee-history-section-body { padding:0 12px; }
.dds-employee-history-event { min-width:0; margin:0; padding:14px 4px; border-bottom:1px solid var(--c-border-soft); }
.dds-employee-history-event:last-child { border-bottom:0; }
.dds-employee-history-event-title { margin:0; font-size:14px; font-weight:650; line-height:1.5; overflow-wrap:anywhere; }
.dds-employee-history-meta { margin:2px 0 0; color:var(--c-text-3); font-size:12px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.dds-employee-history-reason { margin:4px 0 0; color:var(--c-text-2); font-size:13px; overflow-wrap:anywhere; white-space:pre-wrap; }
.dds-employee-history-changes { display:grid; gap:4px; margin:10px 0 0; }
.dds-employee-history-change { display:grid; grid-template-columns:minmax(100px,.85fr) minmax(0,2fr); gap:12px; align-items:start; padding:0; }
.dds-employee-history-field { margin:0; padding:7px 8px; color:var(--c-text-2); overflow-wrap:anywhere; font-size:13px; font-weight:400; }
.dds-employee-history-values { display:grid; grid-template-columns:minmax(0,1fr) 22px minmax(0,1fr); align-items:start; gap:8px; min-width:0; margin:0; font-size:13px; }
.dds-employee-history-before,.dds-employee-history-after { display:block; min-width:0; min-height:34px; padding:7px 10px; border-radius:4px; background:var(--c-surface-2); overflow-wrap:anywhere; white-space:pre-wrap; }
.dds-employee-history-before { color:var(--c-text-2); }
.dds-employee-history-after { color:var(--c-text); }
.dds-employee-history-arrow { display:flex; justify-content:center; align-items:center; min-height:34px; color:var(--c-text-3); }
.dds-employee-history-arrow svg { display:block; width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.dds-employee-history-note { margin:8px 0 0; color:var(--c-text-2); overflow-wrap:anywhere; }
.dds-employee-history-empty { margin:0; padding:16px 4px; color:var(--c-text-3); font-size:13px; }
.dds-employee-history-visually-hidden { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; border:0; }
@media (max-width:600px) {
  .dds-employee-history-heading { margin-bottom:14px; }
  .dds-employee-history-heading h2 { font-size:16px; }
  .dds-employee-history-heading p { font-size:12px; }
  .dds-employee-history-section { margin-bottom:14px; }
  .dds-employee-history-section-heading { gap:10px; padding:11px 12px; }
  .dds-employee-history-section-heading h3 { font-size:15px; }
  .dds-employee-history-section-body { padding:0 12px; }
  .dds-employee-history-event { padding:13px 0; }
  .dds-employee-history-event-title { font-size:14px; }
  .dds-employee-history-meta { font-size:12px; }
  .dds-employee-history-change { grid-template-columns:minmax(120px,.9fr) minmax(0,1.7fr); gap:1px; background:var(--c-surface); }
  .dds-employee-history-field { align-self:stretch; padding:8px; border-radius:4px 0 0 4px; background:var(--c-surface-2); font-size:12px; }
  .dds-employee-history-values { display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 6px; min-height:34px; height:100%; padding:8px; border-radius:0 4px 4px 0; background:var(--c-surface-2); font-size:12px; }
  .dds-employee-history-before,.dds-employee-history-after { min-height:0; max-width:100%; padding:0; border-radius:0; background:transparent; }
  .dds-employee-history-arrow { display:inline-flex; min-height:0; flex:none; align-self:baseline; }
  .dds-employee-history-arrow svg { width:13px; height:13px; }
}
@media (prefers-reduced-motion:reduce) {
  .dds-employee-history-section-heading>.dds-employee-history-icon:last-child { transition:none; }
}

.wf-organization-workspace { min-width:0; max-width:100%; padding:16px; border:1px solid var(--c-border); border-radius:8px; background:var(--c-surface); color:var(--c-text); font:13px/1.5 "Noto Sans","Segoe UI",sans-serif; }
.wf-organization-heading h2 { margin:0; font-size:24px; }
.wf-organization-filters { display:flex; flex-wrap:wrap; gap:12px 24px; margin:12px 0; }
.wf-organization-filters .form-field { display:grid; grid-template-columns:auto minmax(160px,300px); gap:12px; align-items:center; min-width:0; margin:0; }
.wf-organization-workspace input,.wf-organization-workspace select { box-sizing:border-box; width:100%; min-width:0; min-height:36px; padding:6px 10px; border:1px solid var(--c-control-border); border-radius:6px; background:var(--c-surface); color:var(--c-text); font:inherit; }
.wf-organization-workspace .ui-action-button { min-height:36px; }
.wf-organization-workspace .ui-control-trigger { min-height:36px; padding:6px 10px; font-size:13px; }
.wf-organization-list { min-width:0; max-width:100%; }
.wf-organization-table { width:100%; min-width:0; max-width:100%; table-layout:fixed; border-collapse:collapse; font-size:13px; }
.wf-organization-table th,.wf-organization-table td { padding:6px 10px; border-bottom:1px solid var(--c-border-soft); text-align:left; overflow-wrap:anywhere; background:transparent; }
.wf-organization-table thead th { background:var(--c-surface-2); color:var(--c-text-2); font-size:12px; font-weight:600; }
.wf-organization-table tbody th,.wf-organization-table tbody td { font-size:13px; white-space:normal; }
.wf-organization-table tbody tr:last-child>* { border-bottom:0; }
.wf-organization-table .wf-organization-name { font-weight:400; }
.wf-organization-table .wf-organization-open { display:block; width:100%; min-width:0; min-height:28px; padding:2px 0; text-align:left; white-space:normal; overflow-wrap:anywhere; border:0; border-radius:3px; background:transparent; box-shadow:none; color:var(--c-info-text); font:inherit; }
.wf-organization-table tr.is-selected { background:var(--c-accent-soft); }
.wf-organization-table tr.is-selected .wf-organization-open { font-weight:600; color:var(--c-text); }
.wf-organization-open:hover { text-decoration:underline; }
.wf-organization-metadata { display:grid; grid-template-columns:110px minmax(0,1fr); gap:4px 12px; margin:0 0 14px; padding-bottom:14px; border-bottom:1px solid var(--c-border-soft); }
.wf-organization-metadata dt { color:var(--c-text-2); }
.wf-organization-metadata dd { margin:0; overflow-wrap:anywhere; }
.wf-organization-help { margin:8px 0 0; color:var(--c-text-3); font-size:12px; }
.wf-organization-empty { margin:0; padding:20px 12px; color:var(--c-text-3); }
.wf-organization-workspace :focus-visible { outline:2px solid var(--c-accent); outline-offset:3px; }
@media(max-width:760px) {
 .wf-organization-workspace { padding:14px; }
 .wf-organization-filters { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
 .wf-organization-filters .form-field { grid-template-columns:64px minmax(0,1fr); }
 .wf-organization-workspace input,.wf-organization-workspace select,.wf-organization-workspace .ui-action-button,.wf-organization-open { min-height:44px!important; }
 .wf-organization-workspace .ui-control-trigger { min-height:44px; padding:8px 10px; }
}

/* Scoped implementation of the approved vacation screens. Shared shell is untouched. */
.vacation-ui { --v-tint: color-mix(in srgb, var(--c-accent-soft) 34%, var(--c-surface)); font-size:13px; line-height:1.5; min-width:0; }
.vacation-ui * { box-sizing:border-box; }
#team-vacations-content.vacation-ui { background:var(--c-surface); border:1px solid var(--c-border); border-radius:10px; padding:18px; }
@media(max-width:900px) { #team-vacations-content.vacation-ui { padding:0; border:0; background:transparent; } }
.vacation-ui h1,.vacation-ui h2,.vacation-ui h3,.vacation-ui p { margin:0; }
.vacation-ui h1 { font-size:26px; font-weight:700; line-height:1.3; letter-spacing:-.6px; }
.vacation-ui h2 { font-size:22px; font-weight:700; line-height:1.35; letter-spacing:-.3px; }
.vacation-ui h3 { font-size:15px; font-weight:600; line-height:1.4; }
.vacation-ui .v-muted { color:var(--c-text-3); }
.vacation-ui .v-small { font-size:12px; }
.vacation-ui .v-success { color:var(--c-success-text); }
.vacation-ui .v-warning { color:var(--c-warn-text); }
.vacation-ui .v-number { font-variant-numeric:tabular-nums; }
.vacation-ui .v-icon { display:inline-block; width:18px; height:18px; flex:none; vertical-align:middle; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.vacation-ui .v-btn { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:8px 12px; background:var(--c-surface); border:1px solid var(--c-border); border-radius:8px; color:var(--c-text); font:inherit; font-weight:500; line-height:1.35; cursor:pointer; box-shadow:none; text-decoration:none; white-space:nowrap; }
.vacation-ui .v-btn:hover { background:var(--c-surface-2); border-color:var(--c-border-2); }
.vacation-ui .v-btn.primary { background:var(--c-accent); border-color:var(--c-accent); color:var(--c-on-accent); font-weight:600; }
.vacation-ui .v-btn.primary:hover { border-color:var(--c-accent-border); }
.vacation-ui .v-btn.icon-only { width:40px; flex:0 0 40px; padding:0; }
.vacation-ui .v-btn.compact { min-height:34px; padding:6px 10px; font-size:12px; }
.vacation-ui .v-btn.text { padding:4px 0; border:0; background:transparent; min-height:32px; color:var(--c-text-2); }
.vacation-ui .v-btn.text:hover { color:var(--c-text); }
.vacation-ui .v-btn.text .v-icon { width:15px; height:15px; }
.vacation-ui .v-status { display:inline-flex; align-items:center; gap:5px; font-size:12px; line-height:1.4; white-space:normal; }
.vacation-ui .v-status .v-icon { width:15px; height:15px; }
.vacation-ui .v-tag { display:inline-flex; align-items:center; gap:5px; font-size:12px; padding:3px 7px; border-radius:5px; background:var(--c-surface-2); color:var(--c-text-2); }
.vacation-ui .v-tag.good { color:var(--c-success-text); background:var(--c-success-bg); }
.vacation-ui .v-tag.wait { color:var(--c-warn-text); background:var(--c-warn-bg); }
.vacation-ui .v-field { display:grid; gap:6px; min-width:0; }
.vacation-ui .v-field > label,.vacation-ui .v-field > span:first-child { font-size:12px; color:var(--c-text-2); }
.vacation-ui .v-field input:not(.ui-native-control),.vacation-ui .v-field textarea { min-height:40px; padding:9px 11px; border:1px solid var(--c-border); border-radius:8px; font-size:13px; background:var(--c-input-bg); box-shadow:none; }
.vacation-ui .v-field textarea { min-height:78px; resize:none; }
.vacation-ui .ui-control-trigger { min-height:40px; padding:9px 11px; border-color:var(--c-border); border-radius:8px; font-size:13px; box-shadow:none; }
.vacation-ui .ui-control-trigger[aria-expanded=true],.vacation-ui .ui-control-trigger:focus-visible { border-color:var(--c-accent-border); box-shadow:0 0 0 3px var(--c-focus); }
.vacation-ui .v-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:14px; }
.vacation-ui .v-toolbar h2 { margin-right:auto; white-space:nowrap; }
.vacation-ui .v-toolbar .v-year { width:105px; }
.vacation-ui .v-toolbar .v-direction { width:208px; }
.vacation-ui .v-toolbar .v-search { flex:1; max-width:290px; }
.vacation-ui .v-search { position:relative; min-width:0; }
.vacation-ui .v-search > .v-icon { position:absolute; left:11px; top:11px; color:var(--c-text-3); }
.vacation-ui .v-search input { padding-left:36px!important; }
.vacation-ui .v-balance-context { display:flex; align-items:center; flex-wrap:wrap; gap:10px 20px; margin:0 0 13px; color:var(--c-text-3); font-size:12px; }
.vacation-ui .v-balance-context > span:first-child { color:var(--c-text-2); }
.vacation-ui .v-table-wrap { width:100%; border:1px solid var(--c-border-soft); border-radius:9px; overflow:hidden; background:var(--c-surface); }
.vacation-ui .v-table { width:100%; min-width:0; border-collapse:separate; border-spacing:0; table-layout:fixed; font-size:13px; font-variant-numeric:tabular-nums; }
.vacation-ui .v-table thead { background:var(--c-surface-2); }
.vacation-ui .v-table th { font-size:12px; font-weight:400; color:var(--c-text-3); text-align:left; padding:12px; }
.vacation-ui .v-table td { border-top:1px solid var(--c-border-soft); padding:16px 12px; vertical-align:middle; }
.vacation-ui .v-table td,.vacation-ui .v-table th { overflow-wrap:normal; }
.vacation-ui .v-table td { font-size:13px; border-bottom:0; }
.vacation-ui .v-table th { border-bottom:0; white-space:normal; }
.vacation-ui .v-table tbody tr:hover { background:var(--c-surface-2); }
.vacation-ui .v-table .v-employee-col { width:29%; }
.vacation-ui .v-table .v-opening-col { width:20%; }
.vacation-ui .v-table .v-value-col { width:12%; text-align:right; }
.vacation-ui .v-table .v-action-col { width:15%; text-align:right; }
.vacation-ui .v-employee-name { display:block; border:0; background:none; padding:0; color:var(--c-text); font-size:14px; font-weight:650; line-height:1.45; text-align:left; cursor:pointer; }
.vacation-ui .v-person-meta { color:var(--c-text-3); display:block; margin-top:4px; font-size:12px; }
.vacation-ui .v-value { font-size:14px; font-weight:500; white-space:nowrap; }
.vacation-ui .v-value.available { font-size:17px; font-weight:700; }
.vacation-ui .v-subvalue { display:block; margin-top:4px; font-size:12px; font-weight:400; color:var(--c-text-3); line-height:1.45; }
.vacation-ui .v-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.vacation-ui .v-note { display:flex; align-items:flex-start; gap:7px; font-size:12px; color:var(--c-text-3); line-height:1.5; }
.vacation-ui .v-note .v-icon { width:15px; height:15px; margin-top:2px; }
.vacation-ui .v-footer-note { display:flex; gap:12px; align-items:center; justify-content:space-between; margin-top:12px; }
.vacation-ui .v-mobile-list { display:none; }
.vacation-ui .v-filter-panel { display:flex; gap:12px; padding:12px; border:1px solid var(--c-border-soft); border-radius:9px; margin-bottom:12px; }
.vacation-ui .v-filter-panel .v-field { flex:1; }
/* The actual native team wrapper is retained, including its tabs. */
/* Contextual views use the existing right-side editing pattern. */
.v-drawer.vacation-ui[open] { display:flex; flex-direction:column; height:100dvh; max-height:100dvh; width:480px; max-width:100%; background:var(--c-surface); border-left:1px solid var(--c-border); border-radius:0; }
.v-drawer.detail-drawer { width:760px; }
.v-drawer.request-drawer { width:600px; }
.vacation-ui .v-drawer-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 24px 16px; border-bottom:1px solid var(--c-border-soft); flex:none; }
.vacation-ui .v-drawer-header h2 { font-size:22px; }
.vacation-ui .v-drawer-header .v-btn { flex:none; }
.vacation-ui .v-drawer-body { flex:1; min-height:0; overflow:auto; padding:20px 24px; }
.vacation-ui .v-drawer-footer { display:flex; gap:10px; align-items:center; justify-content:flex-end; padding:16px 24px max(16px,env(safe-area-inset-bottom)); border-top:1px solid var(--c-border-soft); background:var(--c-surface); flex:none; }
.vacation-ui .v-drawer-footer .primary { flex:1; }
.vacation-ui .v-person-strip { margin-bottom:20px; }
.vacation-ui .v-person-strip strong { display:block; font-size:16px; font-weight:650; line-height:1.5; }
.vacation-ui .v-person-strip p { font-size:12px; color:var(--c-text-3); margin-top:4px; }
.vacation-ui .v-slim-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border:1px solid var(--c-border-soft); border-radius:9px; overflow:hidden; margin-bottom:20px; }
.vacation-ui .v-slim-summary.four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.vacation-ui .v-slim-summary > div { padding:12px; position:relative; min-width:0; }
.vacation-ui .v-slim-summary > div + div::before { content:''; position:absolute; left:0; top:13px; bottom:13px; width:1px; background:var(--c-border-soft); }
.vacation-ui .v-slim-summary span { display:block; font-size:12px; color:var(--c-text-2); }
.vacation-ui .v-slim-summary strong { display:block; font-size:20px; font-weight:650; margin-top:4px; line-height:1.4; font-variant-numeric:tabular-nums; }
.vacation-ui .v-slim-summary > div:last-child { background:var(--v-tint); }
.vacation-ui .v-form-stack { display:grid; gap:18px; }
.vacation-ui .v-form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.vacation-ui .v-field-help { font-size:12px; color:var(--c-text-3); line-height:1.5; margin-top:0; }
.vacation-ui .v-section-rule { border-top:1px solid var(--c-border-soft); padding-top:16px; margin-top:18px; }
.vacation-ui .v-section-rule h3 { margin-bottom:12px; }
.vacation-ui .v-result { padding:13px 14px; border:1px solid var(--c-border-soft); border-radius:9px; margin-top:18px; background:var(--c-surface-2); }
.vacation-ui .v-result-line { display:flex; gap:12px; justify-content:space-between; align-items:center; }
.vacation-ui .v-result-line strong { font-size:17px; font-variant-numeric:tabular-nums; }
.vacation-ui .v-result p { font-size:12px; margin-top:6px; color:var(--c-text-3); }
.vacation-ui .v-form-message { display:flex; align-items:flex-start; gap:8px; padding:12px 0; font-size:12px; }
.vacation-ui .v-form-message .v-icon { width:16px; height:16px; margin-top:2px; }
.vacation-ui .v-check-row { display:flex; align-items:flex-start; gap:8px; font-size:13px; }
.vacation-ui .v-check-row input { width:16px; min-width:16px; height:16px; min-height:16px; margin:3px 0 0; accent-color:var(--c-accent); padding:0; }
.vacation-ui .v-check-row span { flex:1; }
.vacation-ui .v-detail-meta { display:flex; flex-wrap:wrap; align-items:center; gap:7px 16px; margin:0 0 20px; }
.vacation-ui .v-detail-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; }
.vacation-ui .v-ledger th { padding:11px 12px; }
.vacation-ui .v-ledger td { padding:15px 12px; }
.vacation-ui .v-ledger .period { width:30%; }
.vacation-ui .v-ledger .source { width:38%; }
.vacation-ui .v-ledger .number { width:16%; text-align:right; }
.vacation-ui .v-ledger strong { font-weight:600; }
.vacation-ui .v-ledger .v-status { margin-top:5px; }
.vacation-ui .v-mobile-ledger { display:none; }
.vacation-ui details { border-top:1px solid var(--c-border-soft); margin-top:18px; padding-top:13px; }
.vacation-ui summary { display:flex; align-items:center; gap:7px; list-style:none; font-size:13px; cursor:pointer; min-height:32px; }
.vacation-ui summary::-webkit-details-marker { display:none; }
.vacation-ui details summary .v-icon { width:15px; height:15px; }
.vacation-ui details[open] summary .v-icon { transform:rotate(90deg); }
.vacation-ui details p { margin-top:8px; font-size:12px; color:var(--c-text-3); }
.vacation-ui .v-date-list { display:flex; flex-wrap:wrap; gap:5px; margin-top:10px; }
.vacation-ui .v-date-list span { padding:4px 7px; border:1px solid var(--c-border-soft); border-radius:5px; font-size:12px; color:var(--c-text-2); background:var(--c-surface); }
/* Timesheet composition is a real month grid with its native cells. */
.vacation-ui .v-page-toolbar { display:flex; align-items:center; gap:10px; margin:0 0 16px; }
.vacation-ui .v-page-toolbar h1 { margin-right:8px; }
.vacation-ui .v-page-toolbar .v-field { width:190px; }
.vacation-ui .v-page-toolbar .v-field.direction { width:225px; }
.vacation-ui .v-page-toolbar > .v-btn:first-of-type { margin-left:auto; }
.vacation-ui .v-inline-meta { display:flex; gap:16px; align-items:center; margin:0 0 14px; color:var(--c-text-3); font-size:12px; }
.vacation-ui .v-sheet-label { display:flex; align-items:center; gap:6px; }
.vacation-ui .v-mini-table { width:100%; min-width:0; font-size:13px; border-collapse:collapse; margin-top:13px; font-variant-numeric:tabular-nums; }
.vacation-ui .v-mini-table th { text-align:left; font-size:12px; font-weight:400; color:var(--c-text-3); padding:8px 0; border-bottom:1px solid var(--c-border-soft); }
.vacation-ui .v-mini-table th:not(:first-child),.vacation-ui .v-mini-table td:not(:first-child) { text-align:right; }
.vacation-ui .v-mini-table td { padding:10px 0; border-bottom:1px solid var(--c-border-soft); }
.vacation-ui .v-mini-table td { font-size:13px; }
.vacation-ui .v-mini-table tr:last-child td { border:0; }
.vacation-ui .v-mini-table td:last-child { font-weight:650; }
.vacation-ui .v-timeline-step { display:flex; gap:8px; padding:9px 0; font-size:12px; color:var(--c-text-2); }
.vacation-ui .v-timeline-step .v-icon { width:16px; height:16px; color:var(--c-success-text); }
.vacation-ui .v-timesheet-mobile { display:none; }
.vacation-ui .v-request-check { display:grid; gap:0; border-top:1px solid var(--c-border-soft); margin-top:20px; }
.vacation-ui .v-request-check h3 { margin:17px 0 7px; }
.vacation-ui .v-check-line { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--c-border-soft); }
.vacation-ui .v-check-line strong { font-weight:600; font-variant-numeric:tabular-nums; }
.vacation-ui .v-check-line:last-child { border:0; }
.vacation-ui .v-matched-day { margin:11px 0 0; padding:12px 14px; background:var(--c-surface-2); border:1px solid var(--c-border-soft); border-radius:9px; }
.vacation-ui .v-matched-day > div { display:flex; align-items:center; gap:8px; }
.vacation-ui .v-matched-day .v-icon { width:16px; height:16px; }
.vacation-ui .v-matched-day p { margin-top:5px; font-size:12px; color:var(--c-text-3); }
.vacation-ui .v-vacation-row { display:flex; align-items:center; gap:20px; padding:16px; border-bottom:1px solid var(--c-border-soft); }
.vacation-ui .v-vacation-row:last-child { border:0; }
.vacation-ui .v-vacation-row > div:first-child { flex:1; }
.vacation-ui .v-vacation-row strong { display:block; font-size:14px; font-weight:600; }
.vacation-ui .v-vacation-row p { font-size:12px; margin-top:4px; color:var(--c-text-3); }
.vacation-ui .v-vacation-row > .v-number { min-width:100px; }
.vacation-ui .v-demo-caption { margin-top:12px; text-align:right; color:var(--c-text-3); font-size:11px; }
.vacation-ui .v-optional-comment { margin:0; border:0; padding:0; }
.vacation-ui .v-optional-comment summary { color:var(--c-text-3); min-height:32px; }
.vacation-ui .v-optional-comment .v-field { margin-top:8px; }
@media(max-width:1000px) {
  .vacation-ui .v-toolbar { flex-wrap:wrap; }
  .vacation-ui .v-toolbar h2 { flex:1 1 100%; }
}
@media(max-width:768px) {
  .vacation-ui h1 { font-size:23px; }
  .vacation-ui h2 { font-size:22px; }
  .vacation-ui .v-btn { min-height:44px; }
  .vacation-ui .v-btn.icon-only { width:44px; flex-basis:44px; }
  .vacation-ui .v-btn.compact { min-height:44px; padding:8px 10px; font-size:13px; }
  .vacation-ui .v-btn.text { min-height:44px; }
  .vacation-ui .ui-control-trigger { min-height:44px; }
  .vacation-ui .v-field input:not(.ui-native-control),.vacation-ui .v-field textarea { min-height:44px; font-size:16px; }
  .vacation-ui .v-toolbar h2 { display:none; }
  .vacation-ui .v-toolbar { display:grid; grid-template-columns:100px minmax(0,1fr) 44px; gap:10px; margin-bottom:12px; }
  .vacation-ui .v-toolbar .v-year { width:auto; }
  .vacation-ui .v-toolbar .v-direction { display:none; }
  .vacation-ui .v-toolbar.filters-open .v-direction { display:grid; grid-column:1 / -1; grid-row:3; width:auto; }
  .vacation-ui .v-toolbar .v-search { width:auto; max-width:none; grid-row:2; grid-column:1 / 3; }
  .vacation-ui .v-toolbar .v-search input { font-size:14px; }
  .vacation-ui .v-toolbar > .v-btn { grid-column:3; grid-row:2; }
  .vacation-ui .v-toolbar::after { content:'28 дней в год · без переноса'; grid-column:2 / 4; grid-row:1; color:var(--c-text-3); font-size:12px; text-align:right; }
  .vacation-ui .v-balance-context { gap:8px 12px; margin-bottom:12px; }
  .vacation-ui .v-balance-context > span:first-child { display:none; }
  .vacation-ui .v-desktop-balances { display:none; }
  .vacation-ui .v-mobile-list { display:grid; gap:12px; }
  .vacation-ui .v-person-card { padding:14px; border:1px solid var(--c-border-soft); border-radius:10px; background:var(--c-surface); }
  .vacation-ui .v-person-card .v-employee-name { font-size:16px; font-weight:650; }
  .vacation-ui .v-person-card .v-person-meta { font-size:12px; }
  .vacation-ui .v-card-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-top:14px; gap:10px; padding:12px 0; border-top:1px solid var(--c-border-soft); border-bottom:1px solid var(--c-border-soft); }
  .vacation-ui .v-card-values span { display:block; color:var(--c-text-3); font-size:12px; }
  .vacation-ui .v-card-values strong { display:block; font-size:20px; font-weight:650; margin-top:4px; font-variant-numeric:tabular-nums; }
  .vacation-ui .v-card-opening { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 0 7px; }
  .vacation-ui .v-card-opening .v-subvalue { margin-top:3px; }
  .vacation-ui .v-card-opening .v-btn { border:0; padding:0 4px; min-width:44px; }
  .vacation-ui .v-card-opening .v-btn .v-icon { width:17px; height:17px; }
  .vacation-ui .v-card-bottom .v-btn { width:100%; justify-content:space-between; }
  .vacation-ui .v-card-warning { font-size:12px; line-height:1.5; margin-top:9px; color:var(--c-warn-text); }
  .vacation-ui .v-footer-note { display:block; }
  .vacation-ui .v-footer-note > .v-btn { margin-top:6px; }
  .v-drawer.vacation-ui,.v-drawer.detail-drawer,.v-drawer.request-drawer { width:100%; border:0; }
  .vacation-ui .v-drawer-header { min-height:64px; padding:10px 16px; }
  .vacation-ui .v-drawer-header h2 { font-size:22px; }
  .vacation-ui .v-drawer-body { padding:18px 16px; }
  .vacation-ui .v-drawer-footer { padding:12px 16px max(16px,env(safe-area-inset-bottom)); }
  .vacation-ui .v-person-strip { margin-bottom:16px; }
  .vacation-ui .v-person-strip strong { font-size:16px; }
  .vacation-ui .v-slim-summary { margin-bottom:18px; }
  .vacation-ui .v-slim-summary > div { padding:10px; }
  .vacation-ui .v-slim-summary strong { font-size:20px; }
  .vacation-ui .v-slim-summary.four { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .vacation-ui .v-slim-summary.four > div:first-child { display:none; }
  .vacation-ui .v-slim-summary.four > div:nth-child(2)::before { display:none; }
  .vacation-ui .v-detail-meta { gap:6px 12px; margin-bottom:16px; }
  .vacation-ui .v-detail-heading h3 { font-size:15px; }
  .vacation-ui .v-desktop-ledger { display:none; }
  .vacation-ui .v-mobile-ledger { display:grid; }
  .vacation-ui .v-ledger-item { padding:14px 0; border-top:1px solid var(--c-border-soft); }
  .vacation-ui .v-ledger-item:first-child { padding-top:0; border:0; }
  .vacation-ui .v-ledger-item .v-ledger-item-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
  .vacation-ui .v-ledger-item .v-ledger-item-head strong { font-weight:600; }
  .vacation-ui .v-ledger-item p { color:var(--c-text-3); font-size:12px; margin-top:4px; }
  .vacation-ui .v-ledger-item .v-status { margin-top:6px; }
  .vacation-ui .v-form-stack { gap:16px; }
  .vacation-ui .v-form-row { grid-template-columns:1fr; gap:16px; }
  .vacation-ui .v-page-toolbar { flex-wrap:wrap; gap:10px; }
  .vacation-ui .v-page-toolbar h1 { flex:1 1 calc(100% - 54px); margin-right:0; }
  .vacation-ui .v-page-toolbar .v-field { order:1; width:calc(50% - 5px); }
  .vacation-ui .v-page-toolbar .v-field.direction { width:calc(50% - 5px); }
  .vacation-ui .v-page-toolbar > .v-btn:first-of-type { margin:0; }
  .vacation-ui .v-page-toolbar > .v-btn:last-child:not(:first-of-type) { display:none; }
  .vacation-ui .v-inline-meta { flex-wrap:wrap; gap:8px 12px; }
  .vacation-ui .v-timesheet-mobile { display:block; }
  .vacation-ui .v-vacation-row { flex-wrap:wrap; gap:12px; }
  .vacation-ui .v-vacation-row > div:first-child { flex-basis:100%; }
  .vacation-ui .v-vacation-row > .v-number { min-width:0; margin-right:auto; }
  .vacation-ui .v-demo-caption { text-align:left; }
  .vacation-ui .v-opening-form { gap:12px; }
  .vacation-ui .v-opening-form textarea { min-height:64px; }
  .vacation-ui .v-opening-result { margin-top:16px; }
  .vacation-ui .v-opening-result p { margin-top:4px; }
  .vacation-ui .v-opening-extra { display:none; }
  .vacation-ui .v-request-check { margin-top:12px; }
  .vacation-ui .v-request-check h3 { margin-top:14px; }
  .vacation-ui .v-request-check .v-check-line { padding:9px 0; }
  .vacation-ui .v-ledger-item { padding:11px 0; }
  .vacation-ui .v-detail-meta { margin-bottom:12px; }
  .vacation-ui .v-ledger-item p:last-child { margin-top:3px; }
  .vacation-ui .v-detail-extra { display:none; }
  .detail-drawer.vacation-ui .v-drawer-body { padding-top:16px; padding-bottom:14px; }
  .detail-drawer.vacation-ui .v-ledger-item { padding:10px 0; }
  .request-drawer.vacation-ui .v-drawer-body { padding-bottom:10px; }
  .request-drawer.vacation-ui .v-demo-caption { display:none; }
}
/* Native dialogs preserve the browser top layer, inert background and platform pickers. */
.vacation-ui [hidden] { display:none !important; }
dialog.v-drawer { position:fixed; inset:0 0 0 auto; margin:0 0 0 auto; padding:0; max-width:100%; max-height:100dvh; overflow:hidden; color:var(--c-text); font:inherit; }
dialog.v-drawer:not([open]) { display:none; }
dialog.v-drawer::backdrop { background:var(--c-overlay-soft); }
.vacation-ui .v-drawer-form { display:flex; flex-direction:column; height:100%; min-height:0; margin:0; }
.vacation-ui .v-drawer-form > .v-drawer-body { flex:1; }
.vacation-ui .v-drawer-footer > .dds-field-note { flex-basis:100%; font-size:11px; color:var(--c-text-3); }
.vacation-ui .v-field > span:first-child { font-size:12px; font-weight:400; color:var(--c-text-2); }
.vacation-ui .v-toolbar .v-field > span:first-child { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }
.vacation-ui .v-field select:not(.ui-native-control) { min-height:40px; border:1px solid var(--c-border); border-radius:8px; padding:9px 11px; font-size:13px; }
.vacation-ui .v-toolbar .v-icon-only { width:40px; padding:0; }
.vacation-ui .v-table .v-employee-name { min-height:0; box-shadow:none; }
.vacation-ui .v-ledger .v-number { font-size:14px; font-weight:600; }
.vacation-ui .v-detail-loading { padding:20px 0; color:var(--c-text-3); }
.vacation-ui .v-details-empty { padding:16px 0; color:var(--c-text-3); font-size:12px; }
.vacation-ui .v-source-audit { margin-top:10px; font-size:11px; color:var(--c-text-3); overflow-wrap:anywhere; }
.vacation-ui .v-source-audit p { margin-top:6px; }
.vacation-ui .v-table .v-action-col .v-btn { flex-shrink:0; }
.vacation-ui .v-slim-summary.four > div { padding:10px; }
.vacation-ui .v-drawer-footer { flex-wrap:wrap; }
@media(max-width:768px) { .vacation-ui .v-field select:not(.ui-native-control) { min-height:44px; } dialog.v-drawer { inset:0; } }
