@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f6f5fa;
  --surface: #ffffff;
  --surface-soft: #faf9fd;
  --ink: #242137;
  --text: #242137;
  --muted: #737081;
  --border: #ebe8f2;
  --accent: #7960d6;
  --primary: #7960d6;
  --accent-hover: #6b50c9;
  --purple: #7960d6;
  --purple-light: #f0ebfc;
  --green: #3c8b72;
  --green-light: #eaf5ef;
  --orange: #be7959;
  --orange-light: #fbefe7;
  --blue: #5b86b4;
  --blue-light: #edf3fb;
  --danger: #b65564;
  --radius: 18px;
  --shadow: 0 4px 18px rgba(41, 30, 74, .025);
  --sidebar-width: 238px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button, a { touch-action: manipulation; }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; vertical-align: middle; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.025em; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
p:last-child { margin-bottom: 0; }
small { font-size: 12px; }
[hidden] { display: none !important; }
::selection { color: #302448; background: #dfd5fa; }
:focus-visible { outline: 3px solid #b7a5ef; outline-offset: 3px; }
.muted { color: var(--muted); }
.text-purple { color: var(--accent); }
.text-green { color: var(--green); }
.text-orange { color: var(--orange); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Application frame */
.app-shell { min-height: 100dvh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  padding: 29px 16px 20px;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 9px 31px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 40px;
  border-radius: 13px;
  color: #fff;
  background: var(--accent);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}
.brand-mark svg { width: 27px; height: 27px; }
.brand-name { display: block; font-size: 21px; line-height: 1.1; letter-spacing: -.055em; font-weight: 750; }
.brand-subtitle { display: block; margin-top: 5px; color: #716a7f; font-size: 12px; letter-spacing: .035em; }
.nav-label {
  margin: 11px 13px 12px;
  color: #716980;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 45px;
  margin: 4px 0;
  padding: 11px 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #706a7b;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  transition: background-color .16s, color .16s;
}
.nav-item:hover { color: var(--accent); background: #f7f4fd; }
.nav-item.active { color: #7459cb; background: var(--purple-light); font-weight: 650; }
.nav-icon { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; }
.nav-icon svg { width: 20px; height: 20px; }
.nav-badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 6px;
  background: #eae3fb;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.sidebar-bottom { display: grid; gap: 13px; margin-top: auto; padding-top: 36px; }
.workspace-card { padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: #faf9fd; }
.workspace-card strong { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 650; }
.workspace-card p, .workspace-card small { color: #716a7f; font-size: 12px; line-height: 1.55; }
.workspace-card p { margin: 0; }
.workspace-card .badge { margin-bottom: 9px; }
.sidebar-caption { padding: 0 13px; color: #71697e; font-size: 12px; }
.main-shell { min-width: 0; min-height: 100dvh; margin-left: var(--sidebar-width); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 77px;
  padding: 14px clamp(22px, 2.5vw, 38px);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}
.breadcrumbs { display: flex; align-items: center; gap: 10px; min-width: 0; color: #726a81; font-size: 12px; }
.breadcrumbs span:last-child, .breadcrumbs strong { color: #5f586e; font-weight: 500; }
.breadcrumbs svg { width: 14px; height: 14px; color: #726888; }
.topbar-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  color: #716981;
  background: #fff;
  transition: background-color .16s, border-color .16s;
}
.icon-button svg { width: 19px; height: 19px; }
.icon-button:hover { color: var(--accent); border-color: #d7cbed; background: #faf8ff; }
.icon-button .notification-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 50%; background: var(--orange); }
.user-avatar { display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 39px; border-radius: 13px; color: #745dbc; background: #eee8fa; font-size: 13px; font-weight: 650; }
.user-meta { min-width: 0; font-size: 12px; line-height: 1.45; }
.user-meta strong, .user-meta span { display: block; }
.user-meta strong { font-weight: 650; }
.user-meta small, .user-meta .muted { color: #716a7b; font-size: 12px; }
.user-block { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; }
.main-content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 25px clamp(22px, 2.5vw, 38px) 42px; }
.demo-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 25px;
  padding: 10px 14px;
  border: 1px solid #e6e0f4;
  border-radius: 10px;
  background: #f0edf8;
  color: #756596;
  font-size: 12px;
  line-height: 1.5;
}
.demo-strip strong { color: #746593; font-weight: 600; }
.demo-strip button, .demo-strip a { flex-shrink: 0; color: #79629f; font-size: 12px; }
.demo-strip .button { min-height: 28px; padding: 3px 8px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.page-heading > div:first-child { min-width: 0; }
.eyebrow { margin-bottom: 7px; color: #74697d; font-size: 12px; line-height: 1.5; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.page-heading h1 { margin: 0 0 8px; font-size: clamp(25px, 2.1vw, 32px); font-weight: 650; letter-spacing: -.04em; }
.page-description { max-width: 710px; margin: 0; color: #726980; font-size: 13px; line-height: 1.6; }
.heading-actions { display: flex; align-items: center; justify-content: flex-end; flex-shrink: 0; flex-wrap: wrap; gap: 9px; }

/* Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  transition: background-color .16s, color .16s, border-color .16s, box-shadow .16s;
}
.button svg { width: 16px; height: 16px; }
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 3px 8px rgba(121, 96, 214, .12); }
.button.primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: #fff; }
.button.secondary { border-color: #e3ddec; background: #fff; color: #766787; }
.button.secondary:hover { border-color: #cbbcdf; background: #faf7ff; color: var(--accent); }
.button.ghost { color: var(--accent); background: transparent; }
.button.ghost:hover { background: var(--purple-light); color: var(--accent-hover); }
.button.small { min-height: 33px; padding: 7px 11px; border-radius: 8px; font-size: 12px; }
.button.danger { border-color: #f0dce1; background: #fff6f7; color: var(--danger); }
.button.danger:hover { background: #fce9ed; border-color: #e7bdc7; }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; box-shadow: none; cursor: not-allowed; }
.button.full { width: 100%; }
.button-row, .card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.chip, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  color: #71697e;
  background: #f1eef6;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.45;
  white-space: nowrap;
}
.chip { padding: 5px 10px; border-radius: 8px; font-size: 12px; }
.badge svg, .chip svg { width: 12px; height: 12px; }
.purple { color: #795fad; background: #f0eaf9; }
.green { color: #4d7563; background: #edf5ef; }
.orange { color: #936245; background: #faf0e8; }
.gray { color: #716b7a; background: #f2f0f5; }
.blue { color: #4d7094; background: #edf3fa; }
.tabs { display: flex; align-items: center; gap: 4px; width: fit-content; max-width: 100%; margin-bottom: 22px; padding: 4px; overflow-x: auto; border: 1px solid #e9e5f0; border-radius: 11px; background: #f0edf6; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 8px 15px; border: 0; border-radius: 8px; background: transparent; color: #736883; font-size: 12px; font-weight: 550; line-height: 1.5; white-space: nowrap; }
.tab:hover { color: var(--accent); }
.tab.active { background: #fff; color: #7a6492; box-shadow: 0 2px 5px rgba(41, 30, 74, .05); }
.tab .badge { min-width: 18px; padding: 1px 5px; }

/* Shared layouts and surfaces */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 23px; }
.stat-card { position: relative; min-width: 0; padding: 20px 21px 17px; border: 1px solid var(--border); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.stat-icon { position: static; display: inline-grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; color: #795fae; background: #f3effa; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-icon.green { color: #4f745f; background: #eff6f1; }
.stat-icon.orange { color: #93623f; background: #fbf3eb; }
.stat-icon.blue { color: #4a7096; background: #f0f4fa; }
.stat-label { padding-right: 37px; color: #736883; font-size: 12px; line-height: 1.5; }
.stat-value { display: block; margin-top: 10px; color: #6f627e; font-size: 31px; font-weight: 650; line-height: 1.2; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.stat-value small { margin-left: 3px; color: #756788; font-size: 13px; font-weight: 450; letter-spacing: 0; }
.stat-detail { margin-top: 9px; color: #746785; font-size: 12px; line-height: 1.5; }
.stat-detail .green, .stat-detail .orange, .stat-detail .purple { background: transparent; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; align-items: start; }
.dashboard-grid > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 21px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.section-gap { margin-top: 23px; }
.stack, .content-stack { display: grid; gap: 22px; }
.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 16px; border-bottom: 1px solid #f1eef6; }
.card-header h2, .card-header h3 { margin: 0; color: #766881; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.card-header p { margin: 5px 0 0; color: #756788; font-size: 12px; }
.card-header .button { flex-shrink: 0; }
.card-body { padding: 21px 22px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-top: 1px solid #f1eef6; }
.card-footer .muted { font-size: 12px; }
.card > .table-wrap { border-radius: 0 0 var(--radius) var(--radius); }
.card > .toolbar { margin: 0; padding: 18px 22px; }
.hero-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 178px; align-items: center; gap: 16px; padding: 27px 29px; overflow: hidden; border: 1px solid #e8e0f4; border-radius: var(--radius); background: #eee8f8; }
.hero-copy { position: relative; z-index: 1; min-width: 0; }
.hero-copy h2 { max-width: 540px; margin: 0 0 11px; color: #796299; font-size: 24px; font-weight: 600; line-height: 1.3; letter-spacing: -.03em; }
.hero-copy p { max-width: 570px; margin: 0 0 18px; color: #7b6298; font-size: 12px; line-height: 1.7; }
.hero-copy .eyebrow { color: #7d60a2; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 150px; color: #8357bb; }
.hero-art svg { width: 100%; max-height: 174px; }
.hero-art:empty::before { content: ""; position: absolute; width: 136px; height: 136px; border: 26px solid #ded1ef; border-radius: 50%; }
.hero-art:empty::after { content: ""; position: absolute; bottom: 17px; width: 91px; height: 83px; border: 8px solid #eee8f8; border-radius: 27px 27px 12px 12px; background: #bba2d7; transform: rotate(-12deg); }

/* Tables and people */
.table-wrap { width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d9cfe7 transparent; }
table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table { font-size: 12px; }
.data-table th { padding: 13px 19px; border-bottom: 1px solid #eee9f4; background: #fcfbfd; color: #77658d; font-size: 12px; font-weight: 550; text-align: left; white-space: nowrap; }
.data-table td { padding: 15px 19px; border-bottom: 1px solid #f1eef6; color: #776689; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fdfbff; }
.data-table tr.clickable { cursor: pointer; }
.data-table .person-cell { min-width: 175px; }
.data-table td:last-child .button-row { flex-wrap: nowrap; }
.person-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person-cell > div:last-child { min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; overflow: hidden; border-radius: 12px; background: #f0eaf8; color: #805da3; font-size: 12px; font-weight: 600; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.purple { color: #7e5da6; background: #f0eaf8; }
.avatar.green { color: #5a7361; background: #edf3ed; }
.avatar.orange { color: #8b6444; background: #f9f0e7; }
.avatar.blue { color: #576e8b; background: #edf2f8; }
.person-name { display: block; color: #796685; font-size: 12px; font-weight: 550; line-height: 1.5; }
.person-cell small, .person-cell .muted { display: block; margin-top: 2px; color: #7b648b; font-size: 12px; line-height: 1.5; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.search-field { display: flex; align-items: center; gap: 4px; flex: 1 1 230px; min-width: 180px; max-width: 420px; min-height: 42px; padding: 0 11px; border: 1px solid #e9e2f1; border-radius: 10px; background: #fff; color: #79668d; transition: border-color .16s, box-shadow .16s; }
.search-field svg { width: 17px; height: 17px; }
.search-field input { width: 100%; min-width: 0; min-height: 40px; padding: 10px 7px; border: 0; border-radius: 0; background: transparent; font-size: 12px; }
.search-field input:focus { outline: none; box-shadow: none; }
.search-field:focus-within { border-color: #b19bd2; box-shadow: 0 0 0 3px #f1eaf9; }
.filter-select { width: auto; min-width: 140px; max-width: 100%; }
.children-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.child-card, .group-card { display: flex; flex-direction: column; gap: 16px; min-width: 0; width: 100%; padding: 21px; border: 1px solid var(--border); border-radius: 17px; background: #fff; color: var(--ink); box-shadow: var(--shadow); text-align: left; transition: border-color .18s, box-shadow .18s; }
.child-card:hover, .group-card:hover { border-color: #dacdea; box-shadow: 0 6px 22px rgba(83, 57, 120, .04); }
.child-card-header, .group-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.child-card .avatar { flex-basis: 44px; width: 44px; height: 44px; border-radius: 14px; font-size: 14px; }
.child-card h3, .group-card h3 { margin: 0; color: #7b658b; font-size: 16px; font-weight: 550; }
.child-card p, .group-card p { margin-bottom: 0; color: #7b6292; font-size: 12px; }
.child-card .person-name { font-size: 14px; }
.child-meta, .group-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: #7c6295; font-size: 12px; }
.child-card .card-actions, .group-card .card-actions { margin-top: auto; padding-top: 3px; }
.child-card .card-footer, .group-card .card-footer { margin: 0 -21px -21px; padding: 14px 21px; }
.group-card .group-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: #f1eafa; color: #835bac; }
.avatar-stack { display: flex; align-items: center; padding-left: 0; }
.avatar-stack .avatar { flex: 0 0 29px; width: 29px; height: 29px; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; font-size: 12px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.profile-header { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
.profile-header .avatar { flex-basis: 70px; width: 70px; height: 70px; border-radius: 21px; font-size: 24px; }
.profile-header h1, .profile-header h2 { margin: 0 0 7px; }
.profile-header p { margin: 0; color: #7b6292; font-size: 12px; }
.profile-header .heading-actions { margin-left: auto; }
.profile-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.profile-facts > div, .profile-fact { min-width: 0; padding: 13px 15px; border-radius: 11px; background: #faf7fd; }
.profile-facts dt, .profile-facts .label { display: block; margin: 0 0 5px; color: #7d6198; font-size: 12px; }
.profile-facts dd, .profile-facts strong { margin: 0; overflow-wrap: anywhere; color: #7c6390; font-size: 12px; font-weight: 550; }

/* Progress, charts, history */
.metrics-list { display: grid; gap: 17px; }
.metric-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 7px 12px; color: #7f609a; font-size: 12px; }
.metric-row strong, .metric-value { color: #815ea1; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.metric-row > .metric-label { grid-column: 1 / -1; }
.metric-bar { height: 6px; overflow: hidden; border-radius: 5px; background: #f3edf9; }
.metric-row > .metric-bar { grid-column: 1 / -1; }
.metric-fill { width: 0; height: 100%; border-radius: inherit; background: #bb9ed7; transition: width .5s ease; }
.metric-fill.green { background: #afc9b5; }
.metric-fill.orange { background: #dfbea4; }
.metric-fill.blue { background: #b4c4dc; }
.chart-container { width: 100%; min-width: 0; overflow: hidden; }
.chart-container svg { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; }
.chart-container text { font-family: inherit; }
.chart-caption { margin-top: 10px; color: #815ea4; font-size: 12px; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 19px; margin-top: 17px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: #815fa0; font-size: 12px; }
.legend-item > i, .legend-dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #b99bd7; }
.legend-item > i.green, .legend-dot.green { background: #b0c6b6; }
.legend-item > i.orange, .legend-dot.orange { background: #dbbda6; }
.legend-item > i.blue, .legend-dot.blue { background: #b1c2db; }
.timeline { display: grid; }
.timeline-item { position: relative; display: flex; gap: 13px; min-width: 0; padding-bottom: 23px; }
.timeline-item::before { content: ""; position: absolute; top: 17px; bottom: -1px; left: 5px; width: 1px; background: #eee5f6; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: relative; z-index: 1; flex: 0 0 11px; width: 11px; height: 11px; margin-top: 5px; border: 2px solid #fff; border-radius: 50%; background: #c1a3df; box-shadow: 0 0 0 1px #ecdef7; }
.timeline-dot.green { background: #b6cdbb; box-shadow: 0 0 0 1px #e8f0ea; }
.timeline-dot.orange { background: #dfbea4; box-shadow: 0 0 0 1px #f7ebe3; }
.timeline-content { flex: 1; min-width: 0; color: #855baa; font-size: 12px; line-height: 1.6; }
.timeline-content strong { color: #845ba9; font-size: 12px; font-weight: 550; }
.timeline-content p { margin: 4px 0 7px; color: #835ca6; font-size: 12px; }
.timeline-content time, .timeline-date { color: #8759ad; font-size: 12px; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f5eefb; }
.activity-item:first-child { padding-top: 0; }
.activity-item:last-child { padding-bottom: 0; border-bottom: 0; }
.activity-item > div:last-child { flex: 1; min-width: 0; }
.activity-item strong { color: #8857ae; font-size: 12px; font-weight: 550; }
.activity-item p { margin: 3px 0 6px; color: #8858b0; font-size: 12px; }
.activity-item small, .activity-item time { color: #8956b0; font-size: 12px; }
.activity-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px; color: #8c50c0; background: #f5ebfc; }
.activity-icon svg { width: 15px; height: 15px; }
.quick-actions { display: grid; gap: 9px; }
.quick-actions .button { justify-content: flex-start; width: 100%; min-height: 43px; padding: 11px 13px; border-color: #ece1f5; color: #875aab; font-size: 12px; }
.quick-actions .button svg { color: #8b54b8; }
.empty-state { display: grid; place-items: center; gap: 10px; padding: 43px 23px; color: #805f9c; text-align: center; }
.empty-state > svg, .empty-state .empty-icon { display: grid; place-items: center; width: 49px; height: 49px; margin-bottom: 3px; color: #8a54b7; }
.empty-state h2, .empty-state h3 { margin: 0; color: #835ca6; font-size: 17px; font-weight: 550; }
.empty-state p { max-width: 370px; margin: 0; font-size: 12px; line-height: 1.65; }
.empty-state .button { margin-top: 9px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border: 1px solid #e9e0f3; border-radius: 11px; background: #f7f1fc; color: #7c6297; font-size: 12px; line-height: 1.7; }
.notice svg { flex: 0 0 17px; width: 17px; height: 17px; margin-top: 1px; }
.notice strong { color: #815e9e; font-weight: 600; }
.notice p { margin: 0; }
.notice.info { border-color: #e7dcf1; background: #f5effb; color: #7c6297; }
.notice.warning { border-color: #efe1d7; background: #fcf5ee; color: #85674e; }
.notice.warning strong { color: #88664c; }

/* Messaging */
.message-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); height: min(680px, calc(100dvh - 260px)); min-height: 445px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.thread-list { display: flex; flex-direction: column; gap: 5px; min-width: 0; min-height: 0; padding: 11px; overflow-y: auto; border-right: 1px solid var(--border); }
.thread-list > h3 { padding: 10px 11px 7px; margin: 0; font-size: 12px; color: #7e609c; }
.thread-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; padding: 14px 11px; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #7d619a; text-align: left; transition: background-color .16s; }
.thread-item:hover { background: #faf6fe; }
.thread-item.active { border-color: #eee0f8; background: #f2eafa; }
.thread-item .avatar { flex-basis: 34px; width: 34px; height: 34px; border-radius: 11px; font-size: 12px; }
.thread-item > div:last-child, .thread-content { min-width: 0; flex: 1; }
.thread-item strong { display: block; overflow: hidden; color: #835ca6; font-size: 12px; font-weight: 550; text-overflow: ellipsis; }
.thread-item p, .thread-preview { display: block; margin: 4px 0 0; overflow: hidden; color: #855aa7; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.thread-item small, .thread-time { color: #8759a8; font-size: 12px; }
.thread-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.thread-top time { flex-shrink: 0; font-size: 12px; }
.message-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.message-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 77px; padding: 17px 22px; border-bottom: 1px solid var(--border); }
.message-header h3 { margin: 0 0 4px; color: #835ba5; font-size: 13px; }
.message-header p { margin: 0; color: #845ca8; font-size: 12px; }
.message-stream { display: flex; flex: 1; flex-direction: column; gap: 14px; min-height: 0; padding: 22px; overflow-y: auto; background: #fdfafe; }
.message-bubble { align-self: flex-start; max-width: min(82%, 540px); padding: 12px 15px; overflow-wrap: anywhere; border: 1px solid #eee1f8; border-radius: 14px 14px 14px 4px; background: #fff; color: #865aa7; font-size: 12px; line-height: 1.65; white-space: pre-wrap; }
.message-bubble.mine { align-self: flex-end; border-color: #e9d9f5; border-radius: 14px 14px 4px 14px; background: #f0e6fa; color: #865ba6; }
.message-bubble.theirs { align-self: flex-start; border-radius: 14px 14px 14px 4px; background: #fff; }
.message-bubble p { margin: 0; }
.message-meta { display: block; margin-top: 7px; color: #8a57b1; font-size: 12px; line-height: 1.4; }
.message-date { align-self: center; margin: 0 0 3px; color: #8559ab; font-size: 12px; }
.message-compose { display: flex; align-items: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--border); background: #fff; }
.message-compose textarea, .message-compose input { flex: 1; min-width: 0; min-height: 42px; max-height: 135px; resize: none; font-size: 12px; }
.message-compose .button { flex-shrink: 0; min-height: 42px; }

/* Forms, selections and dialogs */
input, select, textarea { width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid #e6dcec; border-radius: 10px; background: #fff; color: #7a658c; font-size: 13px; line-height: 1.5; transition: border-color .16s, box-shadow .16s; }
select { padding-right: 27px; }
textarea { min-height: 106px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #835e9f; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #b296ce; outline: none; box-shadow: 0 0 0 3px #f1e8f9; }
input:disabled, select:disabled, textarea:disabled { background: #f5f0f8; color: #816193; cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { flex: 0 0 16px; width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; padding: 0; border-radius: 4px; accent-color: var(--accent); }
input[type="range"] { padding: 0; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 19px; }
.form-field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.form-field > label, .form-field > .label { color: #81609a; font-size: 12px; font-weight: 550; }
.form-field.full, .form-field.wide, .span-2, .col-span-2 { grid-column: 1 / -1; }
.form-hint { margin: 0; color: #845ba2; font-size: 12px; line-height: 1.65; }
.form-error { margin: 0; color: var(--danger); font-size: 12px; }
.form-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-section + .form-section { margin-top: 24px; padding-top: 23px; border-top: 1px solid #eee3f6; }
.form-section > h3, .form-section > legend { margin: 0 0 15px; color: #825e9f; font-size: 14px; font-weight: 550; }
.form-section > p { color: #855ba5; font-size: 12px; }
.check-label { display: flex; align-items: flex-start; gap: 9px; color: #825f9a; font-size: 12px; }
.rating-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rating-button { display: grid; place-items: center; min-width: 39px; min-height: 38px; padding: 7px 11px; border: 1px solid #e9def2; border-radius: 9px; background: #fff; color: #855aa6; font-size: 12px; font-weight: 600; }
.rating-button:hover { border-color: #c4a5df; background: #faf4ff; }
.rating-button.selected { border-color: var(--accent); background: var(--accent); color: #fff; box-shadow: 0 2px 6px rgba(121, 96, 214, .1); }
.rating-labels { display: flex; justify-content: space-between; gap: 15px; max-width: 236px; margin-top: 6px; color: #8859ac; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; background: rgba(34, 26, 46, .35); backdrop-filter: blur(3px); }
.modal { display: flex; flex-direction: column; width: min(570px, 100%); max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid rgba(255, 255, 255, .6); border-radius: 20px; background: #fff; box-shadow: 0 25px 85px rgba(37, 23, 55, .18); animation: modal-enter .18s ease-out; }
.modal.wide { width: min(830px, 100%); }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 19px; border-bottom: 1px solid #eee3f6; }
.modal-header h2 { margin: 0; color: #7e628f; font-size: 20px; font-weight: 600; }
.modal-header p { margin: 6px 0 0; color: #835e9e; font-size: 12px; }
.modal-header .icon-button { flex-basis: 32px; width: 32px; height: 32px; padding: 7px; border-radius: 9px; }
.modal-body { min-height: 0; padding: 23px 24px; overflow-y: auto; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 16px 24px; border-top: 1px solid #eee3f6; background: #fdfbff; }
.modal-footer .muted { margin-right: auto; font-size: 12px; }
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.role-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; min-width: 0; padding: 20px 17px; border: 1px solid #eaddf3; border-radius: 14px; background: #fff; color: #835e9c; text-align: left; transition: border-color .16s, background-color .16s; }
.role-card:hover { border-color: #c4a5dd; background: #fcf8ff; }
.role-card.active { border-color: #b090ce; background: #f6eefa; box-shadow: 0 0 0 1px #dbc7ea; }
.role-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 2px; border-radius: 12px; background: #f1e7f9; color: #8758af; }
.role-icon svg { width: 23px; height: 23px; }
.role-card strong { color: #845f96; font-size: 13px; font-weight: 600; }
.role-card p { margin: 0; color: #875aa6; font-size: 12px; line-height: 1.65; }
.role-card .badge { margin-top: auto; }
.toast-container { position: fixed; right: 24px; bottom: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; width: 365px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 11px; padding: 15px 17px; border: 1px solid #574062; border-radius: 13px; background: #45314f; color: #f2e8f7; font-size: 12px; line-height: 1.6; box-shadow: 0 7px 28px rgba(52, 28, 69, .15); pointer-events: auto; animation: toast-enter .2s ease-out; }
.toast > svg { width: 18px; height: 18px; margin-top: 1px; color: #d3b9e4; }
.toast strong { color: #fff; font-weight: 600; }
.toast button { flex-shrink: 0; margin-left: auto; padding: 0; border: 0; background: transparent; color: #ddcbe7; }
.toast p { margin: 0; }
.loading { display: grid; align-content: center; justify-items: center; gap: 16px; min-height: 210px; padding: 30px; color: #815f9c; text-align: center; }
.loading::before { content: ""; display: block; width: 28px; height: 28px; border: 2px solid #ecdef6; border-top-color: var(--accent); border-radius: 50%; animation: spin .85s linear infinite; }
.print-report { display: none; }

/* Clear type hierarchy on quiet surfaces. */
.page-heading h1, .profile-header h1, .profile-header h2,
.modal-header h2, .empty-state h2, .empty-state h3 { color: var(--ink); }
.card-header h2, .card-header h3, .child-card h3, .group-card h3,
.person-name, .thread-item strong, .message-header h3,
.form-section > h3, .form-section > legend, .role-card strong,
.timeline-content strong, .activity-item strong { color: #4e425d; }
.page-description, .card-header p, .child-card p, .group-card p,
.child-meta, .group-meta, .profile-header p, .timeline-content p,
.activity-item p, .thread-item p, .thread-preview,
.message-header p, .role-card p, .form-hint, .form-section > p,
.person-cell small, .person-cell .muted { color: #7a6f87; }
.stat-label, .stat-detail, .profile-facts dt, .profile-facts .label,
.metric-row, .legend-item, .chart-caption, .timeline-content time,
.timeline-date, .activity-item small, .activity-item time,
.thread-item small, .thread-time, .message-meta, .message-date { color: #7f6f8e; }
.stat-value { color: #3d304c; }
.hero-copy h2 { color: #5a426f; }
.hero-copy p { color: #796287; }
.data-table td { color: #776582; font-size: 12px; }
.person-name { font-size: 13px; }
.person-cell small, .person-cell .muted { font-size: 12px; }
.form-field > label, .form-field > .label { color: #63516f; }
.message-bubble, .message-bubble.mine { color: #665074; }
.quick-actions .button { color: #7e6494; }
.chip.purple, .badge.purple { color: #74519c; }
.chip.green, .badge.green { color: #3c7257; }
.chip.orange, .badge.orange { color: #9b6745; }
.chip.blue, .badge.blue { color: #4e729a; }
.chip.gray, .badge.gray { color: #76687f; }

/* Components shared by the role views. */
.icon { display: inline-block; flex: 0 0 auto; }
.workspace-card { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; padding: 13px 11px; }
.workspace-card > div { min-width: 0; }
.workspace-card strong { color: #514860; font-size: 12px; }
.workspace-card > div > span { display: block; margin-top: 3px; color: #737081; font-size: 12px; line-height: 1.45; }
.workspace-symbol { display: grid; place-items: center; flex: 0 0 31px; width: 31px; height: 34px; border: 1px solid #e6dfef; border-radius: 9px; background: #fff; color: #87759c; }
.workspace-symbol .icon { width: 17px; height: 17px; }
.sidebar-help { padding: 17px 13px; border: 1px solid #e8e0f2; border-radius: 13px; background: #faf7fe; }
.sidebar-help .stat-icon { margin-bottom: 13px; }
.sidebar-help > strong { display: block; margin-bottom: 8px; color: #514360; font-size: 13px; font-weight: 600; line-height: 1.5; }
.sidebar-help > p { margin: 0 0 10px; color: #737081; font-size: 12px; line-height: 1.65; }
.sidebar-help .button { padding: 6px 0; font-size: 12px; white-space: normal; text-align: left; }
.sidebar-help .button:hover { background: transparent; }
.sidebar-version { padding: 1px 13px; color: #737081; font-size: 12px; }
.profile-switch { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 3px 0 3px 6px; border: 0; background: transparent; text-align: left; }
.profile-switch .user-meta { max-width: 195px; font-size: 13px; }
.profile-switch .user-meta strong { overflow: hidden; color: #343049; text-overflow: ellipsis; white-space: nowrap; }
.profile-switch .user-meta > span { margin-top: 2px; color: #737081; font-size: 12px; }
.profile-switch > .icon { width: 14px; height: 14px; margin-left: 3px; color: #9690a2; }
.avatar { background: var(--avatar-color, #e8e1fa); color: #665274; }
.avatar.large { flex-basis: 49px; width: 49px; height: 49px; border-radius: 15px; font-size: 16px; }
.avatar.extra-large { flex-basis: 76px; width: 76px; height: 76px; border-radius: 23px; font-size: 26px; }
.demo-strip > .icon { width: 16px; height: 16px; }
.demo-strip > span { flex: 1; }
.demo-strip > button { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; color: #725b97; font-size: 12px; font-weight: 550; }
.demo-strip > button .icon { width: 14px; height: 14px; }
.hero-card { grid-template-columns: minmax(0, 1fr) 300px; margin-bottom: 24px; padding: 25px 31px; }
.hero-copy > .chip { margin-bottom: 15px; background: #e4daf5; color: #775e9b; font-size: 12px; }
.hero-copy h2 { color: #4d3b64; font-size: 28px; line-height: 1.35; }
.hero-copy p { max-width: 560px; color: #746581; font-size: 14px; line-height: 1.65; }
.hero-copy > .button { font-size: 13px; }
.hero-art { min-height: 210px; }
.hero-art svg { width: 300px; height: auto; max-height: 210px; }
.stat-top { min-height: 31px; }
.stat-card .stat-icon { position: absolute; top: 17px; right: 18px; }
.stat-label { display: block; padding-right: 41px; font-size: 12px; line-height: 1.45; }
.stat-value { margin-top: 8px; }
.stat-detail { font-size: 12px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { margin: 0; color: #343049; font-size: 18px; font-weight: 600; }
.section-heading .muted { font-size: 12px; }
.group-mini { display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; padding: 15px 0; border: 0; border-bottom: 1px solid #efebf4; background: transparent; text-align: left; }
.group-mini:first-child { padding-top: 0; }
.group-mini:last-child { padding-bottom: 0; border-bottom: 0; }
.group-mini > span:nth-child(2) { flex: 1; min-width: 0; }
.group-mini strong { display: block; margin-bottom: 4px; color: #514760; font-size: 14px; font-weight: 600; }
.group-mini small { display: block; color: #737081; font-size: 12px; line-height: 1.65; }
.group-mini > .icon { width: 15px; height: 15px; color: #a59caf; }
.group-mini:hover strong { color: var(--accent); }
.group-symbol { display: grid; place-items: center; flex: 0 0 41px; width: 41px; height: 44px; border-radius: 13px; color: #786288; }
.group-symbol .icon { width: 22px; height: 22px; }
.contact-card > .avatar { width: 53px; height: 53px; margin-bottom: 14px; font-size: 17px; }
.contact-card h3 { margin: 0 0 5px; color: #343049; }
.contact-card > p { margin-bottom: 19px; font-size: 13px; }
.contact-card + .contact-card { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.child-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.child-card > h3 { margin: 0; color: #343049; font-size: 18px; font-weight: 600; }
.child-card > .muted { margin-top: -11px; color: #737081; font-size: 13px; }
.child-card-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 0; border-top: 1px solid #f1edf6; border-bottom: 1px solid #f1edf6; color: #737081; font-size: 13px; }
.child-card-summary strong { color: #655079; font-size: 18px; font-weight: 600; }
.child-card-date { display: flex; align-items: center; gap: 8px; color: #737081; font-size: 12px; }
.child-card-date .icon { width: 15px; height: 15px; color: #9c8cab; }
.child-card > .button { justify-content: space-between; margin-top: auto; font-size: 13px; }
button.person-cell { padding: 0; border: 0; background: transparent; text-align: left; }
button.person-cell:hover .person-name { color: var(--accent); }
.observation-count { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.observation-count .icon { width: 15px; height: 15px; color: #9b8da7; }
.card.group-card { gap: 0; padding: 0; overflow: hidden; }
.group-cover { display: flex; align-items: center; justify-content: space-between; min-height: 87px; padding: 22px; color: #715c83; }
.group-cover > .icon { width: 29px; height: 29px; }
.group-cover > span { padding: 4px 9px; border-radius: 6px; background: rgba(255,255,255,.5); color: #786589; font-size: 12px; }
.group-card .card-body { flex: 1; padding: 21px; }
.group-card .card-body > h2 { margin: 0 0 7px; color: #343049; font-size: 20px; font-weight: 600; }
.group-card .card-body > .muted { color: #737081; font-size: 13px; }
.group-details { display: flex; flex-wrap: wrap; gap: 8px 17px; margin-top: 18px; color: #737081; font-size: 12px; }
.group-details > span { display: inline-flex; align-items: center; gap: 6px; }
.group-details .icon { width: 15px; height: 15px; color: #988aa4; }
.group-teacher { display: flex; align-items: center; gap: 10px; margin-top: 19px; padding-top: 17px; border-top: 1px solid #efebf4; }
.group-teacher > span { min-width: 0; }
.group-teacher small, .group-teacher strong { display: block; }
.group-teacher small { font-size: 12px; }
.group-teacher strong { margin-top: 2px; color: #514760; font-size: 13px; font-weight: 550; }
.group-card .card-footer { margin: 0; padding: 15px 21px; }
.timeline-item { gap: 14px; padding-bottom: 25px; }
.timeline-item::before { top: 37px; bottom: 4px; left: 16px; }
.timeline-dot { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; margin-top: 0; border: 0; border-radius: 10px; background: #f0eafb; color: #9474b6; box-shadow: none; }
.timeline-dot .icon { width: 16px; height: 16px; }
.timeline-dot.green { background: #edf5ef; color: #719c7f; box-shadow: none; }
.timeline-dot.purple { background: #f0eafb; color: #9474b6; }
.observation-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; }
.observation-top > .muted { color: #737081; font-size: 12px; }
.observation-top .badge { font-size: 12px; }
.timeline-content h3 { margin: 9px 0 7px; color: #343049; font-size: 15px; line-height: 1.5; font-weight: 600; }
.timeline-content .observation-comment { margin: 0 0 12px; color: #737081; font-size: 13px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.observation-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.observation-bottom > .muted { color: #737081; font-size: 12px; }
.observation-bottom .chip { font-size: 12px; }
.observation-bottom .button { margin-left: auto; font-size: 12px; }
.text-link { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: #7960b3; font-size: inherit; font-weight: 550; line-height: inherit; text-align: left; }
.text-link:hover { color: #6848a6; text-decoration: underline; text-underline-offset: 3px; }
.text-link .icon { width: 15px; height: 15px; }
.back-link { margin: -4px 0 17px; padding-left: 0; font-size: 13px; }
.profile-title { flex: 1; min-width: 220px; }
.profile-title > h1 { color: #343049; font-size: 29px; }
.profile-title .profile-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 14px; color: #737081; font-size: 13px; }
.profile-title .profile-facts > span { display: inline-flex; align-items: center; gap: 14px; }
.profile-title .profile-facts > span + span::before { content: ""; width: 3px; height: 3px; border-radius: 50%; background: #aaa2b5; }
.profile-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.summary-item { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.summary-item > div { min-width: 0; }
.summary-item .stat-icon { flex: 0 0 37px; width: 37px; height: 37px; border-radius: 12px; }
.summary-item strong { display: block; color: #343049; font-size: 17px; font-weight: 600; line-height: 1.45; }
.summary-item div > span { display: block; margin-top: 4px; color: #737081; font-size: 12px; }
.metric-caption { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #737081; font-size: 13px; }
.metric-caption strong { color: #514760; font-size: 13px; font-weight: 550; }
.metric-caption > span { white-space: nowrap; }
.metric-row > small { grid-column: 1 / -1; color: #737081; font-size: 12px; }
.metric-bar { position: relative; height: 8px; overflow: visible; }
.baseline-marker { position: absolute; top: -3px; width: 2px; height: 14px; border-radius: 2px; background: #524660; transform: translateX(-50%); }
.metrics-list + .form-hint { margin-top: 20px; }
.notice { margin-bottom: 18px; color: #736184; font-size: 13px; }
.notice:last-child { margin-bottom: 0; }
.notice + .card { margin-top: 18px; }
.card-body > .notice { margin: 17px 0; }
.card-body > .notice:last-child { margin-bottom: 0; }
.thread-list-heading { padding: 10px 11px 13px; color: #737081; font-size: 12px; font-weight: 600; }
.thread-copy { flex: 1; min-width: 0; }
.thread-copy strong { color: #514760; font-size: 13px; }
.thread-copy small { display: block; margin-top: 5px; overflow: hidden; color: #737081; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .nav-badge { align-self: center; flex-shrink: 0; margin-left: 0; }
.message-header { justify-content: flex-start; }
.message-header > div { flex: 1; min-width: 0; }
.message-header h3 { color: #343049; font-size: 15px; }
.message-header p { color: #737081; font-size: 12px; }
.message-line { display: flex; flex-direction: column; align-items: flex-start; align-self: flex-start; max-width: 84%; }
.message-line.mine { align-items: flex-end; align-self: flex-end; }
.message-line .message-bubble { width: fit-content; max-width: 100%; color: #665274; font-size: 14px; }
.message-line .message-meta { margin-top: 6px; color: #81728d; font-size: 12px; }
.message-line.mine .message-meta { text-align: right; }
.message-panel > .notice { margin: 0; padding: 13px 18px; border-width: 1px 0 0; border-radius: 0; }
.report-summary { display: flex; gap: 38px; margin: 22px 0; }
.report-summary strong { display: block; color: #514760; font-size: 30px; font-weight: 600; line-height: 1.2; }
.report-summary span { display: block; margin-top: 6px; color: #737081; font-size: 12px; }
.card-header div > .stat-icon { margin-bottom: 14px; }
.card-body > .form-hint + .button { margin-top: 18px; }
.modal-intro { margin-bottom: 20px; color: #737081; font-size: 14px; line-height: 1.7; }
.modal-open { overflow: hidden; }
.role-card > span:not(.role-icon):not(.badge) { color: #605467; font-size: 13px; }
.role-card > small { color: #737081; font-size: 12px; line-height: 1.65; }
.role-grid + .form-hint { margin-top: 18px; }
.process-steps { display: grid; margin: 0 0 22px; }
.process-step { position: relative; display: grid; grid-template-columns: 39px minmax(0, 1fr); gap: 17px; padding-bottom: 27px; }
.process-step::before { content: ""; position: absolute; top: 44px; bottom: 5px; left: 19px; width: 1px; background: #e5d9f0; }
.process-step:last-child { padding-bottom: 0; }
.process-step:last-child::before { display: none; }
.process-step > span { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid #e5d6f1; border-radius: 12px; background: #f4edf9; color: #9070ad; font-size: 12px; font-weight: 600; }
.process-step h3 { margin: 3px 0 8px; color: #343049; font-size: 16px; font-weight: 600; }
.process-step p { margin-bottom: 11px; color: #737081; font-size: 14px; line-height: 1.7; }
.process-step .text-link { font-size: 13px; }
.form-field > span:first-child { color: #514760; font-size: 13px; font-weight: 550; }
form > .form-field + .form-field, form > .form-grid + .form-field { margin-top: 18px; }
form > .form-grid + .notice, form > .form-field + .notice, form > .form-field + .form-hint { margin-top: 18px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 23px; padding-top: 18px; border-top: 1px solid #eae2f1; }
.form-actions .button { font-size: 13px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0; color: #62536f; font-size: 13px; line-height: 1.6; }
.checkbox-field input { margin-top: 3px; }
.checkbox-field small { margin-left: 5px; color: #737081; font-size: 12px; }
.template-fields .form-section { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: start; gap: 15px; }
.template-fields .form-section + .form-section { margin-top: 19px; padding-top: 19px; }
.field-number { display: grid; place-items: center; width: 30px; height: 30px; margin-top: 25px; border-radius: 9px; background: #f1eafa; color: #9576b1; font-size: 12px; font-weight: 600; }
.activity-item .stat-icon { flex: 0 0 35px; }
.activity-item strong { color: #343049; font-size: 14px; }
.activity-item p { color: #737081; font-size: 12px; line-height: 1.7; }
.app-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px 18px; margin-top: 35px; padding-top: 19px; border-top: 1px solid #e9e4ef; color: #737081; font-size: 12px; }
.toast.error { border-color: #8d4654; background: #783b49; }
.print-brand { color: #7960d6; font-size: 16pt; }
.print-child { margin-top: 8mm; }
.print-child > article { margin: 5mm 0; padding-top: 3mm; border-top: 1px solid #ddd5e7; break-inside: avoid; }

/* Main text remains readable at normal working distances. */
.page-description, .hero-copy p, .card-body > p { font-size: 14px; }
.button { font-size: 13px; }
.card-header h2, .card-header h3 { color: #343049; font-size: 16px; }
.card-header p { color: #737081; font-size: 12px; }
.person-name { color: #343049; font-size: 14px; }
.data-table { font-size: 13px; }
.data-table th { color: #737081; font-size: 12px; }
.data-table td { color: #62576e; font-size: 13px; }
.form-hint { color: #737081; font-size: 12px; }
.page-description { color: #737081; }

@keyframes modal-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Tablet and narrow laptop */
/* Analytics keeps the same lavender workspace and uses data-driven SVG. */
.analytics-heading { align-items: center; margin: 5px 0 17px; }
.analytics-heading h2 { margin-bottom: 3px; }
.analytics-heading p { margin: 0; font-size: 13px; }
.analytics-section { margin-bottom: 27px; }
.analytics-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 13px 18px; margin-bottom: 15px; }
.analytics-controls > .button { margin: 0 0 2px auto; }
.analytics-control { display: grid; gap: 6px; min-width: 185px; max-width: 100%; }
.analytics-control > span { color: #686277; font-size: 12px; font-weight: 550; }
.analytics-control select { width: 100%; min-height: 43px; max-width: 100%; padding: 9px 34px 9px 13px; border: 1px solid #e5dfef; border-radius: 10px; color: #40374f; background: #fff; font-size: 13px; cursor: pointer; }
.analytics-control-metric { min-width: 245px; }
.analytics-selected { display: flex; align-items: center; gap: 11px; min-height: 66px; min-width: 185px; }
.analytics-selected strong, .analytics-selected span:not(.avatar) { display: block; }
.analytics-selected strong { color: #41364f; font-size: 14px; }
.analytics-selected div > span { color: var(--muted); font-size: 12px; }
.analytics-source { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; padding: 13px 16px; border: 1px solid #e6e0f0; border-radius: 13px; background: #faf8fd; color: #6d627e; }
.analytics-source.is-sample { background: #f1ecfb; border-color: #e7dff7; }
.analytics-source > .icon { width: 20px; height: 20px; flex: 0 0 20px; color: #8c70c3; }
.analytics-source > div { flex: 1; }
.analytics-source strong { display: block; color: #68518b; font-size: 12px; font-weight: 650; }
.analytics-source div > span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.5; }
.analytics-source .button { flex-shrink: 0; padding: 6px 10px; font-size: 12px; }
.analytics-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: 21px; align-items: stretch; }
.analytics-grid > * { min-width: 0; }
.analytics-card { display: flex; flex-direction: column; overflow: hidden; }
.analytics-card .card-header { align-items: flex-start; padding: 20px 23px 15px; border-bottom-color: #f2eef8; }
.analytics-kicker { display: block; margin-bottom: 5px; color: #8a7a9d; font-size: 12px; font-weight: 650; letter-spacing: .085em; text-transform: uppercase; }
.analytics-card .card-header h2 { color: #393148; font-size: 17px; font-weight: 650; }
.chart-source-pill { display: inline-flex; flex-shrink: 0; align-items: center; min-height: 25px; padding: 4px 9px; border-radius: 7px; background: #f6f3fb; color: #786394; font-size: 12px; font-weight: 550; line-height: 1.4; }
.analytics-card-body { min-width: 0; padding: 8px 18px 0; }
.analytics-card[data-chart="radar"] .analytics-card-body { flex: 1; display: flex; align-items: center; }
.ap-chart { width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #d6c8eb transparent; }
.ap-chart > svg { display: block; width: 100%; height: auto; margin: 0 auto; font-family: inherit; }
.ap-chart--radar > svg { min-width: 360px; max-width: 490px; }
.ap-chart--trend > svg { min-width: 430px; }
.ap-chart--groups > svg { min-width: 540px; max-width: 920px; }
.ap-chart-data { margin: 8px 4px 12px; border-top: 1px solid #eee8f5; color: #79678f; font-size: 12px; }
.ap-chart-data summary { width: fit-content; padding: 11px 0 0; cursor: pointer; font-size: 12px; }
.ap-chart-data[open] { overflow-x: auto; padding-bottom: 4px; }
.ap-chart-data table { width: 100%; margin: 12px 0 0; border-collapse: collapse; color: #554961; font-size: 12px; text-align: left; }
.ap-chart-data th { color: #62506f; font-weight: 650; background: #f7f4fb; }
.ap-chart-data th, .ap-chart-data td { padding: 9px 7px; border-bottom: 1px solid #eee8f4; vertical-align: top; }
.ap-chart-data th:first-child, .ap-chart-data td:first-child { padding-left: 10px; }
.chart-legend { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 15px; margin-top: auto; padding: 13px 19px 18px; color: #73627f; font-size: 12px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend-mark { display: inline-block; width: 17px; height: 3px; border-radius: 2px; }
.legend-mark.current { background: #7960d6; }
.legend-mark.baseline { height: 0; border-top: 2px dashed #ad9bc6; border-radius: 0; }
.chart-readout { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 24px 0; }
.chart-readout > div:first-child { display: grid; gap: 1px; }
.chart-readout > div:first-child > strong { color: #463557; font-size: 30px; font-weight: 650; line-height: 1.25; letter-spacing: -.045em; }
.chart-readout strong small { color: #aaa0b6; font-size: 15px; font-weight: 400; letter-spacing: 0; }
.chart-readout > div:first-child > span { max-width: 260px; color: #7a6c87; font-size: 12px; }
.chart-delta { display: grid; justify-items: end; gap: 3px; padding-bottom: 5px; }
.chart-delta > span { padding: 4px 10px; border-radius: 7px; background: #f0eafa; color: #7b5bb0; font-size: 14px; font-weight: 600; }
.chart-delta > small, .chart-readout-note { color: #8c7d98; font-size: 12px; }
.chart-footnote { margin-top: auto; padding: 12px 23px 17px; border-top: 1px solid #f4f0f8; color: #80728d; font-size: 12px; line-height: 1.6; }
.chart-footnote strong { font-weight: 600; }
.analytics-comparison .analytics-card-body { padding: 13px 24px 0; }
.analytics-method-note { margin: 16px 3px 0; color: #85788f; font-size: 12px; }
.print-analytics { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8mm; margin: 5mm 0; }
.print-analytics .ap-chart-data { display: none; }
.print-analytics .ap-chart { overflow: visible; }
.print-analytics .ap-chart > svg { min-width: 0; }
.print-analytics h3 { font-size: 10pt; }

@media (max-width: 1180px) and (min-width: 900px) {
  .analytics-grid { grid-template-columns: minmax(0, 1fr); }
  .analytics-card .card-header { padding-right: 22px; padding-left: 22px; }
  .ap-chart--radar > svg { max-width: 440px; }
}
@media (max-width: 700px) {
  .analytics-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .analytics-control { flex: 1 1 150px; min-width: 0; }
  .analytics-control-metric { flex: 1.5 1 220px; min-width: 0; }
  .analytics-control select { font-size: 16px; }
  .analytics-controls > .button { margin-left: 0; }
  .analytics-source { align-items: flex-start; flex-wrap: wrap; gap: 8px 10px; padding: 13px; }
  .analytics-source > div { flex-basis: calc(100% - 30px); }
  .analytics-source .button { margin-left: 25px; }
  .analytics-card .card-header { padding: 17px 17px 14px; gap: 10px; flex-wrap: wrap; }
  .analytics-card .card-header h2 { font-size: 16px; }
  .analytics-card-body { padding: 8px 8px 0; }
  .chart-readout { padding: 16px 18px 0; }
  .chart-readout > div:first-child > span { max-width: 220px; }
  .chart-footnote { padding: 12px 17px 16px; }
  .analytics-comparison .analytics-card-body { padding: 8px 8px 0; }
  .ap-chart-data { margin-right: 9px; margin-left: 9px; }
  .analytics-heading > .button { max-width: 128px; text-align: left; }
}

@media (min-width: 1700px) {
  .topbar { padding-right: max(38px, calc((100vw - var(--sidebar-width) - 1364px) / 2)); padding-left: max(38px, calc((100vw - var(--sidebar-width) - 1364px) / 2)); }
}
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr) 275px; gap: 18px; }
  .stats-grid { gap: 13px; }
  .stat-card { padding: 18px 16px 16px; }
  .stat-icon { right: 13px; top: 15px; width: 30px; height: 30px; border-radius: 9px; }
  .stat-icon svg { width: 16px; height: 16px; }
  .stat-label { padding-right: 29px; }
  .stat-value { font-size: 29px; }
  .children-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { grid-template-columns: minmax(0, 1fr) 126px; padding: 24px; }
  .hero-copy h2 { font-size: 22px; }
  .hero-art { min-height: 125px; }
  .hero-art:empty::before { width: 118px; height: 118px; border-width: 21px; }
  .card-header { padding: 18px 19px 15px; }
  .card-body { padding: 19px; }
  .card-footer { padding-right: 19px; padding-left: 19px; }
  .message-layout { grid-template-columns: 235px minmax(0, 1fr); }
  .topbar-actions { gap: 11px; }
}
@media (max-width: 1060px) {
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-grid > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 18px; }
  .dashboard-grid > aside > .section-gap { margin-top: 0; }
  .page-heading { align-items: flex-start; }
  .heading-actions { max-width: 280px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 19px 20px 17px; }
  .stat-icon { right: 18px; top: 17px; width: 35px; height: 35px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .role-grid { gap: 10px; }
  .role-card { padding: 16px 13px; }
}
@media (max-width: 899px) {
  .sidebar { z-index: 100; width: 248px; visibility: hidden; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar-open .sidebar { visibility: visible; transform: translateX(0); box-shadow: 12px 0 45px rgba(48, 33, 63, .15); }
  .sidebar-open::before { content: ""; position: fixed; inset: 0; z-index: 70; background: rgba(38, 28, 48, .28); pointer-events: none; }
  .main-shell { margin-left: 0; }
  .topbar { gap: 12px; min-height: 66px; padding: 12px 22px; }
  .mobile-menu { display: inline-flex; flex-basis: 35px; width: 35px; height: 35px; padding: 8px; }
  .topbar > .breadcrumbs { margin-right: auto; }
  .topbar .breadcrumbs { font-size: 12px; }
  .topbar-actions { gap: 10px; }
  .main-content { padding: 23px 22px 35px; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-card { padding: 17px 15px 15px; }
  .stat-icon { top: 13px; right: 11px; width: 29px; height: 29px; }
  .stat-label { padding-right: 25px; }
  .stat-value { font-size: 28px; }
  .page-heading h1 { font-size: 28px; }
  .hero-card { grid-template-columns: minmax(0, 1fr) 170px; }
  .profile-facts { gap: 10px; }
}
@media (max-width: 700px) {
  .profile-summary-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .summary-item { padding: 15px 18px; }
  .summary-item strong { font-size: 16px; }
  .thread-list-heading { display: none; }
  .role-card > :not(.role-icon) { grid-column: 2; }
  .role-card > .role-icon { grid-row: 1 / span 3; }
  .topbar { padding-right: 17px; padding-left: 17px; }
  .topbar-actions { gap: 8px; }
  .topbar .user-meta { display: none; }
  .topbar-actions .button { min-height: 35px; padding: 8px 11px; font-size: 12px; }
  .user-avatar { flex-basis: 35px; width: 35px; height: 35px; border-radius: 11px; font-size: 12px; }
  .main-content { padding-right: 17px; padding-left: 17px; }
  .page-heading { flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
  .heading-actions { justify-content: flex-start; max-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat-card { padding: 18px; }
  .stat-icon { top: 15px; right: 15px; width: 32px; height: 32px; }
  .stat-label { padding-right: 31px; }
  .hero-card { grid-template-columns: minmax(0, 1fr) 130px; padding: 23px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .dashboard-grid > aside { grid-template-columns: minmax(0, 1fr); }
  .profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .message-layout { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .thread-list { flex-direction: row; gap: 6px; padding: 9px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--border); }
  .thread-list > h3 { display: none; }
  .thread-item { flex: 0 0 212px; width: 212px; padding: 10px; }
  .message-panel { height: 470px; }
  .message-header { min-height: 70px; padding: 15px 18px; }
  .message-stream { padding: 18px; }
  .message-compose { padding: 13px 15px; }
  .role-grid { grid-template-columns: minmax(0, 1fr); }
  .role-card { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 6px 13px; padding: 15px; }
  .role-card .role-icon { grid-row: span 2; margin: 0; }
  .role-card strong, .role-card p { grid-column: 2; }
  .role-card .badge { grid-column: 2; margin-top: 4px; }
  .toast-container { right: 16px; bottom: 16px; }
}
@media (max-width: 480px) {
  .topbar { min-height: 62px; gap: 8px; padding: 11px 13px; }
  .breadcrumbs { gap: 6px; font-size: 12px; }
  .breadcrumbs > :not(:last-child):not(.mobile-menu) { display: none; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .button { gap: 5px; padding: 7px 9px; font-size: 12px; }
  .topbar-actions .icon-button { flex-basis: 32px; width: 32px; height: 32px; padding: 7px; }
  .topbar-actions .user-avatar { flex-basis: 32px; width: 32px; height: 32px; border-radius: 10px; }
  .main-content { padding: 17px 13px 28px; }
  .demo-strip { align-items: flex-start; margin-bottom: 21px; padding: 10px 11px; gap: 8px; font-size: 12px; }
  .demo-strip .button { padding: 3px 5px; font-size: 12px; }
  .page-heading { gap: 14px; }
  .page-heading h1 { margin-bottom: 7px; font-size: 25px; line-height: 1.25; }
  .page-description { font-size: 12px; }
  .eyebrow { margin-bottom: 6px; font-size: 12px; }
  .heading-actions { width: 100%; gap: 8px; }
  .heading-actions .button { flex: 1; min-height: 39px; padding: 9px 10px; font-size: 12px; }
  .stats-grid { gap: 10px; margin-bottom: 19px; }
  .stat-card { padding: 16px 13px 14px; border-radius: 13px; }
  .stat-icon { top: 13px; right: 11px; width: 27px; height: 27px; border-radius: 8px; }
  .stat-icon svg { width: 14px; height: 14px; }
  .stat-label { padding-right: 25px; font-size: 12px; }
  .stat-value { margin-top: 10px; font-size: 27px; }
  .stat-detail { margin-top: 8px; font-size: 12px; }
  .dashboard-grid, .stack, .content-stack { gap: 18px; }
  .section-gap { margin-top: 18px; }
  .hero-card { grid-template-columns: minmax(0, 1fr); padding: 22px; border-radius: 15px; }
  .hero-art { display: none; }
  .hero-copy h2 { max-width: 290px; font-size: 22px; }
  .hero-copy p { margin-bottom: 16px; font-size: 12px; }
  .card { border-radius: 15px; }
  .card-header { gap: 10px; padding: 17px 16px 14px; }
  .card-header h2, .card-header h3 { font-size: 16px; }
  .card-header .button { gap: 4px; padding: 6px 8px; font-size: 12px; }
  .card-body { padding: 17px 16px; }
  .card-footer { flex-wrap: wrap; padding: 13px 16px; }
  .card > .toolbar { padding: 16px; }
  .children-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .child-card, .group-card { padding: 19px; border-radius: 15px; }
  .child-card .card-footer, .group-card .card-footer { margin: 0 -19px -19px; padding: 13px 19px; }
  .toolbar { gap: 10px; margin-bottom: 16px; }
  .search-field { flex-basis: 100%; min-width: 0; max-width: none; }
  .toolbar > .filter-select { flex: 1; min-width: 0; }
  .toolbar-left, .toolbar-right { width: 100%; }
  .toolbar-left .filter-select, .toolbar-right .filter-select { flex: 1; min-width: 0; }
  .tabs { gap: 3px; margin-bottom: 18px; }
  .tab { padding: 8px 11px; font-size: 12px; }
  .profile-header { gap: 13px; }
  .profile-header .avatar { flex-basis: 58px; width: 58px; height: 58px; border-radius: 18px; font-size: 20px; }
  .profile-header h1 { font-size: 24px; }
  .profile-header .heading-actions { margin-left: 0; }
  .profile-facts { gap: 9px; }
  .profile-facts > div { padding: 12px; }
  .profile-facts dd, .profile-facts strong { font-size: 12px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form-field.full, .form-field.wide, .span-2, .col-span-2 { grid-column: auto; }
  .form-field input, .form-field select, .form-field textarea { font-size: 16px; }
  .modal-backdrop { align-items: center; padding: 12px; }
  .modal { max-height: calc(100dvh - 24px); border-radius: 17px; }
  .modal-header { gap: 10px; padding: 18px; }
  .modal-header h2 { font-size: 19px; }
  .modal-body { padding: 19px 18px; }
  .modal-footer { gap: 8px; padding: 14px 18px; }
  .modal-footer .button { flex: 1; padding-right: 10px; padding-left: 10px; font-size: 12px; }
  .modal-footer .muted { flex-basis: 100%; }
  .message-panel { height: 440px; }
  .message-header { padding: 13px 14px; }
  .message-stream { gap: 12px; padding: 16px 13px; }
  .message-bubble { max-width: 91%; padding: 10px 12px; font-size: 12px; }
  .message-line { max-width: 94%; }
  .message-line .message-bubble { font-size: 13px; }
  .form-actions { gap: 9px; }
  .form-actions .button { flex: 1 1 180px; font-size: 13px; }
  .process-step { grid-template-columns: 33px minmax(0, 1fr); gap: 12px; }
  .process-step > span { width: 33px; height: 33px; border-radius: 10px; }
  .process-step::before { left: 16px; top: 39px; }
  .process-step h3 { font-size: 15px; }
  .process-step p { font-size: 13px; }
  .message-compose { gap: 7px; padding: 11px 12px; }
  .message-compose .button { min-width: 40px; padding: 9px 10px; font-size: 12px; }
  .message-compose textarea, .message-compose input { font-size: 16px; }
  .empty-state { padding: 33px 20px; }
  .legend { gap: 9px 14px; }
  .toast { padding: 14px 15px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* The report can be a body-level sibling or live inside the application. */
@media print {
  @page { size: A4; margin: 16mm; }
  html, body { min-width: 0; min-height: 0; height: auto; background: #fff !important; color: #242137; font-size: 10pt; }
  body * { visibility: hidden; }
  body:has(> .print-report) > :not(.print-report) { display: none !important; }
  .no-print, .sidebar, .topbar, .demo-strip, .toast-container, .modal-backdrop { display: none !important; }
  .app-shell, .main-shell, .main-content { min-height: 0; margin: 0; padding: 0; }
  .print-report, .print-report * { visibility: visible !important; }
  .print-report { position: absolute; top: 0; left: 0; display: block !important; width: 100%; padding: 0; background: #fff; color: #242137; }
  .print-report .no-print { display: none !important; }
  .print-report h1 { margin-bottom: 5mm; font-size: 23pt; }
  .print-report h2 { margin: 6mm 0 3mm; color: #514565; font-size: 14pt; }
  .print-report h3 { margin: 4mm 0 2mm; font-size: 11pt; }
  .print-report p { margin-bottom: 3mm; }
  .print-report table { width: 100%; margin: 4mm 0; border-collapse: collapse; font-size: 9pt; }
  .print-report th, .print-report td { padding: 3mm; border: 1px solid #ded9e5; color: #3a3047; text-align: left; }
  .print-report th { background: #f3eff7; font-weight: 600; }
  .print-report tr, .print-report .card, .print-report .profile-facts > div { break-inside: avoid; }
  .print-report thead { display: table-header-group; }
  .print-report h1, .print-report h2, .print-report h3 { break-after: avoid; }
  .print-report .print-analytics { break-inside: avoid; }
  .print-report svg { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report .card { margin-bottom: 5mm; border-color: #ded9e5; box-shadow: none; }
  .print-report .muted, .print-report .page-description { color: #73697f; }
  .print-report .badge, .print-report .chip, .print-report .metric-fill, .print-report th { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .print-report a { color: inherit; text-decoration: none; }
}
/* Server login reuses the accepted light theme without persisting account data. */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(circle at 15% 10%, rgba(214, 195, 255, .42), transparent 36%),
    radial-gradient(circle at 85% 80%, rgba(159, 213, 202, .28), transparent 34%),
    var(--bg, #f7f6fb);
}
.auth-card {
  width: min(100%, 460px);
  display: grid;
  gap: 24px;
  padding: 32px;
}
.auth-card form { display: grid; gap: 16px; }
.auth-card .button { justify-content: center; width: 100%; }
