/* The dashboard and its navigation share one offline, system-font type scale. */
:root {
  --ink: #172c42;
  --text: #2c4258;
  --muted: #53677b;
  --line: #d4dfe8;
  --paper: #fff;
  --bg: #f4f7fa;
  --blue: #124e9e;
  --sidebar: clamp(268px, 21.6vw, 318px);
  --gutter: clamp(20px, 2.4vw, 42px);
  --rail-bg: #f7f9fc;
  --accent-soft: #e5eefc;
  --focus: #1666c2;
  font-family: "Segoe UI Variable Text", "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: 100%;
  font-synthesis: none;
}
body { line-height: 1.55; background: var(--bg); }
button, a, input, select, details { touch-action: manipulation; }
button, a, label, h1, h2, h3, p { word-break: keep-all; overflow-wrap: anywhere; }
:is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Only the menu tree scrolls. The search field and the current tenant stay visible. */
.sidebar {
  height: 100vh;
  height: 100dvh;
  background: var(--rail-bg);
  border-right: 1px solid #cbd8e4;
  color: var(--ink);
  min-height: 0;
}
.brand {
  flex: 0 0 auto;
  min-height: 72px;
  margin: 0;
  padding: 14px 21px;
  gap: 13px;
  border-bottom: 1px solid #d6e0e9;
  background: #fff;
  color: #152d47;
  font-size: 1.35rem;
  font-weight: 730;
  letter-spacing: -.035em;
}
.brand-sub { color: #435c76; font-size: .76rem; font-weight: 600; letter-spacing: .015em; margin-top: 4px; }
.mobile-nav-close { display: none; }
.brand-mark {
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: #153659;
  box-shadow: inset 0 0 0 1px #234a6d;
}
.brand-mark i { width: 19px; height: 11px; left: 10px; border-radius: 2px; box-shadow: none; }
.brand-mark i:first-child { top: 20px; background: #5b94e0; }
.brand-mark i:nth-child(2) { top: 14px; background: #94c3fa; }
.brand-mark i:last-child { top: 8px; background: #e3f2ff; }
.nav-search-wrap { flex: 0 0 auto; padding: 15px 14px 8px; position: relative; }
.nav-search {
  display: flex;
  align-items: center;
  position: relative;
  gap: 8px;
  min-height: 41px;
  padding: 0 10px;
  border: 1px solid #bacbd9;
  border-radius: 7px;
  background: white;
  color: #52697f;
}
.nav-search:focus-within { border-color: var(--focus); box-shadow: 0 0 0 2px #d8e8fb; }
.nav-search .ico { width: 17px; height: 17px; }
#navSearch {
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-size: .875rem;
  line-height: 1.45;
  outline: none;
}
#navSearch::-webkit-search-cancel-button { -webkit-appearance: none; }
#navSearch::placeholder, .filter-search input::placeholder { color: #576d81; opacity: 1; }
#clearNav {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 27px;
  height: 28px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 4px;
  color: #435b72;
  background: transparent;
}
.nav-search-wrap > #clearNav { position: absolute; right: 20px; top: 21px; }
.nav-search-wrap:has(> #clearNav:not([hidden])) #navSearch { padding-right: 24px; }
#clearNav:hover { background: #e6edf5; }
#nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-color: #9eb0c2 transparent;
  scrollbar-width: thin;
  padding: 0 8px 16px 12px;
}
.nav-label, .nav-group {
  display: block;
  margin: 15px 8px 5px;
  font-size: .78rem;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: .025em;
  color: #4e6277;
}
.nav-label:not(:first-child) { border-top: 1px solid #d7e1ea; padding-top: 12px; }
.nav-link, .nav-item, .nav-folder-name, .nav-leaf {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  text-decoration: none;
  text-align: left;
  min-width: 0;
  color: #263c53;
  transition: background-color .12s;
}
.nav-link, .nav-item, .nav-folder-name, .nav-folder-head {
  min-height: 39px;
  border-radius: 6px;
}
.nav-link, .nav-item, .nav-folder-name {
  padding: 8px 9px;
  font-size: .94rem;
  line-height: 1.42;
  font-weight: 600;
  letter-spacing: -.018em;
}
.nav-item { margin: 0; }
.nav-link svg, .nav-item svg, .nav-folder-name svg { width: 18px; height: 18px; color: #4f6880; }
.nav-folder { margin: 1px 0; }
.nav-folder-head { display: flex; gap: 1px; align-items: center; }
.nav-folder-name { flex: 1 1 auto; }
.nav-link:hover, .nav-folder-head:hover, .nav-leaf:hover, .nav-item:hover {
  background: #e9eff5;
  color: #143958;
}
.nav-folder-head:has(.is-current), .nav-folder.is-current > .nav-folder-head,
.nav-folder-head.is-current { background: #eaf0f7; }
.nav-link.is-active, .nav-item.active, .nav-leaf.is-active, .nav-folder-name.is-active,
.nav-folder-head.is-active, .nav-folder-head:has(.nav-folder-name.is-active),
#nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: #0e4384;
  font-weight: 700;
  box-shadow: inset 3px 0 0 #2563ad;
}
.nav-folder-head:has(.nav-folder-name.is-active) .nav-folder-name { box-shadow: none; }
.nav-item.active:before { content: none; }
.nav-item.active svg, #nav a[aria-current="page"] svg, .nav-folder-head.is-current svg { color: #165594; }
.nav-toggle {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 33px;
  min-height: 34px;
  padding: 0;
  border-radius: 5px;
  color: #48627c;
}
.nav-toggle:hover { background: #d8e5f2; }
.nav-toggle svg { width: 15px; height: 15px; }
.nav-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav-children {
  margin: 4px 0 7px 17px;
  padding: 0 0 0 8px;
  border-left: 1px solid #c6d4e1;
}
.nav-leaf {
  border-radius: 5px;
  font-size: .88rem;
  line-height: 1.5;
  min-height: 34px;
  padding: 6px 9px;
  font-weight: 500;
  color: #3b5269;
}
.nav-leaf > span, .nav-folder-name > span, .nav-link > span { min-width: 0; }
.nav-no-matches { padding: 15px 8px; color: var(--muted); font-size: .9rem; }
.tenant-block {
  flex: 0 0 auto;
  gap: 9px;
  margin: 0;
  padding: 10px 18px;
  border-top: 1px solid #cedbe5;
  background: #eff4f8;
}
.tenant-icon { width: 33px; height: 33px; background: white; border-color: #c5d3df; color: #315573; }
.tenant-copy small { color: #4e6377; font-size: .75rem; }
.tenant-copy strong { color: #183650; font-size: .86rem; }

/* Content rhythm, tables and controls. */
.workspace { min-width: 0; }
.topbar { min-height: 52px; height: auto; padding: 11px var(--gutter); }
.breadcrumb { flex: 1; min-width: 0; color: #566c80; gap: 9px; font-size: .85rem; line-height: 1.4; }
.breadcrumb strong { min-width: 0; color: #273f55; overflow-wrap: anywhere; word-break: keep-all; }
.breadcrumb a { text-decoration: none; color: #315777; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.crumb-mark, .crumb-sep { flex-shrink: 0; }
.readonly, .mode-pill { font-size: .78rem; }
.top-tools { flex-shrink: 0; }
.mode-pill, .badge, .chip { font-size: .76rem; padding: 3px 8px; }
.badge.neutral, .chip { color: #44596e; }
.badge.amber { color: #805100; }
.badge.green { color: #126448; }
.badge.red { color: #8d2f43; }
.badge.purple { color: #594286; }
main { max-width: 1560px; min-width: 0; padding: clamp(24px, 2.7vw, 42px) var(--gutter) 48px; }
.page-heading { margin-bottom: 24px; align-items: center; gap: 16px; }
.page-heading > div { min-width: 0; }
.eyebrow { color: #3e668d; font-size: .78rem; letter-spacing: .055em; margin: 0 0 5px; }
.page-heading h1 { font-size: clamp(1.7rem, 2.2vw, 2.35rem); color: #172f48; letter-spacing: -.047em; line-height: 1.35; }
.page-sub { color: #4d6378; max-width: 82ch; font-size: .95rem; line-height: 1.65; margin-top: 6px; }
.page-sub:empty, .eyebrow:empty { display: none; }
.btn { min-height: 40px; padding: 8px 13px; border-color: #bdccdb; font-size: .875rem; }
.btn.primary { background: #164f94; border-color: #164f94; box-shadow: none; }
.btn.primary:hover { background: #0f3e77; }
.btn svg, .link-btn svg { width: 16px; height: 16px; }
.icon-btn { width: 36px; height: 36px; }
.link-btn { color: #144d92; font-size: .875rem; white-space: normal; }
.panel, .feature-index, .feature-source-panel {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 2px 5px #1d3b5506;
  min-width: 0;
}
.panel-heading { padding: 18px 20px 15px; flex-wrap: wrap; gap: 7px 15px; }
.panel-heading h2, .panel-title, .home-section h2 {
  font-size: clamp(1.12rem, 1.45vw, 1.38rem);
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -.035em;
}
.panel-heading p, .subtle { font-size: .89rem; color: var(--muted); }
.panel-heading p { line-height: 1.55; margin-top: 4px; }
.table-wrap { max-width: 100%; }
.data-table { font-size: .9rem; line-height: 1.55; }
.data-table td, .data-table th { padding: 12px 14px; border-color: #e0e7ef; }
.data-table th { font-size: .82rem; color: #3e546b; background: #edf3f8; font-weight: 700; }
.data-table td { color: #30475d; overflow-wrap: anywhere; }
.data-table tbody tr:has(.row-main):hover { background: #eff5fc; }
.row-main { font-size: .94rem; color: #164c85; line-height: 1.5; font-weight: 650; }
.row-label small, .source-path { font-size: .78rem; margin-top: 2px; color: #53687c; }
.row-symbol { flex-shrink: 0; }
.table-footer, .filter-tag, .reset, .bucket-label { font-size: .85rem; }
.table-footer { flex-wrap: wrap; padding: 12px 20px; }
.paging .icon-btn { width: 32px; height: 32px; }
.count-tag, .chip, .op-stats small { font-size: .8rem; }
.search-bar { padding: 3px 20px 15px; gap: 9px; }
.filter-search, .select { min-height: 40px; border-color: #bdccda; }
.filter-search input { min-height: 38px; font-size: .9rem; }
.select { height: 40px; padding: 0 29px 0 9px; font-size: .875rem; appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%234a627a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 9px center; }
.info-line, .warn-box, .empty { font-size: .92rem; line-height: 1.65; }
.empty { padding: 36px 20px; }
.empty strong { font-size: 1rem; color: #28425b; }
.info-line, .warn-box { padding: 12px 15px; }
.pill-tab, .toast { font-size: .88rem; }
.safe-link { color: #164f94; text-underline-offset: 3px; }

/* Operational overview and the category directory. */
.home-summary { margin-bottom: 23px; }
.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
  border: 1px solid #c8d7e5;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 6px #1d3b5506;
}
.home-stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 16px 18px;
  text-align: left;
  text-decoration: none;
  background: white;
  color: #344b60;
  border-right: 1px solid #dbe4ed;
}
.home-stat:last-child { border-right: none; }
a.home-stat:hover, button.home-stat:hover { background: #f0f6fd; }
.home-stat strong, .home-stat b { color: #163d65; font-weight: 700; font-size: 1.65rem; line-height: 1.25; font-variant-numeric: tabular-nums; }
.home-stat span { font-size: .87rem; font-weight: 600; }
.home-stat small { color: var(--muted); font-size: .79rem; }
.home-section { min-width: 0; margin: 0 0 24px; }
.home-section > h2 { margin-bottom: 12px; }
.home-section > p { color: var(--muted); font-size: .94rem; margin: -3px 0 14px; }
.area-grid, .feature-list { display: grid; gap: 10px; }
.area-grid { grid-template-columns: repeat(auto-fill, minmax(min(245px, 100%), 1fr)); }
.area-card, .feature-link {
  display: flex;
  min-width: 0;
  text-align: left;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  text-decoration: none;
  color: var(--text);
}
.area-card:hover, .feature-link:hover, .home-link:hover {
  background: #f6faff;
  border-color: #98b8d8;
}
.area-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e7effa;
  color: #245388;
}
.area-icon .ico { width: 19px; height: 19px; }
.area-card[href="#group/device-compliance"] .area-icon { color: #146852; background: #e1f1eb; }
.area-card[href="#group/endpoint-security"] .area-icon { color: #60428a; background: #eee9f7; }
.area-card[href="#group/app-protection"] .area-icon { color: #865225; background: #faeddf; }
.area-card[href="#group/entra-access"] .area-icon { color: #226575; background: #e1f0f4; }
.area-copy, .feature-link-copy { min-width: 0; flex: 1 1 auto; }
.area-copy strong, .feature-link-copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.45;
  color: #213d56;
  letter-spacing: -.025em;
}
.area-copy small, .feature-link-copy small {
  display: block;
  margin-top: 4px;
  color: #51667a;
  font-size: .86rem;
  line-height: 1.5;
}
.area-chevron { margin-left: auto; flex: 0 0 auto; color: #557492; }
.area-chevron .ico { width: 15px; height: 15px; }
.home-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 12px; }
.home-row small, .home-row > span { color: #53677b; font-size: .86rem; }
.home-list, .home-utilities { display: grid; gap: 7px; }
.home-link {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 13px;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--line);
  text-align: left;
  text-decoration: none;
  color: #21486c;
  min-width: 0;
}
.home-link strong { font-size: .94rem; }
.home-link small { display: block; color: var(--muted); font-size: .83rem; }
.home-utilities { grid-template-columns: repeat(auto-fit,minmax(min(150px,100%),1fr)); }

/* Feature pages share the same hierarchy as the rest of the dashboard. */
.feature-index, .feature-source-panel, .feature-guide, .feature-records { margin-bottom: 16px; }
.feature-list { grid-template-columns: repeat(auto-fit,minmax(min(290px,100%),1fr)); padding: 1px 20px 20px; }
.feature-link { justify-content: space-between; align-items: flex-start; min-height: 76px; }
.feature-link .badge { flex-shrink: 0; }
.feature-source-list { padding: 0 20px 14px; }
.feature-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 3px;
  width: 100%;
  min-width: 0;
  text-align: left;
  border-top: 1px solid #dfe7ee;
  color: #2f485f;
  font-size: .9rem;
}
button.feature-source-row:hover { color: #164f94; background: #f5f9fd; }
.feature-guide { padding: 0; }
.feature-guide-body { padding: 0 20px 20px; }
.guide-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 22px; }
.feature-guide-body p + p, .feature-guide-link { margin-top: 8px; }
.panel-heading .feature-guide-link { margin-top: 0; }
.feature-guide h2 { font-size: 1.14rem; margin-bottom: 6px; }
.feature-guide p, .feature-coverage, .feature-empty { color: var(--muted); font-size: .94rem; line-height: 1.65; }
.feature-guide-link { display: inline-flex; align-items: center; gap: 6px; color: #124d94; text-underline-offset: 3px; font-weight: 600; }

/* Dialog and detailed values use the full readable text scale too. */
dialog { width: min(630px, 100%); }
.drawer-head { padding: 21px 24px 17px; }
.drawer-head h2 { font-size: 1.45rem; line-height: 1.45; }
.drawer-head p, .drawer-section, .meta-grid, .assignment-item { font-size: .92rem; }
.drawer-body { padding: 18px 20px 35px; }
.drawer-section { padding: 16px; }
.drawer-section h3 { font-size: 1.04rem; margin-bottom: 12px; }
.meta-grid { grid-template-columns: minmax(6.8em, auto) minmax(0,1fr); gap: 8px 12px; }
.meta-grid dt { font-weight: 600; }
.detail-tabs { background: white; position: sticky; z-index: 1; top: 0; padding: 0 20px; }
.detail-tabs button { min-height: 42px; padding: 9px 3px; font-size: .9rem; }
.codebox { font-size: .82rem; }
.op-stats { overflow: hidden; }
.op-stats > div { padding: 13px 18px; }
.op-stats strong { color: #214466; font-size: 1.45rem; }
.metric-label, .attention-copy strong { font-size: .9rem; }
.metric-note, .attention-copy small, .legend-row { font-size: .81rem; }
.legend-row { min-height: 27px; }

@media (min-width: 1650px) { :root { --sidebar: 320px; } }
@media (max-width: 1120px) {
  :root { --sidebar: 264px; --gutter: 20px; }
  .home-stat { padding: 13px 14px; }
  .data-table td, .data-table th { padding: 10px 11px; }
  .panel-heading { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 900px) {
  :root { --sidebar: 240px; --gutter: 16px; }
  .area-grid { grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); }
  .data-table { min-width: 580px; }
  .home-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-stat { box-shadow: 0 -1px #dbe4ed; }
  .home-stat:nth-child(even) { border-right: none; }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; --gutter: 15px; }
  .sidebar { width: min(335px, 88vw); visibility: hidden; }
  .sidebar.open { visibility: visible; }
  .menu-btn { display: inline-grid; width: 38px; height: 38px; flex-shrink: 0; }
  .brand { min-height: 62px; padding: 10px 18px; }
  .mobile-nav-close {
    display: grid;
    place-items: center;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #35536c;
    background: #edf3f8;
    border-radius: 7px;
    font-size: 1.5rem;
    line-height: 1;
  }
  .mobile-nav-close:hover { background: #dce9f5; }
  .nav-folder-name, .nav-link, .nav-item, .nav-folder-head, .nav-leaf, .nav-toggle { min-height: 42px; }
  .nav-toggle { width: 40px; }
  .topbar { min-height: 53px; padding: 7px var(--gutter); gap: 9px; }
  main { padding: 22px var(--gutter) 35px; }
  .workspace { margin-left: 0; }
  .breadcrumb { gap: 6px; font-size: .79rem; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 1.65rem; }
  .page-sub { font-size: .9rem; }
  .top-tools .mode-pill { font-size: .74rem; }
  .home-section { margin-bottom: 19px; }
  .area-grid, .feature-list { gap: 8px; }
  .table-footer { padding: 11px 14px; }
  .drawer-body .data-table { min-width: 0; }
}
@media (max-width: 560px) {
  .page-heading { flex-wrap: wrap; gap: 10px; }
  .page-heading .btn { min-height: 37px; margin: 0; padding: 6px 11px; font-size: .86rem; }
  .page-heading .btn svg { width: 15px; }
  .breadcrumb { display: flex; flex-wrap: wrap; }
  .crumb-mark { display: none; }
  .home-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-stat { padding: 12px; }
  .home-stat strong, .home-stat b { font-size: 1.4rem; }
  .area-grid, .feature-list, .home-row { grid-template-columns: minmax(0,1fr); }
  .panel-heading { padding: 15px 13px 11px; align-items: flex-start; }
  .panel-heading h2 { font-size: 1.1rem; }
  .panel-heading p { font-size: .86rem; }
  .search-bar { padding: 2px 13px 13px; }
  .filter-search { flex-basis: 100%; }
  .select { flex: 1 1 9rem; min-width: 0; font-size: .86rem; }
  .feature-list { padding: 0 12px 13px; }
  .feature-source-list { padding: 0 13px 12px; }
  .feature-guide-body { padding: 0 13px 15px; }
  .feature-source-row { gap: 7px; }
  .detail-tabs { gap: 13px; }
  .drawer-body { padding: 13px 10px 25px; }
  .drawer-head { padding: 16px; }
  .drawer-section { padding: 12px; }
  .meta-grid { grid-template-columns: minmax(5.8em, auto) minmax(0,1fr); gap: 8px; }
  .info-line { font-size: .88rem; }
  .utility-row .btn { min-height: 36px; font-size: .85rem; }
}
@media (max-height: 580px) {
  .brand { min-height: 51px; padding-block: 7px; }
  .mobile-nav-close { top: 6px; }
  .nav-search-wrap { padding-top: 7px; padding-bottom: 6px; }
  .nav-search-wrap > #clearNav { top: 13px; }
  .tenant-block { padding-block: 5px; }
}
@media (forced-colors: active) {
  #nav [aria-current="page"], .nav-link.is-active, .nav-leaf.is-active { outline: 2px solid Highlight; outline-offset: -2px; }
}
