:root {
  --bg: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #fafbf8;
  --ink: #202322;
  --muted: #66706d;
  --line: #dfe4df;
  --line-strong: #c7d0ca;
  --teal: #00796f;
  --teal-soft: #e4f3ef;
  --green: #247247;
  --green-soft: #e7f2ea;
  --amber: #a96500;
  --amber-soft: #f8ecd9;
  --coral: #b84d3f;
  --coral-soft: #f7e4e1;
  --blue: #286bb5;
  --blue-soft: #e4edf7;
  --shadow: 0 12px 30px rgba(30, 38, 35, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

body.auth-locked {
  min-height: 100vh;
  overflow: hidden;
}

body.auth-checking .login-page,
body.auth-checking .app-shell,
body.auth-locked .app-shell {
  display: none;
}

body:not(.auth-locked) .login-page {
  display: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(10, 102, 194, 0.2);
  outline-offset: 2px;
}

.login-page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(430px, 520px);
  align-items: center;
  min-height: 100vh;
  padding: clamp(20px, 3vw, 40px);
  gap: clamp(22px, 3vw, 44px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(238, 243, 248, 0.92) 48%, rgba(248, 251, 250, 0.96)),
    #f4f7f9;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15, 31, 44, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 31, 44, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(115deg, rgba(0, 0, 0, 0.88), transparent 72%);
}

.login-brand-panel,
.login-card {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(203, 213, 225, 0.78);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(24px) saturate(142%);
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  min-height: min(760px, calc(100vh - 80px));
  padding: clamp(34px, 4vw, 58px);
  color: #f8fbff;
  background:
    linear-gradient(145deg, rgba(7, 20, 32, 0.98), rgba(9, 56, 62, 0.94) 62%, rgba(17, 67, 82, 0.92)),
    #0b1723;
  overflow: hidden;
}

.login-brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(45, 212, 191, 0.18), transparent 34%),
    linear-gradient(300deg, rgba(40, 107, 181, 0.18), transparent 42%);
  opacity: 0.78;
  pointer-events: none;
}

.login-brand-panel::after {
  content: "";
  position: absolute;
  inset: auto 38px 38px auto;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.72));
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-logo {
  width: 72px;
  aspect-ratio: 1122 / 1402;
  height: auto;
  border-radius: 18px;
  overflow: hidden;
  background: #050b18;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(125, 211, 252, 0.18);
}

.login-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.login-brand strong,
.login-brand span,
.login-hero p,
.login-hero h1,
.login-hero small {
  display: block;
  margin: 0;
}

.login-brand strong {
  color: #ffffff;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 850;
}

.login-brand span,
.login-hero p,
.login-signal-grid span {
  color: rgba(232, 240, 247, 0.68);
}

.login-hero {
  position: relative;
  z-index: 1;
  margin-top: clamp(96px, 14vh, 150px);
  max-width: 680px;
}

.login-hero p {
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.login-hero h1 {
  margin-top: 18px;
  max-width: 680px;
  color: #ffffff;
  font-size: 48px;
  line-height: 1.12;
  font-weight: 900;
}

.login-signal-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: auto;
  padding-top: 42px;
}

.login-signal-grid div {
  min-width: 0;
  min-height: 112px;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.12);
}

.login-signal-grid span,
.login-signal-grid strong {
  display: block;
}

.login-signal-grid span {
  margin-bottom: 8px;
  font-size: 12px;
}

.login-signal-grid strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.login-card {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: min(100%, 500px);
  justify-self: center;
  padding: clamp(30px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.86);
}

.login-card-head p,
.login-card-head h2 {
  margin: 0;
}

.login-card-head p {
  color: #0a66c2;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-card-head h2 {
  margin-top: 8px;
  color: #202322;
  font-size: 36px;
  line-height: 1.16;
  font-weight: 900;
}

.login-form {
  display: grid;
  gap: 15px;
}

.login-form label {
  display: grid;
  gap: 9px;
  color: #66706d;
  font-size: 13px;
  font-weight: 800;
}

.login-form input,
.login-form select {
  width: 100%;
  min-height: 54px;
  padding: 0 17px;
  color: #202322;
  border: 1px solid rgba(148, 163, 184, 0.52);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.login-form input:hover,
.login-form select:hover {
  border-color: rgba(40, 107, 181, 0.36);
}

.login-form input:focus,
.login-form select:focus {
  border-color: rgba(0, 121, 111, 0.62);
  box-shadow: 0 0 0 4px rgba(0, 121, 111, 0.12);
}

.login-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.check-line {
  display: inline-flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--ink) !important;
  font-weight: 600 !important;
}

.check-line input {
  min-height: 0;
  width: auto;
}

.login-submit {
  min-height: 56px;
  color: #fff;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, #00796f, #0a66c2);
  font-weight: 900;
  box-shadow: 0 18px 38px rgba(10, 102, 194, 0.23);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 46px rgba(10, 102, 194, 0.28);
}

.login-demo-entry {
  min-height: 52px;
  color: #0f513f;
  border: 1px solid rgba(0, 121, 111, 0.24);
  border-radius: 16px;
  background: rgba(228, 243, 239, 0.76);
  font-weight: 850;
}

.login-demo-entry:hover {
  color: #053f36;
  background: #dcefeb;
  border-color: rgba(0, 121, 111, 0.42);
}

.login-trust {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  color: #66706d;
  border-top: 1px solid rgba(203, 213, 225, 0.68);
  font-size: 13px;
}

