/* Hallmark · genre: editorial · macrostructure: Workbench · theme: Faico forest and ivory
 * Audience: Charles and finance reviewers · Use: resolve daily financial work · Tone: utilitarian
 * Nav: application side rail · Footer: Ft2 · Motion: subtle state transitions only */
@font-face {
  font-family: 'Nunito Sans';
  src: url('/fonts/nunito-sans.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  --paper: #f6f5ef;
  --surface: #fffef9;
  --ink: #203a32;
  --muted: #53645a;
  --accent: #245544;
  --on-accent: #fffef9;
  --sage: #e8eee4;
  --rail: #eeeee5;
  --line: #dadfd3;
  --field-line: #96a395;
  --amber: #83551c;
  --amber-bg: #f5ecd9;
  --red: #9e3730;
  --red-bg: #f9e7e2;
  --green: #286044;
  --green-bg: #e5eedf;
  --blue: #385f77;
  --blue-bg: #e8eff3;
  --focus: #a36c24;
  --overlay: #142b2466;
  --shadow: #203a3214;
  --clear: transparent;
  --font-body: 'Nunito Sans', Arial, sans-serif;
  --font-display: 'Newsreader', Georgia, serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --radius: 7px;
  --transition: 140ms ease;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  overflow-x: clip;
}
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: var(--clear);
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
button {
  white-space: nowrap;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  font-style: normal;
  overflow-wrap: anywhere;
  min-width: 0;
}
h1 {
  font: 400 clamp(30px, 3vw, 40px)/1.15 var(--font-display);
  letter-spacing: -0.025em;
}
h2 {
  font: 400 28px/1.2 var(--font-display);
}
h3 {
  font-size: 14px;
  font-weight: 800;
}
small,
.muted {
  color: var(--muted);
}
svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button svg {
  pointer-events: none;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  z-index: 20;
  background: var(--surface);
  padding: 12px;
}
.skip-link:focus {
  transform: none;
}
.wordmark {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 36px;
  line-height: 1;
  letter-spacing: -2.7px;
}
.wordmark > span {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0;
  vertical-align: top;
  margin: 4px 0 0 4px;
}
.loading-screen,
.login-wrap {
  min-height: 100dvh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
  padding: 24px;
}
.login-card {
  width: min(100%, 400px);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: var(--radius);
}
.login-card p {
  margin: 12px 0 24px;
}
.login-card form {
  display: grid;
  gap: 16px;
}
.shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  min-height: 100dvh;
}
.sidebar {
  background: var(--rail);
  border-right: 1px solid var(--line);
  padding: 32px 18px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
  gap: 32px;
}
.brand {
  padding: 0 14px;
}
.brand small {
  display: block;
  margin-top: 11px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 800;
}
.workspace-picker {
  border-block: 1px solid var(--line);
  padding: 16px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.workspace-icon {
  height: 33px;
  width: 33px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  place-items: center;
  flex: none;
  font: 400 19px var(--font-display);
}
.workspace-picker strong {
  display: block;
  font-size: 12px;
}
.workspace-picker small {
  font-size: 11px;
}
.nav-label {
  padding: 0 12px;
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.nav-list {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  background: var(--clear);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  min-height: 44px;
  transition:
    background var(--transition),
    color var(--transition);
}
.nav-item:hover {
  background: var(--sage);
  color: var(--ink);
}
.nav-item.active {
  background: var(--accent);
  color: var(--on-accent);
}
.nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 17px;
}
.side-note {
  padding: 15px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.person {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
}
.avatar {
  display: grid;
  place-items: center;
  height: 32px;
  width: 32px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  background: var(--surface);
}
.person strong,
.person small {
  display: block;
  font-size: 12px;
}
.workspace {
  min-width: 0;
}
.topbar {
  height: 68px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 36px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
}
.crumb {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connection {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 11px;
}
.dot {
  height: 6px;
  width: 6px;
  background: var(--amber);
  border-radius: 50%;
}
.dot.connected {
  background: var(--green);
}
.main {
  padding: 38px 36px 24px;
  max-width: 1520px;
  margin: auto;
  min-width: 0;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 30px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.page-head p {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}
.head-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  padding-top: 5px;
}
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 9px 15px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition:
    background var(--transition),
    border-color var(--transition);
}
.button:hover {
  background: var(--ink);
}
.button.secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.button.secondary:hover {
  border-color: var(--field-line);
  background: var(--sage);
}
.button.quiet {
  background: var(--clear);
  color: var(--muted);
  border-color: var(--clear);
}
.button.quiet:hover {
  background: var(--sage);
  color: var(--ink);
}
.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: var(--on-accent);
}
.icon-button {
  display: grid;
  place-items: center;
  min-height: 38px;
  min-width: 38px;
  background: var(--clear);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
}
.icon-button:hover {
  background: var(--sage);
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 26px;
}
.summary-item {
  padding: 22px 24px;
  min-width: 0;
}
.summary-item + .summary-item {
  border-left: 1px solid var(--line);
}
.summary-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 7px;
  align-items: center;
}
.summary-value {
  font: 400 clamp(25px, 2.4vw, 34px)/1.2 var(--font-display);
  margin: 11px 0 6px;
  overflow-wrap: anywhere;
}
.summary-note {
  font-size: 11px;
  color: var(--muted);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 13px;
}
.section-title h2 {
  font: 800 14px var(--font-body);
}
.section-title small {
  font-size: 11px;
}
.table-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: clip;
}
.toolbar {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.filter {
  border: 0;
  background: var(--clear);
  color: var(--muted);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  min-height: 34px;
}
.filter:hover,
.filter.active {
  background: var(--sage);
  color: var(--ink);
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
  max-width: 240px;
  color: var(--muted);
}
.search input {
  border: 0;
  background: var(--clear);
  padding: 6px 0;
  min-height: 32px;
  width: 100%;
  font-size: 12px;
  color: var(--ink);
}
.records-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
}
.records-table th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 18px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.records-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.records-table tr:last-child td {
  border: 0;
}
.records-table tbody tr:hover {
  background: var(--paper);
}
.records-table th:first-child {
  width: 34%;
}
.records-table th:nth-child(2) {
  width: 12%;
}
.records-table th:nth-child(3) {
  width: 17%;
}
.records-table th:nth-child(4) {
  width: 16%;
}
.record-button {
  border: 0;
  background: var(--clear);
  color: var(--ink);
  text-align: left;
  padding: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  white-space: normal;
}
.record-icon {
  height: 35px;
  width: 35px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 5px;
  display: grid;
  place-items: center;
  flex: none;
}
.record-title {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  display: block;
}
.record-subtitle {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}
.amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.amount-note {
  font-size: 10px;
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.tag.pending {
  background: var(--amber-bg);
  color: var(--amber);
}
.tag.approved,
.tag.settled,
.tag.processed {
  background: var(--green-bg);
  color: var(--green);
}
.tag.missing,
.tag.failed,
.tag.overdue {
  background: var(--red-bg);
  color: var(--red);
}
.tag.partial,
.tag.processing,
.tag.queued {
  background: var(--blue-bg);
  color: var(--blue);
}
.tag.rejected,
.tag.ignored,
.tag.review {
  background: var(--rail);
  color: var(--muted);
}
.entity {
  border: 1px solid var(--line);
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
  border-radius: 3px;
  display: inline-block;
}
.table-foot {
  padding: 12px 18px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 13px;
  padding: 70px 24px;
}
.empty > .record-icon {
  width: 52px;
  height: 58px;
  background: var(--sage);
}
.empty h2 {
  font-size: 27px;
}
.empty p {
  max-width: 380px;
  color: var(--muted);
  font-size: 13px;
}
.empty .button {
  margin-top: 6px;
}
.attention-strip {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 24px;
  background: var(--sage);
  align-items: flex-start;
  font-size: 12px;
}
.attention-strip p {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}
.attention-strip .button {
  margin-left: auto;
}
.sample-note {
  padding: 10px 14px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 11px;
  border-radius: 5px;
  margin-bottom: 20px;
}
.footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
}
.inbox-list {
  display: grid;
}
.inbox-item {
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.inbox-item:last-child {
  border-bottom: 0;
}
.inbox-item p {
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-top: 7px;
}
.inbox-item small {
  display: block;
  font-size: 10px;
  margin-top: 8px;
}
.inbox-actions {
  display: flex;
  gap: 8px;
  align-items: start;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.panel > p {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 22px;
}
.panel h2 {
  font-size: 24px;
}
.panel form {
  display: grid;
  gap: 14px;
}
.member {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.member:last-child {
  margin-bottom: 20px;
}
.member strong {
  font-size: 12px;
}
.member small {
  display: block;
  font-size: 10px;
}
.check {
  display: flex;
  gap: 10px;
  align-items: center;
}
.check input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}
label {
  display: grid;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--field-line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  padding: 9px 11px;
  font-size: 13px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
input[readonly] {
  background: var(--paper);
}
.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.fields .wide {
  grid-column: 1/-1;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.notice {
  padding: 12px 14px;
  border-radius: 4px;
  background: var(--amber-bg);
  color: var(--amber);
  font-size: 12px;
  margin-bottom: 18px;
}
.error {
  color: var(--red);
  font-size: 12px;
  white-space: pre-wrap;
  margin-top: 12px;
}
.error:empty {
  display: none;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  max-height: 92dvh;
  max-width: calc(100vw - 32px);
  width: 960px;
  box-shadow: 0 12px 80px var(--shadow);
}
dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(2px);
}
dialog#compose,
dialog#ask {
  width: 660px;
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.dialog-head .eyebrow {
  margin-bottom: 5px;
}
.dialog-head h2 {
  font-size: 26px;
}
.dialog-body {
  padding: 24px 28px;
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 28px;
}
.detail-side {
  border-left: 1px solid var(--line);
  padding-left: 26px;
}
.detail-side h3 {
  margin: 0 0 14px;
}
.detail-side section + section {
  margin-top: 28px;
}
.detail-total {
  font: 400 36px/1.1 var(--font-display);
  margin: 6px 0 12px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.evidence-item {
  display: flex;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.evidence-item a {
  overflow-wrap: anywhere;
}
.evidence-item img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
}
.evidence-body {
  min-width: 0;
}
.evidence-body small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
}
.source-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--paper);
  padding: 12px;
  font-size: 11px;
  border-radius: 4px;
  max-height: 170px;
  overflow: auto;
  margin-top: 10px;
}
.history-item {
  border-left: 1px solid var(--line);
  padding: 0 0 17px 14px;
  font-size: 11px;
  position: relative;
}
.history-item:before {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--field-line);
  left: -3px;
  top: 5px;
}
.history-item small {
  display: block;
  font-size: 10px;
  margin-top: 3px;
}
.payment-block {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.payment-block h3 {
  margin-bottom: 14px;
}
.payment-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}
.payment-row small {
  display: block;
}
.review-task {
  background: var(--amber-bg);
  padding: 14px;
  border-radius: 5px;
  margin-bottom: 14px;
  font-size: 12px;
}
.review-task input {
  margin: 10px 0;
}
.advanced {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.advanced summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}
.advanced .fields {
  margin-top: 18px;
}
.upload-box {
  padding: 25px;
  border: 1px dashed var(--field-line);
  background: var(--paper);
  border-radius: 6px;
  margin: 20px 0;
}
.upload-box label {
  font-size: 13px;
  color: var(--ink);
  gap: 12px;
}
.upload-box input {
  border: 0;
  padding: 0;
  font-size: 12px;
  background: var(--clear);
}
.upload-box small {
  font-size: 11px;
}
.upload-mode {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
}
.query-shortcuts {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.query-shortcuts button {
  white-space: normal;
  text-align: left;
}
.answer {
  background: var(--paper);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-top: 22px;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.answer-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--on-accent);
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 12px;
  z-index: 30;
  max-width: calc(100vw - 32px);
  transition:
    opacity var(--transition),
    transform var(--transition);
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: clip;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@media (min-width: 1450px) {
  .main {
    padding: 44px 52px;
  }
  .topbar {
    padding-inline: 52px;
  }
  .summary-item {
    padding: 25px 28px;
  }
  .records-table td {
    padding-block: 20px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .sidebar {
    padding-inline: 10px;
  }
  .main {
    padding: 28px 24px;
  }
  .topbar {
    padding-inline: 24px;
  }
  .page-head {
    flex-direction: column;
    gap: 14px;
  }
  .head-actions {
    padding-top: 0;
  }
  .summary-item {
    padding: 18px;
  }
  .toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }
  .search {
    max-width: none;
  }
  .records-table th,
  .records-table td {
    padding-inline: 12px;
  }
  .records-table th:first-child {
    width: 37%;
  }
  .record-icon {
    display: none;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .detail-side {
    padding-left: 20px;
  }
  .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 767px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px 20px;
    gap: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    padding: 0;
    display: flex;
    align-items: baseline;
    gap: 16px;
  }
  .brand .wordmark {
    font-size: 31px;
  }
  .brand small {
    font-size: 9px;
  }
  .workspace-picker,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  .nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }
  .nav-item {
    justify-content: center;
    font-size: 11px;
    padding: 8px 4px;
    gap: 6px;
    min-height: 40px;
  }
  .nav-item .icon {
    width: 15px;
    height: 15px;
  }
  .nav-count {
    display: none;
  }
  .topbar {
    height: 46px;
    padding: 0 20px;
    font-size: 10px;
  }
  .topbar .crumb span:first-child {
    display: none;
  }
  .main {
    padding: 27px 20px;
  }
  .page-head {
    margin-bottom: 22px;
  }
  .page-head h1 {
    font-size: 33px;
  }
  .head-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .head-actions .button {
    flex: 1;
  }
  .summary {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 24px;
  }
  .summary-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    padding: 14px 18px;
  }
  .summary-item + .summary-item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .summary-value {
    grid-column: 2;
    grid-row: 1/3;
    font-size: 26px;
    margin: 0;
    align-self: center;
  }
  .summary-note {
    font-size: 10px;
  }
  .records-table th:first-child {
    width: 44%;
  }
  .records-table th:nth-child(3) {
    width: 28%;
  }
  .records-table th:nth-child(5) {
    width: 28%;
  }
  .records-table .entity-col,
  .records-table .date-col {
    display: none;
  }
  .records-table td {
    padding: 16px 10px;
    font-size: 11px;
  }
  .records-table th {
    padding: 10px;
    font-size: 9px;
  }
  .record-title {
    font-size: 11px;
  }
  .record-subtitle {
    font-size: 9px;
  }
  .tag {
    font-size: 9px;
    padding: 4px 5px;
  }
  .amount {
    font-size: 11px;
  }
  .table-foot {
    font-size: 9px;
  }
  .toolbar {
    padding: 12px;
  }
  .filter {
    font-size: 10px;
    padding: 6px 8px;
  }
  .section-title small {
    font-size: 10px;
  }
  .footer {
    flex-direction: column;
    gap: 4px;
  }
  .attention-strip {
    flex-wrap: wrap;
  }
  .attention-strip .button {
    margin-left: 0;
  }
  .inbox-item {
    grid-template-columns: minmax(0, 1fr);
  }
  .inbox-actions {
    flex-wrap: wrap;
  }
  .dialog-head {
    padding: 18px 20px;
  }
  .dialog-body {
    padding: 20px;
  }
  .detail-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .detail-side {
    border: 0;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
  }
  dialog {
    max-width: calc(100vw - 16px);
    max-height: 96dvh;
  }
  .fields {
    gap: 12px;
  }
  .panel {
    padding: 20px;
  }
  .sample-note {
    font-size: 10px;
  }
  .empty {
    padding: 45px 20px;
  }
  .form-actions .button {
    flex: 1;
  }
  .connection {
    font-size: 10px;
  }
}
@media (max-width: 374px) {
  .main {
    padding-inline: 12px;
  }
  .sidebar {
    padding-inline: 12px;
  }
  .topbar {
    padding-inline: 12px;
  }
  .head-actions {
    gap: 6px;
  }
  .head-actions .button {
    font-size: 11px;
    padding-inline: 10px;
  }
  .records-table td,
  .records-table th {
    padding-inline: 7px;
  }
  .records-table th:first-child {
    width: 41%;
  }
  .records-table th:nth-child(3) {
    width: 29%;
  }
  .records-table th:nth-child(5) {
    width: 30%;
  }
  .fields {
    grid-template-columns: minmax(0, 1fr);
  }
  .fields .wide {
    grid-column: auto;
  }
  .dialog-body {
    padding: 16px;
  }
  .nav-item {
    font-size: 10px;
  }
  .nav-item .icon {
    width: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
