@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Manrope:wght@500;600;650;700;750;800&display=swap");
:root {
  font-family: "DM Sans", sans-serif;
  color: #30323f;
  background: #eaf0f7;
  font-synthesis: none;
  --ink: #30323f;
  --muted: #9394a2;
  --line: #eeeef3;
  --accent: #8777e7;
  --accent-soft: #f0edff;
  --mint: #e2f5e9;
  --rose: #fbe6f0;
  --butter: #fff3c9;
  --slate: #edf0f4;
  --lilac: #eee9ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse at 100% 5%, #cfdeef, transparent 62%),
    radial-gradient(ellipse at 0 100%, #eee0f0, transparent 60%), #eaf0f7;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea,
a {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-family: Manrope, sans-serif;
}
h1 {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 750;
  line-height: 1.3;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.35px;
  font-weight: 750;
}
h3 {
  font-size: 14px;
}
p {
  line-height: 1.65;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
input[type="date"] {
  color-scheme: light;
}
input[type="search"]::-webkit-search-cancel-button {
  appearance: none;
}
[hidden] {
  display: none !important;
}
.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;
}
.muted {
  color: var(--muted);
}
.lilac {
  background: var(--lilac);
  color: #8976d6;
}
.mint {
  background: var(--mint);
  color: #68a782;
}
.butter {
  background: var(--butter);
  color: #ba9e43;
}
.rose {
  background: var(--rose);
  color: #c8799d;
}
.slate {
  background: var(--slate);
  color: #8f98a8;
}
.app-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  margin: 0;
  min-height: 100dvh;
  border-radius: 0;
  background: #fcfcfd;
  box-shadow: none;
  overflow: clip;
  border: 0;
}
.sidebar {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100dvh;
  background: #fff;
  border-right: 1px solid #f0f0f4;
  z-index: 30;
}
.brand-area {
  height: 78px;
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: #88a6c9;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  letter-spacing: -0.85px;
  font:
    800 19px Manrope,
    sans-serif;
}
.brand img {
  width: 29px;
  height: 29px;
}
.brand-area .brand {
  color: #fff;
}
.brand-period {
  color: var(--accent);
}
.brand-area .brand-period {
  color: #e5dfff;
}
.nav-body {
  padding: 32px 14px 16px;
  overflow: auto;
  flex: 1;
}
.nav-caption {
  display: block;
  font-size: 10px;
  letter-spacing: 1.7px;
  color: #a8a7b4;
  font-weight: 600;
  padding: 0 14px;
  margin: 0 0 14px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  margin-bottom: 6px;
  font-size: 13px;
  border-radius: 11px;
  color: #858591;
  transition:
    background 0.15s,
    color 0.15s;
}
.nav-item:hover {
  background: #f8f6ff;
  color: #7464c2;
}
.nav-item.selected {
  background: #f0edfe;
  color: #8170d5;
  font-weight: 650;
}
.nav-count {
  margin-left: auto;
  border-radius: 6px;
  background: #e8e2fc;
  padding: 2px 6px;
  font-size: 10px;
}
.sidebar-depts {
  margin-top: 31px;
}
.department-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  width: 100%;
  text-align: left;
  color: #8b8b98;
  font-size: 12px;
  min-width: 0;
}
.department-nav span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.department-nav:hover,
.department-nav.current {
  color: #7361c4;
  background: #faf9ff;
  border-radius: 9px;
}
.dept-square {
  width: 8px;
  height: 8px;
  display: inline-block;
  border-radius: 3px;
  background: #b1aed6;
  flex-shrink: 0;
}
.dept-square.orange {
  background: #e6bd9b;
}
.dept-square.blue {
  background: #a7bfdf;
}
.dept-square.purple {
  background: #b9ade3;
}
.dept-square.green {
  background: #add2c1;
}
.sidebar-note {
  margin: 38px 10px 8px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.tiny-orbit {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f3f0fc;
  color: #a093c9;
  margin-bottom: 12px;
}
.sidebar-note strong {
  font-size: 12px;
  font-weight: 500;
  color: #8d889d;
  line-height: 1.8;
}
.sidebar-note p {
  font-size: 10px;
  color: #b0adba;
  margin-top: 8px;
}
.sidebar-bottom {
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: #efe9e4;
  color: #8f8177;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
}
.user-card > div {
  flex: 1;
  min-width: 0;
}
.user-card strong {
  display: block;
  font-size: 12px;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-card div span {
  font-size: 10px;
  color: var(--muted);
  text-transform: capitalize;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #9a98a7;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #f0ecfc;
  color: #7e6bd1;
}
.main-shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 30px;
  background: linear-gradient(110deg, #88a6c9, #a7b9d5);
  color: #fff;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 12px;
  white-space: nowrap;
}
.breadcrumb > span:first-of-type {
  color: #eef2f8;
}
.breadcrumb strong {
  font-weight: 550;
}
.breadcrumb-dot {
  opacity: 0.6;
}
.global-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 24px;
  background: #607fa330;
  border: 1px solid #ffffff10;
  padding: 11px 16px;
  width: 400px;
  max-width: 50%;
  color: #f2f5fb;
}
.global-search input {
  border: 0;
  background: none;
  outline: none !important;
  width: 100%;
  min-width: 0;
  color: #fff;
  font-size: 12px;
}
.global-search input::placeholder {
  color: #e7edf6;
}
.global-search kbd {
  font-size: 10px;
  opacity: 0.65;
  font-family: inherit;
  white-space: nowrap;
}
.menu-toggle {
  display: none;
}
.sidebar-backdrop {
  display: none;
}
main {
  padding: 32px;
  flex: 1;
  min-width: 0;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 27px;
}
.eyebrow {
  font-size: 9px;
  color: #a5a1b0;
  letter-spacing: 1.8px;
  font-weight: 600;
  margin-bottom: 9px;
}
.page-heading p {
  font-size: 13px;
  color: #847b91;
  margin-top: 9px;
}
.heading-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 37px;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
.button.primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 10px #8777e719;
}
.button.primary:hover {
  background: #7968db;
}
.heading-actions .button.primary {
  border-radius: 24px;
  padding: 12px 20px;
  min-height: 42px;
  font-size: 12px;
}
.button.secondary {
  border: 1px solid #e9e7ef;
  background: #fff;
  color: #747181;
}
.button.secondary:hover {
  background: #f7f5fd;
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9384ca;
  font-size: 11px;
  white-space: nowrap;
}
.text-button:hover {
  color: #7663bd;
}
.page-footer {
  display: flex;
  justify-content: space-between;
  margin: 4px 32px 0;
  padding: 21px 0;
  color: #b3afbd;
  font-size: 9px;
  border-top: 1px solid var(--line);
}
.page-footer span:first-child {
  font-weight: 650;
  letter-spacing: -0.2px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 25px;
}
.stat-card {
  position: relative;
  background: #fff;
  border: 1px solid #eeedf4;
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
  min-height: 126px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition:
    transform 0.15s,
    border 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: #d7cff3;
}
.stat-card.chosen {
  border-color: #cfc5f0;
  background: linear-gradient(120deg, #f8f6ff, #fff);
}
.stat-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-shrink: 0;
}
.stat-card .stat-icon {
  position: absolute;
  right: 16px;
  top: 17px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
}
.stat-card strong {
  font:
    750 29px Manrope,
    sans-serif;
  letter-spacing: -1px;
  margin: 10px 0 12px;
}
.stat-label {
  font-size: 12px;
  color: #81798d;
}
.stat-arrow {
  position: absolute;
  right: 18px;
  bottom: 18px;
  color: #d5cede;
  font-size: 14px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
  margin: 0 0 20px;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1px solid #eae8f1;
  background: #fff;
  border-radius: 11px;
  padding: 10px 13px;
  min-width: 122px;
  flex: 1;
  max-width: 210px;
}
.filter-field > span {
  font-size: 10px;
  color: #84798e;
  white-space: nowrap;
}
.filter-field select {
  border: none;
  outline: none;
  background: #fff;
  color: #645f73;
  font-size: 12px;
  width: 100%;
  min-width: 0;
  padding: 0 13px 0 0;
}
.date-range {
  min-width: 228px;
  flex: 1.6;
  max-width: none;
}
.date-range > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.date-range input {
  border: none;
  width: 100%;
  min-width: 0;
  color: #6d667e;
  background: transparent;
  font-size: 10px;
  padding: 0;
}
.date-range > div > span {
  color: #bfb7cf;
}
.reset-button {
  padding: 10px;
  color: #9284b3;
  align-self: center;
  min-width: 58px;
  font-size: 10px;
}
.filter-chip {
  border-radius: 20px;
  background: var(--rose);
  color: #b5658b;
  padding: 8px 13px;
  font-size: 11px;
}
.filter-error {
  color: #ae6980;
  width: 100%;
  font-size: 11px;
}
.scope-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 20px;
}
.scope-toolbar .filter-field {
  max-width: 190px;
}
.scope-toolbar > span {
  font-size: 11px;
  color: #a39aaa;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 22px 22px 20px;
}
.panel-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-heading p {
  font-size: 10px;
  color: #918297;
  margin-top: 5px;
}
.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.count-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 1px 6px;
  background: #f1eef9;
  color: #a496c0;
  border-radius: 6px;
  font-size: 10px;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
}
.columns-control {
  position: relative;
}
.column-popover {
  position: absolute;
  right: 0;
  top: 45px;
  width: 258px;
  background: #fff;
  border: 1px solid #e7e2f0;
  box-shadow: 0 15px 50px #4e3a7120;
  border-radius: 14px;
  padding: 16px;
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.column-popover > div {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.column-popover > p {
  grid-column: 1/-1;
  font-size: 9px;
  color: #a397b0;
  margin: 0 0 3px;
}
.column-popover label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #756a83;
}
.column-popover input {
  width: 13px;
  height: 13px;
}
.table-scroll {
  position: relative;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #ded8eb transparent;
  max-width: 100%;
  border-top: 1px solid #f2eff6;
  border-bottom: 1px solid #f2eff6;
}
.records-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
.records-table thead {
  background: #f8f7fb;
}
.records-table th {
  font-size: 11px;
  font-weight: 500;
  color: #7f738d;
  text-align: left;
  padding: 13px 12px;
  border-bottom: 1px solid #f0ecf6;
}
.records-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #f4f1f7;
  color: #7e758b;
}
.records-table tbody tr:last-child td {
  border-bottom: 0;
}
.records-table tbody tr:hover {
  background: #fcfaff;
}
.records-table tbody tr.row-selected {
  background: #f8f5ff;
}
.sort-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  font-size: inherit;
  white-space: nowrap;
}
.sort-button span {
  color: #c7bdcf;
  font-size: 11px;
}
.records-table th[aria-sort] .sort-button {
  color: #8070b9;
}
.selection-cell {
  width: 36px;
  padding-right: 4px !important;
  padding-left: 20px !important;
}
.actions-cell {
  text-align: center !important;
  position: sticky;
  right: 0;
  background: #fff;
  box-shadow: -3px 0 8px #5a407604;
}
.records-table th.actions-cell {
  background: #f8f7fb;
}
.row-selected .actions-cell {
  background: #f8f5ff;
}
.cell-text {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.id-cell {
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  letter-spacing: -0.2px;
}
.account-name {
  max-width: 180px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0;
  text-align: left;
  font-weight: 500;
  color: #645977;
  font-size: 12px;
}
.account-name:hover {
  color: var(--accent);
}
.facebook-link {
  font-family: Arial, sans-serif;
  background: #8aaff0;
  color: white;
  font-weight: 700;
  font-size: 13px;
  border-radius: 4px;
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.4;
  border-radius: 7px;
  padding: 5px 8px;
  color: #aaa1b5;
  background: #f2eef6;
}
.status > span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
.status-active,
.status-done {
  background: #eaf7ee;
  color: #527d62;
}
.status-stopped,
.status-paused,
.status-draft {
  background: #f0eff4;
  color: #81738c;
}
.status-in-review,
.status-pending {
  background: #fff5d8;
  color: #887132;
}
.status-flagged {
  background: #fcecf3;
  color: #9f5a79;
}
.status-completed {
  background: #efeafa;
  color: #a08ac2;
}
.money {
  font-variant-numeric: tabular-nums;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  color: #a398ae;
  font-size: 10px;
}
.page-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.page-button {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #eee9f3;
  background: #fff;
  color: #a194b2;
  font-size: 11px;
}
.page-button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 3px 8px #8777e71c;
}
.page-button:hover:not(.active):not(:disabled) {
  background: #f6f3ff;
}
.pagination > select {
  background: #fff;
  border: 1px solid #ebe5f2;
  border-radius: 8px;
  padding: 7px;
  font-size: 10px;
  color: #8d7d9c;
}
.pagination > span {
  margin-left: auto;
}
.page-ellipsis {
  padding: 0 4px;
}
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}
.recent-list {
  padding: 0 21px 10px;
}
.recent-row {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 17px 0;
  border-top: 1px solid #f4f1f7;
  text-align: left;
}
.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 10px;
  flex-shrink: 0;
  background: #eee8f9;
  color: #a08dc2;
}
.tone-1 {
  background: #edf5ef;
  color: #8fab97;
}
.tone-2 {
  background: #faf0e5;
  color: #c0a17e;
}
.tone-3 {
  background: #f5e9f0;
  color: #bd92a9;
}
.recent-name {
  min-width: 0;
  flex: 1;
}
.recent-name strong {
  font-size: 11px;
  font-weight: 550;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.recent-name small {
  font-size: 9px;
  color: #aaa1b3;
  display: block;
  margin-top: 4px;
}
.recent-budget {
  font-size: 10px;
  color: #a395b0;
  min-width: 48px;
  text-align: right;
}
.recent-row > svg {
  color: #c4b9d0;
}
.health-panel .panel-heading {
  padding-bottom: 8px;
}
.health-ring {
  --progress: 0%;
  height: 166px;
  width: 166px;
  margin: 11px auto 16px;
  background: conic-gradient(#bfb0f3 var(--progress), #f2edf9 0);
  border-radius: 50%;
  padding: 15px;
}
.health-ring > div {
  height: 100%;
  width: 100%;
  border: 7px solid white;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.health-ring strong {
  font:
    750 32px Manrope,
    sans-serif;
  letter-spacing: -1px;
}
.health-ring span {
  font-size: 11px;
  color: #a799b4;
  margin-top: 6px;
}
.health-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 10px;
  color: #9e90ad;
}
.health-legend > span {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.dot.mint {
  background: #bfb0f3;
}
.dot.slate {
  background: #e5ddef;
}
.health-footer {
  margin: 20px 22px 5px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.health-footer > span {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #9c8ba9;
  margin: 0 0 10px;
}
.health-footer strong {
  font-weight: 500;
  color: #85758f;
}
.lower-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
}
.radar-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 22px;
  text-align: left;
  border-top: 1px solid #f5f1f7;
}
.radar-item > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.radar-item strong {
  font-size: 11px;
  display: block;
  font-weight: 550;
}
.radar-item small {
  font-size: 9px;
  color: #b39ab1;
  display: block;
  margin-top: 5px;
  line-height: 1.6;
}
.radar-item > svg {
  color: #cbbcd1;
}
.panel-bottom {
  padding: 15px 22px;
  border-top: 1px solid var(--line);
}
.department-summary {
  padding: 0 22px 15px;
}
.department-summary button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  text-align: left;
  border-top: 1px solid #f4f0f7;
  font-size: 11px;
  color: #9c89aa;
}
.department-summary button > span:nth-child(2) {
  flex: 1;
}
.department-summary strong {
  font-size: 11px;
  font-weight: 500;
  margin-right: 10px;
  color: #92819f;
}
.department-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.department-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 26px;
  text-align: left;
  transition: transform 0.15s;
}
.department-card:hover {
  transform: translateY(-3px);
  border-color: #d4c5e9;
}
.department-icon {
  display: grid;
  place-items: center;
  height: 45px;
  width: 45px;
  border-radius: 15px;
  background: #f0e9fa;
  color: #b39ccd;
  margin-bottom: 27px;
}
.department-icon.orange {
  background: #fff2e2;
  color: #d3b58f;
}
.department-icon.blue {
  background: #ecf1fb;
  color: #a3b5d7;
}
.department-icon.green {
  background: #edf6f0;
  color: #a5c3b0;
}
.card-arrow {
  position: absolute;
  top: 32px;
  right: 25px;
  color: #cfbed9;
}
.department-card h2 {
  font-size: 17px;
}
.department-card p {
  font-size: 11px;
  color: #b09fba;
  margin-top: 10px;
  min-height: 40px;
}
.department-stats {
  display: flex;
  gap: 25px;
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.department-stats span {
  font-size: 9px;
  color: #b5a2bf;
}
.department-stats strong {
  display: block;
  font:
    650 19px Manrope,
    sans-serif;
  color: #8d739e;
  margin-bottom: 4px;
}
.report-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}
.report-stat {
  border-radius: 17px;
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.report-stat > span {
  font-size: 12px;
  color: #7c708a;
}
.report-stat > strong {
  font:
    750 32px Manrope,
    sans-serif;
  letter-spacing: -1px;
  color: #50425d;
}
.report-stat small {
  font-size: 10px;
  color: #9d89a5;
}
.report-stat em {
  font-style: normal;
  font-size: 19px;
  opacity: 0.45;
}
.bar-chart {
  padding: 10px 24px 29px;
}
.bar-chart > div {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 19px 0;
  font-size: 11px;
  color: #a390ae;
}
.bar-chart > div > span {
  width: 60px;
}
.bar-track {
  flex: 1;
  height: 12px;
  background: #f7f2fa;
  border-radius: 6px;
  overflow: hidden;
}
.bar-track > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  min-width: 0;
}
.bar-chart strong {
  font-size: 11px;
  font-weight: 500;
  width: 20px;
  text-align: right;
}
.budget-list {
  padding: 0 24px 20px;
}
.budget-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #f4edf8;
  padding: 20px 0;
  font-size: 11px;
  color: #a38cad;
}
.budget-list span {
  display: flex;
  align-items: center;
  gap: 10px;
}
.budget-list strong {
  font-weight: 500;
  color: #90739f;
}
.empty-state {
  padding: 55px 24px;
  text-align: center;
  max-width: 540px;
  margin: auto;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: #f3edf9;
  color: #bba6ce;
  margin: 0 auto 18px;
}
.empty-state h3 {
  font-size: 17px;
  letter-spacing: -0.4px;
}
.empty-state p {
  font-size: 12px;
  color: #a898b3;
  margin: 12px auto 20px;
  max-width: 340px;
}
.loading-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 230px;
  color: #a995b8;
  font-size: 12px;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #ece5f5;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.error-banner,