.login-trust strong {
  color: #202322;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  overflow-y: auto;
  background: #fcfcf8;
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 55px;
  flex: 0 0 auto;
  border-radius: 10px;
  overflow: hidden;
  color: #fff;
  background: #000819;
  box-shadow: 0 8px 18px rgba(10, 102, 194, 0.14);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.2;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.ledger-summary,
.side-status,
.panel,
.metric-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.ledger-summary {
  padding: 12px;
}

.ledger-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.ledger-card-head strong {
  margin: 0;
  font-size: 15px;
}

.ledger-create-primary {
  width: 100%;
  min-height: 38px;
  margin: 0 0 10px;
  color: #fff;
  background: linear-gradient(180deg, #13a38e, #087d71);
  border: 1px solid #087467;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(8, 125, 113, 0.18);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.ledger-create-primary:hover {
  filter: brightness(1.03);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.ledger-summary p,
.side-status p,
.panel-title p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.ledger-summary strong {
  display: block;
  margin: 4px 0 12px;
  font-size: 15px;
  line-height: 1.35;
}

.ledger-summary label,
.ledger-standard-readonly,
.ledger-standard-select,
.form-grid label,
.period-picker {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ledger-standard-readonly strong {
  display: block;
  min-height: 38px;
  margin: 0;
  padding: 8px 10px;
  overflow: hidden;
  color: #1f2329;
  background: #f7fafc;
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-summary {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.is-permission-disabled {
  cursor: not-allowed !important;
  opacity: 0.48;
}

select,
input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.main-nav {
  display: grid;
  gap: 6px;
}

.nav-extension {
  display: grid;
  gap: 6px;
}

.nav-extension-body {
  display: grid;
  gap: 6px;
  padding-left: 6px;
  border-left: 2px solid #e2e8f0;
}

.nav-group-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  color: var(--muted);
  text-align: left;
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.nav-group-toggle span:first-child {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.nav-group-toggle small {
  font-size: 11px;
}

.nav-group-toggle .icon {
  text-align: right;
  transition: transform 0.18s ease;
}

.nav-extension:not(.is-open) .nav-extension-body {
  display: none;
}

.nav-extension.is-open .nav-group-toggle .icon {
  transform: rotate(180deg);
}

.nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.nav-item:hover {
  background: #f1f4ef;
  border-color: var(--line);
}

.nav-item.is-active {
  color: #083b36;
  background: var(--teal-soft);
  border-color: #bddbd4;
}

.nav-item-featured {
  background: #f8fbff;
  border-color: #dbeafe;
}

.nav-item-secondary {
  min-height: 44px;
}

.nav-extension-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.nav-extension-actions button {
  min-height: 34px;
  padding: 6px 8px;
  color: #0a4a91;
  background: #f1f7ff;
  border: 1px solid #d7e8fb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.nav-extension-actions button:hover {
  background: #e8f2ff;
  border-color: #b7d4f3;
}

.nav-item span:not(.icon) {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item small {
  color: var(--muted);
  font-size: 11px;
}

.icon {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  font-weight: 800;
  line-height: 1;
}

.side-status {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 8px 10px;
}

.side-status summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  list-style: none;
}

.side-status summary::-webkit-details-marker {
  display: none;
}

.side-status summary span,
.side-status summary strong {
  font-size: 13px;
}

.side-status div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.side-status[open] {
  padding-bottom: 10px;
}

.side-status strong {
  flex: 0 0 auto;
}

.state-good {
  color: var(--green);
}

.state-warn {
  color: var(--amber);
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  margin-bottom: 18px;
}

.topbar h1,
.view-heading h2 {
  margin: 2px 0 0;
  line-height: 1.12;
}

.topbar h1 {
  font-size: 26px;
}

.view-heading h2 {
  font-size: 24px;
}

.topbar-actions,
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.period-picker {
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
}

.period-picker select {
  min-height: 36px;
}

.side-logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  margin-top: 10px;
  padding: 6px 12px;
  color: #7b8189;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
}

.side-logout-btn:hover {
  color: #b42318;
  background: #fff7f6;
  border-color: #efc2aa;
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(240px, 360px) 34px;
  align-items: center;
  min-height: 38px;
  padding: 0 4px 0 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.global-search .icon {
  color: var(--muted);
}

.global-search input {
  min-height: 34px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
}

.global-search input:focus-visible {
  outline: 0;
}

body[data-active-view="books"] .app-shell .period-picker {
  display: none;
}

.search-clear {
  width: 30px;
  height: 30px;
  min-height: 30px;
  color: var(--muted);
  border: 0;
  background: transparent;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: none;
  width: min(620px, calc(100vw - 36px));
  max-height: 430px;
  overflow-y: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(16, 24, 32, 0.18);
}

.search-results.is-open {
  display: grid;
  gap: 6px;
}

.search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  padding: 10px;
  text-align: left;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
}

.search-result:hover,
.search-result.is-active {
  background: #edf7f4;
  border-color: #b8d8d0;
}

.search-result strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.search-result span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.search-result small {
  display: inline-flex;
  align-items: center;
  align-self: center;
  min-height: 24px;
  padding: 3px 8px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.btn,
.icon-btn,
.text-btn,
.segmented button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-decoration: none;
}

.btn:hover,
.icon-btn:hover,
.text-btn:hover,
.segmented button:hover {
  border-color: #aab8b0;
  background: #f8faf7;
}

.btn.primary {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.btn.primary:hover {
  background: #00665e;
}

button.is-disabled,
.btn.is-disabled,
.mini-action.is-disabled,
.text-btn.is-disabled,
.is-permission-disabled,
[aria-disabled="true"] {
  color: #7b8491;
  background: #f2f5f8;
  border-color: #d7dee7;
  box-shadow: none;
  cursor: help;
}

button.is-disabled:hover,
.btn.is-disabled:hover,
.mini-action.is-disabled:hover,
.text-btn.is-disabled:hover,
.is-permission-disabled:hover,
[aria-disabled="true"]:hover {
  color: #67717e;
  background: #eef2f6;
  border-color: #c8d1dc;
}

button.is-disabled::after,
.btn.is-disabled::after,
.mini-action.is-disabled::after,
button.is-permission-disabled::after,
.btn.is-permission-disabled::after,
.mini-action.is-permission-disabled::after {
  content: "";
  display: none;
}

button.is-permission-disabled::after,
.btn.is-permission-disabled::after,
.mini-action.is-permission-disabled::after {
  content: "无权限";
}

button.is-running,
.btn.is-running,
.text-btn.is-running,
.module-flow-strip button.is-running {
  color: #0a4a91;
  background: #eef6ff;
  border-color: #9fc7ef;
  cursor: progress;
}

button.is-done,
.btn.is-done,
.text-btn.is-done,
.module-flow-strip button.is-done {
  color: #176145;
  background: #edf8f1;
  border-color: #a9d9bd;
}

button.is-failed,
.btn.is-failed,
.text-btn.is-failed,
.module-flow-strip button.is-failed {
  color: #9f2e2e;
  background: #fff1f1;
  border-color: #f2b6b6;
}

button.is-running .action-state-dot,
button.is-done .action-state-dot,
button.is-failed .action-state-dot {
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 999px;
}

.btn.full {
  width: 100%;
  margin-top: 12px;
}

.icon-btn {
  width: 38px;
  padding: 0;
  font-weight: 800;
}

.text-btn {
  min-height: 32px;
  padding: 6px 8px;
  color: var(--teal);
  background: transparent;
  border-color: transparent;
  font-weight: 700;
}

.file-btn {
  position: relative;
  overflow: hidden;
}

.hidden-file-input {
  position: fixed;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-btn input,
.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.view {
  display: none;
  min-width: 0;
  overflow-x: visible;
}

.view.is-active {
  display: block;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 8px;
}

.overview-head strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stat-grid.compact {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.metric-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 12px;
  overflow: hidden;
  color: inherit;
  text-align: left;
  appearance: none;
}

.metric-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  content: "";
  background: var(--teal);
}

.metric-card:nth-child(2)::before {
  background: var(--blue);
}

.metric-card:nth-child(3)::before {
  background: var(--amber);
}

.metric-card:nth-child(4)::before {
  background: var(--coral);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.metric-card small {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.metric-action-card {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.metric-action-card:hover {
  border-color: #b7d4f3;
  box-shadow: 0 14px 28px rgba(10, 102, 194, 0.1);
  transform: translateY(-1px);
}

.metric-action-card small::after {
  content: "›";
  color: #0a66c2;
  font-weight: 900;
}

.workspace-grid,
.module-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.workspace-grid {
  grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.7fr) minmax(260px, 1fr);
}

.module-grid.two,
.reports-layout {
  grid-template-columns: minmax(330px, 1fr) minmax(420px, 1.4fr);
}

.documents-layout,
.expense-layout,
.tax-layout,
	.cash-layout,
	.settlement-layout,
	.voucher-layout,
	.crm-layout,
	.settings-layout {
	  grid-template-columns: minmax(270px, 0.82fr) minmax(520px, 1.5fr) minmax(270px, 0.82fr);
	}

	.cash-layout,
	.settlement-layout,
	.tax-layout,
	.crm-layout,
	.voucher-layout {
	  grid-template-columns: minmax(520px, 1.6fr) minmax(300px, 0.9fr);
	}

.settings-layout {
  align-items: start;
  grid-template-columns: minmax(320px, 0.88fr) minmax(520px, 1.42fr);
}

.settings-layout .panel.wide {
  grid-column: 2 / 3;
}

.settings-layout > .panel:not(.wide) {
  grid-column: 1 / 2;
}

.capability-center-panel {
  align-self: start;
}

.capability-center {
  display: grid;
  gap: 6px;
}

.capability-center-disclosure {
  align-self: start;
}

.capability-center-disclosure > #capabilityCenter {
  display: grid;
  gap: 6px;
  padding: 0 12px 12px;
}

.industry-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.industry-package-card {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 104px;
  padding: 12px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.industry-package-card.is-active {
  border-color: #0f6bc8;
  box-shadow: inset 0 3px 0 #0f6bc8, 0 10px 24px rgba(15, 107, 200, 0.12);
}

.industry-package-card span {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  color: #0a4a91;
  background: #eaf4ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.industry-package-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.industry-package-card small,
.industry-package-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.35;
}

.industry-package-preview {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #d8e6f5;
  border-radius: 10px;
}

.industry-package-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.industry-package-preview-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.industry-package-preview-head strong {
  font-size: 18px;
}

.industry-package-config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.industry-package-config-card {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.industry-package-config-card span {
  color: #5f6875;
  font-size: 11px;
  font-weight: 850;
}

.industry-package-config-card strong {
  color: #0a4a91;
  font-size: 16px;
  line-height: 1.2;
}

.industry-package-config-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-package-section {
  display: grid;
  gap: 7px;
}

.industry-package-section > strong {
  color: #1f2329;
  font-size: 13px;
}

.industry-package-subjects,
.industry-package-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.industry-package-subjects span,
.industry-package-pills span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  color: #4f5965;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 760;
}

.industry-package-detail-list {
  display: grid;
  gap: 6px;
}

.industry-package-detail-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.4fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.industry-package-detail-row strong,
.industry-package-detail-row span,
.industry-package-detail-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.industry-package-detail-row strong {
  color: #1f2329;
  font-size: 12px;
}

.industry-package-detail-row span {
  color: #4f5965;
  font-size: 12px;
  font-weight: 750;
}

.industry-package-detail-row em {
  color: #0a4a91;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
}

.capability-group {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.capability-group[open] {
  border-color: #b7d4f3;
  box-shadow: 0 10px 24px rgba(10, 102, 194, 0.08);
}

.capability-group summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
  background: #ffffff;
}

.capability-group summary::-webkit-details-marker {
  display: none;
}

.capability-group summary strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.capability-group summary em {
  padding: 4px 8px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.capability-summary-title {
  min-width: 0;
}

.capability-summary-meta {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.capability-summary-meta i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #6e6e73;
  font-size: 13px;
  font-style: normal;
  transition: transform 0.18s ease;
}

.capability-group[open] .capability-summary-meta i {
  transform: rotate(180deg);
}

.capability-drawer-body {
  display: grid;
  gap: 8px;
  padding: 0 10px 10px;
}

.capability-drawer-body p {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
  background: #f8f9fb;
  border: 1px solid #e8e8ee;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
}

.capability-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.capability-chip-list span {
  padding: 5px 8px;
  color: #41505d;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.crm-layout .integration-log {
  grid-column: 1 / -1;
}

.expense-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.expense-summary strong {
  font-size: 16px;
}

.expense-rules {
  margin-top: 12px;
}

.manual-voucher-panel {
  margin-bottom: 16px;
}

.manual-voucher-form {
  display: grid;
  gap: 14px;
}

.manual-voucher-controls,
.salary-detail-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.manual-voucher-controls label,
.salary-detail-fields label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.field-feedback {
  min-height: 18px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.field-feedback.is-ok {
  color: #157a58;
}

.field-feedback.is-error {
  color: #b23b47;
}

input.is-valid {
  border-color: #8bc7ad;
  box-shadow: 0 0 0 3px rgba(21, 122, 88, 0.1);
}

input.is-invalid {
  border-color: #d49aa2;
  box-shadow: 0 0 0 3px rgba(178, 59, 71, 0.1);
}

.manual-voucher-controls .span-2 {
  grid-column: span 2;
}

.manual-voucher-preview {
  display: grid;
  gap: 10px;
}

.manual-voucher-preview table {
  min-width: 620px;
}

.manual-voucher-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.payroll-import-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.payroll-table-wrap {
  margin-top: 12px;
}

.payroll-table-wrap table {
  min-width: 760px;
}

.payroll-manual-entry-panel {
  margin-bottom: 14px;
  border-color: #dbe9f8;
}

.payroll-manual-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}

.payroll-manual-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.payroll-manual-form button {
  min-height: 44px;
  justify-content: center;
}

.payroll-voucher-actions {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.payroll-voucher-actions .btn {
  justify-content: center;
}

.manual-voucher-panel {
  padding: 0;
  overflow: hidden;
}

.manual-voucher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff, #f9fafb);
}

.manual-voucher-head strong,
.manual-voucher-head span {
  display: block;
}

.manual-voucher-head strong {
  font-size: 18px;
  line-height: 1.2;
}

.manual-voucher-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.voucher-head-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.voucher-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.voucher-head-badges span {
  min-height: 28px;
  padding: 5px 9px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 999px;
  text-transform: none;
}

.manual-save-button {
  min-height: 38px;
  padding-inline: 18px;
  white-space: nowrap;
}

.head-save-button {
  min-height: 34px;
  padding-inline: 14px;
  font-size: 13px;
}

.manual-voucher-form {
  gap: 0;
}

.manual-voucher-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(190px, 0.5fr);
  min-height: 280px;
}

.voucher-entry-card {
  min-width: 0;
  padding: 16px;
}

.voucher-entry-card + .voucher-entry-card {
  border-left: 1px solid var(--line);
}

.voucher-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.voucher-card-title strong {
  font-size: 14px;
}

.voucher-card-title span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.manual-voucher-workbench .manual-voucher-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.manual-voucher-workbench .manual-voucher-controls label {
  min-width: 0;
}

.manual-voucher-workbench .manual-voucher-controls .span-2 {
  grid-column: 1 / -1;
}

.manual-voucher-workbench select,
.manual-voucher-workbench input {
  min-height: 36px;
}

.subject-quick-add {
  margin: 0;
}

.manual-line-subject-add {
  margin-bottom: 10px;
}

.subject-quick-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 0 10px 10px;
}

.subject-quick-add-grid input[type="hidden"] {
  display: none;
}

.subject-quick-add-grid .btn {
  min-height: 36px;
  justify-content: center;
  white-space: nowrap;
  width: 100%;
}

.manual-voucher-preview table {
  min-width: 460px;
}

.manual-voucher-preview .table-wrap {
  max-height: 204px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.manual-line-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.manual-keyboard-hint {
  margin: -2px 0 10px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.manual-voucher-preview .manual-line-account {
  min-width: 220px;
}

.manual-voucher-preview .amount-input {
  min-width: 112px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.voucher-audit-stack {
  display: grid;
  gap: 10px;
}

.voucher-audit-stack div {
  display: grid;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.voucher-audit-stack div:last-child {
  border-bottom: 0;
}

.voucher-audit-stack span {
  color: var(--muted);
  font-size: 12px;
}

.voucher-audit-stack strong {
  font-size: 14px;
}

.manual-subject-suggest {
  position: fixed;
  z-index: 80;
  display: grid;
  gap: 4px;
  max-height: min(320px, 48vh);
  padding: 6px;
  overflow: auto;
  background: #ffffff;
  border: 1px solid #d8e1ec;
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.manual-subject-suggest[hidden] {
  display: none !important;
}

.manual-subject-suggest button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 9px;
  color: #20242a;
  text-align: left;
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.manual-subject-suggest button:hover,
.manual-subject-suggest button.is-active {
  background: #edf5ff;
}

.manual-subject-suggest strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-subject-suggest span,
.manual-subject-empty {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.manual-subject-empty {
  padding: 10px;
}

.manual-voucher-actions {
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: rgba(251, 251, 253, 0.96);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.voucher-action-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.voucher-action-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.expense-form label:nth-child(1),
.expense-form label:nth-child(3),
.expense-form label:nth-child(4) {
  grid-column: auto;
}

.wide {
  min-width: 0;
}

.panel {
  min-width: 0;
  padding: 16px;
}

.panel-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-title strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
  line-height: 1.25;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  color: var(--blue);
  white-space: nowrap;
  background: var(--blue-soft);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.success {
  color: var(--green);
  background: var(--green-soft);
}

.badge.warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.badge.danger {
  color: var(--coral);
  background: var(--coral-soft);
}

.task-list,
.insight-list,
.sync-list,
.match-list,
.mapping-list,
.timeline,
.setup-list,
.rule-list {
  display: grid;
  gap: 10px;
}

.standard-rule-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.standard-panel {
  align-content: start;
}

.standard-panel-folded {
  padding: 0;
  overflow: hidden;
}

.standard-panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.standard-panel-summary::-webkit-details-marker {
  display: none;
}

.standard-panel-summary p,
.standard-panel-summary strong {
  display: block;
}

.standard-panel-summary p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.standard-panel-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.standard-panel-summary::after {
  content: "展开";
  color: #0a4a91;
  font-size: 13px;
  font-weight: 900;
}

.standard-panel-folded[open] .standard-panel-summary::after {
  content: "收起";
}

.standard-panel-body {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

.standard-panel .panel-title {
  margin-bottom: 10px;
}

.standard-panel .standard-clause-search {
  margin-bottom: 10px;
}

.standard-clause-search > .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  white-space: nowrap;
}

.standard-details {
  margin: 10px 0 0;
}

.standard-details .standard-rule-summary {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 0;
  padding: 0 10px 10px;
}

.standard-details .standard-rule-summary div {
  min-height: 52px;
  padding: 8px;
}

.standard-details .mapping-list {
  max-height: 320px;
  overflow: auto;
  padding: 0 10px 10px;
}

.standard-details .mapping-row {
  padding: 8px;
}

.standard-rule-summary div {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #f8f9fb;
  border: 1px solid #e2e2e7;
  border-radius: 8px;
}

.standard-rule-summary span {
  color: var(--muted);
  font-size: 12px;
}

.standard-rule-summary strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.standard-clause-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.standard-clause-search label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.standard-clause-search input {
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #d4d7dc;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.standard-clause-search input:focus {
  border-color: #0f6d63;
  box-shadow: 0 0 0 3px rgba(15, 109, 99, 0.12);
}

.standard-clause-results {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.clause-card {
  display: grid;
  gap: 6px;
  padding: 0;
  background: #ffffff;
  border: 1px solid #e2e2e7;
  border-radius: 8px;
}

.clause-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 46px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
}

.clause-card summary::-webkit-details-marker {
  display: none;
}

.clause-card summary::after {
  content: "详情";
  color: #0a4a91;
  font-size: 12px;
  font-weight: 900;
}

.clause-card[open] summary::after {
  content: "收起";
}

.clause-card strong {
  font-size: 14px;
  line-height: 1.35;
}

.clause-card summary span {
  grid-column: 1 / 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clause-card span,
.clause-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.clause-card-detail {
  display: grid;
  gap: 4px;
  padding: 0 11px 10px;
}

.empty-clause-card {
  padding: 11px;
}

.task-row,
.insight-row,
.sync-row,
.match-row,
.mapping-row,
.timeline-row,
.setup-list div,
.rule-list div {
  display: grid;
  gap: 4px;
  padding: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mapping-row.workflow-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.mapping-row.is-compact {
  background: #ffffff;
}

.step-index {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: #0f6d63;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.task-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.smart-panel-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.home-agent-brief {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: stretch;
  margin: 0 0 12px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dfe5ec;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.05);
}

.agent-workbench-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, #eef6ff 0%, #ffffff 100%);
  border: 1px solid #cfe3fb;
  border-radius: 10px;
}

.agent-workbench-head span,
.agent-workbench-card > span {
  display: block;
  color: #0b5a9c;
  font-size: 12px;
  font-weight: 900;
}

.agent-workbench-head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
}

.agent-workbench-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.agent-workbench-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.agent-workbench-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.agent-workbench-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e4e9f0;
  border-left: 4px solid #0f8a72;
  border-radius: 10px;
}

.agent-workbench-card.is-human {
  border-left-color: #b77900;
  background: #fffaf0;
}

.agent-workbench-card.is-next {
  border-left-color: #0a66b7;
  background: #f5f9ff;
}

.agent-workbench-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-workbench-card li {
  display: grid;
  gap: 2px;
}

.agent-workbench-card li strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.agent-workbench-card li span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.agent-next-actions {
  display: grid;
  gap: 7px;
}

.agent-next-actions article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.agent-next-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.agent-next-actions strong,
.agent-next-actions span {
  display: block;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-next-actions strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.agent-next-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.agent-next-actions .mini-action,
.agent-next-action-buttons .mini-action {
  min-width: 92px;
}

.agent-execution-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.agent-execution-actions small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.smart-todo-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.smart-todo-summary span {
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.smart-todo-summary .is-human {
  color: #9a4f00;
  background: #fff6e6;
  border-color: #eed19b;
}

.smart-todo-summary .is-auto {
  color: #0a4a91;
  background: #eaf3ff;
  border-color: #c7def8;
}

.smart-todo-summary .is-done {
  color: #176145;
  background: #eef8f2;
  border-color: #c8e4d3;
}

.smart-task-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.exception-action-card {
  cursor: default;
}

.exception-action-card > div {
  min-width: 0;
}

.exception-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.todo-detail-fold {
  margin-top: 5px;
}

.todo-detail-fold summary {
  width: max-content;
  color: #0a5ca8;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.todo-detail-fold small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.mini-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.mini-action.is-primary {
  color: #ffffff;
  border-color: #0f6bc8;
  background: #0f6bc8;
}

.mini-action.is-neutral {
  color: #0a4a91;
  border-color: #c7def8;
  background: #eef6ff;
}

.mini-action.is-muted {
  color: #5f6670;
  border-color: #d7dde5;
  background: #f7f9fc;
}

.mini-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(23, 39, 64, 0.08);
}

.smart-task-row em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.smart-task-row.is-human {
  border-color: #eed19b;
  background: #fffaf0;
}

.smart-task-row.is-human .icon-chip,
.smart-task-row.is-human em {
  color: #9a4f00;
  background: #fff0d2;
}

.smart-task-row.is-auto {
  border-color: #c7def8;
  background: #f5f9ff;
}

.smart-task-row.is-auto .icon-chip,
.smart-task-row.is-auto em {
  color: #0a4a91;
  background: #e3f0ff;
}

.smart-task-row.is-done {
  opacity: 0.78;
}

.smart-task-row.is-done .icon-chip,
.smart-task-row.is-done em {
  color: #176145;
  background: #e5f4ec;
}

.task-row:hover {
  background: #f4f8ff;
  border-color: #b7d4f3;
}

.task-row .icon-chip {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
  font-weight: 800;
}

.task-row strong,
.insight-row strong,
.sync-row strong,
.match-row strong,
.mapping-row strong,
.timeline-row strong,
.setup-list strong,
.rule-list strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task-row span,
.insight-row span,
.sync-row span,
.match-row span,
.mapping-row span,
.timeline-row span,
.setup-list span,
.rule-list span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.rule-confirm-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rule-decision-board,
.settlement-action-board,
.digital-employee-todo-board,
.formal-database-board {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.rule-decision-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-decision-card,
.settlement-action-card,
.digital-employee-todo-card,
.formal-database-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rule-decision-card {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.6fr);
  align-items: start;
  border-left: 4px solid #b77900;
}

.rule-decision-card.is-ready,
.settlement-action-card.is-ready,
.digital-employee-todo-card.is-auto,
.formal-database-card.is-ready {
  border-left-color: #0f8a72;
}

.rule-decision-card.is-review,
.digital-employee-todo-card.is-human,
.formal-database-card.is-pending {
  border-left-color: #b77900;
}

.rule-decision-card strong,
.settlement-action-card strong,
.digital-employee-todo-card strong,
.formal-database-card strong {
  color: var(--ink);
  font-size: 14px;
}

.rule-decision-card span,
.rule-decision-card small,
.settlement-action-card span,
.digital-employee-todo-card span,
.digital-employee-todo-card small,
.formal-database-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.rule-decision-actions,
.digital-employee-todo-card .exception-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rule-decision-actions {
  grid-column: 1 / -1;
}

.rule-card-fields {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.rule-card-fields div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  background: #f7f9fc;
  border: 1px solid #e3e8ef;
  border-radius: 7px;
}

.rule-card-fields .span-all {
  grid-column: 1 / -1;
}

.rule-card-fields dt {
  color: #6c737f;
  font-size: 11px;
  font-weight: 900;
}

.rule-card-fields dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.settlement-action-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.settlement-core-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}

.settlement-core-flow span {
  padding: 9px 10px;
  color: #0b4f87;
  background: #eef6ff;
  border: 1px solid #cfe2f7;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.settlement-action-card,
.formal-database-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-left: 4px solid #d7dee8;
}

.settlement-action-card em,
.digital-employee-todo-card em,
.formal-database-card em {
  display: inline-flex;
  min-width: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  color: #0958a8;
  background: #eaf3ff;
  border-radius: 12px;
  font-size: 14px;
  font-style: normal;
  font-weight: 920;
  white-space: nowrap;
}

.settlement-action-card .mini-action,
.formal-database-card .mini-action {
  grid-column: 1 / -1;
  justify-self: start;
}

.digital-employee-todo-board {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.digital-employee-todo-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  overflow: visible;
  border-left: 4px solid #d7dee8;
}

.digital-employee-todo-card .exception-action-buttons {
  grid-column: 1 / -1;
}

.digital-task-actions {
  align-items: flex-start;
  overflow: visible;
}

.digital-task-actions .mini-action,
.digital-task-actions.local-more-actions-drawer summary,
.digital-task-actions .local-more-actions-drawer summary {
  min-width: 86px;
  min-height: 34px;
}

.digital-task-actions .local-more-actions-drawer {
  align-self: flex-start;
}

.digital-task-actions .more-actions-list {
  right: auto;
  left: 0;
}

body[data-active-view="digitalEmployee"] .module-flow-strip.module-task-strip,
body[data-active-view="digitalEmployee"] .digital-employee-todo-board {
  grid-template-columns: 1fr;
}

body[data-active-view="digitalEmployee"] .module-flow-strip.module-task-strip .module-todo-card {
  align-items: start;
  min-height: 58px;
}

body[data-active-view="digitalEmployee"] .module-flow-strip.module-task-strip .module-todo-card strong {
  overflow: visible;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
}

.formal-database-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rule-confirm-row {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rule-confirm-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rule-confirm-row strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invoice-source-stack {
  display: grid;
  gap: 3px;
  min-width: 220px;
  max-width: 360px;
}

.invoice-source-stack strong,
.invoice-source-stack span,
.invoice-source-stack small {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.invoice-source-stack strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  line-height: 1.25;
}

.invoice-source-stack span,
.invoice-source-stack small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.rule-confirm-action {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding-top: 2px;
}

.rule-confirm-action span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.table-wrap .operator-table,
.table-wrap .bank-receipt-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.operator-table th,
.operator-table td,
.bank-receipt-table th,
.bank-receipt-table td {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.tax-name-cell {
  display: grid;
  gap: 4px;
  min-width: 220px;
}

.tax-name-cell strong {
  color: var(--ink);
  font-size: 13px;
}

.tax-name-cell span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.tax-law-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tax-law-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tax-law-card div {
  display: grid;
  gap: 4px;
}

.tax-law-card strong {
  color: var(--ink);
  font-size: 14px;
}

.tax-law-card span,
.tax-law-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f7f9f6;
  font-size: 12px;
  font-weight: 800;
}

.row-actions-head,
.row-actions-cell {
  position: sticky;
  right: 0;
  min-width: 238px;
  width: 238px;
  background: #ffffff;
  box-shadow: -8px 0 14px rgba(15, 23, 42, 0.06);
}

.row-actions-head {
  z-index: 3;
  background: #f7f9f6;
}

.row-actions-cell {
  z-index: 2;
}

tbody tr:hover .row-actions-cell,
tbody tr.is-selected .row-actions-cell {
  background: #f1f7f4;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  white-space: normal;
}

.row-action-link {
  min-height: 30px;
  padding: 5px 6px;
  font-size: 12px;
}

.table-wrap .operator-table .row-actions-head,
.table-wrap .operator-table .row-actions-cell,
.table-wrap .bank-receipt-table .row-actions-head,
.table-wrap .bank-receipt-table .row-actions-cell {
  min-width: 128px;
  width: 128px;
}

.operator-table .row-actions,
.bank-receipt-table .row-actions {
  justify-content: flex-start;
}

.operator-table .row-action-link,
.operator-table .text-btn,
.bank-receipt-table .row-action-link,
.bank-receipt-table .text-btn {
  white-space: nowrap;
}

.invoice-review-table th:nth-child(1),
.invoice-review-table td:nth-child(1) {
  width: 15%;
}

.invoice-review-table th:nth-child(2),
.invoice-review-table td:nth-child(2) {
  width: 21%;
}

.invoice-review-table th:nth-child(3),
.invoice-review-table td:nth-child(3),
.invoice-review-table th:nth-child(4),
.invoice-review-table td:nth-child(4) {
  width: 11%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.invoice-review-table th:nth-child(5),
.invoice-review-table td:nth-child(5) {
  width: 17%;
}

.invoice-review-table th:nth-child(6),
.invoice-review-table td:nth-child(6) {
  width: 13%;
}

.bank-receipt-table th:nth-child(1),
.bank-receipt-table td:nth-child(1) {
  width: 12%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.bank-receipt-table th:nth-child(2),
.bank-receipt-table td:nth-child(2) {
  width: 20%;
}

.bank-receipt-table th:nth-child(3),
.bank-receipt-table td:nth-child(3),
.bank-receipt-table th:nth-child(5),
.bank-receipt-table td:nth-child(5),
.bank-receipt-table th:nth-child(6),
.bank-receipt-table td:nth-child(6) {
  width: 14%;
}

.bank-receipt-table th:nth-child(4),
.bank-receipt-table td:nth-child(4) {
  width: 12%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.bank-receipt-table th:nth-child(7),
.bank-receipt-table td:nth-child(7) {
  width: 10%;
}

.settlement-table th:nth-child(1),
.settlement-table td:nth-child(1) {
  width: 6%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.settlement-table th:nth-child(2),
.settlement-table td:nth-child(2) {
  width: 16%;
}

.settlement-table th:nth-child(3),
.settlement-table td:nth-child(3),
.settlement-table th:nth-child(6),
.settlement-table td:nth-child(6),
.settlement-table th:nth-child(7),
.settlement-table td:nth-child(7),
.settlement-table th:nth-child(8),
.settlement-table td:nth-child(8) {
  width: 12%;
}

.settlement-table th:nth-child(4),
.settlement-table td:nth-child(4),
.settlement-table th:nth-child(5),
.settlement-table td:nth-child(5) {
  width: 9%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.settlement-table th:nth-child(9),
.settlement-table td:nth-child(9) {
  width: 8%;
}

.settlement-row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  white-space: normal;
}

.settlement-action-hint {
  flex-basis: 100%;
  font-size: 11px;
  line-height: 1.3;
}

.table-wrap .bank-receipt-table {
  min-width: 0;
}

.bank-row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  white-space: normal;
}

.bank-action-hint {
  flex-basis: 100%;
  font-size: 11px;
  line-height: 1.3;
}

.row-more-actions {
  position: relative;
}

.row-more-actions summary {
  min-height: 30px;
  padding: 5px 8px;
  color: #0b5ca8;
  background: #eef6ff;
  border: 1px solid #cfe0f2;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  list-style: none;
  cursor: pointer;
}

.row-more-actions summary::-webkit-details-marker {
  display: none;
}

.row-more-actions[open] summary {
  background: #e3f0ff;
}

.row-more-actions > div {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  display: grid;
  gap: 6px;
  min-width: 116px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-radius: 10px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.row-more-actions.local-more-actions-drawer > .more-actions-list {
  min-width: 170px;
  max-width: min(280px, 72vw);
  padding: 8px;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(18, 32, 52, 0.14);
}

tbody tr {
  transition: background 0.18s ease;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #f1f7f4;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.ledger-query-panel {
  margin-bottom: 16px;
}

.ledger-query-title {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
  align-items: stretch;
}

.ledger-query-title > div:first-child {
  min-width: 0;
}

.ledger-query-summary {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.3fr)
    minmax(104px, 0.8fr)
    minmax(170px, 1.15fr)
    minmax(72px, 0.52fr)
    minmax(92px, 0.62fr)
    minmax(92px, 0.62fr);
  gap: 8px;
  min-width: 0;
  padding: 8px;
  background: #f3f7fd;
  border: 1px solid #d9e6f4;
  border-radius: 12px;
}

.ledger-query-summary .ledger-summary-item {
  min-width: 0;
  padding: 8px 10px;
  background: #ffffff;
  border: 1px solid #dce5ef;
  border-radius: 9px;
}

.ledger-query-summary .ledger-summary-item span {
  font-size: 11px;
  font-weight: 850;
}

.ledger-query-summary .ledger-summary-item strong {
  display: block;
  color: #0a4a91;
  font-size: 14px;
  line-height: 1.25;
}

.ledger-query-summary .ledger-summary-item[data-summary-label="账套"] strong,
.ledger-query-summary .ledger-summary-item[data-summary-label="期间"] strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

.ledger-query-summary .ledger-summary-item[data-summary-label="记录"],
.ledger-query-summary .ledger-summary-item[data-summary-label="借方"],
.ledger-query-summary .ledger-summary-item[data-summary-label="贷方"] {
  text-align: right;
}

.ledger-query-summary .ledger-summary-item[data-summary-label="借方"] strong,
.ledger-query-summary .ledger-summary-item[data-summary-label="贷方"] strong {
  white-space: nowrap;
}

.ledger-unified-query-bar label:nth-child(2) {
  min-width: 0;
}

.ledger-unified-query-bar #ledgerSearchScope {
  min-width: 0;
}

.asset-query-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) repeat(3, minmax(110px, 0.55fr)) minmax(180px, 0.9fr);
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.asset-query-bar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.asset-query-bar select,
.asset-query-bar input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.asset-tabs {
  align-self: end;
  min-width: min(100%, 430px);
}

.asset-search input {
  min-width: 0;
}

.ledger-query-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.ledger-query-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.ledger-query-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
  align-items: end;
}

.ledger-summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 1px;
  margin: 14px 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ledger-summary-item {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  background: #f8faf6;
}

.ledger-summary-item span {
  color: var(--muted);
  font-size: 12px;
}

.ledger-summary-item strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ledger-book-table {
  min-width: 1040px;
}

.amount-cell {
  text-align: right;
  white-space: nowrap;
}

.empty-cell {
  color: var(--muted);
  text-align: center;
}

.empty-guide-cell {
  position: sticky;
  left: 0;
  z-index: 0;
  padding: 0;
  background: #ffffff;
}

.table-limit-cell {
  padding: 12px;
  text-align: left;
}

.empty-guide {
  display: grid;
  gap: 8px;
  justify-items: center;
  width: min(100%, 720px);
  min-height: 148px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 16px;
  color: var(--muted);
  place-content: center;
}

.empty-guide.compact {
  justify-items: start;
  padding: 12px;
  text-align: left;
}

.empty-guide strong {
  color: var(--ink);
  font-size: 15px;
}

.empty-guide span {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.45;
}

.empty-guide div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.ledger-book-row.is-openable {
  cursor: pointer;
}

.ledger-book-row.is-openable td:nth-child(2),
.ledger-book-row.is-openable td:nth-child(3) {
  color: #0f6d63;
  font-weight: 800;
}

.ledger-book-row.is-openable:hover td {
  background: #e9f5f1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.invoice-voucher-trace {
  display: grid;
  gap: 4px;
  min-width: 180px;
}

.invoice-voucher-trace small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  white-space: normal;
}

.channel-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.channel-pill.structured {
  color: var(--green);
  background: var(--green-soft);
}

.channel-pill.electronic {
  color: var(--blue);
  background: var(--blue-soft);
}

.channel-pill.fallback {
  color: var(--amber);
  background: var(--amber-soft);
}

.channel-pill.manual {
  color: var(--muted);
  background: #f1f2f2;
}

.status-ok {
  color: var(--green);
  background: var(--green-soft);
}

.status-warn {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-info {
  color: var(--blue);
  background: var(--blue-soft);
}

.status-danger {
  color: var(--coral);
  background: var(--coral-soft);
}

.bar-chart,
.line-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 230px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.bar-item {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 8px;
  flex: 1;
  min-width: 38px;
  height: 190px;
}

.bar {
  width: 100%;
  max-width: 42px;
  min-height: 18px;
  border-radius: 7px 7px 3px 3px;
  background: var(--teal);
}

.bar-item:nth-child(2) .bar,
.bar-item:nth-child(5) .bar {
  background: var(--blue);
}

.bar-item:nth-child(3) .bar {
  background: var(--amber);
}

.bar-item:nth-child(4) .bar,
.bar-item:nth-child(6) .bar {
  background: var(--green);
}

.bar-item span {
  color: var(--muted);
  font-size: 12px;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-bottom: 12px;
  padding: 18px;
  color: var(--ink);
  text-align: center;
  background: #f8faf7;
  border: 1px dashed #98aaa2;
  border-radius: 8px;
  cursor: pointer;
}

.action-dropzone {
  width: 100%;
  min-height: 96px;
  font: inherit;
}

.hidden-legacy-upload {
  display: none !important;
}

.dropzone:hover {
  border-color: var(--teal);
  background: #f0f7f4;
}

.source-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin: 8px 0 10px;
}

.source-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.source-payroll-entry,
.source-primary-entry,
.source-review-entry,
.source-secondary-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #f8fbff;
  border: 1px solid #dbe9f8;
  border-radius: 8px;
}

.source-primary-entry {
  background: #f0f8f6;
  border-color: #b9ded6;
}

.source-secondary-entry {
  background: #fffaf0;
  border-color: #f3d49a;
}

.source-payroll-entry:hover,
.source-primary-entry:hover,
.source-review-entry:hover,
.source-secondary-entry:hover {
  background: #eef6ff;
  border-color: #b8d5f5;
}

.source-payroll-entry span,
.source-primary-entry span,
.source-review-entry span,
.source-secondary-entry span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 8px;
  font-weight: 900;
}

.source-primary-entry span {
  color: #0f604d;
  background: #dff3ed;
}

.source-secondary-entry span {
  color: #8a5200;
  background: #fff0cf;
}

.source-payroll-entry strong,
.source-primary-entry strong,
.source-review-entry strong,
.source-secondary-entry strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-payroll-entry small,
.source-primary-entry small,
.source-review-entry small,
.source-secondary-entry small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-hub-disclosure {
  margin: 8px 0 12px;
}

.source-hub-disclosure .source-hub {
  margin: 10px 0 0;
}

.source-hub button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-hub button:hover {
  background: #f4f8ff;
  border-color: #b7d4f3;
}

.source-hub span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.source-hub strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-hub small {
  display: block;
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status-list {
  display: grid;
  gap: 6px;
  max-height: clamp(180px, 30vh, 320px);
  margin: 12px 0;
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.upload-status-row {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.upload-status-dot {
  width: 9px;
  height: 9px;
  background: #64748b;
  border-radius: 999px;
}

.upload-status-row.is-reading .upload-status-dot {
  background: #0a66c2;
  box-shadow: 0 0 0 4px #e8f2ff;
}

.upload-status-row.is-done .upload-status-dot {
  background: #0f8a72;
}

.upload-status-row.is-warning .upload-status-dot {
  background: #b77900;
}

.upload-status-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.upload-status-main strong,
.upload-status-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-status-main strong {
  color: var(--ink);
  font-size: 12px;
}

.upload-status-main span {
  color: var(--muted);
  font-size: 11px;
}

.upload-stage-track {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  margin-top: 4px;
}

.upload-stage-track span {
  min-width: 0;
  padding: 3px 2px;
  color: #73808e;
  text-align: center;
  background: #eef2f6;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
}

.upload-stage-track span.is-active {
  color: #0a4a91;
  background: #dfefff;
}

.upload-status-row.is-done .upload-stage-track span.is-active {
  color: #0b6f5d;
  background: #dff5ec;
}

.upload-status-row.is-warning .upload-stage-track span.is-active {
  color: #945600;
  background: #fff2cc;
}

.upload-status-row em {
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.upload-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.upload-status-actions .mini-action {
  min-height: 28px;
  padding: 4px 8px;
  white-space: nowrap;
}

.audit-trail-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.audit-trail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audit-trail-head strong {
  color: var(--ink);
  font-size: 14px;
}

.audit-trail-head span,
.audit-trail-row span {
  color: var(--muted);
  font-size: 12px;
}

.audit-trail-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.audit-trail-row strong {
  color: var(--ink);
  font-size: 13px;
}

.deployment-readiness-list,
.foundation-status-grid,
.sample-library-list,
.acceptance-test-list,
.formal-task-list,
.formal-job-list,
.integration-status-list {
  display: grid;
  gap: 8px;
}

.foundation-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.foundation-status-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #b77900;
  border-radius: 8px;
}

.foundation-status-card.is-ready {
  border-left-color: #0f8a72;
}

.foundation-status-card strong,
.foundation-status-card span {
  display: block;
}

.foundation-status-card strong {
  color: var(--ink);
  font-size: 14px;
}

.foundation-status-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.foundation-status-card em {
  padding: 5px 9px;
  color: #7a4b00;
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.foundation-status-card.is-ready em {
  color: #0b5f55;
  background: var(--teal-soft);
}

.formal-task-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.formal-task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 11px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #b77900;
  border-radius: 8px;
}

.formal-task-card.is-ready {
  border-left-color: #0f8a72;
}

.formal-task-card strong,
.formal-task-card span {
  display: block;
}

.formal-task-card strong {
  color: var(--ink);
  font-size: 14px;
}

.formal-task-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.formal-task-card em {
  padding: 5px 9px;
  color: #7a4b00;
  background: var(--amber-soft);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.formal-task-card.is-ready em {
  color: #0b5f55;
  background: var(--teal-soft);
}

.formal-task-card .btn {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.formal-job-list {
  margin-top: 8px;
}

.formal-job-row {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.formal-job-row strong {
  color: var(--ink);
  font-size: 13px;
}

.formal-job-row span,
.formal-job-row small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sample-library-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.readiness-row,
.sample-library-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
  border-radius: 8px;
}

.readiness-row.is-ready,
.sample-library-card.is-ready {
  border-left-color: #0f8a72;
}

.readiness-row.is-warning,
.sample-library-card.is-warning {
  border-left-color: #b77900;
}

.readiness-row strong,
.sample-library-card strong {
  color: var(--ink);
  font-size: 14px;
}

.readiness-row span,
.sample-library-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.acceptance-test-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.acceptance-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: start;
  padding: 12px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.acceptance-step span {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #0b5f55;
  background: var(--teal-soft);
  border-radius: 8px;
  font-weight: 900;
}

.acceptance-step strong {
  color: var(--ink);
  font-size: 14px;
}

.acceptance-step small {
  color: var(--muted);
  line-height: 1.4;
}

.integration-status-panel {
  grid-column: 1 / -1;
}

.integration-status-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.integration-status-legend {
  grid-column: 1 / -1;
  padding: 8px 10px;
  color: #0b5a9c;
  background: #edf5ff;
  border: 1px solid #cfe4ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.integration-status-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #b77900;
  border-radius: 8px;
}

.integration-status-card.is-ready {
  border-left-color: #0f8a72;
}

.integration-status-card strong,
.integration-status-card span,
.integration-status-card em,
.integration-status-card small {
  display: block;
}

.integration-status-card strong {
  color: var(--ink);
  font-size: 14px;
}

.integration-status-card span,
.integration-status-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.integration-status-card em {
  width: fit-content;
  padding: 4px 8px;
  color: #0b5f55;
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.integration-status-card.is-demo em {
  color: #7a4b00;
  background: var(--amber-soft);
}

.ops-disclosure {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ops-disclosure summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
}

.deployment-readiness-disclosure > summary {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.deployment-readiness-disclosure > summary .badge {
  align-self: center;
  white-space: nowrap;
}

.ops-disclosure summary::-webkit-details-marker {
  display: none;
}

.ops-disclosure summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-weight: 900;
}

.ops-disclosure[open] summary::after {
  content: "-";
}

.ops-disclosure summary span {
  min-width: 0;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.ops-disclosure summary small {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.ops-disclosure:not([open]) > :not(summary) {
  display: none !important;
}

.ops-disclosure.compact {
  background: var(--surface-soft);
}

.ops-disclosure.compact > .rule-list {
  padding: 0 10px 10px;
}

.ops-direct-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ops-direct-title {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
}

.ops-direct-title span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
}

.ops-direct-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.dashboard-secondary-drawer {
  margin-top: 14px;
  background: transparent;
  border-color: #e0e7ef;
}

.dashboard-secondary-drawer > summary {
  background: #ffffff;
  border-radius: 8px;
}

.dashboard-secondary-drawer[open] > summary {
  margin-bottom: 12px;
}

.dashboard-secondary-grid {
  margin-top: 12px;
}

.dashboard-secondary-grid .panel {
  box-shadow: none;
}

.settings-admin-disclosure label,
.settings-admin-disclosure .permission-summary,
.settings-admin-disclosure .audit-trail-list,
.backup-history-disclosure #backupList {
  margin: 0 12px 12px;
}

.settings-admin-disclosure {
  align-self: start;
}

.backup-history-disclosure {
  margin: 12px 0 0;
}

.template-preview {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  background: #f7fbff;
  border: 1px solid #cfe4ff;
  border-radius: 8px;
}

.template-preview[hidden] {
  display: none;
}

.template-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.template-preview-head strong {
  color: var(--ink);
  font-size: 14px;
}

.template-preview-head span {
  color: var(--muted);
  font-size: 12px;
}

.ocr-fallback-panel {
  margin: 0 0 12px;
}

.ocr-fallback-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 10px 10px;
}

.ocr-fallback-actions span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.manual-edit-panel {
  margin-top: 12px;
}

.manual-edit-panel .correction-form {
  margin-top: 0;
  padding: 0 10px 10px;
  border-top: 0;
}

.dropzone .icon {
  width: 38px;
  height: 38px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 8px;
}

.dropzone strong,
.dropzone small {
  display: block;
}

.dropzone small {
  color: var(--muted);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.segmented.small {
  flex-wrap: nowrap;
}

.segmented button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.segmented button.is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.mini-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.mini-summary div {
  padding: 11px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.mini-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.detail-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: grid;
  gap: 5px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
}

.detail-list dd {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.expense-review-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid #d9e7f7;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
}

.expense-review-summary strong {
  color: var(--ink);
  font-size: 14px;
}

.expense-review-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.expense-review-summary.is-warning {
  background: #fffaf0;
  border-color: #f1d9a8;
  border-left-color: #bf7a00;
}

.expense-review-summary.is-attention {
  background: #fff7f7;
  border-color: #ffd1d1;
  border-left-color: #c84b4b;
}

.expense-review-summary.is-success {
  background: #f3fbf8;
  border-color: #cae8dd;
  border-left-color: #0f8a72;
}

.detail-folded {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-folded summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 11px;
  list-style: none;
  cursor: pointer;
}

.detail-folded summary::-webkit-details-marker {
  display: none;
}

.detail-folded summary::after {
  content: "展开";
  color: #0a4a91;
  font-size: 12px;
  font-weight: 900;
}

.detail-folded[open] summary::after {
  content: "收起";
}

.detail-folded summary strong,
.detail-folded summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-folded summary strong {
  color: var(--text);
  font-size: 14px;
}

.detail-folded summary span {
  grid-column: 1 / 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-folded-body {
  display: grid;
  gap: 8px;
  padding: 0 11px 10px;
}

.ocr-check {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  margin-bottom: 14px;
}

.check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  background: var(--green-soft);
  border: 1px solid #c7dfcf;
  border-radius: 8px;
}

.check-row.compact {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
}

.check-row.compact::before {
  display: none;
}

.check-row.compact strong,
.check-row.compact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-row.warning {
  background: var(--amber-soft);
  border-color: #e4cfa7;
}

.check-row.danger {
  background: var(--coral-soft);
  border-color: #e4bcb5;
}

.check-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.check-row span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.ocr-diagnostic {
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ocr-diagnostic summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.ocr-diagnostic summary::-webkit-details-marker {
  display: none;
}

.ocr-diagnostic summary::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-weight: 900;
}

.ocr-diagnostic[open] summary::before {
  content: "-";
}

.ocr-diagnostic summary span {
  flex: 1;
}

.ocr-diagnostic .text-btn {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
}

.diagnostic-grid {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.diagnostic-grid div {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.diagnostic-grid strong {
  font-size: 12px;
}

.diagnostic-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ocr-diagnostic pre {
  max-height: 190px;
  margin: 10px 0 0;
  padding: 10px;
  overflow: auto;
  color: #3a3a3c;
  background: #f8f9f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.correction-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.correction-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.correction-form label:nth-child(1),
.correction-form label:nth-child(3),
.correction-actions {
  grid-column: 1 / -1;
}

.correction-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 2px;
}

.mapping-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.voucher-rule-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.voucher-rule-card {
  display: grid;
  gap: 5px;
  min-height: 88px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.voucher-rule-card strong,
.voucher-rule-card span,
.voucher-rule-card small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.voucher-rule-card strong {
  color: #0a4a91;
  white-space: nowrap;
}

.voucher-rule-card span,
.voucher-rule-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.voucher-template-panel {
  margin-bottom: 16px;
}

.voucher-template-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.voucher-template-summary::-webkit-details-marker {
  display: none;
}

.voucher-template-summary::after {
  content: "展开";
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.voucher-template-panel[open] .voucher-template-summary::after {
  content: "收起";
}

.voucher-template-library {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.voucher-template-card {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.voucher-template-card strong {
  color: #0a4a91;
  font-size: 14px;
}

.voucher-template-card span,
.voucher-template-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.statement-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.statement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}

.statement-item.is-dual {
  grid-template-columns: minmax(0, 1fr) minmax(118px, auto) minmax(118px, auto);
}

.statement-item.is-triple {
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(108px, auto));
}

.statement-item.statement-head {
  min-height: 34px;
  background: #f1f5f9;
}

.statement-item.statement-head span,
.statement-item.statement-head strong {
  color: #536173;
  font-size: 12px;
  font-weight: 900;
}

.statement-item span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.statement-item strong {
  font-size: 14px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: nowrap;
}

.statement-item:last-child {
  border-bottom: 0;
}

.statement-item.is-section {
  min-height: 36px;
  background: var(--surface-soft);
}

.statement-item.is-section span {
  color: var(--ink);
  font-weight: 800;
}

.statement-item.is-total {
  background: #f8fafc;
}

.statement-item.is-total span,
.statement-item.is-total strong {
  color: var(--ink);
  font-weight: 900;
}

.report-all-statements-panel {
  margin-bottom: 16px;
}

.all-statements-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.statement-preview-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.statement-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.statement-preview-head div {
  display: grid;
  gap: 3px;
}

.statement-preview-head span,
.statement-preview-head em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.statement-preview-head strong {
  color: var(--ink);
  font-size: 15px;
}

.statement-preview-rows {
  display: grid;
  gap: 0;
}

.statement-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 31px;
  padding: 5px 0;
  border-bottom: 1px solid #eef2f6;
}

.statement-preview-row.is-dual {
  grid-template-columns: minmax(0, 1fr) minmax(70px, auto) minmax(70px, auto);
}

.statement-preview-row.is-triple {
  grid-template-columns: minmax(0, 1fr) repeat(3, minmax(62px, auto));
}

.statement-preview-head-row {
  min-height: 26px;
  padding: 4px 6px;
  background: #f1f5f9;
  border-bottom: 0;
  border-radius: 6px;
}

.statement-preview-head-row span,
.statement-preview-head-row strong {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.statement-preview-row:last-child {
  border-bottom: 0;
}

.statement-preview-row span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.statement-preview-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
}

.statement-preview-row.is-section {
  min-height: 28px;
  padding: 5px 6px;
  background: var(--surface-soft);
  border-bottom: 0;
  border-radius: 6px;
}

.statement-preview-row.is-section span {
  color: var(--ink);
  font-weight: 800;
}

.statement-preview-row.is-total {
  padding: 6px;
  background: #f8fafc;
  border-bottom: 0;
  border-radius: 6px;
}

.statement-preview-row.is-total span,
.statement-preview-row.is-total strong {
  color: var(--ink);
  font-weight: 900;
}

@media (max-width: 1280px) {
  .all-statements-grid {
    grid-template-columns: 1fr;
  }
}

.close-checklist-panel {
  margin-bottom: 12px;
}

.close-check-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.close-check-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.close-check-row:hover {
  background: #f4f8ff;
  border-color: #b7d4f3;
}

.close-check-row .status-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #ffffff;
  background: #147d64;
  border-radius: 8px;
  font-weight: 900;
}

.close-check-row.is-blocked .status-dot {
  background: #c2410c;
}

.close-check-row strong,
.close-check-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.close-check-row small {
  color: var(--muted);
  font-size: 12px;
}

.close-check-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.line-chart {
  position: relative;
  align-items: stretch;
  min-height: 260px;
}

.line-chart svg {
  width: 100%;
  height: 230px;
}

.line-chart text {
  fill: var(--muted);
  font-size: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 14px;
}

.cost-box {
  display: grid;
  gap: 10px;
}

.cost-box div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.cost-box span {
  color: var(--muted);
  font-size: 12px;
}

.cost-box strong {
  font-size: 14px;
}

.voucher-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  place-items: center;
  padding: 24px;
}

.voucher-modal.is-open {
  display: grid;
}

.voucher-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(14, 20, 24, 0.56);
  backdrop-filter: blur(8px);
}

.work-drawer {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: none;
}

.work-drawer.is-open {
  display: block;
}

.work-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 27, 34, 0.18);
  backdrop-filter: blur(2px);
}

.work-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, calc(100vw - 24px));
  height: 100%;
  background: #ffffff;
  border-left: 1px solid #dfe5ed;
  box-shadow: -22px 0 58px rgba(18, 32, 52, 0.16);
}

.work-drawer-header,
.work-drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.work-drawer-header p,
.work-drawer-header strong {
  display: block;
  margin: 0;
}

.work-drawer-header p {
  color: #0f5da8;
  font-size: 12px;
  font-weight: 900;
}

.work-drawer-header strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  font-weight: 950;
}

.work-drawer-body {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  padding: 16px 18px;
  overflow: auto;
  background: #f7f9fc;
}

.work-drawer-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.work-drawer-summary article,
.work-drawer-checklist article,
.work-drawer-confirm {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
}

.work-drawer-summary article {
  padding: 10px;
}

.work-drawer-summary span,
.work-drawer-checklist span,
.work-drawer-section-title span,
.work-drawer-confirm dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.work-drawer-summary strong,
.work-drawer-checklist strong,
.work-drawer-section-title strong,
.work-drawer-confirm dd {
  color: var(--ink);
  font-weight: 900;
}

.work-drawer-summary strong,
.work-drawer-summary span {
  display: block;
  overflow-wrap: anywhere;
}

.work-drawer-checklist {
  display: grid;
  gap: 8px;
}

.work-drawer-checklist article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
}

.work-drawer-checklist em {
  padding: 5px 8px;
  color: #9a4f00;
  background: #fff2d7;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.work-drawer-confirm {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.work-drawer-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.work-drawer-confirm dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.work-drawer-confirm dl div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #edf1f5;
}

.work-drawer-confirm dt,
.work-drawer-confirm dd {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.work-drawer-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  background: #ffffff;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.voucher-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 26px 80px rgba(8, 15, 20, 0.26);
}

.voucher-modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  background: #f5f7fa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.voucher-modal-tabs button {
  min-height: 34px;
  padding: 6px 12px;
  color: #3f4650;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.voucher-modal-tabs button.is-active {
  color: #0a4a91;
  background: #ffffff;
  border-color: #cfe1f6;
  box-shadow: 0 6px 16px rgba(10, 74, 145, 0.1);
}

.voucher-modal-section {
  display: none;
}

.voucher-modal-section.is-active {
  display: grid;
  gap: 12px;
}

.voucher-next-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #f4fbf7;
  border: 1px solid #cfe8d8;
  border-radius: 8px;
}

.voucher-next-actions[hidden] {
  display: none;
}

.voucher-next-actions span {
  color: #176145;
  font-size: 13px;
  font-weight: 900;
}

.row-attachment-btn {
  min-height: 30px;
  padding: 4px 8px;
  white-space: nowrap;
}

.voucher-dialog-head,
.voucher-dialog-actions,
.voucher-line-toolbar,
.voucher-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voucher-dialog-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.voucher-dialog-head p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.voucher-dialog-head strong {
  font-size: 20px;
}

.voucher-source-meta,
.voucher-rule-meta {
  padding: 10px 12px;
  color: #37424c;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.voucher-rule-meta {
  display: grid;
  gap: 4px;
  background: #f8f9fb;
}

.voucher-rule-meta span {
  color: var(--muted);
  font-size: 12px;
}

.voucher-rule-meta strong {
  color: var(--text);
  font-size: 13px;
}

.voucher-chain-trace {
  display: grid;
  gap: 8px;
}

.voucher-chain-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #0f8a72;
  border-radius: 8px;
}

.voucher-chain-step.is-waiting {
  border-left-color: #b77900;
}

.voucher-chain-step > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #0a4a91;
  background: var(--blue-soft);
  border-radius: 8px;
  font-weight: 900;
}

.voucher-chain-step strong,
.voucher-chain-step small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.voucher-chain-step strong {
  font-size: 14px;
}

.voucher-chain-step small {
  color: var(--muted);
  font-size: 12px;
}

.voucher-chain-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.voucher-attachment-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.voucher-attachment-head,
.attachment-card,
.attachment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voucher-attachment-head {
  justify-content: space-between;
}

.voucher-attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-card {
  justify-content: space-between;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.attachment-card:hover,
.attachment-card:focus-visible {
  background: #f8fbff;
  border-color: #b7d4f3;
  outline: none;
}

.attachment-card > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attachment-card span,
.attachment-detail-head span {
  color: var(--muted);
  font-size: 12px;
}

.attachment-card strong,
.attachment-detail-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-card small {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.attachment-actions {
  flex: 0 0 auto;
}

.voucher-attachment-detail {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attachment-detail-head {
  display: grid;
  gap: 2px;
}

.panel-title-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.attachment-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.attachment-preview-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 10px;
}

.attachment-detail-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: #fff;
}

.attachment-detail-grid dt {
  color: var(--muted);
  font-size: 12px;
}

.attachment-detail-grid dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.voucher-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
}

.voucher-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.voucher-form-grid .span-2 {
  grid-column: span 2;
}

.voucher-line-toolbar {
  margin: 14px 0 10px;
}

.voucher-edit-table {
  min-width: 760px;
}

.voucher-edit-table input {
  min-height: 34px;
  background: #fff;
}

.amount-input {
  text-align: right;
}

.voucher-balance-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.voucher-balance-bar span {
  padding: 10px 12px;
  background: #f8faf6;
  color: var(--muted);
  font-size: 13px;
}

.voucher-balance-bar strong {
  color: var(--ink);
}

.voucher-balance-bar.is-balanced span:last-child {
  color: var(--green);
  background: var(--green-soft);
  font-weight: 900;
}

.voucher-balance-bar.is-unbalanced span:last-child {
  color: var(--coral);
  background: var(--coral-soft);
  font-weight: 900;
}

.voucher-modal-footer {
  justify-content: flex-end;
  margin-top: 14px;
}

.voucher-modal-footer [hidden] {
  display: none;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  color: #fff;
  background: #253c35;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.file-output-feedback {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 11;
  display: grid;
  gap: 12px;
  width: min(480px, calc(100vw - 36px));
  padding: 14px;
  color: #1f2329;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-top: 4px solid #0f6bc6;
  border-radius: 12px;
  box-shadow: 0 22px 52px rgba(22, 28, 36, 0.16);
}

.file-output-feedback[hidden] {
  display: none;
}

.ledger-setup-next-panel {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 12;
  display: grid;
  gap: 12px;
  width: min(520px, calc(100vw - 36px));
  padding: 14px;
  color: #1f2329;
  background: #ffffff;
  border: 1px solid #d9e5f3;
  border-top: 4px solid #0f6bc6;
  border-radius: 12px;
  box-shadow: 0 22px 52px rgba(22, 28, 36, 0.16);
}

.ledger-setup-next-panel[hidden] {
  display: none;
}

.ledger-next-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.ledger-next-head span,
.ledger-next-head small,
.ledger-next-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ledger-next-head strong {
  display: block;
  margin: 2px 0;
  font-size: 18px;
  line-height: 1.25;
}

.ledger-next-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ledger-next-actions button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 50px;
  padding: 10px;
  text-align: left;
  background: #f8fbff;
  border: 1px solid #dbe9f8;
  border-radius: 8px;
}

.ledger-next-actions button:hover {
  background: #eef6ff;
  border-color: #b8d5f5;
}

.ledger-next-actions button.is-primary {
  color: #ffffff;
  background: #0f6bc6;
  border-color: #0f6bc6;
  box-shadow: 0 12px 24px rgba(15, 107, 198, 0.18);
}

.ledger-next-actions button.is-primary:hover {
  background: #0a5db1;
  border-color: #0a5db1;
}

.ledger-next-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #0b5ba7;
  background: #e7f1ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.ledger-next-actions button.is-primary span {
  color: #0756a3;
  background: #ffffff;
}

.ledger-next-actions strong {
  overflow: hidden;
  color: #1f2329;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-next-actions button.is-primary strong {
  color: #ffffff;
}

@media (max-width: 640px) {
  .ledger-setup-next-panel {
    right: 12px;
    bottom: 68px;
    width: calc(100vw - 24px);
  }

  .ledger-next-actions {
    grid-template-columns: 1fr;
  }
}

.file-output-feedback-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.file-output-feedback-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #09569f;
  background: #eaf4ff;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 900;
}

.file-output-feedback-copy {
  min-width: 0;
}

.file-output-feedback strong {
  display: block;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.file-output-feedback-name {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.file-output-feedback-meta {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.file-output-feedback-meta div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
}

.file-output-feedback-meta dt,
.file-output-feedback-meta dd,
.file-output-feedback-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.file-output-feedback-meta dt {
  color: var(--muted);
  font-weight: 800;
}

.file-output-feedback-meta dd {
  color: var(--ink);
  font-weight: 850;
}

.file-output-feedback-note {
  color: var(--muted);
  font-weight: 750;
}

.file-output-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1180px) {
  .workspace-grid,
	  .documents-layout,
	  .expense-layout,
	  .cash-layout,
	  .settlement-layout,
	  .tax-layout,
  .voucher-layout,
  .reports-layout,
  .crm-layout,
  .settings-layout,
  .module-grid.two {
    grid-template-columns: 1fr;
  }

  .settings-layout .panel.wide,
  .settings-layout > .panel:not(.wide) {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .ledger-query-controls {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .ledger-query-title {
    grid-template-columns: 1fr;
  }

  .ledger-query-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-query-bar {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .asset-tabs {
    grid-column: 1 / -1;
  }

  .ledger-query-actions {
    grid-column: 1 / -1;
    justify-content: start;
  }

  .ledger-summary-strip {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .voucher-form-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .manual-voucher-controls,
  .payroll-manual-form,
  .salary-detail-fields {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

	  .attachment-detail-grid {
	    grid-template-columns: repeat(2, minmax(180px, 1fr));
	  }

	  .voucher-template-library {
	    grid-template-columns: repeat(2, minmax(0, 1fr));
	  }

  .voucher-form-grid .span-2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 14px;
  }

  .main-nav {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .nav-item {
    grid-template-columns: 24px minmax(96px, 1fr);
    width: auto;
    min-width: 154px;
  }

  .nav-item small {
    display: none;
  }

  .side-status {
    margin-top: 0;
  }

  .main {
    padding: 16px;
  }

  .topbar,
  .view-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions,
  .heading-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .period-picker {
    grid-template-columns: 1fr;
    min-width: 160px;
  }

  .global-search {
    width: 100%;
    grid-template-columns: 24px minmax(0, 1fr) 34px;
  }

  .search-results {
    left: 0;
    right: auto;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .stat-grid,
  .stat-grid.compact,
  .statement-grid,
  .form-grid,
  .correction-form,
  .mini-summary {
    grid-template-columns: 1fr;
  }

  .correction-form label:nth-child(1),
  .correction-form label:nth-child(3),
  .correction-actions {
    grid-column: auto;
  }

  .correction-actions {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 23px;
  }

  .view-heading h2 {
    font-size: 21px;
  }

  .btn,
  .file-btn {
    width: 100%;
  }

  .icon-btn {
    width: 42px;
  }

  .segmented.small {
    flex-wrap: wrap;
  }

  .bar-chart {
    min-height: 220px;
    overflow-x: auto;
  }

  .ledger-query-controls,
  .asset-query-bar,
  .ledger-query-summary,
  .ledger-summary-strip,
  .ledger-query-actions,
  .voucher-form-grid,
  .voucher-balance-bar,
  .manual-voucher-controls,
  .payroll-manual-form,
  .salary-detail-fields,
  .attachment-detail-grid {
    grid-template-columns: 1fr;
  }

  .manual-voucher-controls .span-2 {
    grid-column: auto;
  }

  .subject-quick-add-grid {
    grid-template-columns: 1fr;
  }

  .attachment-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .voucher-modal {
    padding: 12px;
  }

  .work-drawer-panel {
    width: 100%;
  }

  .work-drawer-summary {
    grid-template-columns: 1fr;
  }

  .work-drawer-confirm dl div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .voucher-dialog {
    max-height: calc(100vh - 24px);
  }

  .voucher-dialog-head,
  .voucher-modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .bar-item {
    flex: 0 0 42px;
  }

  .metric-card strong {
    font-size: 22px;
  }
}

/* Premium desktop operations theme */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #161b1f;
  --muted: #68727d;
  --line: #d9dee5;
  --line-strong: #b9c2cc;
  --teal: #00836f;
  --teal-soft: #e3f4f0;
  --green: #1f7a4d;
  --green-soft: #e4f2ea;
  --amber: #b56b00;
  --amber-soft: #f7ead4;
  --coral: #bd4a45;
  --coral-soft: #f7e2df;
  --blue: #2368bd;
  --blue-soft: #e1ebf8;
  --shadow: 0 10px 26px rgba(16, 24, 32, 0.07);
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  gap: 14px;
  padding: 16px;
  background: #171c20;
  border-right: 1px solid #2f3841;
}

.brand {
  padding: 6px 4px 10px;
}

.brand-mark {
  color: #ffffff;
  background: #000819;
  box-shadow: 0 8px 18px rgba(10, 102, 194, 0.14);
}

.brand strong {
  color: #f6f7f5;
  font-size: 20px;
}

.brand span {
  color: #9ba8b3;
}

.ledger-summary,
.side-status {
  color: #f4f7f6;
  background: #20272d;
  border-color: #313b45;
  box-shadow: none;
}

.ledger-summary p,
.side-status p,
.side-status div,
.ledger-summary label {
  color: #9ba8b3;
}

.ledger-summary strong,
.side-status strong {
  color: #f6f7f5;
}

.ledger-summary select {
  color: #f8faf9;
  background: #151a1f;
  border-color: #3a454f;
}

.main-nav {
  gap: 4px;
}

.nav-item {
  min-height: 48px;
  color: #d7dde2;
  border-radius: 8px;
}

.nav-item:hover {
  background: #222a31;
  border-color: #34404a;
}

.nav-item.is-active {
  color: #ffffff;
  background: #0f6d63;
  border-color: #22998b;
}

.nav-item small {
  display: none;
}

.nav-item.is-active small {
  color: #d6fffa;
}

.nav-group-toggle small,
.app-shell .eyebrow,
.panel-title p,
.module-map .module-eyebrow {
  display: none;
}

.side-status {
  border-left: 3px solid #d8b25a;
}

.main {
  padding: 18px 22px 28px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 66px;
  margin: -18px -22px 16px;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  font-size: 24px;
}

.eyebrow {
  color: #697684;
  font-weight: 800;
  text-transform: uppercase;
}

.module-map {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

.module-map button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 8px 10px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.module-map button:hover {
  border-color: #90a5b7;
  box-shadow: 0 8px 18px rgba(18, 29, 39, 0.08);
}

.module-map .module-eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.module-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.module-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.module-map strong {
  font-size: 14px;
  line-height: 1.35;
}

.module-map .module-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-map em {
  justify-self: start;
  padding: 3px 7px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.panel,
.metric-card {
  border-color: var(--line);
  box-shadow: 0 8px 22px rgba(24, 34, 45, 0.06);
}

.panel {
  padding: 14px;
}

.panel-title {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-title strong {
  font-size: 15px;
}

.metric-card {
  min-height: 112px;
  padding: 14px;
}

.metric-card strong {
  font-size: 23px;
}

.btn,
.icon-btn,
.text-btn,
.segmented button {
  border-radius: 8px;
}

.btn.primary {
  background: #0f6d63;
  border-color: #0f6d63;
}

.btn.primary:hover {
  background: #0b5c54;
}

table {
  min-width: 780px;
}

th {
  color: #5d6875;
  background: #eef2f5;
  text-transform: uppercase;
}

td {
  background: #fff;
}

tbody tr:hover,
tbody tr.is-selected {
  background: #edf7f4;
}

tbody tr:hover td,
tbody tr.is-selected td {
  background: #edf7f4;
}

.status-pill,
.badge {
  border-radius: 999px;
}

.dropzone {
  background: #f5f7f9;
  border-color: #99a9b8;
}

.dropzone:hover {
  background: #eef8f5;
}

@media (max-width: 1180px) {
  .module-map {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .sidebar {
    background: #171c20;
  }

  .topbar {
    margin: -16px -16px 14px;
    padding: 14px 16px;
  }

  .module-map {
    grid-template-columns: 1fr;
  }
}

/* Neutral system finance theme */
:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: #dedee3;
  --line-strong: #c7c7cc;
  --teal: #0a66c2;
  --teal-soft: #eaf2fc;
  --green: #248a3d;
  --green-soft: #eaf6ee;
  --amber: #b26a00;
  --amber-soft: #f8eedf;
  --coral: #c2474c;
  --coral-soft: #f9e7e8;
  --blue: #0a66c2;
  --blue-soft: #eaf2fc;
  --rose: #77757d;
  --rose-soft: #f1f1f4;
  --gold: #8e8e93;
  --shadow: 0 12px 30px rgba(29, 29, 31, 0.08);
}

body {
  background: #f5f5f7;
}

.sidebar {
  background: #fbfbfd;
  border-right: 1px solid #e2e2e7;
  box-shadow: 10px 0 28px rgba(29, 29, 31, 0.04);
}

.brand-mark {
  color: #ffffff;
  background: #000819;
  box-shadow: 0 8px 18px rgba(10, 102, 194, 0.14);
}

.brand strong {
  color: #1d1d1f;
}

.brand span {
  color: #6e6e73;
}

.ledger-summary,
.side-status {
  color: var(--ink);
  background: #ffffff;
  border-color: #e2e2e7;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.05);
}

.ledger-summary p,
.side-status p,
.side-status div,
.ledger-summary label {
  color: #6e6e73;
}

.ledger-summary strong,
.side-status strong {
  color: #1d1d1f;
}

.ledger-summary select {
  color: var(--ink);
  background: #ffffff;
  border-color: #c7d1ce;
}

.main-nav {
  gap: 6px;
}

.nav-group-toggle {
  color: #6e6e73;
  background: #ffffff;
  border-color: #e2e2e7;
}

.nav-group-toggle:hover {
  background: #f1f1f4;
  border-color: #d8d8de;
}

.nav-group-toggle span:first-child {
  color: #3a3a3c;
}

.nav-group-toggle small {
  color: #8e8e93;
}

.nav-extension-body {
  border-left-color: #e5e5ea;
}

.nav-item {
  color: #3a3a3c;
  background: transparent;
}

.nav-item:hover {
  background: #f1f1f4;
  border-color: #d8d8de;
}

.nav-item.is-active {
  color: #0a4a91;
  background: #eaf2fc;
  border-color: #b7d4f3;
  box-shadow: inset 4px 0 0 #0a66c2;
}

.nav-item-featured {
  background: #f7fbff;
  border-color: #d7e8fb;
}

.nav-item-secondary {
  min-height: 44px;
}

.nav-extension-actions button {
  color: #0a4a91;
  background: #f4f8ff;
  border-color: #d7e8fb;
}

.nav-item small {
  color: #8e8e93;
}

.nav-item.is-active small {
  color: #3f78b5;
}

.side-status {
  border-left: 3px solid #0a66c2;
}

.topbar {
  background: rgba(251, 251, 253, 0.94);
  border-bottom-color: #e2e2e7;
  box-shadow: 0 10px 30px rgba(29, 29, 31, 0.05);
}

.eyebrow {
  color: #6e6e73;
}

.global-search,
.btn,
.icon-btn,
.text-btn,
.segmented button,
select,
input {
  background: #ffffff;
  border-color: #c7c7cc;
}

.global-search {
  box-shadow: 0 8px 18px rgba(29, 29, 31, 0.04);
}

.btn:hover,
.icon-btn:hover,
.text-btn:hover,
.segmented button:hover {
  background: #f1f1f4;
  border-color: #c7c7cc;
}

.btn.primary {
  color: #ffffff;
  background: #0a66c2;
  border-color: #0a66c2;
  box-shadow: 0 10px 18px rgba(10, 102, 194, 0.16);
}

.btn.primary:hover {
  background: #084f99;
}

.panel,
.metric-card,
.module-map button {
  background: #ffffff;
  border-color: #e2e2e7;
  box-shadow: 0 10px 24px rgba(29, 29, 31, 0.05);
}

.panel-title {
  border-bottom-color: #e7e7ec;
}

.metric-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fb 100%);
}

.metric-card span,
.panel-title p {
  color: #6e6e73;
}

.module-map button:hover {
  border-color: #b7d4f3;
  box-shadow: 0 12px 22px rgba(10, 102, 194, 0.1);
}

.module-map span,
.search-result small,
.badge {
  color: #0a4a91;
  background: #eaf2fc;
}

.badge.success {
  color: #2c765c;
  background: #e8f3ee;
}

.badge.warning {
  color: #9a641e;
  background: #f7ecd9;
}

.badge.danger {
  color: #bd5367;
  background: #f8e6eb;
}

th {
  color: #6e6e73;
  background: #f2f2f7;
}

td {
  background: #ffffff;
}

tbody tr:hover,
tbody tr.is-selected,
tbody tr:hover td,
tbody tr.is-selected td {
  background: #f2f6fb;
}

.search-results,
.search-result,
.attachment-card,
.voucher-attachment-detail,
.attachment-detail-grid div,
.voucher-dialog,
.voucher-edit-table input {
  background: #ffffff;
}

.search-result:hover,
.search-result.is-active {
  background: #f2f6fb;
  border-color: #b7d4f3;
}

.dropzone {
  background: #f8f9fb;
  border-color: #c7c7cc;
}

.dropzone:hover {
  background: #f2f6fb;
  border-color: #b7d4f3;
}

.task-row .icon-chip {
  color: #0a4a91;
  background: #eaf2fc;
}

.task-row,
.insight-row,
.sync-row,
.match-row,
.mapping-row,
.timeline-row,
.setup-list div,
.rule-list div,
.ledger-summary-item,
.voucher-balance-bar span,
.voucher-attachment-panel,
.voucher-source-meta,
.voucher-rule-meta,
.standard-rule-summary div {
  background: #f8f9fb;
  border-color: #e2e2e7;
}

.ledger-book-row.is-openable td:nth-child(2),
.ledger-book-row.is-openable td:nth-child(3) {
  color: #0a4a91;
}

.ledger-book-row.is-openable:hover td {
  background: #f2f6fb;
}

.bar-chart,
.line-chart {
  background: #f8f9fb;
  border-color: #e2e2e7;
}

.bar {
  background: linear-gradient(180deg, #0a66c2, #8e8e93);
}

.status-ok {
  color: #2c765c;
  background: #e8f3ee;
}

.status-warn {
  color: #9a641e;
  background: #f7ecd9;
}

.status-info {
  color: #4b6fa8;
  background: #e8eef8;
}

.status-danger {
  color: #bd5367;
  background: #f8e6eb;
}

.toast {
  background: #2c2c2e;
  box-shadow: 0 16px 34px rgba(29, 29, 31, 0.24);
}

@media (max-width: 900px) {
  .sidebar {
    background: #fbfbfd;
  }
}

.compact-select,
.subject-builder-grid label,
.subject-upload-grid label,
.backup-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.compact-select {
  min-width: 96px;
}

.heading-actions .action-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 41px;
}

.heading-actions .action-select span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.heading-actions .action-select select {
  min-width: 96px;
  min-height: 41px;
  padding: 0 34px 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.insight-action-row {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.insight-action-row:hover {
  background: #f4f8ff;
  border-color: #b7d4f3;
}

.ledger-query-actions {
  grid-template-columns: repeat(4, auto);
}

.ledger-query-controls {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.ledger-query-actions {
  grid-column: 1 / -1;
  justify-content: end;
}

.subject-builder-grid,
.subject-upload-grid,
.backup-controls {
  display: grid;
  gap: 10px;
  align-items: end;
}

.subject-builder-grid {
  grid-template-columns: minmax(100px, 0.7fr) minmax(180px, 1.5fr) minmax(100px, 0.7fr) minmax(120px, 0.9fr) minmax(160px, 1.2fr) auto;
}

.subject-upload-grid {
  grid-template-columns: minmax(120px, 0.7fr) minmax(300px, 1.8fr);
}

.subject-upload-grid .btn {
  justify-content: center;
}

.upload-card {
  position: relative;
  min-height: 74px;
  padding: 12px 14px 12px 54px;
  border: 1px dashed #aeb4bd;
  border-radius: 8px;
  background: #fbfbfd;
  cursor: pointer;
}

.upload-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-card strong,
.upload-card small {
  display: block;
}

.upload-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.upload-plus {
  position: absolute;
  left: 14px;
  top: 18px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #0a66c2;
  font-weight: 900;
}

.template-file-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8f9fb;
  color: var(--muted);
  font-size: 13px;
}

.template-file-hint a {
  color: #0a66c2;
  font-weight: 800;
  text-decoration: none;
}

.subject-balance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.backup-controls {
  grid-template-columns: 1fr auto auto;
}

.subject-chip-list,
.backup-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.legacy-import-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.legacy-profile-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  background: #f8f9fb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legacy-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.legacy-profile-head span:not(.badge) {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legacy-profile-head strong {
  color: var(--ink);
  font-size: 14px;
}

.legacy-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.legacy-profile-grid div,
.cashflow-project-row {
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legacy-profile-grid span,
.cashflow-project-row span:not(.badge) {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.legacy-profile-grid strong,
.cashflow-project-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.legacy-import-warning {
  margin: 12px 0;
  padding: 10px 12px;
  color: #6f4b00;
  background: #fff7df;
  border: 1px solid #f2d28a;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.legacy-migration-progress,
.legacy-migration-summary,
.legacy-auxiliary-grid,
.legacy-difference-list,
.legacy-difference-workbench,
.legacy-review-workbench,
.file-output-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.legacy-migration-panel {
  min-width: 0;
}

.legacy-migration-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 10px;
  align-items: end;
  margin-top: 10px;
}

.legacy-migration-toolbar label,
.legacy-migration-toolbar small {
  min-width: 0;
}

.legacy-migration-toolbar small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legacy-migration-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-migration-actions .btn {
  min-height: 36px;
}

.migration-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.migration-progress-head strong,
.migration-progress-head em {
  color: var(--ink);
  font-size: 15px;
  font-style: normal;
  font-weight: 900;
}

.migration-progress-head span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.migration-progress-track {
  height: 8px;
  overflow: hidden;
  background: #e8edf3;
  border-radius: 999px;
}

.migration-progress-track span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0f8a72, #156dcc);
  border-radius: inherit;
}

.migration-step-grid,
.legacy-migration-summary,
.legacy-auxiliary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.migration-step-grid {
  display: grid;
  gap: 8px;
}

.migration-step-grid article,
.legacy-migration-summary article,
.legacy-aux-card,
.legacy-difference-list article {
  min-width: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.migration-step-grid article {
  border-left: 4px solid #cbd5e1;
}

.migration-step-grid article.is-ready {
  border-left-color: #0f8a72;
}

.migration-step-grid strong,
.legacy-migration-summary strong,
.legacy-aux-card strong,
.legacy-difference-list strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.migration-step-grid span,
.legacy-migration-summary span,
.legacy-migration-summary small,
.legacy-aux-card span,
.legacy-aux-card small,
.legacy-difference-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.legacy-migration-summary small {
  margin-top: 3px;
  font-weight: 750;
}

.legacy-aux-card,
.legacy-difference-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.legacy-aux-card em,
.legacy-difference-list em {
  padding: 6px 9px;
  color: #09569f;
  background: #eaf4ff;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.legacy-difference-list article.is-ready {
  border-left: 4px solid #0f8a72;
}

.legacy-difference-list article.is-warning {
  border-left: 4px solid #b77900;
}

.legacy-difference-workbench,
.legacy-review-workbench {
  grid-template-columns: 1fr;
}

.legacy-review-card,
.file-output-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid #b77900;
  border-radius: 8px;
}

.legacy-review-card.is-reviewed {
  border-left-color: #0f8a72;
  background: #fbfdfb;
}

.legacy-review-main {
  min-width: 0;
}

.legacy-review-main strong,
.file-output-row strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.legacy-review-main span,
.legacy-review-main small,
.file-output-row span,
.file-output-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.legacy-review-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.legacy-review-actions em,
.file-output-row em {
  padding: 6px 9px;
  color: #09569f;
  background: #eaf4ff;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.file-output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.file-output-row {
  border-left-color: #0f6bc6;
}

.legacy-capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.native-upgrade-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.legacy-subtitle {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 8px;
}

.legacy-subtitle strong {
  color: var(--ink);
  font-size: 15px;
}

.legacy-subtitle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.auxiliary-type-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.auxiliary-type-chip {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 0;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auxiliary-type-chip > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.auxiliary-type-chip strong,
.auxiliary-type-chip small {
  display: block;
  overflow-wrap: anywhere;
}

.auxiliary-type-chip strong {
  color: var(--ink);
  font-size: 13px;
}

.auxiliary-type-chip small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.legacy-capability-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px 12px;
  background: #f8f9fb;
  border: 1px solid #e2e2e7;
  border-radius: 8px;
}

.legacy-capability-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.legacy-capability-card span:not(.badge) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cashflow-project-list {
  display: grid;
  gap: 8px;
}

.cashflow-project-panel > .cashflow-project-list {
  padding: 0 12px 12px;
}

.cashflow-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.voucher-type-grid {
  display: grid;
  gap: 0;
  margin-bottom: 10px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e0e4eb;
  border-radius: 8px;
}

.voucher-type-row {
  display: grid;
  grid-template-columns: 52px minmax(96px, 0.8fr) minmax(150px, 1.2fr);
  gap: 10px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf0f4;
}

.voucher-type-row:last-child {
  border-bottom: 0;
}

.voucher-type-row:hover {
  background: #f8fbff;
}

.voucher-type-code {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 26px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 950;
}

.voucher-type-row strong,
.voucher-type-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voucher-type-row strong {
  color: #20242a;
  font-size: 13px;
}

.voucher-type-row small {
  color: #747b86;
  font-size: 12px;
}

.voucher-control-panel {
  margin-bottom: 16px;
}

.voucher-control-folded {
  align-content: start;
}

.voucher-control-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 10px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.voucher-control-summary::-webkit-details-marker {
  display: none;
}

.voucher-control-summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #0a66c2;
  background: #eaf2fc;
  border-radius: 999px;
  font-weight: 900;
}

.voucher-control-folded[open] .voucher-control-summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.voucher-control-folded[open] .voucher-control-summary::after {
  content: "-";
}

.voucher-control-summary p {
  display: none;
}

.voucher-control-summary strong {
  font-size: 15px;
}

.voucher-control-body {
  display: grid;
  gap: 10px;
  padding-top: 10px;
}

.voucher-control-ref {
  display: grid;
  gap: 2px;
  min-width: 120px;
}

.voucher-control-ref strong,
.voucher-control-ref span {
  display: block;
  overflow-wrap: anywhere;
}

.voucher-control-ref strong {
  color: var(--ink);
  font-size: 13px;
}

.voucher-control-ref span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.subject-chip,
.backup-row,
.backup-status {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8f9fb;
}

.subject-chip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.subject-chip strong,
.backup-row strong,
.backup-status strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.subject-chip span,
.backup-row span,
.backup-status span {
  color: var(--muted);
  font-size: 12px;
}

.voucher-row.is-openable {
  cursor: pointer;
}

.voucher-row.is-openable:hover td {
  background: #f2f6fb;
}

.print-root {
  display: none;
}

@media print {
  body.print-mode > *:not(.print-root) {
    display: none !important;
  }

  body.print-mode {
    background: #fff !important;
  }

  .print-root {
    display: block;
    color: #111;
    font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  }

  .print-page {
    break-after: page;
    page-break-after: always;
  }

  .print-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .print-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
    border-bottom: 2px solid #222;
    padding-bottom: 8px;
  }

  .print-head h1 {
    margin: 0;
    font-size: 18px;
  }

  .print-meta,
  .print-subtitle {
    color: #555;
    font-size: 11px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
  }

  .print-table th,
  .print-table td {
    border: 1px solid #555;
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
  }

  .print-table th {
    background: #f1f1f1;
  }

  .voucher-print-sheet {
    display: grid;
    gap: 10px;
  }

  .voucher-print-title {
    display: grid;
    justify-items: center;
    gap: 2px;
    color: #111;
  }

  .voucher-print-title h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
  }

  .voucher-print-title p {
    margin: 0;
    color: #555;
    font-size: 11px;
    font-weight: 700;
  }

  .voucher-print-meta-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr 1fr 0.8fr;
    gap: 10px;
    align-items: end;
  }

  .voucher-print-meta-grid div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #777;
    font-size: 11px;
  }

  .voucher-print-meta-grid span {
    color: #555;
    font-weight: 700;
  }

  .voucher-print-meta-grid strong {
    overflow: hidden;
    color: #111;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .voucher-print-entry-table th,
  .voucher-print-entry-table td {
    height: 32px;
    padding: 6px 8px;
  }

  .voucher-print-entry-table th:nth-child(1),
  .voucher-print-entry-table td:nth-child(1) {
    width: 28%;
  }

  .voucher-print-entry-table th:nth-child(2),
  .voucher-print-entry-table td:nth-child(2) {
    width: 34%;
  }

  .voucher-print-entry-table th:nth-child(3),
  .voucher-print-entry-table th:nth-child(4),
  .voucher-print-entry-table td:nth-child(3),
  .voucher-print-entry-table td:nth-child(4) {
    width: 19%;
    text-align: right;
  }

  .voucher-print-total-table {
    margin-top: -1px;
  }

  .voucher-print-total-table th,
  .voucher-print-total-table td {
    height: 28px;
    padding: 5px 8px;
  }

  .voucher-print-meta-table {
    margin-top: 8px;
  }

  .print-amount {
    text-align: right !important;
    white-space: nowrap;
  }
}

@media (max-width: 1180px) {
  .subject-builder-grid,
  .subject-upload-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .subject-builder-grid .btn {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .ledger-query-actions,
  .backup-controls {
    grid-template-columns: 1fr;
  }

  .subject-builder-grid,
  .subject-upload-grid,
  .subject-balance-summary,
  .legacy-import-summary,
  .legacy-profile-grid,
  .legacy-capability-list,
  .native-upgrade-list,
  .auxiliary-type-list,
  .migration-step-grid,
  .legacy-migration-summary,
  .legacy-auxiliary-grid,
  .voucher-type-grid {
    grid-template-columns: 1fr;
  }

  .legacy-subtitle {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 980px) {
  .login-page {
    grid-template-columns: 1fr;
    padding: 18px;
    overflow-y: auto;
  }

  .login-brand-panel {
    min-height: auto;
    gap: 40px;
  }

  .login-signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 20px;
    padding-top: 0;
  }

  .login-card {
    align-self: start;
    width: 100%;
  }
}

@media (max-width: 560px) {
  body.auth-locked {
    overflow: auto;
  }

  .login-page {
    padding: 12px;
  }

  .login-brand-panel,
  .login-card {
    border-radius: 18px;
    padding: 22px;
  }

  .login-signal-grid {
    grid-template-columns: 1fr;
  }

  .login-hero h1 {
    font-size: 28px;
    line-height: 1.18;
  }

  .login-inline {
    grid-template-columns: 1fr;
  }

  .login-trust {
    display: grid;
  }
}

@media (min-width: 760px) {
  body.auth-locked {
    overflow: hidden;
  }

  .login-page {
    grid-template-columns: minmax(520px, 1fr) minmax(400px, 500px) !important;
    min-height: 100vh;
    height: 100vh;
    align-items: center;
    gap: clamp(20px, 3vw, 38px);
    padding: clamp(18px, 2.4vw, 34px);
    overflow: hidden;
  }

  .login-brand-panel {
    min-height: calc(100vh - clamp(36px, 4.8vw, 68px));
    padding: clamp(30px, 3.4vw, 48px);
  }

  .login-logo {
    width: 68px;
    height: auto;
    border-radius: 17px;
  }

  .login-brand strong {
    font-size: 27px;
  }

  .login-brand span {
    font-size: 13px;
  }

  .login-hero {
    margin-top: clamp(82px, 13vh, 130px);
    max-width: 680px;
  }

  .login-hero h1 {
    max-width: 680px;
    font-size: 46px;
    line-height: 1.12;
  }

  .login-card {
    align-self: center;
    gap: 20px;
    width: min(100%, 500px);
    max-height: calc(100vh - clamp(36px, 4.8vw, 68px));
    padding: clamp(28px, 3vw, 40px);
    overflow: auto;
    border-radius: 24px;
  }

  .login-card-head h2 {
    font-size: 34px;
  }

  .login-form {
    gap: 14px;
  }

  .login-form input,
  .login-form select {
    min-height: 52px;
    border-radius: 15px;
  }

  .login-submit,
  .login-demo-entry {
    min-height: 52px;
    border-radius: 15px;
  }

  .login-trust {
    padding-top: 10px;
  }
}

@media (max-width: 759px) {
  body.auth-locked {
    overflow: auto;
  }

  .login-page {
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 12px;
    overflow: auto;
  }
}

.app-shell .nav-item small,
.app-shell .nav-group-toggle small,
.app-shell .eyebrow,
.app-shell .panel-title p,
.app-shell .module-map .module-eyebrow {
  display: none !important;
}

.app-shell .main {
  padding: 16px 18px 22px;
}

.app-shell .topbar {
  box-sizing: border-box;
  margin-right: -12px;
  margin-left: -12px;
  min-height: 56px;
  margin-bottom: 10px;
  padding-right: 12px;
  padding-left: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.app-shell .topbar h1 {
  font-size: 22px;
}

.app-shell .view-heading {
  align-items: center;
  margin-bottom: 8px;
}

.app-shell .view-heading h2 {
  font-size: 23px;
  line-height: 1.16;
}

.app-shell .view-heading h2 {
  display: none !important;
}

.app-shell .view-heading:has(> div > h2):not(:has(.heading-actions)):not(:has(.module-primary-actions)) {
  display: none;
}

.app-shell #documents {
  max-width: 100%;
  overflow-x: clip;
}

.app-shell .documents-layout {
  align-items: start;
  grid-template-columns:
    minmax(300px, 360px)
    minmax(620px, 1fr)
    minmax(320px, 380px);
  max-width: 100%;
}

.app-shell .documents-layout > .panel {
  min-width: 0;
}

.app-shell .documents-layout > .upload-panel {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.app-shell #invoiceReviewPanel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-column: 2 / 3;
  grid-row: 1 / 3;
  max-height: min(680px, calc(100vh - 148px));
  min-width: 0;
  overflow: hidden;
}

.app-shell #invoiceRuleConfirmPanel {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  min-width: 0;
  overflow: hidden;
}

.app-shell #invoiceDetailPanel {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
  min-width: 0;
  overflow: hidden;
}

.app-shell #payableTracePanel,
.app-shell .cashflow-project-panel {
  grid-column: 2 / -1;
}

.app-shell #invoiceReviewPanel .table-wrap {
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

.app-shell #invoiceReviewPanel table {
  min-width: 0;
}

.app-shell #invoiceReviewPanel th,
.app-shell #invoiceReviewPanel td {
  overflow-wrap: anywhere;
  word-break: normal;
}

.app-shell #invoiceReviewPanel td:nth-child(1),
.app-shell #invoiceReviewPanel td:nth-child(5) {
  min-width: 0;
  white-space: normal;
}

.app-shell #invoiceReviewPanel .invoice-source-stack {
  min-width: 0;
  max-width: 100%;
}

.app-shell #invoiceReviewPanel .row-actions-head,
.app-shell #invoiceReviewPanel .row-actions-cell {
  min-width: 128px;
  width: 128px;
}

.app-shell #invoiceReviewPanel .row-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  white-space: normal;
}

.app-shell #invoiceReviewPanel .row-action-link {
  min-width: 46px;
}

.app-shell .documents-layout .rule-decision-board,
.app-shell #invoiceRuleConfirmPanel .rule-confirm-list {
  grid-template-columns: 1fr;
}

