/* Approved Compacte werkplek. Presentation only; existing actions and access checks stay authoritative.
   Load last, screen only. Do not style dialogs, client portals, document viewers or print output. */
@media screen {
  body.enterprise-shell.has-sidebar > header {
    min-height: 56px;
    padding: 6px 18px;
    gap: 10px;
  }
  body.enterprise-shell.has-sidebar > header > a { font-size: 20px; }
  body.enterprise-shell.has-sidebar > main {
    max-width: 1800px;
    padding: 0 16px;
    margin: 12px auto;
  }
  body.enterprise-shell #workspace .sidebar-shell {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
  }
  body.enterprise-shell #workspace nav.sidebar {
    width: 190px;
    top: 68px;
    height: calc(100dvh - 80px);
    max-height: calc(100dvh - 80px);
    padding: 10px 8px;
    border-radius: 5px;
  }
  body.enterprise-shell #workspace .sidebar-group { padding: 12px 0 2px; }
  body.enterprise-shell #workspace .sidebar-group-title {
    margin: 0 10px 5px;
    font-size: 12px;
    font-weight: 500;
  }
  body.enterprise-shell #workspace .sidebar .sidebar-link {
    min-height: 36px;
    padding: 7px 10px;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    border-radius: 4px;
  }
  body.enterprise-shell #workspace .sidebar .sidebar-link.active { font-weight: 600; }
  body.enterprise-shell #workspace .sidebar .sidebar-symbol { flex-basis: 18px; }
  body.enterprise-shell #workspace .shared-page-actions {
    min-height: 44px;
    gap: 10px;
    margin-bottom: 12px;
  }
  body.enterprise-shell #workspace .shared-page-actions .spa-tools { gap: 4px; }
  body.enterprise-shell #workspace .shared-page-actions .spa-context { font-size: 13px; }
  body.enterprise-shell #workspace .shared-page-actions button {
    padding: 0 9px;
    font-size: 13px;
    border-color: transparent;
    background: transparent;
  }
  body.enterprise-shell #workspace .shared-page-actions button:hover { background: #e8f0f7; }
  body.enterprise-home #workspace .dashboard-home .dh-body { gap: 14px; }
  body.enterprise-home #workspace .dashboard-home .dh-heading {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #203b53;
    gap: 12px;
  }
  body.enterprise-home #workspace .dashboard-home .dh-heading h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: normal;
  }
  body.enterprise-home #workspace .dashboard-home .dh-heading :is(.dh-date,.dh-updated,p.muted,.dh-humour) {
    color: #52687b;
    font-size: 13px;
  }
  body.enterprise-home #workspace .dashboard-home .dh-status-item {
    min-height: 48px;
    padding: 8px 12px;
    font-size: 13px;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
    align-items: stretch;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) > .dh-card {
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    border-radius: 5px;
    overflow: auto;
    scrollbar-gutter: auto;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) > .dh-card > .dh-card-head {
    min-height: 46px;
    padding: 7px 13px;
    gap: 8px;
    background: #fff;
    box-shadow: inset 0 3px var(--card-accent,transparent);
  }
  body.enterprise-home #workspace .dashboard-home .dh-recent-matters { --card-accent: #285f89; }
  body.enterprise-home #workspace .dashboard-home .dh-task-card { --card-accent: #285f89; }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) .dh-card-head h3 {
    font-size: 15px;
    font-weight: 600;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) .dh-card-head button {
    min-height: 32px;
    font-size: 12px;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) .dh-record {
    min-height: 50px;
    padding: 8px 13px;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) .dh-tabs {
    padding: 5px 9px;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) .dh-tabs button {
    min-height: 32px;
  }
  body.enterprise-shell.has-sidebar > footer { margin-left: 208px; }
}
@media screen and (max-width: 1100px) and (min-width: 761px) {
  body.enterprise-shell #workspace .sidebar-shell { grid-template-columns: 176px minmax(0,1fr); gap: 14px; }
  body.enterprise-shell #workspace nav.sidebar { width: 176px; }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) { grid-template-columns: minmax(0,1fr); }
}
@media screen and (max-width: 760px) {
  body.enterprise-shell.has-sidebar > header { padding: 6px 12px; }
  body.enterprise-shell.has-sidebar > header > a { flex: 1 1 auto; min-width: 0; font-size: 18px; }
  body.enterprise-shell.has-sidebar > header:has(.device-unlock-trigger:not([hidden])) > a span { display: none; }
  body.enterprise-shell.has-sidebar > header .device-unlock-trigger {
    flex: 0 0 92px;
    width: 92px;
    max-width: 92px;
    margin: 0;
    padding: 5px 7px;
    font-size: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  body.enterprise-shell.has-sidebar > main { padding: 0 12px; margin-top: 12px; }
  body.enterprise-shell #workspace .sidebar-shell { display: block; }
  body.enterprise-shell #workspace nav.sidebar {
    top: 0;
    width: min(286px,82vw);
    height: 100dvh;
    max-height: 100dvh;
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
    border-radius: 0;
  }
  body.enterprise-shell #workspace .shared-page-actions { min-height: 48px; }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) { grid-template-columns: minmax(0,1fr); gap: 12px; }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) > .dh-card {
    height: auto;
    min-height: 180px;
    max-height: none;
    overflow: visible;
  }
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) > .dh-card > .dh-card-head { position: static; }
  body.enterprise-shell.has-sidebar > footer { margin-left: 0; }
}
@media screen and (any-pointer: coarse), screen and (max-width: 900px) {
  body.enterprise-shell #workspace .sidebar .sidebar-link,
  body.enterprise-home #workspace .dashboard-home :is(.eh-main-row,.dh-grid) :is(.dh-card-head,.dh-tabs) button {
    min-height: 44px;
  }
  body.enterprise-shell #workspace .shared-page-actions button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
  }
}
