@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Michroma&display=swap');
:root[data-theme="dark"]{color-scheme:dark;--ink:#e6ece9;--muted:#9da9a5;--line:#2e3c37;--green:#6bc4a2;--green-dark:#83d2b2;--mint:#1e3930;--bg:#111a17;--white:#19231f;--red:#e18479;--shadow:0 14px 40px #0006} :root[data-theme="dark"] body,:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .main,:root[data-theme="dark"] .topbar,:root[data-theme="dark"] .card,:root[data-theme="dark"] .business-switch,:root[data-theme="dark"] .button.secondary,:root[data-theme="dark"] .icon-button,:root[data-theme="dark"] .modal,:root[data-theme="dark"] .business-menu,:root[data-theme="dark"] .business-option,:root[data-theme="dark"] .filter-select,:root[data-theme="dark"] .period-select,:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .search{background:#19231f;color:var(--ink)}:root[data-theme="dark"] body{background:#111a17}:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .topbar{border-color:var(--line)}:root[data-theme="dark"] .nav-item{color:#a7b2ad}:root[data-theme="dark"] .nav-item:hover,:root[data-theme="dark"] .business-option:hover{background:#22312b}:root[data-theme="dark"] .nav-item.active,:root[data-theme="dark"] .business-option.selected{background:#1e3930;color:#8ad5b7}:root[data-theme="dark"] .nav-item.active i{color:#8ad5b7}:root[data-theme="dark"] .brand{color:#a2e2c6}:root[data-theme="dark"] .brand-mark{background:#218768}:root[data-theme="dark"] .metric-icon{background:#243a31;color:#81c7aa}:root[data-theme="dark"] .metric-icon.blue{background:#273241;color:#9cb5e2}:root[data-theme="dark"] .metric-icon.orange{background:#3a3026;color:#e0ad71}:root[data-theme="dark"] .metric-icon.purple{background:#332b3d;color:#baa5db}:root[data-theme="dark"] .cash-card{background:#20352c}:root[data-theme="dark"] .cash-card .panel-title,:root[data-theme="dark"] .cash-total{color:#a2dfc2}:root[data-theme="dark"] .cash-row{border-color:#354b40;color:#a5b9ae}:root[data-theme="dark"] .cash-row b{color:#d4e5dc}:root[data-theme="dark"] .table td,:root[data-theme="dark"] .journal-row,:root[data-theme="dark"] .account-row{border-color:#2b3934}:root[data-theme="dark"] .table td:first-child{color:#e0e8e3}:root[data-theme="dark"] .table th,:root[data-theme="dark"] .axis-label{color:#8a9992;fill:#8a9992}:root[data-theme="dark"] .gridline{stroke:#2a3933}:root[data-theme="dark"] .account-row[style*="background"]{background:#203a30!important;color:#a2dfc2!important}:root[data-theme="dark"] .pill{background:#243d33;color:#8bd3b5}:root[data-theme="dark"] .pill.pending{background:#3c3327;color:#e6ba7c}:root[data-theme="dark"] .pill.overdue{background:#3d2b2a;color:#e2968c}:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea{border-color:var(--line)}:root[data-theme="dark"] .toast{background:#e4f1ea;color:#19352a}:root[data-theme="dark"] .modal-backdrop{background:#0009}:root[data-theme="dark"] .business-icon{background:#2b394a;color:#a9bee9}
:root{--ink:#1d2939;--muted:#8993a4;--line:#e9edf1;--green:#16745d;--green-dark:#0f5948;--mint:#e8f5f0;--bg:#f8faf9;--white:#fff;--red:#cf655d;--shadow:0 14px 40px #182b2412}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font:14px 'DM Sans',sans-serif}.app{display:flex;min-height:100vh}.sidebar{width:248px;flex:0 0 248px;border-right:1px solid var(--line);padding:24px 15px 16px;display:flex;flex-direction:column;background:#fff}.brand{height:44px;display:flex;align-items:center;gap:10px;padding:0 13px;font:800 20px Manrope,sans-serif;letter-spacing:-.8px;color:#183c31}.brand-mark{height:27px;width:27px;border-radius:9px;background:#18765d;color:#fff;display:grid;place-items:center;font:800 15px Manrope;box-shadow:inset 0 -3px 0 #0d5b48}.business-switch{border:1px solid var(--line);border-radius:10px;background:white;margin:20px 3px 28px;padding:10px;display:flex;align-items:center;text-align:left;gap:10px;color:var(--ink);cursor:pointer}.business-icon{width:33px;height:33px;border-radius:8px;background:#edf3ff;color:#6177a4;display:grid;place-items:center;font-weight:700}.business-switch b,.profile b{display:block;font-size:12px;font-weight:600}.business-switch small,.profile small{display:block;color:var(--muted);font-size:11px;margin-top:3px}.chevron{margin-left:auto;color:#98a1ae}.side-label{font-size:10px;font-weight:700;letter-spacing:1px;color:#a2aab5;padding:0 13px 9px}.nav-item{width:100%;border:0;background:transparent;height:40px;border-radius:8px;display:flex;align-items:center;gap:12px;padding:0 13px;color:#667181;font:500 13px 'DM Sans';cursor:pointer;text-align:left;margin-bottom:3px}.nav-item i{font-style:normal;font-size:16px;width:17px;text-align:center;color:#84909f}.nav-item:hover{background:#f6f8f7;color:var(--ink)}.nav-item.active{background:var(--mint);color:var(--green);font-weight:600}.nav-item.active i{color:var(--green)}.nav-count{margin-left:auto;background:#fff;border:1px solid #e8ecea;color:#69746f;padding:2px 7px;border-radius:10px;font-size:10px}.reports-label{margin-top:24px}.sidebar-bottom{margin-top:auto}.profile{border-top:1px solid var(--line);margin-top:13px;padding:16px 4px 0;display:flex;align-items:center;gap:10px}.avatar{border-radius:50%;width:33px;height:33px;background:#f2e7df;color:#755947;font-size:11px;font-weight:700;display:grid;place-items:center}.dots{margin-left:auto;color:#9aa3ad;letter-spacing:2px}.main{min-width:0;flex:1}.topbar{height:68px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 48px}.breadcrumbs{font-size:12px;color:#9aa2ad}.breadcrumbs span{padding:0 10px;color:#cad0d6}.breadcrumbs b{font-weight:500;color:#596576}.top-actions{display:flex;align-items:center;gap:18px}.icon-button{height:31px;width:31px;border:1px solid var(--line);border-radius:8px;background:white;color:#748091;font-size:14px;cursor:pointer}.notification{font-size:18px}.small-avatar{width:30px;height:30px}.content{max-width:1240px;margin:auto;padding:39px 48px 60px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:31px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1px;color:#9aa4ad}.page-heading h1{font:700 25px Manrope,sans-serif;letter-spacing:-.7px;margin:10px 0 6px}.wave{color:#e4b85c;font-size:18px}.page-heading p{margin:0;color:#8b95a2;font-size:13px}.heading-actions{display:flex;gap:9px}.button{height:37px;padding:0 14px;border-radius:8px;font:600 12px 'DM Sans';cursor:pointer}.button.primary{background:var(--green);color:white;border:1px solid var(--green)}.button.primary:hover{background:var(--green-dark)}.button.secondary{background:white;color:#5e6b7b;border:1px solid var(--line)}.button.secondary:hover{background:#f8faf9}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card{border:1px solid var(--line);border-radius:10px;background:#fff}.metric{padding:17px 18px 15px;min-height:119px}.metric-label{color:#778392;font-size:11px;display:flex;justify-content:space-between;align-items:center}.metric-icon{height:27px;width:27px;border-radius:7px;display:grid;place-items:center;background:#eef6f2;color:#438872;font-size:14px}.metric-icon.blue{background:#eef2fb;color:#7186b1}.metric-icon.orange{background:#fbf2e8;color:#c58a4e}.metric-icon.purple{background:#f3eff9;color:#9380b7}.metric-value{font:700 21px Manrope,sans-serif;margin:9px 0 5px;letter-spacing:-.5px}.metric-foot{font-size:10px;color:#9aa3ad}.positive{color:#258c67;font-weight:600}.negative{color:#c76f64;font-weight:600}.dashboard-grid{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,.9fr);gap:15px;margin-top:17px}.panel{padding:18px 20px}.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}.panel-title{font:700 13px Manrope,sans-serif}.panel-subtitle{color:#97a0ab;font-size:10px;margin-top:4px}.text-link{border:0;background:none;color:var(--green);font:600 11px 'DM Sans';cursor:pointer}.period-select{border:1px solid var(--line);background:#fff;border-radius:6px;padding:6px 9px;color:#687486;font:11px 'DM Sans'}.chart-legend{font-size:10px;color:#84909d;display:flex;gap:15px;margin-top:-5px;margin-bottom:10px}.legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:#1a785e;margin-right:5px}.legend-dot.pale{background:#c7e5d9}.chart{height:150px;position:relative}.chart svg{width:100%;height:100%;overflow:visible}.gridline{stroke:#edf0f1;stroke-width:1}.axis-label{fill:#a2aab2;font:9px 'DM Sans'}.activity-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #f0f2f3}.activity-row:last-child{border:0}.activity-icon{width:31px;height:31px;border-radius:8px;background:#eff6f2;color:#4c8b72;display:grid;place-items:center;font-size:13px}.activity-icon.expense{background:#fbf2e9;color:#c28e59}.activity-icon.paid{background:#edf2fb;color:#6b83b0}.activity-text{min-width:0;flex:1}.activity-text b{font-size:11px;display:block;font-weight:600}.activity-text small{font-size:10px;color:#9aa2ad;display:block;margin-top:3px}.activity-amount{font-size:11px;font-weight:600}.lower-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:15px;margin-top:15px}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;white-space:nowrap}.table th{text-align:left;text-transform:uppercase;letter-spacing:.65px;color:#a0a8b1;font-size:9px;font-weight:700;padding:0 12px 11px}.table td{border-top:1px solid #eff1f2;padding:12px;color:#526071;font-size:11px}.table td:first-child{color:#273447;font-weight:600}.pill{display:inline-block;padding:4px 8px;border-radius:15px;background:#eef6f2;color:#43846d;font-size:9px;font-weight:600}.pill.pending{background:#fcf4e9;color:#b78647}.pill.overdue{background:#fbefee;color:#c16e67}.cash-card{background:#eff7f3;border:0;padding:19px}.cash-card .panel-title{color:#285f4d}.cash-row{display:flex;justify-content:space-between;border-bottom:1px solid #dcebe4;padding:12px 0;font-size:11px;color:#6f857b}.cash-row b{color:#314b40;font-weight:600}.cash-total{display:flex;justify-content:space-between;padding-top:13px;color:#285f4d;font-size:12px;font-weight:700}.section-card{margin-top:14px;padding:20px}.section-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:17px}.section-header h2{font:700 14px Manrope;margin:0}.section-header p{margin:5px 0 0;color:#929ba7;font-size:11px}.filter-row{display:flex;gap:8px;margin-bottom:16px}.search{width:220px;border:1px solid var(--line);border-radius:7px;padding:8px 10px;font:11px 'DM Sans';outline:none}.search:focus{border-color:#80aa9b}.filter-select{border:1px solid var(--line);background:#fff;border-radius:7px;padding:7px 10px;color:#667181;font:11px 'DM Sans'}.empty{padding:60px;text-align:center;color:#87919f}.account-row{display:grid;grid-template-columns:1fr 120px 100px;gap:12px;padding:12px;border-top:1px solid var(--line);font-size:11px}.account-row span:last-child{text-align:right}.journal-row{display:flex;align-items:center;padding:13px 10px;border-top:1px solid var(--line);font-size:11px;gap:14px}.journal-date{width:90px;color:#8993a0}.journal-desc{flex:1;font-weight:600}.journal-meta{color:#8993a0;width:110px}.journal-amount{width:100px;text-align:right;font-weight:600}.toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);background:#203b31;color:white;padding:11px 17px;border-radius:8px;box-shadow:var(--shadow);opacity:0;pointer-events:none;transition:.25s;font-size:12px;z-index:20}.toast.show{opacity:1;transform:translate(-50%,0)}.modal-backdrop{position:fixed;inset:0;background:#14231e55;display:grid;place-items:center;padding:20px;z-index:10}.modal{width:min(510px,100%);background:white;border-radius:13px;box-shadow:0 24px 70px #14231e38;padding:23px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.modal-head h2{font:700 18px Manrope;margin:0}.close{border:0;background:none;color:#8993a0;font-size:22px;cursor:pointer}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{display:flex;flex-direction:column;gap:6px}.field.full{grid-column:1/-1}.field label{font-size:10px;font-weight:600;color:#697586}.field input,.field select,.field textarea{border:1px solid var(--line);border-radius:7px;padding:10px;font:12px 'DM Sans';color:var(--ink);outline:none;background:#fff}.field input:focus,.field select:focus,.field textarea:focus{border-color:#83ab9d}.modal-footer{display:flex;justify-content:flex-end;gap:9px;margin-top:21px}.business-menu{position:absolute;left:17px;top:95px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:9px;padding:6px;width:218px;z-index:4}.business-option{display:flex;width:100%;border:0;background:white;padding:10px;border-radius:6px;text-align:left;gap:9px;align-items:center;cursor:pointer;color:var(--ink);font:12px 'DM Sans'}.business-option:hover{background:#f4f8f6}.business-option small{display:block;color:#919aa6;margin-top:3px}.business-option.selected{background:#eff7f3}.business-switch{position:relative}.business-menu{left:18px;top:95px}@media(max-width:1050px){.content{padding:30px 27px}.topbar{padding:0 27px}.metric-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.sidebar{width:64px;flex-basis:64px;padding:16px 8px}.brand{padding:0 8px}.brand>span:last-child,.business-switch>span:not(.business-icon),.side-label,.nav-item:not(.active) .nav-count,.nav-item{font-size:0}.business-switch{padding:7px 6px;justify-content:center;margin:17px 0}.business-icon{flex:0 0 32px}.nav-item{justify-content:center;padding:0}.nav-item i{font-size:16px}.nav-item.active{font-size:0}.profile{justify-content:center;padding-top:14px}.profile span:not(.avatar){display:none}.content{padding:25px 17px}.topbar{padding:0 18px}.page-heading{align-items:flex-start;gap:14px;flex-direction:column}.dashboard-grid,.lower-grid{grid-template-columns:1fr}.metric-grid{gap:9px}.metric{padding:13px;min-height:105px}.metric-value{font-size:18px}.heading-actions{align-self:stretch}.section-card{padding:14px}.filter-row{flex-wrap:wrap}.business-menu{left:65px;top:85px}}
.brand{padding:0 6px;overflow:hidden}.brand img{display:block;width:100%;max-width:216px;height:auto;object-fit:contain}.brand-mark{display:none}
.brand .brand-logo-dark,:root[data-theme="dark"] .brand-logo-light{display:none}
:root[data-theme="dark"] .brand-logo-dark{display:block}
@media(max-width:760px){.brand{padding:0;justify-content:center}.brand img{width:37px;height:37px;object-fit:cover;object-position:left center;max-width:none}}

.income-expense-panel { min-width: 0 }
.income-expense-panel .panel-title { margin: 0 }
.income-expense-panel .panel-head, .trend-controls, .trend-legend { display: flex; flex-wrap: wrap; gap: 10px }
.trend-controls label { display: grid; gap: 3px; font-size: 12px }
.trend-controls .period-select { max-width: 100% }
.trend-legend { margin: 8px 0; font-size: 12px }
.trend-legend span { display: inline-flex; align-items: center; gap: 5px }
.trend-legend i { width: 14px; border-top: 2px solid var(--trend-color) }
.trend-income { --trend-color: var(--green) }
.trend-expenses { --trend-color: #a6592d }
:root[data-theme="dark"] .trend-expenses { --trend-color: #eca675 }
.trend-expenses i { border-top-style: dashed }
.trend-plot { display: block; width: 100%; max-height: 202px }
.trend-plot line { stroke: var(--line) }
.trend-plot text { fill: var(--ink); font-size: 11px }
.trend-plot path { fill: none; stroke: var(--trend-color); stroke-width: 2 }
.trend-plot .trend-expenses path { stroke-dasharray: 5 3 }
.trend-plot circle { fill: var(--trend-color) }
[data-trend-plot] { position: relative }
.trend-period {
  position: absolute;
  top: 5.9%;
  height: 80.2%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.trend-period-active { background: color-mix(in srgb, var(--green) 11%, transparent) }
.trend-period:focus-visible { outline: 2px solid var(--green); outline-offset: -2px }
.trend-tooltip {
  position: absolute;
  top: 8px;
  left: clamp(0px, calc(var(--trend-point) - 95px), max(0px, calc(100% - 190px)));
  width: min(190px, 100%);
  z-index: 1;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  pointer-events: none;
}
.trend-tooltip dl { margin: 4px 0 0 }
.trend-tooltip dl div { display: flex; justify-content: space-between; gap: 6px }
.trend-tooltip dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums }
.income-expense-panel details { margin-top: 8px }
.income-expense-panel summary { color: var(--green); cursor: pointer }
.income-expense-panel table { margin-top: 8px; font-variant-numeric: tabular-nums }

.record-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
}
.record-pagination > div { display: flex; gap: 8px; }
.record-pagination button:disabled { opacity: .45; cursor: default; }

/* Keep the attribution below the workspace, including on short pages. */
.main {
  display: flex;
  flex-direction: column;
}
.main > .content {
  width: 100%;
  margin-block: 0;
}
.app-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 9px;
  min-height: 58px;
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  color: #586677;
  font-size: 12px;
}
.app-footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--ink);
  font: 400 11px Michroma, sans-serif;
  letter-spacing: .075em;
  text-decoration: none;
}
.app-footer-credit:hover { text-decoration: underline; }
.app-footer-domain { color: #1267d5; }
.app-footer-logo-dark,
:root[data-theme="dark"] .app-footer-logo-light { display: none; }
:root[data-theme="dark"] .app-footer-logo-dark { display: block; }
:root[data-theme="dark"] .app-footer { color: #a5b2c1; }
:root[data-theme="dark"] .app-footer-domain { color: #60a5fa; }

.help-card { margin-top: 16px; }
.help-group + .help-group { margin-top: 20px; }
.help-group h3 {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
}
.help-topic { border-top: 1px solid var(--line); }
.help-topic:last-child { border-bottom: 1px solid var(--line); }
.help-topic summary {
  padding: 13px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.help-topic[open] { padding-bottom: 16px; }
.help-topic p,
.help-steps {
  max-width: 72ch;
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.6;
}
.help-topic p:last-child { margin-bottom: 0; }
.help-steps { padding-inline-start: 1.5em; }
.help-steps li + li { margin-top: 5px; }
.help-figure { margin: 14px 0; }
.help-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.help-figure figcaption {
  font-size: 13px;
  line-height: 1.5;
}
.help-figure figcaption ol {
  display: flex;
  flex-wrap: wrap;
  column-gap: 32px;
  row-gap: 4px;
  margin: 8px 0 0;
  padding-inline-start: 1.5em;
}
.help-figure figcaption li::marker { font-weight: 700; }
.help-image-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  text-underline-offset: 2px;
}
.help-note {
  padding: 8px 12px;
  border-inline-start: 3px solid var(--green);
}
.help-card :focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.typeahead { position: relative; display: inline-flex; min-width: 0; max-width: 100%; }
.typeahead > input { width: 100%; min-width: 0; padding-inline-end: 25px; color: var(--ink); background: var(--surface, var(--white)); }
.typeahead > input:focus { outline: 2px solid var(--green); outline-offset: -2px; }
.typeahead::after { content: ""; position: absolute; inset-inline-end: 10px; top: 50%; width: 6px; height: 6px; border: solid var(--muted); border-width: 0 1px 1px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.typeahead-source { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.typeahead-menu { position: fixed; z-index: 1000; overflow: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 7px; background: var(--surface, var(--white)); color: var(--ink); box-shadow: var(--shadow); padding: 4px; font-size: 12px; }
.typeahead-menu [role="option"], .typeahead-status { padding: 8px 9px; border-radius: 4px; overflow-wrap: anywhere; }
.typeahead-menu [role="option"] { cursor: pointer; }
.typeahead-menu [aria-selected="true"] { font-weight: 700; }
.typeahead-menu [role="option"]:hover, .typeahead-menu .active { background: var(--mint); color: var(--green-dark); }
.typeahead-status:empty, .business-option[hidden] { display: none; }
.business-search { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface, var(--white)); color: var(--ink); font: inherit; }

:root[data-theme="dark"] .report-range label { color: var(--ink); }
:root[data-theme="dark"] .report-range :is(select, input, .button) {
  background: #24342e;
  border-color: #657b70;
  color: var(--ink);
}

.report-account > :first-child { padding-inline-start: 16px; }

.compact-records { min-width: 0; }
.compact-records .table { font-variant-numeric: tabular-nums; }
.compact-records .table th,
.compact-records .table td { padding: 5px 8px; border: 1px solid var(--line); }
.compact-records .table th {
  background: var(--bg);
  color: var(--ink);
  vertical-align: top;
  text-transform: none;
  letter-spacing: normal;
  font-size: 11px;
}
.compact-records .table tbody tr:nth-child(even) { background: var(--bg); }
.compact-records .table .numeric { text-align: right; }
.compact-records .column-filter {
  display: block;
  width: 100%;
  min-width: 68px;
  margin-top: 4px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: normal;
}
.compact-records .column-filter:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.compact-records .table .button { padding: 3px 7px; }
:root[data-theme="dark"] .compact-records .column-filter { border-color: #657b70; }

form.modal { padding: 16px; max-height: calc(100dvh - 40px); overflow: auto; }
form.modal .modal-head { margin-bottom: 10px; }
form.modal .modal-footer { margin-top: 12px; }
form.modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
form.modal .field { min-width: 0; gap: 3px; }
form.modal .field :is(input, select, textarea) { min-width: 0; min-height: 32px; padding: 6px 8px; }
form.modal .button { height: 32px; }

@media (max-width: 540px) {
  form.modal .field :is(input, select, textarea) { font-size: 16px; }
}

:root[data-theme="dark"] {
  --entry-edge: #748d81;
  --entry-field: #111a17;
}
:root[data-theme="dark"] :is(.modal, .typeahead-menu) {
  border: 1px solid var(--entry-edge);
}
:root[data-theme="dark"] :is(.modal, .compact-entry) .field :is(input, select, textarea):not(.typeahead-source) {
  border-color: var(--entry-edge);
  background: var(--entry-field);
}
:root[data-theme="dark"] :is(.modal, .compact-entry) .field :is(input, select, textarea):focus-visible {
  border-color: var(--green);
  outline: 2px solid var(--green);
  outline-offset: 1px;
}