.app-shell .documents-layout .rule-decision-card {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell .documents-layout .rule-card-fields {
  grid-template-columns: repeat(2, minmax(96px, 1fr));
}

.app-shell .documents-layout .rule-card-fields dd {
  overflow-wrap: anywhere;
  white-space: normal;
}

@media (max-width: 1440px) {
  .app-shell .documents-layout {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }

  .app-shell .documents-layout > .upload-panel {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
  }

  .app-shell #invoiceReviewPanel {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .app-shell #invoiceRuleConfirmPanel,
  .app-shell #invoiceDetailPanel {
    grid-column: 2 / 3;
    grid-row: auto;
  }
}

@media (max-width: 1180px) {
  .app-shell .documents-layout {
    grid-template-columns: 1fr;
  }

  .app-shell .documents-layout > .upload-panel,
  .app-shell #invoiceReviewPanel,
  .app-shell #invoiceRuleConfirmPanel,
  .app-shell #invoiceDetailPanel,
  .app-shell #payableTracePanel,
  .app-shell .cashflow-project-panel {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

.app-shell #invoiceReviewPanel,
.app-shell #bankReceiptPanel,
.app-shell #settlementCenterPanel {
  grid-column: 1 / -1;
  grid-row: auto;
}

@media (min-width: 1441px) {
  .app-shell #documents .documents-layout > .upload-panel {
    grid-column: 1 / 2;
    grid-row: 1 / 5;
  }

  .app-shell #documents #invoiceReviewPanel {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
  }

  .app-shell #documents #invoiceRuleConfirmPanel {
    grid-column: 3 / 4;
    grid-row: 1 / 2;
  }

  .app-shell #documents #invoiceDetailPanel {
    grid-column: 3 / 4;
    grid-row: 2 / 3;
  }

  .app-shell #documents #payableTracePanel {
    grid-column: 2 / -1;
    grid-row: 3 / 4;
  }

  .app-shell #documents .cashflow-project-panel {
    grid-column: 2 / -1;
    grid-row: 4 / 5;
  }
}

@media (min-width: 1181px) and (max-width: 1440px) {
  .app-shell #documents .documents-layout > .upload-panel {
    grid-column: 1 / 2;
    grid-row: 1 / 5;
  }

  .app-shell #documents #invoiceReviewPanel {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }

  .app-shell #documents #invoiceRuleConfirmPanel {
    grid-column: 2 / 3;
    grid-row: 4 / 5;
  }

  .app-shell #documents #invoiceDetailPanel {
    grid-column: 2 / 3;
    grid-row: 5 / 6;
  }

  .app-shell #documents #payableTracePanel {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
  }

  .app-shell #documents .cashflow-project-panel {
    grid-column: 2 / 3;
    grid-row: 3 / 4;
  }
}

.app-shell .report-statement-panel {
  grid-column: 1 / -1;
}

.app-shell .heading-actions {
  gap: 7px;
  padding: 5px;
  overflow-x: auto;
  flex-wrap: nowrap;
  max-width: min(780px, 100%);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #e2e2e7;
  border-radius: 10px;
  scrollbar-width: thin;
}

.app-shell .heading-actions .btn,
.app-shell .heading-actions .file-btn,
.app-shell .heading-actions label {
  flex: 0 0 auto;
  white-space: nowrap;
}

.app-shell .btn,
.app-shell .file-btn,
.app-shell .text-btn,
.app-shell .segmented button {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
}

.app-shell .btn .icon {
  min-width: 18px;
}

.app-shell .icon-btn {
  width: 34px;
  min-height: 34px;
}

.app-shell .panel {
  padding: 10px;
}

.app-shell .panel-title {
  align-items: center;
  margin-bottom: 7px;
  padding-bottom: 6px;
}

.app-shell .panel-title strong {
  margin: 0;
  font-size: 15px;
}

.app-shell .workspace-grid,
.app-shell .module-grid {
  gap: 10px;
  margin-bottom: 10px;
}

.app-shell .module-map button {
  min-height: 52px;
  padding: 8px 10px;
}

.app-shell .module-map {
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 12px;
}

.app-shell .module-map strong {
  font-size: 14px;
}

.app-shell .module-map em {
  padding: 2px 6px;
  font-size: 10px;
}

.app-shell .ledger-card-head strong {
  margin: 0 !important;
  font-size: 15px;
  line-height: 1.2;
}

.app-shell .side-status summary {
  min-height: 30px;
}

.app-shell #automationQueue {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 7px;
}

.app-shell #automationQueue .task-row {
  min-height: 46px;
  padding: 8px 9px;
}

.app-shell #automationQueue .task-row .icon-chip {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
}

.app-shell #automationQueue .task-row strong {
  font-size: 13px;
}

.app-shell #automationQueue .task-row span:not(.icon-chip) {
  font-size: 11px;
}

@media (max-width: 900px) {
  .industry-package-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industry-package-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .industry-package-detail-row {
    grid-template-columns: 1fr;
  }

  .industry-package-detail-row strong,
  .industry-package-detail-row span,
  .industry-package-detail-row em {
    white-space: normal;
  }

  .industry-package-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell .topbar,
  .app-shell .view-heading {
    align-items: stretch;
    gap: 8px;
  }

  .app-shell .topbar-actions,
  .app-shell .heading-actions {
    width: 100%;
  }

}

@media (max-width: 640px) {
  .app-shell .heading-actions .btn,
  .app-shell .heading-actions .file-btn {
    width: auto;
  }

  .app-shell .heading-actions {
    overflow-x: auto;
    flex-wrap: nowrap;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .app-shell {
    grid-template-columns: 246px minmax(0, 1fr);
  }

  .app-shell .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 12px;
  }

  .app-shell .main-nav {
    display: grid;
    gap: 5px;
    overflow: visible;
  }

  .app-shell .nav-item {
    width: 100%;
    min-width: 0;
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 42px;
    padding: 7px 9px;
  }

  .app-shell .nav-extension:not(.is-open) .nav-extension-body {
    display: none;
  }

  .app-shell .nav-extension.is-open .nav-extension-body {
    display: grid;
    gap: 5px;
  }

  .app-shell .side-status {
    margin-top: auto;
  }

  .app-shell .main {
    padding: 12px;
  }
}

.app-shell .manual-voucher-panel {
  padding: 0;
}

.app-shell .manual-voucher-workbench {
  grid-template-columns: minmax(320px, 1.08fr) minmax(360px, 1fr) minmax(210px, 0.56fr);
}

.app-shell .manual-voucher-head {
  padding: 13px 15px;
}

.app-shell .manual-voucher-actions {
  padding: 11px 15px;
}

@media (max-width: 1180px) {
  .app-shell .manual-voucher-workbench {
    grid-template-columns: minmax(320px, 1fr) minmax(360px, 1fr);
  }

  .app-shell .voucher-audit-card {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .app-shell .voucher-audit-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell .manual-voucher-head,
  .app-shell .manual-voucher-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell .voucher-head-badges,
  .app-shell .voucher-head-actions,
  .app-shell .manual-voucher-actions {
    justify-content: flex-start;
  }

  .app-shell .voucher-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell .manual-voucher-workbench {
    grid-template-columns: 1fr;
  }

  .app-shell .voucher-entry-card + .voucher-entry-card {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .app-shell .voucher-audit-stack {
    grid-template-columns: 1fr;
  }
}

.nav-section-label {
  margin: 10px 8px 4px;
  color: #7b8089;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.saas-command-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.todo-driven-board {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.todo-driven-board .todo-empty {
  grid-column: 1 / -1;
  align-items: center;
  min-height: 70px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.todo-driven-board .todo-empty strong,
.todo-driven-board .todo-empty span {
  display: block;
  width: auto;
  height: auto;
  color: inherit;
  background: transparent;
  border-radius: 0;
  text-align: left;
  white-space: normal;
}

.todo-driven-board .todo-empty strong {
  color: var(--ink);
}

.todo-driven-board .todo-empty span {
  max-width: none;
  color: var(--muted);
}

.empty-ledger-start-panel {
  margin: 0 0 14px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(22, 28, 36, 0.06);
}

.start-ledger-wizard {
  margin: 0 0 12px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
  border: 1px solid #cfe0f3;
  border-radius: 12px;
}

.start-ledger-wizard-head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
  padding: 0 0 10px;
  border-bottom: 1px solid #e3e8ef;
}

.start-ledger-wizard-head span,
.start-ledger-next-head span {
  display: block;
  color: #68717d;
  font-size: 12px;
  font-weight: 900;
}

.start-ledger-wizard-head strong {
  display: block;
  color: #1f2329;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.2;
}

.start-ledger-wizard-fields {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(170px, 1fr));
  gap: 10px;
}

.start-ledger-wizard-fields label {
  min-width: 0;
  color: #686f7a;
  font-size: 12px;
  font-weight: 900;
}

.start-ledger-wizard-fields input,
.start-ledger-wizard-fields select {
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 9px 11px;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 10px;
}

.start-ledger-tax-panel {
  margin-top: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
}

.start-ledger-tax-panel summary {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  color: #1f2329;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.start-ledger-tax-panel summary small {
  color: #6f7782;
  font-size: 11px;
  font-weight: 800;
}

.start-ledger-tax-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.start-ledger-tax-fields label {
  min-width: 0;
  color: #686f7a;
  font-size: 12px;
  font-weight: 900;
}

.start-ledger-tax-fields input,
.start-ledger-tax-fields select {
  width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 9px 11px;
  font-size: 14px;
  background: #ffffff;
  border: 1px solid #cfd6df;
  border-radius: 10px;
}

.start-ledger-setup-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.start-ledger-setup-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-height: 72px;
  padding: 11px;
  text-align: left;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 12px;
}

.start-ledger-setup-card > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 900;
}

.start-ledger-setup-card strong,
.start-ledger-setup-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.start-ledger-setup-card strong {
  color: #1f2329;
  font-size: 14px;
  font-weight: 900;
}

.start-ledger-setup-card small {
  grid-column: 2;
  color: #68717d;
  font-size: 11px;
  font-weight: 800;
}

.start-ledger-setup-card small.is-ok {
  color: #087f5b;
}

.start-ledger-wizard-next {
  margin-top: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d9e5f3;
  border-radius: 12px;
}

.start-ledger-next-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.start-ledger-next-head strong {
  display: block;
  color: #0a4f93;
  font-size: 18px;
  font-weight: 950;
}

.start-ledger-next-head small,
.start-ledger-next-head em {
  display: block;
  color: #68717d;
  font-style: normal;
  font-weight: 800;
}

.start-ledger-next-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.empty-ledger-start-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.empty-ledger-start-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 12px;
  color: #1f2329;
  text-align: left;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe4ee;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(22, 28, 36, 0.04);
  cursor: pointer;
}

.empty-ledger-start-card:hover {
  border-color: #0f6bc6;
  box-shadow: 0 14px 28px rgba(15, 107, 198, 0.12);
  transform: translateY(-1px);
}

.empty-ledger-start-card > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 900;
}

.empty-ledger-start-card > strong {
  min-width: 0;
  overflow: hidden;
  color: #1f2329;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .start-ledger-wizard-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-ledger-tax-fields,
  .start-ledger-setup-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .start-ledger-next-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .empty-ledger-start-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .start-ledger-wizard-head,
  .start-ledger-next-head {
    align-items: stretch;
    flex-direction: column;
  }

  .start-ledger-wizard-fields,
  .start-ledger-tax-fields,
  .start-ledger-setup-strip,
  .start-ledger-next-actions {
    grid-template-columns: 1fr;
  }

  .empty-ledger-start-grid {
    grid-template-columns: 1fr;
  }
}

.saas-command-strip > button,
.home-action-main {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  text-align: left;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dfe3ea;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(22, 28, 36, 0.05);
  cursor: pointer;
}

.todo-driven-board > button,
.todo-driven-board .home-action-main {
  min-height: 82px;
}

.saas-command-strip > button:hover,
.home-action-main:hover {
  border-color: #0f6bc6;
  box-shadow: 0 14px 28px rgba(15, 107, 198, 0.12);
  transform: translateY(-1px);
}

.saas-command-strip > button.is-clear,
.home-action-card.is-clear .home-action-main {
  border-color: #dfe7e2;
}

.saas-command-strip > button.is-warning,
.home-action-card.is-warning .home-action-main {
  border-color: #b8d7f5;
}

.saas-command-strip > button.is-danger,
.home-action-card.is-danger .home-action-main {
  border-color: #efc2aa;
  box-shadow: 0 12px 26px rgba(194, 65, 12, 0.09);
}

.home-action-card {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.home-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.todo-driven-board .home-action-buttons .mini-action {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 8px;
  box-shadow: none;
  transform: none;
}

.todo-driven-board .home-action-buttons .local-more-actions-drawer summary {
  justify-content: center;
  min-width: 138px;
  min-height: 28px;
  padding: 5px 10px;
}

.todo-driven-board .home-action-buttons .local-more-actions-drawer summary span,
.todo-driven-board .home-action-buttons .local-more-actions-drawer summary em {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.todo-driven-board .home-action-buttons .local-more-actions-drawer summary em {
  padding: 2px 7px;
  color: #0756a3;
  background: #e7f1ff;
  border-radius: 999px;
  font-weight: 900;
}

.saas-command-strip > button > span,
.home-action-main > span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}

.saas-command-strip > button > strong,
.home-action-main > strong {
  color: #1f2329;
  font-size: 15px;
  line-height: 1.25;
}

.saas-command-strip > button > small,
.home-action-main > small {
  display: none;
  color: #747b86;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.saas-command-strip > button > em,
.home-action-main > em {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 26px;
  padding: 0 8px;
  color: #ffffff;
  background: #0a66c2;
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.saas-command-strip > button.is-clear > em,
.home-action-main.is-clear > em,
.home-action-card.is-clear .home-action-main > em {
  background: #147d64;
}

.saas-command-strip > button.is-danger > em,
.home-action-main.is-danger > em,
.home-action-card.is-danger .home-action-main > em {
  background: #c2410c;
}

.module-flow-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  margin: 0 0 10px;
  padding: 6px;
  overflow: visible;
  background: #f5f7fa;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  scrollbar-width: thin;
  box-sizing: border-box;
}

.module-flow-strip.process-strip {
  background: #f8fafc;
}

.module-flow-strip.process-strip::before {
  flex: 0 0 auto;
  padding: 0 4px 0 2px;
  color: #6b7280;
  content: "流程";
  font-size: 12px;
  font-weight: 900;
}

.module-action-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  margin: 0 0 8px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #e1e6ee;
  border-radius: 12px;
  box-sizing: border-box;
}

.module-status-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-left: 4px solid #0f6fca;
  border-radius: 9px;
}

.module-status-card.is-clear {
  border-left-color: #15866f;
}

.module-status-card.is-warning {
  border-left-color: #c98300;
}

.module-status-card span,
.module-status-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-status-card strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
  line-height: 1.25;
}

.module-primary-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.view-heading .module-primary-actions {
  margin-left: auto;
}

.module-primary-actions .btn {
  min-width: 104px;
  white-space: nowrap;
}

.module-more-actions {
  justify-self: end;
  align-self: center;
  z-index: 35;
}