.demo-banner {
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 10px;
  margin-bottom: 20px;
  background: #fbeff4;
  color: #b37e98;
}
.demo-banner {
  background: #f0eef8;
  color: #a096b4;
  border: 1px dashed #e0d8ee;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: #544965;
  color: #fff;
  border-radius: 12px;
  padding: 13px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 40px #2d15352b;
  font-size: 12px;
  max-width: calc(100% - 32px);
}
/* Account details stay beside the table, following the second design reference. */
.dialog {
  border: 0;
  box-shadow: 0 20px 90px #29163f26;
  border-radius: 24px;
  background: #fff;
  padding: 0;
  width: 470px;
  max-width: calc(100% - 30px);
  color: var(--ink);
  max-height: calc(100dvh - 36px);
}
.dialog::backdrop {
  background: #27304430;
  backdrop-filter: blur(3px);
}
.dialog-wide {
  position: fixed;
  inset: 18px 18px 18px auto;
  margin: 0;
  width: 570px;
  height: calc(100dvh - 36px);
  max-height: none;
  border-radius: 22px;
  overflow-y: auto;
  animation: drawer 0.22s ease-out;
}
@keyframes drawer {
  from {
    transform: translateX(30px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 25px 27px 22px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #f2edf7;
}
.dialog-head h2 {
  font-size: 22px;
  letter-spacing: -0.8px;
}
.dialog-head p {
  font-size: 11px;
  color: #ab99b8;
  margin-top: 7px;
}
.dialog-head .icon-button {
  background: #f7f3fb;
  width: 33px;
  height: 33px;
}
.record-fields {
  border: 0;
  padding: 25px 27px;
  margin: 0;
  min-width: 0;
}
.record-fields section {
  margin-bottom: 27px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.record-fields h3 {
  margin-bottom: 18px;
  font-size: 12px;
  letter-spacing: 0;
  color: #8e7da0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 10px;
  color: #92829f;
  min-width: 0;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #ece5f2;
  border-radius: 9px;
  background: #fdfbfe;
  color: #685574;
  padding: 11px 12px;
  font-size: 12px;
  min-width: 0;
  line-height: 1.5;
}
.field textarea {
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #c1b1eb;
  background: white;
}
.field-hint {
  font-size: 10px;
  line-height: 1.7;
  color: #b29bbe;
  margin-top: 13px;
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 19px 27px;
  border-top: 1px solid #f0eaf6;
  background: white;
  position: sticky;
  bottom: 0;
  z-index: 2;
}
.dialog-footer .button {
  font-size: 12px;
}
.form-error {
  font-size: 11px;
  color: #b77493;
  border-radius: 9px;
  background: #fff0f6;
  padding: 12px 15px;
  margin: 0 27px 20px;
  line-height: 1.6;
}
.success-message {
  font-size: 11px;
  color: #6e9d85;
  background: #eff8f2;
  border-radius: 9px;
  padding: 12px;
}
.detail-grid {
  padding: 26px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 23px;
  margin: 0;
}
.detail-grid dt {
  font-size: 10px;
  color: #ad99ba;
  margin-bottom: 8px;
}
.detail-grid dd {
  margin: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: #766382;
}
.detail-grid > div:last-child {
  grid-column: 1/-1;
}
@media (min-width: 1600px) {
  main {
    padding: 38px 40px;
  }
  .app-shell {
    grid-template-columns: 235px minmax(0, 1fr);
  }
  .topbar {
    padding: 0 40px;
  }
  .stats-grid {
    gap: 18px;
  }
  .stat-card {
    min-height: 136px;
  }
  .records-table {
    font-size: 12px;
  }
  .records-table td {
    padding: 17px 13px;
  }
  .id-cell {
    font-size: 11px;
  }
  .account-name {
    font-size: 12px;
  }
}
@media (max-width: 1150px) {
  .app-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .brand-area {
    padding: 0 14px;
  }
  .brand {
    font-size: 17px;
  }
  .brand img {
    width: 26px;
    height: 26px;
  }
  .nav-body {
    padding: 28px 9px 12px;
  }
  .sidebar-note {
    display: none;
  }
  main {
    padding: 27px 23px;
  }
  .topbar {
    padding: 0 23px;
    gap: 16px;
  }
  .global-search {
    width: 330px;
    max-width: 55%;
  }
  .global-search input {
    font-size: 10px;
  }
  .global-search kbd {
    display: none;
  }
  h1 {
    font-size: 27px;
  }
  .stats-grid {
    gap: 9px;
  }
  .stat-card {
    padding: 16px;
    min-height: 117px;
  }
  .stat-card .stat-icon {
    right: 12px;
    width: 25px;
    height: 25px;
  }
  .stat-card strong {
    font-size: 27px;
  }
  .stat-label {
    font-size: 10px;
  }
  .stat-arrow {
    display: none;
  }
  .overview-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 15px;
  }
  .recent-budget {
    display: none;
  }
  .panel-heading {
    padding: 19px;
  }
  .panel-heading h2 {
    font-size: 14px;
  }
  .department-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .date-range {
    max-width: 280px;
  }
  .filter-field {
    min-width: 130px;
  }
  .report-stat {
    padding: 21px;
  }
  .report-stat > strong {
    font-size: 25px;
  }
  .page-footer {
    margin: 0 23px;
  }
}
@media (max-width: 900px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .health-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .health-panel .panel-heading {
    grid-column: 1/-1;
  }
  .health-ring {
    grid-column: 1;
    grid-row: 2/4;
    margin: 5px auto 22px;
  }
  .health-legend {
    flex-direction: column;
    gap: 10px;
    align-self: end;
    justify-content: center;
  }
  .health-footer {
    border: 0;
    margin: 0 20px 0 0;
    padding: 10px 0;
    align-self: start;
  }
  .health-footer > span {
    font-size: 9px;
  }
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat-card {
    min-height: 112px;
  }
  .stat-card:nth-child(4),
  .stat-card:nth-child(5) {
    min-height: 100px;
  }
  .report-stats {
    gap: 10px;
  }
  .report-stat {
    padding: 17px;
  }
  .report-stat > strong {
    font-size: 22px;
  }
  .report-stat > span {
    font-size: 10px;
  }
  .report-stat small {
    font-size: 9px;
  }
  .page-heading {
    gap: 12px;
  }
  .heading-actions .button.primary {
    font-size: 11px;
    padding: 10px 15px;
  }
}
@media (max-width: 760px) {
  body {
    background: #f9f9fc;
  }
  .app-shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 225px;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform 0.18s;
    z-index: 50;
  }
  .sidebar.sidebar-open {
    transform: translateX(0);
  }
  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    background: #30213b55;
    backdrop-filter: blur(2px);
    z-index: 40;
    width: 100%;
    height: 100%;
  }
  .brand {
    font-size: 19px;
  }
  .brand-area {
    padding: 0 21px;
  }
  .brand img {
    width: 29px;
    height: 29px;
  }
  .nav-body {
    padding: 29px 14px;
  }
  .menu-toggle {
    display: inline-grid;
    color: #fff;
  }
  .topbar {
    height: auto;
    min-height: 113px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 15px 18px;
  }
  .breadcrumb {
    gap: 10px;
    font-size: 11px;
  }
  .breadcrumb .menu-toggle {
    margin: -5px 0 -5px -7px;
  }
  .global-search {
    max-width: none;
    width: 100%;
    padding: 9px 13px;
    background: #637ea428;
  }
  .global-search input {
    font-size: 11px;
  }
  .global-search kbd {
    display: block;
  }
  .main-shell {
    min-height: 100dvh;
  }
  .page-heading {
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 24px;
    gap: 17px;
  }
  .page-heading p {
    font-size: 11px;
    margin-top: 8px;
  }
  h1 {
    font-size: 27px;
  }
  .eyebrow {
    font-size: 8px;
  }
  main {
    padding: 24px 18px;
  }
  .stats-grid {
    gap: 9px;
    margin-bottom: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat-card {
    min-height: 104px;
    padding: 13px 16px;
  }
  .stat-card:first-child {
    grid-column: 1/-1;
    min-height: 100px;
  }
  .stat-card:first-child .stat-icon {
    width: 37px;
    height: 37px;
    right: 18px;
    top: 28px;
  }
  .stat-card:first-child strong {
    margin: 0 0 7px;
    font-size: 32px;
  }
  .stat-card strong {
    font-size: 27px;
    margin: 3px 0 12px;
  }
  .stat-card .stat-icon {
    top: 14px;
  }
  .stat-label {
    font-size: 11px;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .filter-field {
    max-width: none;
    min-width: 0;
    padding: 10px 11px;
    gap: 6px;
  }
  .date-range {
    grid-column: 1/-1;
    max-width: none;
    min-width: 0;
  }
  .date-range input {
    font-size: 11px;
  }
  .reset-button {
    grid-column: 1/-1;
    justify-self: start;
    min-height: 30px;
  }
  .filter-chip,
  .filter-error {
    grid-column: 1/-1;
  }
  .panel-heading {
    padding: 18px 16px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .panel-heading h2 {
    font-size: 15px;
  }
  .panel-actions {
    gap: 7px;
  }
  .button {
    font-size: 10px;
    padding: 8px 12px;
    min-height: 34px;
  }
  .column-popover {
    right: 0;
    width: 244px;
  }
  .accounts-panel .panel-heading {
    gap: 13px;
  }
  .accounts-panel .panel-actions {
    width: 100%;
    justify-content: flex-end;
  }
  .pagination {
    padding: 16px;
    gap: 13px;
    flex-wrap: wrap;
  }
  .pagination > span {
    order: 3;
    margin: 0;
    width: 100%;
    text-align: center;
  }
  .pagination > select {
    margin-left: auto;
  }
  .page-button {
    width: 26px;
    height: 28px;
  }
  .overview-grid {
    gap: 16px;
    margin-bottom: 17px;
  }
  .recent-list {
    padding: 0 16px 10px;
  }
  .recent-row {
    gap: 9px;
  }
  .recent-row .status {
    font-size: 8px;
    padding: 4px 6px;
  }
  .recent-row > svg {
    display: none;
  }
  .recent-name strong {
    font-size: 10px;
  }
  .recent-name small {
    font-size: 8px;
  }
  .health-ring {
    width: 145px;
    height: 145px;
    padding: 13px;
  }
  .health-ring strong {
    font-size: 27px;
  }
  .health-footer {
    margin-right: 16px;
  }
  .health-footer > span {
    font-size: 8px;
    gap: 5px;
  }
  .health-legend {
    font-size: 9px;
    gap: 10px;
  }
  .scope-toolbar {
    align-items: center;
    gap: 10px;
  }
  .scope-toolbar .filter-field {
    max-width: 180px;
  }
  .scope-toolbar > span {
    font-size: 9px;
    flex: 1;
  }
  .radar-item {
    padding: 15px 16px;
  }
  .department-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .department-card {
    padding: 25px;
  }
  .report-stats {
    grid-template-columns: 1fr;
  }
  .report-stat {
    padding: 23px;
  }
  .report-stat > strong {
    font-size: 30px;
  }
  .report-stat > span {
    font-size: 12px;
  }
  .report-stat small {
    font-size: 10px;
  }
  .page-footer {
    margin: 0 18px;
    padding: 20px 0;
    font-size: 9px;
  }
  .demo-banner {
    font-size: 9px;
    margin-bottom: 19px;
  }
  .dialog-wide {
    inset: 8px 8px 8px auto;
    width: calc(100% - 16px);
    max-width: calc(100% - 16px);
    height: calc(100dvh - 16px);
    border-radius: 17px;
  }
  .dialog-head {
    padding: 23px 19px;
  }
  .dialog-head h2 {
    font-size: 21px;
  }
  .dialog-head p {
    font-size: 10px;
  }
  .record-fields {
    padding: 23px 19px;
  }
  .form-grid {
    gap: 15px 11px;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 12px;
    padding: 10px;
  }
  .field {
    font-size: 9px;
  }
  .dialog-footer {
    padding: 17px 19px;
  }
  .form-error {
    margin: 0 19px 18px;
  }
  .toast {
    font-size: 11px;
  }
  .empty-state {
    padding: 44px 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Shared sign-in design for Operations and Administration. */
.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 40px 22px;
  background:
    radial-gradient(ellipse at 85% 10%, #dae7f7, transparent 55%),
    radial-gradient(ellipse at 10% 100%, #efe1f4, transparent 55%), #f5f5fb;
}
.auth-page > .brand {
  font:
    800 29px Manrope,
    sans-serif;
  letter-spacing: -1.4px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #3f3e4c;
}
.auth-page > .brand img {
  width: 39px;
  height: 39px;
}
.auth-page .brand-period {
  color: #9a85e4;
}
.auth-card {
  width: 410px;
  max-width: 100%;
  padding: 38px;
  background: #ffffffed;
  border: 1px solid #ffffff;
  border-radius: 23px;
  box-shadow: 0 20px 80px #70628209;
}
.auth-card > .eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #a39ab3;
  font-weight: 600;
}
.auth-card h1 {
  font:
    750 29px Manrope,
    sans-serif;
  letter-spacing: -1.1px;
  color: #3f3e4c;
  margin: 13px 0 10px;
}
.auth-card > p {
  font-size: 12px;
  color: #a197ac;
  line-height: 1.8;
  margin: 0 0 27px;
}
.auth-card .field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 10px;
  font-weight: 500;
  color: #8f819f;
  margin-bottom: 19px;
}
.auth-card .field input {
  border: 1px solid #e8e0f1;
  border-radius: 10px;
  background: #fdfbff;
  width: 100%;
  padding: 12px 13px;
  font:
    400 13px "DM Sans",
    sans-serif;
  color: #685b77;
  line-height: 1.6;
  box-shadow: none;
  min-height: 45px;
}
.auth-card .field input:focus {
  outline: 2px solid #b8a8e6;
  outline-offset: 2px;
}
.auth-card .button.primary {
  width: 100%;
  background: #8d7be7;
  border: 0;
  border-radius: 11px;
  color: #fff;
  font-size: 12px;
  min-height: 43px;
  justify-content: center;
  margin-top: 5px;
  box-shadow: 0 5px 15px #8d7be71a;
}
.auth-card .button.primary:hover {
  background: #7d69dc;
}
.auth-card .forgot-password {
  display: block;
  text-align: center;
  font-size: 11px;
  color: #a795be;
  margin: 18px auto 0;
  padding: 0;
  width: 100%;
}
.auth-card .form-error {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: #fff0f5;
  border: 0;
  color: #b27692;
  font-size: 11px;
  border-radius: 9px;
  line-height: 1.7;
}
.auth-card .success-message {
  font-size: 11px;
  margin: 0 0 18px;
  line-height: 1.7;
  color: #7ca58d;
  background: #eff8f2;
  padding: 12px;
  border-radius: 9px;
}
.auth-footnote {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #f2edf7;
  margin-top: 26px;
  padding-top: 19px;
  font-size: 9px;
  color: #b2a3c0;
}
.auth-card .loading-panel {
  min-height: 95px;
  font-size: 12px;
  color: #a393b5;
}
.auth-card #leave-account {
  font-size: 12px;
  padding: 10px 16px;
  border-radius: 9px;
  border: 1px solid #e9e2f1;
}
.auth-page [hidden] {
  display: none !important;
}
@media (max-width: 520px) {
  .auth-page {
    padding: 30px 20px;
    gap: 28px;
  }
  .auth-card {
    padding: 29px;
    border-radius: 19px;
  }
  .auth-page > .brand {
    font-size: 28px;
  }
  .auth-card h1 {
    font-size: 27px;
  }
}

/* Keep the account directory compact enough for daily spreadsheet work. */
.preview-tag {
  font-size: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #ffffff24;
  color: #fff;
}
.page-accounts .page-heading .eyebrow,
.page-accounts .page-heading p {
  display: none;
}
.page-accounts .page-heading {
  margin-bottom: 20px;
}
.page-accounts .stat-card {
  min-height: 110px;
  padding-top: 12px;
  padding-bottom: 15px;
}
.page-accounts .stats-grid {
  margin-bottom: 20px;
}
.page-accounts .panel-heading {
  padding-top: 18px;
  padding-bottom: 18px;
}
@media (max-width: 760px) {
  .preview-tag {
    margin-left: auto;
    font-size: 8px;
  }
  .page-accounts .page-heading {
    align-items: center;
  }
  .page-accounts .stat-card {
    min-height: 101px;
  }
}
@media (max-width: 760px) {
  .stats-grid {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #e6dfee transparent;
    padding-bottom: 5px;
  }
  .stat-card,
  .stat-card:first-child {
    flex: 0 0 142px;
    min-width: 142px;
    min-height: 107px;
  }
  .stat-card:first-child .stat-icon {
    width: 25px;
    height: 25px;
    top: 14px;
    right: 12px;
  }
  .stat-card:first-child strong {
    font-size: 27px;
    margin: 3px 0 12px;
  }
}

.auth-page > .brand {
  margin: 0;
}
.auth-card form {
  display: block;
  gap: 0;
  margin: 0;
  padding: 0;
}
.auth-card .loading-panel {
  padding: 20px 0;
}

/* Main: one sheet with cells shared by each Profile, BM, and ad account. */
.version-label {
  letter-spacing: 0.55px;
  font-size: 9px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.page-main main {
  padding: 26px 24px;
}
.page-main .page-heading {
  margin-bottom: 18px;
}
.hierarchy-counts {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 23px;
  color: #9392a1;
  font-size: 12px;
}
.hierarchy-counts span {
  display: flex;
  align-items: baseline;
  gap: 7px;
}
.hierarchy-counts strong {
  font-size: 19px;
  color: #514a68;
  font-variant-numeric: tabular-nums;
}
.hierarchy-scroll {
  max-height: calc(100dvh - 330px);
  min-height: 180px;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c9c2e1 #f7f6fb;
}
.hierarchy-table {
  width: 100%;
  min-width: 2350px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}
.hierarchy-table th,
.hierarchy-table td {
  padding: 14px 12px;
  border-right: 1px solid #eeedf3;
  border-bottom: 1px solid #eeedf3;
  vertical-align: top;
  background: #fff;
}
.hierarchy-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f4f2fa;
  color: #767083;
  font-weight: 650;
  white-space: nowrap;
  border-bottom: 1px solid #ded8ed;
  padding: 14px 12px;
}
.hierarchy-table thead th:first-child {
  left: 0;
  z-index: 7;
  min-width: 185px;
}
.hierarchy-table .profile-cell {
  position: sticky;
  left: 0;
  z-index: 4;
  min-width: 185px;
  max-width: 220px;
  background: #fcfbff;
  border-right: 2px solid #e4def0;
  font-weight: 500;
}
.profile-cell small {
  display: block;
  font-weight: 400;
  color: #a29aae;
  font-size: 10px;
  margin-top: 6px;
}
.hierarchy-table .profile-start > td,
.hierarchy-table .profile-start > th {
  border-top: 2px solid #e5dfed;
}
.hierarchy-table .profile-start:first-child > td,
.hierarchy-table .profile-start:first-child > th {
  border-top: 0;
}
.hierarchy-table .group-edge {
  border-left: 1px solid #e4deed;
}
.hierarchy-table .tree-name {
  display: block;
  text-align: left;
  padding: 0;
  font-weight: 600;
  color: #696079;
  overflow-wrap: anywhere;
}
.tree-name:hover {
  text-decoration: underline;
  color: #8470ca;
}
.tree-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tree-add {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  margin-top: 11px;
  border: 1px solid #d9d0ef;
  border-radius: 7px;
  background: #f2edfc;
  color: #7057a2;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tree-add:hover {
  color: #665096;
  background: #e8dff8;
  border-color: #bca9e1;
}
.bm-cell {
  min-width: 140px;
}
.account-cell,
.campaign-cell {
  min-width: 175px;
  max-width: 260px;
}
.facebook-cell {
  padding-top: 9px !important;
}
.fb-entry {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 33px;
  white-space: nowrap;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #548269;
  background: #eaf6ee;
  font-size: 10px;
  white-space: nowrap;
}
.legacy-tag {
  display: inline-block;
  font-size: 9px;
  color: #9b8a5c;
  background: #fff7df;
  border-radius: 5px;
  margin-top: 9px;
  padding: 3px 5px;
}
.sheet-order select {
  border: 1px solid #e9e5f0;
  background: white;
  color: #8a8298;
  padding: 9px;
  border-radius: 8px;
  font-size: 11px;
}
.main-sheet .pagination {
  flex-wrap: wrap;
  gap: 14px;
}
.main-sheet .page-buttons > span {
  font-size: 11px;
  padding: 0 6px;
  color: #948b9e;
}
.hierarchy-summary {
  padding: 0 24px 24px;
}
.hierarchy-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 0;
  border-bottom: 1px solid #efedf3;
  font-size: 12px;
  color: #9a92a5;
}
.hierarchy-summary strong {
  font-size: 20px;
  color: #766787;
}
.entity-fields {
  display: grid;
  gap: 20px;
  border: 0;
  margin: 0;
  padding: 26px;
}
.entity-fields:disabled input,
.entity-fields:disabled select,
.entity-fields:disabled textarea {
  opacity: 1;
  color: #71677d;
  background: #f7f6fa;
}
.verified-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #766c85;
}
.legacy-preview {
  padding: 26px;
  font-size: 13px;
  color: #8b8197;
}
.legacy-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.legacy-counts > span {
  padding: 7px 10px;
  background: #f2eef9;
  color: #9281ac;
  border-radius: 6px;
  font-size: 11px;
}
.legacy-conflicts {
  background: #fff8e6;
  padding: 16px;
  border-radius: 9px;
  margin-top: 20px;
  color: #9c885c;
  font-size: 12px;
}
.legacy-conflicts ul {
  padding-left: 18px;
}
@media (max-width: 760px) {
  .page-main main {
    padding: 23px 16px;
  }
  .hierarchy-counts {
    gap: 12px 18px;
  }
  .hierarchy-counts span {
    font-size: 10px;
  }
  .main-sheet .panel-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }
  .hierarchy-scroll {
    max-height: 65dvh;
  }
  .hierarchy-table .profile-cell,
  .hierarchy-table thead th:first-child {
    min-width: 140px;
    max-width: 160px;
  }
  .hierarchy-table .profile-cell {
    width: 140px;
  }
  .entity-fields,
  .legacy-preview {
    padding: 23px 19px;
  }
}

