/* People and rooms share the same materials; their existing interactions stay local. */
@media screen {
  html[data-theme] #content :is(.team-planner-workspace,.doctor-profile,.dossier-workspace,.doctor-profile-reference),
  html[data-theme] #content .cabinet-profile.doctor-profile-reference {
    --team-panel:var(--erp-surface);--team-soft:var(--erp-soft);--team-line:var(--erp-line);
    --team-ink:var(--erp-ink);--team-muted:var(--erp-muted);--team-gradient:var(--erp-mesh-hero);
    --team-blue:#7d9f91;--team-pink:#ad93b4;--team-slate:#8e9a97;--team-pale:#c5ab8e;
    --employee-body:var(--erp-page);--employee-hero:var(--erp-surface);--employee-card:var(--erp-surface);
    --employee-hero-ink:var(--erp-ink);--employee-hero-muted:var(--erp-muted);--employee-line:var(--erp-line);
    --employee-action:var(--erp-accent);--employee-action-fill:var(--erp-mesh-card);--employee-context-glass:var(--erp-surface);
    --doctor-surface:var(--erp-surface);--doctor-soft:var(--erp-soft);--doctor-ink:var(--erp-ink);--doctor-muted:var(--erp-muted);
    --doctor-accent:var(--erp-accent-ink);--doctor-bar:#7d9f91;--doctor-bar-hover:#608573;--doctor-track:var(--erp-line);
    --dossier-surface:var(--erp-surface);--dossier-soft:var(--erp-soft);--dossier-ink:var(--erp-ink);
    --dossier-muted:var(--erp-muted);--dossier-line:var(--erp-line);--dossier-accent:var(--erp-accent);
    --cabinet-canvas:var(--erp-page);--cabinet-card:var(--erp-surface);--cabinet-line:var(--erp-line);
    --cabinet-ink:var(--erp-ink);--cabinet-muted:var(--erp-muted);--cabinet-bar:var(--doctor-bar);
    --cabinet-blue:#a694bb16;--cabinet-teal:#8fbcaa1c;--cabinet-plum:#c49bad16;
    font-family:var(--erp-font);font-size:16px;line-height:1.5;color:var(--erp-ink);
  }
  html[data-theme="dark"] #content :is(.team-planner-workspace,.doctor-profile,.dossier-workspace,.doctor-profile-reference),
  html[data-theme="dark"] #content .cabinet-profile.doctor-profile-reference {
    --team-blue:#a5c9b9;--team-pink:#c6aed0;--team-slate:#adbab3;--team-pale:#cdb49d;
    --doctor-bar:#a5c9b9;--doctor-bar-hover:#c1ddcf;
    --cabinet-blue:#b7a4cb0e;--cabinet-teal:#a3cebb14;--cabinet-plum:#d0a9bd0d;
  }
  html[data-theme] #content :is(.team-planner-workspace,.doctor-profile-reference,.dossier-workspace) :is(h1,h2,h3,h4,button,input,select,textarea) {font-family:var(--erp-font)}
  html[data-theme] #content :is(.team-planner-workspace,.doctor-profile-reference,.dossier-workspace) :is(button,a,summary,input,select):focus-visible {outline:2px solid var(--erp-focus);outline-offset:3px}

  /* Keep the people list readable when its neighbouring profile is open. */
  html[data-theme] #content .team-planner-workspace {container:people-workspace / inline-size}
  html[data-theme] #content .team-workspace-columns {grid-template-columns:minmax(0,1fr) minmax(300px,.85fr);gap:24px}
  html[data-theme] #content .team-activity-panel {grid-column:1/-1;padding:24px;border:1px solid var(--erp-line);border-radius:30px;background:var(--erp-mesh-quiet)}
  html[data-theme] #content .team-planner-workspace .employee-heading {flex-wrap:wrap;row-gap:14px}
  html[data-theme] #content .team-planner-workspace .employee-heading h1 {font-size:clamp(32px,3.1vw,44px);font-weight:500;letter-spacing:-1.2px}
  html[data-theme] #content .team-planner-workspace .employee-heading p {font-size:14px;line-height:1.5;max-width:48ch}
  html[data-theme] #content .team-planner-workspace .employee-heading .eyebrow {font-size:12px;letter-spacing:.08em}
  html[data-theme] #content .team-planner-workspace .employee-heading>.button {min-height:46px;font-size:14px;background:var(--erp-primary);color:var(--erp-primary-ink)}
  html[data-theme] #content .team-overview-metrics>span {min-height:112px;padding:20px;border:1px solid var(--erp-line);border-radius:26px;background:var(--erp-mesh-quiet);color:var(--erp-ink)}
  html[data-theme] #content .team-overview-metrics>span:first-child {background:var(--erp-mesh-card);color:var(--erp-ink)}
  html[data-theme] #content .team-overview-metrics small {font-size:13px;line-height:1.4;color:var(--erp-muted)}
  html[data-theme] #content .team-overview-metrics strong {font-size:36px;font-weight:500}
  html[data-theme] #content .team-overview-caption {font-size:13px;line-height:1.5}
  html[data-theme] #content .team-people-heading h2 {font-size:22px;font-weight:500}
  html[data-theme] #content :is(.team-people-tools,.team-planner-toolbar-actions)>button,
  html[data-theme] #content .team-planner-month-nav>button {width:44px;height:44px;min-width:44px;min-height:44px;background:var(--erp-surface);border-color:var(--erp-line);color:var(--erp-ink)}
  html[data-theme] #content :is(.team-people-tools,.team-planner-toolbar-actions)>button svg {width:20px;height:20px}
  html[data-theme] #content .team-people-search {min-height:52px;padding:0 16px;background:var(--erp-surface);border-color:var(--erp-control-line);border-radius:26px}
  html[data-theme] #content .team-people-search>svg {width:20px;height:20px}
  html[data-theme] #content .team-people-search input,
  html[data-theme] #content .team-people-search input:is(:focus,:focus-visible) {min-height:50px;margin:0;padding:12px 0;border:0;border-radius:0;background:transparent;box-shadow:none;outline:0;color:var(--erp-ink);font-size:16px;line-height:1.5}
  html[data-theme] #content .team-people-search:focus-within {outline:2px solid var(--erp-focus);outline-offset:3px}
  html[data-theme] #content .team-planner-workspace .users-list {gap:12px;padding:4px;max-height:760px}
  html[data-theme] #content .team-planner-workspace .team-member-row {display:flex;flex-direction:column;border-radius:26px}
  html[data-theme] #content .team-planner-workspace .team-member-row .team-member-select,
  html[data-theme] #content .team-planner-workspace .team-member-row.is-selected .team-member-select {
    order:1;width:100%;height:auto;min-height:112px;margin:0;padding:16px;
    grid-template-columns:44px minmax(0,1fr) 38px;grid-template-rows:auto auto;gap:8px 12px;
    border:1px solid var(--erp-line);border-radius:26px;background:var(--erp-surface);color:var(--erp-ink);
    --team-muted:var(--erp-muted);--team-line:var(--erp-line);
    --team-blue:inherit;--team-pink:inherit;--team-slate:inherit;--team-pale:inherit;
  }
  html[data-theme] #content .team-planner-workspace .team-member-row.is-selected .team-member-select {background:var(--erp-mesh-card);border-color:var(--erp-control-line);box-shadow:inset 0 1px 0 #ffffff0a}
  html[data-theme] #content .team-member-row :is(.team-member-portrait,.team-member-portrait img,.team-member-portrait .employee-avatar) {width:44px;height:44px}
  html[data-theme] #content .team-planner-workspace :is(.team-member-portrait,.team-diagram-avatar) {background:var(--erp-soft);color:var(--erp-muted)}
  html[data-theme] #content .team-member-copy>strong {font-size:16px;line-height:1.35;font-weight:500;white-space:normal;overflow-wrap:anywhere}
  html[data-theme] #content .team-member-copy>small {font-size:13px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
  html[data-theme] #content .team-member-row .team-member-stats {grid-column:2/-1;grid-row:2;gap:14px;flex-wrap:wrap}
  html[data-theme] #content .team-member-row .team-member-stat {gap:5px;font-size:13px;line-height:1.4}
  html[data-theme] #content .team-member-row .team-member-stat b {font-size:14px;font-weight:500;font-variant-numeric:tabular-nums}
  html[data-theme] #content .team-member-row .team-member-stat i {width:6px;height:6px}
  html[data-theme] #content .team-member-row .team-member-ring {grid-row:1;width:38px;height:38px}
  html[data-theme] #content .team-member-row .team-member-quick-actions {order:2;position:static;inset:auto;display:none;transform:none;width:100%;height:auto;gap:8px;padding:8px 4px 0}
  html[data-theme] #content .team-member-row.is-selected .team-member-quick-actions {display:flex;opacity:1;pointer-events:auto}
  html[data-theme] #content .team-member-quick-actions :is(button,a) {display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:1;width:auto;min-height:44px;height:auto;padding:10px 12px;border-radius:22px;background:var(--erp-soft);color:var(--erp-ink);font-size:14px}
  html[data-theme] #content .team-member-quick-actions :is(button,a)::after {content:attr(title)}
  html[data-theme] #content .team-member-quick-actions svg {width:18px;height:18px}
  html[data-theme] #content .team-member-details {order:3;margin-top:8px}
  html[data-theme] #content .team-member-actions {justify-content:flex-start;flex-wrap:wrap;gap:8px;padding:4px}
  html[data-theme] #content .team-member-actions>:is(a,button) {flex:0 0 44px;width:44px;height:44px;min-height:44px;border-color:var(--erp-line);background:var(--erp-soft);color:var(--erp-ink)}
  html[data-theme] #content .team-member-actions svg {width:20px;height:20px}
  html[data-theme] #content :is(.team-member-access,.team-member-access .employee-rights-summary,.team-member-row .employee-self-note,.team-access-state,.team-search-empty) {font-size:14px;line-height:1.5;color:var(--erp-muted)}

  html[data-theme] #content .team-profile-hero {padding:22px 20px 0;border:1px solid var(--erp-line);border-radius:30px;background:var(--erp-mesh-hero);color:var(--erp-ink)}
  html[data-theme] #content .team-profile-identity {min-height:0;padding-bottom:18px}
  html[data-theme] #content .team-profile-identity h2 {font-size:24px;font-weight:500;line-height:1.2}
  html[data-theme] #content .team-profile-identity :is(p,small) {font-size:14px;line-height:1.5;color:var(--erp-muted)}
  html[data-theme] #content .team-profile-portrait {margin-top:0}
  html[data-theme] #content .team-profile-actions {gap:8px}
  html[data-theme] #content .team-profile-actions>:is(button,a) {width:44px;height:44px;min-height:44px;border-color:var(--erp-line);background:var(--erp-surface);color:var(--erp-ink)}
  html[data-theme] #content .team-profile-actions svg {width:20px;height:20px}
  html[data-theme] #content .team-profile-stats {gap:8px;margin:12px 0 18px}
  html[data-theme] #content .team-profile-stat {grid-template-columns:30px minmax(0,1fr) auto;min-height:62px;gap:10px;padding:12px 14px;border-radius:24px;background:var(--erp-mesh-quiet)}
  html[data-theme] #content .team-profile-stat small {grid-column:2;grid-row:1;font-size:13px;line-height:1.4}
  html[data-theme] #content .team-profile-stat strong {grid-column:3;grid-row:1;font-size:20px;font-weight:500;line-height:1.2;font-variant-numeric:tabular-nums}
  html[data-theme] #content .team-profile-stat-icon {width:30px;height:30px}
  html[data-theme] #content .team-profile-stat-icon svg {width:16px;height:16px}
  html[data-theme] #content .team-profile-calendar {padding:16px;border:1px solid var(--erp-line);border-radius:28px;background:var(--erp-surface)}
  html[data-theme] #content .team-profile-calendar>header {flex-wrap:wrap;gap:8px;margin-bottom:12px;font-size:14px}
  html[data-theme] #content .team-profile-calendar :is(h3,header strong) {font-size:14px;line-height:1.4;font-weight:500}
  html[data-theme] #content .team-profile-calendar-key {font-size:12px;line-height:1.4;gap:6px}
  html[data-theme] #content .team-profile-calendar-key i {width:5px;height:5px}
  html[data-theme] #content .team-profile-calendar>header button {width:44px;height:44px;min-height:44px;background:var(--erp-soft);font-size:22px}
  html[data-theme] #content .team-profile-weekdays>span {height:30px;font-size:12px;line-height:1.4}
  html[data-theme] #content .team-profile-days {gap:3px 2px}
  html[data-theme] #content .team-profile-day,
  html[data-theme] #content .team-profile-days>.is-outside {width:100%;max-width:none;min-height:44px;aspect-ratio:auto;border-radius:15px;font-size:14px;line-height:1.3}
  html[data-theme] #content .team-profile-day.is-selected {background:var(--erp-accent);color:var(--erp-accent-ink)}
  html[data-theme] #content .team-profile-day.has-activity::after {bottom:5px;width:4px;height:4px;left:calc(50% - 2px)}
  html[data-theme] #content .team-profile-empty {font-size:14px;line-height:1.5;background:var(--erp-mesh-quiet);border:1px solid var(--erp-line)}

  /* Day cells and the axis use the same width, retaining precise alignment. */
  html[data-theme] #content .team-planner-month-nav h2 {font-size:22px;line-height:1.3;font-weight:500}
  html[data-theme] #content .team-planner-toolbar-actions {flex-wrap:wrap}
  html[data-theme] #content .team-planner-view {padding:4px;border-radius:26px;background:var(--erp-soft)}
  html[data-theme] #content .team-planner-view>button {min-height:44px;padding:10px 16px;font-size:14px;line-height:1.4}
  html[data-theme] #content .team-planner-view>button[aria-pressed="true"] {background:var(--erp-surface);color:var(--erp-ink);box-shadow:var(--erp-shadow)}
  html[data-theme] #content :is(.team-planner-summary,.team-planner-summary small,.team-planner-legend,.team-planner-footnote) {font-size:13px;line-height:1.5}
  html[data-theme] #content .team-planner-summary strong {font-size:24px;font-weight:500}
  html[data-theme] #content .team-planner-legend i {width:7px;height:7px}
  html[data-theme] #content .team-timeline-scroll {scroll-padding-left:148px}
  html[data-theme] #content :is(.team-timeline-lane,.team-timeline-axis) {grid-template-columns:148px max-content}
  html[data-theme] #content .team-timeline-person {width:148px;padding:16px 10px 16px 0;gap:8px;background:var(--erp-surface)}
  html[data-theme] #content .team-timeline-person strong {font-size:14px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
  html[data-theme] #content .team-timeline-person small {font-size:12px;line-height:1.45}
  html[data-theme] #content .team-timeline-person>button {position:static;grid-column:2;justify-self:start;width:44px;height:44px;min-height:44px;font-size:18px;background:var(--erp-soft)}
  html[data-theme] #content .team-timeline-lane-total {font-size:22px}
  html[data-theme] #content .team-timeline-lane-empty {left:160px;height:auto;font-size:13px;line-height:1.5;opacity:1}
  html[data-theme] #content .team-timeline-day {flex:0 0 48px;width:48px;padding:0 2px}
  html[data-theme] #content .team-timeline-event {width:44px;min-width:44px;height:44px;min-height:44px;border:1px solid var(--erp-line);border-radius:17px;background:var(--erp-success-surface);color:var(--erp-success);font-size:14px}
  html[data-theme] #content .team-timeline-event[data-team-kind="receipt"],
  html[data-theme] #content .team-timeline-event[data-team-kind="mixed"] {background:var(--erp-accent);color:var(--erp-accent-ink)}
  html[data-theme] #content .team-timeline-event[data-team-kind="transfer"] {background:var(--erp-soft);color:var(--erp-ink)}
  html[data-theme] #content .team-timeline-event[data-team-kind="reversal"] {background:var(--erp-warning-surface);color:var(--erp-warning)}
  html[data-theme] #content .team-timeline-event strong {font-size:14px;font-weight:500}
  html[data-theme] #content .team-timeline-axis>span {background:var(--erp-surface);font-size:13px;line-height:1.4}
  html[data-theme] #content .team-timeline-dates>:is(button,span) {flex:0 0 48px;width:48px;min-height:64px;font-size:14px;line-height:1.3}
  html[data-theme] #content .team-timeline-dates :is(strong,b) {font-size:14px;font-weight:500}
  html[data-theme] #content .team-timeline-dates small {font-size:12px}
  html[data-theme] #content .team-timeline-dates .is-selected {background:var(--erp-accent);color:var(--erp-accent-ink)}
  html[data-theme] #content :is(.team-planner-message,.team-day-detail,.team-person-activity) {border:1px solid var(--erp-line);border-radius:28px;background:var(--erp-mesh-quiet);font-size:14px;line-height:1.5}
  html[data-theme] #content .team-planner-message strong {font-size:18px;font-weight:500}
  html[data-theme] #content :is(.team-planner-message button,.team-day-detail>header>button,.team-day-detail>footer>button) {min-height:44px;font-size:14px;background:var(--erp-soft);color:var(--erp-ink)}
  html[data-theme] #content .team-day-detail>header>button {width:44px;min-width:44px;font-size:22px}
  html[data-theme] #content :is(.team-person-activity>header small,.team-person-days>button>span,.team-person-days>button>small,.team-person-days>p,.team-day-detail>header span,.team-day-detail>header small,.team-action-row time,.team-action-row small) {font-size:13px;line-height:1.5}
  html[data-theme] #content :is(.team-person-activity>header strong,.team-action-row strong) {font-size:16px;font-weight:500;line-height:1.4}
  html[data-theme] #content .team-person-activity>header>strong {font-size:26px}
  html[data-theme] #content .team-person-days>button>strong {font-size:20px}
  html[data-theme] #content .team-action-row {grid-template-columns:72px minmax(0,1fr) auto;gap:12px}
  html[data-theme] #content .team-action-row>b {font-size:16px;font-weight:500}

  /* Preserve the dossier silhouette while bringing its information up to scale. */
  html[data-theme] #content .doctor-profile-reference>.employee-dossier-hero,
  html[data-theme] #content .cabinet-profile.doctor-profile-reference>.employee-dossier-hero {background:linear-gradient(to bottom,transparent calc(100% - 72px),var(--employee-body) 100%),var(--erp-mesh-hero)}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-context[data-context-layout="compact"] [data-dossier-context-host] {background:var(--erp-mesh-card);border-color:var(--erp-line);box-shadow:var(--erp-modal-shadow);backdrop-filter:none;-webkit-backdrop-filter:none}
  html[data-theme] #content .employee-dossier-context #header .context-field-label {font-size:12px;line-height:1.4;letter-spacing:0;margin-bottom:6px}
  html[data-theme] #content .employee-dossier-context #header .warehouse-context :is(.unit-trigger,.cabinet-trigger) {min-height:46px;padding:10px 12px;font-size:14px;line-height:1.4;background:var(--erp-surface);border-color:var(--erp-control-line);color:var(--erp-ink)}
  html[data-theme] #content .employee-dossier-context #header .cabinet-context-links {flex-wrap:wrap;gap:3px 14px;padding-top:5px}
  html[data-theme] #content .employee-dossier-context #header .cabinet-context-links a {display:inline-flex;align-items:center;min-height:26px;font-size:13px;line-height:1.4;color:var(--erp-muted)}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-context-trigger {min-height:46px;font-size:14px;line-height:1.4;padding:10px 13px}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-viewer strong {font-size:14px;line-height:1.4}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-viewer small {font-size:12px;line-height:1.35}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-eyebrow {font-size:12px;line-height:1.4;letter-spacing:.08em}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-identity>p {font-size:16px;line-height:1.5}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-meta dd {font-size:13px;line-height:1.5}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-access {font-size:13px;line-height:1.4;background:var(--erp-soft);border:1px solid var(--erp-line);color:var(--erp-muted)}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-actions>.employee-dossier-round-action {background:var(--erp-surface);border-color:var(--erp-control-line);box-shadow:var(--erp-shadow);color:var(--erp-ink);font-size:14px}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-actions>.employee-dossier-round-action[aria-expanded="true"] {background:var(--erp-accent);color:var(--erp-accent-ink);box-shadow:0 0 0 2px var(--erp-focus-ring)}
  html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-tabs>button {min-height:48px;font-size:14px;line-height:1.4}
  html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-tabs {gap:8px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-padding-inline:12px}
  html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-tabs>button {flex:1 0 auto;min-width:max-content;white-space:nowrap}
  html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-tabs>button[aria-selected="true"] {background:var(--erp-accent);color:var(--erp-accent-ink);border-color:var(--erp-line)}
  html[data-theme] #content .doctor-profile-reference :is(.doctor-profile-period,.cabinet-profile-period>.doctor-profile-period) {border:1px solid var(--erp-line);border-radius:26px;background:var(--erp-mesh-quiet);font-family:var(--erp-font)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-period :is(button,input,label,.date-picker-value) {font-family:var(--erp-font)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-period .field-label {font-size:13px}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-period .date-picker-trigger {min-height:48px;font-size:16px;border-radius:18px;padding:11px 13px;background:var(--erp-soft);color:var(--erp-ink);border:1px solid var(--erp-control-line)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-period .doctor-profile-presets>button {min-height:44px;font-size:14px;line-height:1.4}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-presets>.button {background:var(--erp-primary);color:var(--erp-primary-ink)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-section-heading h2 {font-size:26px;font-weight:500;line-height:1.25}
  html[data-theme] #content .doctor-profile-reference :is(.doctor-profile-section-heading p,.doctor-profile-stat>small,.doctor-profile-total,.doctor-profile-chart-caption,.doctor-profile-price-notice,.doctor-profile-material-identity small,.doctor-profile-material-unpriced,.doctor-profile-material-value>span) {font-size:14px;line-height:1.5}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-stat {border-color:var(--erp-line);border-radius:28px;background:var(--erp-mesh-quiet)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-stat:nth-child(2) {background:var(--erp-mesh-card)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-stat-label {font-size:14px;line-height:1.5}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-stat-icon {background:var(--erp-soft);color:var(--erp-accent-ink)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-stat>strong {font-weight:500;font-variant-numeric:tabular-nums}
  html[data-theme] #content .doctor-profile-reference :is(.doctor-profile-panel,.doctor-profile-connections) {background:var(--erp-mesh-quiet);border-color:var(--erp-line)}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-chart-metrics button {min-height:44px;font-size:14px}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-bar-value,
  html[data-theme] #content .doctor-profile-reference[data-chart-metric="cost"] .doctor-profile-bar-value {font-size:13px}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-day time :is(strong,small) {font-size:13px;line-height:1.4}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-material-identity strong {font-size:16px;font-weight:500}
  html[data-theme] #content .doctor-profile-reference .doctor-profile-material-value>strong>span {font-size:13px}

  html[data-theme] #content .cabinet-profile :is(.cabinet-dossier-panel,.cabinet-daily-panel,.cabinet-overview-materials,.cabinet-profile-team,.cabinet-dossier-history) {background:var(--erp-mesh-quiet);border-color:var(--erp-line)}
  html[data-theme] #content .cabinet-profile>.cabinet-dossier-overview {background:transparent}
  html[data-theme] #content .cabinet-profile .cabinet-overview-stats .doctor-profile-stat {background:var(--erp-mesh-quiet);border-color:var(--erp-line)}
  html[data-theme] #content .cabinet-profile .cabinet-overview-stats .cabinet-overview-cost {background:var(--erp-mesh-hero)}
  html[data-theme] #content .cabinet-profile .cabinet-overview-stats .doctor-profile-stat-label {font-size:14px;line-height:1.5}
  html[data-theme] #content .cabinet-profile .cabinet-overview-stats .doctor-profile-stat>small {font-size:13px;line-height:1.5}
  html[data-theme] #content .cabinet-profile :is(.cabinet-reference-currency,.cabinet-reference-scope) {font-size:13px;line-height:1.5}
  html[data-theme] #content .cabinet-profile :is(.cabinet-dossier-panel-heading p,.cabinet-daily-note,.cabinet-daily-day-count,.cabinet-daily-count,.cabinet-daily-date time,.cabinet-daily-list>li>strong>small,.cabinet-overview-team-footer,.cabinet-overview-finance>small,.cabinet-dossier-panel-heading>[data-cabinet-report-period]) {font-size:13px;line-height:1.5}
  html[data-theme] #content .cabinet-profile .cabinet-daily-date time {font-size:14px}
  html[data-theme] #content .cabinet-profile .cabinet-overview-material strong {font-size:16px;line-height:1.45}
  html[data-theme] #content .cabinet-profile .cabinet-overview-material-cost {font-size:18px;font-weight:500}
  html[data-theme] #content .cabinet-profile .finance-expense-stats>div {background:var(--erp-mesh-card);border-color:var(--erp-line)}
  html[data-theme] #content .cabinet-profile .cabinet-dossier-panel-heading>.button {min-height:44px;font-size:14px;line-height:1.4}
  html[data-theme] #content .cabinet-management-page .cabinet-management-card {background:var(--erp-mesh-quiet);border-color:var(--erp-line);border-radius:28px}
  html[data-theme] #content .cabinet-management-page :is(.cabinet-management-card p,.cabinet-directory-team>span:first-child,.cabinet-directory-expense>small,.cabinet-management-card .pill) {font-size:13px;line-height:1.5}
  html[data-theme] #content .cabinet-management-page .cabinet-directory-expense>span {font-size:14px;line-height:1.5}
  html[data-theme] #content .cabinet-management-page :is(.cabinet-edit-toggle,.cabinet-open-profile,.cabinet-archive-action) {min-height:44px;font-size:14px;line-height:1.4}

  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) .dossier-drawer-content {border-color:var(--erp-line);border-radius:28px;background:var(--erp-mesh-card)}
  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) .dossier-drawer-content>header>button {width:44px;min-width:44px;min-height:44px;background:var(--erp-soft)}
  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) .dossier-connection-central {background:var(--erp-mesh-hero);color:var(--erp-ink)}
  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) :is(.dossier-connection-central>small,.dossier-connection-target small,.dossier-information dt,.dossier-photo-edit,.cabinet-preset-option strong) {font-size:13px;line-height:1.5;color:var(--erp-muted)}
  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) .dossier-connection-target strong {font-size:16px;line-height:1.4}
  html[data-theme] #content :is(.doctor-profile-reference,.dossier-workspace) .dossier-information dd {font-size:16px;line-height:1.5}
  html[data-theme] #content .employee-profile-picker {border-radius:28px;background:var(--erp-mesh-card);border-color:var(--erp-line);box-shadow:var(--erp-modal-shadow)}
  html[data-theme] #content .employee-profile-picker :is(input,button) {font-family:var(--erp-font)}
  html[data-theme] #content .employee-profile-picker :is(header p,[role="status"],nav small,.employee-picker-search) {font-size:14px;line-height:1.5}
  html[data-theme] #content .employee-profile-picker nav strong {font-size:16px;font-weight:500}
}