.module-direct-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: min(560px, 100%);
  z-index: 1;
}

.module-more-actions summary {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid #cfe0f2;
}

.module-flow-strip.module-task-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 8px;
  padding: 8px;
  background: #f4f7fb;
  border-color: #dfe6ef;
}

.module-flow-strip.module-task-strip.process-strip::before,
.module-flow-strip.module-task-strip::before {
  display: none;
  content: none;
}

.module-flow-strip .module-todo-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #dfe5ed;
  border-radius: 10px;
}

.module-flow-strip .module-todo-card span {
  width: auto;
  min-width: 38px;
  height: 24px;
  padding: 0 8px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 999px;
  font-size: 11px;
}

.module-flow-strip .module-todo-card strong {
  font-size: 14px;
}

.module-flow-strip .module-todo-card em {
  justify-self: end;
  min-width: 46px;
  padding: 5px 8px;
  color: #0f5da8;
  text-align: center;
  background: #eaf3ff;
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  white-space: nowrap;
}

.module-flow-strip .module-todo-card.is-warning {
  border-color: #f0c477;
  background: #fffaf0;
}

.module-flow-strip .module-todo-card.is-warning span,
.module-flow-strip .module-todo-card.is-warning em {
  color: #8a5200;
  background: #fff0cf;
}

.module-flow-strip .module-todo-card.is-clear span,
.module-flow-strip .module-todo-card.is-clear em {
  color: #176145;
  background: #e9f7ef;
}

.module-flow-strip .module-todo-card.is-info span,
.module-flow-strip .module-todo-card.is-info em {
  color: #0f5da8;
  background: #eaf3ff;
}

.module-flow-strip button,
.module-flow-control {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-width: 118px;
  min-height: 38px;
  padding: 6px 10px 6px 7px;
  color: #20242a;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e1e5ec;
  border-radius: 8px;
  box-shadow: none;
}

.module-flow-strip.process-strip button {
  min-width: 138px;
  background: #fff;
}

.module-flow-control {
  min-width: 118px;
  cursor: default;
}

.module-flow-control select {
  min-height: 26px;
  padding: 2px 24px 2px 8px;
  color: #20242a;
  background: #fff;
  border: 1px solid #d6dde7;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 850;
}

.module-flow-strip button:hover {
  border-color: #a6c9f1;
  background: #fbfdff;
}

.module-flow-strip span,
.module-flow-control span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #0f5da8;
  background: #eaf3ff;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 950;
}

.module-flow-strip strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-flow-strip small {
  display: none;
}

.module-task-strip .empty-guide {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .module-action-header {
    grid-template-columns: 1fr;
  }

  .view-heading .module-primary-actions,
  .module-primary-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
  }

  .module-more-actions {
    justify-self: start;
  }

  .module-flow-strip.module-task-strip {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 640px) {
  .module-flow-strip.module-task-strip {
    grid-template-columns: 1fr;
  }
}

.more-actions-drawer {
  position: relative;
  flex: 0 0 auto;
}

.local-more-actions-drawer {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  z-index: 35;
}

.more-actions-drawer summary,
.local-more-actions-drawer summary {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 6px 11px;
  color: #0f5da8;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.local-more-actions-drawer summary {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.more-actions-drawer summary::-webkit-details-marker,
.local-more-actions-drawer summary::-webkit-details-marker {
  display: none;
}

.more-actions-drawer summary::after,
.local-more-actions-drawer summary::after {
  color: #6f7782;
  content: "⌄";
  font-size: 12px;
  font-weight: 900;
}

.more-actions-drawer[open] summary,
.local-more-actions-drawer[open] summary {
  color: #0756a3;
  background: #eef6ff;
  border-color: #9dc8f4;
}

.more-actions-drawer[open] summary::after,
.local-more-actions-drawer[open] summary::after {
  content: "⌃";
}

.more-actions-drawer em,
.local-more-actions-drawer em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.more-actions-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 90;
  display: grid;
  width: max-content;
  min-width: 210px;
  max-width: min(340px, 80vw);
  gap: 6px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #dce3ed;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(18, 32, 52, 0.14);
}

.more-actions-drawer:not([open]) .more-actions-list,
.local-more-actions-drawer:not([open]) .more-actions-list {
  display: none;
}

.local-more-actions-drawer .more-actions-list {
  right: 0;
  left: auto;
  min-width: 190px;
  max-width: min(300px, calc(100vw - 28px));
}

.more-actions-list button,
.more-actions-list .module-flow-control {
  width: 100%;
  min-width: 0;
  justify-content: flex-start;
  overflow: visible;
  text-align: left;
  text-overflow: clip;
  white-space: nowrap;
}

.more-actions-list .module-flow-control {
  display: grid;
  grid-template-columns: auto 1fr;
  row-gap: 4px;
}

.documents-layout,
.expense-layout,
.cash-layout,
.settlement-layout,
.voucher-layout,
.tax-layout,
.reports-layout,
.crm-layout,
.settings-layout {
  align-items: start;
}

.documents-layout > aside,
.expense-layout > aside,
.cash-layout > aside,
.settlement-layout > aside,
.tax-layout > aside,
.reports-layout > aside,
.crm-layout > aside {
  position: sticky;
  top: 78px;
}

.table-wrap {
  border-radius: 10px;
}

.table-wrap table {
  min-width: 640px;
}

#settlementCenterPanel table {
  min-width: 0;
}

.app-shell .dropzone {
  border-radius: 12px;
}

.app-shell .segmented {
  gap: 5px;
  padding: 5px;
  background: #f5f7fa;
  border-radius: 10px;
}

.app-shell .segmented button {
  border-color: transparent;
}

.app-shell .segmented button.is-active {
  color: #0f5da8;
  background: #ffffff;
  border-color: #c9def7;
  box-shadow: 0 6px 14px rgba(15, 93, 168, 0.08);
}

.panel[id] {
  scroll-margin-top: 88px;
}

#expenseUploadPanel,
#expenseClassifyPanel,
#expensePayablePanel {
  border-top: 4px solid #0f6bc6;
}

#expenseUploadPanel {
  border-top-color: #0f6bc6;
}

#expenseClassifyPanel {
  border-top-color: #4f7f54;
}

#expensePayablePanel {
  border-top-color: #bf7a00;
}

.voucher-stepper {
  display: grid;
  gap: 8px;
  padding: 14px 12px;
  background: #f7f9fc;
  border-right: 1px solid #e2e6ed;
}

.voucher-stepper span {
  display: block;
  padding: 9px 10px;
  color: #69717d;
  background: #ffffff;
  border: 1px solid #e0e4eb;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.voucher-stepper span.is-active {
  color: #0f5da8;
  background: #eaf3ff;
  border-color: #9bc7f6;
}

.app-shell .manual-voucher-workbench {
  grid-template-columns: 150px minmax(320px, 1.04fr) minmax(340px, 0.96fr) minmax(230px, 0.58fr);
  background: #fff;
}

.app-shell .voucher-entry-card {
  background: #fff;
}

.app-shell .manual-voucher-actions {
  position: sticky;
  bottom: 0;
  z-index: 4;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid #e1e5ec;
  backdrop-filter: blur(10px);
}

.query-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.query-bar label {
  display: grid;
  gap: 4px;
  color: #717782;
  font-size: 12px;
  font-weight: 850;
}

.query-bar input,
.query-bar select {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid #cfd4dc;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.salary-detail-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 1280px) {
  .agent-workbench-status-grid {
    grid-template-columns: 1fr;
  }

  .agent-workbench-head {
    grid-template-columns: 1fr;
  }

  .agent-workbench-actions {
    justify-content: flex-start;
  }

  .saas-command-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .manual-voucher-workbench {
    grid-template-columns: 130px minmax(300px, 1fr) minmax(320px, 1fr);
  }

  .app-shell .voucher-audit-card {
    grid-column: 2 / -1;
  }
}

@media (max-width: 820px) {
  .home-agent-brief,
  .agent-workbench-status-grid {
    grid-template-columns: 1fr;
  }

  .agent-workbench-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .saas-command-strip {
    grid-template-columns: 1fr;
  }

	  .documents-layout > aside,
	  .expense-layout > aside,
	  .cash-layout > aside,
	  .settlement-layout > aside,
	  .tax-layout > aside,
	  .reports-layout > aside,
	  .crm-layout > aside {
	    position: static;
	  }

	  .rule-confirm-list,
	  .voucher-template-library {
	    grid-template-columns: 1fr;
	  }

	  .voucher-chain-step {
	    grid-template-columns: 34px minmax(0, 1fr);
	  }

	  .voucher-chain-step em {
	    grid-column: 2 / 3;
	  }

  .app-shell .manual-voucher-workbench {
    grid-template-columns: 1fr;
  }

  .voucher-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid #e2e6ed;
  }

  .salary-detail-fields {
    grid-template-columns: 1fr;
  }
}

/* Final sidebar tuning: keep the navigation lighter and closer to modern desktop SaaS menus. */
.app-shell .sidebar {
  width: 292px;
  gap: 12px;
  padding: 16px 14px;
}

.app-shell .main-nav {
  gap: 3px;
}

.app-shell .nav-section-label {
  margin: 12px 10px 5px;
  color: #818893;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.2;
}

.app-shell .nav-item {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 42px;
  padding: 8px 10px;
  color: #393d43;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.22;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.app-shell .nav-item span:not(.icon) {
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
}

.app-shell .nav-item .icon {
  width: 22px;
  min-width: 22px;
  height: 22px;
  color: #4d535c;
  font-size: 16px;
  font-weight: 760;
}

.app-shell .nav-item:hover {
  color: #1f2937;
  background: #f2f6fb;
  border-color: #d7e3ef;
}

.app-shell .nav-item.is-active {
  color: #0a4a91;
  background: #edf5ff;
  border-color: #cfe2f7;
  box-shadow: inset 3px 0 0 #0f6bc6;
}

.app-shell .nav-item.is-active .icon,
.app-shell .nav-item.is-active span:not(.icon) {
  color: #0a4a91;
}

.app-shell .nav-item-featured {
  background: transparent;
  border-color: transparent;
}

.app-shell .nav-extension {
  gap: 3px;
}

.app-shell .nav-extension-body {
  gap: 3px;
  margin-left: 11px;
  padding-left: 9px;
  border-left: 1px solid #e2e8f0;
}

.app-shell .nav-group-toggle {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
}

.app-shell .nav-group-toggle span:first-child {
  color: #454a52;
  font-size: 14px;
  font-weight: 760;
}

.app-shell .nav-group-toggle .icon {
  color: #69717d;
  font-size: 14px;
}

@media (min-width: 701px) {
  .app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
  }

  .app-shell .sidebar {
    width: 292px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell .main {
    order: -1;
  }

  .app-shell .sidebar {
    width: auto;
  }

  body[data-active-view="digitalEmployee"] .digital-employee-strip {
    display: none;
  }


  .foundation-status-grid {
    grid-template-columns: 1fr;
  }
}

.digital-employee-strip {
  margin-bottom: 14px;
}

.digital-employee-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.75fr);
  align-items: start;
}

.digital-employee-workbench {
  border-top: 4px solid #0f6bc6;
}

.digital-agent-focus {
  margin-top: 14px;
}

.natural-language-agent-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0ec;
  border-left: 4px solid #0f8a72;
  border-radius: 8px;
  background: #f9fcfb;
}

.natural-language-agent-head,
.agent-command-actions,
.agent-execution-card,
.agent-log-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.natural-language-agent-head span,
.natural-language-agent-head em,
.agent-command-input,
.agent-execution-card span,
.agent-execution-card small,
.agent-execution-card em,
.agent-tool-list span,
.agent-tool-list small,
.agent-log-row span,
.agent-log-row small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.natural-language-agent-head strong,
.agent-execution-card strong,
.agent-tool-list strong,
.agent-log-row strong {
  display: block;
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.natural-language-agent-head strong {
  font-size: 16px;
}

.natural-language-agent-head em {
  flex: none;
  padding: 6px 9px;
  color: #0b5e53;
  background: #e5f6f1;
  border-radius: 8px;
  font-style: normal;
}

.natural-language-agent-head em.is-high {
  color: #9f2d2d;
  background: #fff1ef;
}

.natural-language-agent-head em.is-ready {
  color: #0b5e53;
  background: #e5f6f1;
}

.natural-language-agent-head em.is-clarify {
  color: #7a4d08;
  background: #fff4d6;
}

.agent-dialogue-guide {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d9e7ec;
  border-radius: 8px;
  background: #eef8f6;
}

.agent-dialogue-guide span,
.agent-dialogue-guide strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.agent-dialogue-guide span {
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
}

.agent-dialogue-guide strong {
  color: #0b5e53;
  font-size: 13px;
  font-weight: 900;
}

.accountant-capability-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 2px 0 0;
}

.accountant-capability-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  color: #5f7187;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
  border: 1px solid #dbe5f0;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(36, 72, 112, 0.05);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.accountant-capability-strip span[data-capability="model"] {
  color: #315fae;
  border-color: #c9d9f5;
  background: linear-gradient(180deg, #f4f7ff 0%, #edf3ff 100%);
}

.accountant-capability-strip span[data-capability="write"] {
  color: #0b6b5d;
  border-color: #cce8df;
  background: linear-gradient(180deg, #f3fbf8 0%, #eaf7f2 100%);
}

.agent-command-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.agent-command-input textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  margin-top: 6px;
  padding: 12px 14px;
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #c9d7e7;
  border-radius: 12px;
  box-shadow: inset 0 1px 2px rgba(44, 72, 106, 0.03), 0 4px 14px rgba(37, 76, 116, 0.04);
  font: inherit;
  line-height: 1.5;
}

.agent-command-input textarea:focus {
  border-color: #82a9e5;
  outline: 3px solid rgba(67, 116, 214, 0.12);
  box-shadow: 0 8px 24px rgba(51, 92, 151, 0.09);
}

.agent-command-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.agent-voice-button {
  border-color: #9dc8bf;
  color: #0b5e53;
  background: #f0faf7;
}

.agent-voice-button.is-listening {
  color: #fff;
  border-color: #0f8a72;
  background: #0f8a72;
  box-shadow: 0 0 0 3px rgba(15, 138, 114, 0.14);
}

.agent-voice-button.is-unsupported {
  color: #88919d;
  border-color: #d8e0e8;
  background: #f4f6f8;
}

.voice-dot {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: #0f8a72;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.agent-voice-button.is-listening .voice-dot {
  color: #0f8a72;
  background: #fff;
}

.agent-voice-button.is-unsupported .voice-dot {
  background: #a0a9b4;
}

.agent-voice-status {
  flex-basis: 100%;
  color: #72839a;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.agent-voice-status.is-listening {
  color: #0b5e53;
}

.agent-voice-status.is-error,
.agent-voice-status.is-unsupported {
  color: #9f2d2d;
}

.agent-voice-status.is-ready {
  color: #0b5e53;
}

.agent-execution-result,
.agent-execution-log,
.agent-tool-list {
  display: grid;
  gap: 8px;
}

.agent-execution-card,
.agent-tool-list article,
.agent-log-row {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #fff;
}

.agent-execution-card {
  align-items: flex-start;
  border-left: 4px solid #0f8a72;
}

.agent-execution-card.is-needs_human_review {
  border-left-color: #cf4b45;
  background: #fff8f6;
}

.agent-execution-card.is-needs_clarification {
  border-left-color: #d99114;
  background: #fffaf0;
}

.agent-execution-card.is-planned {
  border-left-color: #0f6bc6;
  background: #f8fbff;
}

.agent-execution-card em {
  flex: none;
  padding: 5px 8px;
  color: #9f2d2d;
  background: #fff1ef;
  border-radius: 8px;
  font-style: normal;
}

.agent-tool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.agent-accountant-dialogue {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e7ee;
  border-radius: 8px;
  background: #fbfefd;
}

.agent-accountant-dialogue.is-clarify {
  border-color: #f0cf86;
  background: #fffaf0;
}

.agent-accountant-dialogue.is-blocked {
  border-color: #f0b0aa;
  background: #fff7f6;
}

.agent-accountant-reply {
  display: grid;
  gap: 4px;
}

.agent-accountant-reply span,
.agent-accountant-reply small,
.agent-dialogue-grid span,
.agent-dialogue-grid li {
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.agent-accountant-reply strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.agent-dialogue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-dialogue-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #fff;
}

.agent-dialogue-grid ul {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 16px;
}

.agent-entry-preview {
  display: grid;
  gap: 8px;
}

.agent-entry-preview > span {
  color: #69717d;
  font-size: 12px;
  font-weight: 860;
}

.agent-entry-preview article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #dbe7ef;
  border-radius: 8px;
  background: #fff;
}

.agent-entry-preview strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.agent-entry-preview small,
.agent-entry-preview li {
  color: #68727e;
  font-size: 12px;
  line-height: 1.45;
}

.agent-entry-preview ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-entry-preview li {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-items: start;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f7fafc;
}

.agent-entry-preview em {
  color: #334155;
  font-style: normal;
  font-weight: 760;
}

.agent-execution-plan {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(15, 107, 198, 0.18);
  border-radius: 8px;
  background: #f8fbff;
}

.agent-execution-plan-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.agent-execution-plan-head span,
.agent-execution-plan-head em,
.agent-plan-grid li,
.agent-plan-grid small {
  display: block;
  color: #68727e;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.agent-execution-plan-head strong,
.agent-plan-grid strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.agent-execution-plan-head em {
  max-width: 360px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #0f5f99;
  text-align: right;
  font-style: normal;
  background: rgba(226, 242, 255, 0.86);
}

.agent-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.agent-plan-grid article {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(130, 144, 157, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.agent-plan-grid ol,
.agent-plan-grid ul {
  display: grid;
  gap: 5px;
  margin: 7px 0 0;
  padding-left: 18px;
}

.agent-risk-points {
  border-color: rgba(217, 145, 20, 0.24);
  background: #fffaf0;
}

.agent-log-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  align-items: start;
}

.accounting-employee-bridge {
  display: grid;
  gap: 10px;
  width: min(100%, 1080px);
  margin: 4px auto 0;
  padding: 12px;
  border: 1px solid #d9e2ec;
  border-left: 4px solid #168064;
  border-radius: 8px;
  background: #ffffff;
}

.accounting-employee-bridge-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.accounting-employee-bridge-head div,
.accounting-employee-bridge-grid article,
.accounting-employee-confirmations article {
  min-width: 0;
}

.accounting-employee-bridge-head span,
.accounting-employee-bridge-head small,
.accounting-employee-bridge-grid span,
.accounting-employee-bridge-grid small,
.accounting-employee-confirmations span {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.accounting-employee-bridge-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
}

.accounting-employee-bridge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.accounting-employee-bridge-grid article {
  padding: 10px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #f8fbff;
}

.accounting-employee-bridge-grid strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 920;
}

.accounting-employee-bridge-actions,
.accounting-employee-confirmations {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.accounting-employee-confirmations {
  display: grid;
}

.accounting-employee-confirmations article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #f0d7a8;
  border-radius: 8px;
  background: #fffaf0;
}

.accounting-employee-confirmations strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.accounting-employee-commercial {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d7dee8;
  border-left: 4px solid #286bb5;
  border-radius: 8px;
  background: #ffffff;
}

.accounting-employee-commercial > * {
  min-width: 0;
}

.commercial-readiness-head,
.commercial-readiness-score {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.commercial-readiness-head span,
.commercial-readiness-head small,
.commercial-readiness-summary span,
.commercial-readiness-summary small,
.commercial-readiness-list small,
.commercial-next-actions span {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.commercial-readiness-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
}

.score-ring {
  display: grid;
  width: 76px;
  min-width: 76px;
  aspect-ratio: 1;
  place-items: center;
  border: 7px solid #d8e8f8;
  border-top-color: #286bb5;
  border-radius: 999px;
  background: #f8fbff;
}

.score-ring strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  font-weight: 940;
}

.score-ring span {
  margin-top: -12px;
  color: #69717d;
  font-size: 11px;
  font-weight: 850;
}

.commercial-readiness-summary {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.commercial-readiness-summary article {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #e1e7ef;
  border-radius: 8px;
  background: #f8fbff;
}

.commercial-readiness-summary strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 920;
}

.commercial-readiness-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.commercial-package-list {
  display: grid;
  gap: 8px;
}

.connector-delivery-panel {
  display: grid;
  gap: 8px;
}

.connector-delivery-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbff;
}

.connector-delivery-panel > article > div {
  min-width: 0;
}

.connector-delivery-panel span,
.connector-delivery-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.connector-delivery-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.connector-delivery-score {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.connector-delivery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.connector-delivery-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #ffffff;
}

.connector-delivery-grid > section.is-ready {
  border-color: #cce5d8;
  background: #f7fbf8;
}

.connector-delivery-grid > section.is-blocked {
  border-color: #f2d6aa;
  background: #fffaf2;
}

.connector-delivery-evidence,
.connector-template-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.connector-delivery-evidence span,
.connector-template-fields span {
  padding: 4px 7px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.connector-delivery-evidence span.is-ready,
.connector-template-fields span.is-present {
  border-color: #cfe7dc;
  background: #f6fbf8;
  color: #146447;
}

.connector-delivery-evidence span.is-gap,
.connector-template-fields span.is-missing {
  border-color: #f2d7ad;
  background: #fffaf2;
  color: #8a5200;
}

.connector-delivery-tasks {
  display: grid;
  gap: 7px;
}

.connector-delivery-tasks > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #ffffff;
}

.connector-delivery-tasks > div.is-done,
.connector-delivery-tasks > div.is-skipped {
  border-color: #d4e8dd;
  background: #f7fbf8;
}

.connector-delivery-tasks > div.is-blocked,
.connector-delivery-tasks > div.is-failed {
  border-color: #f1d5aa;
  background: #fffaf2;
}

.connector-delivery-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.connector-delivery-task-actions > span {
  flex-basis: 100%;
  text-align: right;
}

.connector-delivery-next {
  display: grid;
  gap: 6px;
}

.connector-delivery-next span {
  padding: 7px 8px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.rule-package-panel {
  display: grid;
  gap: 8px;
}

.rule-package-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbff;
}

.rule-package-panel > article > div {
  min-width: 0;
}

.rule-package-panel span,
.rule-package-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.rule-package-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.rule-package-score {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.rule-package-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rule-package-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #ffffff;
}

.rule-package-grid > section.is-ready {
  border-color: #cce5d8;
  background: #f7fbf8;
}

.rule-package-grid > section.is-progress {
  border-color: #d8e4f1;
  background: #f8fbff;
}

.rule-package-grid > section.is-blocked {
  border-color: #f2d6aa;
  background: #fffaf2;
}

.rule-package-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.rule-package-grid dl div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #ffffff;
}

.rule-package-grid dt,
.rule-package-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.rule-package-grid dt {
  color: #69717d;
  font-size: 11px;
  font-weight: 850;
}

.rule-package-grid dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.rule-package-controls,
.rule-package-next {
  display: grid;
  gap: 6px;
}

.rule-package-controls span,
.rule-package-next span {
  padding: 7px 8px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.rule-package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.rule-package-actions small {
  flex: 1 1 180px;
}

.governance-control-panel {
  display: grid;
  gap: 8px;
}

.governance-control-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 8px;
  background: #f8fbff;
}

.governance-control-panel > article > div {
  min-width: 0;
}

.governance-control-panel span,
.governance-control-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.governance-control-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.governance-control-score {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.governance-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.governance-control-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #ffffff;
}

.governance-control-grid > section.is-ready {
  border-color: #cce5d8;
  background: #f7fbf8;
}

.governance-control-grid > section.is-progress {
  border-color: #d8e4f1;
  background: #f8fbff;
}

.governance-control-grid > section.is-blocked {
  border-color: #f2d6aa;
  background: #fffaf2;
}

.governance-control-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.governance-control-grid dl div,
.governance-control-evidence span,
.governance-permission-matrix span,
.governance-control-next span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #ffffff;
}

.governance-control-grid dt,
.governance-control-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.governance-control-grid dt {
  color: #69717d;
  font-size: 11px;
  font-weight: 850;
}

.governance-control-grid dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.governance-control-evidence,
.governance-permission-matrix,
.governance-control-next {
  display: grid;
  gap: 6px;
}

.governance-permission-matrix {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.governance-permission-matrix strong {
  display: inline;
  margin-right: 6px;
}

.operations-report-panel {
  display: grid;
  gap: 8px;
}

.operations-report-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e6dc;
  border-radius: 8px;
  background: #f9fcf7;
}

.operations-report-panel > article > div {
  min-width: 0;
}

.operations-report-panel span,
.operations-report-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.operations-report-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.operations-report-score {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.operations-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.operations-report-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #ffffff;
}

.operations-report-grid > section.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.operations-report-grid > section.is-progress {
  border-color: #d9e5ef;
  background: #f8fbff;
}

.operations-report-grid > section.is-blocked {
  border-color: #f0d3a7;
  background: #fffaf2;
}

.operations-report-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.operations-report-grid dl div,
.operations-report-evidence span,
.operations-report-next span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #ffffff;
}

.operations-report-grid dt,
.operations-report-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.operations-report-grid dt {
  color: #69717d;
  font-size: 11px;
  font-weight: 850;
}

.operations-report-grid dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.operations-report-evidence,
.operations-report-next {
  display: grid;
  gap: 6px;
}

.operations-report-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.operations-report-board > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.operations-report-board > section > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.operations-report-list {
  display: grid;
  gap: 8px;
}

.operations-report-list > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
}

.operations-report-list > div.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.operations-report-list > div.is-progress {
  border-color: #dce6ef;
  background: #f8fbff;
}

.operations-report-list > div.is-blocked {
  border-color: #f2d7ad;
  background: #fffaf2;
}

.operations-report-list > div > span {
  align-self: start;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 7px;
  background: #f1f5f8;
  color: var(--ink);
  text-align: center;
  overflow-wrap: anywhere;
}

.commercial-operations-panel {
  display: grid;
  gap: 8px;
}

.commercial-operations-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e3e0ef;
  border-radius: 8px;
  background: #fbf9ff;
}

.commercial-operations-panel > article > div {
  min-width: 0;
}

.commercial-operations-panel span,
.commercial-operations-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-operations-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-operations-score {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.commercial-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.commercial-operations-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1e8ef;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-operations-grid > section.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.commercial-operations-grid > section.is-progress {
  border-color: #d9e5ef;
  background: #f8fbff;
}

.commercial-operations-grid > section.is-blocked {
  border-color: #f0d3a7;
  background: #fffaf2;
}

.commercial-operations-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.commercial-operations-grid dl div,
.commercial-operations-evidence span,
.commercial-operations-next span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-operations-grid dt,
.commercial-operations-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.commercial-operations-grid dt {
  color: #69717d;
  font-size: 11px;
  font-weight: 850;
}

.commercial-operations-grid dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.commercial-operations-evidence,
.commercial-operations-next {
  display: grid;
  gap: 6px;
}

.commercial-operations-board,
.commercial-operations-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.commercial-operations-board > section,
.commercial-operations-footer > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.commercial-operations-board > section > strong,
.commercial-operations-footer > section > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.commercial-operations-list {
  display: grid;
  gap: 8px;
}

.commercial-operations-list > div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-operations-list > div.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.commercial-operations-list > div.is-progress {
  border-color: #dce6ef;
  background: #f8fbff;
}

.commercial-operations-list > div.is-blocked {
  border-color: #f2d7ad;
  background: #fffaf2;
}

.commercial-operations-list > div > span {
  align-self: start;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 7px;
  background: #f1f5f8;
  color: var(--ink);
  text-align: center;
}

.commercial-operations-footer > section {
  padding: 10px;
  border: 1px solid #e7eaf0;
  border-radius: 8px;
  background: #ffffff;
}

.mini-action.is-danger {
  border-color: #efc7bd;
  color: #8f2f1f;
  background: #fff4f1;
}

.month-end-close-panel {
  display: grid;
  gap: 8px;
}

.month-end-close-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe6ef;
  border-radius: 8px;
  background: #f8fbff;
}

.month-end-close-panel > article > div {
  min-width: 0;
}

.month-end-close-panel span,
.month-end-close-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.month-end-close-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.month-end-close-score {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.month-end-close-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.month-end-close-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.month-end-close-list {
  display: grid;
  gap: 8px;
}

.month-end-close-list > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
}

.month-end-close-list > div.is-ready,
.month-end-close-list > div.is-done {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.month-end-close-list > div.is-gap,
.month-end-close-list > div.is-blocked {
  border-color: #f1d4a6;
  background: #fffaf2;
}

.month-end-close-list > div.is-todo {
  border-color: #dce6ef;
  background: #f8fbff;
}

.month-end-close-list > div > span {
  align-self: start;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 7px;
  background: #f1f5f8;
  color: var(--ink);
  text-align: center;
}

.commercial-package-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, 0.35fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe8ef;
  border-radius: 8px;
  background: #f7fbf9;
}

.commercial-package-list article > div {
  min-width: 0;
}

.commercial-package-list span,
.commercial-package-list small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-package-list strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-package-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-width: 0;
}

.commercial-package-evidence span {
  padding: 4px 7px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.commercial-package-evidence span.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
  color: #146447;
}

.commercial-package-evidence span.is-gap {
  border-color: #f2d7ad;
  background: #fffaf2;
  color: #8a5200;
}

.commercial-pilot-plan {
  display: grid;
  gap: 8px;
}

.commercial-pilot-plan article {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e2e7ee;
  border-radius: 8px;
  background: #fffdf8;
}

.commercial-pilot-plan article > div {
  min-width: 0;
}

.commercial-pilot-plan span,
.commercial-pilot-plan small,
.commercial-pilot-phases span {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-pilot-plan strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-pilot-phases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.commercial-pilot-phases span {
  padding: 6px 8px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.commercial-signoff {
  display: grid;
  gap: 8px;
}

.commercial-signoff article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #f8fbff;
}

.commercial-signoff article > div {
  min-width: 0;
}

.commercial-signoff span,
.commercial-signoff small,
.commercial-signoff-scope span {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-signoff strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-signoff-scope {
  display: grid;
  gap: 6px;
}

.commercial-signoff-scope span {
  padding: 6px 8px;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.commercial-rollout {
  display: grid;
  gap: 8px;
}

.commercial-rollout article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid #e0e7dd;
  border-radius: 8px;
  background: #f9fcf7;
}

.commercial-rollout article > div {
  min-width: 0;
}

.commercial-rollout span,
.commercial-rollout small,
.commercial-rollout-scope span {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-rollout strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-rollout-scope {
  display: grid;
  gap: 6px;
}

.commercial-rollout-scope span {
  padding: 6px 8px;
  border: 1px solid #e5eedf;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.commercial-rollout-workstreams {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.commercial-rollout-workstreams > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.commercial-rollout-workstreams > section > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.commercial-rollout-task-list {
  display: grid;
  gap: 8px;
}

.commercial-rollout-task-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, auto);
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e5ebef;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-rollout-task-list article.is-done {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.commercial-rollout-task-list article.is-blocked {
  border-color: #f2d7ad;
  background: #fffaf2;
}

.commercial-rollout-task-list article > div {
  min-width: 0;
}

.commercial-rollout-task-list span,
.commercial-rollout-task-list small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-rollout-task-list strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-rollout-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.commercial-rollout-task-actions > span {
  flex-basis: 100%;
  text-align: right;
}

.production-release-panel {
  display: grid;
  gap: 8px;
}

.production-release-panel > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid #d4e3f6;
  border-radius: 8px;
  background: #f8fbff;
}

.production-release-panel > article > div {
  min-width: 0;
}

.production-release-panel span,
.production-release-panel small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.production-release-panel strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.production-release-score {
  justify-items: end;
  text-align: right;
}

.production-release-score strong {
  font-size: 22px;
}

.production-release-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.production-release-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.production-release-form label:nth-child(1),
.production-release-form label:nth-child(4) {
  grid-column: span 2;
}

.production-release-form input,
.production-release-form select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.production-release-toggle {
  display: flex !important;
  flex-direction: row;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #f8fafc;
}

.production-release-toggle input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
}

.production-release-toggle.is-danger {
  background: #fff7f4;
}

.production-release-form .btn {
  height: 34px;
  white-space: nowrap;
}

.production-release-checks {
  display: grid;
  gap: 8px;
}

.production-release-checks article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.production-release-checks article.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.production-release-checks article.is-blocked {
  border-color: #f0c6b8;
  background: #fff7f4;
}

.production-release-checks article.is-gap {
  border-color: #f2d7ad;
  background: #fffaf2;
}

.production-release-checks article > span {
  display: grid;
  place-items: center;
  min-height: 30px;
  color: #8a5200;
  background: #fff0cf;
  border-radius: 8px;
  font-weight: 920;
}

.production-release-checks article.is-blocked > span {
  color: #9f3d26;
  background: #ffe1d8;
}

.production-release-checks article.is-ready > span {
  color: #146447;
  background: #ddf3e8;
}

.commercial-launch-audit {
  display: grid;
  gap: 8px;
}

.commercial-launch-audit > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 10px;
  border: 1px solid #eadfc7;
  border-radius: 8px;
  background: #fffaf0;
}

.commercial-launch-audit > article > div {
  min-width: 0;
}

.commercial-launch-audit span,
.commercial-launch-audit small {
  display: block;
  color: #69717d;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.commercial-launch-audit strong {
  display: block;
  margin: 2px 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-launch-audit-score {
  justify-items: end;
  text-align: right;
}

.commercial-launch-audit-score strong {
  font-size: 22px;
}

.commercial-launch-audit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.commercial-launch-audit-grid > section {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-launch-audit-grid > section > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.commercial-launch-audit-result {
  display: grid;
  gap: 4px;
}

.commercial-launch-audit-result span {
  color: var(--ink);
  font-weight: 920;
  overflow-wrap: anywhere;
}

.commercial-launch-audit-list,
.commercial-launch-audit-next {
  display: grid;
  gap: 8px;
}

.commercial-launch-audit-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
}

.commercial-launch-audit-list article.is-ready {
  border-color: #cfe7dc;
  background: #f6fbf8;
}

.commercial-launch-audit-list article.is-blocked {
  border-color: #f0c6b8;
  background: #fff7f4;
}

.commercial-launch-audit-list article.is-gap {
  border-color: #f2d7ad;
  background: #fffaf2;
}

.commercial-launch-audit-list article > span {
  display: grid;
  place-items: center;
  min-height: 30px;
  color: #8a5200;
  background: #fff0cf;
  border-radius: 8px;
  font-weight: 920;
}

.commercial-launch-audit-list article.is-blocked > span {
  color: #9f3d26;
  background: #ffe1d8;
}

.commercial-launch-audit-list article.is-ready > span {
  color: #146447;
  background: #ddf3e8;
}

.commercial-launch-audit-next span {
  padding: 8px 10px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.commercial-readiness-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.commercial-readiness-board > section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.commercial-readiness-board > section > strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
}

.commercial-readiness-list {
  display: grid;
  gap: 8px;
}

.commercial-readiness-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid #e4e8ef;
  border-radius: 8px;
  background: #fbfcff;
}

.commercial-readiness-list article > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  color: #0a4a91;
  background: #eaf4ff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.commercial-readiness-list article.is-gap > span {
  color: #8a5200;
  background: #fff3df;
}

.commercial-readiness-list article.is-ready > span {
  color: #177154;
  background: #e6f4ee;
}

.commercial-readiness-list strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.commercial-next-actions {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #e8edf3;
  border-radius: 8px;
  background: #fafcff;
}

.digital-agent-focus article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #f8fbff;
}

.digital-agent-focus span,
.digital-agent-focus small {
  color: #69717d;
  font-weight: 680;
}

.digital-agent-focus strong {
  color: #1f2329;
  font-size: 18px;
}

.digital-agent-focus .text-btn {
  grid-row: 1 / span 3;
  grid-column: 2;
  align-self: center;
}

.digital-confirm-list,
.digital-connector-list {
  display: grid;
  gap: 10px;
}

.digital-confirm-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
  border: 1px solid #d9e2ec;
  border-radius: 14px;
  background: #ffffff;
  cursor: pointer;
  overflow: visible;
}

.digital-confirm-row.exception-action-card {
  cursor: default;
}

.digital-confirm-row:hover {
  border-color: #9cc7f5;
  background: #f7fbff;
}

.digital-confirm-row strong {
  color: #1f2329;
  font-size: 16px;
}

.digital-confirm-row span {
  color: #69717d;
  font-size: 13px;
  font-weight: 680;
}

.digital-confirm-row em {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #0a4a91;
  background: #eaf4ff;
  font-style: normal;
  font-weight: 850;
}

.digital-connector-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #d9e2ec;
  border-left: 4px solid #b7791f;
  border-radius: 14px;
  background: #ffffff;
}

.digital-connector-card.is-ready {
  border-left-color: #168064;
}

.digital-connector-card strong {
  color: #1f2329;
  font-size: 15px;
}

.digital-connector-card span {
  color: #69717d;
  font-size: 13px;
  font-weight: 680;
}

.digital-connector-card em {
  justify-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0a4a91;
  background: #eaf4ff;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.digital-connector-card.is-ready em {
  color: #177154;
  background: #e6f4ee;
}

.daily-inspection-report {
  display: grid;
  gap: 12px;
}

.daily-report-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f7fbff;
  border: 1px solid #dce8f6;
  border-radius: 10px;
}

.daily-report-head strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 920;
}

.daily-report-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.daily-report-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.daily-report-grid article {
  min-width: 0;
  padding: 11px;
  background: #ffffff;
  border: 1px solid #dfe5ee;
  border-radius: 9px;
}

.daily-report-grid span,
.daily-report-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.daily-report-grid strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 920;
}

