:root {
  color-scheme: light;
  --bg: #f3f7fc;
  --surface: #fff;
  --ink: #101f3d;
  --muted: #637189;
  --border: #e1e8f2;
  --primary: #0755d8;
  --primary-dark: #0344b3;
  --primary-soft: #edf4ff;
  --teal: #087f89;
  --navy: #071d38;
  --sidebar-width: 224px;
  --workspace-header-height: 62px;
  --mobile-nav-height: 62px;
  --radius: 15px;
  --shadow: 0 1px 2px #18385a12;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .63; }
a { color: var(--primary-dark); text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.3rem); letter-spacing: -.045em; line-height: 1.15; }
h2 { font-size: 1.09rem; letter-spacing: -.022em; line-height: 1.3; }
h3 { font-size: 1rem; }
.icon { flex: 0 0 auto; width: 1.17em; height: 1.17em; vertical-align: middle; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); }
.wide { grid-column: 1 / -1; }
.initial, .loading-row { display: flex; gap: .8rem; align-items: center; justify-content: center; min-height: 150px; color: var(--muted); }
.initial { min-height: 100dvh; }

.brand { display: grid; justify-items: start; gap: 6px; color: var(--ink); }
.brand-logo { display: block; width: 136px; max-width: 100%; height: auto; }
.brand > span { color: var(--muted); font-size: .79rem; font-weight: 650; }