@media screen {
  @container people-workspace (min-width:1250px) {
    html[data-theme] #content .team-workspace-columns {grid-template-columns:320px 320px minmax(0,1fr)}
    html[data-theme] #content .team-activity-panel {grid-column:auto;padding:22px}
  }
  @container people-workspace (max-width:720px) {
    html[data-theme] #content .team-workspace-columns {grid-template-columns:minmax(0,1fr);gap:24px}
    html[data-theme] #content .team-resource-top {display:grid;gap:20px}
    html[data-theme] #content .team-workspace-overview {width:100%}
    html[data-theme] #content .team-profile-card {display:grid;grid-template-columns:minmax(0,1fr);gap:0}
    html[data-theme] #content .team-profile-hero {grid-row:auto;min-height:280px}
    html[data-theme] #content .team-profile-portrait {height:260px;max-width:330px;margin-inline:auto}
    html[data-theme] #content .team-profile-calendar {padding:18px}
    html[data-theme] #content .team-activity-panel {padding:20px 16px}
    html[data-theme] #content .team-action-row {grid-template-columns:64px minmax(0,1fr)}
    html[data-theme] #content .team-action-row>b {grid-column:2;white-space:normal}
  }
  @container people-workspace (max-width:380px) {
    html[data-theme] #content .team-planner-workspace .employee-heading h1 {font-size:32px}
    html[data-theme] #content .team-overview-metrics>span {padding:16px;gap:12px}
    html[data-theme] #content .team-planner-workspace .team-member-row .team-member-select {padding:13px;gap:8px 10px;grid-template-columns:38px minmax(0,1fr) 30px}
    html[data-theme] #content .team-member-row :is(.team-member-portrait,.team-member-portrait img,.team-member-portrait .employee-avatar) {width:38px;height:38px}
    html[data-theme] #content .team-member-row .team-member-ring {width:30px;height:30px}
    html[data-theme] #content .team-member-row .team-member-stats {gap:10px}
    html[data-theme] #content .team-member-copy>strong {font-size:15px}
    html[data-theme] #content .team-profile-calendar {padding:12px}
    html[data-theme] #content .team-profile-calendar-key {white-space:normal}
    html[data-theme] #content .team-planner-month-nav h2 {font-size:20px}
    html[data-theme] #content .team-planner-view>button {padding-inline:12px}
  }
  @container employee-dossier (min-width:621px) {
    html[data-theme] #content .doctor-profile-reference:not(.cabinet-profile) .employee-dossier-identity {padding-top:145px}
  }
  @container employee-dossier (max-width:700px) {
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-tabs {padding-inline:12px;-webkit-mask-image:linear-gradient(to right,transparent,#000 10px,#000 calc(100% - 10px),transparent);mask-image:linear-gradient(to right,transparent,#000 10px,#000 calc(100% - 10px),transparent)}
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-tabs>button {flex:0 0 auto}
    html[data-theme] #content .cabinet-profile .cabinet-overview-stats {grid-template-columns:repeat(2,minmax(0,1fr))}
    html[data-theme] #content .cabinet-profile .cabinet-overview-stats .cabinet-overview-cost {grid-column:1/-1}
    html[data-theme] #content .cabinet-profile .cabinet-overview-stats .doctor-profile-stat:not(.cabinet-overview-cost) {min-height:160px}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-viewer small {font-size:12px}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-viewer strong {font-size:13px}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-context-trigger {font-size:13px}
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-context[data-context-layout="compact"] [data-dossier-context-host] {width:min(620px,calc(100vw - 40px))}
    html[data-theme] #content .cabinet-profile .cabinet-overview-material {grid-template-columns:minmax(0,1fr);gap:8px}
    html[data-theme] #content .cabinet-profile .cabinet-overview-material-cost {width:auto;max-width:none;justify-content:flex-start;font-size:18px}
  }
  @container employee-dossier (max-width:390px) {
    html[data-theme] #content .doctor-profile-reference .doctor-profile-period-fields {grid-template-columns:minmax(0,1fr)}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-tabs>button {padding-inline:14px}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-hero .employee-dossier-viewer small {display:none}
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-topbar {grid-template-columns:minmax(0,1fr)}
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-context {grid-row:2;grid-column:1;width:100%}
    html[data-theme] #content .cabinet-profile .employee-dossier-hero .employee-dossier-context-trigger {width:100%;margin:0}
    html[data-theme] #content .cabinet-profile .cabinet-overview-stats {grid-template-columns:minmax(0,1fr)}
  }
  @media (hover:hover) {
    html[data-theme] #content .team-planner-workspace :is(.team-profile-day,.team-planner-month-nav>button,.team-member-actions>button,.team-member-actions>a,.team-member-quick-actions>button):hover {background:var(--erp-accent);color:var(--erp-accent-ink)}
    html[data-theme] #content .doctor-profile-reference .employee-dossier-round-action:hover {background:var(--erp-accent);color:var(--erp-accent-ink);box-shadow:var(--erp-shadow)}
  }
  @media (pointer:coarse) {
    html[data-theme] #content .employee-dossier-context #header .cabinet-context-links a {min-height:44px}
  }
  @media (prefers-reduced-motion:reduce) {
    html[data-theme] #content .team-member-row :is(.team-member-select,.team-member-quick-actions) {transition:none}
  }
}
