: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;
}

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-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: clamp(34px, 4.1vw, 56px);
  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;
}

.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,
.form-grid label,
.period-picker {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.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;
}

.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;
}

.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;
}

.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;
}

.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;
}

.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-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;
}

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

.manual-voucher-workbench {
  display: grid;
  grid-template-columns: minmax(330px, 1.05fr) minmax(360px, 1fr) minmax(220px, 0.56fr);
  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;
}

.subject-quick-add-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 1fr) minmax(120px, 0.7fr) minmax(86px, 0.5fr) minmax(96px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
  padding: 0 10px 10px;
}

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

.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;
}

.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-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;
}

.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-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;
}

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

table {
  width: 100%;
  min-width: 720px;
  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;
}

.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;
}

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

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;
}

.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 {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 16px;
  color: var(--muted);
}

.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;
}

.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;
}

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

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

.source-hub button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  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: 30px;
  height: 30px;
  color: #0a4a91;
  background: #eaf2fc;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
}

.source-hub strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.upload-status-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
}

.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(4, 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;
}

.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,
.sample-library-list,
.acceptance-test-list,
.formal-task-list,
.formal-job-list,
.integration-status-list {
  display: grid;
  gap: 8px;
}

.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.compact {
  background: var(--surface-soft);
}

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

.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: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.statement-item {
  display: grid;
  gap: 8px;
  min-height: 108px;
  padding: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.statement-item strong {
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.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);
}

.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;
}

.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-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);
}

@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));
  }

  .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,
  .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-summary-strip,
  .ledger-query-actions,
  .voucher-form-grid,
  .voucher-balance-bar,
  .manual-voucher-controls,
  .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;
  }

  .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;
}

.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 {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.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-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;
  }

  .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: clamp(34px, 4.2vw, 54px);
    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 {
  min-height: 56px;
  margin-bottom: 10px;
  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 .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(145px, 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) {
  .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;
}

.saas-command-strip button {
  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;
}

.saas-command-strip button:hover {
  border-color: #0f6bc6;
  box-shadow: 0 14px 28px rgba(15, 107, 198, 0.12);
  transform: translateY(-1px);
}

.saas-command-strip button.is-clear {
  border-color: #dfe7e2;
}

.saas-command-strip button.is-warning {
  border-color: #b8d7f5;
}

.saas-command-strip button.is-danger {
  border-color: #efc2aa;
  box-shadow: 0 12px 26px rgba(194, 65, 12, 0.09);
}

.saas-command-strip 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 strong {
  color: #1f2329;
  font-size: 15px;
  line-height: 1.25;
}

.saas-command-strip small {
  color: #747b86;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.saas-command-strip 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 {
  background: #147d64;
}

.saas-command-strip button.is-danger em {
  background: #c2410c;
}

.module-flow-strip {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0 0 10px;
  padding: 6px;
  overflow-x: auto;
  background: #f5f7fa;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  scrollbar-width: thin;
}

.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-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;
}

.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: 720px;
}

.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) {
  .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) {
  .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 .sidebar {
    width: auto;
  }
}

.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;
}

.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;
}

.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;
}

@media (max-width: 920px) {
  .digital-employee-layout {
    grid-template-columns: 1fr;
  }

  .digital-agent-focus article {
    grid-template-columns: 1fr;
  }

  .digital-agent-focus .text-btn {
    grid-row: auto;
    grid-column: auto;
    justify-self: start;
  }
}
