.sidebar {position:sticky;overflow-y:auto;overflow-x:hidden}
.sidebar>* {flex-shrink:0}
.nav-list {grid-template-columns:minmax(0,1fr)}
.mobile-navigation-close,.navigation-scrim,.mobile-row-toggle,.mobile-table-sort,.crm-mobile-view,.crm-mobile-filters {display:none}
body:has(dialog[open]) {overflow:hidden}
/* WebKit's native select can paint beyond a narrow grid track. Keep the native picker with a Lucide arrow. */
select {appearance:none;max-width:100%;min-width:0;text-overflow:ellipsis;background-image:url('./assets/icons/chevron-down.svg');background-repeat:no-repeat;background-position:right 12px center;background-size:16px;padding-right:36px!important}
@media(max-width:1100px) {
  .split-layout,.entry-layout {grid-template-columns:minmax(0,1fr)}
}
@media(max-width:760px) {
  html {scroll-padding-top:100px}
  .topbar {display:grid;grid-template-columns:44px minmax(0,1fr) 44px 36px;gap:8px;align-items:center;min-height:76px}
  .topbar>div:first-of-type {margin:0;min-width:0}
  .topbar h1 {font-size:17px;line-height:1.3;overflow-wrap:anywhere}
  .topbar .eyebrow {font-size:9px;line-height:1.3}
  .topbar>.navigation-toggle {display:flex;width:44px;min-width:44px;height:44px;padding:10px}
  .header-tools {width:44px;min-width:44px}
  .workspace-search-trigger {width:44px;height:44px;padding:12px}
  .account-area {min-width:0;width:36px}
  .user-badge {width:36px;min-height:44px}
  .workspace-context {min-height:50px;padding:12px 0}
  .workspace-context-path {min-width:0;flex-wrap:wrap}
  .workspace-context-actions select {min-height:44px;font-size:14px}
  .workspace-context-actions .primary-button {min-height:44px;white-space:normal;max-width:52%}
  .navigation-open {overflow:hidden}
  .navigation-open .sidebar {top:0;left:0;height:100dvh;max-height:100dvh;width:min(320px,88vw);padding:calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));z-index:90;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
  .navigation-open .navigation-scrim {display:block;position:fixed;inset:0;background:#263d4e55;z-index:80}
  .mobile-navigation-close {display:flex;position:sticky;top:0;z-index:5;background:#fff;width:44px;height:44px;min-height:44px;align-self:flex-end;flex-shrink:0}
  .navigation-open .brand {padding-top:0}
  .nav-button {min-height:44px;font-size:14px;padding:11px 12px}
  .navigation-search input {font-size:16px;min-height:44px!important}
  .sidebar .navigation-search {margin:0}
  input:not([type=checkbox]):not([type=radio]),select,textarea {font-size:16px!important;min-height:44px}
  .primary-button,.secondary-button,.ghost-button,.danger-button,.small-button {min-height:44px;font-size:14px}
  .icon-button,.header-icon,.crm-icon {width:44px;height:44px;min-width:44px;min-height:44px;padding:11px}
  .button-icon {width:18px;height:18px}
  .section-heading {gap:10px;align-items:center}
  .section-heading h2 {font-size:16px;overflow-wrap:anywhere}
  .section-heading>.button-row {flex-shrink:0}
  .section-heading>div:first-child {min-width:0}
  .table-toolbar {gap:10px;margin:0;padding:10px 0}
  .table-search {width:100%}
  .table-search input {min-height:44px!important;font-size:16px!important}
  .table-record-count {font-size:12px;margin-right:auto}
  .mobile-table-sort {display:block;max-width:170px;font-size:14px!important;padding:6px 10px;min-height:40px}
  .table-wrap:has(.mobile-record-table) {max-height:440px;overscroll-behavior:contain;border-radius:5px}
  .mobile-record-table {display:block;min-width:0!important;width:100%!important}
  .mobile-record-table>thead {display:block;position:sticky;top:0;z-index:3;background:#f5f8fa}
  .mobile-record-table>thead>tr {display:block}
  .mobile-record-table>thead th {display:none!important}
  .mobile-record-table>thead th[data-mobile-selection=true] {display:flex!important;align-items:center;gap:12px;position:static;padding:12px 16px;min-height:44px}
  .mobile-record-table>thead th[data-mobile-selection=true]::after {content:'Select all';font-size:13px;color:#4b6574;font-weight:500}
  .mobile-record-table>tbody {display:block}
  .mobile-record-table>tbody>tr {position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding:16px;border-bottom:1px solid var(--line);background:#fff}
  .mobile-record-table>tbody>tr[hidden] {display:none!important}
  .mobile-record-table>tbody>tr:last-child {border-bottom:0}
  .mobile-record-table>tbody>tr>td {display:none;padding:0;border:0;min-width:0;font-size:14px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
  .mobile-record-table>tbody>tr>td::before {content:attr(data-label);display:block;margin-bottom:4px;color:#617582;font-size:12px;font-weight:500}
  .mobile-record-table>tbody>tr>td[data-mobile-primary=true] {display:block;position:relative;grid-column:1/-1;font-weight:650;color:#254b60;padding-right:44px;min-height:44px}
  .mobile-record-table>tbody>tr[data-has-selection=true]>td[data-mobile-primary=true] {padding-right:88px}
  .mobile-record-table>tbody>tr>td[data-mobile-priority=true] {display:block}
  .mobile-record-table>tbody>tr>td[data-mobile-action=true] {display:flex;align-items:center;gap:8px;grid-column:1/-1;flex-wrap:wrap}
  .mobile-record-table>tbody>tr>td[data-mobile-action=true]::before {display:none}
  .mobile-record-table>tbody>tr>td[data-mobile-selection=true] {display:block;position:absolute;right:60px;top:16px;width:44px;height:44px;padding:11px;z-index:1}
  .mobile-record-table>tbody>tr>td[data-mobile-selection=true]::before {display:none}
  .mobile-record-table input[type=checkbox] {width:20px;height:20px;min-height:20px;margin:0}
  .mobile-row-toggle {display:flex;align-items:center;justify-content:center;position:absolute;right:0;top:0;width:44px;height:44px;border:1px solid #dbe6ed;border-radius:4px;background:#f8fbfd;color:#3c6c84;padding:10px}
  .mobile-row-toggle[aria-expanded=true] svg {transform:rotate(180deg)}
  .mobile-record-table>tbody>tr.mobile-row-expanded>td:not([data-mobile-selection=true]) {display:block}
  .mobile-record-table>tbody>tr.mobile-row-expanded>td[data-mobile-action=true] {display:flex}
  .mobile-record-table>tbody>tr.mobile-row-expanded>td[data-label="Email"],.mobile-record-table>tbody>tr.mobile-row-expanded>td[data-label="Development plan"],.mobile-record-table>tbody>tr.mobile-row-expanded>td[data-label="Goal"],.mobile-record-table>tbody>tr.mobile-row-expanded>td:has(input[type=date]) {grid-column:1/-1}
  .mobile-record-table>tbody>tr.mobile-empty-row {display:block}
  .mobile-record-table>tbody>tr.mobile-empty-row>td {display:block;padding:12px 0}
  .mobile-record-table>tbody>tr.mobile-empty-row>td::before {display:none}
  .mobile-record-table input:not([type=checkbox]),.mobile-record-table select {width:100%;min-width:0;max-width:100%;font-size:16px!important;min-height:44px!important}
  .mobile-record-table .pill {font-size:12px}
  .mobile-record-table .crm-link {font-size:15px;line-height:1.5;padding:6px 0}
  .people-directory table {min-width:0}
  .people-directory td:last-child {white-space:normal}
  .people-directory td:nth-child(3),.people-directory td:nth-child(n+8):nth-child(-n+13) {display:none}
  dialog[open] {position:fixed;inset:0;width:100%;height:100dvh;max-width:100%;max-height:100dvh;margin:0;padding:20px 16px calc(24px + env(safe-area-inset-bottom));border:0;border-radius:0;overflow:auto;overscroll-behavior:contain}
  dialog[open]>header {position:sticky;top:-20px;z-index:5;min-height:72px;margin:-20px -16px 20px;padding:14px 16px;background:#fff;border-bottom:1px solid var(--line)}
  dialog[open] h2 {font-size:20px;line-height:1.3}
  dialog[open] .form-grid,dialog[open] .ops-fields,dialog[open] .schedule-fields {grid-template-columns:minmax(0,1fr)!important;gap:18px}
  dialog[open] form {max-width:100%}
  dialog[open] .wide-field {grid-column:1/-1}
  dialog[open] .form-grid>button {width:100%;min-width:0}
  .workspace-command[open] {height:auto;max-height:90dvh}
  .workspace-command header input {font-size:16px!important}
  .command-results {max-height:65dvh;padding:0}
  .command-results button {min-height:48px;padding:14px 10px}
  .command-results button span {font-size:10px}
  .account-menu {position:fixed;inset:0;width:100%;height:100dvh;max-height:100dvh;border:0;border-radius:0;z-index:100;padding-bottom:env(safe-area-inset-bottom);overscroll-behavior:contain}
  .account-menu-head {position:sticky;top:0;z-index:3;background:#f6fafc;padding:16px}
  .account-form {padding:18px 16px}
  .account-menu input,.account-menu select {font-size:16px}
  body:has(.account-menu:not(.is-hidden)) {overflow:hidden}
  .crm-tabs {gap:20px;margin:0;padding:0;scrollbar-width:thin}
  .crm-tabs button {min-height:48px;font-size:13px}
  .crm-page-heading {padding:16px 0;gap:12px}
  .crm-page-heading h2 {font-size:20px}
  .crm-breadcrumb {display:none}
  .crm-summary {margin-bottom:16px}
  .crm-summary span,.crm-summary small {font-size:11px}
  .crm-summary strong {font-size:22px;flex-wrap:wrap;overflow-wrap:anywhere}
  .crm-toolbar {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .crm-toolbar .crm-search-label {grid-column:1/-1;width:100%;margin:0}
  .crm-toolbar>select {width:100%;min-width:0;max-width:none;font-size:14px!important;min-height:44px}
  .crm-toolbar .crm-search-label input {height:44px;min-height:44px}
  .crm-mobile-view {display:block;order:-1;width:100%;font-size:16px;min-height:44px;margin:0 0 12px;padding:8px 12px}
  .crm-tabs {display:none}
  #crmWorkspace {display:flex;flex-direction:column}
  .crm-mobile-filters {display:flex;grid-column:1/-1;justify-self:start;min-height:44px}
  .crm-toolbar:not(.filters-open)>select {display:none}
  .crm-scopes button,.crm-layout-switch button {min-height:44px}
  .crm-layout-switch button {min-width:44px}
  .crm-board {grid-template-columns:minmax(0,1fr)!important;max-height:none;min-height:0;overflow:visible;gap:20px}
  .crm-column {min-height:0;padding:14px 12px}
  .crm-column-head h3 {font-size:14px}
  .crm-column-total {font-size:12px}
  .crm-deal {margin-top:12px;padding:16px}
  .crm-deal button {font-size:14px;min-height:36px}
  .crm-deal select {font-size:16px!important;min-height:44px}
  .crm-deal p {font-size:13px}
  .crm-actions {gap:10px;flex-wrap:wrap}
  .crm-actions button {flex:1 1 140px}
  .community-channels {gap:6px}.community-channels button {min-height:44px;padding:10px 14px;font-size:14px}
  .community-channel-heading h2 {font-size:18px}.community-feed {height:50dvh;min-height:260px;max-height:450px;overscroll-behavior:contain}
  .community-message {padding:16px 8px}.community-message button {min-height:40px;min-width:40px;font-size:12px}
  .community-compose textarea {min-height:88px;font-size:16px}
  .community-compose footer {gap:10px;flex-wrap:wrap}.community-compose footer button {min-height:44px}
  .schedule-filters {gap:10px;margin-bottom:16px}.schedule-filters label {flex:1;min-width:130px;display:grid;gap:5px}
  .schedule-legend {width:100%;font-size:11px;gap:10px}
  #scheduleGrid .fc-button {min-height:44px;font-size:13px}
  #scheduleGrid .fc-daygrid-day-number {padding:6px;font-size:13px}
  #scheduleGrid .fc-daygrid-day-frame {min-height:64px}
  #scheduleGrid .fc-daygrid-event {font-size:11px;min-height:22px}
  .toast {left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:none;width:auto;font-size:13px;padding:12px 14px;pointer-events:none}
  .auth-masthead {padding:12px 16px}
  .auth-wordmark .netro-logo-frame {width:70px;height:74px}.auth-wordmark .netro-logo-frame img {width:140px;left:-35px;top:-13px}
  .auth-entry {padding:48px 16px 24px}.auth-brand {margin-bottom:18px}
  .auth-brand h1 {font-size:25px}.auth-card {padding:22px}
  .auth-card input {font-size:16px!important;min-height:48px}.auth-card .primary-button,.google-sign-in {min-height:48px}
  .auth-card .password-field button {top:2px;right:2px}
  .auth-card .auth-links button {min-height:40px}
  .auth-footer {padding:18px 16px calc(18px + env(safe-area-inset-bottom))}
}
@media(max-width:360px) {
  .topbar {padding:10px 12px;gap:6px;grid-template-columns:40px minmax(0,1fr) 40px 32px}
  .topbar h1 {font-size:15px}.topbar>.navigation-toggle,.workspace-search-trigger {width:40px;min-width:40px;height:44px}
  .header-tools {width:40px;min-width:40px}.user-badge,.account-area {width:32px}
  .workspace-context-actions {gap:8px}.workspace-context-actions select {width:100%;flex-basis:100%}.workspace-context-actions .primary-button {max-width:none;width:100%}
  .metric-card {padding:12px}.metric-card>span {font-size:11px}.metric-card>span svg {display:none}
  .crm-page-heading {flex-wrap:wrap}.crm-heading-actions {margin-left:auto}
}