@media (max-width: 920px) {
  .digital-employee-layout {
    grid-template-columns: 1fr;
  }

  .digital-agent-focus article {
    grid-template-columns: 1fr;
  }

  .accounting-employee-bridge-grid,
  .accounting-employee-confirmations article,
  .commercial-package-list article,
  .connector-delivery-panel > article,
  .connector-delivery-grid,
  .connector-delivery-tasks > div,
  .rule-package-panel > article,
  .rule-package-grid,
  .rule-package-grid dl,
  .governance-control-panel > article,
  .governance-control-grid,
  .governance-control-grid dl,
  .governance-permission-matrix,
  .operations-report-panel > article,
  .operations-report-grid,
  .operations-report-grid dl,
  .operations-report-board,
  .operations-report-list > div,
  .commercial-operations-panel > article,
  .commercial-operations-grid,
  .commercial-operations-grid dl,
  .commercial-operations-board,
  .commercial-operations-footer,
  .commercial-operations-list > div,
  .month-end-close-panel > article,
  .month-end-close-grid,
  .commercial-pilot-plan article,
  .commercial-pilot-phases,
  .commercial-signoff article,
  .commercial-rollout article,
  .commercial-rollout-workstreams,
  .commercial-rollout-task-list article,
  .production-release-panel > article,
  .production-release-form,
  .commercial-launch-audit > article,
  .commercial-launch-audit-grid,
  .commercial-readiness-summary,
  .commercial-readiness-board {
    grid-template-columns: 1fr;
  }

  .commercial-rollout-task-actions {
    justify-content: flex-start;
  }

  .connector-delivery-score {
    justify-items: start;
  }

  .rule-package-score {
    justify-items: start;
  }

  .governance-control-score {
    justify-items: start;
  }

  .operations-report-score {
    justify-items: start;
  }

  .commercial-operations-score {
    justify-items: start;
  }

  .commercial-launch-audit-score {
    justify-items: start;
    text-align: left;
  }

  .production-release-score {
    justify-items: start;
    text-align: left;
  }

  .production-release-form label:nth-child(1),
  .production-release-form label:nth-child(4) {
    grid-column: auto;
  }

  .rule-package-actions {
    justify-content: flex-start;
  }

  .connector-delivery-task-actions {
    justify-content: flex-start;
  }

  .connector-delivery-task-actions > span {
    text-align: left;
  }

  .commercial-rollout-task-actions > span {
    text-align: left;
  }

  .commercial-readiness-score {
    flex-direction: column;
  }

  .digital-agent-focus .text-btn {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }

  .daily-report-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .daily-report-grid {
    grid-template-columns: 1fr;
  }
}

/* Manual voucher entry: keep the working surface close to a printable voucher. */
.app-shell .manual-voucher-workbench {
  display: block;
  background: #fff;
}

.app-shell .voucher-stepper {
  display: none;
}

.app-shell .manual-voucher-print-sheet {
  display: grid;
  gap: 12px;
  padding: 22px 26px 20px;
  background: #fffdf8;
  border-left: 0;
}

.app-shell .manual-voucher-print-head {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #102033;
}

.app-shell .manual-voucher-print-head p {
  margin: 0;
  color: #6f7b88;
  font-size: 12px;
  font-weight: 700;
}

.app-shell .manual-voucher-print-head h3 {
  margin: 0;
  color: #0f2a45;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.app-shell .manual-voucher-print-meta {
  display: grid;
  grid-template-columns: 1fr 1.45fr 1.35fr 1fr;
  gap: 10px;
  align-items: end;
}

.app-shell .manual-voucher-print-meta label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding-bottom: 6px;
  color: #536170;
  border-bottom: 1px solid #b9c7d7;
  font-size: 13px;
  font-weight: 850;
}

.app-shell .manual-voucher-print-meta strong {
  overflow: hidden;
  color: #101928;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .manual-voucher-print-meta input {
  width: 100%;
  min-height: 30px;
  padding: 2px 0;
  color: #101928;
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 900;
}

.app-shell .manual-voucher-print-toolbar {
  justify-content: flex-end;
  margin: 0;
}

.app-shell .manual-voucher-print-table-wrap {
  max-height: none;
  overflow: auto;
  background: #fff;
  border: 1px solid #8fb0d5;
  border-radius: 0;
}

.app-shell .manual-voucher-print-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.app-shell .manual-voucher-print-table th,
.app-shell .manual-voucher-print-table td {
  border: 1px solid #d0d8e3;
}

.app-shell .manual-voucher-print-table th {
  height: 44px;
  color: #145ca8;
  background: #f3f7ff;
  font-size: 14px;
  white-space: nowrap;
}

.app-shell .manual-voucher-print-table td {
  height: 54px;
  padding: 0;
  background: #fff;
}

.app-shell .manual-voucher-print-table tr.is-active td {
  background: #f7fbff;
}

.app-shell .manual-voucher-print-table th:nth-child(1),
.app-shell .manual-voucher-print-table td:nth-child(1) {
  width: 28%;
}

.app-shell .manual-voucher-print-table th:nth-child(2),
.app-shell .manual-voucher-print-table td:nth-child(2) {
  width: 32%;
}

.app-shell .manual-voucher-print-table th:nth-child(3),
.app-shell .manual-voucher-print-table th:nth-child(4),
.app-shell .manual-voucher-print-table td:nth-child(3),
.app-shell .manual-voucher-print-table td:nth-child(4) {
  width: 15%;
  text-align: right;
}

.app-shell .manual-voucher-print-table th:nth-child(5),
.app-shell .manual-voucher-print-table td:nth-child(5) {
  width: 72px;
  text-align: center;
}

.app-shell .manual-voucher-print-table input {
  width: 100%;
  min-height: 52px;
  padding: 9px 11px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  font: inherit;
}

.app-shell .manual-voucher-print-table .manual-line-account {
  min-width: 250px;
}

.app-shell .manual-voucher-print-table .amount-input {
  min-width: 124px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.app-shell .manual-voucher-print-table input:focus {
  background: #fff;
  border-color: #0f6fc6;
  box-shadow: 0 0 0 2px rgba(15, 111, 198, 0.14) inset;
  outline: 0;
}

.app-shell .manual-voucher-print-table .text-btn {
  min-height: 32px;
  padding: 4px 8px;
}

.app-shell .manual-voucher-preview .voucher-balance-bar {
  margin-top: -1px;
  background: #fff8df;
  border: 1px solid #d0d8e3;
  border-top: 0;
  border-radius: 0;
}

.app-shell .manual-voucher-audit-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: flex-end;
  color: #5b6673;
  font-size: 12px;
  font-weight: 850;
}

.app-shell .manual-voucher-audit-strip strong {
  margin-left: 4px;
  color: #162235;
}

.app-shell .manual-voucher-settings,
.app-shell .manual-line-subject-add {
  margin: 0;
  background: #f7f9fc;
  border: 1px solid #e1e6ee;
  border-radius: 8px;
}

.app-shell .manual-voucher-settings summary,
.app-shell .manual-line-subject-add summary {
  min-height: 40px;
}

.app-shell .manual-line-subject-add .subject-quick-add-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.app-shell .manual-line-subject-add .subject-quick-add-grid input,
.app-shell .manual-line-subject-add .subject-quick-add-grid select {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.app-shell .manual-voucher-workbench .manual-voucher-controls {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  padding: 0;
}

.app-shell .manual-voucher-workbench .manual-voucher-controls .span-2 {
  grid-column: span 2;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(180px, 1fr) minmax(132px, 0.75fr) minmax(132px, 0.75fr) minmax(240px, 1.35fr) minmax(170px, 0.95fr) minmax(112px, 0.65fr) minmax(112px, 0.7fr) minmax(92px, 0.45fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  margin-top: 12px;
  margin-bottom: 18px;
  background: #f8fbff;
  border: 1px solid #dce5ef;
  border-radius: 14px;
}

.app-shell #ledgerQueryPanel .ledger-query-title small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar label {
  min-width: 0;
  gap: 6px;
  color: #687282;
  font-size: 12px;
  line-height: 1.35;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar .ledger-scope-control {
  display: none;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar .ledger-main-book-field,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar .ledger-keyword-field {
  grid-column: span 1;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar input,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar .btn,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar .local-more-actions-drawer {
  align-self: end;
  width: 100%;
}

.app-shell #ledgerQueryPanel .ledger-query-run {
  min-height: 42px;
}

.app-shell #ledgerQueryPanel .ledger-query-more-actions {
  position: relative;
}

.app-shell #ledgerQueryPanel .ledger-unified-query-bar .local-more-actions-drawer summary {
  min-height: 42px;
  justify-content: center;
}

.app-shell #ledgerQueryPanel .ledger-query-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.app-shell #ledgerQueryPanel .ledger-query-more-actions .ledger-print-paper {
  display: inline-flex;
  width: auto;
  min-height: 42px;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.app-shell #ledgerQueryPanel .ledger-query-more-actions .ledger-print-paper select {
  min-height: 30px;
  margin-top: 0;
  border-radius: 8px;
}

.app-shell #ledgerQueryPanel .ledger-query-actions .mini-action {
  min-height: 42px;
  padding: 8px 12px;
}

@media (max-width: 900px) {
  .app-shell #ledgerQueryPanel .ledger-unified-query-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell #ledgerQueryPanel .ledger-keyword-field {
    grid-column: 1 / -1;
  }
}

.app-shell #ledgerQueryPanel .table-wrap {
  position: relative;
  z-index: 1;
}

.app-shell #ledgerQueryPanel .ledger-book-table {
  min-width: 1210px;
}

.app-shell .ledger-reconciliation-trail,
.app-shell .ledger-correction-guide {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(8, 123, 114, 0.16);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(248, 252, 251, 0.96), rgba(255, 255, 255, 0.92));
}

.app-shell .ledger-reconciliation-head,
.app-shell .voucher-correction-wizard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.app-shell .ledger-reconciliation-head strong,
.app-shell .voucher-correction-wizard-head strong {
  display: block;
  color: #162235;
  font-size: 14px;
  font-weight: 920;
}

.app-shell .ledger-reconciliation-head small,
.app-shell .voucher-correction-wizard-head small {
  display: block;
  color: #687282;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.app-shell .ledger-reconciliation-head span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #0f6d63;
  font-size: 12px;
  font-weight: 900;
  background: rgba(230, 247, 242, 0.94);
}

.app-shell .ledger-reconciliation-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.app-shell .ledger-reconciliation-cards article {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(130, 144, 157, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.app-shell .ledger-reconciliation-cards span,
.app-shell .ledger-reconciliation-cards small {
  display: block;
  color: #687282;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.app-shell .ledger-reconciliation-cards strong {
  display: block;
  margin: 4px 0;
  color: #162235;
  font-size: 13px;
  font-weight: 920;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.app-shell #ledgerQueryPanel .ledger-book-table th,
.app-shell #ledgerQueryPanel .ledger-book-table td {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.app-shell #ledgerQueryPanel .ledger-book-table th:nth-child(3),
.app-shell #ledgerQueryPanel .ledger-book-table td:nth-child(3),
.app-shell #ledgerQueryPanel .ledger-book-table th:nth-child(5),
.app-shell #ledgerQueryPanel .ledger-book-table td:nth-child(5) {
  min-width: 180px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.app-shell #ledgerQueryPanel .ledger-book-table th:last-child,
.app-shell #ledgerQueryPanel .ledger-book-table td:last-child {
  min-width: 248px;
  width: 248px;
}

.app-shell #ledgerQueryPanel .row-actions-head,
.app-shell #ledgerQueryPanel .row-actions-cell {
  min-width: 248px;
  width: 248px;
  background: #ffffff;
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08);
}

.app-shell #ledgerQueryPanel .row-actions-head {
  background: #f7f9f6;
}

.app-shell #ledgerQueryPanel .row-actions {
  gap: 4px;
  justify-content: center;
  overflow: visible;
  white-space: normal;
}

.app-shell #ledgerQueryPanel .row-action-link,
.app-shell #ledgerQueryPanel .row-more-actions summary {
  min-width: 42px;
  padding-right: 6px;
  padding-left: 6px;
}

.app-shell #ledgerQueryPanel .row-actions-cell:has(.row-more-actions[open]) {
  z-index: 60;
  overflow: visible;
}

.app-shell #ledgerQueryPanel .row-more-actions {
  z-index: 65;
}

.app-shell #ledgerQueryPanel .row-more-actions > div {
  right: 0;
  z-index: 180;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 48px));
}

.app-shell #ledgerQueryPanel .row-more-actions .more-actions-list button {
  min-height: 34px;
  justify-content: flex-start;
  overflow: visible;
  line-height: 1.35;
  text-align: left;
  text-overflow: clip;
  white-space: normal;
}

.app-shell #voucherLedgerPanel table {
  min-width: 1180px;
}

.app-shell .voucher-query-bar {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 0.85fr) minmax(220px, 1.4fr) auto auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  margin: 12px 0 10px;
  background: #f8fbff;
  border: 1px solid #dce5ef;
  border-radius: 10px;
}

.app-shell .voucher-query-bar label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: #687282;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.app-shell .voucher-query-bar input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 8px;
}

.app-shell .voucher-query-bar .btn {
  min-height: 38px;
  justify-content: center;
  white-space: nowrap;
}

.app-shell .voucher-query-bar .btn.is-active {
  color: #073c38;
  background: #e6f4f1;
  border-color: rgba(8, 123, 114, 0.34);
  box-shadow: 0 0 0 3px rgba(8, 123, 114, 0.1);
}

.app-shell .voucher-query-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
  color: #5b6673;
  font-size: 12px;
  font-weight: 850;
}

.app-shell .voucher-query-summary span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 999px;
}

.app-shell .voucher-query-summary em {
  color: #7a8592;
  font-style: normal;
}

.app-shell .voucher-query-summary strong {
  color: #162235;
}

.app-shell .voucher-book-shortcuts-panel,
.app-shell .voucher-correction-panel,
.app-shell .ledger-query-entry-panel {
  margin-bottom: 12px;
}

.app-shell .ledger-query-entry-panel {
  border-top: 3px solid #0f8a72;
}

.app-shell .voucher-book-shortcuts,
.app-shell .voucher-correction-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.app-shell .voucher-correction-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.app-shell .voucher-book-shortcuts .btn,
.app-shell .voucher-correction-steps .btn {
  min-height: 62px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  text-align: left;
}

.app-shell .voucher-book-shortcuts .btn strong,
.app-shell .voucher-correction-steps .btn strong {
  font-size: 15px;
  line-height: 1.25;
}

.app-shell .voucher-book-shortcuts .btn span,
.app-shell .voucher-correction-steps .btn span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.app-shell .voucher-book-shortcuts .btn.primary span,
.app-shell .voucher-correction-steps .btn.primary span {
  color: rgba(255, 255, 255, 0.82);
}

.app-shell .voucher-correction-wizard-host {
  margin-top: 10px;
}

.app-shell .voucher-correction-wizard {
  display: grid;
  gap: 10px;
}

.app-shell .voucher-correction-current {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-left: 4px solid #0f8a72;
  border-radius: 8px;
  background: #ffffff;
}

.app-shell .voucher-correction-current.is-warning {
  border-left-color: #d99013;
  background: #fffaf0;
}

.app-shell .voucher-correction-current.is-info {
  border-left-color: #0a6abf;
  background: #f6fbff;
}

.app-shell .voucher-correction-current.is-success {
  border-left-color: #0f8a72;
  background: #f7fffc;
}

.app-shell .voucher-correction-current span,
.app-shell .voucher-correction-current small {
  display: block;
  color: #687282;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.4;
}

.app-shell .voucher-correction-current strong {
  display: block;
  margin: 2px 0;
  color: #162235;
  font-size: 15px;
  font-weight: 920;
  line-height: 1.25;
}

.app-shell .voucher-correction-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, auto));
  gap: 6px;
}

.app-shell .voucher-correction-counts span {
  display: grid;
  gap: 2px;
  min-width: 62px;
  padding: 6px 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
}

.app-shell .voucher-correction-counts em {
  color: #687282;
  font-style: normal;
  font-size: 11px;
  font-weight: 820;
}

.app-shell .voucher-correction-counts strong {
  margin: 0;
  color: #0f6d63;
  font-size: 16px;
}

.app-shell .voucher-correction-wizard-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app-shell .voucher-correction-wizard.is-compact .voucher-correction-wizard-steps {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.app-shell .voucher-correction-wizard-steps article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.app-shell .voucher-correction-wizard-steps em {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #0f6d63;
  font-style: normal;
  font-size: 12px;
  font-weight: 920;
  background: rgba(230, 247, 242, 0.94);
}

.app-shell .voucher-correction-wizard-steps strong,
.app-shell .voucher-correction-wizard-steps span,
.app-shell .voucher-correction-wizard-steps small {
  display: block;
  line-height: 1.35;
}

.app-shell .voucher-correction-wizard-steps strong {
  color: #162235;
  font-size: 13px;
  font-weight: 920;
}

.app-shell .voucher-correction-wizard-steps span {
  color: #0f6d63;
  font-size: 12px;
  font-weight: 880;
}

.app-shell .voucher-correction-wizard-steps small {
  color: #687282;
  font-size: 12px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.app-shell .voucher-correction-wizard-steps .mini-action {
  grid-column: 1 / -1;
  justify-content: center;
  min-height: 32px;
}

.app-shell .voucher-correction-focus {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(130, 144, 157, 0.16);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.84);
}

.app-shell .voucher-correction-focus.is-empty {
  color: #687282;
}

.app-shell .voucher-correction-focus-head,
.app-shell .voucher-correction-focus-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.app-shell .voucher-correction-focus-head strong,
.app-shell .voucher-correction-focus-row strong {
  display: block;
  color: #162235;
  font-size: 13px;
  font-weight: 920;
  line-height: 1.3;
}

.app-shell .voucher-correction-focus-head small,
.app-shell .voucher-correction-focus-row span,
.app-shell .voucher-correction-focus-row small,
.app-shell .voucher-correction-focus.is-empty small {
  display: block;
  color: #687282;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.app-shell .voucher-correction-focus-row {
  min-width: 0;
  padding: 8px;
  background: #ffffff;
  border: 1px solid rgba(130, 144, 157, 0.14);
  border-radius: 8px;
}

.app-shell .voucher-correction-focus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 220px;
}

.app-shell .voucher-correction-focus-actions .mini-action {
  min-height: 30px;
}