.workspace { min-height: 100dvh; }
.sidebar { width: var(--sidebar-width); height: 100dvh; position: fixed; top: 0; left: 0; z-index: 10; display: flex; flex-direction: column; gap: 22px; padding: 14px 14px max(12px, env(safe-area-inset-bottom)); background: var(--surface); border-right: 1px solid var(--border); color: var(--ink); }
.sidebar-brand { display: flex; justify-content: space-between; align-items: flex-start; gap: 4px; padding: 11px 11px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; }
.sidebar-home { display: block; min-width: 0; border-radius: 6px; }
.sidebar nav { display: grid; gap: 16px; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain;
  scrollbar-width: thin; scrollbar-color: #adc0d9 transparent; padding: 3px 1px; }
@supports not (scrollbar-color: auto) {
  .sidebar nav::-webkit-scrollbar { width: 4px; }
  .sidebar nav::-webkit-scrollbar-thumb { border-radius: 6px; background: #adc0d9; }
}
.nav-group { display: grid; gap: 4px; }
.nav-group > .nav-group-label { margin: 0 11px 4px; color: var(--muted); font-size: .72rem; letter-spacing: .065em; text-transform: uppercase; font-weight: 680; }
.nav-group :is(a,button) { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 8px 11px; background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: .895rem; font-weight: 620; color: var(--ink); text-align: start; transition: background .15s, color .15s; }
.nav-group :is(a,button) .icon { color: var(--muted); width: 18px; height: 18px; }
.nav-group :is(a,button):hover { background: var(--primary-soft); color: var(--primary-dark); }
.nav-group a[aria-current] { background: var(--primary-soft); border-color: #c5d9fb; color: var(--primary-dark); }
.nav-group button[data-active-branch] { color: var(--primary-dark); }
.nav-group :is(a[aria-current],button[data-active-branch]) .icon { color: var(--primary); }
.nav-current { margin-left: auto; }
.nav-group a[aria-current] .nav-current { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.sidebar-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }
.sidebar-profile { display: flex; align-items: center; gap: 10px; padding: 6px 5px; }
.sidebar-profile > div { min-width: 0; }
.sidebar-profile strong, .sidebar-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: .875rem; }
.sidebar-profile small { margin-top: 4px; color: var(--muted); font-size: .78rem; }
.avatar { min-width: 35px; height: 35px; display: inline-grid; place-items: center; background: #e1eeff; color: var(--primary-dark); border-radius: 50%; font-size: .79rem; font-weight: 700; }
.workspace-main { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; height: var(--workspace-header-height); padding: 0 clamp(18px, 3vw, 40px); display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
.breadcrumb, .top-actions { display: flex; align-items: center; gap: 10px; }
.breadcrumb { min-width: 0; color: var(--muted); font-size: .852rem; }
.breadcrumb > span { white-space: nowrap; }
.breadcrumb strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 650; }
.breadcrumb > .icon { width: 13px; color: #7a8799; }
.top-actions { flex: none; align-self: stretch; gap: 5px; }
.icon-btn { width: 37px; height: 37px; padding: 0; display: inline-grid; place-items: center; color: var(--primary-dark); background: transparent; border: 1px solid transparent; border-radius: 8px; }
.icon-btn:hover { border-color: var(--border); background: var(--bg); }
.menu-toggle, .sidebar-collapse, .nav-close, .mobile-nav { display: none; }
.breadcrumb > .icon-btn { flex: none; }

.top-popover-anchor { position: relative; display: flex; align-items: center; align-self: stretch; }
.top-account { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 4px 7px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink); text-align: start; }
.top-account:hover, .top-account[aria-expanded=true], .notifications-toggle[aria-expanded=true] { border-color: var(--border); background: var(--primary-soft); }
.top-account > [data-current-avatar] { display: flex; }
.top-account .avatar { width: 33px; min-width: 33px; height: 33px; font-size: .74rem; }
.top-account-copy { display: grid; gap: 2px; min-width: 0; max-width: 23ch; }
.top-account-copy strong, .top-account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-account-copy strong { font-size: .86rem; font-weight: 680; }
.top-account-copy small { color: var(--muted); font-size: .75rem; line-height: 1.15; }
.top-account > .icon { width: 13px; height: 13px; margin-inline-start: 2px; color: var(--muted); }
.notifications-toggle { position: relative; }
.notification-count { position: absolute; top: 1px; right: 1px; display: grid; place-items: center; min-width: 16px; min-height: 16px; padding-inline: 3px; background: #ba2937; border: 1px solid var(--surface); border-radius: 999px; color: #fff; font-size: .65rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; }
.app-chat-unread { display: inline-grid; place-items: center; flex: none; min-width: 16px; min-height: 16px; padding-inline: 3px; border: 1px solid var(--surface); border-radius: 999px; background: #ba2937; color: #fff; font-size: .65rem; font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1; }
.sidebar .app-chat-unread { margin-inline-start: auto; }
.sidebar-collapsed .sidebar .app-chat-unread { position: absolute; inset: 1px 1px auto auto; }
.mobile-nav-chat-icon { position: relative; display: inline-grid; place-items: center; }
.mobile-nav-chat-icon .app-chat-unread { position: absolute; inset-block-start: -4px; inset-inline-start: calc(100% - 5px); }
.chat-mascot { display: none; }
@media (min-width: 901px) {
  .workspace { --chat-mascot-size: clamp(66px, 5.2vw, 88px); }
  .chat-mascot {
    position: absolute;
    z-index: 1;
    inset-inline-end: clamp(15px, 2vw, 32px);
    display: grid;
    place-items: center;
    width: var(--chat-mascot-size);
    height: var(--chat-mascot-size);
    aspect-ratio: 1;
    border: 1px solid #a9c8f3;
    border-radius: 50%;
    background: radial-gradient(circle at 42% 32%, #fff 15%, #eaf4ff 62%, #dcecff);
    box-shadow: 0 6px 18px #174b9a26;
    color: #24426a;
  }
  .chat-mascot:is(:hover,:focus-visible) { border-color: var(--primary); box-shadow: 0 7px 20px #174b9a40; }
  .chat-mascot--workspace { position: fixed; z-index: 4; inset-block-end: 24px; }
  .workspace[data-chat-active] .chat-mascot--workspace { display: none; }
  .chat-page .chat-main { position: relative; }
  .chat-mascot--pane { inset-block-end: 20px; }
  .chat-mascot--composer { inset-block-end: calc(100% + 10px); }
  .chat-main:has(> .chat-open:not([hidden]) > .chat-composer:not([hidden])) > .chat-mascot--pane { display: none; }
  .workspace .chat-open:has(> .chat-composer:not([hidden])) > .chat-history:has(.chat-message.is-own:last-child) {
    padding-block-end: calc(var(--chat-mascot-size) + 20px);
  }
  .chat-mascot > els-chat-companion { display: block; width: 100%; height: 100%; pointer-events: none; }
  .chat-mascot-art {
    --chat-mascot-pose: url('/chat-mascot-pose.webp');
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--chat-mascot-pose) center / contain no-repeat;
    pointer-events: none;
  }
  .chat-mascot-speech {
    position: absolute;
    inset-block-end: 48%;
    inset-inline-end: calc(100% + 10px);
    width: max-content;
    max-width: 172px;
    padding: 6px 9px;
    border: 1px solid #bbd5f6;
    border-radius: 10px 10px 3px 10px;
    background: #f6faff;
    box-shadow: 0 4px 12px #174b9a21;
    color: #153b6d;
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.4;
    text-align: start;
    pointer-events: none;
  }
  .chat-mascot-speech::after {
    position: absolute;
    inset-inline-end: -5px;
    inset-block-end: 7px;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    border-block-start: 1px solid #bbd5f6;
    border-inline-end: 1px solid #bbd5f6;
    background: #f6faff;
    content: '';
  }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  @supports (clip-path: polygon(0 0, 100% 0, 100% 100%)) {
    .chat-mascot-art { background-image: none; transform-origin: 44% 86%; animation: mascot-breathe 5.2s ease-in-out infinite; }
    .chat-mascot-speech:not([hidden]) { animation: mascot-speak 200ms ease-out both; }
    .chat-mascot-part, .chat-mascot-arm { position: absolute; inset: 0; }
    .chat-mascot-part { background: var(--chat-mascot-pose) center / contain no-repeat; }
    /* Each piece reuses the same source pose. The helmet and torso cover the two limb seams. */
    .chat-mascot-body {
      clip-path: polygon(0 0, 32% 0, 32% 21.1%, 47% 21.1%, 47% 0, 70% 0, 70% 41%, 68.5% 47%,
        64% 54%, 60.6% 57%, 61.8% 65%, 69% 82%, 69% 100%, 0 100%);
    }
    .chat-mascot-antenna {
      clip-path: inset(5% 52.5% 78.4% 31.5%);
      transform-origin: 40.5% 21.2%;
      animation: mascot-antenna 7.6s ease-in-out infinite;
    }
    .chat-mascot-arm {
      transform-origin: 61.5% 58.7%;
    }
    .chat-mascot-forearm {
      clip-path: polygon(58% 55%, 64% 52%, 68% 48.5%, 72% 48.5%, 75% 51%, 76% 56%, 72% 62%, 64% 65.4%, 57% 65.4%);
    }
    .chat-mascot-hand {
      clip-path: polygon(65% 43%, 71% 39%, 84% 39%, 84% 55.6%, 72.5% 55.6%, 66% 51%);
      transform-origin: 72% 52.3%;
    }
    .chat-mascot-eye {
      position: absolute;
      width: 11.6%;
      height: 13.9%;
      border-radius: 50%;
      background: #111e55;
      transform: rotate(-12deg) scaleY(0);
      animation: mascot-blink 6.8s ease-in-out infinite;
    }
    .chat-mascot-eye--left { top: 37%; left: 32.7%; }
    .chat-mascot-eye--right { top: 33.7%; left: 50.7%; }
    .chat-mascot-sparks {
      clip-path: inset(27% 13% 61% 71%);
      transform-origin: 76% 37%;
      opacity: 0;
    }
    [data-mascot-action=wave] .chat-mascot-arm { animation: mascot-arm 2.15s cubic-bezier(.42, 0, .34, 1); }
    [data-mascot-action=wave] .chat-mascot-hand { animation: mascot-hand 2.15s cubic-bezier(.42, 0, .34, 1); }
    [data-mascot-action=wave] .chat-mascot-sparks { animation: mascot-sparks 2.15s ease-out; }
    [data-mascot-action=look] .chat-mascot-art { animation: mascot-look 2.25s ease-in-out; }
    [data-mascot-action=nod] .chat-mascot-art { animation: mascot-nod 1.7s ease-in-out; }
    [data-mascot-action=hop] .chat-mascot-art { animation: mascot-hop 1.6s cubic-bezier(.2,.55,.4,1); }
    @keyframes mascot-speak {
      from { opacity: 0; transform: translate(3px,3px); }
      to { opacity: 1; transform: translate(0,0); }
    }
    @keyframes mascot-breathe {
      0%, 100% { transform: translateY(0) scaleY(1); }
      50% { transform: translateY(-.8%) scaleY(1.025); }
    }
    @keyframes mascot-look {
      0%, 100% { transform: translateX(0) rotate(0); }
      22%, 37% { transform: translateX(-3%) rotate(-6deg); }
      63%, 77% { transform: translateX(2%) rotate(5deg); }
    }
    @keyframes mascot-nod {
      0%, 100% { transform: translateY(0) rotate(0); }
      18% { transform: translateY(-1%) rotate(-3deg); }
      36%, 64% { transform: translateY(2%) rotate(9deg) scaleY(.96); }
      50%, 82% { transform: translateY(0) rotate(2deg); }
    }
    @keyframes mascot-hop {
      0%, 100% { transform: translateY(0) scale(1); }
      19% { transform: scale(1.055,.935); }
      36% { transform: translateY(-9%) scale(.975,1.04) rotate(-3deg); }
      52% { transform: translateY(-7%) scale(1,1.02) rotate(2deg); }
      69% { transform: translateY(0) scale(1.06,.945); }
      84% { transform: translateY(-2%) scale(.985,1.02); }
    }
    @keyframes mascot-arm {
      0%, 100% { transform: rotate(0); }
      16% { transform: rotate(9deg); }
      29%, 58% { transform: rotate(-15deg); }
      43%, 73% { transform: rotate(6deg); }
      86% { transform: rotate(2deg); }
    }
    @keyframes mascot-hand {
      0%, 100% { transform: rotate(0); }
      22%, 53% { transform: rotate(22deg); }
      36%, 68% { transform: rotate(-11deg); }
      82% { transform: rotate(5deg); }
    }
    @keyframes mascot-antenna {
      0%, 16%, 48%, 63%, 71%, 100% { transform: rotate(0); }
      21% { transform: rotate(8deg); }
      25% { transform: rotate(-9deg); }
      30% { transform: rotate(6deg); }
      34% { transform: rotate(-7deg); }
      42% { transform: rotate(3deg); }
      67% { transform: rotate(-7deg); }
    }
    @keyframes mascot-blink {
      0%, 7%, 10%, 34%, 37%, 64%, 67.5%, 100% { transform: rotate(-12deg) scaleY(0); }
      8.4%, 35.3%, 65.6% { transform: rotate(-12deg) scaleY(1); }
    }
    @keyframes mascot-sparks {
      0%, 22%, 85%, 100% { opacity: 0; transform: scale(.64); }
      33%, 66% { opacity: 1; transform: scale(1.08); }
      49% { opacity: .16; transform: scale(.77); }
    }
  }
}
.top-popover { position: absolute; z-index: 1; top: calc(100% + 8px); inset-inline-end: 0; width: max-content; max-width: calc(100vw - 24px); padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: 0 10px 27px #18385a23, var(--shadow); }
.account-popover { min-width: min(205px, calc(100vw - 24px)); }
.account-popover > :is(a,button) { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font-size: .875rem; font-weight: 630; text-align: start; }
.account-popover > :is(a,button) .icon { color: var(--primary-dark); }
.account-popover > :is(a,button):hover { background: var(--primary-soft); color: var(--primary-dark); }
.notification-popover { width: min(345px, calc(100vw - 24px)); }
.popover-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 10px 11px; border-bottom: 1px solid var(--border); }
.notification-list { display: grid; gap: 2px; max-height: min(330px, calc(100dvh - var(--workspace-header-height) - 105px)); margin: 3px 0 0; padding: 3px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; list-style: none; }
.notification-list > p { padding: 10px; color: var(--muted); font-size: .85rem; }
.notification-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; min-height: 45px; align-items: start; gap: 9px; padding: 8px 7px; border: 1px solid transparent; border-radius: 9px; color: var(--ink); }
.notification-item:hover { background: var(--primary-soft); }
.notification-item:focus-visible { outline-offset: -2px; }
.notification-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-dark); }
.notification-item > .icon { align-self: center; width: 12px; height: 12px; color: var(--muted); }
.notification-copy { display: grid; gap: 3px; min-width: 0; }
.notification-copy strong { font-size: .86rem; }
.notification-copy small { color: var(--muted); font-size: .79rem; line-height: 1.35; overflow-wrap: anywhere; }

.workspace-tabs { position: sticky; top: var(--workspace-header-height); z-index: 3; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 clamp(18px, 3vw, 40px); background: #eaf2fc; border-bottom: 1px solid var(--border); }
.workspace-tab-list { display: flex; flex: 1; align-items: center; gap: 5px; min-width: 0; min-height: 47px; padding: 4px 3px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; }
.workspace-tab { display: flex; flex: none; align-items: center; min-width: 0; max-width: 235px; height: 35px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); }
.workspace-tab:hover { background: #f4f8fe; color: var(--ink); }
.workspace-tab[data-active] { background: var(--surface); border-color: #c5d9fb; color: var(--primary-dark); box-shadow: var(--shadow); }
.workspace-tab a[data-workspace-tab] { min-width: 0; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 9px; color: inherit; border-radius: 7px; font-size: .82rem; font-weight: 640; }
.workspace-tab a[data-workspace-tab] > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-tab a[data-workspace-tab] .icon { width: 15px; height: 15px; }
.tab-close { flex: none; display: grid; place-items: center; width: 25px; height: 25px; margin-inline-end: 4px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.tab-close:hover { background: #dfebfa; color: var(--navy); }
.tab-close .icon { width: 12px; height: 12px; }
.workspace-tab :is(a,button):focus-visible { outline-offset: -2px; }
.tabs-close-all { display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; min-height: 35px; padding: 5px 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); font-size: .79rem; font-weight: 650; white-space: nowrap; }
.tabs-close-all:hover { background: var(--surface); border-color: var(--border); color: var(--navy); }
.tabs-close-all .icon { width: 15px; height: 15px; }
.workspace-views { min-width: 0; }
.workspace-view { padding: 29px clamp(18px, 3vw, 40px) 48px; max-width: 1600px; margin: 0 auto; outline: none; }
.workspace[data-social-active] > :is(.sidebar,.overlay),
.workspace[data-social-active] > .workspace-main > :is(.topbar,.workspace-tabs,.mobile-nav,.chat-mascot--workspace) { display: none; }
.workspace[data-social-active] > .workspace-main { margin-left: 0; transition: none; }
.workspace[data-social-active] > .workspace-main > .workspace-views > .workspace-view {
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}
html:has(.workspace[data-social-active]) { scroll-padding-block: 65px 12px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin: 4px 0 24px; }
.page-heading p { color: var(--muted); font-size: .95rem; line-height: 1.5; margin-top: 7px; }
.page-actions, .row-actions, .filters, .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.page-actions { justify-content: flex-end; }
.date-chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 11px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; white-space: nowrap; font-size: .84rem; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 37px; max-width: 100%; padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--ink); font-size: .853rem; font-weight: 650; line-height: 1.25; text-align: center; }
.btn:hover { background: var(--primary-soft); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 9px #0755d818; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.subtle { color: var(--primary-dark); background: transparent; border-color: transparent; }
.btn.subtle:hover { background: var(--primary-soft); }
.btn.danger { color: #8a332b; background: #fff3ef; border-color: #e4c2bb; }
.btn.danger:hover { background: #f9e7e2; }
.btn.small, td .btn { font-size: .8rem; min-height: 31px; padding: 5px 8px; }
.btn .icon { width: 16px; height: 16px; }

.period-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 19px; }
.period-controls { display: flex; align-items: end; gap: 10px; }
.period-controls > .btn { min-height: 38px; }
.segments { display: inline-flex; align-items: center; gap: 3px; padding: 4px; border-radius: 10px; background: #e9f1fc; }
.segments button { border: 1px solid transparent; min-height: 31px; padding: 5px 12px; border-radius: 7px; background: transparent; color: var(--muted); font-size: .86rem; font-weight: 650; }
.segments button[aria-pressed=true], .segments button[aria-selected=true], .segments .selected { background: var(--surface); border-color: var(--border); color: var(--primary-dark); box-shadow: var(--shadow); }
.period-summary { flex: 1; font-size: .84rem; color: var(--muted); }
.period-editor { margin: -8px 0 16px; padding: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.period-inputs, .period-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.period-actions { margin-top: 9px; }
.period-input { display: flex; align-items: center; gap: 3px; }
.period-input input { min-width: 100px; max-width: 172px; }
.period-input button { padding: 5px; font-size: 0; }
.period-input button .icon { width: 14px; height: 14px; }
.summary-head { display: flex; align-items: center; gap: 9px; margin: 0 0 10px 1px; }
.summary-head span { color: var(--muted); font-size: .82rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(183px, 1fr)); gap: 13px; margin-bottom: 16px; }
.metric { min-width: 0; padding: 14px 15px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); }
.metric-top { min-height: 32px; display: flex; align-items: center; justify-content: space-between; gap: 7px; color: var(--muted); font-size: .86rem; font-weight: 620; }
.metric-icon { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; color: var(--primary); background: var(--primary-soft); border-radius: 8px; font-size: .97rem; }
.metric-icon.teal { color: var(--teal); background: #e5f5f5; }
.metric-icon.navy { color: var(--navy); background: #e3ebf5; }
.metric-icon.amber { color: #79581d; background: #f6edcd; }
.metric > strong { display: block; font-size: clamp(1.18rem, 2.6vw, 1.6rem); font-weight: 740; letter-spacing: -.04em; margin: 8px 0 5px; overflow-wrap: anywhere; }
.metric p { margin-top: 5px; color: var(--muted); font-size: .78rem; }
.delta { font-weight: 720; }
.delta.up { color: #256044; }
.delta.down { color: #9a322f; }
.panel { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 15px; }
.panel-title { padding: 16px 17px 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-title p { margin-top: 4px; color: var(--muted); font-size: .83rem; line-height: 1.4; }
.policy-publications { padding: 0 17px 14px; }
.policy-publications > ul { margin: 0; padding: 0; list-style: none; }
.policy-publications li { padding: 12px 0; border-block-start: 1px solid var(--border); }
.policy-publications h3, .policy-publication-description { overflow-wrap: anywhere; }
.policy-publications h3 { margin: 0 0 4px; font-size: .98rem; }
.policy-publication-meta { margin: 0; font-size: .82rem; }
.policy-publication-description { margin: 7px 0 0; white-space: pre-wrap; }
.policy-publications a { display: inline-block; margin-block-start: 8px; }
.policy-publications > p:empty { display: none; }
.chart-layout, .activity-layout { display: grid; gap: 15px; align-items: stretch; }
.chart-layout { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.activity-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trend-legend { display: flex; gap: 12px; flex-wrap: wrap; padding: 0 17px 3px; font-size: .78rem; color: var(--muted); }
.legend-key { display: inline-flex; gap: 5px; align-items: center; }
.legend-key::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--primary); }
.legend-key.spending::before { background: var(--teal); }
.legend-key.net::before { width: 11px; height: 0; border-top: 2px dashed var(--navy); border-radius: 0; background: transparent; }
.trend-chart { height: 229px; padding: 5px 10px 0 5px; }
.trend-chart canvas, .donut-chart canvas { display: block; width: 100%; height: 100%; }
.chart-details { margin: 0 16px 15px; color: var(--primary-dark); font-size: .8rem; }
.chart-details summary { cursor: pointer; width: fit-content; }
.chart-details div { margin-top: 6px; color: var(--muted); display: grid; gap: 4px; }
.donut-chart { position: relative; display: grid; place-items: center; height: 166px; }
.donut-chart canvas { position: absolute; inset: 0; }
.donut-chart > div { position: relative; }
.donut-chart > div { text-align: center; min-width: 0; max-width: 115px; overflow-wrap: anywhere; }
.donut-chart > div span, .donut-chart > div strong { display: block; }
.donut-chart > div span { font-size: .75rem; color: var(--muted); }
.donut-chart > div strong { margin-top: 4px; font-size: .9rem; }
.categories, .compact-list { margin: 0; padding: 0 17px 14px; list-style: none; }
.categories li, .compact-list > div { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; font-size: .85rem; border-top: 1px solid var(--border); }
.categories li span, .compact-list dt { color: var(--muted); }
.compact-list dd { text-align: right; font-weight: 650; }
.dashboard-metrics .metric { display: flex; flex-direction: column; }
.dashboard-metrics .metric p { margin-bottom: 6px; }
.dashboard-metrics .dashboard-detail-link { align-self: start; margin-top: auto; }
.dashboard-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 37px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--primary-dark);
  font-size: .77rem;
  font-weight: 660;
  white-space: nowrap;
}
.dashboard-detail-link:hover { border-color: #dae7fc; background: var(--primary-soft); }
.dashboard-detail-link .icon { width: 14px; height: 14px; }
.report-body .panel-title > .dashboard-detail-link { flex: none; }
.report-body .panel-title > div { min-width: 0; }
.dashboard-row-link { color: var(--primary-dark); }
.dashboard-row-link:hover { text-decoration: underline; }
.report-body :is(.categories li,.compact-list > div) { position: relative; min-height: 39px; align-items: center; }
.dashboard-row-link::after { position: absolute; inset: 0; content: ''; }
.report-body .legend-key { min-height: 34px; padding: 2px 0; border: 0; background: transparent; color: var(--primary-dark); font: inherit; }
.report-body .legend-key:hover { text-decoration: underline; }
.dashboard-cashflow { display: grid; gap: 10px; }
.dashboard-cashflow-row { padding: 10px 11px; border: 1px solid var(--border); border-radius: 10px; }
.dashboard-cashflow-row h3 { margin-bottom: 5px; color: var(--navy); font-size: .98rem; }
.dashboard-cashflow-row dl { margin: 0; }
.dashboard-cashflow-row dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 0; }
.dashboard-cashflow-row dl > div + div { border-top: 1px solid var(--border); }
.dashboard-cashflow-row dt { color: var(--muted); font-size: .83rem; }
.dashboard-cashflow-row dd { min-width: 0; text-align: end; overflow-wrap: anywhere; font-size: .85rem; font-weight: 660; }
.dashboard-cashflow-row a { text-decoration: underline; text-underline-offset: 2px; }
@media (hover: none) and (pointer: coarse) {
  .dashboard-detail-link, .report-body :is(.categories li,.compact-list > div) { min-height: 44px; }
}

.table-wrap { width: 100%; overflow: auto; }
.cell-label { display: none; }
.cell-content { min-width: 0; }
.table-wrap:focus-within { outline: 2px solid transparent; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th { padding: 11px 14px; background: var(--bg); color: var(--muted); font-size: .785rem; font-weight: 700; white-space: nowrap; }
td { padding: 12px 14px; border-top: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: var(--bg); }
td .row-actions { min-width: min-content; }
.btn.row-action { display: inline-grid; place-items: center; flex: none; width: 34px; min-height: 34px; padding: 0; }
.row-action .icon { width: 17px; height: 17px; }
.receipt-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.action-hint { position: fixed; z-index: 30; pointer-events: none; max-width: min(240px, calc(100vw - 16px));
  padding: 6px 9px; border-radius: 6px; background: var(--navy); color: #fff; font-size: .77rem; line-height: 1.35;
  box-shadow: 0 3px 12px #10243c33; }
.cell-main { display: grid; gap: 3px; min-width: 105px; }
.cell-main strong { font-weight: 670; }
.cell-main small { color: var(--muted); font-size: .75rem; }
.budget-bulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  margin: 0 17px 13px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); }
.budget-bulk-all, .budget-bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.budget-bulk-all { min-height: 40px; cursor: pointer; font-weight: 620; font-size: .87rem; }
.budget-bulk-toolbar input[type=checkbox], .budget-bulk-checkbox { width: 24px; height: 24px; min-height: 0; margin: 0;
  accent-color: var(--primary); }
.budget-bulk-count { color: var(--muted); font-size: .83rem; }
.budget-bulk-actions { margin-inline-start: auto; }
.budget-bulk-actions .btn:disabled { cursor: default; }
.budget-review-item { display: flex; align-items: flex-start; gap: 10px; }
.budget-review-item > input { flex: none; }
.budget-review-item > div { min-width: 0; }
.pill, .tag { display: inline-flex; align-items: center; max-width: 100%; padding: 3px 8px; border-radius: 999px; background: #eef3f9; color: #384b64; font-size: .75rem; font-weight: 660; white-space: nowrap; }
.pill.green, .pill.success, .pill.approved { background: #e4f1e6; color: #255b37; }
.pill.gold, .pill.warning, .pill.pending, .pill.amber { background: #f8eed1; color: #6d501b; }
.pill.red, .pill.danger, .pill.error, .pill.failed { background: #fae7e2; color: #87372e; }
.pill.blue, .pill.info { background: var(--primary-soft); color: var(--primary-dark); }
.empty { padding: 29px 14px 32px; display: grid; justify-items: center; text-align: center; gap: 7px; color: var(--ink); }
.empty-icon { width: 42px; height: 42px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 12px; font-size: 1.15rem; margin-bottom: 4px; }
.empty strong { font-size: .92rem; }
.empty p { color: var(--muted); max-width: 320px; font-size: .83rem; line-height: 1.5; }
.retry { text-align: center; }

.filters { padding: 0 17px 14px; gap: 9px; align-items: end; }
.filters input, .filters select { width: auto; min-width: 125px; max-width: 100%; }
.filters > .field { min-width: 120px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.processing { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: #675222; white-space: nowrap; }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #ddc99a; border-top-color: #795e29; border-radius: 50%; animation: spin .85s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; color: var(--ink); font-weight: 630; font-size: .858rem; min-width: 0; }
input, select, textarea { width: 100%; min-height: 38px; background: var(--surface); color: var(--ink); border: 1px solid #c4d1e2; border-radius: 8px; padding: 7px 10px; font-size: .92rem; font-weight: 500; }
input[type=checkbox] { appearance: auto; width: auto; min-height: auto; }
input[type=file] { padding: 7px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-error { padding: 9px 11px; border-radius: 7px; background: #fbe9e5; color: #812e24; font-size: .86rem; line-height: 1.4; }
.dialog-form { padding: 16px var(--dialog-gutter, 18px) 18px; }
.dialog-form .form-error { margin-top: 12px; }
.dialog-form .field { color: #263e5f; }
.dialog-form .field > :is(input:not([type=checkbox],[type=radio]), select, textarea) {
  border-color: #c6d5e9;
  border-radius: 9px;
  background: #f8faff;
}
.dialog-form .field > :is(input:not([type=checkbox],[type=radio]), select, textarea):focus-visible {
  border-color: #2873d7;
  outline: 2px solid #7baff5;
  outline-offset: 1px;
  background: var(--surface);
}
.dialog-form .field > :is(input:not([type=checkbox],[type=radio]), select, textarea):is(:disabled,[readonly]) { background: #eef3f9; }
.dialog-form .field > :is(input, select, textarea):user-invalid { border-color: #ae473d; }
.payment-workflow > .form-error { margin-top: 0; }
.payment-workflow .payment-confirm:disabled { cursor: default; opacity: 1; background: #eef2f6;
  color: #566780; border-color: #d9e1ec; box-shadow: none; }
.payment-fields, .payment-details { min-inline-size: 0; margin: 0; padding: 12px;
  border: 1px solid var(--border); border-radius: 9px; }
.payment-fields legend { padding-inline: 5px; font-size: .93rem; font-weight: 680; }
dialog {
  --dialog-gutter: 20px;
  width: min(620px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block-start: 74px;
  scrollbar-width: thin;
  scrollbar-color: #c7d5e7 transparent;
  border: 1px solid #c7d9ee;
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 22px 66px #071d3848, 0 3px 12px #071d3824;
}
dialog::backdrop { background: #071d388d; }
.dialog-head {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 62px;
  padding: 9px var(--dialog-gutter, 18px);
  border-block-end: 1px solid #2866ad;
  background: radial-gradient(ellipse at 98% 0%, #5cb2ff38, transparent 66%), linear-gradient(108deg, #092142, #0d428c);
  color: #fff;
}
.dialog-brand { flex: none; width: 53px; height: 36px; padding: 4px 6px; border-radius: 8px; background: #fff; object-fit: contain; }
.dialog-head > h2 {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 1.08rem;
  font-weight: 720;
  line-height: 1.25;
}
.dialog-head > .icon-btn { flex: none; border-color: #b4daff43; background: #e5f1ff17; color: #fff; }
.dialog-head > .icon-btn:hover { border-color: #c2e1ff95; background: #e5f1ff34; }
.dialog-head > .icon-btn:focus-visible { outline-color: #c2e4ff; }
.dialog-head > .chat-person-back { order: -1; }
.dialog-actions { justify-content: flex-end; margin-top: 13px; }
dialog > .dialog-actions { padding: 0 18px 16px; }
dialog > .stack { padding: 14px 18px; }
dialog[open]:has(> .dialog-form--standard) { display: flex; flex-direction: column; overflow: hidden; }
dialog:has(> .dialog-form--standard) > .dialog-head { position: relative; flex: none; }
.dialog-form--standard { display: flex; flex-direction: column; min-block-size: 0; padding: 0; }
.dialog-form-body {
  min-block-size: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 8px;
  scrollbar-width: thin;
  scrollbar-color: #c7d5e7 transparent;
}
.dialog-form-body:focus-visible { outline: 2px solid #7baff5; outline-offset: -2px; }
@supports selector(::-webkit-scrollbar) {
  .dialog-form-body { scrollbar-width: auto; scrollbar-color: auto; }
  .dialog-form-body::-webkit-scrollbar { width: 4px; height: 4px; }
  .dialog-form-body::-webkit-scrollbar-track { background: transparent; }
  .dialog-form-body::-webkit-scrollbar-thumb { background: #c7d5e7; border-radius: 4px; }
}
.dialog-form-body > .form-grid { gap: 12px 14px; padding: 16px var(--dialog-gutter) 14px; }
.dialog-form-body > .form-grid > p { line-height: 1.45; }
.dialog-form-body > .form-grid > p.muted { font-size: .86rem; }
.dialog-form-body > .form-grid > p.muted:first-child:has(> strong) {
  padding: 9px 11px;
  border-inline-start: 3px solid #78abec;
  border-radius: 7px;
  background: #edf4ff;
  color: #365375;
}
.dialog-form-body > .form-error { margin: 0 var(--dialog-gutter) 12px; }
.dialog-form--standard > .dialog-actions {
  flex: none;
  margin: 0;
  padding: 10px var(--dialog-gutter);
  border-block-start: 1px solid #dbe6f4;
  background: #f3f7fd;
}
.dialog-form--standard > .dialog-actions .btn { min-height: 40px; }
.dialog-section {
  min-inline-size: 0;
  margin: 0;
  padding: 9px 12px 12px;
  border: 1px solid #dbe6f4;
  border-radius: 11px;
  background: #fbfdff;
}
.dialog-section > legend { padding-inline: 6px; color: #184782; font-size: .89rem; font-weight: 700; }
.dialog-section > .form-grid { gap: 10px 12px; }
.dialog-form--standard :is(.form-grid,.dialog-section) > .check-field {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  width: 100%;
  padding: 6px 9px;
  border: 1px solid #dde7f4;
  border-radius: 8px;
  background: #f7faff;
  font-size: .86rem;
}
.dialog-form--standard :is(.form-grid,.dialog-section) > .check-field:has(:checked) { border-color: #95b8ee; background: #edf4ff; }
.dialog-form--standard .check-field + .check-field { margin-block-start: -4px; }
.dialog-form--standard .check-field input { flex: none; margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
dialog > .detail-grid { padding: 15px 18px; }
.detail-grid > div { min-width: 0; padding: 8px 9px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); }
.detail-grid dt { color: var(--muted); font-size: .8rem; line-height: 1.4; }
.detail-grid dd { margin-top: 4px; font-weight: 620; font-size: .91rem; white-space: pre-line; overflow-wrap: anywhere; }
.qr-view { display: grid; justify-items: center; gap: 7px; text-align: center; padding: 13px 17px; }
.qr-view img { display: block; width: min(230px, 100%); height: auto; border: 1px solid var(--border); border-radius: 9px; }
.qr-view p { color: var(--muted); font-size: .87rem; overflow-wrap: anywhere; }
.salary-wallet-card .qr-view { padding-block: 7px; }
.salary-wallet-card .qr-view img { width: min(180px, 100%); }
@media (min-width: 640px) {
  .salary-wallet-card .qr-view { grid-template-columns: 180px minmax(0, 1fr); align-items: center; justify-items: start; text-align: start; }
}
.qr-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.qr-tools .field { flex-basis: 100%; }
dialog:has(> .expense-payment-workflow) {
  --expense-payment-gutter: 18px;
  --expense-payment-footer: 70px;
  width: min(740px, calc(100vw - 24px));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #c7d5e7 transparent;
  scroll-padding-block: 66px calc(var(--expense-payment-footer) + env(safe-area-inset-bottom));
}
dialog:has(> .expense-payment-workflow) > .dialog-head { z-index: 4; }
dialog > .expense-payment-workflow { gap: 12px; padding: 12px var(--expense-payment-gutter) 0; }
.expense-payment-heading { display: grid; gap: 4px; }
.expense-payment-heading h3 { font-size: 1.03rem; line-height: 1.4; overflow-wrap: anywhere; }
.expense-payment-scan {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
  padding: 14px;
  border: 1px solid #dce8f8;
  border-radius: 12px;
  background: #f5f9fe;
}
.expense-payment-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 10px;
}
.expense-payment-code img {
  display: block;
  width: min(166px, 100%);
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.expense-payment-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding-inline: 5px;
  border-radius: 5px;
  font-size: .83rem;
  font-weight: 650;
  color: var(--primary-dark);
}
.expense-payment-download:hover { text-decoration: underline; }
.expense-payment-info { display: grid; gap: 6px; min-width: 0; }
.expense-payment-amount {
  color: var(--navy);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
  line-height: 1.16;
  overflow-wrap: anywhere;
}
.expense-payment-book { color: var(--muted); font-size: .8rem; font-weight: 560; }
.expense-payment-list { display: grid; gap: 4px; }
.expense-payment-line { display: grid; align-items: baseline; gap: 2px 10px; }
.expense-payment-line:not(.expense-payment-destination) { grid-template-columns: minmax(0, 125px) minmax(0, 1fr); }
.expense-payment-line dt { color: var(--muted); font-size: .81rem; overflow-wrap: anywhere; }
.expense-payment-line dd { min-width: 0; font-size: .88rem; font-weight: 630; overflow-wrap: anywhere; }
.expense-payment-copyline { display: flex; align-items: center; gap: 9px; }
.expense-payment-copyline code {
  min-width: 0;
  font: 650 .86rem/1.45 ui-monospace, monospace;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: all;
}
.expense-payment-copyline .expense-payment-copy {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
}
.expense-payment-workflow > .form-grid { grid-template-columns: minmax(0, 1fr) minmax(128px, .55fr); gap: 8px 12px; }
.expense-payment-workflow > .form-grid > .field { align-content: end; }
.expense-payment-workflow > .form-grid > .stack { gap: 4px; }
.expense-payment-workflow :is(input, select) { min-width: 0; min-height: 44px; }
.expense-payment-workflow .payment-proof-picker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  min-width: 0;
  padding: 3px 9px 3px 3px;
  border: 1px solid #c4d1e2;
  border-radius: 8px;
  background: var(--surface);
}
.expense-payment-workflow .payment-proof-picker:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.expense-payment-workflow .payment-proof-trigger {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: .83rem;
  font-weight: 650;
}
.expense-payment-workflow .payment-proof-picker:hover .payment-proof-trigger { background: #e2edff; }
.expense-payment-workflow .payment-proof-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.expense-payment-workflow .payment-proof-picker > input[type=file] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.expense-payment-workflow > .dialog-actions {
  position: sticky;
  z-index: 2;
  inset-block-end: 0;
  margin: 0 calc(-1 * var(--expense-payment-gutter));
  padding: 8px var(--expense-payment-gutter) calc(8px + env(safe-area-inset-bottom));
  border-block-start: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -4px 14px #18385a0b;
}
.expense-payment-workflow > .dialog-actions .btn { min-height: 44px; }
.expense-payment-options { position: relative; min-width: 0; }
.expense-payment-options > summary { cursor: pointer; list-style: none; }
.expense-payment-options > summary::-webkit-details-marker { display: none; }
.expense-payment-options[open] > summary > .icon { transform: rotate(180deg); }
.expense-payment-menu {
  position: absolute;
  inset-block-end: calc(100% + 7px);
  inset-inline-end: 0;
  display: grid;
  gap: 4px;
  width: min(211px, calc(100vw - 28px));
  padding: 5px;
  border: 1px solid #d6e1f0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 10px 28px #10284f22;
}
.expense-payment-options:not([open]) > .expense-payment-menu { display: none; }
.expense-payment-menu > .btn { justify-content: flex-start; width: 100%; text-align: start; }
@media (max-width: 767px) {
  dialog:has(> .expense-payment-workflow) {
    --expense-payment-gutter: 16px;
    width: 100%;
    max-height: min(95dvh, 100dvh - 8px);
    padding-block-end: 0;
    scrollbar-width: none;
  }
  dialog:has(> .expense-payment-workflow)::-webkit-scrollbar { display: none; }
  dialog:has(> .expense-payment-workflow) > .dialog-head { padding-inline: var(--expense-payment-gutter); }
}
@media (max-width: 560px) {
  .expense-payment-scan { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 12px; }
  .expense-payment-code {
    display: grid;
    grid-template-columns: minmax(44px, 1fr) minmax(0, 166px) minmax(44px, 1fr);
    justify-items: center;
    align-items: start;
    gap: 0;
  }
  .expense-payment-code img { grid-area: 1 / 2; }
  .expense-payment-download {
    grid-area: 1 / 3;
    justify-self: end;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
  }
  .expense-payment-download:hover { background: var(--primary-soft); }
  .expense-payment-download span { display: none; }
  .expense-payment-info { padding-block-start: 10px; border-block-start: 1px solid var(--border); }
  .expense-payment-line:not(.expense-payment-destination) { grid-template-columns: minmax(0, 6rem) minmax(0, 1fr); }
  .expense-payment-destination {
    position: relative;
    align-content: center;
    min-height: 44px;
    padding-inline-end: 52px;
  }
  .expense-payment-copyline .expense-payment-copy {
    position: absolute;
    inset-inline-end: 0;
    inset-block-start: 50%;
    transform: translateY(-50%);
  }
}
@media (max-width: 420px) {
  .expense-payment-workflow > .form-grid { grid-template-columns: minmax(0, 1fr) minmax(112px, .65fr); gap: 8px; }
  .expense-payment-workflow > .dialog-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); }
  .expense-payment-workflow > .dialog-actions > [data-payment-close] { display: none; }
  .expense-payment-options > summary { width: 100%; gap: 4px; padding-inline: 6px; }
  .expense-payment-menu { inset-inline: 0 auto; }
}
.attachment { padding: 13px; text-align: center; }
.attachment img { max-width: 100%; max-height: 60vh; object-fit: contain; }
.notice { position: fixed; z-index: 50; bottom: 16px; right: 16px; max-width: min(440px, calc(100vw - 32px)); padding: 10px 15px; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 610; font-size: .9rem; box-shadow: 0 5px 20px #071d3834; }
.notice.error { background: #932e39; }

.guest { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--surface); }
.guest-brand { display: grid; align-content: space-between; min-height: 610px; min-width: 0; position: relative; overflow: hidden; padding: clamp(24px, 5vw, 71px); border-right: 1px solid var(--border); background: radial-gradient(ellipse at 86% 82%, #d4e6ff, transparent 68%), linear-gradient(140deg, #fff, #f4f8ff); color: var(--ink); }
.guest-brand > .brand { position: relative; z-index: 1; }
.guest-brand .brand-logo { width: clamp(145px, 19vw, 235px); }
.guest-brand::before, .guest-brand::after { content: ''; position: absolute; width: min(70vw, 720px); aspect-ratio: 1; border: 1px solid #0755d828; pointer-events: none; right: -48%; bottom: -55%; border-radius: 50%; }
.guest-brand::after { right: -34%; bottom: -63%; }
.guest-description { position: relative; z-index: 1; }
.guest-description h1 { margin: 13px 0; max-width: 560px; font-weight: 720; font-size: clamp(2.6rem, 6.4vw, 5.5rem); line-height: .99; letter-spacing: -.07em; }
.guest-description h1 span { color: var(--primary); }
.guest-description p { color: var(--muted); max-width: 360px; line-height: 1.5; }
.guest-bottom { display: flex; gap: 7px; align-items: center; color: var(--muted); font-size: .84rem; }
.guest-main { display: grid; place-items: center; min-width: 0; padding: clamp(19px, 5vw, 60px); }
.guest-card { width: min(100%, 390px); }
.guest-card h2 { font-size: clamp(1.72rem, 3vw, 2.1rem); letter-spacing: -.04em; }
.guest-card > p { margin-top: 7px; color: var(--muted); line-height: 1.5; font-size: .94rem; }
.guest-icon { display: grid; place-items: center; width: 45px; height: 45px; margin-bottom: 15px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-dark); font-size: 1.24rem; }
.guest-form { display: grid; gap: 13px; margin-top: 21px; }
.guest-form input, .guest-form .btn { min-height: 45px; }
.guest-form .btn { margin-top: 3px; font-size: .93rem; }
.guest-password-input { position: relative; }
.guest-password-input > input { padding-inline-end: 53px; }
.guest-password-input > .icon-btn {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: 1px;
  width: 44px;
  height: 44px;
  transform: translateY(-50%);
  color: var(--muted);
}
.guest-password-input > .icon-btn:focus-visible { outline-offset: -3px; }
.guest-password-input > [data-password-visible]::after {
  position: absolute;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: '';
  transform: rotate(-44deg);
}
.guest-remember { display: flex; align-items: center; gap: 9px; min-height: 44px; color: var(--ink); font-size: .9rem; cursor: pointer; }
.guest-remember > input { flex: none; width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--primary); }
.guest-login-methods > .btn { width: 100%; min-height: 44px; }
.guest-mobile { display: none; }
.qr-login-display { justify-items: center; text-align: center; font-size: .9rem; }
.qr-login-image {
  display: grid;
  place-items: center;
  width: min(100%,240px);
  aspect-ratio: 1;
  overflow: hidden;
  box-sizing: content-box;
  border: 6px solid var(--primary-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
}
.qr-login-image img { display: block; width: 100%; height: auto; }
.qr-login-display [data-qr-display-time] { font-size: .79rem; font-variant-numeric: tabular-nums; }
.qr-login-display .btn { min-height: 44px; }
.public-header { padding: 10px max(16px, calc((100vw - 780px) / 2)); background: var(--surface); border-bottom: 1px solid var(--border); }
.public-header .brand-logo { width: 105px; }
.public-page { max-width: 810px; min-width: 0; margin: 0 auto; padding: 24px 16px; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: none) and (pointer: coarse) {
  input, select, textarea { font-size: 1rem; }
  .btn.row-action { width: 44px; min-height: 44px; }
}
@media (min-width: 901px) {
  .sidebar-collapse { display: inline-grid; }
  .sidebar-collapse[aria-pressed=true] { border-color: var(--border); background: var(--primary-soft); }
  .sidebar { transition: width .16s ease; }
  .workspace-main { transition: margin-left .16s ease; }
  .workspace.sidebar-collapsed { --sidebar-width: 76px; }
  .sidebar-collapsed .sidebar { gap: 12px; padding-inline: 6px; }
  .sidebar-collapsed .sidebar-brand { justify-content: center; align-items: center; min-height: 50px; padding: 5px; }
  .sidebar-collapsed .sidebar-brand .brand-logo { width: 43px; }
  .sidebar-collapsed .sidebar-brand .brand > span, .sidebar-collapsed .nav-group-label,
  .sidebar-collapsed .nav-current { display: none; }
  .sidebar-collapsed .sidebar nav { gap: 9px; }
  .sidebar-collapsed .nav-group + .nav-group { padding-top: 8px; border-top: 1px solid var(--border); }
  .sidebar-collapsed .sidebar .nav-item-label, .sidebar-collapsed .sidebar-profile > div {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .sidebar-collapsed .nav-group :is(a,button) { position: relative; justify-content: center; width: 47px; margin-inline: auto; padding: 6px 0; }
  .sidebar-collapsed .nav-group :is(a,button):focus-visible { outline-offset: -2px; }
  .sidebar-collapsed .branch-chevron { position: absolute; right: 2px; bottom: 3px; }
  .sidebar-collapsed .nav-subgroup { gap: 2px; margin: 2px 0 2px 6px; padding-inline-start: 2px; }
  .sidebar-collapsed .nav-subgroup a { width: 39px; }
  .sidebar-collapsed .nav-group :is([data-finance-queue], [data-transfer-pending-count]) { position: absolute; top: 1px; right: 0; gap: 1px; }
  .sidebar-collapsed .nav-group .queue-badge { min-width: 15px; min-height: 15px; padding: 2px 3px; font-size: .61rem; }
  .sidebar-collapsed .sidebar-profile { justify-content: center; min-height: 45px; padding-inline: 3px; }
}
@media (max-width: 900px) {
  .btn.row-action { width: 44px; min-height: 44px; }
  .sidebar { width: min(300px, calc(100vw - 38px)); visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility 0s linear .2s; }
  .sidebar nav { scrollbar-width: none; }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .workspace.menu-open .sidebar { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .workspace-main { margin-left: 0; }
  .menu-toggle, .nav-close { display: inline-grid; }
  .overlay { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 9; background: #071d3862; border: 0; }
  body:has(.menu-open) { overflow: hidden; }
}
@media (max-width: 767px) {
  :root { --workspace-header-height: 55px; }
  html { scroll-padding-top: calc(var(--workspace-header-height) + 53px); scroll-padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  .topbar { gap: 5px; padding: 0 9px; }
  .breadcrumb { gap: 5px; }
  .breadcrumb > span, .breadcrumb > .icon { display: none; }
  .icon-btn { width: 44px; height: 44px; }
  .top-actions { gap: 2px; }
  .top-account { min-height: 44px; gap: 6px; padding-inline: 4px; }
  .top-account .avatar { width: 30px; min-width: 30px; height: 30px; }
  .top-account-copy { max-width: 18ch; }
  .top-account-copy strong { font-size: .82rem; }
  .top-account-copy small { font-size: .7rem; }
  .top-popover-anchor { position: static; }
  .top-popover { top: calc(100% + 6px); inset-inline-end: 10px; }
  .account-popover > :is(a,button) { min-height: 44px; }
  .workspace-tabs { gap: 4px; padding-inline: 7px; }
  .workspace-tab-list { min-height: 49px; scrollbar-width: none; }
  .workspace-tab { max-width: min(205px, 65vw); height: 41px; }
  .tab-close { width: 31px; height: 35px; margin-inline-end: 2px; }
  .tabs-close-all { min-height: 42px; padding-inline: 5px; }
  .mobile-nav { position: fixed; z-index: 6; bottom: 0; left: 0; right: 0; padding: 3px 4px env(safe-area-inset-bottom); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -3px 14px #18385a12; }
  .mobile-nav a, .mobile-nav button { position: relative; display: grid; gap: 2px; justify-items: center; align-content: center; min-height: 52px; padding: 4px 2px 6px; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--muted); font-size: .75rem; font-weight: 640; line-height: 1.15; text-align: center; }
  .mobile-nav .icon { width: 20px; height: 20px; }
  .mobile-nav :is(a[aria-current],button[data-active-branch]) { background: var(--primary-soft); color: var(--primary-dark); }
  .mobile-nav [data-finance-queue] { position: absolute; right: 3px; top: 2px; }
  .workspace-view { padding: 21px 12px calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 22px); }
  .page-heading { flex-direction: column; align-items: flex-start; margin-bottom: 17px; }
  .page-actions { justify-content: flex-start; }
  .chart-layout, .activity-layout, .guest { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .period-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .period-toolbar .segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .period-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, .7fr); align-items: stretch; gap: 8px; }
  .period-controls > .btn { min-width: 0; min-height: 52px; padding: 6px 7px; }
  .period-controls > .field { position: relative; display: block; min-width: 0; }
  .period-controls > .field > span { position: absolute; inset: 6px auto auto 11px; color: var(--muted); font-size: .73rem; pointer-events: none; }
  .period-controls select { width: 100%; height: 100%; min-height: 52px; padding: 20px 10px 5px; }
  .period-summary { order: 3; overflow-wrap: anywhere; }
  .metrics { gap: 8px; }
  .metric { padding: 10px; }
  .metric-top { font-size: .78rem; }
  .metric-icon { width: 27px; height: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .guest-brand { display: none; }
  .guest-mobile { display: block; margin-bottom: 23px; }
  .guest-mobile .brand-logo { width: 141px; }
  .guest-main { padding: 24px; }
  .date-chip { font-size: .78rem; }
  .btn, .btn.small, td .btn, .segments button { min-height: 44px; }
  input, select, textarea { font-size: 1rem; min-height: 44px; min-width: 0; }
  .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 12px 13px; }
  .filters input, .filters select, .filters > .field { width: 100%; min-width: 0; }
  .filters .field:has(input[type=search]), .filters [data-period-fields], .filters > button { grid-column: 1 / -1; }
  .filters > [data-period-fields] { display: grid; }
  .budget-bulk-toolbar { margin-inline: 11px; }
  .budget-bulk-actions { margin-inline-start: 0; }
  .budget-bulk-actions .btn { flex: 1 0 auto; }
  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap tbody { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .table-wrap tbody > tr { display: block; min-width: 0; margin: 0 11px 9px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; }
  .table-wrap td { display: grid; grid-template-columns: minmax(72px, .8fr) minmax(0, 1.2fr); align-items: start; gap: 8px; padding: 7px 10px; overflow-wrap: anywhere; }
  .table-wrap td:first-child { display: block; border-top: 0; padding-block: 10px; background: var(--bg); font-weight: 650; }
  .table-wrap td:last-child:has(.row-actions), .table-wrap td:has(.row-actions) { display: block; padding-block: 7px; }
  .table-wrap td:last-child:has(.btn) { grid-template-columns: 1fr; }
  .table-wrap td:has(.row-actions) > .cell-label, .table-wrap td:last-child:has(.btn) > .cell-label { display: none; }
  .cell-label { display: block; font-size: .81rem; color: var(--muted); font-weight: 630; }
  td:first-child > .cell-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cell-content .btn { white-space: normal; }
  .cell-content .pill { white-space: normal; }
  .cell-main { min-width: 0; }
  dialog { --dialog-gutter: 14px; position: fixed; inset: auto 0 0; margin: 0; width: 100%; max-width: 100%; max-height: min(92dvh, 100dvh - 12px); border-radius: 17px 17px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog:has(> .dialog-form--standard) { padding-block-end: 0; }
  .dialog-head { gap: 8px; padding-block: 7px; }
  .dialog-brand { width: 44px; height: 34px; padding-inline: 5px; }
  .dialog-head > h2 { font-size: 1rem; }
  .dialog-form-body > .form-grid { gap: 11px; }
  .dialog-form--standard > .dialog-actions { padding-block-end: max(10px, env(safe-area-inset-bottom)); }
  .dialog-form--standard > .dialog-actions .btn { min-height: 44px; }
  .dialog-actions, .qr-tools { gap: 8px; }
  .qr-view { padding-inline: 0; }
  .notice { bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 8px); }
}
@media (max-width: 400px) {
  .top-account-copy { max-width: 12ch; }
  .top-account > .icon { display: none; }
  .mobile-nav a, .mobile-nav button { font-size: .705rem; }
  .detail-grid { gap: 7px; }
  .table-wrap td { grid-template-columns: minmax(71px, .85fr) minmax(0, 1.15fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
*[data-period-fields].filters { padding: 0; }
.revenue-summary { padding: 0 17px 16px; }
.revenue-summary .metrics { margin-bottom: 0; }
.record-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; }
.cell-sub { display: block; font-size: .78rem; margin-top: 4px; }
.panel > .detail-grid, .payroll-note { margin: 0 17px 14px; }
.payroll-note { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.panel-action-footer { display: grid; gap: 10px; padding: 13px 17px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel-action-footer .row-actions { justify-content: flex-end; }
.job-catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 17px 17px; }
.job-catalog details { min-width: 0; align-self: start; border: 1px solid var(--border); border-radius: 9px; padding: 10px; }
.job-catalog summary { cursor: pointer; font-weight: 650; }
.job-groups { display: grid; gap: 8px; margin-top: 12px; font-size: .875rem; }
.job-groups ul, .job-subdepartment ul { margin: 5px 0 0; padding-inline-start: 17px; }
.job-subdepartment { margin-top: 12px; padding: 8px 0 3px 11px; border-inline-start: 2px solid #c5d9fb; font-size: .875rem; }
.job-subdepartment h3 { font-size: .875rem; font-weight: 680; }
@media (max-width: 570px) {
  .job-catalog { grid-template-columns: 1fr; }
}
.category-swatch { display: inline-flex; align-items: center; gap: 7px; }
.category-swatch::before { content: ''; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--swatch); }
.swatch-0 { --swatch: var(--primary); }
.swatch-1 { --swatch: var(--teal); }
.swatch-2 { --swatch: #526580; }
.swatch-3 { --swatch: #51a7ff; }
.swatch-4 { --swatch: #12314e; }
.swatch-5 { --swatch: #5ae0dc; }
.swatch-6 { --swatch: #38689e; }
.swatch-7 { --swatch: #aac7e8; }
@media (min-width: 1100px) {
  .activity-layout { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.guest-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.guest-card > .guest-actions { margin-top: 15px; }
.auth-setup { display: grid; justify-items: start; gap: 11px; margin-top: 14px; }
.auth-setup img { display: block; width: 164px; max-width: 100%; height: auto; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.auth-setup .copy-group { display: flex; align-items: end; flex-wrap: wrap; gap: 6px; width: 100%; }
.copy-group .field { flex: 1 1 200px; min-width: 0; }
.auth-setup input, .recovery-codes code, .ip-current strong { font-family: ui-monospace, monospace; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.recovery-codes li { min-width: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); overflow-wrap: anywhere; }
.system-settings { max-width: 840px; }
.settings-form { padding: 0 17px 17px; }
.settings-form > .btn { align-self: start; }
.security-status, .check-field, .ip-current { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; font-size: .9rem; }
.check-field { width: fit-content; min-height: 35px; cursor: pointer; }
.check-field input { width: 17px; height: 17px; accent-color: var(--primary); }
.ip-current { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); }
.ip-current strong { overflow-wrap: anywhere; }
.ip-current .btn { margin-left: auto; }
.settings-form > p { font-size: .86rem; line-height: 1.45; }
.settings-form > p:empty { display: none; }

@media (max-width: 850px) {
}
@media (max-width: 767px) {
  .check-field { min-height: 44px; }
  .ip-current .btn { margin-left: 0; }
  .auth-setup img { width: 145px; }
}

.org-chart-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 16px 12px; }
.org-chart-tools .btn { min-height: 42px; }
.org-zoom-tools { display: flex; gap: 3px; }
.org-zoom-tools .btn { min-width: 42px; justify-content: center; }
.org-zoom-tools [data-org-zoom-reset] { min-width: 64px; font-variant-numeric: tabular-nums; }

.org-tree-viewport {
  --org-connector: #8eaad0;
  container-type: inline-size;
  margin: 0 16px 16px;
  padding: 22px 14px 19px;
  overflow: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: radial-gradient(circle, #d7e4f64a 1px, transparent 1.2px) 0 0 / 15px 15px, #f6f9fe;
}
.org-tree { display: flex; width: max-content; min-width: 100cqi; margin-inline: auto; flex-direction: column; align-items: center; }
.org-card { width: 205px; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px; padding: 11px; border: 1px solid #d5e2f4; border-radius: 10px; background: var(--surface); text-align: left; box-shadow: var(--shadow); }
.org-card-root { width: 221px; min-height: 59px; color: #fff; background: var(--navy); border-color: var(--navy); }
.org-card-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); text-transform: uppercase; font-size: .76rem; font-weight: 720; }
.org-card-root .org-card-avatar { color: #b9d5ff; background: #17385d; font-size: 1rem; }
.org-card-person { min-width: 0; }
.org-card-person strong, .org-card-person small { display: block; overflow-wrap: anywhere; }
.org-card-person strong { font-size: .91rem; }
.org-card-person small { margin-top: 3px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.org-card-root .org-card-person small { color: #adc5de; }
.org-card-status { grid-column: 1 / -1; }
.directory-badges { display: flex; flex-wrap: wrap; gap: 4px; }

.org-branches { position: relative; display: flex; justify-content: center; width: max-content; list-style: none; margin: 0; padding: 16px 0 0; }
.org-branches::before { content: ''; position: absolute; top: 0; left: 50%; height: 16px; border-left: 1px solid var(--org-connector); }
.org-branch { position: relative; display: flex; flex-direction: column; align-items: center; padding: 20px 8px 0; }
.org-branch::before, .org-branch::after { content: ''; position: absolute; top: 0; width: 50%; height: 20px; border-top: 1px solid var(--org-connector); }
.org-branch::before { right: 50%; }
.org-branch::after { left: 50%; border-left: 1px solid var(--org-connector); }
.org-branch:first-child::before { border-top: 0; }
.org-branch:last-child::after { width: 0; border-top: 0; }
.org-branch:only-child::before { display: none; }
.org-tree:not(:has(> .org-card-root)) > .org-branches,
.org-tree:not(:has(> .org-card-root)) > .org-branches > .org-branch { padding-top: 0; }
.org-tree:not(:has(> .org-card-root)) > .org-branches::before,
.org-tree:not(:has(> .org-card-root)) > .org-branches > .org-branch::before,
.org-tree:not(:has(> .org-card-root)) > .org-branches > .org-branch::after { display: none; }

@media (max-width: 900px) {
  .org-chart-tools { margin-inline: 11px; }
  .org-chart-tools .btn { min-height: 44px; padding-inline: 9px; }
  .org-tree-viewport { margin: 0 11px 12px; padding: 12px; }
  .org-tree { display: block; width: 100cqi; min-width: 0; }
  .org-card { width: 100%; min-width: 0; }
  .org-branches { display: block; width: auto; margin-left: 10px; padding: 0; }
  .org-branches::before { display: none; }
  .org-branch { display: block; padding: 10px 0 0 13px; }
  .org-branches > .org-branch::before { display: block; left: 0; right: auto; width: 13px; height: 31px; border: solid var(--org-connector); border-width: 0 0 1px 1px; border-bottom-left-radius: 5px; }
  .org-branches > .org-branch::after { left: 0; width: 0; height: 100%; border-top: 0; }
  .org-branches > .org-branch:last-child::after { display: none; }
  .org-tree:not(:has(> .org-card-root)) > .org-branches { margin: 0; }
  .org-tree:not(:has(> .org-card-root)) > .org-branches > .org-branch { padding: 0 0 10px; }
  .org-card-status .pill { white-space: normal; }
}
@media (max-width: 400px) {
  .org-branches { margin-left: 6px; }
  .org-branch { padding-left: 10px; }
  .org-branches > .org-branch::before { width: 10px; }
}


.nav-group .nav-branch { width: 100%; gap: 6px; padding-inline: 8px; }
.nav-branch .nav-item-label { flex: 1; min-width: 0; }
.branch-chevron { display: inline-flex; flex: none; }
.nav-branch .branch-chevron .icon { width: 12px; height: 12px; }
.nav-branch[aria-expanded=true] .branch-chevron { transform: rotate(180deg); }
.nav-subgroup { display: grid; margin: 1px 0 4px 14px; padding-left: 5px; border-left: 1px solid var(--border); }
.nav-subgroup a { min-height: 36px; gap: 7px; padding: 5px 7px; font-size: .8rem; }
.nav-subgroup a .icon { width: 15px; height: 15px; }
.nav-subgroup .nav-item-label { flex: 1; min-width: 0; }
[data-finance-queue], [data-transfer-pending-count] { display: inline-flex; flex: none; align-items: center; gap: 3px; }
:is([data-finance-queue], [data-transfer-pending-count]):empty { display: none; }
.queue-badge { display: inline-grid; place-items: center; min-width: 19px; min-height: 19px; padding: 2px 4px; border-radius: 999px; color: #fff; font-size: .69rem; font-weight: 760; line-height: 1; font-variant-numeric: tabular-nums; }
.queue-badge.pending { background: #ba2937; }
.queue-badge.payment { background: #a64a0b; }
.finance-heading-queue .queue-badge { min-width: 23px; min-height: 23px; font-size: .75rem; }

.finance-scopes { display: flex; flex-wrap: wrap; gap: 7px; margin: -9px 0 16px; }
.finance-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; padding: 0 17px 15px; }
.finance-totals > div { min-width: 0; }
.finance-totals h3 { margin: 0 0 5px; font-size: .9rem; }
.finance-breakdown, .finance-rollups { padding: 0; margin: 0; list-style: none; }
.finance-breakdown li, .finance-rollups li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .86rem; }
.finance-breakdown li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.finance-breakdown li strong, .rollup-amount { text-align: end; overflow-wrap: anywhere; }
.finance-breakdown .finance-breakdown-share { display: grid; grid-template-columns: minmax(0,1fr); gap: 9px; }
.finance-share-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: baseline; gap: 6px 8px; }
.finance-share-row > span { overflow-wrap: anywhere; }
.finance-share-values { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 3px 8px; }
.finance-share-percent { min-width: 5ch; text-align: end; color: var(--muted); font-variant-numeric: tabular-nums; }
.finance-share-meter { grid-column: 1 / -1; display: block; width: 100%; height: 6px; padding: 0; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--primary-soft); }
.finance-share-meter::-webkit-meter-bar { height: 6px; border: 0; background: var(--primary-soft); }
.finance-share-meter::-webkit-meter-optimum-value { border-radius: 999px; background: var(--primary); }
.finance-share-meter::-moz-meter-bar { border-radius: 999px; background: var(--primary); }
.rollup-amount small { display: block; margin-top: 3px; color: var(--muted); }
.finance-rollups { margin: 0 17px 12px; background: var(--primary-soft); border: 1px solid #c5d9fb; border-radius: 10px; }
.finance-rollups li { min-height: 43px; padding: 8px 12px; }
.finance-rollups li + li { border-top: 1px solid #c5d9fb; }
.finance-rollups a { display: inline-flex; align-items: center; gap: 5px; }
.finance-rollups a:hover { text-decoration: underline; }
.finance-rollups a .icon { width: 14px; }

.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; padding: 12px 17px; border-top: 1px solid var(--border); }
.pagination label, .page-buttons { display: inline-flex; align-items: center; gap: 7px; }
.pagination label, .pagination .page-count { font-size: .82rem; }
.pagination select { width: auto; min-width: 62px; }
.page-buttons { margin-inline-start: auto; }
.pagination .btn:disabled { cursor: default; opacity: .55; }

.sidebar-profile { color: var(--ink); border-radius: 9px; }
.sidebar-profile:hover, .sidebar-profile[aria-current] { background: var(--primary-soft); }
.avatar { width: 35px; overflow: hidden; }
.avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-sky { background: var(--primary); color: #fff; }
.avatar-navy { background: var(--navy); color: #fff; }
.avatar-teal { background: #cdeeea; color: #125850; }
.avatar-indigo { background: #dfe2fa; color: #34417b; }
.avatar-violet { background: #ede2f5; color: #633d7a; }
.avatar-rose { background: #f8e0e8; color: #833556; }
.avatar-amber { background: #fae9c1; color: #754915; }
.profile-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.profile-layout .panel { margin: 0; }
.profile-identity { display: flex; align-items: center; gap: 13px; min-width: 0; }
.profile-identity h3 { overflow-wrap: anywhere; }
.profile-identity p { margin-top: 3px; font-size: .85rem; color: var(--muted); }
.profile-identity .avatar { width: 66px; min-width: 66px; height: 66px; font-size: 1.35rem; }
.avatar-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(76px,1fr)); gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.avatar-options legend { padding: 0 0 6px; font-size: .85rem; font-weight: 650; }
.avatar-options label { display: grid; justify-items: center; gap: 4px; position: relative; padding: 6px 3px; min-width: 0; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; font-size: .74rem; text-align: center; }
.avatar-options label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 680; }
.avatar-options label:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.avatar-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
@media (max-width: 767px) {
  .mobile-nav .queue-badge { min-width: 15px; min-height: 15px; font-size: .61rem; padding: 2px 3px; }
  .nav-subgroup a { min-height: 42px; }
  .finance-scopes { margin-top: -8px; }
  .finance-totals, .profile-layout { grid-template-columns: minmax(0,1fr); }
  .pagination { padding: 10px 12px; }
  .page-buttons { width: 100%; margin-inline-start: 0; }
  .page-buttons .btn { flex: 1; min-height: 40px; }
  .profile-layout { gap: 12px; }
}

.workspace-view.workspace-empty { container-type: inline-size; padding-top: clamp(24px, 7vh, 72px); }
.workspace-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
  max-width: 1030px;
  margin-inline: auto;
  border: 1px solid #d5e3f3;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 38px #18385a12, var(--shadow);
}
.workspace-welcome-copy { container: workspace-welcome-copy / inline-size; min-width: 0; padding: clamp(26px, 4vw, 54px); }
.workspace-welcome-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 15px; }
.workspace-welcome-brand .brand-logo { width: 76px; }
.workspace-welcome-brand span { padding-inline-start: 15px; border-inline-start: 1px solid #d4e1f2; color: #385579; font-size: .8rem; font-weight: 720; }
.workspace-welcome-copy h1 { container-type: inline-size; margin-top: 21px; color: var(--navy); line-height: 1.14; }
.workspace-welcome-title-line { display: block; font-size: clamp(1.3rem, 8.5cqi, 2.85rem); letter-spacing: -.04em; }
.workspace-welcome-title-line > span { white-space: nowrap; }
.workspace-welcome-title-accent { color: var(--primary); }
.workspace-welcome-copy p { max-width: 40ch; margin-top: 16px; color: #4f627c; font-size: .96rem; line-height: 1.58; }
.workspace-welcome-actions { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 8px; margin-top: 23px; }
.workspace-welcome-actions .btn { min-height: 44px; padding-inline: 8px; }
.workspace-welcome-actions .btn:not(.primary) { color: var(--primary-dark); }
@container workspace-welcome-copy (min-width: 455px) {
  .workspace-welcome-actions { display: flex; flex-wrap: wrap; }
}
.workspace-welcome-solutions {
  display: grid;
  align-content: center;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 3.4vw, 43px);
  color: #fff;
  background:
    radial-gradient(ellipse at 97% 7%, #1261bb80 0, transparent 59%),
    radial-gradient(ellipse at 20% 110%, #04649266 0, transparent 57%),
    linear-gradient(147deg, #081e3e 4%, #0b3070 100%);
}
.workspace-welcome-solutions h2 { font-size: clamp(1.07rem, 2vw, 1.37rem); }
.workspace-welcome-solutions ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.workspace-welcome-solutions li {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 78px;
  padding: 10px 12px;
  background: #b7d9ff14;
  border: 1px solid #b9dbff3b;
  border-radius: 12px;
  color: #f0f7ff;
  font-size: .84rem;
  font-weight: 640;
  line-height: 1.3;
}
.workspace-welcome-solutions li .icon { width: 18px; height: 18px; color: #aadcff; }
.workspace-welcome-solutions li span { overflow-wrap: anywhere; }
.workspace-welcome-solutions a { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: #e0edff; font-size: .83rem; font-weight: 680; }
.workspace-welcome-solutions a:hover { color: #fff; text-decoration: underline; }
.workspace-welcome-solutions a:focus-visible { outline-color: #d9edff; }

@container (max-width: 665px) {
  .workspace-welcome { grid-template-columns: minmax(0, 1fr); max-width: 620px; }
}
@media (max-width: 690px) {
  .workspace-view.workspace-empty { padding-top: 19px; }
  .workspace-welcome { border-radius: 17px; }
  .workspace-welcome-copy, .workspace-welcome-solutions { padding: 20px; }
  .workspace-welcome-brand .brand-logo { width: 63px; }
  .workspace-welcome-copy h1 { margin-top: 14px; }
  .workspace-welcome-copy p { margin-top: 12px; font-size: .91rem; }
  .workspace-welcome-actions { margin-top: 17px; }
  .workspace-welcome-solutions { gap: 10px; padding-bottom: 12px; }
  .workspace-welcome-solutions li { grid-template-columns: auto minmax(0, 1fr); align-items: center; align-content: center; min-height: 49px; padding: 8px 10px; }
  .workspace-welcome-solutions li .icon { width: 16px; height: 16px; }
  .workspace-welcome-solutions a { min-height: 44px; }
}
@media (max-width: 360px) {
  .workspace-welcome-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .workspace-welcome-actions .btn { padding-inline: 5px; }
  .workspace-welcome-actions .icon { display: none; }
}

.record-id { display: block; margin-top: 3px; color: var(--muted); font: .72rem/1.35 ui-monospace, monospace; overflow-wrap: anywhere; user-select: all; }
.wallet-address { font: .82rem/1.45 ui-monospace, monospace; overflow-wrap: anywhere; user-select: all; }
