:root {
  color-scheme: light;
  --ink: #1a2332;
  --muted: #6b7785;
  --faint: #6b7785;
  --line: #e3e8ee;
  --panel: #fff;
  --bg: #eef2f6;
  --accent: #161e2e;
  --accent-hover: #1d2738;
  --purple-pale: #eef2f6;
  --nav: #161e2e;
  --green: #1f7a4d;
  --green-pale: #e5f6ec;
  --orange: #c27a12;
  --orange-pale: #fff6e8;
  --red: #b42318;
  --red-pale: #fde8e6;
  --blue: #4f46e5;
  --blue-pale: #eef0ff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(12, 45, 72, .08);
  font: 14px/1.5 "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid #8a73fb; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
svg { width: 1.25rem; height: 1.25rem; flex: none; vertical-align: middle; }
.skip { position: fixed; top: -5rem; left: .75rem; z-index: 20; background: white; padding: .75rem; }
.skip:focus { top: .75rem; }
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; z-index: 5; min-height: 0; overflow-y: auto; color: #d7e4ee; background: #161e2e; padding: 14px 10px; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; color: white; }
.brand-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #4f46e5; color: #fff; }
.brand-icon svg { width: 20px; height: 20px; }
.brand strong { display: block; font-size: 15px; letter-spacing: 0; line-height: 1.3; font-weight: 700; }
.brand small { display: block; margin-top: 2px; color: #9bb0bf; font-size: 12px; letter-spacing: 0; white-space: nowrap; }
.navigation { border-top: 0; padding-top: 8px; }
.nav-label { color: #7d8b9a; font-size: 11px; margin: 0 0 4px 12px; letter-spacing: .04em; }
.nav-group { margin-bottom: 8px; }
.nav-link { min-height: 34px; display: flex; align-items: center; gap: 8px; margin-bottom: 2px; padding: 0 10px; border-radius: 10px; color: #c5d0db; font-size: 13px; }
.nav-link:hover { color: white; background: rgba(255,255,255,.06); }
.nav-link[aria-current="page"] { background: #4f46e5; color: #fff; box-shadow: none; font-weight: 650; }
.nav-link[aria-current="page"] svg { color: #fff; }
.nav-link svg { width: 18px; height: 18px; }
.nav-number { margin-left: auto; min-width: 22px; border-radius: 5px; padding: 1px 5px; background: #ffffff13; text-align: center; font-size: .75rem; color: #e1d7ff; }
.sidebar-end { margin-top: auto; padding-top: 12px; }
.sidebar-mode { width: 100%; display: flex; align-items: center; gap: 8px; border: 1px solid #ffffff19; border-radius: 8px; background: #ffffff08; color: #d8cef9; padding: 8px 10px; margin-bottom: 14px; font-size: .79rem; text-align: left; }
.sidebar-mode:hover { background: #ffffff14; }
.sidebar-mode svg { width: 16px; height: 16px; }
.sidebar-profile { display: flex; align-items: center; gap: 10px; border-top: 1px solid #ffffff15; padding: 14px 5px 3px; }
.avatar { flex: none; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 10px; background: #dedaef; color: #543e9d; font-weight: 800; font-size: .88rem; }
.sidebar-profile .avatar { background: #3a315d; color: #e7dbff; }
.profile-copy { overflow: hidden; }
.profile-copy b, .profile-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy b { color: white; font-size: .86rem; }
.profile-copy small { color: #b8b6cc; font-size: .75rem; }
.workspace { min-width: 0; }
.topbar { height: 58px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); background: white; }
.breadcrumbs, .top-actions { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breadcrumbs { color: var(--faint); font-size: .88rem; }
.breadcrumbs strong { color: #31364a; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumbs svg { width: .9rem; height: .9rem; }
.role-trigger { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px 5px 6px; display: flex; align-items: center; gap: 7px; color: #373951; font-size: .85rem; white-space: nowrap; }
.role-trigger:hover { background: #f9f7ff; border-color: #e4dcfb; }
.role-trigger .avatar { width: 26px; height: 26px; border-radius: 6px; font-size: .8rem; }
.role-trigger svg { width: 15px; height: 15px; color: var(--muted); }
.demo-label { display: inline-flex; align-items: center; gap: 5px; color: #1a2332; font-size: 13px; padding: 4px 8px; background: #eef2f6; border-radius: 8px; white-space: nowrap; }
.who { color: var(--muted); font-size: 13px; }
.who b { color: var(--ink); }
.mobile-toggle { display: none !important; }
#content { max-width: 1690px; padding: 18px 20px 28px; margin: 0 auto; outline: none; }
.boot, .setup { display: grid; justify-items: start; align-content: center; gap: 12px; min-height: 250px; padding: 35px; }
.boot p, .setup p { max-width: 560px; color: var(--muted); }
.setup h1 { font-size: 1.8rem; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 21px; }
.page-head h1 { font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.subtitle { font-size: .88rem; color: var(--muted); margin-top: 5px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 39px; border: 1px solid transparent; border-radius: 8px; padding: 7px 13px; font-size: .875rem; line-height: 1.3; font-weight: 700; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.button.primary { background: #161e2e; color: #fff; box-shadow: none; }
.button.primary:hover { background: #1d2738; }
.button.secondary { background: white; border-color: #dfe2ef; color: #3f4059; }
.button.secondary:hover { background: #faf8ff; border-color: #d7cadf; }
.button.ghost { background: transparent; color: var(--accent); padding-inline: 4px; }
.button.ghost:hover { color: var(--accent-hover); text-decoration: underline; }
.button.danger { background: white; color: var(--red); border-color: #efcad4; }
.button.danger:hover { background: #fdf1f4; }
.button.on-hero { align-self: start; margin-top: 13px; min-height: 32px; padding: 6px 11px; border-color: #ffffff5e; color: white; background: #ffffff12; font-size: .81rem; }
.button.on-hero:hover { background: #ffffff24; }
.hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 120px; overflow: hidden; border-radius: var(--radius); margin-bottom: 16px; padding: 18px 20px; color: #fff; background: #161e2e; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; max-width: 68%; display: grid; justify-items: start; }
.hero h2 { font-size: clamp(1.38rem, 2.4vw, 1.84rem); line-height: 1.24; letter-spacing: .025em; }
.hero p { margin-top: 6px; font-size: .87rem; color: #f1ebff; }
.hero-art { position: absolute; inset: 0 0 0 auto; width: 43%; max-width: 460px; color: #f4eaff; pointer-events: none; }
.hero-art::before, .hero-art::after { position: absolute; content: ""; width: 305px; height: 305px; border: 1px solid #ffffff24; border-radius: 50%; top: -65px; right: -28px; }
.hero-art::after { width: 392px; height: 392px; top: -109px; right: -72px; box-shadow: inset 0 0 70px #e2d0ff14, 0 0 80px #b29bff21; }
.hero-sheet { position: absolute; z-index: 1; top: 15%; right: 18%; width: 182px; height: 132px; padding: 14px; display: grid; gap: 8px; border-radius: 14px; border: 1px solid #ffffff5a; background: linear-gradient(135deg, #ffffff31, #cbb6ff20); transform: rotate(-10deg); box-shadow: 0 11px 24px #34228052, inset 0 1px 0 #ffffff35; }
.hero-sheet::before { content: ""; position: absolute; z-index: -1; inset: 13px -15px -13px 15px; border: 1px solid #ffffff2c; border-radius: 13px; background: #9f86f536; }
.sheet-line { height: 15px; display: flex; align-items: center; gap: 8px; }
.sheet-line i { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 4px; background: #f5e9ff4f; }
.sheet-line i svg { width: 11px; height: 11px; }
.sheet-line b { display: block; height: 5px; border-radius: 6px; width: 51px; background: #ede1ff85; }
.sheet-line:nth-child(2) b { width: 81px; opacity: .8; }
.sheet-line:nth-child(3) b { width: 63px; opacity: .65; }
.sheet-bars { display: flex; gap: 6px; align-items: end; position: absolute; bottom: 13px; right: 15px; }
.sheet-bars span { width: 9px; border-radius: 4px 4px 1px 1px; background: #d2baffad; height: 12px; }
.sheet-bars span:nth-child(2) { height: 20px; }
.sheet-bars span:nth-child(3) { height: 30px; background: #f4e9ffdb; }
.hero-coin { position: absolute; right: 13%; bottom: 15%; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #c3aaff77; box-shadow: inset 0 0 0 1px #fff7, 0 4px 9px #4930ac36; z-index: 2; font: 700 22px/1 Georgia, serif; }
.hero-spark { color: #e4d5ff; font-size: 20px; position: absolute; right: 66%; top: 28%; }
.hero-spark.second { right: 12%; top: 16%; font-size: 12px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }
.panel, .metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric { padding: 14px 14px 13px; min-width: 0; }
.metric-top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; font-weight: 650; }
.icon-box { width: 32px; height: 32px; border-radius: 8px; display: inline-grid; place-items: center; flex: none; }
.icon-box svg { width: 17px; height: 17px; }
.tone-green { background: var(--green-pale); color: var(--green); }
.tone-orange { background: var(--orange-pale); color: var(--orange); }
.tone-purple { background: var(--purple-pale); color: var(--accent); }
.tone-blue { background: var(--blue-pale); color: var(--blue); }
.tone-red { background: var(--red-pale); color: var(--red); }
.metric-value { display: block; overflow-wrap: anywhere; margin-top: 6px; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.metric-help { display: block; color: var(--faint); font-size: .76rem; margin-top: 6px; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 17px; align-items: start; }
.panel { min-width: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 15px 16px 10px; min-height: 54px; }
.panel-title h2 { font-size: 1.06rem; font-weight: 800; }
.panel-title p { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 0 15px 10px; }
.tab { border: 0; border-radius: 7px; padding: 5px 10px; color: var(--muted); background: transparent; font-size: .83rem; font-weight: 650; }
.tab:hover { background: #eef2f6; }
.tab[aria-pressed="true"] { background: #161e2e; color: #fff; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
thead { color: #6b7785; background: #f7f9fb; white-space: nowrap; }
th { padding: 7px 8px; font-size: 12px; font-weight: 600; }
td { padding: 7px 8px; height: auto; border-top: 1px solid #e3e8ee; }
th:first-child, td:first-child { padding-left: 12px; }
th:last-child, td:last-child { padding-right: 12px; }
tbody tr:hover { background: #fafcfe; }
.record-name { display: flex; align-items: center; gap: 8px; min-width: 132px; max-width: 340px; }
.record-name .icon-box { width: 30px; height: 30px; border-radius: 7px; }
.record-name .icon-box svg { width: 15px; height: 15px; }
.record-name b, .record-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-name div { min-width: 0; }
.record-name b { font-size: .86rem; font-weight: 750; }
.record-name small { color: var(--faint); margin-top: 2px; font-size: .76rem; }
.table-title { border: 0; text-align: left; padding: 0; background: transparent; color: var(--ink); display: block; min-width: 0; max-width: 100%; }
.table-title:hover { color: var(--accent); text-decoration: underline; }
.record-kind { color: var(--muted); white-space: nowrap; }
.amount { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount.receipt { color: var(--green); }
.status { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; padding: 3px 7px; border-radius: 6px; font-size: .76rem; line-height: 1.3; font-weight: 750; }
.status i, .state-title i { display: inline-block; width: 5px; height: 5px; flex: none; border-radius: 50%; background: currentColor; }
.record-date { white-space: nowrap; color: var(--faint); font-size: .79rem; font-variant-numeric: tabular-nums; }
.table-action { background: transparent; border: 0; color: #161e2e; padding: 4px; font-size: 13px; white-space: nowrap; }
.table-action:hover { color: var(--accent); text-decoration: underline; }
.flow { padding: 1px 15px 12px; }
.flow-row { position: relative; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; min-height: 57px; padding: 3px 0; }
.flow-row:not(:last-child)::after { content: ""; width: 1px; height: 25px; position: absolute; top: 44px; left: 15px; background: #e9e5f4; }
.flow-row strong, .flow-row small { display: block; }
.flow-row strong { font-size: .86rem; }
.flow-row small { color: var(--faint); font-size: .74rem; white-space: nowrap; }
.flow-count { border: 0; border-radius: 6px; min-width: 27px; background: #eef2f6; color: #161e2e; padding: 3px 5px; font-size: 13px; font-weight: 700; }
.flow-count:hover { background: #e3e8ee; }
.flow-footer { border-top: 1px solid var(--line); padding: 6px 15px; }
.filterbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 5px 16px 14px; }
.filterbar .search { min-width: 180px; flex: 1 1 235px; max-width: 360px; position: relative; }
.search svg { position: absolute; left: 10px; top: 10px; color: var(--faint); width: 17px; height: 17px; pointer-events: none; }
.search input { padding-left: 36px; }
.filterbar select { width: auto; min-width: 145px; }
input:not([type="file"]), textarea, select { width: 100%; min-width: 0; color: var(--ink); border: 1px solid #dfe2ee; border-radius: 8px; background-color: white; padding: 8px 10px; font-size: .88rem; line-height: 1.42; }
input::placeholder, textarea::placeholder { color: #8b92a4; }
input:not([type="file"]):focus, textarea:focus, select:focus { outline: 2px solid #e1d8fb; outline-offset: 0; border-color: #9f8de6; }
select { appearance: none; padding-right: 29px; background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%235b647b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
textarea { min-height: 83px; resize: vertical; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty .icon-box { margin: 0 auto 9px; }
.empty h3 { color: var(--ink); font-size: 1rem; }
.empty p { margin-top: 3px; font-size: .85rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); }
.pagination div { display: flex; gap: 5px; }
.pagination .button { min-height: 30px; font-size: .77rem; padding: 4px 8px; }
dialog { width: min(668px, calc(100% - 28px)); max-height: min(90dvh, 830px); padding: 0; border: 0; border-radius: 16px; background: white; box-shadow: 0 17px 65px #13172c53; color: var(--ink); }
dialog::backdrop { background: #17162d72; backdrop-filter: blur(2px); }
dialog.compact { width: min(445px, calc(100% - 28px)); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: start; justify-content: space-between; gap: 12px; background: white; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.27rem; overflow-wrap: anywhere; }
.dialog-head p { color: var(--muted); font-size: .83rem; margin-top: 3px; }
.icon-button { display: inline-grid; place-items: center; flex: none; width: 35px; height: 35px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); }
.icon-button:hover { color: var(--ink); background: #f3f1f9; }
.dialog-body { padding: 16px 20px 19px; }
.dialog-foot { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; background: white; border-top: 1px solid var(--line); padding: 11px 20px; }
.form-grid, .detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; align-content: start; gap: 4px; min-width: 0; font-size: .88rem; font-weight: 650; color: #353b50; }
.field small { color: var(--muted); font-weight: 400; font-size: .79rem; }
.required { color: var(--red); }
.wide { grid-column: 1 / -1; }
.allocation { border: 1px solid #e8e1f8; border-radius: 10px; background: #faf8ff; padding: 11px; display: grid; gap: 9px; }
.allocation h3 { font-size: .95rem; }
.alloc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.balance { color: var(--muted); font-size: .81rem; }
.balance.balanced { color: var(--green); }
.balance.unbalanced { color: var(--red); }
.file-pick { position: relative; min-height: 67px; padding: 9px; display: grid; align-content: center; justify-items: center; gap: 3px; border: 1px dashed #b9a6e9; border-radius: 9px; background: #fbf9ff; cursor: pointer; color: var(--accent); text-align: center; }
.file-pick input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-pick:focus-within { outline: 2px solid #a693e7; }
.file-pick svg { width: 16px; height: 16px; }
.file-list { display: grid; gap: 5px; padding: 0; margin: 0; list-style: none; }
.file-list li { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 7px; background: #f6f6fa; min-width: 0; font-size: .83rem; }
.file-list li a, .file-list li .filename { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-list li a { color: var(--accent); }
.file-list li a:hover { text-decoration: underline; }
.file-list svg { width: 15px; height: 15px; color: var(--accent); }
.file-list li .remove-file { width: 25px; height: 25px; }
.form-error { padding: 7px 9px; border-radius: 6px; color: var(--red); background: #fbeef2; font-size: .85rem; overflow-wrap: anywhere; }
.detail-summary { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; border-radius: 10px; padding: 10px 12px; margin-bottom: 13px; background: #f7f5fc; }
.detail-summary strong { font-size: 1.42rem; font-variant-numeric: tabular-nums; }
.detail-grid { margin: 0; }
.detail-grid dt { font-size: .82rem; color: var(--faint); }
.detail-grid dd { margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .9rem; }
.detail-section { margin-top: 14px; display: grid; gap: 7px; }
.detail-section h3 { font-size: .98rem; }
.history { margin: 0; padding: 0; list-style: none; }
.history li { position: relative; padding: 0 0 11px 17px; margin-left: 5px; border-left: 1px solid #e5dff3; font-size: .85rem; }
.history li:last-child { border-color: transparent; padding-bottom: 0; }
.history li::before { position: absolute; content: ''; width: 8px; height: 8px; left: -4.5px; top: 5px; border-radius: 50%; background: #9e89e2; }
.history small, .history p { color: var(--muted); display: block; white-space: pre-wrap; overflow-wrap: anywhere; }
.role-list { display: grid; gap: 6px; }
.role-option { display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; text-align: left; padding: 7px 10px; min-height: 42px; }
.role-option:hover, .role-option[aria-pressed="true"] { background: #f6f1ff; border-color: #e2d6fb; color: var(--accent); }
.role-option span { margin-left: auto; color: var(--muted); font-size: .8rem; }
.toast-stack { position: fixed; right: 16px; bottom: 19px; max-width: min(calc(100% - 32px), 420px); z-index: 10; display: grid; gap: 7px; }
.toast { display: flex; align-items: start; gap: 7px; border: 1px solid #ded9f0; border-radius: 10px; background: white; box-shadow: 0 6px 25px #1b193924; padding: 10px 13px; color: var(--ink); font-size: .89rem; }
.toast svg { color: var(--green); }
.toast.error svg { color: var(--red); }
.member-form { padding: 4px 16px 16px; }
.member-form .form-grid { align-items: end; }
@media (max-width: 1170px) {
  .shell { grid-template-columns: 203px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .topbar { padding-inline: 24px; }
  #content { padding-inline: 24px; }
  .overview-grid { grid-template-columns: minmax(0, 1fr) 226px; gap: 12px; }
  .overview-grid .record-kind { display: none; }
  .hero-sheet { right: 17%; }
}
@media (max-width: 995px) {
  .overview-grid { grid-template-columns: 1fr; }
  .overview-grid .record-kind { display: table-cell; }
  .overview-grid .flow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
  .flow-row::after { display: none; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(260px, 80vw); transform: translateX(-101%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-shade { position: fixed; inset: 0; z-index: 4; background: #16172b65; border: 0; }
  .mobile-toggle { display: inline-grid !important; width: 33px; height: 33px; }
  .topbar { height: 55px; padding-inline: 13px; }
  .breadcrumbs { gap: 6px; }
  #content { padding: 19px 13px 25px; }
  .page-head { margin-bottom: 15px; }
  .hero { margin-bottom: 12px; }
  .metrics { gap: 8px; margin-bottom: 13px; }
}
@media (max-width: 530px) {
  .breadcrumb-parent, .breadcrumb-divider { display: none; }
  .top-actions { gap: 6px; }
  .role-trigger { font-size: .77rem; }
  .demo-label { font-size: .73rem; }
  .page-head { align-items: start; flex-direction: column; gap: 9px; }
  .page-actions { gap: 6px; }
  .hero { min-height: 142px; padding: 12px; }
  .hero-copy { max-width: 75%; }
  .hero h2 { font-size: 1.16rem; }
  .hero p { font-size: .8rem; }
  .hero-art { opacity: .58; width: 28%; }
  .hero-sheet { right: -32px; top: 20%; transform: scale(.67) rotate(-10deg); transform-origin: top right; }
  .hero-coin { right: 8px; bottom: 15%; width: 28px; height: 28px; font-size: 16px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 9px; }
  .metric-help { font-size: .74rem; }
  .overview-grid .record-kind, .overview-grid .record-date, .overview-grid .table-action-cell { display: none; }
  .record-name { max-width: 40vw; min-width: 0; }
  .record-name .icon-box { display: none; }
  th:first-child, td:first-child { padding-left: 10px; }
  th:last-child, td:last-child { padding-right: 10px; }
  th, td { padding-inline: 5px; }
  .dialog-head, .dialog-foot { padding-inline: 12px; }
  .dialog-body { padding-inline: 12px; }
  .form-grid { gap: 9px; }
  .alloc-fields { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) { *, *::after, *::before { scroll-behavior: auto !important; transition: none !important; } }

dialog.wide-dialog { width: min(1440px, calc(100% - 34px)); max-height: 92dvh; }
.sheet-form { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.sheet-form .field { min-width: 0; }
.sheet-form input[readonly] { background: #f8f8fb; color: var(--muted); }
.sheet-label { display: flex; gap: 12px; justify-content: space-between; align-items: center; border: 1px solid #a1d9dd; padding: 6px 10px; border-radius: 5px; min-height: 36px; }
.sheet-label h3 { font-size: .97rem; }
.income-label { background: #d5f7f7; color: #154c58; }
.payment-label { background: #d5f7f7; color: #92333c; }
.sheet-remark { padding: 8px 10px; background: #fff7ca; border: 1px solid #f1df86; border-radius: 6px; }
.sheet-remark textarea { min-height: 54px; background: #fffbed; }
.sheet-receipt-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; padding: 9px 10px; background: #e6f8fa; border: 1px solid #b8e2e5; border-radius: 6px; margin-bottom: 7px; }
.sheet-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); background: #ebfafb; border: 1px solid #b8e2e5; border-radius: 6px; overflow: hidden; }
.sheet-totals > div { min-width: 0; display: grid; align-content: center; gap: 2px; padding: 6px 8px; border-right: 1px solid #c2e3e6; }
.sheet-totals > div:last-child { border-right: 0; }
.sheet-totals span { font-size: .79rem; color: #405763; }
.sheet-totals strong { font-size: .94rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sheet-totals .out-of-balance, .out-of-balance { color: var(--red); font-weight: 750; }
.payment-totals { border-color: #b5d1ca; }
.payment-totals > div:nth-child(1) { background: #d9efb7; }
.payment-totals > div:nth-child(2) { background: #d2e8fc; }
.sheet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 5px; }
.sheet-toolbar h3 { font-size: .92rem; }
.sheet-toolbar .button { min-height: 31px; padding: 4px 10px; }
.sheet-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #aeb8c5; border-radius: 4px; background: white; }
.finance-sheet { width: 100%; min-width: 1020px; }
.finance-sheet.payment-columns { min-width: 1240px; }
.finance-sheet th, .finance-sheet td { padding: 5px 6px; border: 1px solid #c1c7d0; font-size: .8rem; }
.finance-sheet th:first-child, .finance-sheet td:first-child { padding-inline: 6px; text-align: center; min-width: 35px; }
.finance-sheet td { height: auto; vertical-align: top; overflow-wrap: anywhere; }
.finance-sheet th { color: #3d3342; padding-block: 7px; }
.income-columns th { background: #f7afad; }
.payment-columns th { background: #eef1f5; }
.finance-sheet td:first-child { padding-top: 11px; }
.finance-sheet tbody { counter-reset: sheetrow; }
.sheet-index::before { counter-increment: sheetrow; content: counter(sheetrow); }
.finance-sheet input:not([type="file"]) { min-width: 77px; font-size: .82rem; padding: 5px 6px; border-radius: 4px; }
.finance-sheet input + input { margin-top: 4px; }
.finance-sheet input[data-field="collaboratorEmail"], .finance-sheet input[data-field="account"] { min-width: 132px; }
.finance-sheet input[data-field="agency"] { min-width: 105px; }
.finance-sheet input[data-field="advanceNote"] { min-width: 85px; }
.finance-sheet input[data-field="advanceNote"]::placeholder { color: var(--faint); }
.finance-sheet td[data-summary="row-balance"] { white-space: nowrap; padding-top: 9px; }
.finance-sheet td small { display: block; color: var(--muted); }
.sheet-remove .button { min-height: 28px; font-size: .75rem; padding-block: 3px; }
.sheet-note { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.related-row { border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; font-size: .86rem; }
.related-row summary { cursor: pointer; }
.file-list .filename { text-align: left; color: var(--accent); white-space: normal; }
@media (max-width: 800px) {
  .sheet-form, .sheet-receipt-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  dialog.wide-dialog { width: calc(100% - 14px); }
  .sheet-totals strong { font-size: .82rem; }
}
.login-card { width: min(100%, 420px); margin: clamp(20px, 12vh, 125px) auto 0; padding: 24px; }
.login-heading { margin-bottom: 18px; }
.login-heading h1 { margin-top: 7px; font-size: 1.48rem; }
.login-heading p { margin-top: 4px; color: var(--muted); font-size: .87rem; }
.account-fields { display: grid; gap: 11px; }

.receipt-only-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.handoff-panel { margin-bottom: 16px; }
.handoff-panel .panel-title h2 .status { margin-left: 4px; vertical-align: middle; }
.handoff-empty { padding: 13px 16px 17px; color: var(--muted); font-size: .875rem; }
#payout-source-state { margin-top: 0; }

.talent-workspace .table-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; }
.talent-workspace .talent-search { display: block; position: relative; width: min(100%, 360px); }
.talent-workspace .talent-search input { width: 100%; padding-left: 36px; }
.talent-workspace .result-count { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.talent-workspace .person-link { display: inline-flex; align-items: center; gap: 9px; min-width: 9.5rem; }
.talent-workspace .person-link:hover b, :is(.talent-workspace, .talent-dialog) .text-link:hover { text-decoration: underline; }
:is(.talent-workspace, .talent-dialog) .text-link { color: var(--accent); font-weight: 650; white-space: nowrap; }
.talent-workspace .table-wrap { overflow-x: auto; }
.talent-workspace td { font-size: .875rem; }
.talent-workspace td small { display: block; color: var(--muted); font-size: .78rem; }
.talent-workspace .single, .talent-workspace .money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.talent-workspace .amount-head { text-align: right; white-space: nowrap; }
.talent-workspace .cell-title { display: block; min-width: 7rem; overflow-wrap: anywhere; }
.talent-workspace .danger-text { color: var(--red); }
.talent-workspace .color-1 { background: var(--blue-pale); color: var(--blue); }
.talent-workspace .color-2 { background: var(--green-pale); color: var(--green); }
.talent-workspace .color-3 { background: var(--orange-pale); color: var(--orange); }
.talent-workspace .talent-empty { display: grid; gap: 5px; justify-items: center; min-height: 115px; align-content: center; padding: 24px 14px; text-align: center; }
.talent-empty svg { color: var(--accent); }
.talent-empty h3 { font-size: .95rem; }
.talent-empty p { color: var(--muted); font-size: .875rem; }
.talent-tabs { display: flex; gap: 5px; overflow-x: auto; padding: 0 16px 11px; }
.talent-tab { display: flex; gap: 5px; align-items: center; white-space: nowrap; font-size: .875rem; padding: 5px 9px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); }
.talent-tab[aria-pressed="true"], .talent-tab:hover { color: var(--accent); background: var(--purple-pale); }
.talent-tab small, .talent-workspace .unread-label { border-radius: 4px; background: var(--orange-pale); color: var(--orange); padding: 1px 5px; font-size: .75rem; }
:is(.talent-workspace, .talent-dialog, #talent-form) .badge { display: inline-block; border-radius: 5px; padding: 3px 7px; width: max-content; background: var(--bg); color: var(--muted); white-space: nowrap; font-size: .78rem; font-weight: 700; }
:is(.talent-workspace, .talent-dialog, #talent-form) .badge.green { background: var(--green-pale); color: var(--green); }
:is(.talent-workspace, .talent-dialog, #talent-form) .badge.red { background: var(--red-pale); color: var(--red); }
:is(.talent-workspace, .talent-dialog, #talent-form) .badge.amber { background: var(--orange-pale); color: var(--orange); }
:is(.talent-workspace, .talent-dialog, #talent-form) .badge.blue { background: var(--blue-pale); color: var(--blue); }
.talent-workspace .back-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 9px; font-size: .875rem; color: var(--muted); }
.talent-workspace .talent-note { color: var(--muted); margin: -5px 0 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.talent-workspace .detail-panel { margin-bottom: 16px; }
.talent-workspace .talent-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.talent-workspace .timeline { list-style: none; margin: 0; padding: 0 16px 7px; }
.talent-workspace .timeline li { border-top: 1px solid var(--line); padding: 11px 0; }
.talent-workspace .timeline li > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.talent-workspace .timeline :is(span, small), .talent-workspace .voided-row { color: var(--muted); }
.talent-workspace .timeline p, .talent-dialog .project-note { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.talent-workspace .alert-list { padding: 0 16px 6px; }
.talent-workspace .alert-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; border-top: 1px solid var(--line); padding: 12px 0; }
.talent-workspace .alert-title, :is(.talent-dialog, #talent-form) .project-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; overflow-wrap: anywhere; }
.talent-workspace .alert-row p { margin-top: 4px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
#talent-form .form-context, #talent-form .project-meta { margin-bottom: 12px; color: var(--muted); }
.talent-dialog .project-numbers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 12px 0; }
.talent-dialog .project-numbers div { padding: 10px; border-radius: 7px; background: var(--bg); }
.talent-dialog .project-numbers dt, .talent-dialog .project-date { color: var(--muted); font-size: .875rem; }
.talent-dialog .project-numbers dd { margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.talent-dialog .project-date { display: flex; align-items: center; gap: 5px; margin: 10px 0; }
@media (max-width: 680px) {
  .talent-workspace .alert-row { grid-template-columns: auto minmax(0,1fr); }
  .talent-workspace .alert-row .talent-actions { grid-column: 2; }
}