.app-shell .voucher-correction-audit {
  display: grid;
  gap: 5px;
  padding: 10px;
  color: #687282;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
  border: 1px dashed rgba(130, 144, 157, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.app-shell .voucher-correction-audit strong {
  color: #162235;
  font-size: 13px;
  font-weight: 920;
}

.app-shell .voucher-correction-audit span {
  overflow-wrap: anywhere;
}

.app-shell .ledger-query-entry-note {
  margin: 10px 0 0;
  color: #687282;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.app-shell #voucherLedgerPanel th,
.app-shell #voucherLedgerPanel td {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: nowrap;
}

.app-shell #voucherLedgerPanel th:nth-child(4),
.app-shell #voucherLedgerPanel td:nth-child(4) {
  min-width: 220px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.app-shell #voucherLedgerPanel th:last-child,
.app-shell #voucherLedgerPanel td:last-child {
  min-width: 220px;
}

@media (max-width: 1180px) {
  .app-shell .voucher-query-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell .voucher-book-shortcuts,
  .app-shell .voucher-correction-steps,
  .app-shell .ledger-reconciliation-cards,
  .app-shell .voucher-correction-wizard-steps,
  .app-shell .voucher-correction-wizard.is-compact .voucher-correction-wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell .voucher-query-bar {
    grid-template-columns: 1fr;
  }

  .app-shell .voucher-book-shortcuts,
  .app-shell .voucher-correction-steps,
  .app-shell .ledger-reconciliation-cards,
  .app-shell .voucher-correction-wizard-steps,
  .app-shell .voucher-correction-wizard.is-compact .voucher-correction-wizard-steps {
    grid-template-columns: 1fr;
  }
}

.app-shell .voucher-audit-card {
  padding-top: 12px;
  padding-bottom: 12px;
  background: #f8fafc;
}

.app-shell .voucher-audit-card .voucher-card-title {
  display: none;
}

.app-shell .voucher-audit-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.app-shell .voucher-audit-stack div {
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #e1e6ee;
  border-radius: 9px;
}

@media (max-width: 980px) {
  .app-shell .manual-voucher-print-meta,
  .app-shell .manual-voucher-workbench .manual-voucher-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell .voucher-audit-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .app-shell .manual-voucher-print-sheet {
    padding: 16px 14px;
  }

  .app-shell .manual-voucher-print-meta,
  .app-shell .manual-voucher-workbench .manual-voucher-controls,
  .app-shell .manual-voucher-workbench .manual-voucher-controls .span-2 {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .app-shell .manual-voucher-print-toolbar,
  .app-shell .manual-voucher-audit-strip {
    justify-content: flex-start;
  }
}

/* OS shell refinement layer */
:root {
  --bg: #eef3f5;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --ink: #171a1f;
  --muted: #68717b;
  --line: rgba(139, 152, 164, 0.22);
  --line-strong: rgba(114, 128, 141, 0.34);
  --teal: #087b72;
  --teal-soft: #e6f4f1;
  --blue: #1d6fb8;
  --blue-soft: #eaf3fc;
  --green: #1f7a4d;
  --green-soft: #e8f5ed;
  --amber: #a35f00;
  --amber-soft: #fff2dc;
  --coral: #b6443c;
  --coral-soft: #fff0ed;
  --material: rgba(255, 255, 255, 0.78);
  --material-strong: rgba(255, 255, 255, 0.92);
  --shadow: 0 12px 30px rgba(20, 30, 38, 0.08);
  --shadow-elevated: 0 18px 48px rgba(20, 30, 38, 0.12), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

html {
  background: #eef3f5;
  scroll-padding-top: 92px;
}

body {
  background:
    linear-gradient(180deg, rgba(250, 252, 253, 0.96), rgba(239, 244, 247, 0.94) 42%, rgba(248, 249, 245, 0.98)),
    linear-gradient(120deg, rgba(8, 123, 114, 0.08), transparent 36%, rgba(183, 68, 60, 0.05) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app-shell {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(236, 242, 244, 0.36));
}

.sidebar {
  background: rgba(251, 252, 250, 0.8);
  border-right: 1px solid rgba(130, 144, 157, 0.24);
  box-shadow: 8px 0 34px rgba(20, 30, 38, 0.08);
  backdrop-filter: blur(22px) saturate(1.25);
}

.brand {
  padding: 4px 2px 8px;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px rgba(20, 30, 38, 0.16);
}

.nav-item,
.nav-group-toggle,
.nav-extension-actions button,
.btn,
.icon-btn,
.text-btn,
.segmented button,
select,
input {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item {
  border-color: rgba(114, 128, 141, 0.12);
}

.nav-item .icon,
.nav-group-toggle .icon {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(114, 128, 141, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.nav-item:hover,
.nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(114, 128, 141, 0.28);
  box-shadow: 0 10px 24px rgba(20, 30, 38, 0.08);
  transform: translateY(-1px);
}

.nav-item.is-active {
  color: #073c38;
  background: linear-gradient(180deg, rgba(230, 244, 241, 0.96), rgba(220, 239, 236, 0.86));
  border-color: rgba(8, 123, 114, 0.28);
  box-shadow: 3px 0 0 #087b72 inset, 0 12px 28px rgba(8, 123, 114, 0.12);
}

.nav-item.is-active .icon {
  color: #ffffff;
  background: linear-gradient(180deg, #129287, #087b72);
  border-color: rgba(8, 123, 114, 0.34);
}

.nav-item-featured {
  background: rgba(234, 243, 252, 0.72);
  border-color: rgba(29, 111, 184, 0.22);
}

.main {
  padding: clamp(16px, 2vw, 26px);
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 25;
  min-height: 66px;
  padding: 10px 12px;
  border: 1px solid rgba(130, 144, 157, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 42px rgba(20, 30, 38, 0.1), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
  backdrop-filter: blur(20px) saturate(1.18);
}

.topbar h1,
.view-heading h2 {
  letter-spacing: 0;
}

.global-search {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(114, 128, 141, 0.24);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82) inset, 0 10px 26px rgba(20, 30, 38, 0.06);
}

.global-search:focus-within {
  border-color: rgba(8, 123, 114, 0.48);
  box-shadow: 0 0 0 4px rgba(8, 123, 114, 0.12), 0 12px 28px rgba(20, 30, 38, 0.08);
}

.ledger-summary,
.side-status,
.panel,
.metric-card,
.search-results {
  background: var(--material);
  border-color: rgba(130, 144, 157, 0.24);
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(18px) saturate(1.12);
}

.panel {
  overflow: clip;
}

.panel-title {
  border-bottom-color: rgba(130, 144, 157, 0.16);
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 251, 252, 0.82));
}

.metric-card::before {
  height: 3px;
  background: linear-gradient(90deg, #087b72, #1d6fb8);
}

.metric-card:nth-child(2)::before {
  background: linear-gradient(90deg, #1d6fb8, #5b8dc6);
}

.metric-card:nth-child(3)::before {
  background: linear-gradient(90deg, #a35f00, #d29b47);
}

.metric-card:nth-child(4)::before {
  background: linear-gradient(90deg, #b6443c, #d77b6a);
}

.panel:hover,
.metric-action-card:hover {
  border-color: rgba(29, 111, 184, 0.25);
  box-shadow: 0 20px 50px rgba(20, 30, 38, 0.12), 0 1px 0 rgba(255, 255, 255, 0.86) inset;
}

.btn,
.icon-btn,
.segmented button {
  font-weight: 850;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 249, 0.96));
  border-color: rgba(114, 128, 141, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.86) inset, 0 8px 18px rgba(20, 30, 38, 0.06);
}

.btn:hover,
.icon-btn:hover,
.segmented button:hover {
  background: linear-gradient(180deg, #ffffff, #f1f5f7);
  border-color: rgba(29, 111, 184, 0.28);
  box-shadow: 0 12px 28px rgba(20, 30, 38, 0.1);
  transform: translateY(-1px);
}

.btn:active,
.icon-btn:active,
.segmented button:active,
.nav-item:active {
  transform: translateY(0);
}

.btn.primary {
  background: linear-gradient(180deg, #119287, #087b72);
  border-color: rgba(8, 123, 114, 0.62);
  box-shadow: 0 12px 28px rgba(8, 123, 114, 0.22), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}

.btn.primary:hover {
  background: linear-gradient(180deg, #0f877d, #066c65);
  box-shadow: 0 16px 34px rgba(8, 123, 114, 0.28);
}

select,
input {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(114, 128, 141, 0.3);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

select:hover,
input:hover {
  border-color: rgba(29, 111, 184, 0.32);
}

select:focus,
input:focus {
  border-color: rgba(8, 123, 114, 0.54);
  box-shadow: 0 0 0 4px rgba(8, 123, 114, 0.12), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.badge {
  border: 1px solid rgba(29, 111, 184, 0.18);
  background: rgba(234, 243, 252, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.badge.success {
  border-color: rgba(31, 122, 77, 0.2);
  background: rgba(232, 245, 237, 0.86);
}

.badge.warning {
  border-color: rgba(163, 95, 0, 0.22);
  background: rgba(255, 242, 220, 0.9);
}

.badge.danger {
  border-color: rgba(182, 68, 60, 0.22);
  background: rgba(255, 240, 237, 0.9);
}

.table-wrap {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(130, 144, 157, 0.22);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(20, 30, 38, 0.06);
}

table th {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(238, 242, 245, 0.96));
  border-bottom-color: rgba(130, 144, 157, 0.22);
}

tbody tr:hover,
tbody tr.is-selected {
  background: rgba(234, 243, 252, 0.62);
}

.accounting-employee-commercial {
  position: relative;
  overflow: clip;
  padding: 16px;
  border: 1px solid rgba(130, 144, 157, 0.22);
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 252, 0.86)),
    linear-gradient(120deg, rgba(8, 123, 114, 0.06), transparent 38%, rgba(182, 68, 60, 0.05));
  box-shadow: var(--shadow-elevated);
  backdrop-filter: blur(18px) saturate(1.12);
  scroll-margin-top: 92px;
}

.accounting-employee-commercial::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #087b72, #1d6fb8 48%, #b6443c);
}

.commercial-readiness-head {
  padding: 12px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.commercial-readiness-score {
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.score-ring {
  border: 0;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(#087b72 0 72%, #dce5ed 0 100%);
  box-shadow: 0 12px 26px rgba(8, 123, 114, 0.12), 0 0 0 1px rgba(130, 144, 157, 0.18) inset;
}

.commercial-readiness-summary article,
.connector-delivery-panel > article,
.rule-package-panel > article,
.governance-control-panel > article,
.operations-report-panel > article,
.commercial-operations-panel > article,
.production-release-panel > article {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 252, 0.78));
  border-color: rgba(130, 144, 157, 0.2);
  box-shadow: 0 10px 26px rgba(20, 30, 38, 0.06), 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

.connector-delivery-grid > section,
.rule-package-grid > section,
.governance-control-grid > section,
.operations-report-grid > section,
.commercial-operations-grid > section,
.commercial-operations-list > div,
.operations-report-list > div,
.commercial-operations-footer > section {
  border-color: rgba(130, 144, 157, 0.2);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(20, 30, 38, 0.04);
}

.connector-delivery-grid > section.is-ready,
.rule-package-grid > section.is-ready,
.governance-control-grid > section.is-ready,
.operations-report-grid > section.is-ready,
.commercial-operations-grid > section.is-ready,
.commercial-operations-list > div.is-ready,
.operations-report-list > div.is-ready {
  border-color: rgba(31, 122, 77, 0.22);
  background: linear-gradient(180deg, rgba(248, 253, 250, 0.96), rgba(232, 245, 237, 0.78));
}

.connector-delivery-grid > section.is-progress,
.rule-package-grid > section.is-progress,
.governance-control-grid > section.is-progress,
.operations-report-grid > section.is-progress,
.commercial-operations-grid > section.is-progress,
.commercial-operations-list > div.is-progress,
.operations-report-list > div.is-progress {
  border-color: rgba(29, 111, 184, 0.2);
  background: linear-gradient(180deg, rgba(248, 251, 254, 0.96), rgba(234, 243, 252, 0.78));
}

.connector-delivery-grid > section.is-blocked,
.rule-package-grid > section.is-blocked,
.governance-control-grid > section.is-blocked,
.operations-report-grid > section.is-blocked,
.commercial-operations-grid > section.is-blocked,
.commercial-operations-list > div.is-blocked,
.operations-report-list > div.is-blocked {
  border-color: rgba(163, 95, 0, 0.24);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 242, 220, 0.78));
}

.connector-delivery-grid > section:hover,
.rule-package-grid > section:hover,
.governance-control-grid > section:hover,
.operations-report-grid > section:hover,
.commercial-operations-grid > section:hover {
  border-color: rgba(29, 111, 184, 0.28);
  box-shadow: 0 14px 30px rgba(20, 30, 38, 0.08);
}

.commercial-operations-footer {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.commercial-operations-footer > section {
  min-height: 122px;
}

.commercial-operations-footer > section span {
  padding: 7px 8px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.human-decision-center {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(8, 123, 114, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 251, 249, 0.78)),
    linear-gradient(120deg, rgba(8, 123, 114, 0.08), transparent 48%);
  box-shadow: 0 14px 34px rgba(20, 30, 38, 0.08), 0 1px 0 rgba(255, 255, 255, 0.82) inset;
}

.human-decision-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.human-decision-summary article,
.human-decision-list article {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.human-decision-summary article.is-ready,
.human-decision-list article.is-ready {
  border-color: rgba(31, 122, 77, 0.22);
  background: rgba(232, 245, 237, 0.72);
}

.human-decision-summary article.is-progress,
.human-decision-list article.is-progress {
  border-color: rgba(29, 111, 184, 0.22);
  background: rgba(234, 243, 252, 0.72);
}

.human-decision-summary article.is-blocked,
.human-decision-list article.is-blocked {
  border-color: rgba(163, 95, 0, 0.26);
  background: rgba(255, 242, 220, 0.82);
}

.human-decision-summary span,
.human-decision-summary small,
.human-decision-list span,
.human-decision-list small,
.human-quiet-toggle summary small {
  display: block;
  color: #68717b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.human-decision-summary strong,
.human-decision-list strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 940;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.human-decision-summary strong {
  margin: 3px 0;
  font-size: 22px;
}

.human-decision-list {
  display: grid;
  gap: 8px;
}

.human-decision-list article {
  display: grid;
  grid-template-columns: minmax(78px, 0.26fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.human-decision-list article > span {
  min-width: 0;
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--ink);
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
}

.digital-capability-contract {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(45, 91, 142, 0.2);
  border-radius: 8px;
  background: rgba(246, 249, 252, 0.78);
}

.digital-capability-contract span,
.digital-capability-contract small {
  display: block;
  color: #68717b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.digital-capability-contract strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 940;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.digital-capability-contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.digital-capability-contract-grid article {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.connector-sample-gate {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.connector-sample-gate.is-ready {
  border-color: rgba(31, 122, 77, 0.24);
  background: rgba(232, 245, 237, 0.72);
}

.connector-sample-gate.is-progress {
  border-color: rgba(29, 111, 184, 0.24);
  background: rgba(234, 243, 252, 0.72);
}

.connector-sample-gate.is-blocked {
  border-color: rgba(163, 95, 0, 0.28);
  background: rgba(255, 242, 220, 0.84);
}

.connector-sample-gate span,
.connector-sample-gate small {
  display: block;
  color: #68717b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.connector-sample-gate strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 940;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.connector-sample-gate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-content: start;
}

.connector-sample-gate-list span {
  padding: 6px 8px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.connector-sample-gate-list span.is-ready {
  border-color: rgba(31, 122, 77, 0.22);
  color: #1f6f49;
}

.connector-sample-gate-list span.is-progress {
  border-color: rgba(29, 111, 184, 0.22);
  color: #245f97;
}

.connector-sample-gate-list span.is-blocked {
  border-color: rgba(163, 95, 0, 0.26);
  color: #7b4b00;
}

.commercial-handoff-gate {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.commercial-handoff-gate.is-ready {
  border-color: rgba(31, 122, 77, 0.24);
  background: rgba(232, 245, 237, 0.72);
}

.commercial-handoff-gate.is-progress {
  border-color: rgba(29, 111, 184, 0.24);
  background: rgba(234, 243, 252, 0.72);
}

.commercial-handoff-gate span,
.commercial-handoff-gate small {
  display: block;
  color: #68717b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.commercial-handoff-gate strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 940;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.commercial-handoff-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.commercial-handoff-list > span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.commercial-handoff-list > span.is-ready {
  border-color: rgba(31, 122, 77, 0.22);
  color: #1f6f49;
}

.commercial-handoff-list > span.is-progress {
  border-color: rgba(29, 111, 184, 0.22);
  color: #245f97;
}

.customer-pilot-operations-gate,
.customer-pilot-evidence-gate {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.customer-pilot-operations-gate.is-ready,
.customer-pilot-evidence-gate.is-ready {
  border-color: rgba(31, 122, 77, 0.24);
  background: rgba(232, 245, 237, 0.72);
}

.customer-pilot-operations-gate.is-progress,
.customer-pilot-evidence-gate.is-progress {
  border-color: rgba(29, 111, 184, 0.24);
  background: rgba(234, 243, 252, 0.72);
}

.customer-pilot-operations-gate.is-blocked,
.customer-pilot-evidence-gate.is-blocked {
  border-color: rgba(163, 95, 0, 0.26);
  background: rgba(255, 248, 235, 0.78);
}

.customer-pilot-operations-gate span,
.customer-pilot-operations-gate small,
.customer-pilot-evidence-gate span,
.customer-pilot-evidence-gate small {
  display: block;
  color: #68717b;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.45;
}

.customer-pilot-operations-gate strong,
.customer-pilot-evidence-gate strong {
  display: block;
  margin: 3px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 940;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.customer-pilot-operations-list,
.customer-pilot-evidence-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 6px;
}

.customer-pilot-operations-list > span,
.customer-pilot-evidence-list > span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  overflow-wrap: anywhere;
}

.customer-pilot-operations-list > span.is-ready,
.customer-pilot-evidence-list > span.is-ready {
  border-color: rgba(31, 122, 77, 0.22);
  color: #1f6f49;
}

.customer-pilot-operations-list > span.is-progress,
.customer-pilot-evidence-list > span.is-progress {
  border-color: rgba(29, 111, 184, 0.22);
  color: #245f97;
}

.customer-pilot-operations-list > span.is-blocked,
.customer-pilot-evidence-list > span.is-blocked {
  border-color: rgba(163, 95, 0, 0.26);
  color: #7b4b00;
}

.human-quiet-toggle {
  border: 1px solid rgba(130, 144, 157, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.human-quiet-toggle summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
}

.human-quiet-toggle summary::-webkit-details-marker {
  display: none;
}

.human-quiet-toggle summary span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.digital-agent-focus .digital-human-decision-console {
  margin-top: 0;
}

.finance-system-agent-loop {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(15, 109, 99, 0.22);
  border-radius: 8px;
  background: rgba(245, 251, 249, 0.86);
}

.finance-system-agent-loop-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.finance-system-agent-loop-head span,
.finance-agent-loop-lane > strong,
.finance-agent-loop-actions > span {
  display: block;
  color: #0f6d63;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.finance-system-agent-loop-head strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.finance-system-agent-loop-head small,
.finance-agent-loop-row small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.finance-system-agent-loop-head em {
  min-width: 88px;
  padding: 7px 9px;
  border: 1px solid rgba(15, 109, 99, 0.2);
  border-radius: 8px;
  color: #0f6d63;
  text-align: center;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.74);
}

.finance-agent-loop-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.finance-agent-loop-lane {
  min-width: 0;
}

.finance-agent-loop-lane > strong {
  margin-bottom: 6px;
}

.finance-agent-loop-list {
  display: grid;
  gap: 6px;
}

.finance-agent-loop-row {
  display: grid;
  grid-template-columns: minmax(58px, 0.26fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.finance-agent-loop-row:hover {
  border-color: rgba(15, 109, 99, 0.28);
  background: #ffffff;
}

.finance-agent-loop-row > span {
  display: block;
  padding: 5px 6px;
  border-radius: 8px;
  color: #0f6d63;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  background: rgba(230, 247, 242, 0.92);
}

.finance-agent-loop-row.is-human > span {
  color: #8a5a00;
  background: rgba(255, 240, 204, 0.94);
}

.finance-agent-loop-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.employee-judgment-list {
  display: grid;
  gap: 7px;
}

.employee-judgment-list.is-home {
  margin-top: 2px;
}

.employee-judgment-card {
  border: 1px solid rgba(130, 144, 157, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.employee-judgment-card[open] {
  border-color: rgba(15, 109, 99, 0.28);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.employee-judgment-card summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.employee-judgment-card summary::-webkit-details-marker {
  display: none;
}

.employee-judgment-card summary > span {
  padding: 6px 7px;
  border-radius: 8px;
  color: #8a5a00;
  text-align: center;
  font-size: 12px;
  font-weight: 940;
  background: rgba(255, 240, 204, 0.94);
}

.employee-judgment-card.is-p0 summary > span {
  color: #9b1c1c;
  background: rgba(254, 226, 226, 0.96);
}

.employee-judgment-card summary strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 930;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.employee-judgment-card summary small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.employee-judgment-card summary em {
  min-width: 70px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #0f6d63;
  text-align: right;
  font-style: normal;
  font-size: 12px;
  font-weight: 940;
  background: rgba(230, 247, 242, 0.92);
}

.employee-judgment-body {
  display: grid;
  gap: 8px;
  padding: 0 8px 8px;
}

.employee-judgment-body dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.employee-judgment-body dl div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(130, 144, 157, 0.14);
  border-radius: 8px;
  background: rgba(248, 251, 252, 0.9);
}

.employee-judgment-body dt {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 880;
}

.employee-judgment-body dd {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.employee-judgment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.finance-agent-next-list {
  display: grid;
  gap: 7px;
}

.finance-agent-next-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.finance-agent-next-list article > span {
  color: #0f6d63;
  font-size: 12px;
  font-weight: 950;
}

.finance-agent-next-list strong,
.finance-loop-technical-details summary span {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 930;
  line-height: 1.3;
}

.finance-agent-next-list small,
.finance-loop-technical-details summary small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.finance-loop-technical-details {
  border: 1px solid rgba(130, 144, 157, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.finance-loop-technical-details summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  cursor: pointer;
  list-style: none;
}

.finance-loop-technical-details summary::-webkit-details-marker {
  display: none;
}

.finance-loop-technical-details summary::after {
  content: "展开";
  padding: 4px 7px;
  border-radius: 999px;
  color: #0f6d63;
  font-size: 12px;
  font-weight: 900;
  background: rgba(230, 247, 242, 0.92);
}

.finance-loop-technical-details[open] summary::after {
  content: "收起";
}

.finance-loop-technical-details > .finance-agent-operation-grid,
.finance-loop-technical-details > .finance-agent-tool-contract,
.finance-loop-technical-details > .finance-agent-approval-panel {
  margin: 0 8px 8px;
}

.finance-agent-loop-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.finance-agent-loop-actions > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.finance-agent-operation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.finance-agent-tool-contract {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(15, 109, 99, 0.18);
  border-radius: 8px;
  background: #fbfefd;
}

.finance-agent-tool-contract-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.finance-agent-tool-contract-head span,
.finance-agent-tool-contract-head small,
.finance-agent-tool-grid span,
.finance-agent-tool-grid small,
.finance-agent-tool-grid dt,
.finance-agent-tool-grid dd {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.finance-agent-tool-contract-head strong,
.finance-agent-tool-grid strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 930;
  line-height: 1.34;
  overflow-wrap: anywhere;
}

.finance-agent-tool-contract-head em {
  padding: 5px 8px;
  border-radius: 999px;
  color: #0f6d63;
  font-style: normal;
  font-size: 12px;
  font-weight: 920;
  background: rgba(230, 247, 242, 0.96);
  white-space: nowrap;
}

.finance-agent-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.finance-agent-tool-grid article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 9px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: #ffffff;
}

.finance-agent-tool-grid article.is-callable {
  border-color: rgba(15, 109, 99, 0.2);
}

.finance-agent-tool-grid article.is-gap {
  border-color: rgba(217, 145, 20, 0.28);
  background: #fffaf0;
}

.finance-agent-tool-grid span {
  width: max-content;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  color: #0f6d63;
  font-weight: 920;
  background: rgba(230, 247, 242, 0.92);
}

.finance-agent-tool-grid article.is-gap span {
  color: #8a5a00;
  background: rgba(255, 240, 204, 0.94);
}

.finance-agent-tool-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.finance-agent-tool-grid dl > div {
  min-width: 0;
  padding: 6px;
  border-radius: 7px;
  background: #f7fafc;
}

.finance-agent-tool-grid dt {
  color: #0f6d63;
  font-weight: 900;
}

.finance-agent-tool-grid dd {
  margin: 2px 0 0;
}

.finance-agent-operation-lane {
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.finance-agent-operation-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.finance-agent-operation-title strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 930;
}

.finance-agent-operation-title span {
  min-width: 26px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #0f6d63;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  background: rgba(230, 247, 242, 0.92);
}

.finance-agent-operation-list {
  display: grid;
  gap: 6px;
}

.finance-agent-operation-row {
  display: grid;
  grid-template-columns: minmax(66px, 0.28fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 54px;
  padding: 7px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.finance-agent-operation-row:hover {
  border-color: rgba(15, 109, 99, 0.28);
  background: #ffffff;
}

.finance-agent-operation-row em {
  display: block;
  padding: 5px 6px;
  border-radius: 8px;
  color: #0f6d63;
  text-align: center;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
  background: rgba(230, 247, 242, 0.92);
}

.finance-agent-operation-row.is-human em,
.finance-agent-operation-row.is-warning em {
  color: #8a5a00;
  background: rgba(255, 240, 204, 0.94);
}

.finance-agent-operation-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 920;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.finance-agent-operation-row small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.finance-agent-approval-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(15, 109, 99, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(247, 252, 251, 0.94), rgba(255, 255, 255, 0.9));
}

.finance-agent-approval-head,
.finance-agent-approval-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.finance-agent-approval-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 940;
}

.finance-agent-approval-head small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.finance-agent-approval-head span {
  min-width: 32px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f6d63;
  text-align: center;
  font-size: 12px;
  font-weight: 920;
  background: rgba(230, 247, 242, 0.96);
}

.finance-agent-approval-list {
  display: grid;
  gap: 7px;
}

.finance-agent-approval-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  min-height: 60px;
  padding: 8px;
  border: 1px solid rgba(130, 144, 157, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.finance-agent-approval-row em {
  display: block;
  padding: 6px 7px;
  border-radius: 8px;
  color: #8a5a00;
  text-align: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 940;
  background: rgba(255, 240, 204, 0.94);
}

.finance-agent-approval-row.is-p0 em {
  color: #9b1c1c;
  background: rgba(254, 226, 226, 0.96);
}

.finance-agent-approval-row strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 930;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.finance-agent-approval-row small {
  display: block;
  color: #66717c;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.finance-agent-approval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.digital-agent-focus .digital-human-decision-console .human-decision-summary article {
  display: block;
  grid-template-columns: none;
}

.digital-agent-focus .digital-human-decision-console .human-decision-list article {
  grid-template-columns: minmax(78px, 0.22fr) minmax(0, 1fr) auto;
}

.digital-agent-focus .digital-human-decision-console .human-decision-list .text-btn {
  grid-row: auto;
  grid-column: auto;
  align-self: center;
}

@media (max-width: 900px) {
  .human-decision-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-command-form,
  .agent-dialogue-grid,
  .agent-plan-grid,
  .agent-tool-list {
    grid-template-columns: 1fr;
  }

  .agent-entry-preview li {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .human-decision-summary,
  .human-decision-list article,
  .finance-system-agent-loop-head,
  .finance-agent-loop-lanes,
  .finance-agent-loop-actions,
  .finance-agent-loop-row,
  .employee-judgment-card summary,
  .employee-judgment-body dl,
  .finance-agent-next-list article,
  .finance-loop-technical-details summary,
  .finance-agent-tool-contract-head,
  .finance-agent-tool-grid,
  .finance-agent-tool-grid dl,
  .finance-agent-operation-grid,
  .finance-agent-operation-row,
  .finance-agent-approval-head,
  .finance-agent-approval-row,
  .digital-capability-contract,
  .digital-capability-contract-grid,
  .connector-sample-gate,
  .commercial-handoff-gate,
  .customer-pilot-operations-gate,
  .customer-pilot-evidence-gate,
	  .digital-agent-focus .digital-human-decision-console .human-decision-list article {
    grid-template-columns: 1fr;
  }

  .natural-language-agent-head,
  .agent-dialogue-guide,
  .agent-execution-card,
  .agent-log-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .agent-command-actions {
    justify-content: stretch;
  }

  .agent-command-actions .btn {
    width: 100%;
  }

  .agent-voice-status {
    text-align: left;
  }

  .digital-agent-focus .digital-human-decision-console .human-decision-list .text-btn {
    justify-self: start;
  }
}

.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-readiness-actions,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .connector-delivery-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .rule-package-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .governance-control-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .operations-report-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-operations-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .month-end-close-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-package-list,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-pilot-plan,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-pilot-signoff,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-signoff,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .production-rollout-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-rollout,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .production-release-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-launch-audit-panel,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-launch-audit,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-readiness-board,
.accounting-employee-commercial:has(.human-quiet-toggle:not([open])) .commercial-next-actions {
  display: none;
}

body[data-active-view="digitalEmployee"] #digitalEmployee:has(.human-quiet-toggle:not([open])) #accountingEmployeeBridgePanel {
  display: none;
}

body[data-active-view="digitalEmployee"] .digital-employee-strip button[data-scroll-target="digitalEmployeeTaskList"],
body[data-active-view="digitalEmployee"] .digital-employee-strip button[data-scroll-target="digitalEmployeeRunLog"],
body[data-active-view="digitalEmployee"] .digital-employee-strip button[data-scroll-target="digitalEmployeeDailyReport"],
body[data-active-view="digitalEmployee"] .digital-employee-strip button[data-scroll-target="digitalEmployeeConnectorStatus"],
body[data-active-view="digitalEmployee"] #digitalEmployeeTaskList,
body[data-active-view="digitalEmployee"] #digitalEmployeeRunLog,
body[data-active-view="digitalEmployee"] #digitalEmployeeDailyReport,
body[data-active-view="digitalEmployee"] #digitalEmployeeConnectorStatus {
  display: none;
}

.digital-employee-layout {
  grid-template-columns: minmax(0, 1fr);
}

.digital-employee-workbench {
  border-top: 0;
  box-shadow: var(--shadow-elevated);
}

.digital-employee-workbench,
.commercial-operations-panel,
.connector-delivery-panel,
.rule-package-panel,
.governance-control-panel,
.operations-report-panel,
.production-release-panel {
  scroll-margin-top: 92px;
}

.commercial-operations-evidence span,
.commercial-operations-next span,
.connector-delivery-next span,
.rule-package-next span,
.governance-control-next span,
.operations-report-next span {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(130, 144, 157, 0.18);
}

@media (prefers-reduced-motion: reduce) {
  .nav-item,
  .nav-group-toggle,
  .btn,
  .icon-btn,
  .text-btn,
  .segmented button,
  .metric-action-card,
  select,
  input {
    transition: none;
  }
}

@media (max-width: 700px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(130, 144, 157, 0.24);
  }

  .topbar {
    top: 8px;
  }

  .commercial-readiness-score {
    display: grid;
  }
}

/* Adapora OS completion baseline: shared glass, dark mode, and reduced motion. */
:root {
  color-scheme: light dark;
  --glass: rgba(255, 255, 255, 0.68);
  --glass-strong: rgba(255, 255, 255, 0.86);
  --adapora-os-blur: blur(22px) saturate(1.18);
  --adapora-os-dark-surface: rgba(18, 28, 36, 0.84);
  --adapora-os-dark-surface-strong: rgba(28, 42, 52, 0.9);
  --adapora-os-dark-line: rgba(218, 232, 238, 0.14);
  --adapora-os-dark-text: #eff7f9;
  --adapora-os-dark-muted: #a9b8bf;
}

.sidebar,
.topbar,
.panel,
[class*="card"],
[class*="panel"],
[class*="board"],
[class*="drawer"],
[class*="modal"] {
  -webkit-backdrop-filter: var(--adapora-os-blur);
  backdrop-filter: var(--adapora-os-blur);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar,
  .topbar,
  .panel,
  [class*="card"],
  [class*="panel"],
  [class*="board"],
  [class*="drawer"],
  [class*="modal"] {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101820;
    --surface: var(--adapora-os-dark-surface);
    --panel: var(--adapora-os-dark-surface);
    --ink: var(--adapora-os-dark-text);
    --text: var(--adapora-os-dark-text);
    --muted: var(--adapora-os-dark-muted);
    --line: var(--adapora-os-dark-line);
    --glass: rgba(18, 28, 36, 0.68);
    --glass-strong: var(--adapora-os-dark-surface-strong);
  }

  body {
    background:
      linear-gradient(180deg, #101820 0%, #14212a 46%, #0c1218 100%),
      linear-gradient(125deg, rgba(114, 167, 255, 0.1), rgba(72, 213, 151, 0.07));
    color: var(--adapora-os-dark-text);
  }

  .sidebar,
  .topbar,
  .panel,
  [class*="card"],
  [class*="panel"],
  [class*="board"],
  [class*="drawer"],
  [class*="modal"] {
    border-color: var(--adapora-os-dark-line);
    background-color: var(--adapora-os-dark-surface);
    color: var(--adapora-os-dark-text);
  }
}

/* Human accountant workspace: make the digital employee feel like a working colleague, not a software dashboard. */
body[data-active-view="digitalEmployee"] {
  background:
    linear-gradient(180deg, rgba(246, 249, 249, 0.98), rgba(234, 241, 241, 0.96)),
    linear-gradient(120deg, rgba(13, 117, 107, 0.08), transparent 40%, rgba(44, 93, 146, 0.06));
}

body[data-active-view="digitalEmployee"] .topbar {
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.56);
}

body[data-active-view="digitalEmployee"] .digital-employee-heading {
  align-items: center;
  margin-bottom: 10px;
}

body[data-active-view="digitalEmployee"] .digital-employee-heading h2 {
  font-size: 26px;
  line-height: 1.18;
}

body[data-active-view="digitalEmployee"] .digital-employee-strip {
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid rgba(128, 144, 156, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.digital-employee-layout {
  grid-template-columns: minmax(0, 1fr);
}

.digital-employee-workbench {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.employee-chat-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(420px, 1.5fr) minmax(300px, 0.9fr);
  gap: 12px;
  min-height: min(760px, calc(100vh - 176px));
}

.employee-roster,
.employee-conversation-column,
.employee-judgement-column,
.employee-confirm-panel {
  min-width: 0;
  border: 1px solid rgba(128, 144, 156, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 46px rgba(18, 30, 38, 0.1), 0 1px 0 rgba(255, 255, 255, 0.76) inset;
  -webkit-backdrop-filter: blur(22px) saturate(1.14);
  backdrop-filter: blur(22px) saturate(1.14);
}

.employee-roster,
.employee-judgement-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
}

.employee-conversation-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.employee-chat-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 14px;
  border-bottom: 1px solid rgba(128, 144, 156, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 251, 251, 0.72)),
    linear-gradient(120deg, rgba(8, 123, 114, 0.08), transparent 46%);
}

.employee-chat-title,
.employee-roster-head {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.employee-chat-title p,
.employee-roster-head span,
.employee-judgement-head span,
.agent-message-bubble span,
.employee-roster-row small,
.employee-roster-row em {
  display: block;
  margin: 0;
  color: #66717a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.employee-chat-title strong,
.employee-roster-head strong,
.employee-judgement-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 920;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.employee-chat-title small,
.employee-roster-head small,
.employee-judgement-head small {
  display: block;
  color: #75808a;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.employee-avatar-large,
.employee-roster-avatar,
.employee-avatar,
.agent-message-avatar,
.home-agent-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 920;
  background:
    linear-gradient(180deg, rgba(16, 142, 130, 0.96), rgba(8, 98, 92, 0.98)),
    #087b72;
  box-shadow: 0 10px 22px rgba(8, 123, 114, 0.2), 0 1px 0 rgba(255, 255, 255, 0.38) inset;
}

.employee-avatar-large,
.employee-roster-avatar {
  width: 46px;
  height: 46px;
  font-size: 18px;
}

.employee-avatar,
.agent-message-avatar,
.home-agent-avatar {
  width: 34px;
  height: 34px;
  font-size: 14px;
}

.employee-roster-search {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(128, 144, 156, 0.2);
  border-radius: 8px;
  background: rgba(244, 248, 248, 0.82);
}

.employee-roster-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #42505a;
  cursor: default;
}

.employee-roster-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
}

.employee-roster-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(128, 144, 156, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
}

.employee-roster-row.is-active {
  border-color: rgba(8, 123, 114, 0.3);
  background: rgba(231, 246, 242, 0.86);
  box-shadow: 3px 0 0 #087b72 inset;
}

.employee-roster-row.is-busy .employee-avatar {
  background: linear-gradient(180deg, #bb6a16, #93500a);
}

.employee-roster-row.is-working .employee-avatar {
  background: linear-gradient(180deg, #2b78bd, #1a5f9e);
}

.employee-roster-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.employee-roster-row strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.employee-roster-row em {
  grid-column: 2;
  justify-self: start;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(232, 240, 244, 0.86);
  font-style: normal;
}

.natural-language-agent-panel {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  align-content: start;
  gap: 10px;
  min-height: 0;
  height: 100%;
  padding: 12px;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(251, 253, 253, 0.92), rgba(239, 246, 246, 0.88)),
    linear-gradient(90deg, rgba(8, 123, 114, 0.04) 1px, transparent 1px);
  background-size: auto, 38px 38px;
}

.natural-language-agent-head {
  padding: 0 2px;
}

.agent-dialogue-guide {
  border-color: rgba(8, 123, 114, 0.18);
  background: rgba(231, 246, 242, 0.78);
}

.agent-execution-result {
  min-height: clamp(112px, 16vh, 180px);
  max-height: min(34vh, 260px);
  overflow: auto;
  padding: 2px 2px 10px;
}

.agent-execution-result:empty {
  min-height: clamp(112px, 16vh, 180px);
}

.agent-chat-thread {
  display: grid;
  gap: 12px;
  align-content: start;
}

.agent-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
}

.agent-message.is-user {
  justify-content: flex-end;
}

.agent-message.is-user .agent-message-bubble {
  max-width: min(78%, 620px);
  color: #ffffff;
  background: linear-gradient(180deg, #2b78bd, #1d5f9b);
  border-color: rgba(29, 95, 155, 0.32);
}

.agent-message.is-user.is-pending .agent-message-bubble {
  opacity: 0.78;
  box-shadow: 0 8px 20px rgba(29, 95, 155, 0.12);
}

.agent-message.is-user .agent-message-bubble span,
.agent-message.is-user .agent-message-bubble strong {
  color: #ffffff;
}

.agent-message.is-assistant .agent-message-bubble {
  max-width: min(84%, 680px);
  background: rgba(255, 255, 255, 0.9);
}

.agent-message-bubble {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid rgba(128, 144, 156, 0.2);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 30, 38, 0.08);
}

.agent-message-bubble strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.agent-message-bubble small {
  display: block;
  margin-top: 5px;
  color: #68737e;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.agent-message-bubble p {
  margin: 8px 0 0;
  color: #46535d;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.agent-message-bubble .agent-task-meta {
  color: #0b5e53;
  font-weight: 780;
}

.agent-task-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.agent-secondary-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.agent-secondary-actions section {
  flex: 1 1 420px;
  min-width: 0;
}

.agent-message-bubble .agent-execution-card {
  margin-top: 10px;
  box-shadow: none;
}

.agent-execution-card,
.agent-tool-list article,
.agent-accountant-dialogue,
.agent-entry-preview article,
.agent-log-row {
  border-radius: 8px;
}

.agent-tool-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-left: 44px;
}

.agent-accountant-dialogue,
.agent-entry-preview {
  margin-left: 44px;
}

.agent-execution-log {
  max-height: 136px;
  overflow: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(128, 144, 156, 0.16);
}

.agent-log-row {
  grid-template-columns: 108px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.58);
}

.agent-command-form {
  position: sticky;
  bottom: 0;
  grid-template-columns: 1fr;
  align-self: end;
  padding: 10px;
  border: 1px solid rgba(128, 144, 156, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 -12px 30px rgba(18, 30, 38, 0.06), 0 1px 0 rgba(255, 255, 255, 0.78) inset;
}

body[data-active-view="digitalEmployee"] .agent-command-form {
  position: relative;
  bottom: auto;
  align-self: start;
}

.agent-command-input {
  color: #54616c;
}

.agent-command-input textarea {
  min-height: 78px;
  margin-top: 7px;
  border-color: rgba(128, 144, 156, 0.24);
  background: rgba(249, 252, 252, 0.96);
  box-shadow: none;
}

.agent-command-actions {
  justify-content: flex-start;
}

.employee-judgement-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(128, 144, 156, 0.16);
}

.employee-judgement-column .digital-agent-focus {
  margin-top: 0;
  overflow: auto;
}

.employee-confirm-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  overflow: hidden;
  box-shadow: none;
}

.employee-confirm-panel .panel-title {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(128, 144, 156, 0.16);
}

.employee-confirm-panel .digital-confirm-list {
  display: grid;
  gap: 8px;
  overflow: auto;
}

.digital-confirm-row {
  border-color: rgba(167, 104, 20, 0.2);
  background: rgba(255, 250, 241, 0.82);
}

.digital-agent-focus .digital-human-decision-console {
  display: grid;
  gap: 10px;
}

.digital-agent-focus .digital-human-decision-console .human-decision-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.digital-agent-focus .digital-human-decision-console .human-decision-summary article,
.digital-agent-focus .digital-human-decision-console .human-decision-list article,
.digital-capability-contract {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.digital-agent-focus .digital-human-decision-console .human-decision-list article {
  grid-template-columns: minmax(64px, 0.24fr) minmax(0, 1fr);
  gap: 9px;
  padding: 10px;
}

.digital-agent-focus .digital-human-decision-console .human-decision-list .text-btn {
  grid-column: 2;
  justify-self: start;
}

.employee-judgement-column .finance-system-agent-loop {
  padding: 12px;
}

.employee-judgement-column .finance-agent-loop-lanes {
  grid-template-columns: 1fr;
  gap: 12px;
}

.employee-judgement-column .finance-agent-loop-lane > strong {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.employee-judgement-column .finance-agent-loop-row {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: 0;
  padding: 10px;
}

.employee-judgement-column .finance-agent-loop-row > span {
  min-width: 74px;
  max-width: 96px;
  white-space: normal;
}

.employee-judgement-column .finance-agent-loop-row strong,
.employee-judgement-column .finance-agent-loop-row small,
.employee-judgement-column .employee-judgment-card summary strong,
.employee-judgement-column .employee-judgment-card summary small,
.employee-judgement-column .finance-agent-next-list strong,
.employee-judgement-column .finance-agent-next-list small {
  overflow-wrap: break-word;
  word-break: normal;
}

.employee-judgement-column .employee-judgment-card summary {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.employee-judgement-column .employee-judgment-card summary > span {
  min-width: 42px;
}

.employee-judgement-column .finance-agent-next-list article {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
}

.employee-judgement-column .finance-agent-next-list article > .mini-action {
  grid-column: 2;
  justify-self: start;
  min-width: 72px;
  margin-top: 2px;
  white-space: nowrap;
}

.home-agent-brief {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.75fr) minmax(150px, 0.48fr) auto;
  width: min(1080px, 100%);
  max-width: 1080px;
  justify-self: start;
  align-self: start;
  margin-top: -2px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.64);
  transform: translateY(-8px);
}

.home-agent-brief:not(:has(.home-agent-brief-card:not(.is-action))) {
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.75fr) auto;
}

.home-agent-brief-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid rgba(128, 144, 156, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 28px rgba(18, 30, 38, 0.06);
}

button.home-agent-brief-card {
  font: inherit;
  cursor: pointer;
}

.home-agent-brief-card > span,
.home-agent-brief-card > small {
  display: block;
  color: #65727e;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.home-agent-brief-card strong {
  display: block;
  color: #17212b;
  font-size: 18px;
  font-weight: 920;
  line-height: 1.22;
  letter-spacing: 0;
}

.home-agent-brief-card.is-action {
  grid-template-columns: minmax(112px, 1fr) auto;
  grid-template-areas:
    "label count"
    "hint count";
  gap: 4px 16px;
  align-items: center;
  justify-content: stretch;
  min-width: 260px;
  min-height: 76px;
  padding: 14px 18px;
  border-color: rgba(8, 123, 114, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 249, 248, 0.9)),
    #ffffff;
  box-shadow: 0 14px 34px rgba(18, 30, 38, 0.08), 0 1px 0 rgba(255, 255, 255, 0.88) inset;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.home-agent-brief-card.is-action > span {
  grid-area: label;
  color: #24313b;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.22;
  overflow-wrap: normal;
  word-break: keep-all;
}

.home-agent-brief-card.is-action .home-agent-brief-count {
  grid-area: count;
  display: inline-flex;
  gap: 2px;
  align-items: baseline;
  justify-self: end;
  color: #087b72;
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.home-agent-brief-card.is-action .home-agent-brief-count em {
  color: #4f615e;
  font-size: 13px;
  font-style: normal;
  font-weight: 850;
}

.home-agent-brief-card.is-action > small {
  grid-area: hint;
  color: #53616c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: keep-all;
}

.home-agent-brief-card.is-action:hover {
  border-color: rgba(8, 123, 114, 0.42);
  box-shadow: 0 18px 38px rgba(18, 30, 38, 0.1), 0 1px 0 rgba(255, 255, 255, 0.92) inset;
  transform: translateY(-1px);
}

.home-agent-brief-card.is-action:focus-visible {
  outline: 3px solid rgba(8, 123, 114, 0.18);
  outline-offset: 3px;
}

.home-agent-brief-main {
  display: flex;
  gap: 10px;
  align-items: center;
}

.home-agent-brief-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.home-agent-brief-main strong,
.home-agent-brief-card strong {
  white-space: normal;
}

@media (max-width: 1180px) {
  .home-agent-brief,
  .home-agent-brief:not(:has(.home-agent-brief-card:not(.is-action))) {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.85fr);
  }

  .home-agent-brief-actions {
    justify-content: flex-start;
  }

  .employee-chat-shell {
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.4fr);
  }

  .employee-judgement-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
    align-items: start;
  }

  .employee-judgement-head {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .employee-chat-shell,
  .employee-judgement-column {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .employee-conversation-column {
    order: 1;
  }

  .employee-roster {
    order: 2;
  }

  .employee-judgement-column {
    order: 3;
  }

  .employee-roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-tool-list,
  .agent-accountant-dialogue,
  .agent-entry-preview {
    margin-left: 0;
  }

  .home-agent-brief {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: none;
    transform: none;
  }
}

@media (max-width: 560px) {
  body[data-active-view="digitalEmployee"] .digital-employee-heading {
    display: grid;
    gap: 10px;
  }

  body[data-active-view="digitalEmployee"] .digital-employee-heading h2 {
    font-size: 22px;
  }

  .employee-chat-header,
  .employee-judgement-head,
  .home-agent-brief-main {
    display: grid;
    grid-template-columns: 1fr;
  }

  .employee-roster-list {
    grid-template-columns: 1fr;
  }

  .agent-message.is-user .agent-message-bubble,
  .agent-message.is-assistant .agent-message-bubble {
    max-width: 100%;
  }

  .agent-message.is-assistant {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-tool-list,
  .digital-agent-focus .digital-human-decision-console .human-decision-summary {
    grid-template-columns: 1fr;
  }
}

@media (prefers-color-scheme: dark) {
  body[data-active-view="digitalEmployee"] {
    background:
      linear-gradient(180deg, #101820 0%, #13242b 52%, #0c1218 100%),
      linear-gradient(125deg, rgba(83, 207, 178, 0.09), rgba(91, 141, 198, 0.08));
  }

  .employee-roster,
  .employee-conversation-column,
  .employee-judgement-column,
  .employee-confirm-panel,
  .employee-chat-header,
  .agent-command-form,
  .agent-message.is-assistant .agent-message-bubble,
  .digital-agent-focus .digital-human-decision-console .human-decision-summary article,
  .digital-agent-focus .digital-human-decision-console .human-decision-list article,
  .digital-capability-contract {
    border-color: rgba(218, 232, 238, 0.14);
    background: rgba(18, 28, 36, 0.78);
    color: var(--adapora-os-dark-text);
  }

  .natural-language-agent-panel {
    background:
      linear-gradient(180deg, rgba(18, 28, 36, 0.9), rgba(16, 30, 37, 0.86)),
      linear-gradient(90deg, rgba(148, 204, 197, 0.05) 1px, transparent 1px);
    background-size: auto, 38px 38px;
  }

  .employee-roster-search,
  .employee-roster-row,
  .agent-log-row,
  .agent-command-input textarea {
    border-color: rgba(218, 232, 238, 0.12);
    background: rgba(28, 42, 52, 0.72);
    color: var(--adapora-os-dark-text);
  }

  .employee-chat-title p,
  .employee-chat-title small,
  .employee-roster-head span,
  .employee-roster-head small,
  .employee-judgement-head span,
  .employee-judgement-head small,
  .agent-message-bubble span,
  .agent-message-bubble small,
  .employee-roster-row small,
  .employee-roster-row em {
    color: var(--adapora-os-dark-muted);
  }
}

/* Finance workspace fit: use the full browser rail and let dense ledgers scroll horizontally. */
.app-shell {
  width: 100%;
  max-width: none;
}

.app-shell .main,
.app-shell .view.is-active,
.app-shell .workspace-grid,
.app-shell .module-grid {
  width: 100%;
  max-width: none;
  min-width: 0;
}

.app-shell .cash-layout {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell #cashMatchPanel {
  grid-column: 1 / -1;
}

.app-shell .table-wrap {
  overflow-x: auto;
  max-width: 100%;
}

.app-shell #invoiceReviewPanel table {
  min-width: 1120px;
  table-layout: auto;
}

.app-shell .bank-receipt-table {
  min-width: 1180px;
  table-layout: auto;
}

.app-shell .settlement-table {
  min-width: 1320px;
  table-layout: auto;
}

.app-shell .ledger-book-table {
  min-width: 1120px;
  table-layout: auto;
}

.app-shell #voucherLedgerPanel table,
.app-shell .manual-voucher-print-table,
.app-shell #payrollRowsPanel table,
.app-shell #payableTracePanel table {
  min-width: 980px;
}

.app-shell .amount-cell,
.app-shell #invoiceReviewPanel th:nth-child(4),
.app-shell #invoiceReviewPanel td:nth-child(4),
.app-shell .bank-receipt-table th:nth-child(4),
.app-shell .bank-receipt-table td:nth-child(4) {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

/* Single worklists fill the workspace; collapsed helpers must not reserve columns. */
.app-shell #documents .documents-layout,
.app-shell #vouchers .voucher-layout {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell #documents .documents-layout > .panel,
.app-shell #vouchers .voucher-layout > .panel {
  grid-column: 1 / -1;
  grid-row: auto;
  position: static;
  min-width: 0;
}

.app-shell #documents #invoiceReviewPanel,
.app-shell #documents #invoiceRuleConfirmPanel,
.app-shell #documents #invoiceDetailPanel,
.app-shell #documents #payableTracePanel {
  grid-column: 1 / -1;
  grid-row: auto;
}

/* Fields wrap with the panel, while query actions have their own complete row. */
.app-shell #voucherLedgerPanel .voucher-query-bar,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar {
  display: flex;
  flex-wrap: wrap;
}

.app-shell #voucherLedgerPanel .voucher-query-bar > label,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar > label {
  flex: 1 1 180px;
}

.app-shell #voucherLedgerPanel .voucher-query-bar label,
.app-shell #ledgerQueryPanel .ledger-unified-query-bar label {
  grid-column: auto;
  white-space: nowrap;
}

.app-shell #voucherLedgerPanel .voucher-query-bar input,
.app-shell #voucherLedgerPanel .voucher-query-bar select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
}

.app-shell #voucherLedgerPanel .voucher-query-actions,
.app-shell #ledgerQueryPanel .ledger-query-actions {
  flex: 1 1 100%;
  display: flex;
  flex-wrap: wrap;
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.app-shell #ledgerQueryPanel .ledger-query-actions .btn {
  width: auto;
}

/* A colspan empty row is not an operation column or a wide data table. */
.app-shell :is(#invoiceReviewPanel, #voucherLedgerPanel, #ledgerQueryPanel) table:has(> tbody > tr:only-child > .empty-cell) {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.app-shell :is(#invoiceReviewPanel, #voucherLedgerPanel, #ledgerQueryPanel) table:has(> tbody > tr:only-child > .empty-cell) th,
.app-shell :is(#invoiceReviewPanel, #voucherLedgerPanel, #ledgerQueryPanel) table td.empty-cell {
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  box-shadow: none;
}

.app-shell :is(#invoiceReviewPanel, #voucherLedgerPanel, #ledgerQueryPanel) .empty-guide {
  max-width: 100%;
}

@media (max-width: 900px) {
  .app-shell :is(#invoiceReviewPanel, #voucherLedgerPanel, #ledgerQueryPanel) table:has(> tbody > tr:only-child > .empty-cell) thead {
    display: none;
  }
}

/* Keep the decision surface readable even when the application sidebar is open. */
.employee-chat-shell { grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr); }
.employee-chat-shell > .employee-roster { grid-column: 1 / -1; }
.employee-roster-list { display: flex; flex-wrap: wrap; gap: 8px; }
.employee-roster-row { flex: 1 1 170px; }
.employee-judgement-column .employee-workflow-summary,
.employee-judgement-column .employee-workflow-console { min-width: 0; width: 100%; }
.employee-judgement-column > * { flex-shrink: 0; min-width: 0; }
.employee-judgment-card summary { display: grid; grid-template-columns: auto minmax(0,1fr); }
.employee-judgment-card summary > em { grid-column: 2; }
.employee-judgment-body dl > div { display: grid; grid-template-columns: 80px minmax(0,1fr); gap: 12px; }
.employee-judgment-body dd { margin: 0; overflow-wrap: anywhere; }
.confirmation-missing { color: #765724; line-height: 1.6; }
@media (max-width: 1500px) {
  .employee-chat-shell { grid-template-columns: minmax(0,1fr); }
  .employee-judgement-column { grid-column: 1; display: flex; }
}

.agent-evidence-details { padding: 12px; border: 1px solid #dce5e8; border-radius: 8px; min-width: 0; }
.agent-evidence-details summary, .agent-execution-log summary { cursor: pointer; line-height: 1.8; font-weight: 600; }
.agent-evidence-details .agent-tool-list, .agent-evidence-details .agent-accountant-dialogue, .agent-evidence-details .agent-entry-preview { margin-left: 0; }
.agent-log-row > small { grid-column: 1 / -1; }
.agent-execution-log:empty { display: none; }

/* Tax review: use the same CJK typeface for content and native form controls. */
.tax-risk-panel {
  --risk-ink: #203448;
  --risk-muted: #536578;
  --risk-line: #d8e1e9;
  --risk-soft: #f1f6f3;
  --risk-paper: #fff;
  --risk-accent: #216957;
  container-type: inline-size;
  margin-bottom: 20px;
  color: var(--risk-ink);
  font: 400 14px/1.6 "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  letter-spacing: normal;
  font-variant-numeric: tabular-nums;
}
.tax-risk-panel :is(button, input, select, textarea) { font-family: inherit; letter-spacing: inherit; }
.tax-risk-panel .tax-risk-heading { align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 12px; }
.tax-risk-heading h3 { margin: 0; font-size: 21px; line-height: 1.35; font-weight: 650; color: var(--risk-ink); }
.tax-risk-heading .tax-risk-context { margin: 4px 0 0; font-size: 13px; font-weight: 400; color: var(--risk-muted); }
.tax-risk-panel .heading-actions { flex-wrap: wrap; min-width: 0; max-width: 100%; gap: 7px; overflow: visible; }
.tax-risk-panel .btn { min-height: 34px; padding: 6px 12px; font-size: 13px; font-weight: 550; box-shadow: none; }
.tax-risk-panel p, .tax-risk-panel li { overflow-wrap: anywhere; }
.tax-risk-notice { margin: 0 0 10px; font-size: 12px; color: var(--risk-muted); }
.tax-risk-counts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin: 0; overflow: hidden; border: 1px solid var(--risk-line); border-radius: 12px; background: var(--risk-line);
}
.tax-risk-counts > div { padding: 14px 18px; background: var(--risk-soft); }
.tax-risk-counts dt { color: var(--risk-muted); font-size: 13px; font-weight: 500; }
.tax-risk-counts dd { margin: 3px 0 0; color: var(--risk-ink); font-size: 29px; line-height: 1.15; font-weight: 600; }
.tax-risk-muted { margin: 12px 0 2px; color: var(--risk-ink); font-size: 13px; }
.tax-risk-coverage { margin: 0 0 12px; color: var(--risk-muted); font-size: 12px; }
.tax-risk-toolbar, .tax-risk-card-head, .tax-risk-filters, .tax-risk-review-actions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.tax-risk-toolbar { justify-content: space-between; margin: 22px 0 10px; }
.tax-risk-toolbar h4, .tax-risk-reference h4 { margin: 0; font-size: 16px; font-weight: 650; color: var(--risk-ink); }
.tax-risk-toolbar h4 span { margin-left: 4px; color: var(--risk-muted); font-size: 13px; font-weight: 500; }
.tax-risk-filter { display: inline-flex; align-items: center; gap: 7px; color: var(--risk-muted); white-space: nowrap; font-size: 13px; }
.tax-risk-panel :is(select, textarea) { border: 1px solid var(--risk-line); border-radius: 7px; background-color: var(--risk-paper); color: var(--risk-ink); font-size: 14px; }
.tax-risk-panel select { margin: 0; min-height: 34px; padding: 5px 8px; }
.tax-risk-panel :is(summary, button, select, textarea, a):focus-visible { outline: 2px solid var(--risk-accent); outline-offset: 2px; }
.tax-risk-card { margin: 0 0 12px; padding: 18px 20px; border: 1px solid var(--risk-line); border-radius: 12px; background: var(--risk-paper); }
.tax-risk-card-head { justify-content: space-between; align-items: flex-start; gap: 6px 16px; }
.tax-risk-card-head > div { min-width: 0; }
.tax-risk-classification { display: flex; align-items: center; gap: 8px; color: var(--risk-muted); font-size: 12px; }
.tax-risk-chip { padding: 1px 8px; border-radius: 5px; background: var(--risk-soft); color: var(--risk-ink); font-weight: 550; }
.tax-risk-chip[data-state="资料不足"] { background: #fff0d4; color: #79500c; }
.tax-risk-chip[data-state="风险候选"] { background: #fbe9e6; color: #943c33; }
.tax-risk-chip[data-state="已复核"] { background: #e3f2eb; color: #236247; }
.tax-risk-card-head h4 { margin: 7px 0 0; font-size: 17px; line-height: 1.45; font-weight: 650; }
.tax-risk-no-amount { color: var(--risk-muted); font-size: 12px; }
.tax-risk-amount { color: var(--risk-accent); font-size: 16px; }
.tax-risk-card p { margin: 8px 0; }
.tax-risk-card ul, .tax-risk-policy ul { margin: 8px 0; padding-left: 1.4em; }
.tax-risk-card li + li, .tax-risk-policy li + li { margin-top: 4px; }
.tax-risk-panel details { color: var(--risk-ink); font-size: 13px; }
.tax-risk-panel summary { display: flex; align-items: center; gap: 8px; min-height: 36px; font-weight: 550; cursor: pointer; list-style: none; }
.tax-risk-panel summary::-webkit-details-marker { display: none; }
.tax-risk-panel summary::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; margin-inline: 2px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.tax-risk-panel details[open] > summary::before { transform: rotate(45deg); }
.tax-risk-panel summary:hover { color: var(--risk-accent); }
.tax-risk-policy { padding: 2px 12px; border: 1px solid var(--risk-line); border-radius: 8px; background: var(--risk-paper); }
.tax-risk-reference { margin-top: 22px; }
.tax-risk-reference h4 { margin-bottom: 8px; }
.tax-risk-reference .tax-risk-policy { border-width: 0 0 1px; border-radius: 0; background: transparent; }
.tax-risk-panel a { color: var(--risk-accent); text-underline-offset: 3px; }
.tax-risk-sources { display: flex; flex-wrap: wrap; gap: 7px; max-height: 240px; overflow: auto; }
.tax-risk-sources .btn { white-space: normal; text-align: left; }
.tax-risk-review { display: grid; grid-template-columns: minmax(128px, 0.8fr) minmax(170px, 3fr) auto; align-items: end; gap: 10px 14px; margin: 10px 0 4px; padding: 14px; border-radius: 8px; background: var(--risk-soft); }
.tax-risk-review label { display: grid; gap: 5px; min-width: 0; font-size: 12px; font-weight: 550; color: var(--risk-muted); }
.tax-risk-review textarea { min-height: 44px; width: 100%; resize: vertical; padding: 7px 9px; font-weight: 400; line-height: 1.5; }
.tax-risk-review-actions { gap: 6px; }
.tax-risk-panel [data-tax-risk-review] { background: var(--risk-accent); border-color: var(--risk-accent); color: var(--risk-paper); }
.tax-risk-explanation, .tax-risk-comparison { padding: 10px 12px; border-inline-start: 3px solid var(--risk-accent); background: var(--risk-soft); }
.tax-risk-warning { color: var(--amber); }

@container (max-width: 760px) {
  .tax-risk-review { grid-template-columns: minmax(128px, 1fr) minmax(0, 2fr); }
  .tax-risk-review-actions { grid-column: 1 / -1; }
}
@container (max-width: 520px) {
  .tax-risk-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tax-risk-counts > div { padding: 10px 14px; }
  .tax-risk-card { padding: 14px; }
  .tax-risk-review { grid-template-columns: minmax(0, 1fr); }
  .tax-risk-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .tax-risk-filter { display: grid; gap: 3px; }
  .tax-risk-filter select { width: 100%; }
}
@media (prefers-color-scheme: dark) {
  .tax-risk-panel { --risk-ink: #e3ebf2; --risk-muted: #b4c3d0; --risk-line: #425262; --risk-soft: #263543; --risk-paper: #1c2834; --risk-accent: #91cff1; color-scheme: dark; }
  .app-shell #taxRiskPanel :is(select, textarea, .btn:not(.primary)) {
    color: var(--risk-ink); background: var(--risk-soft); border-color: #61788a;
  }
  .app-shell #taxRiskPanel .btn[data-tax-risk-review] { background: var(--risk-accent); color: var(--risk-paper); border-color: var(--risk-accent); }
  .app-shell #taxRiskPanel textarea::placeholder { color: var(--risk-muted); }
}
.tax-catalog-toggle { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; font-size: 13px; }
.tax-catalog-toggle input { width: auto; margin: 0; }
.tax-risk-return { position: fixed; bottom: 24px; right: 24px; z-index: 100; background: #fff; border: 2px solid #176d73; box-shadow: 0 4px 16px #22334422; }

/* Persistent organization trial reminder inside the authenticated workspace. */
.software-trial-reminder { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #ebcd85; border-radius: 12px; background: #fff8e6; color: #705017; font-size: 14px; line-height: 1.6; }
.software-trial-reminder[hidden] { display: none; }
/* An unassigned placeholder is not an empty, usable business ledger. */
.view.requires-ledger > :not(.ledger-access-empty) {
  display: none !important;
}

.ledger-access-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid #dce4e5;
  border-radius: 14px;
  background: #fff;
}

.ledger-access-empty[hidden] {
  display: none;
}

.ledger-access-empty h2 {
  margin: 0 0 14px;
}

.ledger-access-empty p {
  color: #586771;
  line-height: 1.7;
}

.ledger-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

/* Finance workspace: concise task entry, genuine period summaries, shared 真玥 identity. */
.finance-workbench-overview { margin: 20px 0; color: #20324b; }
.finance-overview-head { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:14px; }
.finance-overview-head span { color:#748299; font-size:12px; }
.finance-overview-head h2 { margin:4px 0 0; font-size:22px; font-weight:650; letter-spacing:-.4px; }
.finance-overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.finance-analysis-card { display:flex; flex-direction:column; min-width:0; gap:18px; padding:22px; text-align:left; border:1px solid #dfe6ee; border-radius:18px; background:#fff; color:inherit; box-shadow:0 3px 14px #20324b05; transition: border-color .16s, box-shadow .16s; }
.finance-analysis-card:hover { border-color:#91adc9; box-shadow:0 6px 22px #20324b0c; }
.finance-analysis-card:focus-visible { outline:3px solid #80a6dd; outline-offset:3px; }
.finance-analysis-label { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:15px; font-weight:650; }
.finance-analysis-label > span { color:#69829d; font-size:12px; font-weight:400; }
.finance-analysis-card > small { color:#718198; line-height:1.6; font-size:12px; }
.finance-chart-bars { display:grid; gap:18px; margin:auto 0; }
.finance-chart-bar { display:grid; grid-template-columns:32px minmax(40px,1fr) minmax(85px,auto); align-items:center; gap:12px; font-size:12px; }
.finance-chart-bar > strong { font-variant-numeric:tabular-nums; text-align:right; font-size:14px; font-weight:550; }
.finance-chart-track { height:12px; border-radius:4px; overflow:hidden; background:#f0f3f7; }
.finance-chart-track i { display:block; height:100%; border-radius:4px; }
.finance-chart-track .is-income { background:#5b8fce; }
.finance-chart-track .is-expense { background:#51a49b; }
.finance-chart-empty { display:grid; gap:8px; margin:auto 0; padding:12px 0; font-size:16px; color:#566c85; }
.finance-chart-empty span { font-size:13px; color:#8a98aa; }
.finance-voucher-progress { display:flex; align-items:center; gap:28px; }
.finance-progress-ring { width:94px; height:94px; flex-shrink:0; display:flex; position:relative; align-items:center; justify-content:center; flex-direction:column; border-radius:50%; background:conic-gradient(#5b8fce var(--progress),#e9eef5 0); }
.finance-progress-ring::before { content:""; position:absolute; inset:8px; border-radius:50%; background:#fff; }
.finance-progress-ring strong,.finance-progress-ring span { position:relative; }
.finance-progress-ring strong { font-size:25px; font-weight:650; line-height:1.3; font-variant-numeric:tabular-nums; }
.finance-progress-ring span { color:#718198; font-size:11px; }
.finance-progress-legend { flex:1; display:grid; gap:16px; font-size:13px; }
.finance-progress-legend > span { display:flex; align-items:center; gap:8px; }
.finance-progress-legend b { margin-left:auto; font-variant-numeric:tabular-nums; }
.finance-progress-legend i { width:8px; height:8px; background:#5b8fce; border-radius:3px; }
.finance-progress-legend > span + span i { background:#d3deeb; }
.app-shell .zhenyue-portrait { object-fit:cover; object-position:center 28%; padding:0; background:#f1f4f8; box-shadow:none; border:1px solid #e3e8f0; border-radius:50%; }
.app-shell .home-agent-avatar { width:46px; height:46px; }
body[data-active-view="digitalEmployee"] .employee-chat-shell { grid-template-columns:minmax(0,1fr) minmax(360px,.7fr); gap:18px; min-height:0; }
body[data-active-view="digitalEmployee"] .employee-roster { border:0; background:transparent; box-shadow:none; padding:0 0 4px; backdrop-filter:none; gap:16px; }
body[data-active-view="digitalEmployee"] .employee-roster-head { display:none; }
body[data-active-view="digitalEmployee"] .employee-roster-list { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; overflow:visible; }
body[data-active-view="digitalEmployee"] .employee-roster-row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:12px; border:1px solid #e1e7ef; border-radius:12px; background:#fff; box-shadow:none; }
body[data-active-view="digitalEmployee"] .employee-roster-row:hover { background:#f0f5fb; border-color:#b0c5df; }
body[data-active-view="digitalEmployee"] .employee-roster-row .employee-avatar { width:28px; height:28px; border-radius:8px; box-shadow:none; background:#eaf1fa; color:#4c6f9b; font-weight:500; font-size:12px; }
body[data-active-view="digitalEmployee"] .employee-roster-text strong { font-weight:600; font-size:13px; }
body[data-active-view="digitalEmployee"] .employee-roster-row small { display:none; }
body[data-active-view="digitalEmployee"] .employee-roster-row em { flex-basis:100%; margin:0; padding:0; font-weight:400; font-size:11px; color:#718198; }
body[data-active-view="digitalEmployee"] .employee-conversation-column,
body[data-active-view="digitalEmployee"] .employee-judgement-column { border-radius:18px; border-color:#dfe6ee; background:#fff; box-shadow:0 3px 18px #20324b05; backdrop-filter:none; }
body[data-active-view="digitalEmployee"] .employee-chat-header { background:#fff; padding:20px 24px; border-bottom:1px solid #edf0f5; }
body[data-active-view="digitalEmployee"] .employee-chat-title p { color:#213852; font-size:17px; font-weight:650; margin-bottom:5px; }
body[data-active-view="digitalEmployee"] .employee-chat-title strong { display:none; }
body[data-active-view="digitalEmployee"] .natural-language-agent-panel { padding:22px 24px; gap:18px; }
body[data-active-view="digitalEmployee"] .natural-language-agent-head,
body[data-active-view="digitalEmployee"] .agent-dialogue-guide { display:none; }
body[data-active-view="digitalEmployee"] .agent-message-bubble { box-shadow:none; border:0; border-radius:16px; padding:14px 16px; }
body[data-active-view="digitalEmployee"] .agent-message.is-assistant .agent-message-bubble { background:#f6f8fb; max-width:calc(100% - 44px); }
body[data-active-view="digitalEmployee"] .agent-message.is-user .agent-message-bubble { background:#eaf1fb; color:#263e5e; }
body[data-active-view="digitalEmployee"] .agent-message.is-user .agent-message-bubble :is(span,strong) { color:#263e5e; }
body[data-active-view="digitalEmployee"] .agent-message-bubble strong { font-size:14px; font-weight:450; line-height:1.85; }
body[data-active-view="digitalEmployee"] .agent-message-bubble small { font-size:12px; line-height:1.7; font-weight:400; }
body[data-active-view="digitalEmployee"] .agent-command-form { border-radius:18px; padding:14px; border:1px solid #ced9e7; background:#fff; box-shadow:0 3px 12px #20324b05; }
body[data-active-view="digitalEmployee"] .agent-command-input { font-size:12px; font-weight:400; color:#7b8b9e; }
body[data-active-view="digitalEmployee"] .agent-command-input textarea { padding:12px 2px; min-height:92px; border:0; box-shadow:none; font-size:14px; line-height:1.7; resize:vertical; }
body[data-active-view="digitalEmployee"] .agent-command-input textarea:focus-visible { outline:2px solid #a6bddd; outline-offset:2px; }
body[data-active-view="digitalEmployee"] .agent-command-actions { gap:8px; flex-wrap:wrap; }
body[data-active-view="digitalEmployee"] .agent-command-actions .btn { min-height:36px; padding:8px 12px; border-radius:10px; font-size:12px; }
body[data-active-view="digitalEmployee"] .agent-voice-status { font-size:11px; }
body[data-active-view="digitalEmployee"] .employee-judgement-column { padding:18px; grid-column:2; }
body[data-active-view="digitalEmployee"] .employee-confirm-panel { box-shadow:none; border-color:#e4eaf2; }
body[data-active-view="digitalEmployee"] .employee-workflow-console { box-shadow:none; }
#dashboard .start-ledger-quickstart { border-radius:18px; border:1px solid #dfe6ee; box-shadow:none; background:#fff; }
#dashboard .start-ledger-next-actions { display:flex; flex-wrap:wrap; gap:10px; }
#dashboard .start-ledger-next-actions button { flex:0 1 auto; width:auto; min-width:145px; min-height:56px; padding:12px 16px; border-radius:12px; }
#dashboard .start-ledger-next-actions strong { font-size:13px; font-weight:600; }
#dashboard .home-agent-brief { border-radius:18px; border-color:#dfe6ee; box-shadow:none; background:#fff; }
@media(max-width:1500px) {
  body[data-active-view="digitalEmployee"] .employee-chat-shell { grid-template-columns:minmax(0,1fr); }
  body[data-active-view="digitalEmployee"] .employee-judgement-column { grid-column:1; }
}
@media(max-width:700px) {
  .finance-overview-grid { grid-template-columns:minmax(0,1fr); }
  .finance-analysis-card { padding:18px; }
  body[data-active-view="digitalEmployee"] .employee-roster-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body[data-active-view="digitalEmployee"] .employee-chat-header,
  body[data-active-view="digitalEmployee"] .natural-language-agent-panel { padding:16px; }
}
@media(prefers-reduced-motion:reduce) { .finance-analysis-card { transition:none; } }
@media print { .finance-analysis-card { box-shadow:none; break-inside:avoid; } }

/* Keep the daily summary readable at the actual application content width. */
#dashboard .home-agent-brief { width:100%; max-width:none; transform:none; grid-template-columns:minmax(240px,1fr) minmax(150px,.55fr) auto; gap:16px; padding:18px; }
#dashboard .home-agent-brief-main { display:flex; align-items:center; gap:12px; min-width:0; }
#dashboard .home-agent-brief-main > div { display:grid; gap:5px; }
#dashboard .home-agent-brief-main span { color:#718198; font-size:12px; }
#dashboard .home-agent-brief-main strong { color:#243952; font-size:15px; font-weight:600; line-height:1.5; }
#dashboard .home-agent-brief-main small { color:#718198; font-size:12px; line-height:1.6; }
#dashboard .home-agent-brief-card { min-width:0; box-shadow:none; background:#f7f9fc; border-color:#e7ecf3; }
#dashboard .home-agent-brief-card:not(.is-action) { display:none; }
#dashboard .home-agent-brief-card.is-action { min-width:0; min-height:70px; padding:12px 14px; }
#dashboard .home-agent-brief-card.is-action > span { font-size:14px; font-weight:600; }
#dashboard .home-agent-brief-card.is-action strong { font-size:26px; font-weight:650; color:#547bb1; }
#dashboard .home-agent-brief-card > small { font-weight:400; }
@media(max-width:1100px) {
  #dashboard .home-agent-brief { grid-template-columns:minmax(0,1fr) auto; }
  #dashboard .home-agent-brief-main { grid-column:1 / -1; }
}

body[data-active-view="digitalEmployee"] .finance-system-agent-loop-head { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
body[data-active-view="digitalEmployee"] .finance-system-agent-loop-head > div { min-width:0; }
body[data-active-view="digitalEmployee"] .finance-system-agent-loop-head > em { justify-self:start; white-space:normal; }
body[data-active-view="digitalEmployee"] .employee-judgement-column .finance-agent-loop-lanes { grid-template-columns:minmax(0,1fr); }
/* Ledger center keeps authorization and local recovery visible without
   introducing a second permission system. */
.ledger-center-panel .panel-title small,
.ledger-recycle-panel .panel-title small,
.view-heading > div > small { display:block; color:var(--muted,#70829b); margin-top:6px; }
.ledger-center-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:14px; }
.ledger-center-card { border:1px solid var(--line,#dbe4f0); border-radius:16px; padding:18px; background:linear-gradient(145deg,#fff,#f7faff); box-shadow:0 8px 24px rgba(36,71,111,.06); }
.ledger-center-card.is-active { border-color:#78a8ee; box-shadow:0 10px 28px rgba(48,103,210,.12); }
.ledger-center-card-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.ledger-center-card-head strong { display:block; font-size:18px; color:var(--ink,#1c3557); margin-top:6px; }
.ledger-center-status { color:var(--accent,#3265d8); font-size:12px; }
.ledger-center-card p { margin:12px 0 8px; color:var(--ink-soft,#5d7393); }
.ledger-center-card small { color:var(--muted,#8091a9); line-height:1.5; }
.ledger-center-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.ledger-center-actions .is-danger, .mini-action.is-danger { color:#bd5a5a; border-color:#e7caca; }
.ledger-center-quick-links { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:6px; margin-top:8px; }
.ledger-recycle-panel .table-wrap { margin-top:8px; }
.ledger-book-overview { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:14px 0; }
.ledger-book-overview-card { min-width:0; padding:12px 14px; border:1px solid #dce6f2; border-radius:12px; background:#f7faff; }
.ledger-book-overview-card span,.ledger-book-overview-card small { display:block; color:#7185a2; font-size:12px; }
.ledger-book-overview-card strong { display:block; margin:5px 0; color:#1c3557; font-size:18px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.ledger-book-overview-card.is-good { border-color:#bfe3d6; background:#f2fbf7; }
.ledger-book-overview-card.is-good strong { color:#138467; }
.ledger-book-overview-card.is-warning { border-color:#ecd4a7; background:#fff9ed; }
.ledger-book-overview-card.is-warning strong { color:#ae6a00; }
.report-center-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:14px; }
.report-center-summary-card { padding:11px 13px; border:1px solid #dce6f2; border-radius:12px; background:#f7faff; }
.report-center-summary-card span,.report-center-summary-card small { display:block; color:#7185a2; font-size:12px; }
.report-center-summary-card strong { display:block; margin:5px 0; color:#1c3557; font-size:17px; }
.report-center-summary-card.is-good { border-color:#bfe3d6; background:#f2fbf7; }
.report-center-summary-card.is-good strong { color:#138467; }
.report-center-summary-card.is-warning { border-color:#ecd4a7; background:#fff9ed; }
.report-center-summary-card.is-warning strong { color:#ae6a00; }
@media (max-width:760px) { .ledger-center-quick-links { justify-content:flex-start; } .ledger-center-grid { grid-template-columns:1fr; } }
@media (max-width:900px) { .ledger-book-overview { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) { .report-center-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Business-to-voucher center: compact, source-bound and review-first. */
.business-voucher-center-panel { border-color:#d9e4f0; background:linear-gradient(145deg,#fff,#f8fbff); }
.business-voucher-flow { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin:18px 0; }
.business-voucher-flow-step { min-width:0; padding:14px; border:1px solid #dce5f0; border-radius:14px; background:#f7f9fc; }
.business-voucher-flow-step span { display:inline-flex; width:24px; height:24px; align-items:center; justify-content:center; border-radius:8px; background:#e7effd; color:#3265d8; font-size:11px; font-weight:700; }
.business-voucher-flow-step strong { display:block; margin-top:9px; color:#203a5e; font-size:14px; }
.business-voucher-flow-step small { display:block; margin-top:5px; color:#73859c; font-size:11px; line-height:1.55; }
.business-voucher-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:16px 0; }
.business-voucher-metric { padding:13px 15px; border:1px solid #dce6f2; border-radius:12px; background:#fff; }
.business-voucher-metric span,.business-voucher-metric small { display:block; color:#7185a2; font-size:12px; }
.business-voucher-metric strong { display:block; margin:5px 0; color:#1c3557; font-size:20px; font-variant-numeric:tabular-nums; }
.business-voucher-metric.is-warning { border-color:#ecd4a7; background:#fff9ed; }
.business-voucher-metric.is-warning strong { color:#ae6a00; }
.business-voucher-source-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.business-voucher-source-card { min-width:0; padding:16px; border:1px solid #dce6f2; border-radius:14px; background:#fff; box-shadow:0 6px 18px rgba(36,71,111,.04); }
.business-voucher-source-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; }
.business-voucher-source-head span { display:block; color:#7185a2; font-size:12px; }
.business-voucher-source-head strong { display:block; margin-top:5px; color:#203a5e; font-size:16px; }
.business-voucher-status { flex:0 0 auto; padding:5px 8px; border-radius:999px; color:#667a95; background:#f2f5f9; font-size:11px; font-style:normal; white-space:nowrap; }
.business-voucher-status.is-success { color:#1f826e; background:#edf8f3; }
.business-voucher-status.is-warning { color:#ae6a00; background:#fff5df; }
.business-voucher-source-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:15px; }
.business-voucher-source-stats span { display:block; padding:8px 9px; border-radius:9px; background:#f7f9fc; color:#7185a2; font-size:11px; }
.business-voucher-source-stats b { display:block; margin-top:4px; color:#203a5e; font-size:16px; font-variant-numeric:tabular-nums; }
.business-voucher-source-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.business-voucher-boundary { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:baseline; margin-top:16px; padding:13px 15px; border:1px solid #cdddf5; border-radius:12px; background:#eef5ff; color:#527096; font-size:12px; line-height:1.6; }
.business-voucher-boundary strong { color:#315985; }
.business-voucher-boundary small { flex-basis:100%; color:#7b8da5; }
@media (max-width:980px) { .business-voucher-flow { grid-template-columns:repeat(3,minmax(0,1fr)); } .business-voucher-source-grid { grid-template-columns:1fr; } .business-voucher-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:640px) { .business-voucher-flow,.business-voucher-metrics { grid-template-columns:1fr; } .business-voucher-source-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Finance pulse visual layer: decision-oriented colour, charts and risk signals. */
#dashboard .finance-workbench-overview {
  --finance-ink:#183452;
  --finance-muted:#7186a1;
  --finance-line:#d9e5f2;
  --finance-blue:#3b72dc;
  --finance-teal:#279e8e;
  --finance-gold:#c9852f;
  --finance-red:#c85c62;
  margin:24px 0 28px;
  color:var(--finance-ink);
}
#dashboard .finance-overview-head { margin-bottom:18px; align-items:flex-end; }
#dashboard .finance-overview-eyebrow { display:block; color:#6880a0; font-size:11px; letter-spacing:.14em; font-weight:700; }
#dashboard .finance-overview-head h2 { color:var(--finance-ink); font-size:26px; letter-spacing:-.55px; }
#dashboard .finance-overview-head small { display:block; margin-top:6px; color:var(--finance-muted); font-size:12px; line-height:1.55; }
#dashboard .finance-overview-assistant { display:inline-flex; align-items:center; gap:8px; border-color:#cbdcf8; background:#f3f7ff; color:#315fae; }
#dashboard .finance-assistant-dot { width:7px; height:7px; border-radius:50%; background:var(--finance-blue); box-shadow:0 0 0 4px #dfeaff; }
#dashboard .finance-overview-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
#dashboard .finance-kpi-card { position:relative; min-width:0; padding:15px 16px 14px; border:1px solid var(--finance-line); border-radius:16px; background:linear-gradient(145deg,#fff,#f7faff); text-align:left; color:inherit; box-shadow:0 6px 20px rgba(35,72,115,.045); transition:transform .16s,box-shadow .16s,border-color .16s; }
#dashboard .finance-kpi-card:hover { transform:translateY(-2px); border-color:#aac5ec; box-shadow:0 10px 26px rgba(35,72,115,.10); }
#dashboard .finance-kpi-card span, #dashboard .finance-kpi-card small { display:block; color:var(--finance-muted); font-size:11px; }
#dashboard .finance-kpi-card strong { display:block; margin:7px 0 4px; color:var(--finance-ink); font-size:20px; font-weight:700; font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#dashboard .finance-kpi-card i { position:absolute; top:14px; right:14px; color:#91a6c2; font-size:14px; font-style:normal; }
#dashboard .finance-kpi-card.is-income { border-top:3px solid var(--finance-blue); }
#dashboard .finance-kpi-card.is-expense { border-top:3px solid var(--finance-teal); }
#dashboard .finance-kpi-card.is-progress { border-top:3px solid #7b86e9; }
#dashboard .finance-kpi-card.is-attention { border-top:3px solid var(--finance-gold); background:linear-gradient(145deg,#fffdf8,#fff8ea); }
#dashboard .finance-kpi-card.is-attention strong { color:#a96516; }
#dashboard .finance-overview-grid { gap:14px; }
#dashboard .finance-analysis-card { gap:14px; padding:19px 20px; border-radius:18px; border-color:var(--finance-line); box-shadow:0 8px 24px rgba(35,72,115,.055); }
#dashboard .finance-analysis-label { font-size:14px; }
#dashboard .finance-analysis-label > span:last-child { color:#6b82a0; }
#dashboard .finance-card-title { display:inline-flex; align-items:center; gap:9px; }
#dashboard .finance-card-title b { font-weight:700; }
#dashboard .finance-card-icon { display:inline-flex; align-items:center; justify-content:center; width:27px; height:27px; border-radius:9px; font-size:12px; font-style:normal; }
#dashboard .finance-card-icon.is-cash { color:#2e70c8; background:#eaf2ff; }
#dashboard .finance-card-icon.is-voucher { color:#218874; background:#e8f7f1; }
#dashboard .finance-analysis-intro { display:grid; gap:3px; }
#dashboard .finance-analysis-intro strong { color:var(--finance-ink); font-size:14px; }
#dashboard .finance-analysis-intro span { color:var(--finance-muted); font-size:11px; }
#dashboard .finance-chart-bars { gap:13px; margin:3px 0; }
#dashboard .finance-chart-bar { grid-template-columns:34px minmax(40px,1fr) minmax(84px,auto); gap:10px; }
#dashboard .finance-chart-track { height:10px; border-radius:99px; background:#edf2f7; }
#dashboard .finance-chart-track i { border-radius:99px; }
#dashboard .finance-chart-track .is-income { background:linear-gradient(90deg,#4a82e4,#74a8f5); }
#dashboard .finance-chart-track .is-expense { background:linear-gradient(90deg,#38a894,#7bc8b8); }
#dashboard .finance-share-row { display:flex; align-items:center; gap:12px; margin-top:2px; padding-top:12px; border-top:1px solid #edf1f6; }
#dashboard .finance-share-row > div:last-child { display:grid; gap:3px; }
#dashboard .finance-share-row strong { color:var(--finance-ink); font-size:12px; }
#dashboard .finance-share-row small { color:var(--finance-muted); font-size:11px; }
#dashboard .finance-donut { width:42px; height:42px; flex:0 0 auto; display:grid; place-items:center; border-radius:50%; background:conic-gradient(#4a82e4 var(--income-share),#80c6b8 0); position:relative; }
#dashboard .finance-donut::after { content:""; position:absolute; inset:7px; border-radius:50%; background:#fff; }
#dashboard .finance-donut span { position:relative; z-index:1; color:var(--finance-ink); font-size:10px; font-weight:700; }
#dashboard .finance-progress-ring { width:82px; height:82px; background:conic-gradient(#5a83e1 var(--progress),#e9eef5 0); }
#dashboard .finance-progress-ring::before { inset:7px; }
#dashboard .finance-progress-status { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 11px; border-radius:10px; background:#f5f8fc; }
#dashboard .finance-progress-status span { font-size:12px; font-weight:700; }
#dashboard .finance-progress-status small { color:var(--finance-muted); font-size:11px; }
#dashboard .finance-progress-status.success { background:#edf8f3; color:#20836f; }
#dashboard .finance-progress-status.watch { background:#fff7e8; color:#a66a1a; }
#dashboard .finance-progress-status.risk { background:#fff0f0; color:#b6535b; }
#dashboard .finance-progress-status.neutral { color:#6c819e; }
#dashboard .finance-risk-rail { margin-top:14px; padding:15px 16px; border:1px solid #d9e5f2; border-radius:16px; background:linear-gradient(120deg,#f9fbff,#f5f9fd); }
#dashboard .finance-risk-rail-head { display:flex; align-items:baseline; justify-content:space-between; gap:14px; margin-bottom:10px; }
#dashboard .finance-risk-rail-head > div { display:grid; gap:3px; }
#dashboard .finance-risk-rail-head span { color:#7e92ac; font-size:10px; letter-spacing:.12em; font-weight:700; }
#dashboard .finance-risk-rail-head strong { color:var(--finance-ink); font-size:14px; }
#dashboard .finance-risk-rail-head small { color:#8294aa; font-size:11px; }
#dashboard .finance-risk-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
#dashboard .finance-risk-item { display:flex; align-items:center; gap:9px; min-width:0; padding:10px 11px; border:1px solid #e0e8f2; border-radius:11px; background:#fff; text-align:left; color:inherit; }
#dashboard .finance-risk-item:hover { border-color:#b4cbed; background:#fbfdff; }
#dashboard .finance-risk-item > i { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:#8498b3; box-shadow:0 0 0 4px #edf1f6; }
#dashboard .finance-risk-item.is-success > i { background:#2da38d; box-shadow:0 0 0 4px #e0f4ed; }
#dashboard .finance-risk-item.is-watch > i { background:#d29131; box-shadow:0 0 0 4px #fff0d6; }
#dashboard .finance-risk-item.is-risk > i { background:#ca6068; box-shadow:0 0 0 4px #fde3e4; }
#dashboard .finance-risk-item > span { display:grid; gap:2px; min-width:0; }
#dashboard .finance-risk-item strong { overflow:hidden; color:var(--finance-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#dashboard .finance-risk-item small { overflow:hidden; color:#8294aa; font-size:11px; text-overflow:ellipsis; white-space:nowrap; }
#dashboard .finance-risk-item em { margin-left:auto; flex:0 0 auto; color:#6b84a4; font-size:11px; font-style:normal; }
#dashboard .accounting-core-summary { margin:14px 0; padding:15px 16px 13px; border:1px solid #d9e5f2; border-radius:16px; background:linear-gradient(125deg,#fbfdff,#f3f8fd); box-shadow:0 8px 24px rgba(43,75,116,.04); }
#dashboard .accounting-core-summary-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
#dashboard .accounting-core-summary-head > div { display:grid; gap:3px; min-width:0; }
#dashboard .accounting-core-summary-head span:first-child { color:#7890ad; font-size:10px; letter-spacing:.12em; font-weight:700; }
#dashboard .accounting-core-summary-head strong { color:var(--finance-ink); font-size:15px; }
#dashboard .accounting-core-summary-head small { color:#8395ab; font-size:11px; }
#dashboard .accounting-core-status { flex:0 0 auto; padding:5px 9px; border-radius:999px; color:#5f7188; background:#edf2f8; font-size:11px; font-weight:700; }
#dashboard .accounting-core-status.is-ready { color:#167d67; background:#e3f5ee; }
#dashboard .accounting-core-status.is-attention { color:#a56b17; background:#fff1d9; }
#dashboard .accounting-core-status.is-closed { color:#8f5660; background:#f9e7ea; }
#dashboard .accounting-core-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:12px; }
#dashboard .accounting-core-metrics article { min-width:0; padding:10px 11px; border:1px solid #e1e9f2; border-radius:12px; background:#fff; }
#dashboard .accounting-core-metrics span, #dashboard .accounting-core-metrics small { display:block; color:#8194ad; font-size:11px; }
#dashboard .accounting-core-metrics strong { display:block; margin:4px 0 2px; color:var(--finance-ink); font-size:20px; letter-spacing:-.3px; }
#dashboard .accounting-core-footer { display:flex; align-items:center; gap:10px; margin-top:10px; color:#6c819d; font-size:11px; }
#dashboard .accounting-core-footer small { color:#8a9bb0; }
#dashboard .accounting-core-footer .mini-action { margin-left:auto; }
@media (max-width:1050px) { #dashboard .finance-overview-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { #dashboard .finance-overview-head { align-items:flex-start; flex-direction:column; } #dashboard .finance-overview-kpis,.finance-risk-list,.accounting-core-metrics { grid-template-columns:1fr; } #dashboard .finance-overview-assistant { width:100%; justify-content:center; } #dashboard .accounting-core-footer { align-items:flex-start; flex-wrap:wrap; } #dashboard .accounting-core-footer .mini-action { margin-left:0; } }

/* Agency workbench: an operational projection over the existing finance core. */
#agencyWorkbench { --agency-ink:#173458; --agency-muted:#7890ae; --agency-line:#dce7f3; --agency-blue:#3976df; --agency-teal:#239c8c; --agency-gold:#c9842c; }
#agencyWorkbench .agency-workbench-heading { align-items:flex-end; margin-bottom:18px; }
#agencyWorkbench .agency-workbench-heading h2 { letter-spacing:-.6px; }
#agencyWorkbench .agency-kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
#agencyWorkbench .agency-kpi-card { min-width:0; padding:15px 16px 14px; border:1px solid var(--agency-line); border-radius:16px; background:linear-gradient(145deg,#fff,#f7faff); box-shadow:0 7px 22px rgba(35,72,115,.05); }
#agencyWorkbench .agency-kpi-card span,#agencyWorkbench .agency-kpi-card small { display:block; color:var(--agency-muted); font-size:11px; }
#agencyWorkbench .agency-kpi-card strong { display:block; margin:7px 0 4px; overflow:hidden; color:var(--agency-ink); font-size:23px; text-overflow:ellipsis; white-space:nowrap; }
#agencyWorkbench .agency-kpi-card.is-warning { border-top:3px solid var(--agency-gold); background:linear-gradient(145deg,#fffdf8,#fff8eb); }
#agencyWorkbench .agency-kpi-card.is-warning strong { color:#aa691c; }
#agencyWorkbench .agency-kpi-card.is-muted { background:#f7faff; }
#agencyWorkbench .agency-primary-grid,#agencyWorkbench .agency-secondary-grid { grid-template-columns:minmax(0,1.35fr) minmax(330px,.8fr); gap:14px; margin-bottom:14px; }
#agencyWorkbench .agency-secondary-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
#agencyWorkbench .agency-client-panel,#agencyWorkbench .agency-monthly-panel,#agencyWorkbench .agency-batch-panel,#agencyWorkbench .agency-review-panel { min-width:0; border-color:var(--agency-line); border-radius:18px; box-shadow:0 8px 24px rgba(35,72,115,.045); }
#agencyWorkbench .agency-client-rows { display:grid; gap:9px; }
#agencyWorkbench .agency-client-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:14px; padding:13px 14px; border:1px solid #e5edf6; border-radius:13px; background:#fbfdff; }
#agencyWorkbench .agency-client-main { display:flex; align-items:center; gap:10px; min-width:0; }
#agencyWorkbench .agency-client-main > div { display:grid; gap:4px; min-width:0; }
#agencyWorkbench .agency-client-main strong { overflow:hidden; color:var(--agency-ink); font-size:14px; text-overflow:ellipsis; white-space:nowrap; }
#agencyWorkbench .agency-client-main small { color:var(--agency-muted); font-size:11px; }
#agencyWorkbench .agency-client-avatar { display:grid; width:33px; height:33px; flex:0 0 auto; place-items:center; border-radius:11px; color:#2c67c8; background:#eaf2ff; font-weight:700; }
#agencyWorkbench .agency-client-metrics { display:flex; gap:13px; }
#agencyWorkbench .agency-client-metrics span { display:grid; min-width:42px; gap:2px; text-align:center; }
#agencyWorkbench .agency-client-metrics b { color:var(--agency-ink); font-size:15px; }
#agencyWorkbench .agency-client-metrics b.is-warning { color:#b37320; }
#agencyWorkbench .agency-client-metrics small { color:var(--agency-muted); font-size:10px; }
#agencyWorkbench .agency-monthly-board { display:grid; gap:8px; }
#agencyWorkbench .agency-stage-row { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; gap:9px; padding:10px 11px; border:1px solid #e7eef7; border-radius:11px; background:#fbfdff; }
#agencyWorkbench .agency-stage-index { color:#91a5c0; font-size:10px; font-variant-numeric:tabular-nums; }
#agencyWorkbench .agency-stage-row strong { color:var(--agency-ink); font-size:12px; }
#agencyWorkbench .agency-stage-status { padding:3px 7px; border-radius:99px; font-size:10px; white-space:nowrap; }
#agencyWorkbench .agency-stage-status.is-complete { color:#20836f; background:#e9f7f1; }
#agencyWorkbench .agency-stage-status.is-review { color:#a86918; background:#fff3dc; }
#agencyWorkbench .agency-stage-status.is-blocked { color:#b6535b; background:#fde9ea; }
#agencyWorkbench .agency-stage-status.is-pending { color:#7388a4; background:#eef3f8; }
#agencyWorkbench .agency-action-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
#agencyWorkbench .agency-action-card { display:flex; align-items:center; gap:9px; min-width:0; padding:12px; border:1px solid #e1eaf4; border-radius:13px; background:#fff; color:inherit; text-align:left; transition:border-color .16s,transform .16s,box-shadow .16s; }
#agencyWorkbench .agency-action-card:hover { border-color:#b5cdef; box-shadow:0 7px 18px rgba(35,72,115,.08); transform:translateY(-1px); }
#agencyWorkbench .agency-action-card > span:nth-child(2) { display:grid; min-width:0; gap:3px; }
#agencyWorkbench .agency-action-card strong { color:var(--agency-ink); font-size:12px; white-space:nowrap; }
#agencyWorkbench .agency-action-card small { overflow:hidden; color:var(--agency-muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
#agencyWorkbench .agency-action-card em { margin-left:auto; color:#8095af; font-size:11px; font-style:normal; }
#agencyWorkbench .agency-action-icon { display:grid; width:28px; height:28px; flex:0 0 auto; place-items:center; border-radius:9px; font-size:14px; }
#agencyWorkbench .agency-action-icon.is-gold { color:#b5701e; background:#fff2dc; }
#agencyWorkbench .agency-action-icon.is-blue { color:#2e6bd0; background:#eaf1ff; }
#agencyWorkbench .agency-action-icon.is-teal { color:#208c7d; background:#e5f6f1; }
#agencyWorkbench .agency-review-queue { display:grid; gap:8px; }
#agencyWorkbench .agency-review-row { display:grid; grid-template-columns:10px minmax(0,1fr) auto auto; align-items:center; gap:9px; padding:10px 11px; border:1px solid #e5edf6; border-radius:11px; background:#fbfdff; color:inherit; text-align:left; }
#agencyWorkbench .agency-review-row:hover { border-color:#b8cceb; background:#fff; }
#agencyWorkbench .agency-review-row > span:nth-child(2) { display:grid; min-width:0; gap:3px; }
#agencyWorkbench .agency-review-row strong { overflow:hidden; color:var(--agency-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#agencyWorkbench .agency-review-row small { overflow:hidden; color:var(--agency-muted); font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
#agencyWorkbench .agency-review-row b { color:#aa691c; font-size:13px; }
#agencyWorkbench .agency-review-row em { color:#8fa2bb; font-size:14px; font-style:normal; }
#agencyWorkbench .agency-review-dot { width:8px; height:8px; border-radius:50%; background:#cbd6e4; box-shadow:0 0 0 4px #f1f4f8; }
#agencyWorkbench .agency-review-dot.is-warning { background:#d29131; box-shadow:0 0 0 4px #fff0d6; }
#agencyWorkbench .agency-review-dot.is-clear { background:#2da38d; box-shadow:0 0 0 4px #e0f4ed; }
#agencyWorkbench .agency-empty-state { display:grid; justify-items:start; gap:8px; padding:22px; border:1px dashed #cbd9e9; border-radius:13px; background:#f8fbff; }
#agencyWorkbench .agency-empty-state.compact { padding:16px; }
#agencyWorkbench .agency-empty-state strong { color:var(--agency-ink); font-size:13px; }
#agencyWorkbench .agency-empty-state span { color:var(--agency-muted); font-size:11px; line-height:1.55; }
#agencyWorkbench .agency-boundary-note { display:flex; align-items:center; gap:8px; margin:4px 2px 22px; color:#7b90aa; font-size:11px; }
#agencyWorkbench .agency-boundary-dot { width:7px; height:7px; border-radius:50%; background:#63a9c1; box-shadow:0 0 0 4px #e6f3f7; }
@media (max-width:980px) { #agencyWorkbench .agency-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } #agencyWorkbench .agency-primary-grid,#agencyWorkbench .agency-secondary-grid { grid-template-columns:1fr; } }
@media (max-width:620px) { #agencyWorkbench .agency-kpi-grid,#agencyWorkbench .agency-action-grid { grid-template-columns:1fr; } #agencyWorkbench .agency-workbench-heading { align-items:flex-start; flex-direction:column; } #agencyWorkbench .agency-client-row { grid-template-columns:1fr; } #agencyWorkbench .agency-client-metrics { justify-content:flex-start; } }

/* Enterprise and agency are presentation modes over the same finance core. */
body[data-finance-mode="enterprise"] [data-finance-mode="agency"],
body[data-finance-mode="agency"] [data-finance-mode="enterprise"],
body[data-finance-mode="agency"] [data-app-action="open-payroll-upload"],
body[data-finance-mode="enterprise"] [data-app-action="open-filed-salary"] { display:none !important; }
body[data-finance-mode="agency"] .nav-item[data-finance-mode="agency"] { display:flex; }
.workspace-mode-picker { display:inline-flex; align-items:center; gap:7px; padding:5px 8px 5px 10px; border:1px solid var(--finance-line,#dce7f3); border-radius:12px; background:#fbfdff; color:var(--finance-muted,#7890ae); font-size:11px; white-space:nowrap; }
.workspace-mode-picker select { min-width:92px; border:0; outline:0; background:transparent; color:var(--finance-ink,#173458); font:inherit; font-weight:700; cursor:pointer; }
.workspace-mode-picker select:focus-visible { outline:2px solid #9dbdf1; outline-offset:2px; border-radius:5px; }

/* Delivery and operations are a compact agency-only view; no ledger data is duplicated. */
#agencyDelivery { --agency-ink:#173458; --agency-muted:#7890ae; --agency-line:#dce7f3; --agency-blue:#3976df; --agency-teal:#239c8c; --agency-gold:#c9842c; }
#agencyDelivery .agency-delivery-heading { align-items:flex-end; margin-bottom:18px; }
#agencyDelivery .agency-delivery-heading h2 { letter-spacing:-.6px; }
#agencyDelivery .agency-delivery-kpi-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
#agencyDelivery .agency-delivery-kpi { min-width:0; padding:15px 16px 14px; border:1px solid var(--agency-line); border-radius:16px; background:linear-gradient(145deg,#fff,#f7faff); box-shadow:0 7px 22px rgba(35,72,115,.05); }
#agencyDelivery .agency-delivery-kpi span,#agencyDelivery .agency-delivery-kpi small { display:block; color:var(--agency-muted); font-size:11px; }
#agencyDelivery .agency-delivery-kpi strong { display:block; margin:7px 0 4px; overflow:hidden; color:var(--agency-ink); font-size:21px; text-overflow:ellipsis; white-space:nowrap; font-variant-numeric:tabular-nums; }
#agencyDelivery .agency-delivery-kpi.is-warning { border-top:3px solid var(--agency-gold); background:linear-gradient(145deg,#fffdf8,#fff8eb); }
#agencyDelivery .agency-delivery-kpi.is-warning strong { color:#aa691c; }
#agencyDelivery .agency-delivery-kpi.is-muted { background:#f7faff; }
#agencyDelivery .agency-delivery-primary-grid,#agencyDelivery .agency-delivery-secondary-grid { grid-template-columns:minmax(0,1.35fr) minmax(330px,.8fr); gap:14px; margin-bottom:14px; }
#agencyDelivery .agency-delivery-secondary-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
#agencyDelivery .panel { min-width:0; border-color:var(--agency-line); border-radius:18px; box-shadow:0 8px 24px rgba(35,72,115,.045); }
#agencyDelivery .agency-delivery-list,#agencyDelivery .agency-handoff-list,#agencyDelivery .agency-analysis-list { display:grid; gap:8px; }
#agencyDelivery .agency-delivery-row,#agencyDelivery .agency-handoff-row,#agencyDelivery .agency-analysis-row { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; padding:11px 12px; border:1px solid #e5edf6; border-radius:12px; background:#fbfdff; }
#agencyDelivery .agency-delivery-row > div:first-child,#agencyDelivery .agency-handoff-row > div:first-child,#agencyDelivery .agency-analysis-row > div:first-child { display:grid; gap:3px; min-width:0; }
#agencyDelivery .agency-delivery-row strong,#agencyDelivery .agency-handoff-row strong,#agencyDelivery .agency-analysis-row strong { overflow:hidden; color:var(--agency-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#agencyDelivery .agency-delivery-row small,#agencyDelivery .agency-handoff-row small,#agencyDelivery .agency-analysis-row small { overflow:hidden; color:var(--agency-muted); font-size:10px; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
#agencyDelivery .agency-delivery-row > div:last-child,#agencyDelivery .agency-handoff-row > div:last-child { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex:0 0 auto; }
#agencyDelivery .agency-status-pill { display:inline-flex; align-items:center; padding:4px 7px; border-radius:99px; font-size:10px; white-space:nowrap; }
#agencyDelivery .agency-status-pill.is-complete { color:#20836f; background:#e9f7f1; }
#agencyDelivery .agency-status-pill.is-review { color:#a86918; background:#fff3dc; }
#agencyDelivery .agency-status-pill.is-blocked { color:#b6535b; background:#fde9ea; }
#agencyDelivery .agency-status-pill.is-pending { color:#7388a4; background:#eef3f8; }
#agencyDelivery .agency-analysis-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
#agencyDelivery .agency-analysis-columns h3 { margin:0 0 8px; color:var(--agency-ink); font-size:13px; }
#agencyDelivery .agency-analysis-row > b { flex:0 0 auto; color:var(--agency-ink); font-size:13px; font-variant-numeric:tabular-nums; }
#agencyDelivery .agency-analysis-row.is-risk { border-color:#f0d6b2; background:#fffaf1; }
#agencyDelivery .agency-analysis-row.is-risk > div strong,#agencyDelivery .agency-analysis-row.is-risk > b { color:#a96516; }
#agencyDelivery .agency-capacity-grid { grid-template-columns:minmax(0,1.35fr) minmax(330px,.8fr); gap:14px; margin:14px 0; }
#agencyDelivery .agency-capacity-grid .panel { min-width:0; border-color:var(--agency-line); border-radius:18px; box-shadow:0 8px 24px rgba(35,72,115,.045); }
#agencyDelivery .agency-capacity-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-bottom:11px; }
#agencyDelivery .agency-capacity-metrics article { min-width:0; padding:10px 11px; border:1px solid #e3ebf4; border-radius:12px; background:#fbfdff; }
#agencyDelivery .agency-capacity-metrics span,#agencyDelivery .agency-capacity-metrics small { display:block; color:var(--agency-muted); font-size:10px; }
#agencyDelivery .agency-capacity-metrics strong { display:block; margin:4px 0 2px; color:var(--agency-ink); font-size:20px; font-variant-numeric:tabular-nums; }
#agencyDelivery .agency-capacity-warnings { display:grid; gap:7px; margin-bottom:10px; }
#agencyDelivery .agency-capacity-status { display:flex; align-items:center; gap:8px; padding:9px 11px; border-radius:11px; background:#eef3f8; color:#607792; }
#agencyDelivery .agency-capacity-status > span { width:8px; height:8px; flex:0 0 auto; border-radius:50%; background:#7890ae; box-shadow:0 0 0 4px #e2eaf2; }
#agencyDelivery .agency-capacity-status strong { font-size:12px; }
#agencyDelivery .agency-capacity-status small { margin-left:auto; color:#8194aa; font-size:10px; }
#agencyDelivery .agency-capacity-status.is-success { color:#217e6b; background:#eaf7f2; }
#agencyDelivery .agency-capacity-status.is-success > span { background:#2da38d; box-shadow:0 0 0 4px #d9f1e8; }
#agencyDelivery .agency-capacity-status.is-warning { color:#a66b1b; background:#fff5e4; }
#agencyDelivery .agency-capacity-status.is-warning > span { background:#d29131; box-shadow:0 0 0 4px #ffebc5; }
#agencyDelivery .agency-capacity-status.is-risk { color:#a4545d; background:#fcedee; }
#agencyDelivery .agency-capacity-status.is-risk > span { background:#ca6068; box-shadow:0 0 0 4px #f8dfe1; }
#agencyDelivery .agency-capacity-warning { display:flex; align-items:center; gap:8px; padding:8px 10px; border:1px solid #f1e0c3; border-radius:10px; background:#fffaf1; color:#99621b; font-size:11px; }
#agencyDelivery .agency-capacity-warning.is-review { border-color:#f2cfd2; background:#fff4f4; color:#a4545d; }
#agencyDelivery .agency-capacity-warning i { width:6px; height:6px; flex:0 0 auto; border-radius:50%; background:currentColor; }
#agencyDelivery .agency-capacity-clear { padding:9px 10px; border-radius:10px; background:#f1faf6; color:#31806e; font-size:11px; }
#agencyDelivery .agency-capacity-rows,#agencyDelivery .agency-coverage-list { display:grid; gap:7px; }
#agencyDelivery .agency-capacity-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:12px; padding:10px 11px; border:1px solid #e5edf6; border-radius:11px; background:#fbfdff; }
#agencyDelivery .agency-capacity-row > div { display:grid; gap:3px; min-width:0; }
#agencyDelivery .agency-capacity-row strong { overflow:hidden; color:var(--agency-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#agencyDelivery .agency-capacity-row small { color:var(--agency-muted); font-size:10px; }
#agencyDelivery .agency-capacity-row > span { display:grid; min-width:58px; gap:2px; text-align:right; }
#agencyDelivery .agency-capacity-row b { color:var(--agency-ink); font-size:14px; font-variant-numeric:tabular-nums; }
#agencyDelivery .agency-coverage-row { display:grid; grid-template-columns:72px minmax(0,1fr); gap:10px; padding:10px 11px; border:1px solid #e5edf6; border-radius:11px; background:#fbfdff; }
#agencyDelivery .agency-coverage-row > span { color:var(--agency-muted); font-size:11px; }
#agencyDelivery .agency-coverage-row > div { display:grid; gap:3px; min-width:0; }
#agencyDelivery .agency-coverage-row strong { overflow:hidden; color:var(--agency-ink); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
#agencyDelivery .agency-coverage-row small { color:var(--agency-muted); font-size:10px; line-height:1.45; }
#agencyDelivery .agency-connector-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
#agencyDelivery .agency-connector-card { display:grid; gap:6px; min-width:0; padding:13px; border:1px solid #e5edf6; border-radius:13px; background:#fbfdff; }
#agencyDelivery .agency-connector-card strong { color:var(--agency-ink); font-size:12px; }
#agencyDelivery .agency-connector-card span { color:var(--agency-muted); font-size:10px; line-height:1.5; }
#agencyDelivery .agency-connector-card em { justify-self:start; padding:3px 7px; border-radius:99px; color:#7c6a43; background:#fff3d9; font-size:10px; font-style:normal; }
#agencyDelivery .agency-boundary-note { display:flex; align-items:center; gap:8px; margin:4px 2px 22px; color:#7b90aa; font-size:11px; }
#agencyDelivery .agency-boundary-dot { width:7px; height:7px; border-radius:50%; background:#63a9c1; box-shadow:0 0 0 4px #e6f3f7; }
@media (max-width:1100px) { #agencyDelivery .agency-delivery-kpi-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } #agencyDelivery .agency-analysis-columns { grid-template-columns:1fr; } #agencyDelivery .agency-capacity-grid { grid-template-columns:1fr; } #agencyDelivery .agency-capacity-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); } #agencyDelivery .agency-connector-grid { grid-template-columns:1fr; } }
@media (max-width:980px) { #agencyDelivery .agency-delivery-primary-grid,#agencyDelivery .agency-delivery-secondary-grid { grid-template-columns:1fr; } }
@media (max-width:620px) { #agencyDelivery .agency-delivery-kpi-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } #agencyDelivery .agency-delivery-heading { align-items:flex-start; flex-direction:column; } #agencyDelivery .agency-delivery-row,#agencyDelivery .agency-handoff-row { align-items:flex-start; flex-direction:column; } #agencyDelivery .agency-delivery-row > div:last-child,#agencyDelivery .agency-handoff-row > div:last-child { width:100%; justify-content:space-between; } #agencyDelivery .agency-capacity-metrics { grid-template-columns:1fr 1fr; } #agencyDelivery .agency-capacity-status { align-items:flex-start; flex-wrap:wrap; } #agencyDelivery .agency-capacity-status small { width:100%; margin-left:16px; } }

.finance-save-alert { position:fixed; bottom:20px; left:max(20px, 20vw); right:20px; z-index:10000; display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:16px 20px; border:1px solid #e5b98b; border-radius:14px; background:#fff8ec; color:#743d10; box-shadow:0 8px 32px #182a4824; }
.finance-save-alert span {flex:1;min-width:220px;}
.finance-save-alert button {padding:8px 12px;border-radius:8px;border:1px solid #d9b78e;background:white;color:#743d10;cursor:pointer;}

/* Compact operations stay in the existing voucher workline. */
#voucherBatchWorkflow { margin-bottom: 16px; border-color: #d4e5ed; background: linear-gradient(120deg,#f4faf9,#fff); }
.finance-batch-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.finance-batch-steps > div { min-width: 0; }
.finance-batch-steps .btn { width: 100%; display:flex; gap:8px; align-items:center; justify-content:center; min-height:42px; }
.finance-batch-steps .btn > span { color:#17796f; font-size:12px; }
.finance-batch-steps b { border-radius:12px; padding:1px 8px; background:#e4f3ef; color:#14685f; }
.finance-batch-steps small { display:block; margin-top:6px; color:#64748b; font-size:12px; line-height:1.5; }
.voucher-row-actions { white-space:nowrap; }
#voucherLineEditor .voucher-line-summary { min-width:120px; }
#voucherLineEditor .voucher-line-account { min-width:180px; }
@media(max-width:900px) { .finance-batch-steps { grid-template-columns:repeat(2,minmax(0,1fr)); } }

.subject-directory-scroll { max-height: 24rem; overflow: auto; }
.subject-directory-scroll th { position: sticky; top: 0; background: #f4f7f8; }
.report-period-picker { display: inline-flex; gap: .65rem; align-items: center; margin-bottom: .75rem; }
#reportAllStatementsPanel > summary { cursor: pointer; }
.statement-drill { background: none; border: 0; color: #145da0; padding: .25rem; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.statement-drill:hover { text-decoration: underline; }
.voucher-packet-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; color: #506575; }
@media print { .packet-original { display: block; width: auto; height: auto; max-width: 100%; max-height: 84vh; object-fit: contain; margin: auto; } }

#vouchers[data-voucher-mode="register"] #manualVoucherPanel,
#vouchers[data-voucher-mode="entry"] #voucherLedgerPanel { display: none; }
.voucher-modes { width: fit-content; margin: 8px 0; }

@media print {
  .packet-cover { margin: 15% 7% 0; color: #182a38; }
  .packet-cover > p { font-size: 12pt; }
  .packet-cover h1 { margin: 12mm 0 3mm; font-size: 28pt; }
  .packet-period { margin-bottom: 14mm; font-size: 16pt; }
  .packet-cover td, .packet-cover th { padding: 3mm; }
  .packet-sign { margin-top: 17mm; font-size: 10pt; }
}

.agent-message-bubble .finance-risk-reply { white-space: pre-line; line-height: 1.7; }

/* Finance workspace. Keep the navigation distinct and let the books carry the visual weight. */
@media screen {
  .app-shell {
    --workspace-rail: #f0f5f3;
    --workspace-ink: #233c39;
    --workspace-muted: #516761;
    --workspace-active: #d7ebe2;
    --workspace-surface: #fff;
    --workspace-teal: #216957;
    --workspace-edge: #d6e0db;
    background: #f7f8f6;
    color: var(--workspace-ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  }
  .app-shell :is(button, input, select, textarea) { font-family: inherit; }
  .app-shell .main { min-width: 0; }
  .app-shell .sidebar {
    background: var(--workspace-rail);
    border-right: 1px solid var(--workspace-edge);
    box-shadow: none;
    backdrop-filter: none;
    color: var(--workspace-ink);
  }
  .sidebar .brand strong { color: var(--workspace-ink); letter-spacing: -.025em; }
  .sidebar .brand span, .sidebar .nav-section-label { color: var(--workspace-muted); }
  .sidebar .ledger-summary {
    background: var(--workspace-surface);
    color: var(--workspace-ink);
    border: 1px solid var(--workspace-edge);
    border-radius: 12px;
    box-shadow: none;
  }
  .sidebar .ledger-summary label { color: var(--workspace-muted); }
  .sidebar .ledger-create-primary {
    background: var(--workspace-surface); border-color: #a7c6b9; color: var(--workspace-teal);
    font-weight: 600; box-shadow: none;
  }
  .sidebar .ledger-create-primary:hover { background: var(--workspace-active); }
  .sidebar .side-logout-btn { color: var(--workspace-muted); border-color: var(--workspace-edge); background: transparent; font-weight: 500; }
  .sidebar .side-logout-btn:hover { color: #913d32; background: #fff2ec; }
  .app-shell .main-nav .nav-item, .finance-register-nav > summary {
    width: 100%;
    color: var(--workspace-ink);
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    border-radius: 8px;
    font-weight: 550;
  }
  .app-shell .main-nav .nav-item span:not(.icon) { color: inherit; font-weight: 550; }
  .app-shell .main-nav .nav-item .icon {
    color: var(--workspace-muted); background: transparent; box-shadow: none; border-color: transparent;
  }
  .app-shell .main-nav .nav-item:hover, .finance-register-nav > summary:hover {
    color: var(--workspace-teal); background: var(--workspace-surface); transform: none;
  }
  .app-shell .main-nav .nav-item.is-active {
    color: var(--workspace-teal); background: var(--workspace-active); border-color: transparent;
    box-shadow: inset 3px 0 var(--workspace-teal);
  }
  .app-shell .main-nav .nav-item.is-active .icon { color: inherit; }
  .finance-register-nav > summary { cursor: pointer; padding: 9px 12px; }
  .finance-register-nav[open] { border-block: 1px solid var(--workspace-edge); }
  .finance-register-nav > .nav-item { padding-inline-start: 23px; }
  .app-shell .topbar {
    background: var(--workspace-surface); border-color: var(--workspace-edge); border-radius: 12px;
    box-shadow: 0 2px 10px #17374a0d; backdrop-filter: none;
  }
  .app-shell .topbar h1 { color: var(--workspace-ink); letter-spacing: -.025em; }
  .app-shell #askFinanceGuide {
    color: #0d6059; background: #edf7f4; border-color: #a9d2c8; white-space: nowrap;
  }
  .app-shell #financeMobileNav { display: none; }
  .app-shell .panel { border-color: var(--workspace-edge); box-shadow: 0 2px 7px #203c3008; }
  .app-shell .metric-card { background: var(--workspace-surface); border-color: var(--workspace-edge); box-shadow: 0 2px 6px #203c3009; }
  .app-shell .metric-card::before { height: 2px; background: var(--workspace-edge); }
  .app-shell .global-search { box-shadow: none; }
  .app-shell .btn { font-weight: 600; }
  .app-shell .btn:not(.primary):not(:disabled) { box-shadow: none; }
  .app-shell .table-wrap tbody tr:hover > td { background-color: var(--workspace-rail); }
  .app-shell .module-primary-actions > .btn.primary {
    background: var(--workspace-teal); border-color: var(--workspace-teal); color: #fff; box-shadow: none;
  }
  .app-shell .module-primary-actions > .btn.primary:not(:first-child) {
    background: white; border-color: #bdcfd2; color: #23505a;
  }
  .app-shell :is(button,summary,a,input,select,textarea):focus-visible {
    outline: 3px solid #177baf; outline-offset: 2px;
  }
  .app-shell :is(.panel,section,button)[tabindex="-1"]:focus-visible { outline: 3px solid #198778; outline-offset: 2px; }
  .app-shell .view :is(.panel, section, button)[id] { scroll-margin-block-start: 92px; }
  .app-shell :is(th,td,.stat-grid strong,.metric-card strong) { font-variant-numeric: tabular-nums; }
  .app-shell .table-wrap th { background: var(--workspace-rail); color: var(--workspace-ink); }
  .app-shell .agent-message-bubble .agent-task-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
}
@media screen and (min-width: 901px) {
  .app-shell { grid-template-columns: 250px minmax(0,1fr); }
  .app-shell .sidebar { width: 250px; padding: 16px 12px; }
  .app-shell .topbar-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
  .app-shell .topbar .global-search { min-width: 170px; width: clamp(170px,23vw,360px); }
}
@media screen and (max-width: 700px) {
  .app-shell .topbar { position: static; margin: 0 0 12px; padding: 12px; }
  .app-shell .topbar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .app-shell #financeMobileNav { display: inline-flex; }
  .app-shell .topbar-actions > :is(#askFinanceGuide,#financeMobileNav) { width: auto; flex: 1 1 45%; min-height: 40px; }
  .app-shell .topbar .global-search { order: 4; width: 100%; min-width: 0; }
  .app-shell .topbar .period-picker, .app-shell .topbar .workspace-mode-picker { flex: 1 1 130px; min-width: 0; }
  .app-shell .module-primary-actions { flex-flow: row wrap; gap: 6px; }
  .app-shell .module-primary-actions > .btn { width: auto; min-height: 38px; flex: 1 1 auto; }
  .app-shell .view :is(.panel,section,button)[id] { scroll-margin-block-start: 12px; }
}

@media screen and (prefers-color-scheme: dark) {
  .app-shell {
    --workspace-rail: #273d41;
    --workspace-surface: #213439;
    --workspace-ink: #e1efea;
    --workspace-muted: #bdcfc7;
    --workspace-active: #365950;
    --workspace-edge: #405460;
    --workspace-teal: #147468;
    background: #101d26;
    color: var(--adapora-os-dark-text);
  }
  .sidebar .ledger-create-primary, .app-shell .main-nav .nav-item.is-active,
  .app-shell .main-nav .nav-item:hover, .finance-register-nav > summary:hover { color: #c5ecdb; }
  .app-shell .main-nav .nav-item.is-active { box-shadow: inset 3px 0 #99d0b9; }
  .app-shell .topbar, body[data-active-view="digitalEmployee"] .app-shell .topbar,
  .app-shell .ledger-summary { background: #1d303c; border-color: var(--workspace-edge); }
  .app-shell .topbar h1, .app-shell .ledger-summary,
  .app-shell .ledger-summary label { color: #e1eff2; }
  .app-shell .ledger-card-head, .app-shell .ledger-card-head strong {
    background: transparent; color: #e1eff2;
  }
  .app-shell .metric-card { background: #213540; border-color: var(--workspace-edge); box-shadow: none; }
  .app-shell .metric-card strong { color: #f1f7f9; }
  .app-shell .metric-card :is(span,small) { color: #c0d1d7; }
  .app-shell .global-search, .app-shell .workspace-mode-picker,
  .app-shell :is(select,textarea,input:not([type="checkbox"],[type="radio"],[type="file"],[type="range"])),
  .app-shell .btn:not(.primary):not(:disabled), .app-shell .search-clear {
    color-scheme: dark;
    color: #e4eff2; background: #223943; border-color: #54707a; box-shadow: none;
  }
  .app-shell .topbar input::placeholder { color: #bfd0d5; }
  .app-shell .workspace-mode-picker span, .app-shell .period-picker { color: #c0d1d7; }
  .app-shell .table-wrap td { background: #172a35; color: #ebf4f5; }
  .app-shell .table-wrap th { background: #253b48; color: #d7e8ec; }
  .app-shell #askFinanceGuide { background: #1c413e; color: #bceee2; border-color: #49796f; }
  .app-shell .module-primary-actions > .btn.primary:not(:first-child) {
    background: #223846; color: #d9edee; border-color: #4b6978;
  }
}

#workActionDrawer[data-statement-drill="true"] { z-index: 105; }
#workActionDrawer[data-statement-drill="true"] .work-drawer-panel { width: min(1120px, 98vw); max-width: 100%; }
#workActionDrawer[data-statement-drill="true"] .work-drawer-body { display: block; overflow: auto; }
#workActionDrawer[data-statement-drill="true"] .work-drawer-checklist { display: block; }
#workActionDrawer[data-statement-drill="true"] .table-wrap { overflow: auto; max-height: none; }
#workActionDrawer[data-statement-drill="true"] th { white-space: nowrap; }
#workActionDrawer[data-statement-drill="true"] td:nth-last-child(-n+2) { text-align: right; font-variant-numeric: tabular-nums; }

.app-shell .statement-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px 18px; padding-block:8px 14px; }
.app-shell .statement-toolbar .report-period-picker { display:flex; align-items:center; gap:8px; margin:0; }
.app-shell .statement-tools { display:flex; flex-wrap:wrap; gap:8px; margin-inline-start:auto; }
.app-shell #statementGrid.is-balance-sheet { display:block; min-width:0; }
.app-shell .balance-sheet-scroll { max-height:68vh; overflow:auto; scrollbar-gutter:stable; }
.app-shell .balance-sheet-table { width:100%; border-collapse:separate; border-spacing:0; min-width:720px; font-size:13px; font-variant-numeric:tabular-nums; }
.app-shell .balance-sheet-table :is(th,td) { padding:7px 10px; border-bottom:1px solid var(--line); text-align:start; font-weight:400; background:var(--surface,#fff); }
.app-shell .balance-sheet-table thead th { position:sticky; top:0; z-index:1; font-weight:650; background:var(--surface-soft,#edf3f7); color:var(--ink); white-space:nowrap; }
.app-shell .balance-sheet-table .balance-number { text-align:right; white-space:nowrap; }
.app-shell .balance-sheet-table .balance-line { text-align:center; color:var(--muted); font-size:12px; }
.app-shell .balance-sheet-table .balance-label { min-width:10em; }
.app-shell .balance-sheet-table .balance-split { border-inline-start:1px solid var(--line); }
.app-shell .balance-sheet-table .balance-section, .app-shell .balance-sheet-table .balance-total { font-weight:650; background:var(--surface-soft,#eef4f8); }
.app-shell .balance-sheet-table tr:is(:hover,:focus-within) :is(.balance-label,.balance-line,.balance-number) { background:color-mix(in srgb,var(--surface-soft,#edf5fb) 86%,#6cb4f7); }
.app-shell .balance-sheet-table .statement-drill { font:inherit; font-variant-numeric:tabular-nums; color:var(--brand,#1868a8); padding:3px 0; }
.app-shell .ledger-sheet-workspace { display:grid; grid-template-columns:minmax(0,1fr); min-width:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.app-shell .ledger-sheet-workspace:has(.ledger-account-browser:not([hidden])) { grid-template-columns:clamp(172px,18vw,236px) minmax(0,1fr); }
.app-shell .ledger-account-browser { min-width:0; padding:12px; border-inline-end:1px solid var(--line); background:var(--surface-soft,#f5f8fb); }
.app-shell .ledger-account-browser[hidden] { display:none; }
.app-shell .ledger-account-browser label { display:block; font-size:14px; font-weight:650; margin-bottom:8px; }
.app-shell #ledgerAccountSearch { box-sizing:border-box; width:100%; min-width:0; }
.app-shell #ledgerAccountList { overflow:auto; max-height:52vh; padding-top:8px; }
.app-shell .ledger-account-row { display:grid; grid-template-columns:20px minmax(0,1fr); align-items:center; padding-inline-start:calc(7px * var(--subject-depth,0)); }
.app-shell .ledger-account-pick,.app-shell .ledger-account-toggle { border:0; background:transparent; color:var(--ink); border-radius:5px; padding:6px 3px; text-align:start; font:inherit; font-size:13px; }
.app-shell .ledger-account-pick { width:100%; }
.app-shell .ledger-account-pick span { color:var(--muted); font-variant-numeric:tabular-nums; }
.app-shell .ledger-account-pick[aria-pressed="true"],.app-shell .ledger-account-pick:hover { background:var(--surface,#fff); color:var(--brand,#1868a8); }
.app-shell .ledger-sheet-workspace>.table-wrap { margin:0; min-width:0; max-height:62vh; overflow:auto; }
.app-shell #ledgerQueryPanel .ledger-sheet-workspace .ledger-book-table { min-width:760px; font-variant-numeric:tabular-nums; }
.app-shell #ledgerQueryPanel .ledger-sheet-workspace .ledger-book-table :is(th,td):last-child { min-width:124px; width:auto; }
.app-shell #ledgerQueryPanel .ledger-sheet-workspace .ledger-book-table :is(th,td):is(:nth-child(3),:nth-child(5)) { min-width:84px; }
@media (max-width:760px) {
  .app-shell .ledger-sheet-workspace:has(.ledger-account-browser:not([hidden])) { grid-template-columns:minmax(0,1fr); }
  .app-shell .ledger-account-browser { border-inline-end:0; border-bottom:1px solid var(--line); }
  .app-shell #ledgerAccountList { max-height:150px; }
  .app-shell .statement-tools { margin-inline-start:0; }
}

/* Accounting book summaries and voucher review */
.account-tree-cell { padding-inline-start: calc(12px + 15px * var(--account-depth, 0)); }
.ledger-subtotal td, .ledger-subtotal th { font-weight: 600; background: #f3f7f4; }
.voucher-sequence-alert { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin: .55rem 0; }
.voucher-sequence-alert [role="status"] { color: #805c23; font-weight: 600; }
.voucher-view-overview dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: .65rem; margin-bottom: .75rem; }
.voucher-view-overview dl > div { border-bottom: 1px solid #dce7df; padding: .4rem 0; }
.voucher-view-overview dt { color: #536760; }
.voucher-view-overview dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.voucher-view-overview .table-wrap { margin-bottom: .75rem; }
#ledgerHistoryCoverage:not([hidden]) {
  margin: 10px 0;
  padding: 8px 12px;
  border-inline-start: 3px solid #94ada5;
  background: #f3f7f5;
  color: #455d55;
  font-size: 13px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
}
#ledgerHistoryCoverage time { white-space: nowrap; }

#financeSubjectDirectory { margin-bottom: 16px; }
#financeSubjectDirectory .subject-directory-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 12px 0; }
.subject-directory-toolbar input { min-width: min(220px, 60vw); }
.subject-directory-rule { align-self: center; }
.subject-directory-rule summary { cursor: pointer; }
.subject-directory-rule p { max-width: 26em; margin: 8px 0 0; }
.subject-directory-scroll th[scope="row"] { text-align: start; white-space: nowrap; }
.subject-directory-toggle, .subject-directory-toggle-space { display: inline-grid; place-items: center; inline-size: 26px; block-size: 26px; margin-inline-end: 4px; }
.subject-directory-toggle { border: 1px solid #d8e3df; border-radius: 4px; background: #f3f7f4; color: #285748; cursor: pointer; }
.subject-directory-toggle:focus-visible { outline: 2px solid #285748; outline-offset: 2px; }
.subject-directory-actions { white-space: nowrap; }
.ledger-trial-total td, .ledger-trial-total th { font-weight: 700; background: #eef5f9; }

.voucher-dimensions { margin-top: .25rem; font-size: .85rem; }
.voucher-dimensions summary { color: var(--muted, #475569); cursor: pointer; }
.voucher-dimensions > div { display: grid; gap: .35rem; margin-block: .4rem; }
.voucher-dimensions label { display: grid; grid-template-columns: 3em minmax(6em, 1fr); align-items: center; }
#openingCarryforward > summary { cursor: pointer; font-weight: 600; }

.voucher-header-summary { display: flex; align-items:center; gap:.75rem; margin:.65rem 0; }
.voucher-header-summary input { flex:1; min-width:0; }
#manualSubjectSuggestPanel { z-index: 1500; }
#workActionDrawer[data-period-closing="true"] .work-drawer-panel { display:flex; flex-direction:column; overflow:auto; }
#workActionDrawer[data-period-closing="true"] .work-drawer-actions { order:1; flex:none; }
#workActionDrawer[data-period-closing="true"] .work-drawer-body { order:2; flex:1; min-height:0; overflow:auto; }

.subject-posted-balance:not(:empty) { display:block; margin:.3rem 0; color:#34576a; font-variant-numeric:tabular-nums; }

@media screen {
  #settlement > .ops-disclosure > summary {
    color: var(--workspace-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
  }
  #settlement > .ops-disclosure > summary:focus-visible {
    outline: 2px solid var(--workspace-teal);
    outline-offset: 2px;
    border-radius: 5px;
  }

  .asset-book-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 8px 12px; }
  .asset-book-tabs .btn { font-size: 13px; font-weight: 550; }
  .asset-book-tabs .btn[aria-pressed="true"] { color: #205d4e; background: #e7f3ed; border-color: #a1c5b6; }
  .asset-book-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr));
    gap: 8px 12px;
    margin-bottom: 14px;
  }
  .asset-book-filters label { display: grid; gap: 4px; min-width: 0; color: var(--workspace-muted); font-size: 12px; font-weight: 500; }
  .asset-book-filters :is(input, select) {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    min-height: 36px;
    padding: 6px 9px;
    color: var(--workspace-ink);
    font-size: 13px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
  }
  #assetBookPanel .table-wrap { container-type: inline-size; }
  #assetBookTable thead th { white-space: nowrap; font-size: 12px; font-weight: 600; }
  #assetBookTable .empty-guide { width: min(100cqi, 720px); margin-inline: 0; }
  #costBox { display: grid; margin: 0; }
  #costBox > div { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; }
  #costBox > div + div { border-top: 1px solid var(--workspace-edge); }
  #costBox dt { color: var(--workspace-muted); font-size: 13px; font-weight: 400; }
  #costBox dd { margin: 0; color: var(--workspace-ink); font-size: 14px; font-weight: 500; line-height: 1.55; overflow-wrap: anywhere; }
  #costBox > div:first-child dd { color: var(--workspace-teal); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
}

@media screen {
  #assets .module-grid:has(> #assetBookPanel) { grid-template-columns: minmax(0, 3fr) minmax(200px, 1fr); }
  .asset-status-list { margin: 0 0 12px; }
  .asset-status-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--workspace-edge); }
  .asset-status-list dt { font-size: 13px; color: var(--workspace-muted); }
  .asset-status-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
}
@media screen and (max-width: 900px) {
  #assets .module-grid:has(> #assetBookPanel) { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (prefers-color-scheme: dark) {
  #settlement > .ops-disclosure, #assetStatusPanel, #inventoryCostPanel { background: var(--workspace-surface); color: var(--workspace-ink); }
  #assetBookPanel { background: var(--workspace-surface); }
  #costBox > div:first-child dd { color: #9edcc6; }
  #ledgerHistoryCoverage:not([hidden]) { color: #d7e8e1; background: #253b38; border-color: #83b5a4; }
  #assetBookPanel .asset-book-tabs .btn[aria-pressed="true"] { color: #c3eddf; background: #305148; border-color: #83ae9f; }
}

.voucher-prereview[hidden], .voucher-prereview-detail[hidden] { display: none; }
.pre-review-row, .voucher-prereview-detail > div { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.pre-review-row { padding: .55rem 0; border-top: 1px solid #dae4e4; }
.pre-review-row strong { margin-right: .6rem; }
.pre-review-row span, .voucher-prereview-detail small { font-size: .85rem; color: #465c66; }
.voucher-prereview-detail { background: #f2f7fa; border-left: 3px solid #43788e; margin: .4rem 1rem; padding: .5rem .85rem; max-height: 26vh; overflow: auto; }
.voucher-prereview-detail ul { margin: .35rem 0; padding-left: 1.25rem; }
.voucher-prereview-detail > div:last-child { justify-content: flex-start; }

.pre-review-original:empty { display: none; }
.pre-review-original figure { display: grid; width: 100%; gap: .4rem; margin: .4rem 0; }
.pre-review-original figcaption { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.pre-review-original :is(img,canvas) { max-width: 100%; height: auto; margin-inline: auto; }
.voucher-prereview-detail:has(.pre-review-original figure) { max-height: 42vh; }

.external-voucher-dialog { width: min(56rem, 94vw); max-height: 86vh; overflow: auto; border: 1px solid #cbdcdd; border-radius: 12px; padding: 1rem 1.3rem; color: #213a3b; }
.external-voucher-dialog::backdrop { background: rgb(14 31 42 / 36%); }
.external-voucher-dialog .pre-review-original canvas, .external-voucher-dialog .pre-review-original img { max-height: 46vh; object-fit: contain; }
