:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #697386;
  --line: #e7e9ef;
  --soft: #f6f7fb;
  --panel: #ffffff;
  --nav: #071426;
  --nav-2: #0b2038;
  --blue: #4d67ff;
  --blue-dark: #3348dc;
  --green: #00a86b;
  --orange: #e78218;
  --red: #d6455d;
  --purple: #8b5cf6;
  --shadow: 0 18px 50px rgba(20, 33, 61, .13);
  --radius: 14px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--soft); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template: 58px minmax(0, 1fr) / 292px minmax(0, 1fr);
}

.topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 292px minmax(260px, 620px) 1fr;
  align-items: center;
  background: var(--nav);
  color: white;
  border-bottom: 1px solid rgba(255,255,255,.1);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  background: transparent;
  border: 0;
  color: white;
  cursor: pointer;
  text-align: left;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-weight: 850;
  background: linear-gradient(145deg, #7c8cff, #4d67ff);
  box-shadow: 0 7px 20px rgba(77,103,255,.4);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; letter-spacing: .02em; }
.brand small { margin-top: 1px; color: #9fb0c6; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }

.global-search {
  height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  padding: 0 10px;
}
.global-search:focus-within { border-color: #7f90ff; background: rgba(255,255,255,.14); }
.global-search input { width: 100%; border: 0; outline: 0; background: transparent; color: white; font-size: 13px; }
.global-search input::placeholder { color: #9fb0c6; }
kbd { padding: 2px 6px; border-radius: 5px; font-size: 10px; color: #aebbd0; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); }

.top-actions { justify-self: end; display: flex; gap: 6px; align-items: center; padding-right: 18px; }
.user-menu { display: flex; align-items: center; gap: 9px; border: 0; color: inherit; background: transparent; cursor: pointer; padding: 3px 6px; border-radius: 9px; }
.user-menu:hover { background: rgba(255,255,255,.08); }
.user-meta { display: grid; text-align: left; line-height: 1.1; }
.user-meta strong { font-size: 12px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: #94a3b8; font-size: 10px; margin-top: 3px; }
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-size: 18px;
}
.topbar .icon-button:hover { background: rgba(255,255,255,.12); }
.icon-button.light { color: white; background: rgba(255,255,255,.1); }
.avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #00a86b; font-size: 11px; font-weight: 800; margin-left: 5px; }

.sidebar {
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  color: #dce6f4;
  min-height: calc(100vh - 58px);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow: hidden;
}
.sidebar-head { padding: 20px 16px 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-head strong { display: block; font-size: 14px; }
.eyebrow { display: block; color: #91a4bd; font-size: 9px; font-weight: 800; letter-spacing: .16em; margin-bottom: 5px; }
.primary-nav { padding: 0 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.nav-link { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 0; border-radius: 8px; color: #b9c8da; background: transparent; cursor: pointer; text-align: left; font-size: 13px; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(255,255,255,.09); }
.nav-link span { width: 18px; text-align: center; }

.workspace-tree { padding: 14px 9px 40px; overflow: auto; scrollbar-width: thin; flex: 1; }
.workspace-section { margin-bottom: 14px; }
.workspace-label { width: 100%; padding: 7px 8px; display: flex; align-items: center; gap: 9px; border: 0; background: transparent; color: white; cursor: pointer; text-align: left; font-size: 12px; font-weight: 750; }
.workspace-label small { margin-left: auto; color: #8092a9; font-weight: 600; }
.workspace-dot { width: 9px; height: 9px; border-radius: 3px; background: #579bfc; box-shadow: 0 0 0 3px rgba(87,155,252,.16); }
.workspace-section:nth-child(2) .workspace-dot { background: #00c875; box-shadow: 0 0 0 3px rgba(0,200,117,.15); }
.workspace-section:nth-child(3) .workspace-dot { background: #a25ddc; box-shadow: 0 0 0 3px rgba(162,93,220,.16); }
.tree-list { list-style: none; padding: 0; margin: 2px 0; }
.tree-list .tree-list { padding-left: 13px; border-left: 1px solid rgba(255,255,255,.08); margin-left: 9px; }
.folder-row { padding: 6px 8px; color: #9fb0c6; font-size: 11px; font-weight: 750; letter-spacing: .02em; display: flex; gap: 7px; align-items: center; }
.folder-row { width: 100%; border: 0; background: transparent; cursor: pointer; text-align: left; }
.folder-row:hover { color: white; background: rgba(255,255,255,.06); }
.workspace-row { display: grid; grid-template-columns: minmax(0,1fr) 34px; align-items: center; }
.tree-add { width: 30px; height: 30px; border: 0; border-radius: 7px; color: #a9bad0; background: transparent; cursor: pointer; }
.tree-add:hover { color: white; background: rgba(255,255,255,.1); }
.workspace-logo { width: 20px; height: 20px; border-radius: 5px; object-fit: contain; background: white; }
.board-link .board-icon { color: var(--board-color, #9fb0c6); }
.board-link { width: 100%; padding: 7px 8px 7px 11px; border: 0; border-radius: 7px; background: transparent; color: #b9c8da; display: flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; font-size: 12px; line-height: 1.25; }
.board-link:hover, .board-link.active { background: rgba(255,255,255,.095); color: white; }
.board-icon { flex: 0 0 auto; width: 15px; height: 15px; border: 1px solid #6e8299; border-radius: 4px; display: grid; place-items: center; font-size: 8px; }
.pending-mark { width: 6px; height: 6px; border-radius: 50%; background: #fdab3d; margin-left: auto; flex: 0 0 auto; }
.sidebar-foot { padding: 15px 18px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.12); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: 11px; }
.sidebar-foot small { font-size: 9px; margin-top: 2px; color: #7f93aa; }
.local-dot { width: 8px; height: 8px; border-radius: 50%; background: #00c875; box-shadow: 0 0 0 4px rgba(0,200,117,.12); }

.main { min-width: 0; padding: 0; background: #fff; }
.loading-state { height: calc(100vh - 58px); display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 28px; height: 28px; border: 3px solid #e3e7f0; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.page-head { padding: 24px 30px 13px; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 58px; z-index: 15; }
.head-row { display: flex; align-items: flex-start; gap: 18px; }
.head-title { min-width: 0; flex: 1; }
.crumbs { color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.title-line { display: flex; align-items: center; gap: 10px; }
.title-line h1 { font-size: 25px; line-height: 1.2; margin: 0; letter-spacing: -.025em; }
.head-description { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.head-actions { display: flex; align-items: center; gap: 8px; }
.button { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: white; font-weight: 700; font-size: 12px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; justify-content: center; }
.button:hover { background: var(--soft); }
.button.primary { border-color: var(--blue); background: var(--blue); color: white; }
.button.primary:hover { background: var(--blue-dark); }
.button.ghost { background: transparent; }
.button.small { padding: 6px 9px; font-size: 11px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 750; color: #196e4e; background: #e7f8f0; }
.badge.pending { color: #8a5511; background: #fff4df; }
.badge.private { color: #7d3b3b; background: #faecee; }

.view-tabs { display: flex; gap: 4px; margin-top: 18px; }
.view-tab { border: 0; border-bottom: 2px solid transparent; padding: 8px 10px; background: transparent; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.view-tab.active { border-bottom-color: var(--blue); color: var(--ink); }

.toolbar { min-height: 54px; padding: 10px 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; background: white; position: sticky; top: 167px; z-index: 12; }
.board-search { min-width: 235px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; height: 34px; padding: 0 10px; }
.board-search:focus-within { border-color: #8b9bff; box-shadow: 0 0 0 3px rgba(77,103,255,.08); }
.board-search input { width: 100%; border: 0; outline: 0; font-size: 12px; }
.toolbar select { height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 29px 0 10px; background: white; color: var(--ink); font-size: 11px; font-weight: 650; }
.toolbar-spacer { flex: 1; }

.board-canvas { min-height: 500px; padding: 24px 30px 80px; background: #f8f9fc; }
.group-card { margin: 0 0 20px; background: white; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; box-shadow: 0 3px 12px rgba(32,50,82,.045); }
.group-head { height: 45px; display: flex; align-items: center; gap: 9px; padding: 0 13px; border-bottom: 1px solid var(--line); }
.group-accent { width: 4px; height: 22px; border-radius: 4px; background: #579bfc; }
.group-card:nth-child(5n+2) .group-accent { background: #00c875; }
.group-card:nth-child(5n+3) .group-accent { background: #fdab3d; }
.group-card:nth-child(5n+4) .group-accent { background: #a25ddc; }
.group-card:nth-child(5n+5) .group-accent { background: #e2445c; }
.group-head h2 { font-size: 13px; margin: 0; }
.group-count { color: var(--muted); font-size: 10px; }
.group-head .icon-button { margin-left: auto; color: var(--muted); font-size: 14px; }
.group-table-wrap { overflow: auto; }
.board-table { width: 100%; min-width: 780px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.board-table th, .board-table td { height: 39px; padding: 6px 10px; text-align: left; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; vertical-align: middle; }
.board-table th { height: 35px; position: sticky; top: 0; z-index: 2; background: #fbfcfe; color: #606b7c; font-weight: 750; }
.board-table th:first-child, .board-table td:first-child { width: 310px; position: sticky; left: 0; z-index: 3; background: white; }
.board-table th:first-child { background: #fbfcfe; z-index: 4; }
.board-table th:not(:first-child), .board-table td:not(:first-child) { width: 170px; }
.board-table tr:hover td { background-color: #fafbff; }
.board-table tr:hover td:first-child { background-color: #f7f8ff; }
.item-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row-grip { color: #c1c7d1; font-size: 9px; }
.item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; padding: 0; cursor: pointer; text-align: left; font-weight: 650; color: #25304a; }
.item-name:hover { color: var(--blue); }
.subitem .item-name { font-weight: 500; }
.subitem td:first-child { padding-left: 34px; }
.sub-line { width: 12px; height: 12px; border-left: 1px solid #cbd2df; border-bottom: 1px solid #cbd2df; margin-top: -8px; }
.update-count { margin-left: auto; border: 0; background: transparent; color: #8b96a8; font-size: 10px; cursor: pointer; }
.cell-button { width: 100%; min-height: 25px; border: 0; border-radius: 5px; background: transparent; text-align: left; cursor: text; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-button:hover { background: #f0f2f7; }
.people-cell-button { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.people-cell-button:hover, .people-cell-button:focus-visible { background: #e9edff; outline: 2px solid #6b7cff; outline-offset: -2px; }
.cell-edit-hint { flex: 0 0 auto; color: #68708a; font-size: 12px; opacity: .75; }
.cell-editor { width: 100%; height: 28px; border: 1px solid var(--blue); border-radius: 5px; outline: 0; padding: 4px 6px; box-shadow: 0 0 0 2px rgba(77,103,255,.12); }
.status-pill { display: inline-flex; max-width: 100%; padding: 4px 8px; border-radius: 5px; color: #525f72; background: #edf0f4; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill.done { color: #08704a; background: #dff7ed; }
.status-pill.progress { color: #925100; background: #ffedcf; }
.status-pill.high { color: #7a2541; background: #fde6ef; }
.status-pill.info { color: #2f4fb6; background: #e7ebff; }
.secret-mask { color: #7b3344; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .08em; }
.add-row td { background: #fbfcfe; }
.add-item-form { display: flex; gap: 8px; align-items: center; }
.add-item-form input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.empty-cell { color: #c3c8d2; }

.empty-board { max-width: 760px; margin: 50px auto; padding: 38px; background: white; border: 1px solid var(--line); border-radius: 16px; text-align: center; box-shadow: var(--shadow); }
.empty-icon { width: 54px; height: 54px; margin: auto; border-radius: 16px; display: grid; place-items: center; background: #fff4df; color: #a26314; font-size: 25px; }
.empty-board h2 { margin: 17px 0 8px; font-size: 20px; }
.empty-board p { margin: 0 auto 18px; max-width: 540px; color: var(--muted); line-height: 1.65; font-size: 12px; }
.empty-board code { background: #f0f2f7; border-radius: 5px; padding: 2px 5px; }

.dashboard { padding: 28px 30px 70px; background: #f7f8fc; min-height: calc(100vh - 58px); }
.dashboard-hero { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 24px; }
.dashboard-hero h1 { font-size: 28px; letter-spacing: -.03em; margin: 4px 0 6px; }
.dashboard-hero p { margin: 0; color: var(--muted); font-size: 12px; }
.freshness { color: #19704e; background: #e4f7ee; padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 750; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 18px; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 17px; box-shadow: 0 3px 12px rgba(32,50,82,.04); }
.metric-card span { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: 9px; font-size: 26px; letter-spacing: -.03em; }
.metric-card small { display: block; margin-top: 3px; color: #8892a3; font-size: 10px; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 16px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 13px; padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel-head h2 { font-size: 14px; margin: 0; }
.panel-head small { color: var(--muted); font-size: 10px; }
.workspace-stat { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 60px; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.workspace-stat:first-of-type { border-top: 0; }
.workspace-stat strong { font-size: 11px; }
.workspace-stat small { display: block; margin-top: 3px; color: var(--muted); }
progress { width: 100%; height: 8px; border: 0; border-radius: 99px; overflow: hidden; }
progress::-webkit-progress-bar { background: #edf0f5; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #4d67ff, #7c8cff); border-radius: 99px; }
.stat-number { text-align: right; font-size: 11px; font-weight: 800; }
.status-row { display: grid; grid-template-columns: minmax(100px, 1fr) 45px; gap: 10px; align-items: center; margin: 10px 0; }
.status-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.status-row strong { text-align: right; font-size: 11px; }
.activity-item { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.activity-item:first-child { border-top: 0; }
.activity-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: #eef1ff; color: var(--blue); }
.activity-item p { margin: 0; font-size: 11px; line-height: 1.35; }
.activity-item time { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }

.drawer { position: fixed; top: 0; right: 0; width: min(440px, 94vw); height: 100vh; z-index: 60; background: white; box-shadow: -24px 0 60px rgba(13,28,49,.18); transform: translateX(105%); transition: transform .22s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(7,20,38,.28); }
.drawer-head { padding: 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.drawer-head h2 { margin: 0; font-size: 19px; }
.drawer-content { padding: 18px 22px 40px; overflow: auto; flex: 1; }
.update-card { padding: 13px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.update-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 9px; color: var(--muted); }
.update-card p { margin: 8px 0 0; white-space: pre-wrap; line-height: 1.55; font-size: 11px; }
.update-compose { display: grid; gap: 8px; margin-bottom: 17px; }
.update-compose textarea { min-height: 85px; resize: vertical; border: 1px solid var(--line); border-radius: 9px; padding: 10px; outline: 0; }
.update-compose textarea:focus { border-color: var(--blue); }
.automation-card { padding: 13px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; }
.automation-card strong { font-size: 11px; }
.automation-card p { color: var(--muted); font-size: 10px; line-height: 1.5; }
.toggle { position: relative; width: 34px; height: 20px; border: 0; border-radius: 20px; background: #ccd2dd; cursor: pointer; float: right; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; transition: .2s; }
.toggle.on { background: var(--green); }
.toggle.on::after { left: 17px; }

.form-dialog { width: min(680px, calc(100vw - 30px)); max-height: 90vh; border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow); overflow: hidden; }
.form-dialog::backdrop { background: rgba(7,20,38,.36); backdrop-filter: blur(2px); }
.dialog-head { display: flex; justify-content: space-between; padding: 22px 22px 12px; }
.dialog-head h2 { margin: 0; font-size: 20px; }
.dialog-fields { max-height: calc(90vh - 145px); padding: 10px 22px; display: grid; gap: 14px; overflow-y: auto; }
.field { display: grid; gap: 6px; }
.field span { font-size: 10px; font-weight: 750; color: #596579; }
.field input, .field select { width: 100%; height: 39px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; outline: 0; }
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(77,103,255,.08); }
.dialog-actions { padding: 16px 22px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 10px 14px; border-radius: 9px; background: #101b2d; color: white; box-shadow: var(--shadow); font-size: 11px; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error-banner { margin: 30px; padding: 18px; color: #7d2738; background: #ffedf0; border: 1px solid #f4cbd3; border-radius: 10px; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .topbar { grid-template-columns: 230px minmax(240px, 1fr) auto; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-head, .toolbar, .board-canvas, .dashboard { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 720px) {
  .app-shell { display: block; padding-top: 58px; }
  .topbar { position: fixed; grid-template-columns: auto 1fr auto; inset: 0 0 auto; }
  .brand { width: 58px; padding: 0 13px; }
  .brand > span:last-child, .global-search kbd, .top-actions .icon-button { display: none; }
  .global-search { margin-right: 8px; }
  .sidebar { position: fixed; z-index: 45; top: 58px; left: 0; width: 270px; transform: translateX(-101%); transition: transform .2s; }
  .sidebar.mobile-open { transform: translateX(0); }
  .page-head { top: 58px; padding: 18px 15px 10px; }
  .toolbar { top: 151px; padding: 8px 15px; overflow-x: auto; }
  .board-canvas, .dashboard { padding: 18px 15px 60px; }
  .head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
}

/* Operational controls introduced in the secure workspace upgrade. */
.notification-button { position: relative; }
.notification-count {
  position: absolute; top: -2px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px;
  display: grid; place-items: center; border: 2px solid var(--nav); border-radius: 999px;
  color: white; background: var(--red); font-size: 8px; font-weight: 850;
}
.access-chip { margin-left: auto; color: #8092a9; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.danger-card { border-color: #f3d0d6; background: linear-gradient(145deg, #fff, #fff8f9); }
.danger-card strong, .danger { color: var(--red) !important; }
.finance-grid .metric-card { border-top: 3px solid #00a86b; }
.wide-left { grid-template-columns: minmax(0, 1.65fr) minmax(260px, .65fr); }

.project-risk {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 2px; border: 0; border-top: 1px solid var(--line); background: transparent;
  cursor: pointer; text-align: left;
}
.project-risk:first-of-type { border-top: 0; }
.project-risk:hover strong, .table-link:hover { color: var(--blue); }
.project-risk strong, .project-risk small { display: block; }
.project-risk strong { font-size: 11px; }
.project-risk small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.risk-number { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #276c54; background: #e5f7ef; font-size: 9px; font-weight: 800; }

.board-kpis {
  padding: 13px 30px; display: flex; gap: 9px; overflow-x: auto; border-bottom: 1px solid var(--line); background: #f8f9fc;
}
.board-kpis > div { min-width: 112px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.board-kpis span, .board-kpis strong { display: block; }
.board-kpis span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.board-kpis strong { margin-top: 3px; font-size: 16px; }
.drop-hint { margin-left: auto; color: #b0b7c4; font-size: 9px; opacity: 0; transition: opacity .2s; }
.group-card:hover .drop-hint { opacity: 1; }
.group-head .drop-hint + .icon-button { margin-left: 0; }
.row-actions-head, .row-actions { width: 78px !important; }
.row-actions { padding: 2px 5px !important; white-space: nowrap; }
.row-actions .icon-button { display: inline-grid; width: 28px; height: 28px; color: var(--muted); font-size: 13px; }
.danger-icon:hover, .danger-button { color: #a9233e !important; background: #fff0f3 !important; border-color: #f0c5ce !important; }
[data-item-row] { transition: opacity .12s, box-shadow .12s; }
[data-item-row].dragging { opacity: .38; }
[data-item-row].drop-target td { box-shadow: inset 0 3px 0 var(--blue); }
.row-grip { cursor: grab; user-select: none; }
.name-editor { width: 100%; height: 28px; padding: 4px 7px; border: 1px solid var(--blue); border-radius: 5px; outline: 0; box-shadow: 0 0 0 2px rgba(77,103,255,.12); }
.person-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px 3px 3px; border-radius: 999px; color: #35415a; background: #edf0ff; font-size: 9px; font-weight: 750; }
.mini-avatar { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: white; background: linear-gradient(145deg, #4d67ff, #8b5cf6); font-size: 9px; font-weight: 850; }
.person-pill .mini-avatar { width: 19px; height: 19px; border-radius: 50%; font-size: 7px; }

.drawer-actions { display: flex; gap: 7px; margin-bottom: 14px; }
.file-picker { padding: 12px; border: 1px dashed #b8c0cf; border-radius: 9px; color: #536076; background: #fafbfe; cursor: pointer; text-align: center; font-size: 10px; font-weight: 750; }
.file-picker:hover { border-color: var(--blue); color: var(--blue); background: #f5f6ff; }
.file-picker input { display: none; }
.selected-files { display: grid; gap: 4px; color: var(--muted); font-size: 9px; }
.attachment-list { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.image-attachment, .file-attachment { min-width: 0; color: inherit; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: white; text-decoration: none; }
.attachment-list button.image-attachment, .attachment-list button.file-attachment { width: 100%; font: inherit; cursor: pointer; text-align: left; }
.image-attachment img { width: 100%; height: 116px; display: block; object-fit: cover; background: var(--soft); }
.image-attachment span { display: block; padding: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.file-attachment { padding: 10px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 7px; align-items: center; }
.file-attachment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; font-weight: 750; }
.file-attachment small { grid-column: 2; color: var(--muted); font-size: 8px; }
.google-file { border-color: #cbdcf8; background: #f7faff; }
.compose-attachments { display: flex; flex-wrap: wrap; gap: 7px; }
.compose-attachments .file-picker { width: auto; }
.file-preview { min-height: 320px; display: grid; place-items: center; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #f3f5f8; }
.file-preview-image { max-width: 100%; max-height: 70dvh; display: block; object-fit: contain; }
.file-preview-frame { width: 100%; min-height: 68dvh; border: 0; background: white; }
.file-preview-frame.compact { min-height: 46dvh; border: 1px solid var(--line); border-radius: 8px; }
.file-preview-empty { max-width: 360px; padding: 30px; color: var(--muted); text-align: center; }
.markup-canvas { width: 100%; max-height: 52dvh; display: block; border: 1px solid var(--line); border-radius: 9px; background: #eef1f5; cursor: crosshair; touch-action: none; }
.person-stack { display: flex; flex-wrap: wrap; gap: 4px; }
.people-picker { display: grid; gap: 7px; }
.person-choice { padding: 9px; display: grid; grid-template-columns: 20px 28px minmax(0,1fr); gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.person-choice:has(input:checked) { border-color: #a9b4ff; background: #f3f4ff; }
.person-choice strong, .person-choice small { display: block; }
.person-choice small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.color-field input[type="color"] { width: 100%; height: 48px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: white; cursor: pointer; }
.brand-mark.custom-logo { padding: 3px; background: white; }
.brand-mark.custom-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.notification-summary { margin-bottom: 10px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.notification-summary > div { padding: 9px; display: grid; border: 1px solid var(--line); border-radius: 9px; background: #f8f9fc; }
.notification-summary strong { font-size: 16px; }
.notification-summary span { color: var(--muted); font-size: 8px; }
.notification-types { margin-bottom: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.notification-types span { padding: 4px 7px; border-radius: 99px; color: #4c5c77; background: #edf0f7; font-size: 8px; text-transform: capitalize; }

.responsive-table { width: 100%; overflow-x: auto; }
.modern-table { width: 100%; border-collapse: collapse; }
.modern-table th, .modern-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; vertical-align: middle; }
.modern-table th { color: var(--muted); background: #fbfcfe; font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
.modern-table tr:last-child td { border-bottom: 0; }
.overdue-row { background: #fff7f8; }
.table-link { padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; text-align: left; font-weight: 750; }
.workload-row { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.workload-row:first-of-type { border-top: 0; }
.workload-row strong, .workload-row small { display: block; }
.workload-row strong { font-size: 10px; }
.workload-row small { margin-top: 2px; color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; }
.workload-row b { color: #33405a; font-size: 11px; }
.workload-row em { color: var(--red); font-style: normal; }
.project-toggle-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.project-toggle { padding: 9px 11px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; font-size: 10px; }

.management-layout { min-height: calc(100vh - 143px); display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); background: #f7f8fc; }
.user-list { padding: 18px 12px; border-right: 1px solid var(--line); background: white; }
.user-card { width: 100%; display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; text-align: left; }
.user-card:hover { background: var(--soft); }
.user-card.active { border-color: #cdd4ff; background: #f1f3ff; }
.user-card strong, .user-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card strong { font-size: 10px; }
.user-card small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.role-chip { padding: 4px 6px; border-radius: 999px; color: #4b57a3; background: #e7eaff; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.user-access-panel { min-width: 0; padding: 22px 26px 70px; }
.access-form-head { position: sticky; top: 58px; z-index: 10; display: flex; justify-content: space-between; gap: 20px; align-items: center; margin: -22px -26px 17px; padding: 17px 26px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.access-form-head h2 { margin: 0; font-size: 18px; }
.access-form-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.access-controls { display: grid; grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1fr) repeat(3, minmax(120px, .7fr)); gap: 10px; align-items: end; margin-bottom: 18px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.checkbox-field { min-height: 39px; display: flex; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; color: #4f5b70; font-size: 10px; font-weight: 700; }
.checkbox-field input { accent-color: var(--blue); }
.access-board-list { display: grid; gap: 12px; }
.access-workspace { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.access-workspace h4 { margin: 0 0 7px; font-size: 12px; }
.board-access-row { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.board-access-row strong, .board-access-row small { display: block; }
.board-access-row strong { font-size: 10px; }
.board-access-row small { margin-top: 3px; color: var(--muted); font-size: 8px; text-transform: capitalize; }
.board-access-row select { height: 32px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; background: white; font-size: 10px; }

.settings-form { display: grid; gap: 11px; }
.settings-access { margin: 22px 0 16px; padding-top: 17px; border-top: 1px solid var(--line); }
.settings-access h3 { margin: 0 0 8px; font-size: 13px; }
.role-banner { display: inline-flex; padding: 5px 8px; border-radius: 999px; color: #4554b6; background: #eaedff; font-size: 9px; font-weight: 850; }
.access-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 9px; }
.access-row strong { color: #41604f; text-transform: uppercase; }
.full-width { width: 100%; }

.payroll-toolbar { margin-bottom: 15px; padding: 14px; display: flex; gap: 16px; align-items: end; border: 1px solid var(--line); border-radius: 12px; background: white; }
.payroll-toolbar .field { min-width: 170px; }
.legal-note { flex: 1; padding: 10px 12px; display: grid; gap: 3px; border-left: 3px solid var(--green); background: #f1faf6; }
.legal-note strong { font-size: 10px; }
.legal-note span { color: #4f6b60; font-size: 9px; }
.payroll-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.payroll-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 3px 12px rgba(32,50,82,.04); }
.payroll-person { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-bottom: 14px; }
.payroll-person strong, .payroll-person small { display: block; }
.payroll-person strong { font-size: 11px; }
.payroll-person small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.payroll-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.payroll-inputs label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 750; }
.payroll-inputs input { width: 100%; height: 33px; border: 1px solid var(--line); border-radius: 7px; padding: 0 8px; outline: 0; }
.payroll-inputs input:focus { border-color: var(--blue); }
.payroll-result { margin-top: 15px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.payroll-result div { padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fbfcfe; }
.payroll-result span, .payroll-result strong { display: block; }
.payroll-result span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.payroll-result strong { margin-top: 3px; font-size: 11px; }
.legal-disclaimer { margin-top: 15px; padding: 13px 15px; border: 1px solid #f0dfbb; border-radius: 10px; color: #685634; background: #fffaf0; font-size: 9px; line-height: 1.6; }
.audit-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.audit-entry:first-of-type { border-top: 0; }
.audit-entry strong { font-size: 10px; text-transform: capitalize; }
.audit-entry span, .audit-entry time { color: var(--muted); font-size: 8px; }
.audit-entry code { grid-column: 1 / -1; max-width: 100%; overflow: auto; padding: 6px; border-radius: 5px; background: var(--soft); color: #566176; font-size: 7px; }
.notification-row { width: 100%; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 9px; align-items: start; padding: 11px 8px; border: 0; border-top: 1px solid var(--line); background: white; cursor: pointer; text-align: left; }
.notification-row.unread { background: #f4f6ff; }
.notification-row strong, .notification-row small, .notification-row time { display: block; }
.notification-row strong { font-size: 10px; }
.notification-row small { margin-top: 3px; color: #566176; font-size: 9px; }
.notification-row time { margin-top: 4px; color: var(--muted); font-size: 8px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Executive Sales Funnel and revenue forecasting */
.sales-dashboard { display: grid; gap: 14px; }
.sales-kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.sales-kpi { min-width: 0; padding: 14px 15px; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 3px 12px rgba(32,50,82,.04); text-align: left; }
.sales-kpi:not(:disabled) { cursor: pointer; }
.sales-kpi:not(:disabled):hover { border-color: #b9c2ff; transform: translateY(-1px); }
.sales-kpi span { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.sales-kpi strong { overflow: hidden; font-size: clamp(16px, 1.8vw, 24px); text-overflow: ellipsis; white-space: nowrap; }
.sales-kpi small { color: #6a7587; font-size: 8px; }
.sales-kpi.good { border-top: 3px solid var(--green); }
.sales-kpi.warning { border-top: 3px solid #f6a723; background: #fffaf1; }
.sales-kpi.danger { border-top: 3px solid var(--red); background: #fff6f8; }
.sales-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 14px; }
.sales-funnel { display: grid; gap: 8px; }
.funnel-row { display: grid; grid-template-columns: 135px minmax(100px, 1fr) 95px; gap: 11px; align-items: center; padding: 4px 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.funnel-row:hover strong { color: var(--blue); }
.funnel-label strong, .funnel-label small { display: block; }
.funnel-label strong { font-size: 10px; }
.funnel-label small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.funnel-track { height: 11px; overflow: hidden; border-radius: 99px; background: #edf0f5; }
.funnel-track i { height: 100%; display: block; min-width: 0; border-radius: inherit; }
.funnel-row b { font-size: 10px; text-align: right; }
.stage-lead { background: #8994a6 !important; }
.stage-qualified { background: #5b83d6 !important; }
.stage-discovery { background: #6370e8 !important; }
.stage-proposal { background: #8b5cf6 !important; }
.stage-negotiation { background: #ec8d2b !important; }
.stage-verbal { background: #dfb21c !important; }
.stage-won { background: #16a36b !important; }
.stage-lost { background: #d7495f !important; }
.sales-stage { display: inline-flex; padding: 4px 7px; border-radius: 999px; color: white; font-size: 8px; font-weight: 850; white-space: nowrap; }
.forecast-label { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.attention-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.attention-grid > * { padding: 11px; display: grid; gap: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; text-align: left; }
.attention-grid button { color: inherit; cursor: pointer; }
.attention-grid strong { font-size: 18px; }
.attention-grid span { color: var(--muted); font-size: 8px; }
.mentor-note { margin-top: 12px; padding: 11px 13px; border-left: 3px solid #6272e8; border-radius: 7px; color: #4b5670; background: #f3f5ff; }
.mentor-note strong { font-size: 9px; }
.mentor-note p { margin: 5px 0 0; font-size: 8px; line-height: 1.6; }
.sales-table-panel { overflow: hidden; padding: 0; }
.sales-table-panel .panel-head { padding: 16px 18px 11px; }
.sales-table { min-width: 1120px; }
.sales-table td { font-size: 8px; }
.sales-deal-name strong, .sales-deal-name small { display: block; }
.sales-deal-name small { margin-top: 3px; color: var(--muted); font-size: 7px; font-weight: 500; }
.health-dot { width: 7px; height: 7px; display: inline-block; margin-right: 5px; border-radius: 50%; }
.health-good { background: var(--green); }
.health-medium { background: #f6a723; }
.health-high { background: var(--red); }
.data-gap { color: #9d6c18; font-size: 8px; font-weight: 750; }
.data-quality { padding: 5px 8px; border-radius: 99px; color: #3b6b58; background: #eaf8f2; font-size: 8px; font-weight: 800; }
.revenue-stack, .concentration-bars, .forecast-bars { display: grid; gap: 12px; }
.revenue-stack > div, .concentration-bars > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
.revenue-stack span, .concentration-bars span { color: var(--muted); font-size: 9px; }
.revenue-stack strong, .concentration-bars b { font-size: 10px; }
.revenue-stack i, .concentration-bars i { grid-column: 1 / -1; height: 6px; max-width: 100%; border-radius: 99px; background: linear-gradient(90deg, #576cff, #9c65eb); }
.concentration-bars i { background: linear-gradient(90deg, #ef9e2e, #e25d68); }
.forecast-bars > div { display: grid; grid-template-columns: 105px minmax(80px, 1fr) 90px; gap: 10px; align-items: center; }
.forecast-bars span strong, .forecast-bars span small { display: block; }
.forecast-bars span strong { font-size: 9px; }
.forecast-bars span small { color: var(--muted); font-size: 7px; }
.forecast-bars i { height: 9px; border-radius: 99px; background: linear-gradient(90deg, #6370e8, #9c65eb); }
.forecast-bars b { font-size: 9px; text-align: right; }
.forecast-category { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 9px; }
.forecast-category:first-of-type { border-top: 0; }
.forecast-category small { margin-left: 5px; color: var(--muted); }
.stage-board-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.stage-board-grid button { padding: 12px; display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 10px; color: inherit; background: #fbfcfe; cursor: pointer; text-align: left; }
.stage-board-grid button:hover { border-color: #b9c2ff; }
.stage-board-grid strong { font-size: 15px; }
.stage-board-grid small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.sales-filter-buttons { display: flex; flex-wrap: wrap; gap: 5px; text-transform: capitalize; }
.sales-definition { padding: 12px 14px; border: 1px solid #d7def2; border-radius: 10px; color: #526077; background: #f7f9ff; font-size: 8px; line-height: 1.6; }
.deal-link { flex: 0 0 auto; padding: 3px 6px; border: 1px solid #ccd4ff; border-radius: 99px; color: #4d5bb5; background: #f2f4ff; font-size: 7px; font-weight: 800; cursor: pointer; }
.deal-link.linked { color: #267055; border-color: #c3e8d8; background: #eaf8f2; }
.opportunity-summary { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.opportunity-summary > p, .opportunity-summary > .sales-stage { grid-column: 1 / -1; justify-self: start; margin: 0; }
.opportunity-summary > p { color: var(--muted); font-size: 8px; }
.opportunity-summary div span, .opportunity-summary div strong { display: block; }
.opportunity-summary div span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.opportunity-summary div strong { margin-top: 3px; font-size: 12px; }
.opportunity-details { margin-top: 14px; }
.opportunity-details p { display: flex; justify-content: space-between; gap: 15px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.opportunity-details span { color: var(--muted); font-size: 8px; }
.opportunity-details strong { max-width: 60%; font-size: 8px; text-align: right; }
.sales-alerts { display: grid; gap: 6px; margin-top: 12px; }
.sales-alerts p { margin: 0; padding: 8px 10px; display: grid; gap: 3px; border-radius: 7px; color: #806223; background: #fff8e8; font-size: 8px; }
.sales-alerts p.high { color: #8f2f40; background: #fff0f3; }
.sales-alerts strong { text-transform: capitalize; }
.sales-health-good { margin-top: 12px; padding: 9px; border-radius: 7px; color: #267055; background: #eaf8f2; font-size: 8px; font-weight: 750; }
.sales-activity-list { margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.sales-activity-list h3 { margin: 0 0 8px; font-size: 11px; }
.sales-activity-list article { padding: 9px 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 7px; border-top: 1px solid var(--line); }
.sales-activity-list article > span { padding: 2px 5px; border-radius: 99px; color: #4d5bb5; background: #eef0ff; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.sales-activity-list article strong { font-size: 9px; }
.sales-activity-list article small, .sales-activity-list article p { grid-column: 2; margin: 0; color: var(--muted); font-size: 7px; line-height: 1.5; }
.dialog-section-title { margin-top: 5px; padding-top: 12px; border-top: 1px solid var(--line); color: #38445a; font-size: 10px; font-weight: 850; }
.dialog-fields textarea { min-height: 78px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; resize: vertical; }
.sales-access-controls { grid-template-columns: repeat(4, minmax(145px, 1fr)); }

@media (max-width: 1180px) {
  .access-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payroll-grid { grid-template-columns: 1fr; }
  .sales-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .management-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .project-toggle-list { grid-template-columns: 1fr; }
  .board-kpis { padding-left: 20px; padding-right: 20px; }
  .sales-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .user-meta { display: none; }
  .management-layout { display: block; }
  .user-list { display: flex; gap: 7px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .user-card { min-width: 230px; }
  .user-access-panel { padding: 16px 15px 60px; }
  .access-form-head { top: 58px; margin: -16px -15px 14px; padding: 13px 15px; }
  .access-controls, .payroll-inputs, .payroll-result { grid-template-columns: 1fr 1fr; }
  .wide-left { grid-template-columns: 1fr; }
  .payroll-toolbar { align-items: stretch; flex-direction: column; }
  .board-access-row { grid-template-columns: minmax(0, 1fr) 105px; }
  .board-kpis { padding-left: 15px; padding-right: 15px; }
  .sales-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funnel-row { grid-template-columns: 105px minmax(70px, 1fr) 80px; }
}

@media (max-width: 480px) {
  .metrics-grid, .access-controls, .payroll-inputs, .payroll-result, .two-columns { grid-template-columns: 1fr; }
  .attachment-list { grid-template-columns: 1fr; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .access-form-head { align-items: flex-start; }
  .sales-kpi-grid, .stage-board-grid { grid-template-columns: 1fr; }
}

/* Responsive navigation, search, privacy and workflow refinements. */
.mobile-menu-button { display: none; }
.global-search-shell { position: relative; width: min(620px, 100%); }
.global-search-results {
  position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 100;
  max-height: min(520px, 70vh); overflow: auto; padding: 6px;
  border: 1px solid #dfe4ec; border-radius: 12px; color: var(--ink); background: white;
  box-shadow: 0 22px 70px rgba(7,20,38,.25);
}
.search-result { width: 100%; min-height: 55px; display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 8px; background: white; text-align: left; cursor: pointer; }
.search-result:hover, .search-result:focus { outline: 0; background: #f1f3ff; }
.search-result strong, .search-result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result strong { font-size: 11px; }
.search-result small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.search-result b { color: #9aa4b3; }
.search-kind { padding: 4px 6px; border-radius: 999px; color: #4d5bb5; background: #eef0ff; font-size: 8px; font-weight: 850; text-align: center; text-transform: uppercase; }
.search-loading, .search-empty { padding: 16px; color: var(--muted); font-size: 10px; text-align: center; }

.control-center-toggle { width: calc(100% - 20px); margin: 0 10px 5px; padding: 7px 10px; display: flex; justify-content: space-between; border: 0; border-radius: 7px; color: #8fa2ba; background: rgba(255,255,255,.045); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.workspace-picker { margin: 10px 10px 0; display: grid; gap: 5px; }
.workspace-picker span { color: #8396ae; font-size: 8px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.workspace-picker select { width: 100%; height: 37px; padding: 0 28px 0 10px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: white; background: #152b44; font-size: 11px; font-weight: 700; }
.sidebar-empty { padding: 18px 10px; color: #8ea1b8; font-size: 10px; line-height: 1.5; }
.sidebar-scrim { position: fixed; inset: 58px 0 0; z-index: 42; background: rgba(7,20,38,.45); backdrop-filter: blur(2px); }

.avatar.has-picture, .mini-avatar.has-picture, .profile-avatar.has-picture { overflow: hidden; background: #e9edf4; }
.avatar img, .mini-avatar img, .profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-avatar { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 14px; color: white; background: linear-gradient(145deg, #4d67ff, #8b5cf6); font-size: 13px; font-weight: 850; }
.profile-title, .account-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-identity { margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8f9fc; }
.account-identity strong, .account-identity small { display: block; }
.account-identity strong { font-size: 11px; }
.account-identity small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.form-dialog form { max-height: inherit; display: flex; flex-direction: column; }
.form-error { margin: 0 22px 4px; padding: 11px 13px; border: 1px solid #efbec8; border-radius: 9px; color: #8d263c; background: #fff0f3; font-size: 10px; font-weight: 700; line-height: 1.45; }
.form-error.inline { margin: 0 0 10px; order: -1; }
.dialog-fields { min-height: 0; }
.dialog-actions { background: white; }
input:invalid:focus, select:invalid:focus, textarea:invalid:focus { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(214,69,93,.1) !important; }
.toast { max-width: min(520px, calc(100vw - 30px)); text-align: center; }

.board-table th.secret-cell, .board-table td.secret-cell { width: 270px; min-width: 270px; }
.secret-control { min-height: 56px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 8px; align-items: center; padding: 7px 8px; border: 1px solid #f0d6dd; border-radius: 8px; background: #fff7f9; }
.secret-control .secret-value { min-width: 0; overflow: hidden; color: #7b3344; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.secret-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.secret-action { min-height: 28px; padding: 4px 7px; border: 1px solid #e5bcc6; border-radius: 6px; color: #8a4555; background: white; font-size: 8px; font-weight: 850; cursor: pointer; }
.secret-action:hover, .secret-action:focus-visible { outline: 0; border-color: #c8788d; background: #fff0f4; }
.secret-action.primary { border-color: #8754df; color: white; background: #8754df; }
.secret-control.revealed { border-color: #9bdcc3; background: #effbf6; }
.secret-control.revealed .secret-value { color: #125f44; letter-spacing: 0; user-select: text; }
.secret-control.empty .secret-value, .secret-control.restricted .secret-value { color: #9aa3b0; letter-spacing: 0; }
.secret-control.restricted { opacity: .78; }
.secret-restricted { color: #a25366; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.secret-editor-note { margin-bottom: 3px; padding: 12px 13px; display: grid; gap: 4px; border: 1px solid #dce2ff; border-radius: 9px; color: #394ba0; background: #f3f5ff; font-size: 10px; line-height: 1.45; }
.secret-editor-note span { color: #65708a; font-size: 9px; }
.secret-visibility-toggle { align-self: flex-start; }

.kpi-analytics { margin: 18px 30px 0; padding: 18px; border: 1px solid #dfe3ef; border-radius: 14px; background: linear-gradient(145deg,#fff,#f7f9ff); }
.kpi-summary { display: grid; grid-template-columns: repeat(8,minmax(95px,1fr)); gap: 8px; }
.kpi-summary > div { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.kpi-summary > div.good { border-top: 3px solid var(--green); background: #f4fcf8; }
.kpi-summary > div.warning { border-top: 3px solid #f0a52b; background: #fffaf0; }
.kpi-summary span, .kpi-summary strong { display: block; }
.kpi-summary span { min-height: 20px; color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.kpi-summary strong { margin-top: 5px; font-size: 17px; }
.kpi-table-details { margin-top: 12px; border-top: 1px solid var(--line); }
.kpi-table-details summary { padding: 12px 2px 2px; color: #4d5bb5; font-size: 9px; font-weight: 800; cursor: pointer; }
.kpi-summary-compact { grid-template-columns: repeat(4,minmax(120px,1fr)); }
.kpi-performance-grid { margin-top: 14px; display: grid; grid-template-columns: minmax(0,1.6fr) minmax(240px,.7fr); gap: 12px; align-items: stretch; }
.kpi-performance-grid > section { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.kpi-section-title { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-section-title strong { font-size: 10px; }
.kpi-section-title span { color: var(--muted); font-size: 8px; }
.kpi-trend { display: grid; gap: 8px; }
.kpi-trend-row { display: grid; grid-template-columns: minmax(115px,.8fr) minmax(100px,2fr) 46px; gap: 10px; align-items: center; }
.kpi-trend-row > span { min-width: 0; display: grid; }
.kpi-trend-row strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.kpi-trend-row small { color: var(--muted); font-size: 7px; }
.kpi-trend-row b { font-size: 9px; text-align: right; }
.kpi-trend-track { height: 9px; overflow: hidden; border-radius: 99px; background: #eef1f6; }
.kpi-trend-track i { height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg,#6161ff,#579bfc); }
.kpi-guidance { padding: 13px; display: grid; gap: 7px; border: 1px solid #dfe3ef; border-radius: 10px; color: #4f5d76; background: #f8f9ff; }
.kpi-focus > .kpi-guidance { margin-top: 12px; }
.kpi-guidance strong { color: var(--ink); font-size: 9px; }
.kpi-guidance span { font-size: 8px; line-height: 1.55; }
.form-guidance { padding: 11px 12px; display: grid; gap: 4px; border: 1px solid #dfe3ef; border-radius: 9px; color: #566176; background: #f7f8ff; }
.form-guidance strong { color: var(--ink); font-size: 9px; }
.form-guidance span { font-size: 8px; line-height: 1.45; }

.permission-details { grid-column: 1/-1; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
.permission-details summary { color: #566176; font-size: 9px; font-weight: 800; cursor: pointer; }
.permission-details .checkbox-field { display: inline-flex; margin: 9px 5px 0 0; background: white; }

.automation-builder { display: grid; gap: 10px; }
.recipe-heading { margin-top: 4px; padding: 9px 10px; display: flex; gap: 9px; align-items: center; border-radius: 8px; color: #44506a; background: #eef1ff; font-size: 9px; }
.recipe-heading span { padding: 3px 6px; border-radius: 99px; color: white; background: var(--blue); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.automation-status-fields, .automation-date-fields { display: grid; gap: 10px; }

.privacy-banner { margin-bottom: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; border: 1px solid #cfe4db; border-radius: 10px; color: #315c4c; background: #f0faf6; }
.privacy-banner strong { flex: 0 0 auto; font-size: 10px; }
.privacy-banner span { font-size: 9px; line-height: 1.45; }
.payroll-actions { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.run-status { min-width: 135px; display: grid; gap: 4px; }
.run-status small { color: var(--muted); font-size: 8px; }
.review-warning { margin-top: 10px; padding: 9px; border: 1px solid #eed9a8; border-radius: 7px; color: #745719; background: #fff9e9; font-size: 8px; line-height: 1.45; }
.provenance { display: block; margin-top: 7px; color: var(--muted); font-size: 8px; }
.payslip-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.payslip-card { padding: 17px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: 0 4px 14px rgba(32,50,82,.05); }
.payslip-period { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payslip-period span { font-size: 12px; font-weight: 850; }
.payslip-card h2 { margin: 18px 0 2px; font-size: 25px; }
.payslip-card > p { margin: 0 0 14px; color: var(--muted); font-size: 9px; }
.payslip-breakdown { display: grid; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
.payslip-breakdown span { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.payslip-breakdown b { color: var(--ink); }
.run-history { display: flex; flex-wrap: wrap; gap: 7px; }
.run-history button { padding: 8px 10px; display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }

@media (max-width: 1100px) {
  .kpi-summary { grid-template-columns: repeat(4,minmax(95px,1fr)); }
  .kpi-performance-grid { grid-template-columns: 1fr; }
  .payslip-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .app-shell { min-height: 100dvh; display: block; padding-top: 58px; }
  .topbar { position: fixed; inset: 0 0 auto; grid-template-columns: 48px auto minmax(100px,1fr) auto; }
  .mobile-menu-button { display: grid; margin-left: 6px; }
  .brand { width: auto; padding: 0 8px; }
  .brand > span:last-child { display: none; }
  .global-search-shell { width: 100%; padding-right: 7px; }
  .global-search { margin: 0; }
  .top-actions { padding-right: 7px; }
  .user-meta { display: none; }
  .sidebar { position: fixed; z-index: 45; top: 58px; bottom: 0; left: 0; width: min(320px,88vw); height: auto; min-height: 0; transform: translateX(-103%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(7,20,38,.22); }
  .sidebar.open { transform: translateX(0); }
  .page-head { position: relative; top: auto; padding: 18px 17px 11px; }
  .toolbar { top: 58px; padding: 9px 17px; overflow-x: auto; }
  .board-canvas, .dashboard { padding: 18px 17px 64px; }
  .kpi-analytics { margin: 14px 17px 0; }
  .head-row { flex-wrap: wrap; }
  .head-actions { width: 100%; overflow-x: auto; justify-content: flex-start; }
  .head-actions .button { flex: 0 0 auto; }
  .view-tabs { width: 100%; overflow-x: auto; }
  .view-tab { flex: 0 0 auto; min-height: 42px; }
  .dashboard-grid, .wide-left, .sales-layout { grid-template-columns: 1fr; }
  .management-layout { display: block; min-height: 0; }
  .user-list { display: flex; gap: 7px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .user-card { min-width: 240px; }
  .access-form-head { position: static; margin: -16px -15px 14px; }
  .access-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .payroll-toolbar { align-items: stretch; flex-direction: column; }
  .payroll-actions { justify-content: flex-start; }
  .sales-table { min-width: 1320px; }
  .board-table th:first-child, .board-table td:first-child { width: 235px; }
  .button, .icon-button, .nav-link, .board-link, .workspace-label { min-height: 44px; }
  .secret-action { min-height: 44px; padding: 8px 10px; }
}

@media (max-width: 640px) {
  .topbar { grid-template-columns: 48px minmax(110px,1fr) auto; }
  .brand { display: none; }
  .top-actions > .icon-button:not(.notification-button) { display: none; }
  .top-actions .notification-button { display: grid; }
  .global-search-results { position: fixed; top: 58px; left: 8px; right: 8px; max-height: 72dvh; }
  .global-search input { font-size: 16px; }
  .global-search input::placeholder { color: transparent; }
  .dashboard { min-height: calc(100dvh - 58px); }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero h1 { font-size: 23px; }
  .metrics-grid, .kpi-summary, .payslip-grid, .access-controls, .payroll-inputs, .payroll-result, .two-columns { grid-template-columns: 1fr; }
  .kpi-trend-row { grid-template-columns: minmax(100px,.9fr) minmax(65px,1.3fr) 38px; gap: 7px; }
  .sales-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .funnel-row { grid-template-columns: minmax(90px,1fr) minmax(60px,1fr) 75px; }
  .privacy-banner { align-items: flex-start; flex-direction: column; }
  .form-dialog { width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .form-dialog form { height: 100dvh; }
  .dialog-head { padding: 16px 16px 9px; }
  .form-error { margin: 0 16px 5px; }
  .dialog-fields { flex: 1; max-height: none; padding: 9px 16px 18px; }
  .dialog-actions { padding: 12px 16px max(14px,env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
  .dialog-actions .button { flex: 1; min-height: 46px; }
  .drawer { width: 100vw; height: 100dvh; }
  .drawer-head { padding: 17px; }
  .drawer-content { padding: 16px 17px max(30px,env(safe-area-inset-bottom)); }
  .attachment-list { grid-template-columns: 1fr; }
  .notification-summary { grid-template-columns: 1fr 1fr; }
  .notification-summary .button { grid-column: 1/-1; }
  .board-kpis { padding-left: 12px; padding-right: 12px; }
  .kpi-analytics { margin-left: 12px; margin-right: 12px; padding: 13px; }
  .board-canvas, .dashboard { padding-left: 12px; padding-right: 12px; }
  .toolbar { padding-left: 12px; padding-right: 12px; }
  .board-search { min-width: min(270px,75vw); }
  .group-head { height: auto; min-height: 50px; }
  .drop-hint { display: none; }
  .board-table th.secret-cell, .board-table td.secret-cell { width: 290px; min-width: 290px; }
  .secret-control { min-height: 66px; }
  .sales-kpi-grid, .stage-board-grid { grid-template-columns: 1fr; }
}

/* Capacity, ownership, payroll revision and mobile-board upgrade. */
.metric-link { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.metric-link:hover, .metric-link:focus-visible { outline: 0; border-color: #aab5ff; box-shadow: 0 10px 28px rgba(77,103,255,.13); transform: translateY(-1px); }
.operations-metrics { grid-template-columns: repeat(5,minmax(0,1fr)); }
.capacity-panel { align-self: start; }
.capacity-card { margin-bottom: 9px; padding: 11px; border: 1px solid var(--line); border-left: 4px solid #32b67a; border-radius: 10px; background: #fbfcfe; }
.capacity-card.balanced { border-left-color: #e7a329; }
.capacity-card.overloaded { border-left-color: var(--red); background: #fff8f9; }
.capacity-person { display: grid; grid-template-columns: 29px minmax(0,1fr) auto; gap: 9px; align-items: center; }
.capacity-person strong, .capacity-person small { display: block; }
.capacity-person strong { font-size: 10px; }
.capacity-person small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.capacity-person > b { font-size: 13px; }
.capacity-track { height: 8px; margin: 10px 0 7px; overflow: hidden; border-radius: 99px; background: #e9edf3; }
.capacity-track i { height: 100%; display: block; border-radius: inherit; background: #32b67a; }
.capacity-card.balanced .capacity-track i { background: #e7a329; }
.capacity-card.overloaded .capacity-track i { background: var(--red); }
.capacity-facts { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 7px; }
.capacity-facts b { color: var(--ink); }
.ownership-panel { scroll-margin-top: 76px; }
.missing-role { padding: 4px 7px; border-radius: 99px; color: #a23b51; background: #fff0f3; font-size: 8px; font-weight: 800; white-space: nowrap; }
.team-person { min-width: 180px; display: flex; align-items: center; gap: 8px; }
.team-person strong, .team-person small { display: block; }
.team-person small { margin-top: 2px; color: var(--muted); font-size: 7px; }
.team-performance .forecast-label { display: block; margin-top: 3px; }
.payroll-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.payroll-person { grid-template-columns: 29px minmax(0,1fr) minmax(120px,auto); align-items: start; }
.correction-button { color: #66421a; border-color: #e8c487; background: #fff9ec; }
.correction-note { margin-top: 10px; padding: 10px; display: grid; gap: 4px; border: 1px solid #bfc7ff; border-radius: 8px; color: #35459c; background: #f3f5ff; }
.correction-note strong { font-size: 9px; }
.correction-note span { color: #626d85; font-size: 8px; line-height: 1.45; }
.revision-chip { padding: 4px 7px; border-radius: 99px; color: #4352aa; background: #eef0ff; font-size: 8px; font-weight: 800; }
.payroll-files { margin-top: 15px; }
.correction-inputs { margin-bottom: 2px; }
.mobile-column-nav { display: none; }
.group-table-wrap { max-width: 100%; overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; scrollbar-gutter: stable; }

@media (max-width: 1180px) {
  .operations-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .mobile-column-nav { position: sticky; top: 58px; z-index: 14; min-height: 56px; padding: 7px 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) 42px; gap: 7px; align-items: center; border-top: 1px solid #e1e5ec; border-bottom: 1px solid #d9dee7; background: rgba(248,249,252,.97); backdrop-filter: blur(12px); }
  .mobile-column-nav button { height: 42px; border: 1px solid #d6dce7; border-radius: 9px; background: white; font-size: 23px; cursor: pointer; }
  .mobile-column-nav label { display: grid; gap: 3px; }
  .mobile-column-nav label span { color: var(--muted); font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
  .mobile-column-nav select { width: 100%; min-width: 0; height: 30px; border: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 800; }
  .mobile-column-nav small { grid-column: 1/-1; color: var(--muted); font-size: 7px; text-align: center; }
  .board-table th:first-child, .board-table td:first-child { width: 170px; min-width: 170px; }
  .board-table th:not(:first-child), .board-table td:not(:first-child) { width: 158px; min-width: 158px; }
  .row-grip { pointer-events: none; }
  .operations-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .capacity-facts { flex-direction: column; gap: 3px; }
  .payroll-person { grid-template-columns: 29px minmax(0,1fr); }
  .payroll-card-actions { grid-column: 1/-1; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .operations-metrics { grid-template-columns: 1fr; }
  .mobile-column-nav { padding-left: 9px; padding-right: 9px; }
}
