:root {
  color-scheme: light;
  --canvas: #f4f7f6;
  --white: #fff;
  --ink: #152724;
  --muted: #576b66;
  --light-text: #648077;
  --line: #e3ebe7;
  --rule: #edf2ef;
  --brand: #08785f;
  --brand-dark: #08624f;
  --mint: #e5f4ee;
  --radius: 15px;
  --shadow: 0 2px 4px rgba(25, 55, 45, .025);
  --sidebar: 238px;
  font-family: "Inter", "PingFang TC", "Noto Sans CJK TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, textarea, select, [tabindex] { outline-offset: 3px; }
:focus-visible { outline: 2px solid #168d73; }
a { color: var(--brand-dark); }
button svg, a svg { flex: none; }
h1, h2, h3, p { margin: 0; }
b, strong { font-weight: 670; }

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; overflow-y: auto; background: var(--white); border-right: 1px solid var(--line); z-index: 5; }
.brand { display: flex; align-items: center; gap: 11px; width: fit-content; text-align: left; padding: 0; margin: 24px 23px 21px; border: 0; background: none; }
.brand img { display: block; flex: none; border-radius: 10px; }
.brand b, .brand small { display: block; }
.brand b { font-size: 20px; line-height: 1.15; letter-spacing: -.055em; font-weight: 780; }
.brand small { font-size: 12px; color: var(--muted); letter-spacing: .12em; margin-top: 4px; }
.sidebar nav { padding: 0 15px 22px; }
.nav-group + .nav-group { margin-top: 23px; }
.nav-label { margin: 0 11px 8px; color: #6f827c; font-size: 12px; font-weight: 680; letter-spacing: .09em; }
.nav-item { position: relative; display: flex; width: 100%; align-items: center; border: 1px solid transparent; gap: 11px; text-align: left; border-radius: 9px; min-height: 43px; padding: 7px 10px; margin: 2px 0; background: transparent; color: #526661; font-size: 15px; font-weight: 565; }
.nav-item:hover { background: #f3f8f5; color: var(--brand-dark); }
.nav-item.nav-active { background: #e5f4ed; border-color: #e4f2eb; color: #07624f; font-weight: 720; }
.nav-item.nav-active::before { content: ""; height: 15px; width: 3px; position: absolute; top: 13px; left: -1px; background: #168670; border-radius: 2px; }
.nav-count { margin-left: auto; min-width: 22px; padding: 0 5px; border-radius: 6px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: #186654; background: #e8f2ee; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; margin: auto 18px 0; padding: 16px 5px 18px; border-top: 1px solid var(--line); font-size: 14px; }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot small { color: var(--muted); font-size: 12px; }
.region-indicator { height: 34px; width: 34px; display: grid; place-items: center; font-size: 12px; font-weight: 760; border-radius: 9px; border: 1px solid var(--line); background: #f5f9f7; color: var(--brand-dark); }
.content-shell { min-width: 0; }
.topbar { height: 70px; position: sticky; top: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 31px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .98); }
.breadcrumbs, .topbar-actions { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.breadcrumbs { color: var(--muted); font-size: 14px; }
.breadcrumbs svg { color: #849591; }
.breadcrumbs strong { color: var(--ink); }
.topbar-actions { gap: 18px; }
.mode-switch { display: flex; align-items: center; gap: 3px; padding: 3px; background: #f0f5f2; border: 1px solid #e7eeea; border-radius: 9px; }
.mode-switch button { display: flex; align-items: center; gap: 5px; border: 0; padding: 4px 10px; border-radius: 6px; color: #5c706a; background: none; font-size: 13px; font-weight: 620; }
.mode-switch button:hover { color: var(--brand-dark); }
.mode-switch .mode-active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 3px rgba(14, 69, 48, .11); }
.profile-menu { position: relative; }
.profile-toggle { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; text-align: left; padding: 3px 0 3px 3px; }
.profile-toggle span:nth-child(2) { max-width: 145px; overflow: hidden; }
.profile-toggle strong, .profile-toggle small { display: block; overflow: hidden; text-overflow: ellipsis; }
.profile-toggle strong { font-size: 14px; line-height: 1.35; }
.profile-toggle small { color: var(--muted); font-size: 12px; }
.profile-toggle svg { color: #607a71; margin-left: 3px; }
.menu-scrim { position: fixed; inset: 0; background: none; border: 0; cursor: default; z-index: 1; }
.profile-dropdown { z-index: 2; position: absolute; top: calc(100% + 9px); right: 0; min-width: 158px; padding: 5px; border: 1px solid var(--line); background: var(--white); border-radius: 10px; box-shadow: 0 10px 24px rgba(12, 55, 46, .12); }
.profile-dropdown button, .profile-dropdown a { display: block; width: 100%; border: 0; border-radius: 6px; background: none; padding: 8px 12px; color: var(--ink); text-align: left; text-decoration: none; font-size: 14px; }
.profile-dropdown button:hover, .profile-dropdown a:hover { background: var(--mint); color: var(--brand-dark); }
.mobile-menu, .mobile-scrim { display: none !important; }

.main-content { max-width: 1600px; margin: 0 auto; padding: 27px 31px 38px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; min-height: 68px; }
.page-intro h1, .error-card h1 { font-size: clamp(1.75rem, 2.75vw, 2.15rem); line-height: 1.25; letter-spacing: -.035em; font-weight: 770; }
.page-intro p { margin-top: 7px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: none; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid transparent; padding: 9px 13px; min-height: 39px; border-radius: 8px; text-decoration: none; font-size: 14px; font-weight: 665; line-height: 1.3; transition: background .14s, border-color .14s, box-shadow .14s; }
.button-primary { color: #fff; background: var(--brand); border-color: var(--brand); box-shadow: 0 1px 2px rgba(13, 81, 67, .12); }
.button-primary:hover:not(:disabled) { background: var(--brand-dark); border-color: var(--brand-dark); }
.button-secondary { color: #27423b; background: var(--white); border-color: #dbe7e2; box-shadow: var(--shadow); }
.button-secondary:hover:not(:disabled) { background: #f1f8f5; border-color: #c8e1d8; }
.button-quiet { color: var(--muted); background: transparent; }
.button-quiet:hover:not(:disabled) { color: var(--brand-dark); background: var(--mint); }
.button-small { min-height: 32px; padding: 5px 9px; font-size: 13px; }
.button-icon { padding: 0; width: 36px; min-height: 36px; }
.button-danger { background: #a23b35; border-color: #a23b35; color: white; }
.button-danger:hover:not(:disabled) { background: #822b26; border-color: #822b26; }

.filter { position: relative; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid #dbe7e2; border-radius: 8px; color: #28463d; background: #fff; box-shadow: var(--shadow); }
.filter > svg:first-child { position: absolute; left: 11px; z-index: 1; pointer-events: none; color: #5e796f; }
.filter select, .field-select select { appearance: none; border: 0; background: transparent; border-radius: inherit; width: 100%; }
.filter select { min-height: 37px; padding: 7px 35px 7px 11px; font-size: 14px; font-weight: 635; cursor: pointer; }
.filter-calendar select { padding-left: 36px; }
.filter-chevron { position: absolute; right: 10px; color: #547469; pointer-events: none; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat { padding: 15px 17px 15px; min-height: 125px; }
.stat-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; font-weight: 660; }
.stat-icon { flex: none; display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; }
.stat-mint { background: #e4f4eb; color: #097456; }
.stat-teal { background: #e2f2ee; color: #087765; }
.stat-blue { background: #eaf1fa; color: #42658a; }
.stat-amber { background: #fbf3e2; color: #8d5b13; }
.stat > strong { display: block; font-size: clamp(1.4rem, 2.16vw, 1.78rem); font-weight: 765; letter-spacing: -.055em; line-height: 1.1; font-variant-numeric: tabular-nums; margin-top: 3px; overflow-wrap: anywhere; }
.stat-sub { display: flex; gap: 6px; flex-wrap: wrap; color: var(--muted); align-items: center; font-size: 13px; margin-top: 10px; }
.positive, .negative { display: inline-flex; gap: 4px; align-items: center; font-weight: 680; }
.positive { color: #087459; }
.negative { color: #a03e37; }
.warm { color: #86540d; font-weight: 670; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.93fr) minmax(0, 1fr); gap: 16px; margin-top: 17px; align-items: stretch; }
.dashboard-bottom { align-items: start; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 17px 14px; }
.card-head h2 { font-weight: 720; font-size: 17px; line-height: 1.4; letter-spacing: -.015em; }
.card-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.performance, .distribution { min-height: 266px; }
.chart-key { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; color: var(--muted); font-size: 13px; }
.chart-key i, .donut-legend i { width: 9px; height: 9px; border-radius: 3px; background: #14907a; flex: none; }
.bar-chart { display: grid; grid-template-columns: 38px minmax(0, 1fr); margin: 4px 17px 16px; }
.bar-axis { grid-column: 1; height: 152px; display: flex; flex-direction: column; justify-content: space-between; color: #657c74; font-size: 11px; text-align: left; font-variant-numeric: tabular-nums; }
.bar-field { height: 179px; position: relative; }
.bar-grid { position: absolute; inset: 8px 0 32px 0; display: flex; flex-direction: column; justify-content: space-between; }
.bar-grid i { border-top: 1px dashed #e1eae5; }
.bar-grid i:last-child { border-top: 1px solid #dae7e0; }
.bar-columns { position: relative; height: 100%; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); padding: 0 1%; }
.bar-column { display: flex; align-items: center; flex-direction: column; min-width: 0; }
.bar-lane { width: 100%; height: 147px; padding-top: 8px; display: flex; align-items: flex-end; justify-content: center; }
.bar { position: relative; display: block; width: min(42px, 69%); padding: 0; border: 0; border-radius: 5px 5px 1px 1px; background: #b5ddd1; }
.bar:hover, .bar:focus-visible { background: #62b4a0; }
.bar-current, .bar-current:hover, .bar-current:focus-visible { background: #0e806b; }
.bar-label { color: #60766e; white-space: nowrap; font-size: 12px; padding-top: 8px; }
.bar-label.active { color: #0d735d; font-weight: 720; }
.bar-tooltip { position: absolute; display: none; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); padding: 5px 7px; border-radius: 5px; background: #142b25; color: #fff; font-size: 12px; white-space: nowrap; z-index: 1; }
.bar:hover .bar-tooltip, .bar:focus-visible .bar-tooltip { display: block; }
.donut-layout { min-height: 178px; display: flex; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); padding: 6px 15px 20px; }
.donut { display: grid; place-items: center; flex: none; width: clamp(103px, 10.8vw, 144px); aspect-ratio: 1; border-radius: 50%; }
.donut > div { display: grid; place-content: center; width: 70%; height: 70%; text-align: center; border-radius: 50%; background: #fff; }
.donut strong { letter-spacing: -.05em; line-height: 1.1; font-size: 31px; }
.donut small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.donut-legend { flex: 1; max-width: 135px; }
.donut-legend div { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 7px; font-size: 13px; white-space: nowrap; margin: 8px 0; color: var(--muted); }
.donut-legend b { color: #243f36; font-size: 14px; }
.chart-key i { align-self: center; }

.table-scroll { overflow-x: auto; width: 100%; scrollbar-color: #c2d7ce #f2f6f4; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: 14px; }
th { font-size: 13px; color: #516b61; white-space: nowrap; font-weight: 665; background: #f7faf8; }
th, td { padding: 10px 15px; border-bottom: 1px solid var(--rule); }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
tr:last-child td { border-bottom: 0; }
td { color: #29423a; min-height: 46px; }
tbody tr:hover { background: #f9fcfa; }
.listing { overflow: hidden; }
.listing :is(table) { min-width: 570px; }
.recent table { min-width: 478px; }
.recent { overflow: hidden; }
.recent .card-head { padding-top: 14px; padding-bottom: 12px; }
.tasks .card-head { padding-bottom: 6px; }
.task-list { padding: 0 13px 10px; }
.task { display: flex; text-align: left; width: 100%; gap: 10px; align-items: center; border: 0; border-bottom: 1px solid var(--rule); background: none; padding: 12px 4px; }
.task:hover { color: var(--brand-dark); background: #f8fbf9; }
.task:last-child { border-bottom: 0; }
.task strong, .task small { display: block; }
.task strong { font-size: 14px; line-height: 1.35; }
.task small { color: var(--muted); font-size: 13px; margin-top: 2px; }
.task-count { margin-left: auto; border-radius: 6px; padding: 2px 8px; background: #e9f4ef; color: #126751; font-size: 13px; font-weight: 720; }
.avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none; font-weight: 700; font-size: 16px; }
.avatar-small { width: 32px; height: 32px; font-size: 13px; }
.avatar-mint { background: #dff2e8; color: #19765c; }
.avatar-blue { background: #e5eefb; color: #3c6690; }
.avatar-violet { background: #efebf9; color: #665295; }
.avatar-sand { background: #f6ebd9; color: #78591d; }
.person { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.person b { font-size: 14px; }
.person small, .stack small { display: block; color: var(--muted); font-size: 12px; }
.member-email { margin-left: 39px; }
.stack { line-height: 1.45; }
.stack small { margin-top: 2px; }
.code, .money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-button { border: 0; padding: 0; background: none; font-weight: 680; font-size: inherit; color: #0b6f58; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 3px; }
.tag { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; padding: 3px 8px; border-radius: 5px; font-size: 12px; font-weight: 675; line-height: 1.3; }
.tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; opacity: .73; }
.tag-green, .tag-mint { background: #e4f4e9; color: #0d6b50; }
.tag-mint { background: #e7f5f1; color: #067361; }
.tag-blue { color: #3a5e83; background: #e9f1fb; }
.tag-amber { color: #85560e; background: #fbf1dc; }
.tag-grey { color: #5a6e68; background: #eef2f0; }
.tag-red { color: #a23430; background: #faeeed; }

.table-tools { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.search { position: relative; display: flex; align-items: center; background: #fff; width: min(100%, 280px); color: var(--muted); }
.search input { width: 100%; padding: 8px 11px 8px 34px; min-height: 39px; border: 1px solid #dbe7e2; border-radius: 8px; background: #fff; font-size: 14px; }
.search svg { position: absolute; left: 11px; pointer-events: none; }
.search input::placeholder { color: #667d74; }
.result-count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.pagination { display: flex; gap: 10px; justify-content: space-between; align-items: center; border-top: 1px solid var(--rule); padding: 11px 16px; font-size: 13px; color: var(--muted); }
.pagination > div { display: flex; gap: 7px; }
.pagination .button-icon { width: 30px; min-height: 30px; }
.empty { padding: 30px 17px; display: grid; justify-items: center; text-align: center; gap: 7px; }
.empty-icon { display: grid; place-items: center; width: 47px; height: 47px; color: #4e7a6d; background: #eff6f2; border-radius: 11px; margin-bottom: 2px; }
.empty strong { font-size: 16px; }
.empty p { color: var(--muted); font-size: 14px; }
.empty .button { margin-top: 3px; }
.network-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 15px; gap: 13px; }
.mini-stat { display: flex; gap: 11px; align-items: center; padding: 14px 15px; }
.mini-stat small, .mini-stat b { display: block; }
.mini-stat small { color: var(--muted); font-size: 13px; }
.mini-stat b { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.tree-member { display: flex; align-items: center; gap: 3px; padding-left: calc(var(--indent, 0) * 15px); }
.tree-control { padding: 0; width: 25px; min-height: 27px; color: #0f6b56; }
.tree-leaf { width: 25px; height: 10px; position: relative; }
.tree-leaf::after { position: absolute; width: 10px; border-top: 1px solid #a7c8ba; content: ""; left: 8px; top: 5px; }
.member-hero { display: flex; gap: 14px; justify-content: space-between; align-items: center; border-radius: var(--radius); color: #fff; padding: 22px; background: linear-gradient(110deg,#104a3f 0%,#0d735e 90%); margin-bottom: 16px; }
.membership { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.member-hero-name { font-size: 20px; font-weight: 750; }
.member-hero-code { color: #ddf2e9; letter-spacing: .04em; font-size: 13px; }
.member-hero-tags { display: flex; align-items: center; gap: 6px; }
.member-hero-button { color: #fff; border-color: #79bfab; background: rgba(255,255,255,.09); }
.member-hero-button:hover { background: rgba(255,255,255,.18); }
.member-rule-list { display: flex; flex-direction: column; padding: 0 17px 10px; }
.member-rule-list > div { display: flex; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.member-rule-list > div:last-child { border-bottom: 0; }
.member-rule-list svg { color: #0c735c; flex: none; }
.member-rule-list strong, .member-rule-list small { display: block; }
.member-rule-list strong { font-size: 14px; }
.member-rule-list small { margin-top: 2px; color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 5px; align-items: center; border-bottom: 1px solid #dfe9e5; margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 8px 13px 11px; color: var(--muted); font-weight: 650; white-space: nowrap; font-size: 14px; background: transparent; border: 0; border-bottom: 2px solid transparent; }
.tab:hover, .tab.active { color: #08664f; }
.tab.active { border-color: #0e856a; }
.configuration { padding-bottom: 14px; }
.closing-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 11px; padding: 3px 17px 3px; }
.closing-form .field { flex: 0 1 204px; }
.closing-form .button { margin-bottom: 1px; }
.configuration > .form-error { margin: 9px 17px 0; }
.settlement-preview { margin-top: 17px; overflow: hidden; }
.settlement-preview > .inline-note { margin: 10px 16px 12px; }
.settlement-facts { display: flex; flex-wrap: wrap; margin: 1px 16px 12px; border: 1px solid var(--line); border-radius: 9px; background: #f7faf8; }
.settlement-facts > div { flex: 1 0 140px; padding: 10px 13px; border-right: 1px solid var(--line); }
.settlement-facts > div:last-child { border: 0; }
.settlement-facts b, .settlement-facts small { display: block; }
.settlement-facts small { color: var(--muted); font-size: 13px; }
.settlement-facts b { font-size: 17px; margin-top: 3px; }
.calendar-fact { display: flex; gap: 11px; padding: 12px 17px; }
.calendar-fact p { color: var(--muted); font-size: 14px; }
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.policy { overflow: hidden; }
.policy table { min-width: 350px; }
.policy-copy { padding: 10px 17px 16px; color: #49625a; font-size: 15px; }
.policy-copy h3 { color: var(--ink); font-size: 15px; margin: 10px 0 4px; }
.policy-copy h3:first-child { margin-top: 0; }
.policy-copy p + p { margin-top: 8px; }

dialog { border: 1px solid #dbe8e2; border-radius: 16px; padding: 0; box-shadow: 0 18px 65px rgba(8, 43, 32, .22); color: var(--ink); width: min(100% - 28px, 510px); max-width: none; max-height: calc(100dvh - 32px); }
dialog.dialog-wide { width: min(100% - 28px, 750px); }
dialog::backdrop { background: rgba(15, 39, 33, .53); }
.dialog-content { padding: 20px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 8px; margin-bottom: 14px; }
.dialog-heading h2 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.dialog-heading p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.dialog-heading .button { margin: -3px -4px 0 0; }
.dialog-form { display: flex; flex-direction: column; gap: 12px; }
.dialog-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; justify-content: flex-end; padding-top: 4px; }
.dialog-actions:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span:first-child { color: #2c4940; font-weight: 670; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
.field input, .field textarea, .field select { border: 1px solid #cfdfd8; border-radius: 7px; background: #fff; min-height: 39px; padding: 7px 10px; font-size: 15px; width: 100%; }
.field textarea { resize: vertical; }
.field-select { position: relative; display: block; }
.field-select select { appearance: none; padding-right: 31px; }
.field-select svg { position: absolute; right: 11px; top: 12px; pointer-events: none; color: #476e60; }
.inline-note, .form-error { font-size: 14px; border-radius: 8px; padding: 9px 11px; overflow-wrap: anywhere; }
.inline-note { background: #edf6f1; color: #355f50; }
.form-error { color: #8e302e; background: #fff0ed; border: 1px solid #f6d7d4; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border: 1px solid var(--line); background: var(--line); border-radius: 9px; overflow: hidden; }
.detail-grid > div { min-width: 0; display: grid; align-content: start; justify-items: start; gap: 3px; background: #fbfdfc; padding: 10px 11px; overflow-wrap: anywhere; }
.detail-grid small { color: var(--muted); font-size: 13px; }
.detail-grid b { max-width: 100%; font-size: 14px; }
.profile-line { display: flex; align-items: center; gap: 9px; }
.profile-line > .tag { margin-left: auto; }
.profile-line strong, .profile-line small { display: block; }
.profile-line small { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.toast { z-index: 9; position: fixed; bottom: 20px; right: 20px; box-shadow: 0 9px 25px rgba(12, 64, 44, .18); display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 12px; max-width: min(470px, 95vw); color: #0a624d; border: 1px solid #c4e2d6; background: #f1fbf5; border-radius: 10px; font-size: 14px; }
.toast > svg { flex: none; }
.toast .button { min-height: 30px; width: 30px; margin-left: auto; flex: none; }
.access-page { min-height: 100dvh; display: grid; place-items: center; padding: 17px; background: radial-gradient(ellipse at top, #d5efe6, transparent 60%), #f4f7f6; }
.access-card { width: min(100%, 430px); background: #fff; border: 1px solid var(--line); border-radius: 17px; padding: 28px; box-shadow: 0 16px 42px rgba(28, 80, 65, .08); }
.access-card h1 { font-size: 24px; margin-top: 10px; font-weight: 740; }
.access-card p { color: var(--muted); margin: 7px 0 17px; }
.error-card { padding: 22px; }
.error-card p { color: var(--muted); margin: 8px 0 15px; }
.skeleton { background: #e8f0eb; border-radius: 12px; }
.skeleton-title { width: min(290px, 70%); height: 48px; margin: 14px 0 25px; }
.skeleton-tile { height: 125px; }
.skeleton-chart { height: 250px; }

@media (min-width: 1600px) {
  .main-content { padding-inline: 40px; }
  .stat { padding-inline: 21px; }
}
@media (max-width: 1130px) {
  :root { --sidebar: 202px; }
  .topbar { padding-inline: 20px; }
  .main-content { padding-inline: 20px; }
  .stats-grid, .dashboard-grid { gap: 11px; }
  .stat { padding-inline: 12px; }
  .stat-head { font-size: 13px; }
  .stat-icon { width: 34px; height: 34px; }
  .donut-layout { padding-inline: 11px; }
}
@media (max-width: 950px) {
  :root { --sidebar: 172px; }
  .brand { margin-inline: 15px; }
  .sidebar nav { padding-inline: 10px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.6fr) minmax(225px, 1fr); }
  .main-content { padding-inline: 15px; }
  .card-head { padding-inline: 13px; }
  .donut-layout { gap: 12px; }
}
@media (max-width: 810px) {
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(260px, 85vw); transform: translateX(-100%); visibility: hidden; transition: transform .19s, visibility .19s; z-index: 7; }
  .sidebar.sidebar-open { transform: translateX(0); visibility: visible; }
  .mobile-menu { display: inline-flex !important; margin-left: -5px; }
  .mobile-scrim { display: block !important; position: fixed; padding: 0; border: 0; inset: 0; background: #1a342b67; z-index: 6; }
  .topbar { height: 60px; padding-inline: 14px; }
  .topbar-actions { gap: 10px; }
  .main-content { padding-top: 20px; }
  .stat > strong { font-size: clamp(1.24rem, 3vw, 1.7rem); }
  .brand { margin-inline: 22px; }
  .sidebar nav { padding-inline: 14px; }
}
@media (max-width: 615px) {
  .page-intro { flex-direction: column; align-items: flex-start; gap: 11px; margin-bottom: 14px; }
  .page-intro p { font-size: 14px; }
  .page-actions { flex: 0 1 auto; }
  .main-content { padding: 16px 11px 24px; }
  .stats-grid, .policy-grid, .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { gap: 9px; }
  .dashboard-grid, .policy-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
  .profile-toggle span:nth-child(2) { display: none; }
  .profile-toggle svg { margin-left: 0; }
  .breadcrumbs { gap: 5px; }
  .breadcrumbs > span { display: none; }
  .breadcrumbs > svg { display: none; }
  .topbar-actions { gap: 7px; }
  .topbar { gap: 7px; }
  .topbar .tag { display: none; }
  .stat { min-height: 108px; }
  .stat > strong { font-size: clamp(1.25rem, 5.15vw, 1.65rem); }
  .stat-head { font-size: 13px; }
  .stat-sub { font-size: 12px; margin-top: 8px; }
  .donut-layout { gap: 25px; }
  .donut { width: 123px; }
  .network-summary { gap: 7px; }
  .mini-stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
  .mini-stat b { font-size: 17px; }
  .table-tools { padding: 11px; }
  .result-count { margin-left: 0; padding-left: 2px; font-size: 12px; }
  .member-hero { flex-direction: column; align-items: flex-start; padding: 14px; }
  .profile-line > div { min-width: 0; }
  .mode-switch button { padding-inline: 7px; }
  .closing-form .field { flex: 1 1 160px; }
  .configuration .card-head { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.auth-message { margin: 0 0 13px; }
.auth-links { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.auth-links a { text-underline-offset: 3px; }
.profile-dropdown form { margin: 0; }
.transfer-card { width: min(100%, 610px); }
.transfer-card h2 { font-size: 18px; margin: 14px 0 5px; }
.transfer-card .field input[type="file"] { min-height: 46px; }
.transfer-card .inline-note { margin: 10px 0; }
#activation-code[hidden] { display: none; }