/* Cool white, navy, and teal theme — color-tone-3.png. */
:root {
  color-scheme: light;
  --ink: #10253a;
  --muted: #53677f;
  --line: #e1e7ee;
  --accent: #087b70;
  --accent-soft: #e7f2f0;
  --mint: #e7f4ed;
  --rose: #fbeceb;
  --butter: #fff4d9;
  --slate: #edf1f5;
  --lilac: #eaf0f6;
  --surface: #ffffff;
  --surface-raised: #f0f4f7;
  color: var(--ink);
  background: #f6f8fa;
}
body { background: #f6f8fa; color: var(--ink); }
.app-shell { background: radial-gradient(ellipse at 90% 0, #e5edf333, transparent 60%), #f6f8fa; }
.sidebar { background: #ffffff; border-color: var(--line); }
.brand-area { background: #ffffff; border-bottom: 1px solid var(--line); }
.brand-area .brand { color: var(--ink); }
.brand-area .brand-period, .brand-period { color: var(--accent); }
.nav-caption { color: #53677f; }
.nav-item { color: #415873; }
.nav-item:hover { background: #f1f6f7; color: #075d5b; }
.nav-item.selected { background: #e7f2f0; color: #075d5b; }
.sidebar-bottom, .user-card { border-color: var(--line); }
.sidebar-bottom { background: #ffffff; }
.user-card strong, .user-card span, .user-card button { color: var(--ink); }
.user-card > div > span { color: var(--muted); }
.avatar, .workspace-avatar { background: #e7f2f0; color: #24465a; border: 1px solid #dbe5ea; }
.topbar { background: linear-gradient(110deg, #eaf0f4, #edf2f6); border-bottom: 1px solid #e4eaf0; color: var(--ink); }
.breadcrumb { color: var(--ink); }
.breadcrumb strong { color: var(--accent); }
.breadcrumb > span:first-of-type, .breadcrumb-dot { color: #415873; }
.global-search { background: #f8fafc; border: 1px solid #e4eaf0; color: #415873; }
.global-search input { color: var(--ink); }
.global-search input::placeholder, .global-search kbd { color: #53677f; }
.preview-tag { color: #24465a; background: #e1eeeb; }
main { color: var(--ink); }
h1, h2, h3, .panel-heading h2 { color: var(--ink); }
.page-heading p, .panel-heading p, .eyebrow, .field-hint { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); box-shadow: none; }
.panel-heading, .panel-bottom, .pagination, .dialog-head, .dialog-footer, .table-scroll { border-color: var(--line); }
.table-scroll { scrollbar-color: #b5c4ce #f0f4f7; }
.button { font-size: 12px; }
.button.primary { background: #1b8175; color: #ffffff; box-shadow: 0 2px 12px #10253a1a; border: 1px solid #1b8175; }
.button.primary:hover { background: #106d63; color: #ffffff; }
.button.secondary { background: #ffffff; border: 1px solid #dce5eb; color: #10253a; }
.button.secondary:hover { background: #f2f7f8; border-color: #b6cdd0; }
.text-button, .icon-button, .forgot-password { color: var(--accent); }
.text-button:hover, .forgot-password:hover { color: #075d5b; }
.icon-button:hover { background: #087b7010; }
.button.danger { color: #b3443c; border-color: #e6bdb9; }
.filter-field, .field input, .field select, .field textarea, .pagination select { color: var(--ink); background: #ffffff; border-color: #dce5eb; }
.filter-field > span, .field { color: #415873; }
.filter-field select { color: var(--ink); background: transparent; }
input[type="date"] { color-scheme: light; }
select option { background: #f0f4f7; color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: #ffffff; box-shadow: 0 0 0 3px #087b7014; }
.field input[readonly] { color: var(--muted); }
.dialog { background: #ffffff; color: var(--ink); border: 1px solid #dce5eb; box-shadow: 0 24px 90px #10253a38; }
.dialog::backdrop { background: #10253a38; backdrop-filter: blur(5px); }
.dialog-head { background: #ffffff; }
.dialog-head .icon-button { background: #e7f2f0; }
.dialog-head p, .dialog-head .icon-button, .verified-field, .legacy-preview { color: var(--muted); }
.dialog-footer { background: #f8fafb; }
.entity-fields { gap: 18px; padding: 24px; }
.entity-fields:disabled input, .entity-fields:disabled select, .entity-fields:disabled textarea { background: #eef2f5; color: var(--muted); }
.empty-state, .empty-state p, .empty-state h3 { color: var(--muted); }
.empty-icon { background: #e7f2f0; color: var(--accent); }
.loading-panel { color: var(--muted); }
.spinner { border-color: #d4e5e2; border-top-color: var(--accent); }
.toast { background: #102f40; color: #ffffff; border: 1px solid #224d5a; }
.form-error, .error-banner { background: #fdf0ee; color: #a13931; border-color: #e8c1bc; }
.success-message { background: #e7f4ed; color: #286743; }
.status { background: #edf0f3; color: #435267; padding: 2px 7px; min-height: 0; line-height: 1.45; font-size: 11px; border-radius: 5px; }
.status-active, .status-done { background: #e7f4ed; color: #286743; }
.status-stopped, .status-paused, .status-draft { background: #edf0f3; color: #435267; }
.status-pending { background: #fff4d9; color: #82600e; }
.status-in-review { background: #ffead5; color: #a34c08; }
.status-new { background: #e2efff; color: #245ca1; }
.status-night { background: #eee5fb; color: #7143a1; }
.status-off { background: #edf0f3; color: #435267; }
.status-flagged, .status-suspended { background: #fbeceb; color: #a43a32; }
.status-completed { background: #e8f1f7; color: #335e7d; }
.verified-badge { background: #e7f4ed; color: #286743; padding: 2px 6px; font-size: 11px; }
.legacy-tag, .legacy-counts > span { background: #fff4d9; color: #82600e; }
.page-button { background: #ffffff; border-color: #dce5eb; color: #415873; }
.page-button:hover:not(.active):not(:disabled) { background: #e7f2f0; }
.page-button.active { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 3px 8px #087b701c; }
.pagination, .main-sheet .page-buttons > span { color: var(--muted); }

/* Compact Main: one toolbar and one horizontally scrolling table. */
.page-main main { padding-top: 22px; }
.main-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.main-filter { flex: 0 1 230px; }
.main-filter .filter-field { min-width: 160px; max-width: 230px; padding: 9px 13px; gap: 4px; }
.main-filter .filter-field > span { font-size: 11px; }
.main-filter select { font-size: 12px; }
.toolbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.toolbar-actions .button { min-height: 40px; }
.main-sheet { overflow: hidden; border-radius: 12px; }
.hierarchy-scroll { max-height: calc(100dvh - 242px); min-height: 160px; scrollbar-color: #b5c4ce #f0f4f7; }
.hierarchy-table { width: 2155px; min-width: 2155px; table-layout: fixed; font-size: 12px; line-height: 1.4; }
.hierarchy-table th, .hierarchy-table td { padding: 8px 10px; color: var(--ink); border-color: #e3e9ef; background: #ffffff; }
.hierarchy-table thead th { padding: 12px 10px; background: #f0f3f6; color: #10253a; border-color: #e1e7ee; font-size: 12px; }
.hierarchy-table thead th:first-child { min-width: 0; }
.hierarchy-table .profile-cell { min-width: 0; max-width: none; background: #ffffff; border-right: 1px solid #e1e7ee; }
.hierarchy-table .profile-start > td, .hierarchy-table .profile-start > th { border-top-color: #e1e7ee; }
.hierarchy-table tbody td:hover, .hierarchy-table tbody th:hover { background: #f0f7f6; }
.hierarchy-table .tree-name { color: #10253a; font-size: 12px; font-weight: 600; }
.hierarchy-table .tree-name:hover { color: var(--accent); }
.hierarchy-table .bm-cell, .hierarchy-table .account-cell, .hierarchy-table .campaign-cell { min-width: 0; max-width: none; }
.tree-actions { gap: 5px; flex-wrap: nowrap; }
.tree-add { padding: 3px 6px; margin-top: 7px; gap: 3px; color: #066c65; background: #edf6f4; border: 1px solid #c7e2de; border-radius: 5px; font-size: 12px; font-weight: 450; }
.tree-add:hover { background: #e1f0ed; border-color: #8ebfb7; color: #075d5b; }
.node-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }
.masked-id { font-size: 11px; color: #53677f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.social-entry { display: flex; flex-wrap: wrap; gap: 4px 7px; align-items: center; margin-bottom: 8px; }
.social-entry:last-child { margin-bottom: 0; }
.social-name { display: flex; align-items: center; gap: 6px; flex-basis: 100%; }
.social-platform { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; font-size: 14px; font-weight: 700; color: #fff; }
.social-platform.facebook { background: #2878ed; }
.social-platform.tiktok { background: #10253a; border: 1px solid #294153; color: #ffffff; }
.ad-name-cell { width: 300px; max-width: 300px; }
.ad-name-text { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 100%; }
.comment-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; white-space: nowrap; color: #53677f; border-radius: 5px; }

.main-sheet .pagination { padding: 12px 16px; background: #ffffff; }

/* Team. */
.team-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.team-heading h1 { font-size: 26px; }
.team-heading p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.team-table { width: 100%; min-width: 780px; border-collapse: collapse; text-align: left; font-size: 13px; }
.team-table th { color: #10253a; background: #f0f3f6; padding: 14px 18px; font-size: 12px; font-weight: 550; }
.team-table td { padding: 15px 18px; border-top: 1px solid var(--line); }
.team-person { display: flex; gap: 11px; align-items: center; }
.team-person .avatar { width: 34px; height: 34px; font-size: 12px; }
.team-person strong { font-weight: 550; }
.team-person small { color: var(--muted); font-size: 10px; margin-left: 7px; font-weight: 400; }
.role-label { text-transform: capitalize; color: #076e65; }
.team-actions { display: flex; justify-content: flex-end; gap: 7px; }
.team-actions .button { min-height: 30px; padding: 6px 10px; }
.team-footer { border-top: 1px solid var(--line); padding: 15px 18px; color: var(--muted); font-size: 12px; }

/* Carry the same tone through the existing Overview and sign-in screen. */
.stat-card, .stat-card.lilac, .stat-card.mint, .stat-card.butter, .stat-card.rose, .stat-card.slate { background: #ffffff; color: #415873; border: 1px solid #e1e7ee; }
.stat-card:hover { border-color: #9bc8c1; }
.stat-card.chosen { background: #edf6f4; border-color: #9bc8c1; }
.stat-icon.lilac { background: #e7f2f0; color: #087b70; }
.stat-icon.mint { color: #286743; }
.stat-icon.slate { color: #53677f; }
.stat-icon.butter { color: #82600e; }
.stat-icon.rose { color: #a43a32; }
.stat-card strong, .stat-label, .recent-name strong, .hierarchy-summary strong { color: #10253a; }
.recent-row, .hierarchy-summary > div { border-color: var(--line); color: var(--muted); }
.recent-row:hover { background: #f3f8f8; }
.recent-row > svg { color: #53677f; }
.account-avatar { background: #e7f2f0; color: #076e65; }
.scope-toolbar, .scope-toolbar > span, .hierarchy-counts, .hierarchy-counts strong { color: var(--muted); }
.auth-page { background: radial-gradient(ellipse at 50% 0%, #d9e9ed66, transparent 60%), #f6f8fa; color: var(--ink); }
.auth-page > .brand { color: var(--ink); }
.auth-page .brand-period { color: var(--accent); }
.auth-card { background: #ffffff; border: 1px solid #e1e7ee; box-shadow: 0 30px 80px #10253a12; }
.auth-card h1 { color: var(--ink); }
.auth-card > p, .auth-card > .eyebrow, .auth-card .field, .auth-footnote { color: var(--muted); }
.auth-card .field input { background: #ffffff; border-color: #dce5eb; color: var(--ink); }
.auth-card .field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #087b7014; }
.auth-card .button.primary { background: #1b8175; color: #ffffff; border-color: #1b8175; box-shadow: none; }
.auth-card .button.primary:hover { background: #106d63; }
.auth-card .forgot-password { color: var(--accent); }
.auth-card .form-error { background: #fdf0ee; color: #a13931; }
.auth-card .success-message { background: #e7f4ed; color: #286743; }
.auth-footnote { border-color: var(--line); }
@media (max-width: 760px) {
  .main-toolbar { gap: 9px; align-items: center; }
  .toolbar-actions { gap: 6px; }
  .toolbar-actions .button { padding: 9px; font-size: 11px; gap: 5px; }
  .toolbar-actions .button svg { width: 13px; }
  .main-filter .filter-field { min-width: 0; padding: 8px; }
  .main-filter { flex: 1; min-width: 104px; }
  .main-filter .filter-field > span { font-size: 10px; }
  .hierarchy-scroll { max-height: calc(100dvh - 295px); }
  .team-heading h1 { font-size: 24px; }
  .team-heading p { max-width: 220px; }
  .topbar { background: #eaf0f4; }
}

/* Main toolbar and direct field editors. */
.button { transition: background-color 0.15s, box-shadow 0.15s; }
.main-shell > main { padding-top: 22px; }
.mobile-menu-toggle { display: none; }
.main-toolbar { gap: 14px; }
.main-search { display: flex; align-items: center; gap: 8px; width: 170px; height: 40px; padding: 9px 12px; background: #fff; border: 1px solid #dce5eb; border-radius: 10px; color: var(--muted); }
.main-search input { width: 100%; min-width: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.main-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #087b7014; }
.main-search input::placeholder { color: var(--muted); }
.main-filter .filter-field { position: relative; height: 56px; cursor: pointer; }
.main-filter .filter-field > span { position: absolute; top: 8px; left: 13px; pointer-events: none; z-index: 1; }
.main-filter select { position: absolute; inset: 0; width: 100%; height: 100%; padding: 24px 13px 7px; border: 0; border-radius: 10px; cursor: pointer; }
.hierarchy-scroll { max-height: calc(100dvh - 145px); }
.hierarchy-table tbody tr:hover { background: transparent; }
.hierarchy-table tbody tr:hover > td:not(:hover), .hierarchy-table tbody tr:hover > th:not(:hover) { background: #fff; }
.node-line, .account-identity { display: flex; align-items: center; gap: 7px; min-width: 0; }
.node-line > .quick-edit { flex-shrink: 0; }
.account-identity .tree-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity .masked-id { flex-shrink: 0; }
.social-entry { flex-wrap: nowrap; gap: 7px; }
.social-entry .quick-edit { flex-shrink: 0; }
.quick-edit { display: inline-flex; align-items: center; padding: 0; min-width: 12px; min-height: 20px; text-align: left; cursor: pointer; color: inherit; border: 0; border-radius: 5px; }
.quick-edit:hover { outline: none; box-shadow: none; background: none; }
.quick-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.type-cell .quick-edit { max-width: 100%; overflow-wrap: anywhere; }
.type-picker, .status-verified { display: flex; gap: 12px; align-items: flex-end; }
.type-picker > .field, .status-verified > .field { flex: 1; min-width: 0; }
.type-picker > .button { min-height: 42px; }
.status-verified .verified-field { min-height: 42px; white-space: nowrap; font-size: 12px; }
.new-type { margin-top: 12px; padding: 12px; border: 1px solid var(--line); background: #f6faf9; border-radius: 8px; }
.new-type > .button { margin-top: 10px; }
.new-type .field-hint:empty { display: none; }
@media (max-width: 1000px) {
  .main-filter { flex: 0 1 200px; }
  .toolbar-actions { gap: 7px; }
  .main-search { width: 150px; }
}
@media (max-width: 760px) {
  .mobile-menu-toggle { display: inline-flex; margin-bottom: 12px; padding: 5px; color: var(--accent); }
  .main-shell > main { padding-top: 12px; }
  .main-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .main-filter .filter-field { max-width: none; }
  .main-filter { width: 100%; }
  .toolbar-actions { display: grid; grid-template-columns: minmax(100px, 1fr) auto auto; gap: 6px; }
  .main-search { width: auto; min-width: 0; padding: 9px; }
  .hierarchy-scroll { max-height: calc(100dvh - 235px); }
  .status-verified { gap: 10px; }
  .status-verified .verified-field { white-space: normal; }
}

/* Verification stays beside the account instead of occupying a table column. */
.verification-shield { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 24px; padding: 0; flex-shrink: 0; color: #8994a3; border-radius: 4px; }
.verification-shield.is-verified { color: #2563eb; }
.verification-shield.is-verified svg > path:first-child { fill: #2563eb; stroke: #2563eb; }
.verification-shield.is-verified svg > path:last-child { stroke: #fff; stroke-width: 2.2; }
.verification-shield:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dialog-head p { overflow-wrap: anywhere; }

/* Notes use the existing name cells; previews float above the scrolling table. */
.profile-identity, .campaign-identity { display: flex; align-items: center; gap: 6px; min-width: 0; }
.profile-identity .tree-name, .campaign-identity .tree-name { min-width: 0; overflow-wrap: anywhere; }
.note-button { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 22px; padding: 0; flex-shrink: 0; color: #087b70; border-radius: 4px; }
.note-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-preview { position: fixed; z-index: 100; width: 280px; max-width: calc(100vw - 16px); padding: 10px 12px; color: #fff; background: #102d3a; border-radius: 8px; box-shadow: 0 6px 20px #10253a24; font-size: 12px; line-height: 1.5; }
.note-preview > span { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; max-height: 50dvh; overflow-y: auto; }
.notes-editor textarea { min-height: 150px; max-height: 50dvh; resize: vertical; }
.notes-editor[hidden], .notes-text[hidden], .dialog-footer button[hidden] { display: none; }
.archive-marker { display: inline-flex; flex-shrink: 0; color: #718195; }
.main-filter-group { display: flex; align-items: center; gap: 14px; min-width: 0; }
.main-filter-group .main-filter { flex: 0 1 230px; min-width: 160px; }
.archive-filter { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; color: var(--muted); cursor: pointer; }
.archive-filter input { accent-color: var(--accent); width: 14px; height: 14px; cursor: pointer; }
.dialog-footer .archive-action { margin-right: auto; color: #53677f; }
.button.archive-danger { color: #fff; background: #c4403b; border-color: #c4403b; }
.button.archive-danger:hover:not(:disabled) { color: #fff; background: #aa322e; border-color: #aa322e; }
.confirmation-message { padding: 24px 28px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.confirmation-message strong { color: var(--ink); }
.confirmation-message p + p { margin-top: 12px; }
.archive-confirm-dialog .dialog-head h2 { color: #a73430; }
@media (max-width: 1000px) {
  .main-toolbar { flex-wrap: wrap; }
  .main-filter-group { flex: 1; }
}
@media (max-width: 760px) {
  .main-filter-group .main-filter { flex: 1; min-width: 0; }
  .main-filter-group { gap: 10px; }
  .archive-filter { font-size: 11px; }
  .dialog-footer:has(.archive-action) { flex-wrap: wrap; gap: 8px; }
  .dialog-footer .archive-action { flex-basis: 100%; justify-content: flex-start; margin-bottom: 4px; }
}

/* Operations workflows share the Main hierarchy and the existing dashboard palette. */
.verification-shield.is-verified { color: #c99418; }
.verification-shield.is-verified svg > path:first-child { fill: #efc450; stroke: #b48519; }
.verification-shield.is-verified svg > path:last-child { stroke: #634408; }
.social-platform.facebook, .social-platform.tiktok { background: transparent; border: 0; }
.social-platform img { width: 18px; height: 18px; object-fit: contain; display: block; }
.tree-remove { display: inline-flex; padding: 2px; color: #b54747; cursor: pointer; flex-shrink: 0; border-radius: 3px; }
.tree-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.status-on-hold { color: #fff; background: #262a30; }
.status-downloaded { background: #d5eee4; color: #246349; }
.status-no-data { background: #e9edf2; color: #566270; }
.status-logged-out { background: #f7dddd; color: #963c3c; }
.hierarchy-table { min-width: 2175px; width: 2175px; }
.migration-banner { background: #fff7de; border: 1px solid #e6cc86; border-radius: 12px; padding: 16px 20px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.migration-banner strong { color: #69511d; }
.migration-banner p { margin: 5px 0 0; max-width: 780px; font-size: 12px; line-height: 1.6; color: #76623a; }
.setup-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.operations-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.operations-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.operations-section { margin: 0 0 28px; }
.section-title { font-size: 16px; margin: 0 0 12px; color: var(--ink); }
.operations-panel { min-width: 0; overflow: hidden; }
.operations-panel .panel-heading { padding: 17px 18px; gap: 8px; min-height: 60px; }
.operations-panel .panel-heading h2 { font-size: 14px; display: flex; align-items: center; gap: 9px; }
.table-count { color: var(--muted); background: var(--surface-soft, #edf2f5); border-radius: 5px; padding: 2px 6px; font-size: 11px; font-weight: 500; }
.operations-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.operations-table th { padding: 11px 14px; text-align: left; background: #f6f9fb; font-size: 10px; letter-spacing: .025em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.operations-table td { padding: 11px 14px; border-top: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; min-width: 88px; }
.operations-table td:hover { background: #f5faf9; }
.operations-table .account-number { white-space: nowrap; font-variant-numeric: tabular-nums; }
.operations-table .compact { min-height: 28px; height: auto; font-size: 11px; padding: 5px 9px; white-space: nowrap; }
.operations-empty { padding: 30px 20px; color: var(--muted); font-size: 12px; text-align: center; }
.operations-hint { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.card-accounts { display: flex; flex-direction: column; gap: 4px; }
.link-actions { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.link-actions .text-button { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.type-breakdown { padding: 8px 24px 24px; }
.type-breakdown > div { display: flex; justify-content: space-between; gap: 24px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.download-summary { display: flex; justify-content: space-between; gap: 20px; font-size: 12px; color: var(--muted); margin-bottom: 16px; }
.download-add-list { max-height: 45vh; overflow-y: auto; }
.download-add-list label { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.download-add-list small { display: block; color: var(--muted); margin-top: 3px; }
.today-button { justify-self: start; margin-top: -8px; }
@media (max-width: 1100px) {
  .operations-pair { grid-template-columns: 1fr; }
  .migration-banner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 650px) {
  .operations-stats { grid-template-columns: 1fr; }
  .setup-actions, .download-summary { flex-wrap: wrap; }
  .operations-table td, .operations-table th { padding: 10px; }
}

/* Compact workflow actions and summaries. */
.page-download .heading-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-download .heading-actions .button { border-radius: 10px; }
.operation-icon { width: 30px; height: 30px; padding: 6px; border-radius: 7px; color: var(--accent); flex-shrink: 0; }
.operation-icon:hover:not(:disabled) { background: #e6f2ef; }
.operation-icon:disabled { opacity: .35; cursor: default; }
.operation-icon:focus-visible, .copy-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.terminate-icon { color: #b32f3b; }
.terminate-icon:hover:not(:disabled) { color: #962432; background: #fbe9eb; }
.termination-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px 18px; }
.termination-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafcfd; font-size: 13px; }
.card-panel .panel-heading h2 { display: flex; gap: 9px; align-items: center; font-size: 14px; }
.amount-positive { color: #16804e; }
.amount-negative { color: #bc3543; }
.table-sum { white-space: nowrap; font-size: 12px; font-weight: 600; }
.operations-panel .panel-heading h2 { flex-wrap: wrap; }
.copy-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 12px; min-width: 76px; }
.copy-link.is-copied { color: #16804e; }
.available-profile { display: flex; align-items: center; gap: 5px; }
.available-profile > span { min-width: 0; }
.download-batch > .panel-heading { flex-wrap: wrap; }
.download-counts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.download-counts .status { gap: 6px; }
.download-counts strong { font-variant-numeric: tabular-nums; }
.appeal-table .operations-table th:last-child, .appeal-table .operations-table td:last-child { width: 44px; min-width: 44px; text-align: right; padding-right: 14px; }
.appeal-account { display: flex; flex-wrap: wrap; gap: 3px 7px; align-items: baseline; }
.appeal-account .masked-id { font-size: 10px; white-space: nowrap; }
.status-no-data { background: #f7dddd; color: #963c3c; }
.status-logged-out { background: #8d2438; color: #fff; }
.stat-icon.dark-red { background: #8d2438; color: #fff; }
.download-version { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; font-size: 12px; }
.download-version label { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.download-version select { min-height: 36px; padding: 7px 30px 7px 12px; border: 1px solid var(--line); border-radius: 8px; background-color: #fff; color: var(--ink); }
.page-overview .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-overview .overview-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.budget-share { display: inline-block; margin-left: 7px; font-size: 11px; font-weight: 600; color: var(--accent); }
.payments-queues .pending-payments .operations-table th:last-child,
.payments-queues .pending-payments .operations-table td:last-child { width: 44px; min-width: 44px; text-align: right; }
.payments-queues .card-panel { overflow: hidden; }
.payments-queues .card-panel .panel-heading { padding: 17px 18px; min-height: 60px; }
@media (max-width: 1100px) { .page-overview .overview-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.overview-placeholder { min-height: 160px; display: grid; place-items: center; }
.stat-card:not(button) { cursor: default; }
@media (max-width: 760px) {
  .page-overview .overview-grid { grid-template-columns: 1fr; }
  .page-download .heading-actions { justify-content: flex-start; }
}

/* Custom roles and their shared permission sets. */
.team-heading-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.roles-panel { margin-bottom: 24px; }
.roles-panel .panel-heading { gap: 12px; flex-wrap: wrap; }
.roles-panel .panel-heading .muted { font-size: 12px; }
.team-panel { overflow: hidden; }
.form-error { white-space: pre-line; }
.role-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.role-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.role-card-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.role-card-label strong { font-size: 13px; overflow-wrap: anywhere; }
.role-count { flex-shrink: 0; padding: 2px 7px; border-radius: 99px; background: #e9f3f1; color: #27645e; font-size: 11px; font-weight: 700; }
.role-card-actions { display: flex; gap: 3px; flex-shrink: 0; }
.role-icon { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.role-icon:hover { background: #edf3f5; color: var(--ink); }
.role-icon.danger { color: #b34840; }
.role-icon.danger:hover { background: #fdf0ee; }
.role-icon:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 1150px) { .role-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) { .role-list { grid-template-columns: minmax(0, 1fr); padding: 12px; } }
.role-permissions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; max-height: 48vh; overflow-y: auto; padding: 4px; }
.role-permissions fieldset { border: 1px solid var(--line); border-radius: 9px; padding: 12px; margin: 0; min-width: 0; }
.role-permissions legend { padding: 0 5px; font-size: 13px; font-weight: 700; color: var(--ink); }
.role-permissions label { display: flex; align-items: flex-start; gap: 9px; padding: 6px 0; font-size: 12px; line-height: 1.5; cursor: pointer; }
.role-permissions input { margin: 3px 0 0; flex-shrink: 0; accent-color: var(--accent); }
.role-permissions label:has(input:disabled) { opacity: .5; cursor: default; }
.member-extra-label { color: var(--muted); font-size: 11px; }
.analytics-grid { align-items: start; }
.analytics-panel { overflow: hidden; min-width: 0; }
.analytics-panel .panel-heading { padding-bottom: 8px; }
.analytics-report-note { margin: 0; padding: 0 20px 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.analytics-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 20px 18px; }
.analytics-metrics div { display: flex; flex-direction: column; gap: 6px; }
.analytics-metrics span { font-size: 11px; color: var(--muted); }
.analytics-metrics strong { font-size: 23px; font-weight: 600; }
.analytics-loss { color: #b34840; }
.analytics-scroll { margin: 0; overscroll-behavior-x: contain; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.analytics-table th { background: #f0f4f7; color: var(--muted); font-weight: 500; white-space: nowrap; padding: 10px 12px; text-align: right; }
.analytics-table td { padding: 11px 12px; text-align: right; border-top: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.analytics-table th:first-child, .analytics-table td:first-child { text-align: left; padding-left: 20px; }
.analytics-table th:last-child, .analytics-table td:last-child { padding-right: 20px; }
.analytics-table small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; font-weight: 400; }
.analytics-today td { background: #f5faf9; }
.analytics-rate { font-weight: 600; color: var(--ink); }
.analytics-definition { margin: 0; padding: 14px 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.analytics-inline-count { padding-top: 0; }
.analytics-inline-count strong { color: #b34840; }
.analytics-baseline { color: var(--muted); font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.analytics-types { border-top: 1px solid var(--line); }
.analytics-types summary { padding: 13px 20px; font-size: 12px; font-weight: 600; cursor: pointer; }
.analytics-empty { min-height: 200px; }
@media (max-width: 1100px) { .page-overview .analytics-grid { grid-template-columns: minmax(0, 1fr); } }
.member-extras { padding: 12px; border: 1px solid var(--line); border-radius: 9px; min-width: 0; }
.member-extras summary { display: flex; align-items: center; gap: 6px; list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; }
.member-extras summary::-webkit-details-marker { display: none; }
.member-extras summary > svg { flex-shrink: 0; }
.member-extras summary .role-count { margin-left: 6px; }
.member-extras > .field-hint { margin: 12px 0; line-height: 1.5; }
.member-extras .role-permissions { max-height: 38vh; }
.member-extras label:has(input:disabled) { opacity: 1; color: var(--muted); }
.member-permission label > span { flex: 1; }
.permission-source { font-size: 10px; white-space: nowrap; padding: 1px 5px; border-radius: 4px; background: #edf3f5; }
.saved-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 6px 22px; font-size: 10px; color: var(--muted); }
.saved-extra button { border: 0; background: transparent; color: #a44239; text-decoration: underline; padding: 3px 0; cursor: pointer; font: inherit; }
.available-profile > .verification-shield { cursor: default; }
.status-needs-role { background: #fff0d7; color: #805913; }
@media (max-width: 650px) { .role-permissions { grid-template-columns: 1fr; } }


/* Main owns the viewport; scroll gestures stay inside the table or open dialog. */
html:has(.page-main), body:has(.page-main) {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.app-shell.page-main {
  height: 100dvh;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr);
}
.page-main .main-shell {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.page-main main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.page-main main > :not(.main-sheet) { flex-shrink: 0; }
.page-main .main-sheet {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
}
.page-main .hierarchy-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overscroll-behavior: none;
}
.page-main .pagination { flex-shrink: 0; }
.page-main .main-sheet > .empty-state { min-height: 0; overflow: auto; overscroll-behavior: none; }
.page-main .nav-body { min-height: 0; overscroll-behavior: none; }
.page-main .brand-area, .page-main .sidebar-bottom { flex-shrink: 0; }
body:has(.page-main) .dialog, body:has(.page-main) .notes-text { overscroll-behavior: none; }


/* Permission boxes match navigation; Main actions stay together inside Main. */
.permission-actions, .permission-subgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
.permission-subgroups { row-gap: 14px; margin-top: 12px; }
.permission-subgroup { border-top: 1px solid var(--line); padding-top: 12px; min-width: 0; }
.permission-subgroup h3 { margin: 0 0 6px; color: var(--ink); font-size: 12px; font-weight: 700; }
.type-picker > .type-cost-edit { width: 42px; min-width: 42px; padding: 0; flex-shrink: 0; }
@media (max-width: 650px) {
  .permission-actions, .permission-subgroups { grid-template-columns: minmax(0, 1fr); }
}

/* Personal accounts are an optional part of the Profile form. */
.personal-account-option { border-top: 1px solid var(--line); padding-top: 18px; }
.personal-account-toggle { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.personal-account-toggle input { accent-color: var(--accent); margin: 0; }
.personal-account-fields { display: grid; gap: 16px; margin: 18px 0 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.personal-account-fields[hidden] { display: none; }
.personal-account-fields legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.personal-label { font-size: 12px; }
