:root {
  --ink: #1d2d3d;
  --ink-soft: #4e6173;
  --muted: #5f7386;
  --line: #dce5ec;
  --canvas: #f6f8fa;
  --paper: #ffffff;
  --forest: #456f9c;
  --forest-light: #eaf0f6;
  --lime: #dce8ae;
  --gold: #c98143;
  --gold-light: #fff3e7;
  --rose: #c3545c;
  --rose-light: #faecee;
  --green: #16865f;
  --red: #c3545c;
  --orange: #dc873b;
  --blue: #456f9c;
  --shadow: 0 4px 16px rgba(36, 60, 84, .07);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid #d8ad7a; outline-offset: 2px; }
::selection { background: #f1ddc3; }

.loading-screen { height: 100vh; display: grid; align-content: center; justify-items: center; gap: 14px; color: var(--muted); }
.loading-screen p { font-size: 13px; }
.brand-mark { width: 38px; height: 38px; display: flex; align-items: flex-end; gap: 3px; transform: rotate(-18deg); }
.brand-mark span { display: block; width: 9px; border-radius: 3px; background: var(--forest); }
.brand-mark span:nth-child(1) { height: 16px; }
.brand-mark span:nth-child(2) { height: 27px; }
.brand-mark span:nth-child(3) { height: 37px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.app-shell.sidebar-unpinned { grid-template-columns: minmax(0,1fr); }
.app-shell.sidebar-unpinned .sidebar { position: fixed; width: 252px; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(0,0,0,.13); }
.app-shell.sidebar-unpinned.sidebar-visible .sidebar { transform: translateX(0); }
.sidebar-scrim { display: none; }
.app-shell.sidebar-unpinned.sidebar-visible .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 19; width: 100%; border: 0; background: rgba(32,19,29,.3); }
.sidebar { position: sticky; top: 0; height: 100vh; background: #142321; color: #e9f0ea; display: flex; flex-direction: column; padding: 29px 17px 24px; z-index: 20; }
.sidebar-pin { position: absolute; right: 13px; top: 37px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; background: rgba(255,255,255,.08); color: #f6e9d4; font-size: 14px; }
.sidebar-pin:hover,.sidebar-pin:focus-visible { background: rgba(255,255,255,.18); }
.sidebar-pin svg { transition: transform .2s ease; }
.sidebar-pin[aria-pressed="false"] svg { transform: rotate(-45deg); }
.nav[hidden] { display: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; margin-bottom: 44px; text-decoration: none; }
.brand .brand-mark { width: 29px; height: 31px; gap: 2px; }
.brand .brand-mark span { width: 7px; background: #cfe6ac; }
.brand .brand-mark span:nth-child(1) { height: 13px; }
.brand .brand-mark span:nth-child(2) { height: 23px; }
.brand .brand-mark span:nth-child(3) { height: 31px; }
.brand-name { font-family: Georgia, serif; letter-spacing: -.055em; font-size: 30px; line-height: 1; color: #fff; }
.brand-name .dot { color: #cfe6ac; }
.nav-label { color: #728c81; font-size: 10px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; padding: 0 15px; margin-bottom: 12px; }
.nav { display: grid; gap: 5px; }
.nav button { border: 0; background: transparent; color: #9fb2a9; height: 45px; padding: 0 15px; border-radius: 10px; display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 620; text-align: left; width: 100%; transition: .2s ease; }
.nav button:hover { color: white; background: #203530; }
.nav button.active { color: white; background: #29463d; }
.nav button.active svg { color: #d0e8ae; }
.nav svg, .sidebar-bottom svg { width: 18px; height: 18px; stroke-width: 1.8; flex: none; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom { padding: 0 5px; }
.sidebar-manual { display: block; color: #e2ebdf; text-decoration: none; font-size: 11px; font-weight: 700; padding: 11px 8px 15px; }
.sidebar-manual:hover { color: white; text-decoration: underline; }
.demo-note { display: flex; gap: 9px; align-items: flex-start; color: #9bb0a4; font-size: 11px; line-height: 1.45; background: #1e332d; padding: 14px; border-radius: 12px; margin-bottom: 19px; }
.demo-note svg { color: #d7e8b9; }
.sidebar-profile { border-top: 1px solid #2a3d36; padding: 20px 8px 0; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 33px; height: 33px; flex: none; background: #dceacb; border-radius: 10px; display: grid; place-items: center; color: var(--forest); font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.sidebar-profile strong { display: block; font-size: 11px; color: #f6faf7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 145px; }
.sidebar-profile small { color: #829d8d; font-size: 10px; }

.main-area { min-width: 0; }
.topbar { min-height: 75px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.58); display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 43px; }
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.breadcrumb { font-size: 12px; color: var(--muted); white-space: nowrap; }
.breadcrumb strong { color: var(--ink); font-weight: 700; }
.crumb-sep { color: #c5d0c7; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { color: var(--muted); font-size: 11px; white-space: nowrap; }
.topbar-divider { width: 1px; height: 23px; background: var(--line); }
.topbar-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #e5ece7; color: var(--forest); font-size: 11px; font-weight: 800; }
.content { width: min(100%, 1440px); margin: 0 auto; padding: 38px 43px 68px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 10px; font-weight: 800; color: #7e9a83; margin: 0 0 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 3.1vw, 44px); line-height: 1.08; letter-spacing: -.048em; font-weight: 400; margin-bottom: 9px; }
.subtitle { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.55; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn { border-radius: 10px; min-height: 39px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; font-size: 12px; font-weight: 720; white-space: nowrap; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary { color: white; background: var(--forest); box-shadow: 0 7px 18px rgba(22,79,67,.15); }
.btn-primary:hover { background: #0f4137; }
.btn-secondary { color: var(--ink); background: white; border-color: var(--line); }
.btn-secondary:hover { border-color: #b7c6ba; }
.btn-danger { color: white; background: #a95349; }
.btn-ghost { color: var(--ink-soft); background: transparent; }
.btn-sm { min-height: 33px; padding: 0 11px; font-size: 11px; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; height: 39px; padding: 0 32px 0 13px; font-size: 12px; font-weight: 700; color: var(--ink); outline: none; }
.select-wrap svg { pointer-events: none; position: absolute; right: 11px; width: 12px; height: 12px; color: var(--muted); }
.unit-picker { position: relative; z-index: 20; min-width: 190px; font-size: 13px; }
.unit-picker > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; min-height: 40px; padding: 10px 32px 9px 12px; font-weight: 700; white-space: nowrap; max-width: 310px; overflow: hidden; text-overflow: ellipsis; }
.unit-picker > summary::-webkit-details-marker { display: none; }
.unit-picker > summary::after { content: '⌄'; position: absolute; right: 12px; }
.unit-picker-menu { position: absolute; top: calc(100% + 5px); left: 0; min-width: min(320px,90vw); max-height: 310px; overflow: auto; display: grid; gap: 2px; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,.16); }
.unit-picker-menu label { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 5px 8px; cursor: pointer; border-radius: 7px; }
.unit-picker-menu label:hover { background: #f0f4ee; }
.unit-picker-menu input { width: 16px; height: 16px; accent-color: #285b40; }
.unit-picker-menu .text-button { justify-self: start; padding: 7px 8px; }
.unit-picker-apply { justify-self: end; margin: 5px 3px 2px; min-height: 36px; }

.hero { min-height: 273px; border-radius: 19px; background: radial-gradient(circle at 85% 14%, #315247 0, transparent 35%), linear-gradient(112deg, #152721, #1e3b31); color: white; padding: 34px 40px; display: grid; grid-template-columns: minmax(0,1fr) 47%; gap: 28px; overflow: hidden; box-shadow: 0 24px 45px rgba(25,56,43,.12); }
.hero .eyebrow { color: #c8dfa8; margin-bottom: 18px; }
.hero h2 { font-family: Georgia, serif; font-size: clamp(31px,3.1vw,44px); font-weight: 400; letter-spacing: -.045em; line-height: 1.08; margin-bottom: 7px; }
.hero-value { font-size: clamp(28px,3vw,42px); font-weight: 700; letter-spacing: -.055em; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.hero-detail { color: #a9c0ae; font-size: 12px; margin-bottom: 25px; }
.hero-link { border: 0; background: transparent; color: #e0efcf; font-weight: 700; font-size: 11px; padding: 0; display: inline-flex; align-items: center; gap: 7px; }
.hero-link svg { width: 14px; }
.hero-art { position: relative; min-height: 200px; display: flex; align-items: flex-end; justify-content: center; }
.hero-art::before, .hero-art::after { content: ""; position: absolute; border: 1px solid rgba(222,240,202,.1); border-radius: 50%; width: 340px; height: 340px; left: 15%; top: -170px; }
.hero-art::after { width: 500px; height: 500px; top: -247px; left: -5%; }
.hero-art svg { width: 100%; height: 170px; overflow: visible; position: relative; z-index: 1; }
.hero-pill { position: absolute; z-index: 2; right: 0; top: 16px; border-radius: 8px; padding: 9px 13px; background: rgba(241,249,234,.12); border: 1px solid rgba(227,243,210,.13); backdrop-filter: blur(9px); font-size: 11px; color: #e7f4db; }
.hero-pill svg { width: 13px; height: 13px; display: inline-block; vertical-align: -2px; margin-right: 4px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.stat-card { min-height: 140px; background: var(--paper); border: 1px solid #edf0eb; box-shadow: var(--shadow); border-radius: 15px; padding: 22px 22px 19px; position: relative; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; margin-bottom: 22px; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; }
.stat-icon svg { width: 15px; height: 15px; stroke-width: 2; }
.stat-icon.green { color: #2b7b5d; background: #e7f4e9; }
.stat-icon.gold { color: #a4763e; background: #fbf2e4; }
.stat-icon.blue { color: #50738d; background: #e9f1f6; }
.stat-icon.rose { color: #ad6a5d; background: #faeeeb; }
.stat-value { color: var(--ink); font-size: clamp(19px,1.8vw,25px); font-weight: 750; letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-foot { color: #9aaba0; font-size: 10px; margin-top: 6px; }
.section-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(285px,1fr); gap: 17px; margin-top: 18px; }
.panel { background: white; border: 1px solid #ebefea; border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.panel-pad { padding: 23px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-title { font-size: 14px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 4px; }
.panel-subtitle { color: var(--muted); font-size: 11px; margin: 0; }
.chart { height: 203px; width: 100%; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-empty { min-height: 203px; display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 11px; }
.chart-labels { display: flex; justify-content: space-between; color: #9faea4; font-size: 10px; font-weight: 700; margin: 0 0 0 2px; }
.chart-legend { display: flex; gap: 16px; color: #798b80; font-size: 10px; font-weight: 650; margin-top: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.legend-dot.gold { background: var(--gold); }
.breakdown { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 16px; min-height: 195px; }
.donut { width: 108px; height: 108px; position: relative; display: grid; place-items: center; }
.donut svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.donut-hole { width: 72px; height: 72px; border-radius: 50%; background: white; display: grid; align-content: center; text-align: center; position: absolute; }
.donut-hole b { font-size: 14px; letter-spacing: -.04em; }
.donut-hole span { color: var(--muted); font-size: 9px; }
.breakdown-list { display: grid; gap: 15px; }
.breakdown-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 10px; color: var(--ink-soft); }
.breakdown-row b { color: var(--ink); font-size: 11px; }
.breakdown-label { display: flex; align-items: center; gap: 8px; }
.breakdown-label i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.breakdown-label i.costs { background: #658c72; }
.breakdown-label i.expenses { background: #c3a16f; }
.breakdown-label i.investments { background: #a9b8b7; }
.recent-panel { margin-top: 18px; }
.recent-list { display: grid; }
.recent-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #eef1ed; }
.recent-row:last-child { border: 0; padding-bottom: 0; }
.entry-glyph { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.entry-glyph svg { width: 15px; height: 15px; }
.entry-glyph.income { color: #2c7d5e; background: #e7f4e9; }
.entry-glyph.expense { color: #bb7d64; background: #f9eeea; }
.recent-row strong { display: block; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.recent-amount { font-size: 11px; font-weight: 760; white-space: nowrap; }
.recent-amount.income { color: #2a8062; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search { margin-left: auto; }
.segmented { display: inline-flex; gap: 3px; background: #eaf0e9; border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: #7e9084; border-radius: 8px; min-height: 32px; padding: 0 14px; font-size: 11px; font-weight: 750; }
.segmented button.active { background: white; color: var(--forest); box-shadow: 0 2px 8px rgba(23,36,33,.07); }
.search { position: relative; }
.search svg { position: absolute; width: 15px; height: 15px; top: 10px; left: 13px; color: #9fac9f; }
.search input { width: 230px; height: 37px; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 0 12px 0 36px; font-size: 11px; color: var(--ink); outline: none; }
.search input:focus { border-color: #8db598; }
.table-panel { overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.entries-table { min-width: 820px; }
th { background: #f9fbf8; color: #84958a; text-align: left; text-transform: uppercase; letter-spacing: .09em; font-size: 9px; font-weight: 800; padding: 15px 17px; white-space: nowrap; }
td { border-top: 1px solid #edf0eb; padding: 14px 17px; font-size: 11px; color: #465950; vertical-align: middle; }
tbody tr:hover { background: #fbfcfa; }
.td-main { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.td-main strong { color: var(--ink); font-size: 11px; display: block; max-width: 230px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.td-main small { color: var(--muted); display: block; font-size: 10px; margin-top: 4px; }
.td-money { color: var(--ink); font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-money.income { color: #2a8062; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 720; padding: 5px 8px; border-radius: 20px; white-space: nowrap; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.paid { color: #28765c; background: #eaf5eb; }
.status.partial { color: #a27737; background: #faf2df; }
.status.pending { color: #9b6c60; background: #faeeeb; }
.table-actions { display: flex; gap: 3px; justify-content: flex-end; }
.icon-btn { width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: #94a399; display: grid; place-items: center; }
.icon-btn:hover { color: var(--forest); background: #edf5ed; }
.icon-btn.danger:hover { color: #a95349; background: #fbefed; }
.icon-btn svg { width: 15px; height: 15px; }
.table-footer { display: flex; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-icon { width: 42px; height: 42px; margin: 0 auto 13px; border-radius: 12px; background: var(--forest-light); color: var(--forest); display: grid; place-items: center; }
.empty-icon svg { width: 21px; height: 21px; }
.empty strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 5px; }
.empty p { font-size: 11px; margin: 0; }

.annual-panel { overflow:hidden; }
.annual-wrap { overflow-x: auto; }
.annual-table { min-width: 1950px; table-layout: fixed; }
.annual-table th:first-child, .annual-table td:first-child { width: 355px; text-align: left; position: sticky; left: 0; z-index: 2; background: white; }
.annual-table th:first-child { background: #f9fbf8; }
.annual-table td, .annual-table th { text-align: right; padding: 13px 12px; font-variant-numeric: tabular-nums; font-size: 10px; white-space: nowrap; }
.annual-table .row-section td { background: #f5f8f4; color: var(--forest); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; padding-top: 16px; padding-bottom: 11px; }
.annual-table .row-section td:first-child { background: #f5f8f4; }
.annual-table .row-total td { color: var(--ink); background: #f9fbf8; font-weight: 800; }
.annual-table .row-total td:first-child { background: #f9fbf8; }
.annual-table th:last-child, .annual-table td:last-child { background: #f2f7f0; font-weight: 800; color: var(--forest); }
.annual-table .row-section td:last-child { background: #f5f8f4; }
.annual-note { padding: 19px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }

.profile-grid { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(250px,.8fr); gap: 20px; align-items: start; }
.form-panel { padding: 26px; }
.form-panel h2 { font-size: 15px; margin-bottom: 5px; }
.form-panel p { color: var(--muted); font-size: 11px; line-height: 1.5; margin-bottom: 25px; }
.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 10px; font-weight: 800; color: #566a5d; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; border: 1px solid #dce5dc; outline: none; border-radius: 9px; background: #fff; color: var(--ink); padding: 9px 11px; font-size: 12px; }
.field textarea { resize: vertical; min-height: 73px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7bac88; box-shadow: 0 0 0 3px #edf6eb; }
.field input::placeholder, .field textarea::placeholder { color: #acb8ad; }
.field-hint { color: #9aaa9f; font-size: 10px; line-height: 1.4; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.aside-card { border-radius: 16px; background: #e8f0e5; padding: 27px; color: var(--forest); }
.aside-card svg { width: 25px; height: 25px; margin-bottom: 35px; }
.aside-card h3 { font-family: Georgia, serif; font-size: 23px; letter-spacing: -.04em; line-height: 1.15; font-weight: 400; margin-bottom: 11px; }
.aside-card p { font-size: 11px; line-height: 1.65; color: #63806d; margin: 0; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(11,29,22,.52); display: flex; align-items: center; justify-content: center; z-index: 80; padding: 20px; backdrop-filter: blur(3px); }
.modal { background: white; border-radius: 17px; width: min(100%, 615px); max-height: min(95vh,900px); overflow: auto; box-shadow: 0 30px 100px rgba(8,30,19,.25); }
.modal-head { padding: 24px 27px 20px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 15px; }
.modal-head .eyebrow { margin-bottom: 7px; }
.modal-head h2 { font-family: Georgia,serif; font-size: 26px; letter-spacing: -.045em; font-weight: 400; margin: 0; }
.modal-close { border: 0; background: #f3f6f2; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-soft); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 23px 27px 27px; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 21px; }
.type-switch button { height: 42px; background: #f8faf7; color: #86988b; border: 1px solid var(--line); border-radius: 9px; font-size: 11px; font-weight: 800; display: flex; justify-content: center; align-items: center; gap: 8px; }
.type-switch button.active { color: var(--forest); background: #edf6ed; border-color: #a9cdb0; }
.type-switch button.expense.active { color: #a16658; background: #fbf1ec; border-color: #ebc9bf; }
.type-switch svg { width: 16px; height: 16px; }
.form-error { background: #fbefec; color: #a55047; padding: 10px 12px; border-radius: 8px; font-size: 11px; margin-bottom: 15px; display: none; }
.form-error.show { display: block; }
.quick-settle { border: 0; background: none; padding: 0; color: var(--forest); font-size: 10px; font-weight: 760; justify-self: start; }
.check-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 9px; min-height: 42px; padding: 0 11px; gap: 12px; }
.check-row label { color: var(--ink-soft); font-size: 11px; font-weight: 680; }
.check-row select { border: 0; min-height: 35px; width: 70px; font-size: 11px; background: transparent; color: var(--ink); outline: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.confirm-modal { max-width: 390px; }
.confirm-modal .modal-body p { color: var(--ink-soft); line-height: 1.55; font-size: 12px; }
.toast { position: fixed; right: 23px; bottom: 23px; z-index: 110; padding: 12px 16px; border-radius: 9px; background: #172e25; color: white; font-size: 12px; font-weight: 650; box-shadow: 0 15px 40px rgba(13,44,29,.2); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #a55147; }
.mobile-menu { display: none; }
.app-shell.sidebar-unpinned .mobile-menu { display: grid; align-content: center; justify-content: center; flex: none; width: 34px; height: 34px; margin-right: 4px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 20px; }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 214px minmax(0,1fr); }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .content { padding-left: 28px; padding-right: 28px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 19px; }
  .breakdown { grid-template-columns: 1fr; justify-items: center; gap: 3px; }
  .breakdown-list { width: 100%; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; width: 252px; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: 18px 0 50px rgba(0,0,0,.13); }
  .app-shell.sidebar-visible .sidebar { transform: translateX(0); }
  .app-shell.sidebar-visible .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 19; width: 100%; border: 0; background: rgba(32,19,29,.3); }
  .mobile-menu,.app-shell.sidebar-unpinned .mobile-menu { display: grid; border: 0; color: var(--ink); background: transparent; padding: 0; }
  .mobile-menu svg { width: 21px; height: 21px; }
  .topbar { padding: 0 25px; }
  .content { padding: 32px 25px 55px; }
  .stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .topbar-date, .topbar-divider { display: none; }
  .content { padding: 27px 16px 48px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 16px; }
  .page-head .head-actions { width: 100%; }
  .hero { grid-template-columns: 1fr; padding: 27px; min-height: auto; }
  .hero-art { display: none; }
  .hero-detail { margin-bottom: 24px; }
  .stat-grid { gap: 9px; }
  .stat-card { min-height: 118px; padding: 16px; }
  .stat-top { margin-bottom: 14px; align-items: flex-start; }
  .stat-value { font-size: 16px; }
  .stat-foot { font-size: 9px; }
  .section-grid { grid-template-columns: 1fr; }
  .breakdown { grid-template-columns: 105px 1fr; }
  .toolbar .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .field-grid { gap: 13px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { border-radius: 17px 17px 0 0; max-height: 94vh; }
  .modal-body { padding: 20px; }
  .modal-head { padding: 20px; }
}
@media (max-width: 420px) {
  .field-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 15px; }
  .breakdown { grid-template-columns: 1fr; }
}

/* BoxMineiro identity and sign-in */
.loading-logo { width: 190px; height: auto; }
.sidebar { background: linear-gradient(166deg, #63435b 0%, #422b3e 72%, #342237 100%); color: #fffaf6; }
.brand { background: #fffaf5; border: 1px solid rgba(255,255,255,.65); border-radius: 13px; padding: 11px 14px; margin: 0 4px 39px; box-shadow: 0 12px 26px rgba(27,14,28,.1); }
.brand-logo { display: block; width: 100%; max-width: 168px; height: auto; object-fit: contain; }
.brand-wordmark { color: #2f5a37; font: 700 29px/1 Georgia, serif; letter-spacing: -.04em; white-space: nowrap; }
.brand-wordmark span { color: #c57434; }
.food-mark { height: 100%; display: grid; place-content: center; color: #f6ead7; font: 700 clamp(100px, 18vw, 280px)/1 Georgia, serif; letter-spacing: -.13em; background: radial-gradient(circle at 35% 30%, #97a66b, transparent 55%), linear-gradient(140deg, #234c37, #142d29); }
.food-mark span { color: #dca263; }
.nav-label { color: #d8bcbf; }
.nav button { color: #decbd7; }
.nav button:hover { background: rgba(255,255,255,.11); }
.nav button.active { background: rgba(255,255,255,.17); box-shadow: inset 3px 0 0 #dfb67d; }
.nav button.active svg { color: #eac694; }
.demo-note { color: #e6d4df; background: rgba(255,255,255,.085); }
.demo-note svg { color: #eac694; }
.sidebar-profile { border-color: rgba(255,255,255,.17); }
.sidebar-profile small { color: #d1bacb; }
.avatar { background: #ead4bd; color: #5a3650; }
.sidebar-logout { margin: 16px 0 0; padding: 10px 9px; display: flex; align-items: center; gap: 10px; width: 100%; color: #ecdde6; background: transparent; border: 0; border-radius: 9px; font-size: 11px; font-weight: 700; text-align: left; }
.sidebar-logout:hover { background: rgba(255,255,255,.1); color: white; }
.sidebar-logout svg { width: 17px; height: 17px; }
.topbar { background: rgba(255,255,255,.76); }
.topbar-avatar { background: #f0e5ed; }
.eyebrow { color: #a47883; }
.btn-primary { box-shadow: 0 7px 18px rgba(98,67,90,.18); }
.btn-primary:hover { background: #4b3146; }
.btn-secondary:hover { border-color: #c9a7bd; }
.hero { background: radial-gradient(circle at 87% 18%, rgba(212,156,166,.28), transparent 38%), linear-gradient(115deg, #55374f, #76546a); box-shadow: 0 24px 45px rgba(78,47,71,.15); }
.hero .eyebrow { color: #efd3a9; }
.hero-detail { color: #e6d5e0; }
.hero-link { color: #f4d6a8; }
.hero-art::before, .hero-art::after { border-color: rgba(250,218,180,.16); }
.hero-pill { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.19); color: #fff7ea; }
.stat-card { border-color: #f0e9ec; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--tone, var(--gold)); }
.stat-card:has(.stat-icon.green) { --tone: var(--green); }
.stat-card:has(.stat-icon.red) { --tone: var(--red); }
.stat-card:has(.stat-icon.orange) { --tone: var(--orange); }
.stat-card:has(.stat-icon.blue) { --tone: var(--blue); }
.stat-icon.green { color: var(--green); background: #e4f4ec; }
.stat-icon.red { color: var(--red); background: #fae9ec; }
.stat-icon.orange { color: var(--orange); background: #fff0df; }
.stat-icon.blue { color: var(--blue); background: #e8f2f8; }
.stat-foot { color: #988992; }
.panel { border-color: #f0e9ec; }
.legend-dot { background: var(--green); }
.legend-dot.gold { background: var(--red); }
.breakdown-label i.costs { background: var(--red); }
.breakdown-label i.expenses { background: var(--orange); }
.breakdown-label i.investments { background: var(--blue); }
.entry-glyph.income { color: var(--green); background: #e4f4ec; }
.entry-glyph.expense { color: var(--red); background: #fae9ec; }
.recent-amount.income, .td-money.income { color: var(--green); }
.segmented { background: #f1e9ef; }
.segmented button { color: #8c7885; }
.search input:focus { border-color: #c8a1b7; }
th, .annual-table th:first-child { background: #fbf8fa; color: #8b7885; }
td { color: #655360; border-color: #f0e9ed; }
tbody tr:hover { background: #fdf9fb; }
.status.paid { color: var(--green); background: #e4f4ec; }
.status.partial, .status.pending { color: #a96b2c; background: #fff0df; }
.annual-table .row-section td, .annual-table .row-section td:first-child, .annual-table .row-section td:last-child { background: #f7eff4; }
.annual-table .row-total td, .annual-table .row-total td:first-child { background: #fbf8fa; }
.annual-table th:last-child, .annual-table td:last-child { background: #f6eff3; }
.field label { color: #655060; }
.field input, .field select, .field textarea { border-color: #e7dce3; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #ba8da8; box-shadow: 0 0 0 3px #f6edf3; }
.aside-card { background: #f3e8ef; }
.aside-card p { color: #866b7b; }
.modal-backdrop { background: rgba(39,25,38,.56); }
.type-switch button.active { background: #e4f4ec; border-color: #b2dac3; color: var(--green); }
.type-switch button.expense.active { background: #fae9ec; border-color: #eac2c8; color: var(--red); }
.toast { background: #493247; }

.login-screen { min-height: 100svh; display: grid; grid-template-columns: minmax(520px, 44%) minmax(0, 56%); background: #faf8f3; }
.login-panel { min-width: 0; min-height: 100svh; display: flex; flex-direction: column; padding: clamp(32px, 4.2vw, 78px) clamp(34px, 5.2vw, 96px) 28px; }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.login-top .brand-wordmark { width: auto; max-width: none; font: 800 clamp(30px, 2.7vw, 40px)/1 system-ui, "Segoe UI", Arial, sans-serif; letter-spacing: -.075em; color: #183a2c; }
.login-top .brand-wordmark span { color: #a65c2e; }
.login-top-label { color: #5e6f64; font-size: 11px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; text-align: right; }
.login-center { width: min(100%, 460px); margin: auto 0; padding: 52px 0 54px; }
.login-kicker { display: block; margin: 0 0 16px; color: #a65c2e; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.login-center h1 { color: #24342c; font: 400 clamp(43px, 3.35vw, 61px)/1.04 Georgia, "Times New Roman", serif; letter-spacing: -.055em; margin: 0 0 18px; }
.login-center .login-intro { max-width: 390px; margin: 0 0 24px; color: #5e6f64; font-size: 16px; line-height: 1.55; }
.login-form { display: grid; gap: 20px; }
.login-field { display: grid; gap: 8px; }
.login-field label { color: #24342c; font-size: 14px; font-weight: 700; }
.login-field > input, .login-password { width: 100%; height: 54px; background: white; border: 1px solid #cbd9ce; border-radius: 10px; }
.login-field > input, .login-password input { padding: 0 16px; color: #24342c; font-size: 16px; outline: none; }
.login-field > input:focus-visible, .login-password:focus-within { border-color: #285c3b; outline: 3px solid #b7d3bd; outline-offset: 2px; }
.login-password { display: flex; align-items: center; }
.login-password input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; }
.login-password button { flex: none; min-width: 78px; height: 46px; padding: 0 12px; border: 0; border-radius: 7px; background: transparent; color: #285c3b; font-weight: 700; }
.login-password button:focus-visible, .login-submit:focus-visible, .login-footer a:focus-visible { outline: 3px solid #a65c2e; outline-offset: 3px; }
.login-field input::placeholder { color: #77887d; }
.login-error { border-radius: 8px; background: #fae9ec; color: #9e394d; font-size: 13px; padding: 11px 12px; }
.login-error[hidden] { display: none; }
.login-submit { min-height: 56px; margin-top: 10px; padding: 0 18px; border: 0; border-radius: 10px; background: #285c3b; color: white; box-shadow: 0 11px 20px #153b2730; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 16px; font-weight: 750; }
.login-submit:hover { background: #183a2c; }
.login-submit span:last-child { font-size: 22px; line-height: 1; font-weight: 400; }
.login-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: #5e6f64; font-size: 12px; }
.login-footer a { color: #285c3b; text-decoration: underline; text-underline-offset: 3px; }
.login-visual { position: relative; min-width: 0; min-height: 100svh; overflow: hidden; background: #183a2c; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 56% 50%; }
.login-visual::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #102e22a1 0%, transparent 60%), linear-gradient(0deg, #10291ef2 0%, #10291e17 62%); }
.login-visual-top, .login-visual-copy { position: absolute; z-index: 1; left: clamp(42px, 5vw, 94px); right: clamp(42px, 5vw, 94px); color: white; }
.login-visual-top { top: clamp(32px, 4.2vw, 78px); font-size: 12px; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.login-visual-copy { bottom: clamp(44px, 8vh, 104px); max-width: 570px; }
.visual-overline { color: #deb376; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.login-visual-copy h2 { font: 400 clamp(48px, 4.6vw, 82px)/1.03 Georgia, "Times New Roman", serif; letter-spacing: -.052em; margin: 0 0 18px; }
.login-visual-copy p:last-child { margin: 0; max-width: 420px; color: #f1f4ee; font-size: 16px; line-height: 1.55; }
@media (max-width: 1050px) {
  .login-screen { grid-template-columns: minmax(430px, 47%) minmax(0, 53%); }
  .login-top-label { display: none; }
  .login-visual-copy h2 { font-size: clamp(44px, 5vw, 61px); }
}
@media (max-width: 780px) {
  .login-screen { display: block; }
  .login-panel { min-height: 100svh; padding: 28px clamp(24px, 6vw, 46px); }
  .login-center { margin: auto; padding: 38px 0; }
  .login-footer { justify-content: center; text-align: center; }
  .login-visual { display: none; }
}
@media (max-width: 460px) {
  .login-center { padding: 28px 0; }
  .login-center h1 { font-size: 42px; }
  .login-center .login-intro { margin-bottom: 20px; }
  .login-form { gap: 16px; }
}
@media (max-width: 460px) and (max-height: 700px) {
  .login-panel { padding-top: 20px; padding-bottom: 20px; }
  .login-center { padding: 20px 0; }
  .login-center h1 { font-size: 38px; margin-bottom: 12px; }
  .login-center .login-intro { font-size: 14px; margin-bottom: 14px; }
  .login-form { gap: 12px; }
  .login-field > input, .login-password { height: 48px; }
  .login-submit { min-height: 50px; margin-top: 4px; }
}
@media (max-height: 850px) and (min-width: 781px) {
  .login-panel { padding-top: 25px; padding-bottom: 20px; }
  .login-center { padding: 22px 0; }
  .login-center h1 { font-size: 45px; }
  .login-center .login-intro { margin-bottom: 20px; }
  .login-form { gap: 13px; }
  .login-visual-copy { bottom: 35px; }
}

/* Multiempresa: controles de configuração e formulários */
.sidebar .brand { margin-bottom: 38px; }
.sidebar .brand-logo { width: 175px; }
.sidebar-close { display: none; }
.app-shell.sidebar-unpinned .sidebar-close { display: block; position: absolute; right: 10px; top: 7px; border: 0; background: transparent; color: white; font-size: 24px; }
.settings-label { margin-top: 28px; }
.nav button { justify-content: flex-start; }
.topbar .select-wrap select { max-width: min(32vw, 300px); text-overflow: ellipsis; }
.hero-art { background: radial-gradient(circle at 68% 38%, rgba(201,224,174,.21), transparent 37%); }
.monthly-chart { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 8px; align-items: end; min-height: 190px; }
.monthly-col { min-width: 0; text-align: center; }
.monthly-bars { height: 155px; display: flex; align-items: end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line); }
.monthly-bars span { display: block; width: min(20px,45%); border-radius: 5px 5px 0 0; }
.income-bar { background: var(--green); }
.expense-bar { background: var(--red); }
.monthly-col small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.dashboard-month-picker { position: relative; z-index: 5; }
.dashboard-month-picker > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 130px; height: 39px; padding: 0 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.dashboard-month-picker > summary::-webkit-details-marker { display: none; }
.dashboard-month-picker > summary span { color: var(--muted); }
.dashboard-month-menu { position: absolute; top: calc(100% + 7px); right: 0; width: 310px; max-width: calc(100vw - 32px); padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 18px 38px rgba(67,40,60,.16); }
.dashboard-month-menu > strong { display: block; font-size: 12px; margin-bottom: 12px; }
.dashboard-month-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dashboard-month-options label { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.dashboard-month-options input { accent-color: var(--forest); }
.dashboard-month-shortcuts { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.dashboard-month-shortcuts button { border: 0; background: transparent; color: var(--forest); font-size: 11px; font-weight: 750; padding: 3px; }
.dashboard-basis { margin: 1px 0 15px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stat-grid.dashboard-stats { grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 0; }
.dashboard-stats .stat-card { min-height: 128px; }
.dashboard-stats .stat-top { margin-bottom: 17px; }
.dashboard-stats .stat-value { white-space: normal; overflow-wrap: anywhere; }
.dashboard-chart,.dashboard-due { margin-top: 18px; }
.line-chart-scroll { overflow-x: auto; }
.line-chart-svg { display: block; width: 100%; min-width: 720px; height: auto; }
.line-chart-grid { stroke: #eadfe6; stroke-width: 1; stroke-dasharray: 4 6; }
.line-chart-focus { fill: #f6eef3; }
.line-chart-series { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.line-chart-series.income { stroke: var(--green); }
.line-chart-series.expense { stroke: var(--red); }
.line-chart-point { stroke: white; stroke-width: 2.5; cursor: help; }
.line-chart-point.income { fill: var(--green); }
.line-chart-point.expense { fill: var(--red); }
.line-chart-scale,.line-chart-month { fill: var(--muted); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 11px; }
.line-chart-month.selected { fill: var(--forest); font-weight: 800; }
.legend-dot.expense { background: var(--red); }
.due-grid { display: grid; gap: 0; }
.due-grid-head,.due-row { display: grid; grid-template-columns: minmax(125px,1.1fr) repeat(2,minmax(0,1fr)); align-items: stretch; gap: 12px; }
.due-grid-head { padding: 0 10px 8px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.due-row { padding: 11px 10px; border-top: 1px solid var(--line); }
.due-row > strong { align-self: center; color: var(--ink); font-size: 12px; }
.due-metric { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; width: 100%; min-width: 0; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fdfbfc; text-align: left; }
button.due-metric:hover { border-color: #c9a7bd; background: #faf5f8; }
.due-metric strong { color: var(--green); font-size: clamp(14px,1.5vw,18px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.due-metric.expense strong { color: var(--red); }
.due-metric small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dashboard-bank-row { display:grid; grid-template-columns:minmax(130px,1.3fr) minmax(170px,1fr) auto; align-items:center; gap:16px; padding:13px 0; border-top:1px solid var(--line); }
.dashboard-bank-row strong,.dashboard-bank-row small { display:block; overflow-wrap:anywhere; }
.dashboard-bank-row strong { color:var(--ink); font-size:13px; }
.dashboard-bank-row small { margin-top:3px; color:var(--ink-soft); font-size:11px; }
.dashboard-bank-badge { justify-self:end; padding:7px 10px; border-radius:999px; background:#edf5ef; color:var(--forest); font-size:11px; font-weight:750; white-space:nowrap; }
.dashboard-bank-badge.in-progress { background:#fff1df; color:#9a652d; }
.dashboard-bank-badge.unstarted { background:#f2edf1; color:var(--ink-soft); }
@media (max-width: 900px) {
  .stat-grid.dashboard-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .dashboard-month-menu { left: 0; right: auto; }
  .dashboard-chart .panel-head { flex-wrap: wrap; }
  .due-grid-head { display: none; }
  .due-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 12px 0; }
  .due-row > strong { grid-column: 1/-1; }
  .due-metric { display: grid; padding: 10px; }
  .due-metric::before { content: 'A receber'; color: var(--muted); font-size: 10px; font-weight: 750; }
  .due-metric.expense::before { content: 'A pagar'; }
  .dashboard-bank-row { grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; }
  .dashboard-bank-row > div:nth-child(2) { grid-column:1; }
  .dashboard-bank-badge { grid-column:2; grid-row:1 / 3; }
}
@media (max-width: 520px) {
  .stat-grid.dashboard-stats { grid-template-columns: 1fr; }
}
.search-input { border: 1px solid var(--line); background: white; border-radius: 9px; height: 38px; min-width: 220px; padding: 0 13px; font-size: 12px; }
.simple-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.simple-form label { display: flex; flex-direction: column; gap: 7px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.simple-form input,.simple-form select,.simple-form textarea,.invite-link { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 13px; }
#account-form :disabled { background:#f5f2f4; color:var(--muted); cursor:not-allowed; }
#settlement-form [name="fee"]:disabled,
#batch-settlement-form [name="fee"]:disabled,
#batch-settlement-form [data-batch-field="fee"]:disabled { background:#f5f2f4; color:var(--muted); cursor:not-allowed; }
.simple-form textarea { min-height: 80px; resize: vertical; }
.simple-form .wide { grid-column: 1/-1; }
.simple-form label:has(input[type="checkbox"]) { flex-direction:row; align-items:center; }
.simple-form input[type="checkbox"],.operation-primary-filters input[type="checkbox"] {
  width:17px; min-height:17px; height:17px; accent-color:var(--forest);
}
.modal-card:has(#warehouse-transfer-workflow-form) { width:min(100%,900px); }
.transfer-line { display:grid; grid-template-columns:minmax(180px,2fr) minmax(110px,.8fr) minmax(180px,1.3fr) auto;
  gap:12px; align-items:end; border-bottom:1px solid var(--line); padding:12px 0; }
.transfer-line-cost { font-size:11px; color:var(--ink-soft); padding-bottom:10px; }
.transfer-line .icon-btn { margin-bottom:3px; }
@media(max-width:700px){ .transfer-line { grid-template-columns:1fr 1fr; }
  .transfer-line-cost { grid-column:1/-1; } }
#warehouse-balance-filters { grid-template-columns:repeat(4,minmax(0,1fr)) auto auto; margin:18px 0; }
#warehouse-balance-filters label { min-width:0; }
#warehouse-balance-filters select { width:100%; min-width:0; }
@media(max-width:900px){ #warehouse-balance-filters { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px){ #warehouse-balance-filters { grid-template-columns:1fr; } }
.simple-form button { justify-self: start; align-self: end; }
.form-panel { max-width: 780px; }
.extra-panel { margin-top: 20px; }
.modal-card { position: relative; background: white; border-radius: 16px; padding: 27px; width: min(100%, 650px); max-height: 90vh; overflow: auto; box-shadow: 0 30px 100px rgba(8,30,19,.25); }
.modal-card h2 { font-family: Georgia,serif; font-size: 26px; font-weight: 400; }
.modal-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.modal-card .modal-close { position: absolute; right: 18px; top: 18px; font-size: 20px; }
.permission-list { display: grid; gap: 7px; max-height: 65vh; overflow: auto; }
.permission-list label { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 5px 0; font-size: 12px; }
.permission-list select { min-width: 165px; padding: 6px; border: 1px solid var(--line); border-radius: 7px; }
.permission-list button { margin-top: 12px; justify-self: start; }
.invite-link { margin: 9px 0 15px; }
.modal-card pre { white-space: pre-wrap; word-break: break-all; color: var(--forest); background: var(--forest-light); padding: 15px; border-radius: 8px; }
.annual-table .account-level-1 td { background: #f4edf2; color: var(--ink); font-weight: 800; border-top: 2px solid #e8d9e2; }
.annual-table .account-level-1 td:first-child { background: #f4edf2; }
.annual-table .account-level-2 td { background: #faf6f9; color: var(--ink); font-weight: 700; }
.annual-table .account-level-2 td:first-child { background: #faf6f9; }
.annual-table .account-level-2 .account-label { padding-left: 14px; }
.annual-table .account-level-3 .account-label { padding-left: 28px; }
.annual-table .account-level-3 td { font-weight: 600; }
.annual-table .account-level-4 .account-label { padding-left: 42px; }
.annual-table .account-level-1 td:last-child { background: #eadce6; }
.annual-table .account-level-2 td:last-child { background: #f3e9ef; }
.annual-table.with-percent { min-width: 3000px; }
.annual-table thead tr:nth-child(2) th { background: #f7f0f5; font-size: 9px; }
.annual-table .percent-col { color: #88717f; font-size: 10px; }
.annual-table .account-deduction-leaf td,
.annual-table .account-deduction-leaf td:last-child { color: var(--red); }
.annual-table .row-result td { background: #e9dde6; color: var(--ink); font-weight: 800; border-top: 2px solid #c9aebf; }
.annual-table .row-result td:first-child { background: #e9dde6; }
.annual-table .row-result td:last-child { background: #ddcbd8; }
.annual-table .row-result.negative td { color: var(--red); }
.report-filter-panel { padding: 23px 25px; margin-bottom: 18px; }
.report-selector { display:flex; align-items:end; justify-content:space-between; gap:20px; padding-bottom:17px; margin-bottom:17px; border-bottom:1px solid var(--line); }
.report-selector label { min-width:min(100%,320px); color:var(--ink); font-size:13px; font-weight:750; }
.report-selector p { max-width:520px; margin:0 0 7px; color:var(--ink-soft); font-size:12px; }
.report-selector select { width:100%; display:block; margin-top:7px; }
.report-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; gap:13px; }
.report-filter-grid label { min-width:0; display:grid; gap:6px; color:var(--ink-soft); font-size:12px; font-weight:700; }
.report-filter-grid .report-compare { display:flex; align-items:center; gap:9px; min-height:42px; }
.report-compare input { width:17px; min-height:17px; height:17px; accent-color:var(--forest); }
.report-filter-grid input,.report-filter-grid select,.report-selector select { min-width:0; min-height:42px; padding:8px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); }
.report-run { min-height:42px; }
.report-message { padding:21px 25px; color:var(--red); margin-bottom:18px; }
.report-output { overflow:hidden; padding:0; }
.report-demo { padding:9px 24px; color:#8b3c43; background:#fff1f1; font-size:11px; font-weight:850; letter-spacing:.16em; text-align:center; }
.report-output-head { display:flex; justify-content:space-between; align-items:start; gap:18px; padding:24px 25px 15px; }
.report-output-head h2 { margin:4px 0 8px; font-family:Georgia,serif; font-size:30px; font-weight:400; }
.report-output-head p { margin:4px 0; color:var(--ink-soft); font-size:12px; }
.report-output-head .eyebrow { color:var(--gold); font-size:10px; font-weight:800; letter-spacing:.16em; }
.report-export-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.report-export-actions a { text-decoration:none; }
.report-filter-summary { margin:0 25px 18px; padding:10px 13px; background:#faf7f9; border-radius:8px; color:var(--ink-soft); font-size:12px; }
.report-totals { display:flex; gap:10px; flex-wrap:wrap; padding:0 25px 20px; }
.report-totals > div { min-width:150px; padding:13px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.report-totals small { display:block; margin-bottom:5px; color:var(--ink-soft); font-size:11px; }
.report-totals strong { font-size:17px; font-variant-numeric:tabular-nums; }
.report-table-scroll { overflow-x:auto; border-top:1px solid var(--line); }
.report-top-scroll { height:18px; overflow-x:auto; overflow-y:hidden; border-top:1px solid var(--line); }
.report-top-scroll[hidden] { display:none; }
.report-top-scroll > div { height:1px; }
.report-table { width:100%; min-width:max-content; border-collapse:collapse; font-size:12px; }
.report-table th { position:sticky; top:0; z-index:1; background:#f8f4f7; color:var(--ink-soft); text-transform:uppercase; letter-spacing:.055em; font-size:10px; text-align:left; white-space:nowrap; }
.report-table th,.report-table td { padding:11px 13px; border-bottom:1px solid var(--line); }
.report-table tbody tr:nth-child(even) { background:#fcfafb; }
.report-table tbody tr:hover { background:#f5eef3; }
.report-table td { max-width:360px; overflow-wrap:anywhere; vertical-align:top; }
.report-table .report-number { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.report-document-link { padding:0; border:0; background:transparent; color:var(--forest); font-weight:700; text-decoration:underline; text-underline-offset:2px; }
.report-notes { padding:16px 25px 20px; color:var(--ink-soft); font-size:11px; line-height:1.5; }
.report-notes p { margin:3px 0; }
.history-status { border-radius:999px; padding:4px 8px; color:var(--forest) !important; background:#edf5ef; font-weight:700; }
.history-status.reversed { color:var(--red) !important; background:#fceeee; }
.operation-page .page-head { margin-bottom:16px; }
.operation-page .page-head .eyebrow { margin-bottom:5px; }
.operation-page .page-head h1 { font-size:clamp(28px,2.5vw,36px); }
.operation-filter-panel { padding:16px 20px; margin-bottom:14px; }
.operation-primary-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) auto; align-items:end; gap:12px; }
.operation-filter-actions { display:flex; align-items:center; gap:10px; min-height:42px; white-space:nowrap; }
.card-receivable-filters { grid-template-columns:minmax(175px,1.6fr) minmax(125px,1fr)
  minmax(160px,1.4fr) minmax(100px,.8fr) minmax(135px,1fr) minmax(135px,1fr) auto auto;
  align-items:end; gap:12px; }
.card-receivable-filters label { min-width:0; display:grid; gap:6px; color:var(--ink-soft);
  font-size:12px; font-weight:700; }
.card-receivable-filters input,.card-receivable-filters select { width:100%; min-width:0;
  min-height:42px; padding:8px 11px; border:1px solid var(--line); border-radius:9px;
  background:#fff; color:var(--ink); }
.card-receivable-filters button { justify-self:start; min-height:42px; }
.card-receivable-filters .card-filter-clear { border:0; background:transparent; color:var(--forest);
  font-weight:750; white-space:nowrap; cursor:pointer; }
.card-receivable-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.card-receivable-head h2 { margin-bottom:3px; }
.card-receivable-check { width:17px; height:17px; accent-color:var(--forest); }
@media(max-width:1250px){ .card-receivable-filters { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px){ .card-receivable-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .card-receivable-head { align-items:flex-start; flex-direction:column; } }
@media(max-width:450px){ .card-receivable-filters { grid-template-columns:1fr; }
  .card-receivable-filters button,.card-receivable-head button { width:100%; } }
.modal-card:has(.card-payout-form) { width:min(100%,900px); }
.card-payout-form { grid-template-columns:minmax(150px,1fr) minmax(220px,1.6fr); align-items:end; }
.card-payout-lines { max-height:min(43vh,430px); border:1px solid var(--line);
  border-radius:11px; overflow:auto; }
.card-payout-line { display:grid; grid-template-columns:minmax(80px,.7fr) minmax(110px,1fr)
  minmax(135px,1fr) minmax(110px,1fr); align-items:center; gap:10px;
  padding:9px 12px; border-top:1px solid var(--line); font-size:12px; font-variant-numeric:tabular-nums; }
.card-payout-line:first-child { border-top:0; }
.card-payout-line-head { background:#f8f4f7; color:var(--ink-soft); font-size:11px; font-weight:750; }
.card-payout-line label { display:block; }
.card-payout-line input { min-height:36px; text-align:right; }
.card-payout-line > span:nth-child(2),.card-payout-line > strong:last-child { text-align:right; }
.card-payout-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.card-payout-footer p { margin:0; font-weight:750; }
.card-payout-footer button { white-space:nowrap; }
@media(max-width:650px){ .card-payout-form { grid-template-columns:1fr; }
  .card-payout-line { min-width:520px; }
  .card-payout-footer { align-items:stretch; flex-direction:column; } }
.operation-filter-form label { min-width:0; display:grid; gap:5px; color:var(--ink-soft); font-size:12px; font-weight:700; }
.operation-filter-form input,.operation-filter-form select { min-width:0; width:100%; min-height:42px; padding:8px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); }
.operation-filter-form .report-run { padding:0 20px; }
.operation-advanced-filters { margin-top:10px; }
.operation-advanced-filters summary { width:max-content; cursor:pointer; color:var(--forest); font-size:12px; font-weight:750; }
.operation-advanced-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding-top:12px; }
.operation-output .report-output-head { padding:15px 20px 9px; align-items:center; }
.operation-output .report-output-head h2 { font-size:22px; margin:0 0 3px; }
.operation-output .report-output-head p { margin:2px 0; }
.operation-output .report-output-head .operation-generated { font-size:10px; color:var(--muted); }
.operation-output .report-filter-summary { margin:0 20px 10px; padding:6px 9px; }
.operation-output .report-totals { padding:0 20px 12px; gap:7px; }
.operation-output .report-totals > div { min-width:110px; padding:7px 11px; }
.operation-output .report-totals small { margin-bottom:2px; }
.operation-output .report-totals strong { font-size:14px; }
.report-print-only { display:none; }
.settlement-history-table { min-width:1120px; }
.settlement-history-table td { max-width:250px; }
.settlement-history-table td small { display:block; margin-top:3px; color:var(--muted); }
.settlement-history-row.is-reversed { opacity:.68; }
.settlement-detail-toggle { white-space:nowrap; font-size:11px; }
.settlement-detail-row td { background:#faf7f9; }
.settlement-detail-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px 16px; padding:5px; }
.settlement-detail-grid span { display:grid; gap:3px; color:var(--ink-soft); font-size:11px; }
.settlement-detail-grid strong { color:var(--ink); font-size:12px; font-weight:700; }
@media (max-width:1100px) { .report-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:1100px) { .operation-primary-filters { grid-template-columns:repeat(2,minmax(0,1fr)) auto; } .operation-advanced-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) {
  .report-selector,.report-output-head { display:block; }
  .report-selector p { margin-top:12px; }
  .report-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-export-actions { justify-content:flex-start; margin-top:15px; }
  .operation-primary-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .operation-primary-filters .report-run { width:max-content; }
  .settlement-detail-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:440px) { .report-filter-grid { grid-template-columns:1fr; } }
@media (max-width:440px) { .operation-primary-filters,.operation-advanced-grid { grid-template-columns:1fr; } }
@media print {
  @page { size:A4 landscape; margin:12mm; }
  body { background:#fff; }
  .app-shell,.main-area,.content { display:block !important; width:100% !important; margin:0 !important; padding:0 !important; }
  .sidebar,.sidebar-scrim,.topbar,.page-head,.report-filter-panel,.report-message,
  .report-export-actions,#modal-root,#toast { display:none !important; }
  #report-print-area { display:block; width:100%; border:0; box-shadow:none; overflow:visible; }
  .report-table-scroll { overflow:visible; }
  .report-top-scroll,.report-screen-only,.settlement-detail-toggle { display:none !important; }
  .report-print-only { display:block !important; }
  .report-table { min-width:0; width:100%; font-size:8px; }
  .report-table th,.report-table td { padding:5px 6px; }
  .report-table td { max-width:none; }
  .report-table tr { break-inside:avoid; }
  .settlement-detail-row[hidden] { display:table-row !important; }
  .settlement-history-table { min-width:0; }
  .settlement-detail-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .operation-output .report-output-head { padding:0 0 8mm; }
  .operation-output .report-filter-summary { margin:0 0 6mm; }
  .operation-output .report-totals { padding:0 0 6mm; }
  .report-output-head { padding:0 0 8mm; }
  .report-totals { padding:0 0 6mm; }
  .report-filter-summary { margin:0 0 6mm; }
}
.sort-heading { border: 0; background: transparent; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.sort-heading:hover, .sort-heading:focus-visible { color: var(--forest); }
.sort-heading span { font-size: 13px; color: var(--gold); }
.mfa-qr { display: flex; justify-content: center; margin: 18px 0; }
.mfa-qr img { width: min(240px, 100%); height: auto; border: 10px solid white; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 12px 30px rgba(39,25,38,.1); }
.login-center h2 { font-family: Georgia,serif; font-weight: 400; }
.login-form .hint { font-size: 11px; }
.sidebar { overflow-y: auto; }
.sidebar-spacer { min-height: 18px; }
.nav-primary { margin-bottom: 12px; }
.nav-group { margin: 5px 0; }
.nav-group-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 15px 7px;
  color: #e7cbd5; background: transparent; border: 0; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-align: left; cursor: pointer; }
.nav-group-toggle span { font-size: 17px; font-weight: 400; letter-spacing: 0; }
.nav-children { margin: 3px 0 10px 8px; padding-left: 9px; border-left: 1px solid rgba(255,255,255,.16); }
.nav-subgroup { margin: 3px 0 7px; }
.nav .nav-subgroup-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border: 0; border-radius: 8px; color: #f2dce7; background: transparent;
  font-size: 12px; font-weight: 750; text-align: left; cursor: pointer; }
.nav .nav-subgroup-toggle:hover { background: rgba(255,255,255,.1); }
.nav-subgroup-toggle span { font-size: 16px; font-weight: 400; }
.nav-subchildren { margin: 2px 0 7px 9px; padding-left: 7px; border-left: 1px solid rgba(255,255,255,.16); }
.nav-subchildren button { height: auto; min-height: 38px; padding: 8px 10px; font-size: 12px; }
[hidden] { display: none !important; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.party-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.simple-form .party-tabs button { align-self: auto; border: 0; padding: 9px 13px; border-radius: 8px; background: transparent;
  color: var(--ink-soft); font-size: 12px; font-weight: 700; cursor: pointer; }
.simple-form .party-tabs button[aria-selected="true"] { color: var(--forest); background: var(--forest-light); }
.party-pane { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: end; }
.party-pane > .wide { grid-column: 1/-1; }
.lookup-control { display: flex; align-items: end; gap: 8px; }
.lookup-control label { flex: 1; min-width: 0; }
.lookup-control button { flex: none; min-height: 39px; }
.party-roles { display: flex; gap: 18px; }
.party-roles label { display: flex; flex-direction: row; align-items: center; gap: 7px; }
.simple-form .party-roles input { width: 17px; min-height: 17px; height: 17px; padding: 0; accent-color: var(--forest); }
.party-preferences { grid-column: 1/-1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; padding: 15px;
  border: 1px solid var(--line); border-radius: 10px; background: #fcfafb; }
.party-preferences h3 { grid-column: 1/-1; margin: 0; font-size: 13px; color: var(--ink); }
.modal-card:has(#party-form),.modal-card:has(#cash-form) { width:min(100%,980px); max-height:min(92vh,850px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.modal-card:has(#cash-form) { width:min(100%,920px); }
.modal-card:has(#party-form) > h2,.modal-card:has(#cash-form) > h2 { margin:0; padding:21px 56px 13px 27px; flex:none; }
.party-form,.cash-account-form { display:flex; flex-direction:column; min-height:0; flex:1; gap:0; }
.party-form .party-tabs,.cash-account-form .party-tabs { flex:none; padding:0 27px 11px; overflow-x:auto; white-space:nowrap; }
.party-form .party-form-body,.cash-account-form .party-form-body { flex:1; min-height:0; overflow:auto; padding:18px 27px 24px; }
.party-form .party-pane,.cash-account-form .party-pane { align-content:start; }
.party-form .party-form-footer,.cash-account-form .party-form-footer { flex:none; display:flex; justify-content:flex-end; border-top:1px solid var(--line); padding:13px 27px; background:#fff; }
.simple-form .party-form-footer button { align-self:auto; }
.cash-pane { grid-template-columns:repeat(12,minmax(0,1fr)); gap:17px 12px; align-items:end; }
.cash-pane > * { min-width:0; }
.cash-pane .cash-span-2 { grid-column:span 2; }
.cash-pane .cash-span-3 { grid-column:span 3; }
.cash-pane .cash-span-4 { grid-column:span 4; }
.cash-pane .cash-span-5 { grid-column:span 5; }
.cash-pane .cash-span-6 { grid-column:span 6; }
.cash-pane .cash-span-7 { grid-column:span 7; }
.cash-pane .cash-span-9 { grid-column:span 9; }
.cash-pane .cash-compact { max-width:220px; }
.cash-pane .cash-short { max-width:145px; }
.cash-number-pair { display:grid; grid-template-columns:minmax(0,1fr) 55px; gap:8px; align-items:end; }
.cash-agency { max-width:265px; }
.cash-account-number { max-width:320px; }
.cash-identity-lookup { max-width:360px; }
.cash-identity-lookup label { max-width:220px; }
.cash-pane .hint { margin:0; }
.legacy-address { padding:13px 15px; background:#faf6f1; border:1px solid #eadcca; border-radius:9px; }
.legacy-address strong { display:block; font-size:12px; margin-bottom:5px; }
.legacy-address p { margin:0; overflow-wrap:anywhere; }
.preference-warning { margin: 0; padding: 9px 11px; border: 1px solid #dfb9a8; border-radius: 8px; color: #9b4d40 !important; background: #fff5ef; }
.party-select { display: flex; align-items: end; gap: 8px; }
.party-select label { flex: 1; min-width: 0; }
.party-select button { flex: none; min-height: 39px; }
.simple-form .currency-input { text-align: right; font-variant-numeric: tabular-nums; }
.catalog-unit-availability { border: 1px solid #dfe6df; border-radius: 10px; padding: 10px 14px 12px; }
.catalog-unit-availability legend { color: var(--ink-soft); font-size: 12px; font-weight: 700; padding: 0 5px; }
.catalog-unit-availability .checkbox-line { display: inline-flex; align-items: center; gap: 6px; margin: 4px 18px 4px 0; font-size: 13px; }
.catalog-unit-availability input { width: auto; min-height: auto; padding: 0; border: 0; }
.quick-entry-source { margin: 8px 0 16px; padding: 10px 12px; border: 1px solid #e9dac6; border-radius: 9px; background: #fff9f0; color: var(--ink-soft); }
.finance-entry-grid select:disabled { opacity: 1; background: #f8f5f6; color: var(--ink); }
.finance-entry-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: 7px 10px; }
.finance-entry-grid label { gap: 5px; }
.finance-entry-grid > label,.finance-entry-grid > .party-select { min-width: 0; }
.required-star { color: var(--red); font-weight: 900; }
.finance-entry-grid[data-attempted="true"] input:invalid,
.finance-entry-grid[data-attempted="true"] select:invalid,
.finance-entry-grid[data-attempted="true"] textarea:invalid { border-color: var(--red); }
.finance-entry-grid > .entry-third { grid-column: span 4; }
.finance-entry-grid > .entry-half { grid-column: span 6; }
.finance-entry-grid > .entry-quarter { grid-column: span 3; }
.finance-entry-grid > .entry-history { grid-column: span 9; }
.finance-entry-grid > .wide { grid-column: 1/-1; }
.entry-note { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.entry-note-head { display: flex; align-items: center; justify-content: space-between; }
.entry-note-head label { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.simple-form .note-toggle { align-self: auto; padding: 0; border: 0; background: transparent; color: var(--forest); font-size: 12px; font-weight: 700; cursor: pointer; }
.simple-form .note-toggle:hover,.simple-form .note-toggle:focus-visible { text-decoration: underline; }
.finance-entry-grid .entry-note textarea { height: 39px; min-height: 39px; resize: none; }
.finance-entry-grid .entry-note.expanded textarea { height: 100px; min-height: 100px; resize: vertical; }
.finance-entry-grid .party-select button { white-space: nowrap; }
.switch-field { justify-content: end; }
.switch-line { display: flex; align-items: center; gap: 10px; min-height: 39px; }
.simple-form .switch-line input { position: absolute; opacity: 0; width: 1px; min-height: 1px; }
.toggle-track { position: relative; width: 43px; height: 24px; border-radius: 20px; background: #b9afb5; transition: background .2s; }
.toggle-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: white; transition: transform .2s; }
.switch-line input:checked + .toggle-track { background: var(--green); }
.switch-line input:checked + .toggle-track::after { transform: translateX(19px); }
.switch-line input:focus-visible + .toggle-track { outline: 3px solid #d7b57e; outline-offset: 3px; }
.installments-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 10px; margin-top: 7px; }
.installment-item { min-width: 0; margin: 0; padding: 5px 10px 9px; border: 1px solid var(--line); border-radius: 9px; }
.installment-item legend { padding: 0 5px; color: var(--ink); font-size: 12px; font-weight: 800; }
.installment-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.installment-fields label { min-width: 0; }
.installment-fields input { min-width: 0; }
#installment-warning { color: var(--red); }
.installment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 10px 0; }
.installment-grid label { display: flex; flex-direction: column; gap: 6px; color: var(--ink-soft); font-size: 12px; }
.installment-grid input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.installment-list,.settlement-list { display: grid; gap: 8px; margin: 14px 0 23px; }
.installment-card,.settlement-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fcfafb; font-size: 12px; }
.installment-card strong,.settlement-row strong { color: var(--ink); }
.installment-card span,.settlement-row small { color: var(--ink-soft); }
.settlement-row.muted { opacity: .55; }
.installment-card button,.settlement-row button { margin-left: auto; }
.settlement-settings-panel { max-width: 1050px; }
.settlement-settings-panel > p { margin: 0 0 20px; font-size: 12px; }
.settlement-settings-group + .settlement-settings-group { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.settlement-settings-group h2 { margin: 0 0 3px; color: var(--ink); }
.settlement-settings-group p { margin: 0 0 15px; }
.settlement-settings-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 18px; }
.settlement-settings-list label { display: flex; flex-direction: column; gap: 6px; min-width: 0; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.settlement-settings-list select { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 12px; }
.settlement-calculation { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 18px; padding: 13px 15px; border-radius: 9px; background: var(--forest-light); color: var(--ink); font-size: 12px; }
.settlement-calculation strong { margin-left: 6px; font-size: 14px; }
.settlement-calculation.invalid { color: var(--red); background: var(--rose-light); }
.legacy-note { margin: 12px 3px 0; color: var(--ink-soft); font-size: 12px; }
.modal-card:has(.installment-list) { width: min(100%, 760px); }
.modal-card:has(#finance-entry-form) { width: min(100%, 1100px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.modal-card:has(#purchase-form) { width:min(100%,1380px); max-height:min(94dvh,950px); padding:0; overflow:hidden; }
body:has(#purchase-form) { overflow-x:hidden; }
.purchase-editor { display:flex; flex-direction:column; max-height:min(94dvh,950px); }
.purchase-editor-heading { flex:none; padding:14px 58px 12px 26px; border-bottom:1px solid var(--line); }
.purchase-editor-heading .eyebrow { margin:0 0 4px; }
.purchase-editor-heading h2 { margin:0; }
.purchase-editor-heading p:last-child { margin:2px 0 0; }
#purchase-form { display:flex; flex-direction:column; min-height:0; }
.purchase-editor-body { flex:1; min-height:0; overflow:auto; padding:15px 26px 18px; }
.purchase-section + .purchase-section { margin-top:15px; padding-top:14px; border-top:1px solid var(--line); }
.purchase-section h3 { margin:0 0 10px; font-size:16px; color:var(--ink); }
.purchase-section-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.purchase-section-heading h3 { margin:0; }
#purchase-form label { display:flex; flex-direction:column; gap:4px; min-width:0; color:var(--ink-soft); font-size:12px; font-weight:700; }
#purchase-form input,#purchase-form select { width:100%; min-width:0; min-height:39px; padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font-size:13px; }
.purchase-header-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); max-width:1200px; gap:10px 14px; }
.purchase-field-unit { grid-column:span 3; }.purchase-field-supplier { grid-column:span 5; }
.purchase-field-note { grid-column:span 2; }.purchase-field-series { grid-column:span 1; }
.purchase-field-date { grid-column:span 2; }.purchase-field-term { grid-column:span 2; }
.purchase-field-method { grid-column:span 2; }.purchase-field-cash { grid-column:span 3; }
.purchase-field-location { grid-column:span 3; }.purchase-field-history { grid-column:span 6; }
.purchase-lines-scroll { --purchase-line-columns:minmax(280px,2.4fr) 88px 60px 100px 100px minmax(190px,1.6fr) minmax(165px,1.4fr) 24px; overflow-x:auto; padding-bottom:3px; margin-bottom:8px; }
.purchase-lines-head,#purchase-lines .purchase-line { display:grid; grid-template-columns:var(--purchase-line-columns); gap:8px; min-width:1100px; }
.purchase-lines-head { padding:0 9px 5px; color:var(--ink-soft); font-size:11px; font-weight:700; }
#purchase-lines { display:grid; gap:6px; min-width:1100px; }
#purchase-lines .purchase-line { align-items:center; border:1px solid var(--line); border-radius:9px; padding:6px 8px; background:#fafbf9; }
#purchase-lines .purchase-line label { gap:0; }
.purchase-line-label { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#purchase-lines .purchase-line input,#purchase-lines .purchase-line select { min-height:36px; padding:6px 9px; }
.purchase-remove { align-self:center; min-height:34px; font-size:20px; }
#purchase-quick-item { margin:0 0 12px; padding:12px; border:1px solid var(--line); border-radius:9px; display:grid; grid-template-columns:130px minmax(180px,1fr) 100px auto; gap:10px; align-items:end; }
#purchase-quick-item[hidden] { display:none; }
#purchase-installments { display:grid; gap:8px; font-size:13px; }
.purchase-footer { flex:none; display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:11px 26px; border-top:1px solid var(--line); background:#fff; box-shadow:0 -9px 24px rgba(18,38,28,.04); }
.purchase-footer-total { margin-right:auto; min-width:155px; font-weight:800; font-size:17px; color:var(--forest); white-space:nowrap; }
.purchase-approval { width:min(100%,310px); }
.purchase-approval[hidden] { display:none !important; }
.purchase-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; flex-wrap:wrap; }
.purchase-actions .btn { min-height:38px; padding:8px 14px; }
@media(max-width:950px){
  .purchase-header-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .purchase-field-unit,.purchase-field-note,.purchase-field-date,.purchase-field-term,.purchase-field-method { grid-column:span 2; }
  .purchase-field-supplier { grid-column:span 4; }
  .purchase-field-cash,.purchase-field-location { grid-column:span 3; }
  .purchase-field-history { grid-column:span 6; }
  .purchase-field-series { grid-column:span 1; }
}
@media(max-width:650px){
  .purchase-editor-heading { padding:14px 54px 11px 18px; }
  .purchase-editor-body { padding:13px 18px 16px; }
  .purchase-header-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .purchase-header-grid > label { grid-column:span 2; }
  .purchase-header-grid > .purchase-field-note,.purchase-header-grid > .purchase-field-series,.purchase-header-grid > .purchase-field-date { grid-column:span 1; }
  .purchase-footer { padding:10px 18px; }
  .purchase-actions { width:100%; }
  .purchase-actions .btn { flex:1; justify-content:center; }
  #purchase-quick-item { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #purchase-quick-item > :nth-child(2) { grid-column:span 2; }
}
.warehouse-item-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.warehouse-item-tabs button { border: 0; background: transparent; padding: 9px 13px; border-radius: 8px; color: var(--ink-soft); cursor: pointer; }
.warehouse-item-tabs button[aria-selected="true"] { color: var(--forest); background: var(--forest-light); font-weight: 700; }
#warehouse-item-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 15px; min-width: 0; }
.modal-card:has(#warehouse-item-form) { width: min(100%, 850px); }
.modal-card:has(#warehouse-group-form) { width: min(100%, 700px); }
.price-tables-panel { overflow:hidden; }
.price-table-filters { display:flex; align-items:end; gap:14px; flex-wrap:wrap; padding:20px 24px; }
.price-table-filters label { min-width:210px; display:grid; gap:7px; font-weight:700; }
.price-table-filters span { margin-left:auto; color:var(--ink-soft); }
.price-table-modal [data-company-scope][hidden] { display:none; }
.price-table-status { display:inline-block; border-radius:99px; padding:6px 11px; background:var(--forest-light); color:var(--forest); font-weight:700; }
.modal-card:has(.price-table-modal) { width:min(100%,1150px); max-height:min(92vh,900px); overflow:hidden; padding:0; }
.price-table-modal { display:flex; flex-direction:column; max-height:min(92vh,900px); }
.price-table-modal header { padding:25px 32px 16px; border-bottom:1px solid var(--line); }
.price-table-modal header h2 { font-size:30px; margin:0 45px 4px 0; }
.price-table-modal header p { margin:0; }
.price-table-modal > form { padding:22px 32px 28px; overflow:auto; }
.price-table-editor > form { display:flex; flex-direction:column; min-height:0; padding:0; overflow:hidden; }
.price-table-head-fields,.price-table-item-filters { display:flex; gap:14px; flex-wrap:wrap; padding:16px 32px; border-bottom:1px solid var(--line); }
.price-table-head-fields label,.price-table-item-filters label { display:grid; gap:6px; flex:1 1 190px; font-weight:700; }
.price-table-head-fields label:first-child { flex:2 1 280px; }
.price-table-items-scroll { overflow:auto; min-height:160px; flex:1; padding:0 20px; }
.price-table-items-scroll table { width:100%; border-collapse:collapse; }
.price-table-items-scroll th,.price-table-items-scroll td { text-align:left; padding:11px 10px; border-bottom:1px solid var(--line); }
.price-table-items-scroll th { position:sticky; top:0; background:#faf8fa; z-index:1; }
.price-table-items-scroll td small { display:block; color:var(--ink-soft); }
.price-table-items-scroll td input { width:130px; }
.price-table-items-scroll tr[hidden] { display:none; }
.price-table-footer { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 32px; border-top:1px solid var(--line); background:white; }
@media(max-width:700px){.price-table-filters,.price-table-head-fields,.price-table-item-filters { padding:14px; }
  .price-table-modal header { padding:20px 18px 15px; }.price-table-footer { padding:14px; flex-wrap:wrap; }
  .price-table-items-scroll { padding:0 10px; }}
.merchandise-modal > header { padding: 0 42px 17px 0; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.merchandise-modal > header h2 { margin: 0; }
.merchandise-modal > header .eyebrow { margin: 0 0 7px; }
.merchandise-modal .simple-form { align-items: start; }
.merchandise-modal .simple-form fieldset .simple-form { gap: 14px 18px; }
.merchandise-form-actions { display: flex; justify-content: flex-end; padding: 14px 0 0; border-top: 1px solid var(--line); }
.merchandise-list td small { display: block; margin-top: 4px; color: var(--ink-soft); }
.merchandise-list .panel-pad { padding-bottom: 10px; }
@media (max-width: 650px) {
  .merchandise-modal .simple-form { grid-template-columns: 1fr; }
}
.modal-card:has(#finance-entry-form) > h2 { flex: none; margin: 0; padding: 20px 58px 10px 27px; }
#finance-entry-form { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; align-content: start; padding: 0 27px 12px; }
.finance-entry-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 15px;
  padding: 10px 27px 12px; border-top: 1px solid var(--line); background: white; box-shadow: 0 -7px 24px rgba(74,45,66,.07); }
.finance-entry-total { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-soft); }
.finance-entry-total strong { font-size: 15px; color: var(--ink); }
.finance-entry-footer .btn { flex: none; }
@media (max-width: 1100px) {
  .installments-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1000px) {
  .finance-entry-grid > .entry-third { grid-column: span 4; }
  .finance-entry-grid > .entry-half { grid-column: span 6; }
  .finance-entry-grid > .entry-quarter { grid-column: span 6; }
  .finance-entry-grid > .entry-history { grid-column: span 6; }
}
@media (max-width: 800px) {
  .installments-grid { grid-template-columns: 1fr; }
  .cash-pane { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .cash-pane .cash-span-2 { grid-column:span 2; }
  .cash-pane .cash-span-3 { grid-column:span 3; }
  .cash-pane .cash-span-4,.cash-pane .cash-span-5,.cash-pane .cash-span-6,
  .cash-pane .cash-span-7,.cash-pane .cash-span-9 { grid-column:span 6; }
}
@media (max-width: 420px) {
  .installment-fields { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .settlement-settings-list { grid-template-columns: 1fr; }
  .annual-table th:first-child, .annual-table td:first-child { width: 185px; max-width: 185px; }
  .annual-table .account-label { display: block; white-space: normal; overflow-wrap: anywhere; }
  .simple-form { grid-template-columns: 1fr; }
  .finance-entry-grid > .entry-third,.finance-entry-grid > .entry-half,
  .finance-entry-grid > .entry-quarter,.finance-entry-grid > .entry-history { grid-column: 1/-1; }
  .party-pane,.party-preferences { grid-template-columns: 1fr; }
  .cash-pane { grid-template-columns:minmax(0,1fr); }
  .cash-pane > [class*="cash-span-"] { grid-column:1/-1; }
  .cash-pane .cash-compact,.cash-pane .cash-short,.cash-agency,.cash-account-number,
  .cash-identity-lookup { max-width:none; }
  .cash-identity-lookup label { max-width:none; }
  .lookup-control,.party-select { flex-wrap: wrap; }
  .installment-grid { grid-template-columns: 1fr; }
  .topbar { padding: 12px 18px; flex-wrap: wrap; gap: 8px; }
  .breadcrumb { white-space: normal; }
  .topbar-right { min-width: 0; max-width: 100%; }
  .topbar .select-wrap select { max-width: 170px; }
  .modal-card { border-radius: 16px 16px 0 0; max-height: 94vh; }
  .modal-card:has(#finance-entry-form) { max-height: 94vh; }
  .modal-card:has(#finance-entry-form) > h2 { padding: 20px 52px 11px 18px; }
  .modal-card:has(#party-form),.modal-card:has(#cash-form) { max-height:94vh; }
  .modal-card:has(#party-form) > h2,.modal-card:has(#cash-form) > h2 { padding:18px 52px 10px 18px; }
  .party-form .party-tabs,.cash-account-form .party-tabs { padding:0 18px 9px; }
  .party-form .party-form-body,.cash-account-form .party-form-body { padding:15px 18px 18px; }
  .party-form .party-form-footer,.cash-account-form .party-form-footer { padding:11px 18px; }
  #finance-entry-form { padding: 0 18px 16px; }
  .finance-entry-footer { padding: 11px 18px 16px; }
  .monthly-chart { gap: 3px; }
  .monthly-col small { font-size: 8px; }
}

/* Parcelas: filtros na tabela e leitura sem rolagem horizontal. */
.title-list-meta { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 2px 12px; color:var(--ink-soft); font-size:12px; }
.title-mobile-filters { display:none; }
.text-button { border:0; background:transparent; color:var(--forest); font:inherit; font-weight:700; cursor:pointer; }
.text-button:hover,.text-button:focus-visible { text-decoration:underline; }
.title-table-wrap { overflow:visible; }
.title-table { table-layout:fixed; }
.title-col-check { width:3%; }.title-col-date { width:9%; }.title-col-entry { width:22%; }
.title-col-party { width:12%; }.title-col-cash { width:12%; }.title-col-method { width:10%; }
.title-col-amount,.title-col-balance { width:9%; }.title-col-status { width:8%; }.title-col-action { width:6%; }
.title-table.all-companies .title-col-check { width:3%; }
.title-table.all-companies .title-col-date { width:8%; }
.title-table.all-companies .title-col-entry { width:17%; }
.title-table.all-companies .title-col-company { width:10%; }
.title-table.all-companies .title-col-party,.title-table.all-companies .title-col-cash { width:11%; }
.title-table.all-companies .title-col-method { width:9%; }
.title-table.all-companies .title-col-amount,.title-table.all-companies .title-col-balance,
.title-table.all-companies .title-col-status { width:8%; }
.title-table.all-companies .title-col-action { width:7%; }
.title-table th,.title-table td { padding:12px 6px; min-width:0; overflow-wrap:anywhere; }
.title-table th:first-child,.title-table td:first-child { padding-left:13px; }
.title-table th:last-child,.title-table td:last-child { padding-right:13px; }
.title-table th { white-space:normal; line-height:1.25; }
.title-table td { line-height:1.35; }
.title-table td small { display:block; margin-top:3px; color:var(--ink-soft); font-size:10px; }
.title-table input[type=checkbox] { width:16px; height:16px; accent-color:var(--forest); cursor:pointer; }
.title-date,.title-money { white-space:nowrap; font-variant-numeric:tabular-nums; }
.title-money { font-weight:700; color:var(--ink); }
.title-entry-link,.title-action { border:0; background:transparent; color:var(--ink); font:inherit; font-weight:700; text-align:left; cursor:pointer; }
.title-entry-link { display:block; padding:0; width:100%; overflow-wrap:anywhere; }
.title-entry-link:hover,.title-action:hover { color:var(--forest); text-decoration:underline; }
.title-action { padding:3px; color:var(--forest); }
.title-table .status { font-size:9px; padding:4px 6px; white-space:normal; }
.column-filter { display:inline-block; vertical-align:middle; margin-left:3px; position:relative; }
.column-filter summary { list-style:none; display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:5px;
  color:var(--forest); background:#f0e9ed; font-size:12px; cursor:pointer; }
.column-filter summary::-webkit-details-marker { display:none; }
.column-filter[open] summary { background:var(--forest); color:white; }
.column-filter-menu { position:absolute; top:22px; right:0; z-index:20; width:210px; padding:12px; border:1px solid var(--line); border-radius:9px;
  background:white; box-shadow:0 12px 30px rgba(39,25,38,.16); text-align:left; text-transform:none; letter-spacing:normal; white-space:normal; }
.column-filter-menu strong { display:block; margin-bottom:7px; color:var(--ink); font-size:11px; }
.column-filter-menu label { display:block; color:var(--ink-soft); font-size:11px; margin-top:7px; }
.column-filter-menu input,.column-filter-menu select { width:100%; margin-top:4px; min-height:35px; padding:5px; border:1px solid var(--line); border-radius:6px;
  background:white; color:var(--ink); font-size:12px; }
.batch-selection-bar { position:sticky; bottom:12px; z-index:8; display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:14px 0; padding:11px 16px; border:1px solid #d5c1ce; border-radius:12px; background:#fff; box-shadow:0 9px 28px rgba(39,25,38,.12); font-size:12px; }
.batch-selection-bar .btn:disabled { opacity:.5; cursor:not-allowed; }
.btn-reverse { min-height:31px; padding:0 10px; color:#a94b52; border-color:#d9aeb2; background:#fff6f6; font-size:11px; }
.btn-reverse:hover { background:#fae8e9; border-color:#b95660; }
.modal-card:has(#settlement-form),.modal-card:has(#batch-settlement-form) { display:flex; flex-direction:column; padding:0; overflow:hidden; }
.modal-card:has(#settlement-form) { width:min(100%,720px); }
.modal-card:has(#batch-settlement-form) { width:min(100%,1050px); }
.modal-card:has(#settlement-form) > h2,.modal-card:has(#batch-settlement-form) > h2 { margin:0; padding:22px 55px 8px 25px; flex:none; }
.modal-card:has(#settlement-form) > p,.modal-card:has(#batch-settlement-form) > p { margin:0; padding:0 25px 14px; flex:none; }
#settlement-form,#batch-settlement-form { flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; align-content:start; padding:0 25px 18px; }
.settlement-footer { flex:none; display:flex; justify-content:space-between; align-items:center; gap:14px; padding:11px 25px 14px; border-top:1px solid var(--line);
  background:white; box-shadow:0 -7px 24px rgba(74,45,66,.07); color:var(--ink-soft); font-size:12px; }
.settlement-footer .btn { flex:none; }
.batch-rate-panel { min-width:0; border:1px solid var(--line); border-radius:10px; padding:11px; }
.batch-rate-head { display:flex; justify-content:space-between; gap:12px; align-items:center; margin-bottom:7px; font-size:12px; }
.batch-rate-scroll { overflow:auto; max-height:32vh; }
.batch-rate-table { min-width:790px; }
.batch-rate-table th,.batch-rate-table td { padding:8px; font-size:10px; }
.batch-rate-table td:first-child { min-width:170px; }
.batch-rate-table td:first-child small { display:block; margin-top:3px; color:var(--ink-soft); }
.batch-rate-table td input { width:82px; min-height:32px; text-align:right; padding:5px; }
.batch-rate-table .batch-row-net { white-space:nowrap; font-weight:700; }
@media (max-width: 1050px) {
  .title-mobile-filters { display:block; margin-bottom:12px; padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:white; }
  .title-mobile-filters summary { cursor:pointer; color:var(--forest); font-size:12px; font-weight:700; }
  .title-mobile-filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; padding-top:12px; }
  .title-mobile-filter-grid label { display:flex; flex-direction:column; gap:4px; color:var(--ink-soft); font-size:11px; }
  .title-mobile-filter-grid select,.title-mobile-filter-grid input { min-width:0; min-height:36px; border:1px solid var(--line); border-radius:7px; padding:6px; background:white; }
  .title-table thead { display:none; }
  .title-table,.title-table tbody,.title-table tr,.title-table td { display:block; width:100%; }
  .title-table colgroup { display:none; }
  .title-table tbody { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:12px; }
  .title-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px 12px; border:1px solid var(--line); border-radius:10px; padding:12px; }
  .title-table td,.title-table td:first-child,.title-table td:last-child { border:0; padding:2px; }
  .title-table td::before { content:attr(data-label); display:block; margin-bottom:2px; color:var(--ink-soft); font-size:9px; text-transform:uppercase; letter-spacing:.06em; }
  .title-table td:nth-child(3),.title-table td:nth-child(4) { grid-column:1/-1; }
  .title-table td:first-child::before { display:none; }
  .title-table td:first-child { grid-column:2; grid-row:1; justify-self:end; }
  .title-table td:nth-child(2) { grid-column:1; grid-row:1; }
}
@media (max-width: 700px) {
  .title-mobile-filter-grid { grid-template-columns:1fr; }
  .title-table tbody { grid-template-columns:1fr; }
  .settlement-footer { padding:10px 17px 14px; }
  .settlement-footer span { max-width:45%; }
  #settlement-form,#batch-settlement-form { padding:0 17px 15px; }
  .modal-card:has(#settlement-form) > h2,.modal-card:has(#batch-settlement-form) > h2 { padding-left:17px; }
  .modal-card:has(#settlement-form) > p,.modal-card:has(#batch-settlement-form) > p { padding-left:17px; padding-right:17px; }
}
@media (max-width: 900px) {
  .sidebar { overflow-y: auto; }
  .sidebar-close { display: block; position: absolute; right: 11px; top: 9px; background: transparent; border: 0; color: white; font-size: 24px; }
  .mobile-menu { font-size: 21px; line-height: 1; flex: none; }
}

/* Conciliação bancária */
.reconciliation-toolbar { display:flex; align-items:end; justify-content:space-between; gap:18px; margin-bottom:16px; padding:20px 22px; }
.reconciliation-filters,.reconciliation-upload { display:flex; align-items:end; flex-wrap:wrap; gap:12px; min-width:0; }
.reconciliation-filters label,.reconciliation-upload label { display:flex; flex-direction:column; gap:5px; color:var(--ink-soft); font-size:11px; font-weight:700; }
.reconciliation-filters select,.reconciliation-filters input,.reconciliation-upload input { min-height:40px; max-width:100%; border:1px solid var(--line); border-radius:8px; padding:7px 10px; background:white; color:var(--ink); }
.reconciliation-filters select { min-width:200px; }
.reconciliation-upload input { max-width:220px; }
.reconciliation-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:11px; }
.reconciliation-metrics .panel { display:flex; flex-direction:column; gap:8px; min-width:0; padding:18px; }
.reconciliation-metrics small,.reconciliation-metrics span { color:var(--ink-soft); font-size:11px; overflow-wrap:anywhere; }
.reconciliation-metrics strong { color:var(--ink); font-size:22px; font-variant-numeric:tabular-nums; }
.reconciliation-metrics .reconciliation-alert strong { color:var(--red); }
.reconciliation-help { margin:8px 2px 17px; color:var(--ink-soft); font-size:12px; line-height:1.5; }
.reconciliation-columns { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.18fr); gap:14px; align-items:start; }
.reconciliation-list,.reconciliation-detail { min-width:0; padding:20px 22px; }
.reconciliation-list { max-height:70vh; overflow-y:auto; }
.reconciliation-section-title { display:flex; justify-content:space-between; align-items:start; gap:12px; margin-bottom:12px; }
.reconciliation-section-title h2 { margin:0 0 4px; color:var(--ink); font-size:18px; }
.reconciliation-section-title small { color:var(--ink-soft); font-size:11px; }
.reconciliation-line-filters { margin-bottom:12px; }
.reconciliation-line-filters button { cursor:pointer; }
.reconciliation-line-filters button:focus-visible { outline:2px solid var(--forest); outline-offset:2px; }
.reconciliation-line { display:flex; justify-content:space-between; gap:12px; width:100%; padding:12px 9px; border:0; border-top:1px solid var(--line); background:transparent; text-align:left; cursor:pointer; }
.reconciliation-line:hover,.reconciliation-line.selected { background:var(--forest-light); }
.reconciliation-line > span { min-width:0; }
.reconciliation-line strong,.reconciliation-line small { display:block; overflow-wrap:anywhere; }
.reconciliation-line strong { color:var(--ink); font-size:12px; }
.reconciliation-line small { margin-top:4px; color:var(--ink-soft); font-size:11px; }
.reconciliation-line-end { flex:none; text-align:right; }
.reconciliation-line-end .positive { color:var(--forest); }
.reconciliation-line-end .negative { color:var(--red); }
.reconciliation-suggestions { display:flex; flex-wrap:wrap; align-items:center; gap:7px; margin:12px 0; font-size:11px; }
.reconciliation-suggestions button { padding:5px 8px; border:1px solid var(--line); border-radius:7px; }
.reconciliation-candidates { max-height:42vh; overflow-y:auto; border:1px solid var(--line); border-radius:9px; }
.reconciliation-candidate { display:flex; align-items:center; gap:9px; padding:10px; border-bottom:1px solid var(--line); cursor:pointer; }
.reconciliation-candidate:last-child { border-bottom:0; }
.reconciliation-candidate:hover { background:var(--forest-light); }
.reconciliation-candidate input { width:17px; height:17px; accent-color:var(--forest); flex:none; }
.reconciliation-candidate span { flex:1; min-width:0; }
.reconciliation-candidate strong,.reconciliation-candidate small { display:block; overflow-wrap:anywhere; }
.reconciliation-candidate strong { color:var(--ink); font-size:12px; }
.reconciliation-candidate small { color:var(--ink-soft); font-size:10px; margin-top:3px; }
.reconciliation-candidate b { color:var(--ink); font-size:12px; white-space:nowrap; }
.reconciliation-confirm { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.reconciliation-confirm span { color:var(--ink-soft); font-size:11px; }
.reconciliation-confirm span strong,.reconciliation-confirm span small { display:block; margin-top:4px; color:var(--ink); font-size:13px; }
.reconciliation-confirm .btn:disabled { opacity:.5; cursor:not-allowed; }
.reconciliation-create { margin-top:16px; }
.reconciliation-success { padding:12px; border-radius:8px; background:var(--forest-light); color:var(--forest); font-weight:700; font-size:12px; }
.reconciliation-linked > div { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.reconciliation-linked { margin-bottom:16px; }
.reconciliation-preview-metrics { display:flex; flex-wrap:wrap; gap:10px; margin:13px 0; }
.reconciliation-preview-metrics span { padding:9px 12px; border-radius:8px; background:var(--forest-light); color:var(--ink); font-size:12px; }
.reconciliation-warning { padding:9px 11px; border-radius:8px; background:var(--rose-light); color:var(--red); font-size:12px; }
.reconciliation-preview-list { max-height:38vh; overflow:auto; border:1px solid var(--line); border-radius:8px; }
.reconciliation-preview-list > div { display:flex; justify-content:space-between; gap:12px; padding:8px 10px; border-bottom:1px solid var(--line); font-size:11px; }
.reconciliation-preview-list small { display:block; color:var(--red); }
.reconciliation-import-form { display:flex; flex-direction:column; gap:11px; margin-top:15px; }
.reconciliation-import-form label { display:flex; align-items:start; gap:8px; color:var(--ink); font-size:12px; }
.reconciliation-import-form .btn { align-self:flex-end; }
.reconciliation-imports { margin-top:16px; padding:18px 22px; }
.reconciliation-import-toggle { display:block; width:100%; border:0; padding:0; background:none; color:var(--ink); text-align:left; cursor:pointer; font-size:14px; font-weight:700; }
.reconciliation-import-toggle small { margin-left:8px; color:var(--ink-soft); font-size:11px; font-weight:400; }
.reconciliation-import-filters { display:grid; grid-template-columns:minmax(170px,2fr) repeat(3,minmax(130px,1fr)); gap:12px; margin-top:18px; }
.reconciliation-import-filters label { display:flex; flex-direction:column; gap:5px; min-width:0; color:var(--ink-soft); font-size:11px; font-weight:700; }
.reconciliation-import-filters input,.reconciliation-import-filters select { width:100%; min-height:39px; border:1px solid var(--line); border-radius:8px; padding:6px 9px; background:white; color:var(--ink); }
.reconciliation-import-items { margin-top:12px; }
.reconciliation-import-item { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:13px 0; border-top:1px solid var(--line); }
.reconciliation-import-item.selected { background:var(--forest-light); }
.reconciliation-import-item > div:first-child { min-width:0; }
.reconciliation-import-open { flex:1; min-width:0; border:0; background:none; padding:5px 8px; text-align:left; cursor:pointer; }
.reconciliation-import-open:hover strong { text-decoration:underline; }
.reconciliation-import-item strong,.reconciliation-import-item small { display:block; overflow-wrap:anywhere; }
.reconciliation-import-item strong { color:var(--ink); font-size:12px; }
.reconciliation-import-item small { margin-top:4px; color:var(--ink-soft); font-size:11px; }
.reconciliation-import-actions { display:flex; flex-direction:column; align-items:flex-end; gap:7px; flex:none; }
.reconciliation-import-actions small { max-width:220px; text-align:right; }
.reconciliation-badge { display:inline-flex; align-items:center; border-radius:999px; padding:7px 10px; white-space:nowrap; font-size:11px; font-weight:700; }
.reconciliation-badge.pending { color:#8b6224; background:#fff3df; }
.reconciliation-badge.started { color:#326186; background:#e5f1f8; }
.reconciliation-badge.reconciled { color:var(--forest); background:var(--forest-light); }
.reconciliation-badge.canceled { color:var(--ink-soft); background:#f0eded; }
.reconciliation-selected-import { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; padding:15px 20px; }
.reconciliation-selected-import strong,.reconciliation-selected-import small { display:block; overflow-wrap:anywhere; }
.reconciliation-selected-import small { margin-top:5px; color:var(--ink-soft); }
.reconciliation-selected-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
.reconciliation-selected-actions .btn:disabled { opacity:.5; cursor:not-allowed; }
#transfer-received-date-wrap[hidden] { display:none; }
.user-step { margin:10px 0 0; padding-top:11px; border-top:1px solid var(--line); color:var(--ink); font-size:13px; font-weight:700; }
.user-company-list { display:grid; gap:8px; max-height:260px; overflow-y:auto; padding:3px 1px; }
.user-company-row { display:flex!important; flex-direction:row!important; align-items:center; justify-content:space-between; gap:14px; padding:10px 12px; border:1px solid var(--line); border-radius:9px; background:#fff; }
.user-company-row span { min-width:0; font-weight:700; }
.user-company-row select { width:min(250px,52%); flex:none; }
.user-access-preview { display:grid; gap:6px; padding:13px 15px; border-radius:10px; background:var(--forest-light); color:var(--ink); }
.user-access-preview small { color:var(--ink-soft); line-height:1.5; }
.user-effective { margin-top:18px; border-top:1px solid var(--line); padding-top:12px; }
.user-effective h3 { font-size:13px; margin:12px 0 7px; }
.user-effective details,.user-effective > p { border-bottom:1px solid var(--line); padding:8px 0; font-size:11px; }
.user-effective summary { cursor:pointer; font-weight:700; }
.user-effective details p { line-height:1.5; color:var(--ink-soft); }
.modal-card:has(.matrix-form) { width:min(100%,1180px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.modal-card:has(.matrix-form) > h2 { padding:20px 58px 3px 24px; margin:0; flex:none; }
.modal-card:has(.matrix-form) > p { padding:0 24px 10px; margin:0; flex:none; }
.matrix-form { min-height:0; display:flex; flex-direction:column; overflow:hidden; }
.matrix-form > p { padding:0 24px; margin:9px 0; }
.matrix-meta { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:8px 24px; }
.matrix-meta label { display:grid; gap:5px; color:var(--ink-soft); font-size:12px; font-weight:700; }
.matrix-meta input,.matrix-meta select { min-width:0; min-height:39px; border:1px solid var(--line); border-radius:8px; padding:8px; }
.access-matrix-scroll { overflow:auto; min-height:0; border-top:1px solid var(--line); }
.access-matrix { width:100%; min-width:870px; border-collapse:separate; border-spacing:0; font-size:12px; }
.access-matrix th,.access-matrix td { padding:8px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.access-matrix thead th { position:sticky; top:0; z-index:2; background:#f9f7f8; white-space:nowrap; }
.access-matrix tbody th { position:sticky; left:0; z-index:1; min-width:205px; max-width:270px; background:#fff; }
.access-matrix .matrix-group th,.access-matrix .matrix-group td { background:#f4eef3; font-weight:700; }
.access-matrix select { width:100%; min-width:90px; border:1px solid var(--line); border-radius:7px; padding:6px; background:#fff; color:var(--ink); }
.access-matrix .matrix-empty { color:var(--ink-soft); text-align:center; }
.matrix-indent { color:var(--ink-soft); margin-right:6px; }
.matrix-result { display:block; margin-top:3px; font-size:10px; white-space:nowrap; }
.matrix-result.allowed { color:#11805a; }.matrix-result.denied { color:#ad505d; }
.matrix-special { min-width:112px; position:relative; }.matrix-special summary { cursor:pointer; white-space:nowrap; }
.matrix-special > div { position:relative; display:grid; gap:8px; min-width:205px; padding:9px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 8px 20px #25182a1a; }
.matrix-special label { display:grid; gap:3px; font-size:11px; }
.matrix-review { flex:none; padding:10px 24px; max-height:130px; overflow:auto; background:#faf7f9; font-size:12px; }
.matrix-review ul { margin:7px 0 0; padding-left:20px; columns:2; }
.matrix-actions { flex:none; display:flex; justify-content:flex-end; gap:9px; padding:12px 24px; border-top:1px solid var(--line); background:#fff; }
@media(max-width:700px) { .matrix-meta { grid-template-columns:1fr; }.matrix-review ul { columns:1; } }
.transfer-recents { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 15px; color:var(--ink-soft); font-size:12px; }
.transfer-recents button { border:1px solid var(--line); border-radius:999px; padding:7px 10px; background:white; color:var(--ink); cursor:pointer; font-size:11px; }
.transfer-recents button:hover { border-color:var(--forest); }
.transfer-toolbar { display:flex; justify-content:flex-end; margin-bottom:14px; }
.transfer-toolbar label { display:flex; align-items:center; gap:8px; color:var(--ink-soft); font-size:12px; }
.transfer-toolbar select { min-height:39px; border:1px solid var(--line); border-radius:8px; padding:6px 10px; background:white; color:var(--ink); }
.transfer-list { display:grid; gap:11px; }
.transfer-item { display:flex; justify-content:space-between; align-items:start; gap:18px; padding:18px 21px; }
.transfer-main { min-width:0; }
.transfer-main strong,.transfer-main small { display:block; overflow-wrap:anywhere; }
.transfer-main strong { color:var(--ink); font-size:14px; }
.transfer-main strong span { color:var(--forest); padding:0 5px; }
.transfer-main small { margin-top:7px; color:var(--ink-soft); font-size:11px; }
.transfer-end { display:flex; flex-direction:column; align-items:flex-end; gap:8px; flex:none; }
.transfer-end > strong { color:var(--ink); font-size:19px; white-space:nowrap; }
.transfer-end > small { color:var(--ink-soft); font-size:11px; text-align:right; }
.transfer-actions { display:flex; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.pdv-panel { display:grid; gap:18px; }
.pdv-cash-panel { gap:0; overflow:hidden; }
.pdv-cash-overview { padding:21px 24px 17px; }
.pdv-cash-overview .pdv-list-summary { margin:15px 0 0; }
.pdv-toolbar,.pdv-form { display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.pdv-toolbar label,.pdv-form label { display:grid; gap:5px; min-width:150px; flex:1 1 170px; font-size:12px; font-weight:700; }
.pdv-toolbar select,.pdv-form select,.pdv-form input { width:100%; min-height:42px; padding:9px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.pdv-cash-controls { display:grid; grid-template-columns:minmax(160px,1.4fr) repeat(2,minmax(125px,1fr)) minmax(130px,1fr) minmax(155px,1.3fr) minmax(135px,1fr) auto; gap:12px; align-items:end; }
.pdv-cash-controls > label,#pdv-cash-open-form label,.pdv-cash-associated { display:grid; gap:5px; min-width:0; font-size:12px; font-weight:700; }
#pdv-cash-open-form label { flex:none; }
.pdv-cash-controls select,.pdv-cash-controls input { width:100%; min-width:0; min-height:42px; padding:9px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.pdv-cash-controls .currency-input,.pdv-cash-close-form .currency-input { text-align:right; font-variant-numeric:tabular-nums; }
.pdv-cash-controls #pdv-cash-open-form { display:contents; }
.pdv-cash-controls .btn { min-height:42px; white-space:nowrap; }
.pdv-cash-associated strong { min-height:42px; padding:11px 9px; border:1px solid var(--line); border-radius:8px; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pdv-cash-open-warning { margin:15px 0 0; color:#ad3d38; font-weight:800; font-size:13px; }
.pdv-cash-pagination { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:7px; padding:14px 24px 17px; border-top:1px solid var(--line); }
.pdv-cash-pagination .btn { min-width:36px; padding:8px 10px; }
.pdv-cash-pagination span:last-child { margin-left:8px; color:var(--ink-soft); font-size:12px; }
.modal-card:has(.pdv-cash-detail) { width:min(100%,980px); max-height:min(92dvh,900px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.pdv-cash-detail { display:flex; flex-direction:column; min-height:0; max-height:inherit; }
.pdv-cash-detail-head { flex:none; padding:22px 28px 15px; border-bottom:1px solid var(--line); }
.pdv-cash-detail-head h2 { margin:0 42px 5px 0; }
.pdv-cash-detail-head > p { margin:0 0 13px; }
.pdv-cash-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.pdv-cash-metrics span { min-width:0; border:1px solid var(--line); border-radius:9px; padding:8px 11px; color:var(--ink-soft); font-size:11px; }
.pdv-cash-metrics strong { display:block; margin-top:2px; color:var(--ink); font-size:16px; }
.pdv-cash-detail-scroll { flex:0 1 auto; min-height:0; overflow:auto; padding:16px 28px; }
.pdv-cash-movement { padding-bottom:15px; border-bottom:1px solid var(--line); }
.pdv-cash-movement h3,.pdv-cash-history h3 { margin:0 0 9px; color:var(--ink); font-size:16px; }
.pdv-cash-movement #pdv-cash-movement-form { display:grid; grid-template-columns:1.1fr 1fr 1.7fr auto; align-items:end; gap:10px; margin:0; }
.pdv-cash-movement #pdv-cash-movement-form label { min-width:0; flex:none; }
.pdv-cash-movement #pdv-cash-movement-form input,.pdv-cash-movement #pdv-cash-movement-form select { min-height:38px; height:38px; }
.pdv-cash-movement #pdv-cash-movement-form .btn { min-height:38px; }
.pdv-cash-history { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:15px; }
.pdv-cash-history section { min-width:0; border:1px solid var(--line); border-radius:10px; padding:13px 15px; }
.pdv-cash-history .pdv-items { margin:0; gap:6px; }
.pdv-cash-history .pdv-items p { margin:0; }
.pdv-cash-detail-footer { flex:none; display:flex; flex-direction:column; gap:9px; padding:12px 28px 14px; border-top:1px solid var(--line); background:#fff; max-height:min(40dvh,320px); }
.pdv-cash-close-form { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; min-height:0; overflow:auto; }
.pdv-cash-close-form > label { display:grid; gap:5px; min-width:0; font-size:12px; font-weight:700; }
.pdv-cash-close-form input:not([type="checkbox"]) { width:100%; min-height:38px; height:38px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; }
.pdv-cash-close-form .wide { grid-column:1/-1; }
.pdv-cash-close-form .wide .hint { margin:0 0 4px; }
.pdv-cash-close-form .wide label { display:flex; align-items:center; gap:8px; font-size:12px; }
.pdv-cash-difference { grid-column:1/-1; margin:0; font-weight:800; }
.pdv-cash-footer-actions { flex:none; display:flex; justify-content:flex-end; gap:10px; }
@media(max-width:1350px){.pdv-cash-controls { grid-template-columns:repeat(4,minmax(0,1fr)); }.pdv-cash-controls .btn { width:100%; }}
@media(max-width:760px){.pdv-cash-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-cash-overview { padding:17px; }.pdv-cash-detail-head { padding:18px; }.pdv-cash-detail-scroll { padding:15px 18px; }.pdv-cash-detail-footer { padding:11px 18px; }.pdv-cash-history { grid-template-columns:1fr; }.pdv-cash-movement #pdv-cash-movement-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-cash-movement #pdv-cash-movement-form .btn { width:100%; }}
@media(max-width:480px){.pdv-cash-controls,.pdv-cash-close-form { grid-template-columns:1fr; }.pdv-cash-close-form .wide,.pdv-cash-difference { grid-column:1; }.pdv-cash-footer-actions { justify-content:stretch; }.pdv-cash-footer-actions .btn { flex:1; }.pdv-cash-detail-head { padding:15px; }.pdv-cash-detail-scroll { padding:13px 15px; }.pdv-cash-detail-footer { padding:10px 15px; }}
.pdv-current-price { padding:10px 0; font-size:12px; }
.pdv-current-price strong { display:block; font-size:16px; }
.pdv-items { display:grid; gap:8px; margin:16px 0; }
.pdv-item { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:9px; padding:8px 0; border-bottom:1px solid var(--line); }
.pdv-print-actions { border-top:1px solid var(--line); margin-top:15px; padding-top:12px; }
.pdv-print-actions p { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.pdv-checkout-panel { overflow:hidden; }
.pdv-checkout-open { padding:22px 24px 24px; }
.pdv-checkout-controls { display:grid; grid-template-columns:minmax(190px,1.3fr) minmax(190px,1.3fr) auto; gap:12px; align-items:end; max-width:880px; }
.pdv-checkout-controls label,.pdv-checkout-add label,.pdv-checkout-payment label { display:grid; gap:5px; min-width:0; color:var(--ink-soft); font-size:12px; font-weight:700; }
.pdv-checkout-controls select,.pdv-checkout-add select,.pdv-checkout-payment select,.pdv-checkout-payment input { width:100%; min-width:0; height:42px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:var(--ink); }
.pdv-checkout-controls .btn { min-height:42px; white-space:nowrap; }
.pdv-checkout-fieldset { min-width:0; margin:22px 0 0; padding:14px 15px 15px; border:1px solid var(--line); border-radius:12px; }
.pdv-checkout-fieldset legend { padding:0 6px; font-size:15px; font-weight:800; color:var(--ink); }
.pdv-checkout-legend { display:flex; flex-wrap:wrap; gap:8px 16px; margin:0 0 12px; }
.pdv-checkout-key { color:var(--ink-soft); font-size:11px; }
.pdv-checkout-key::before { content:''; display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; background:#8b958d; }
.pdv-checkout-key-overdue::before { background:#be4340; }
.pdv-checkout-key-partial::before { background:#2c68a0; }
.pdv-checkout-order-grid { display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:8px; max-height:310px; overflow-y:auto; padding:2px 3px 3px 1px; }
.pdv-checkout-order { position:relative; display:grid; grid-template-columns:auto minmax(0,1fr); gap:2px 7px; align-items:center; min-width:0; padding:9px; border:1px solid var(--line); border-radius:9px; background:#fff; cursor:pointer; }
.pdv-checkout-order:has(input:checked) { outline:2px solid var(--forest); background:#f0f6ef; }
.pdv-checkout-order input { grid-row:1/4; width:16px; height:16px; margin:0; accent-color:var(--forest); }
.pdv-checkout-order-number { font-weight:800; font-variant-numeric:tabular-nums; }
.pdv-checkout-group-alert { position:absolute; top:5px; right:5px; display:grid; place-items:center; width:16px; height:16px; border:1px solid #b97807; border-radius:50%; background:#ffcf66; color:#352400; font:800 11px/1 Arial,sans-serif; }
.pdv-checkout-order strong { font-size:12px; white-space:nowrap; }
.pdv-checkout-order small { min-width:0; overflow:hidden; text-overflow:ellipsis; color:var(--ink-soft); font-size:11px; white-space:nowrap; }
.pdv-checkout-order.is-overdue { border-color:#dfa7a2; background:#fff5f4; color:#a53132; }
.pdv-checkout-order.is-partial { border-color:#91b8dc; background:#f2f8ff; color:#245d91; }
.pdv-checkout-order.is-unavailable { cursor:default; }
.pdv-checkout-order.is-unavailable input { visibility:hidden; }
.pdv-checkout-card-open { grid-column:1/-1; justify-self:start; padding:0; border:0; background:none; color:var(--forest); font-size:10px; font-weight:800; text-align:left; }
.pdv-checkout-card-open:hover { text-decoration:underline; }
.pdv-checkout-list { border-top:1px solid var(--line); }
.pdv-checkout-list-head { display:flex; align-items:baseline; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:20px 24px 13px; }
.pdv-checkout-list-head h2 { margin:0; font-size:19px; }
.pdv-checkout-list-head p { margin:0; color:var(--ink-soft); font-size:12px; }
.pdv-checkout-filters { display:grid; grid-template-columns:minmax(145px,1fr) minmax(185px,1.4fr) minmax(135px,.9fr) minmax(135px,.9fr) auto auto; gap:10px; align-items:end; margin:0 24px 17px; }
.pdv-checkout-filters label { display:grid; gap:5px; min-width:0; color:var(--ink-soft); font-size:12px; font-weight:700; }
.pdv-checkout-filters input,.pdv-checkout-filters select { width:100%; min-width:0; height:42px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--ink); }
.pdv-checkout-filters .btn { min-height:42px; }
.pdv-checkout-list .table-wrap { margin:0 24px; }
.pdv-checkout-list .pdv-pagination { padding:14px 24px 19px; }
.modal-card:has(.pdv-checkout-detail) { width:min(100%,1050px); max-height:min(92dvh,900px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.pdv-checkout-detail { display:flex; flex-direction:column; min-height:0; max-height:inherit; }
.pdv-checkout-detail-head { flex:none; padding:20px 28px 16px; border-bottom:1px solid var(--line); }
.pdv-checkout-detail-head .eyebrow { margin:0 0 4px; }
.pdv-checkout-detail-head h2 { margin:0 40px 4px 0; }
.pdv-checkout-detail-head > p:last-child { margin:0; }
.pdv-checkout-detail-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding:18px 28px 22px; }
.pdv-checkout-detail-body section + section { margin-top:20px; padding-top:18px; border-top:1px solid var(--line); }
.pdv-checkout-detail-body h3 { margin:0 0 12px; color:var(--ink); font-size:17px; }
.pdv-checkout-group-actions { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.pdv-checkout-add { display:flex; align-items:end; gap:9px; flex:0 1 410px; min-width:0; }
.pdv-checkout-add label { flex:1 1 255px; }
.pdv-checkout-add .btn,.pdv-checkout-group-actions > .btn { min-height:42px; white-space:nowrap; }
.pdv-checkout-reopened-note { margin:0 0 12px !important; }
.pdv-checkout-group-orders { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:8px; }
.pdv-checkout-group-order { display:grid; gap:3px; min-width:0; padding:7px 9px; border:1px solid var(--line); border-radius:9px; }
.pdv-checkout-group-order-main { display:flex; align-items:center; gap:7px; min-width:0; font-variant-numeric:tabular-nums; }
.pdv-checkout-group-order-main strong { font-size:14px; }
.pdv-checkout-group-order-main b { margin-left:auto; font-size:13px; white-space:nowrap; }
.pdv-checkout-group-order-bottom { display:flex; align-items:center; justify-content:space-between; gap:6px; min-width:0; }
.pdv-checkout-group-order small { font-size:11px; }
.pdv-checkout-group-order .btn { flex:none; padding:4px 7px; min-height:26px; font-size:11px; }
.pdv-checkout-group-order .is-checked { color:var(--forest); }
.pdv-checkout-group-order .is-pending { color:#a44632; }
.pdv-checkout-payment { display:flex; align-items:end; flex-wrap:wrap; gap:10px; }
.pdv-checkout-payment .pdv-checkout-method { flex:0 1 165px; }
.pdv-checkout-payment .pdv-checkout-operator { flex:0 1 175px; }
.pdv-checkout-payment .pdv-checkout-amount { flex:0 1 135px; }
.pdv-checkout-payment .pdv-checkout-note { flex:1 1 190px; }
.pdv-checkout-payment > .btn { flex:0 0 115px; }
.pdv-checkout-payment label[hidden] { display:none; }
.pdv-checkout-payment .btn { min-height:42px; }
.pdv-checkout-payment .currency-input { text-align:right; font-variant-numeric:tabular-nums; }
.pdv-receipt-config { width:min(980px,100%); max-height:84vh; overflow:auto; }
.pdv-receipt-config fieldset { border:1px solid var(--line); border-radius:12px; padding:18px; margin:0 0 14px; }
.pdv-receipt-config legend { color:var(--ink); font-weight:700; padding:0 8px; }
.pdv-config-methods { display:flex; flex-wrap:wrap; gap:18px; }
.pdv-config-methods label,.pdv-config-operator-row label:first-child { display:flex; align-items:center; gap:7px; }
.pdv-config-operator-row label:has(.operator-default) { display:flex; flex-direction:row; align-items:center; gap:7px; }
.pdv-config-operator-row .operator-default { width:17px; min-height:17px; height:17px; padding:0; accent-color:var(--forest); }
.pdv-config-operator { padding:15px 0; border-top:1px solid var(--line); }
.pdv-config-operator-row { display:grid; grid-template-columns:90px 85px 100px 100px minmax(150px,1fr) minmax(150px,1fr); gap:10px; align-items:end; margin:12px 0; }
@media(max-width:850px){.pdv-config-operator-row { grid-template-columns:repeat(2,minmax(0,1fr)); }}
.pdv-checkout-detail-body .hint { margin:9px 0 0; }
.pdv-checkout-payments { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:8px; }
.pdv-checkout-payments > .hint { grid-column:1/-1; margin:0; padding:12px; border:1px solid var(--line); border-radius:10px; }
.pdv-checkout-payment-row { display:grid; gap:4px; min-width:0; padding:7px 9px; border:1px solid var(--line); border-radius:9px; font-size:12px; }
.pdv-checkout-payment-row.is-reversed { background:var(--surface-soft,#f8f8f6); }
.pdv-checkout-payment-top { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; font-variant-numeric:tabular-nums; }
.pdv-checkout-payment-title { display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 7px; min-width:0; }
.pdv-checkout-payment-title b { color:var(--ink); }
.pdv-checkout-payment-top time { color:var(--ink-soft); font-size:11px; }
.pdv-checkout-payment-amount { display:flex; align-items:center; gap:7px; flex:none; }
.pdv-checkout-payment-amount strong { white-space:nowrap; font-size:13px; }
.pdv-checkout-payment-amount .btn { padding:4px 7px; min-height:26px; font-size:11px; }
.pdv-checkout-payment-info { display:flex; flex-wrap:wrap; gap:2px 6px; min-width:0; overflow-wrap:anywhere; }
.pdv-checkout-payment-info:not(:has(span)) { display:none; }
.pdv-checkout-payment-info span + span::before { content:'· '; }
.pdv-checkout-payment-reversed { color:#a44632; }
.pdv-checkout-detail-footer { flex:none; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:14px; padding:13px 28px; border-top:1px solid var(--line); background:#fff; }
.pdv-checkout-footer-summary { display:flex; align-items:center; gap:18px; margin-left:auto; }
.pdv-tip-choice { display:flex; align-items:center; gap:6px; color:var(--ink-soft); font-size:12px; white-space:nowrap; cursor:pointer; }
.pdv-tip-choice input { width:16px; height:16px; margin:0; accent-color:var(--forest); }
.pdv-tip-summary { color:var(--ink-soft); font-size:12px; }
.modal-card:has(.company-editor) { width:min(1060px,100%); max-height:min(92dvh,900px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.company-editor { display:flex; flex-direction:column; min-height:0; width:100%; flex:1; }
.company-editor-head { padding:25px 62px 15px 30px; flex:none; }
.company-editor-head .eyebrow { margin:0 0 6px; color:var(--forest); font-size:10px; font-weight:800; letter-spacing:.15em; }
.company-editor-head h2 { margin:0; }
.company-editor-head > p:last-child { margin:5px 0 0; }
.company-editor-tabs { display:flex; gap:7px; flex:none; padding:0 30px; border-bottom:1px solid var(--line); overflow-x:auto; white-space:nowrap; }
.company-editor-tabs button { border:0; border-radius:8px 8px 0 0; background:transparent; color:var(--ink-soft); padding:11px 15px; font-weight:700; cursor:pointer; }
.company-editor-tabs button.is-active { background:var(--forest-light); color:var(--forest); }
.company-editor-tabs button:disabled { opacity:.45; cursor:not-allowed; }
.company-editor-body { flex:1; min-height:0; overflow:auto; padding:23px 30px 30px; }
.company-editor-panel[hidden] { display:none; }
.company-general-form,.company-commercial-form,.company-financial-form { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); gap:17px 14px; align-items:end; }
.company-general-form > *,.company-commercial-form > *,.company-financial-form > * { min-width:0; }
.company-general-form label,.company-commercial-form label,.company-financial-form label,.company-receipts-form label { display:grid; gap:6px; color:var(--ink-soft); font-size:12px; font-weight:700; min-width:0; }
.company-general-form input,.company-general-form select,.company-commercial-form input[type=number],.company-commercial-form select,
.company-receipts-form input[type=number],.company-receipts-form select,.company-financial-form select { width:100%; min-width:0; min-height:42px; padding:9px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font-size:13px; }
.company-span-2 { grid-column:span 2; }.company-span-3 { grid-column:span 3; }.company-span-4 { grid-column:span 4; }
.company-span-5 { grid-column:span 5; }.company-span-6 { grid-column:span 6; }.company-span-7 { grid-column:span 7; }
.company-span-8 { grid-column:span 8; }.company-span-12 { grid-column:1/-1; }
.company-cnpj-control { display:flex; align-items:end; gap:9px; }
.company-cnpj-control label { flex:0 1 245px; }.company-cnpj-control button { flex:none; min-height:42px; }
.company-section-title { border-top:1px solid var(--line); padding-top:17px; margin-top:3px; }
.company-section-title h3 { margin:0; color:var(--ink); font-size:15px; }
.company-section-title p { margin:3px 0 0; }
.company-general-form .legacy-address { padding:10px 13px; }
.company-general-form .legacy-address p { margin:2px 0 0; }
.company-general-form .hint,.company-commercial-form .hint,.company-financial-form .hint { margin:0; }
.company-commercial-form .company-tip-toggle,.company-financial-form .company-tip-toggle { display:flex; align-items:center; gap:9px; min-height:42px; }
.company-tip-toggle input { width:18px; height:18px; flex:none; accent-color:var(--forest); }
.company-commercial-form label:has([name="tipPercent"]) { max-width:190px; }
.company-editor-footer { flex:none; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 30px; border-top:1px solid var(--line); background:#fff; }
.company-editor-footer span { color:var(--ink-soft); font-size:11px; }.company-editor-footer .btn { flex:none; }
.company-receipts-form { display:grid; gap:19px; }
.company-receipts-intro { margin:0; }
.company-receipts-form fieldset { min-width:0; margin:0; border:1px solid var(--line); border-radius:12px; padding:17px 18px 19px; }
.company-receipts-form legend { padding:0 7px; color:var(--ink); font-size:14px; font-weight:750; }
.company-destination-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.company-receipts-form .pdv-config-methods { gap:9px; }
.company-receipts-form .pdv-config-methods label { display:flex; align-items:center; gap:7px; padding:9px 12px; border:1px solid var(--line); border-radius:9px; }
.company-receipts-form input[type=checkbox],.company-receipts-form input[type=radio] { width:17px; height:17px; margin:0; accent-color:var(--forest); }
.company-receipts-form .pdv-config-operator { padding:13px 0 3px; }
.company-receipts-form .pdv-config-operator h3 { margin:0 0 7px; font-size:13px; color:var(--ink); }
.company-receipts-form .pdv-config-operator-row { grid-template-columns:80px 72px 90px 100px minmax(160px,1fr) minmax(160px,1fr); gap:9px; margin:9px 0; }
.company-receipts-form .pdv-config-operator-row label:first-child,.company-receipts-form .pdv-config-operator-row label:has(.operator-default) { display:flex; flex-direction:row; align-items:center; }
.pdv-checkout-footer-actions,.pdv-checkout-totals { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.pdv-checkout-totals { gap:22px; }
.pdv-checkout-totals span { display:grid; gap:2px; color:var(--ink-soft); font-size:11px; }
.pdv-checkout-totals strong { color:var(--forest); font-size:17px; }
.modal-card:has(.pdv-checkout-history) { width:min(100%,780px); }
.pdv-checkout-history h2 { margin:0 36px 16px 0; }
.pdv-checkout-history-list { max-height:60dvh; overflow:auto; margin-bottom:18px; }
.pdv-checkout-history-list > div { display:grid; grid-template-columns:145px 1fr 1.5fr; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.pdv-checkout-history-list time { color:var(--ink-soft); }
@media(max-width:1300px){.pdv-checkout-order-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }}
@media(max-width:1060px){.pdv-checkout-order-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }.pdv-checkout-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-checkout-group-orders { grid-template-columns:repeat(2,minmax(0,1fr)); }}
@media(max-width:650px){.pdv-checkout-controls { grid-template-columns:1fr; }.pdv-checkout-order-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-checkout-open { padding:17px; }.pdv-checkout-list-head { padding:17px; }.pdv-checkout-filters { grid-template-columns:1fr; margin:0 17px 15px; }.pdv-checkout-list .table-wrap { margin:0 17px; }.pdv-checkout-detail-head { padding:17px; }.pdv-checkout-detail-body { padding:16px 17px; }.pdv-checkout-detail-footer { padding:13px 17px; }.pdv-checkout-history-list > div { grid-template-columns:1fr; gap:3px; }.pdv-checkout-payment { display:grid; grid-template-columns:1fr; }.pdv-checkout-payment > label,.pdv-checkout-payment > .btn { width:100%; }.pdv-checkout-group-orders,.pdv-checkout-payments { grid-template-columns:1fr; }}
@media(max-width:850px){
  .company-receipts-form .pdv-config-operator-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-destination-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-general-form,.company-commercial-form,.company-financial-form { grid-template-columns:repeat(6,minmax(0,1fr)); }
  .company-general-form .company-span-2 { grid-column:span 2; }
  .company-general-form .company-span-3,.company-general-form .company-span-4 { grid-column:span 3; }
  .company-general-form .company-span-5,.company-general-form .company-span-6,.company-general-form .company-span-7,
  .company-general-form .company-span-8,.company-general-form .company-span-12,
  .company-commercial-form > [class*="company-span-"],.company-financial-form > [class*="company-span-"] { grid-column:1/-1; }
}
@media(max-width:650px){
  .pdv-checkout-footer-summary { width:100%; justify-content:space-between; margin-left:0; }
  .modal-card:has(.company-editor) { max-height:94dvh; }
  .company-editor-head { padding:19px 52px 11px 18px; }
  .company-editor-tabs { padding:0 18px; }
  .company-editor-tabs button { padding:10px 11px; font-size:12px; }
  .company-editor-body { padding:17px 18px 22px; }
  .company-editor-footer { padding:11px 18px; }
  .company-editor-footer span { display:none; }
  .company-editor-footer .btn { width:100%; }
  .company-general-form,.company-commercial-form,.company-financial-form,.company-destination-grid,
  .company-receipts-form .pdv-config-operator-row { grid-template-columns:1fr; }
  .company-general-form > [class*="company-span-"],.company-commercial-form > [class*="company-span-"],.company-financial-form > [class*="company-span-"] { grid-column:1/-1; }
  .company-cnpj-control { flex-wrap:wrap; }.company-cnpj-control label { flex:1 1 100%; }
}
.pdv-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:18px 0; }
.pdv-metrics span { border:1px solid var(--line); border-radius:9px; padding:12px; color:var(--ink-soft); font-size:12px; }
.pdv-metrics strong { display:block; margin-top:6px; color:var(--ink); font-size:17px; }
.pdv-cash-notice { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:16px; color:var(--ink-soft); font-size:12px; }
.pdv-list-panel { min-width:0; }
.pdv-order-filters { display:grid; grid-template-columns:minmax(180px,1.4fr) repeat(2,minmax(110px,1fr)) repeat(2,minmax(125px,1fr)) minmax(125px,1fr) auto auto; gap:12px; align-items:end; }
.pdv-order-filters label { display:grid; gap:5px; min-width:0; color:var(--ink-soft); font-size:11px; font-weight:700; }
.pdv-order-filters input,.pdv-order-filters select { width:100%; min-width:0; height:42px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:white; color:var(--ink); }
.pdv-order-filters .btn { justify-self:start; }
.pdv-list-summary { margin:22px 0 8px; color:var(--ink-soft); font-size:12px; }
.pdv-table-wrap { min-width:0; max-width:100%; overflow-x:auto; }
.pdv-orders-table { min-width:760px; }
.pdv-pagination { display:flex; justify-content:flex-end; align-items:center; flex-wrap:wrap; gap:7px; padding-top:14px; font-size:12px; color:var(--ink-soft); }
.pdv-pagination .btn { min-width:36px; }
.pdv-preview { width:100%; padding:11px 13px; border:1px solid var(--line); border-radius:9px; color:var(--ink-soft); font-size:12px; }
.pdv-preview strong { display:block; color:var(--forest); font-size:16px; margin-top:4px; }
.pdv-form-note { width:100%; color:var(--ink-soft); font-size:12px; }
.pdv-order-overview { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:11px 0 16px; border-bottom:1px solid var(--line); margin-bottom:18px; font-size:12px; }
.pdv-order-overview > strong { margin-left:auto; color:var(--forest); font-size:21px; }
.pdv-order-overview .status { margin-left:auto; }
.pdv-order-overview .status + strong { margin-left:0; }
.modal-card:has(.pdv-sale-detail) { width:min(100%,1120px); max-height:min(94dvh,920px); display:flex; flex-direction:column; overflow:hidden; padding:0; }
.pdv-sale-detail { display:flex; flex-direction:column; min-height:0; max-height:inherit; }
.pdv-sale-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 22px; padding:20px 28px 17px; border-bottom:1px solid var(--line); flex:none; }
.pdv-sale-head h2 { margin:3px 46px 5px 0; }
.pdv-sale-head p { margin:0; }
.pdv-sale-head-values { display:flex; align-items:center; gap:22px; padding-right:42px; }
.pdv-sale-head-values div { display:grid; gap:3px; text-align:right; white-space:nowrap; }
.pdv-sale-head-values small { color:var(--ink-soft); }
.pdv-sale-head-values strong { color:var(--forest); font-size:24px; }
.pdv-sale-body { flex:1 1 auto; min-height:0; overflow:auto; padding:20px 28px; }
.pdv-sale-body h3 { margin:0 0 12px; }
.pdv-sale-items { overflow-x:auto; border:1px solid var(--line); border-radius:10px; }
.pdv-sale-items table { width:100%; min-width:620px; }
.pdv-sale-items td:last-child { text-align:right; }
.pdv-sale-reversed { opacity:.55; text-decoration:line-through; }
.pdv-sale-entry { grid-column:1/-1; display:grid; grid-template-columns:minmax(220px,2.2fr) minmax(105px,.8fr) minmax(130px,1fr) minmax(120px,1fr) auto; gap:10px; align-items:end; margin-top:7px; padding:12px; border:1px solid var(--line); border-radius:10px; background:#f8faf7; }
.pdv-sale-entry label { display:grid; gap:5px; min-width:0; font-size:12px; font-weight:700; color:var(--forest); }
.pdv-sale-entry input { width:100%; min-width:0; height:42px; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:white; }
.pdv-sale-entry input[readonly] { background:#f2f5f0; }
.pdv-sale-entry .btn { height:42px; white-space:nowrap; }
.pdv-sale-footer { display:flex; align-items:center; justify-content:space-between; gap:15px; flex:none; border-top:1px solid var(--line); padding:14px 28px; background:white; }
.pdv-sale-footer-tools { display:flex; flex-wrap:wrap; gap:8px; }
.pdv-sale-finalize { white-space:nowrap; min-height:44px; }
.pdv-row-actions { display:flex; flex-wrap:wrap; gap:7px; }
.modal-card:has(.pdv-sale-history) { width:min(100%,780px); }
.pdv-sale-history-list { display:grid; gap:9px; margin:15px 0 20px; max-height:55dvh; overflow:auto; }
.pdv-sale-history-list > div { display:grid; grid-template-columns:145px minmax(110px,1fr) 2fr; gap:9px; border-bottom:1px solid var(--line); padding:9px 0; font-size:12px; }
.pdv-sale-history-list time { color:var(--ink-soft); }
.pdv-reason-dialog form { display:grid; gap:18px; }
.pdv-reason-dialog label { display:grid; gap:7px; font-size:12px; font-weight:700; }
.pdv-reason-dialog input { min-height:44px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; }
.pdv-reason-dialog form > div { display:flex; justify-content:flex-end; gap:9px; }
.page-head .btn-primary:disabled { opacity:.5; box-shadow:none; cursor:not-allowed; transform:none; }
@media(max-width:1350px){.pdv-order-filters { grid-template-columns:repeat(4,minmax(0,1fr)); }}
@media(max-width:900px){.pdv-order-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-sale-head-values { padding-right:30px; }.pdv-sale-entry { grid-template-columns:repeat(2,minmax(0,1fr)); }.pdv-sale-entry label:first-child { grid-column:1/-1; }.pdv-sale-footer { align-items:stretch; flex-direction:column; }.pdv-sale-finalize { align-self:flex-end; }}
@media(max-width:650px){
  .pdv-order-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pdv-order-filters label:first-child { grid-column:1/-1; }
  .pdv-sale-head { display:block; padding:18px; }
  .pdv-sale-head-values { justify-content:space-between; padding-right:0; margin-top:10px; }
  .pdv-sale-entry { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .pdv-sale-entry .btn { grid-column:1/-1; }
  .pdv-sale-body { padding:16px 18px; }
  .pdv-sale-items table { min-width:0; }
  .pdv-sale-items thead { display:none; }
  .pdv-sale-items tbody { display:grid; }
  .pdv-sale-items tr { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:12px; border-bottom:1px solid var(--line); }
  .pdv-sale-items td { display:block; padding:0; border:0; min-width:0; }
  .pdv-sale-items td:first-child,.pdv-sale-items td:last-child { grid-column:1/-1; }
  .pdv-sale-items td:last-child { text-align:left; }
  .pdv-sale-items td[data-label]::before { content:attr(data-label); display:block; color:var(--ink-soft); font-size:10px; font-weight:800; text-transform:uppercase; margin-bottom:3px; }
  .pdv-sale-items td.empty::before { display:none; }
  .pdv-sale-footer { padding:13px 18px; }
  .pdv-sale-history-list > div { grid-template-columns:1fr; }
  .pdv-orders-table { min-width:0; }
  .pdv-orders-table thead { display:none; }
  .pdv-orders-table tbody { display:grid; gap:12px; }
  .pdv-orders-table tr { display:grid; grid-template-columns:1fr 1fr; gap:7px 13px; padding:14px; border:1px solid var(--line); border-radius:10px; }
  .pdv-orders-table td { display:block; padding:0; border:0; min-width:0; overflow-wrap:anywhere; }
  .pdv-orders-table td::before { content:attr(data-label); display:block; color:var(--muted); font-size:9px; font-weight:800; text-transform:uppercase; margin-bottom:2px; }
  .pdv-orders-table td:first-child { grid-column:1; grid-row:1; }
  .pdv-orders-table td:last-child { grid-column:2; grid-row:1; justify-self:end; }
  .pdv-orders-table td:last-child::before { display:none; }
  .pdv-orders-table td.empty { grid-column:1/-1; }
  .pdv-orders-table td.empty::before { display:none; }
  .pdv-pagination { justify-content:center; }
}
@media(max-width:420px){.pdv-order-filters { grid-template-columns:1fr; }
  .pdv-order-filters label:first-child { grid-column:auto; }
  .pdv-sale-finalize { align-self:stretch; }}
@media (max-width: 1100px) {
  .reconciliation-toolbar { align-items:stretch; flex-direction:column; }
  .reconciliation-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .reconciliation-import-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .reconciliation-toolbar,.reconciliation-list,.reconciliation-detail,.reconciliation-imports { padding:16px; }
  .reconciliation-columns { grid-template-columns:1fr; }
  .reconciliation-list { max-height:40vh; }
  .reconciliation-filters label,.reconciliation-upload label { flex:1 1 145px; }
  .reconciliation-filters select { min-width:0; width:100%; }
  .reconciliation-import-item { align-items:start; flex-direction:column; }
  .reconciliation-import-actions { align-items:flex-start; }
  .reconciliation-import-actions small { text-align:left; }
  .reconciliation-import-filters { grid-template-columns:1fr; }
  .reconciliation-selected-import { align-items:stretch; flex-direction:column; }
  .reconciliation-selected-actions { justify-content:flex-start; }
  .transfer-item { flex-direction:column; }
  .transfer-end { align-items:flex-start; }
  .transfer-end > small { text-align:left; }
  .transfer-actions { justify-content:flex-start; }
}

.calendar-list { overflow:hidden; }
.calendar-list table { width:100%; }
.calendar-list td { vertical-align:middle; }
.calendar-list small { color:var(--muted); }
.modal-card:has(.calendar-editor) { width:min(960px,100%); max-height:min(92dvh,900px); padding:0; overflow:hidden; }
.calendar-editor { display:flex; flex-direction:column; max-height:min(92dvh,900px); }
.calendar-editor > header { padding:24px 28px 14px; border-bottom:1px solid var(--line); }
.calendar-editor > header h2 { margin:2px 0 5px; }
.calendar-editor > header p:last-child { margin:0; }
.calendar-editor-form { padding:22px 28px; overflow-y:auto; display:grid; gap:20px; }
.calendar-editor-form label { display:grid; gap:6px; font-size:12px; font-weight:700; color:var(--ink-soft); }
.calendar-editor-form input:not([type=checkbox]),.calendar-editor-form select { width:100%; min-width:0; min-height:42px; padding:9px 11px; border:1px solid var(--line); border-radius:9px; background:#fff; color:var(--ink); font-size:13px; }
.calendar-editor-grid { display:grid; grid-template-columns:minmax(220px,2fr) repeat(2,minmax(125px,1fr)) minmax(100px,.7fr); gap:14px; }
.calendar-weekends { display:flex; gap:24px; flex-wrap:wrap; }
.calendar-weekends label,.calendar-copy { display:flex!important; align-items:center; gap:8px!important; }
.calendar-weekends input,.calendar-copy input { width:18px; height:18px; accent-color:var(--forest); }
.calendar-national,.calendar-manual { border-top:1px solid var(--line); padding-top:17px; }
.calendar-section-head { display:flex; align-items:end; justify-content:space-between; gap:15px; margin-bottom:12px; }
.calendar-section-head h3 { margin:0; font-size:16px; }.calendar-section-head p { margin:4px 0 0; }
.calendar-section-head label { min-width:110px; }
.calendar-national-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 18px; }
.calendar-national-grid span { padding:9px 11px; border-radius:8px; background:#f7f9f6; font-size:12px; }
.calendar-national-grid strong { margin-right:8px; color:var(--forest); }
.calendar-holiday-row { display:grid; grid-template-columns:minmax(135px,180px) minmax(220px,1fr) auto; align-items:end; gap:10px; margin:10px 0; }
.calendar-holiday-row button { min-height:42px; }
.calendar-editor footer { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:13px 28px; border-top:1px solid var(--line); background:#fff; }
.calendar-editor footer span { font-size:11px; color:var(--muted); }
.purchase-installment-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,220px)); gap:8px; }
#purchase-form .purchase-installment-grid label { gap:3px; }
#purchase-form .purchase-installment-grid input { min-height:36px; padding:6px 9px; }
#purchase-form .purchase-due-hint { margin:6px 0 0; }
@media(max-width:700px){
  .calendar-editor-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-editor-grid .calendar-name { grid-column:1/-1; }
  .calendar-national-grid { grid-template-columns:1fr; }
  .calendar-holiday-row { grid-template-columns:1fr 1fr; }
  .calendar-holiday-row button { grid-column:1/-1; }
  .calendar-editor > header,.calendar-editor-form,.calendar-editor footer { padding-left:18px; padding-right:18px; }
  .calendar-editor footer span { display:none; }
}
@media(max-width:480px){ .calendar-editor-grid,.calendar-holiday-row { grid-template-columns:1fr; } }

/* Controles compartilhados das listagens cadastrais e operacionais. */
.listing-sort { display:inline-flex; align-items:center; gap:6px; border:0; padding:0; background:transparent;
  color:inherit; font:inherit; font-weight:inherit; letter-spacing:inherit; text-transform:inherit;
  white-space:inherit; cursor:pointer; }
.listing-sort:hover,.listing-sort:focus-visible { color:var(--forest); }
.listing-sort-indicator { color:var(--gold); font-size:12px; line-height:1; }
.listing-column-filter { margin-left:5px; }
.listing-filter-toggle.is-active { background:var(--forest-light); color:var(--forest); font-weight:800; }
.listing-filtered-column,.report-table th.listing-filtered-column,.title-table th.listing-filtered-column {
  background:#e5f0e7; color:var(--forest); box-shadow:inset 0 -3px 0 var(--gold); }
th:has(> .column-filter .listing-filter-toggle.is-active) {
  background:#e5f0e7; color:var(--forest); box-shadow:inset 0 -3px 0 var(--gold); }
.listing-filter-menu { position:fixed; z-index:100; width:210px; max-width:calc(100vw - 16px);
  box-shadow:0 12px 30px rgba(22,43,30,.16); text-align:left; text-transform:none;
  letter-spacing:normal; white-space:normal; }
.listing-filter-menu label { display:block; min-width:0; }
.listing-filter-menu input,.listing-filter-menu select { box-sizing:border-box; width:100%; min-width:0; }
.listing-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;
  gap:9px 16px; padding:12px 16px; color:var(--ink-soft); font-size:12px; }
.listing-pagination-status { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.listing-clear-filters { border:0; background:transparent; color:var(--forest); font:inherit; font-weight:700;
  text-decoration:underline; cursor:pointer; padding:3px; }
.listing-pages { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:5px; }
.listing-pages button { min-width:34px; min-height:33px; border:1px solid var(--line); border-radius:8px;
  padding:5px 9px; background:#fff; color:var(--ink); font:inherit; font-weight:700; cursor:pointer; }
.listing-pages button:hover,.listing-pages button:focus-visible { border-color:var(--forest); color:var(--forest); }
.listing-pages button[aria-current="page"] { border-color:var(--forest); background:var(--forest); color:#fff; }
.listing-pages button:disabled { opacity:.42; cursor:not-allowed; }
.listing-empty { text-align:center; color:var(--ink-soft); padding:24px 12px; }
@media(max-width:650px){ .listing-pagination { justify-content:center; text-align:center; } }
@media print {
  .operation-output.has-listing-filter tr[data-list-match="true"] { display:table-row !important; }
  .operation-output.has-listing-filter tr[data-list-match="false"],
  .operation-output .settlement-detail-row { display:none !important; }
  .listing-pagination { display:none !important; }
}

/* Consulta administrativa de autenticações: filtros proporcionais aos dados. */
.login-log-panel { overflow:hidden; }
.login-log-table { min-width:1080px; }
.login-log-table th { padding:13px 14px; vertical-align:top; }
.login-log-sort { display:block; border:0; background:transparent; padding:0; margin:0 0 9px;
  color:var(--ink-soft); font-size:10px; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; text-align:left; }
.login-log-sort:hover { color:var(--forest); }
.login-log-table th input,.login-log-table th select { width:100%; min-width:0; height:36px;
  border:1px solid var(--line); border-radius:8px; padding:5px 9px; background:var(--paper);
  color:var(--ink); font-size:12px; font-weight:500; letter-spacing:normal; text-transform:none; }
.login-log-date-range { display:grid; grid-template-columns:repeat(2,minmax(132px,1fr)); gap:8px; }
.login-log-date-range label { display:grid; gap:3px; color:var(--ink-soft); font-size:10px;
  font-weight:700; letter-spacing:normal; text-transform:none; }
.login-log-table td { padding:12px 14px; font-size:12px; }
.login-log-table td strong { color:var(--ink); }
.login-log-table td small { display:block; margin-top:3px; color:var(--muted); font-size:10px; }
.login-log-agent { max-width:290px; overflow-wrap:anywhere; line-height:1.4; }
.login-log-footer { display:flex; justify-content:space-between; align-items:center; gap:14px;
  flex-wrap:wrap; padding:14px 17px; border-top:1px solid var(--line); }
.login-log-filter-actions,.login-log-pages { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.login-log-pages span { margin-right:7px; color:var(--ink-soft); font-size:12px; }
.login-log-pages .btn { min-width:34px; padding:8px 10px; }
@media(max-width:650px){
  .login-log-panel .table-scroll { overflow:visible; }
  .login-log-table { display:block; width:100%; min-width:0; }
  .login-log-table thead,.login-log-table tbody { display:block; }
  .login-log-table thead tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px; padding:14px; }
  .login-log-table th { display:block; min-width:0; padding:0; border:0; }
  .login-log-table th:first-child,.login-log-table th:nth-child(2),
  .login-log-table th:last-child { grid-column:1/-1; }
  .login-log-date-range { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .login-log-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
    gap:9px 14px; padding:14px; border-top:1px solid var(--line); }
  .login-log-table td { display:block; min-width:0; padding:0; border:0; overflow-wrap:anywhere; }
  .login-log-table td:before { content:attr(data-label); display:block; margin-bottom:3px;
    color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }
  .login-log-table td:nth-child(2),.login-log-table td:last-child,
  .login-log-table td.empty { grid-column:1/-1; }
  .login-log-agent { max-width:none; }
  .login-log-table td.empty:before { content:none; }
  .login-log-footer { align-items:stretch; }
  .login-log-filter-actions,.login-log-pages { width:100%; justify-content:center; }
}

/* Azul Neblina: acabamento visual sobre as telas e a navegação existentes. */
.login-screen { background: #f6f8fa; }
.login-top .brand-wordmark,
.login-top .brand-wordmark span { color: #3b536b; }
.login-top-label,
.login-center .login-intro,
.login-footer { color: #5f7386; }
.login-kicker { color: #456f9c; }
.login-center h1,
.login-field label { color: #1d2d3d; }
.login-field > input,
.login-password { border-color: #dce5ec; }
.login-field > input,
.login-password input { color: #1d2d3d; }
.login-field > input:focus-visible,
.login-password:focus-within { border-color: #456f9c; outline-color: #c7d9eb; }
.login-password button,
.login-footer a { color: #456f9c; }
.login-password button:focus-visible,
.login-submit:focus-visible,
.login-footer a:focus-visible { outline-color: #456f9c; }
.login-field input::placeholder { color: #788a9a; }
.login-submit { background: #456f9c; box-shadow: 0 7px 16px rgba(59,83,107,.16); }
.login-submit:hover { background: #365b81; }
.login-visual { background: #3b536b; }
.login-visual::after { background: linear-gradient(90deg, rgba(39,58,75,.52), transparent 70%),
  linear-gradient(0deg, rgba(39,58,75,.8), rgba(39,58,75,.06) 65%); }
.visual-overline { color: #d7e7f5; }
.login-visual-copy p:last-child { color: #f2f6fa; }
.app-shell { background: var(--canvas); }
.app-shell .sidebar {
  background: #3b536b;
  color: #f6f8fa;
}
.app-shell .sidebar .brand {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 10px 12px;
}
.app-shell .sidebar .brand-wordmark,
.app-shell .sidebar .brand-wordmark span { color: #fff; }
.app-shell .sidebar-pin { color: #fff; }
.app-shell .nav button { color: #edf3f8; }
.app-shell .nav button:hover,
.app-shell .nav .nav-subgroup-toggle:hover { background: rgba(255,255,255,.13); color: #fff; }
.app-shell .nav button.active {
  background: #456f9c;
  color: #fff;
  box-shadow: inset 3px 0 0 #d4e3ef;
}
.app-shell .nav button.active svg { color: #fff; }
.app-shell .nav-group-toggle,
.app-shell .nav .nav-subgroup-toggle { color: #e0eaf3; }
.app-shell .sidebar-profile { border-color: rgba(255,255,255,.2); }
.app-shell .sidebar-profile small,
.app-shell .sidebar-logout { color: #e0eaf3; }
.app-shell .sidebar .avatar { background: #eaf0f6; color: #3b536b; }
.app-shell .topbar {
  background: rgba(255,255,255,.92);
  border-color: var(--line);
  box-shadow: 0 3px 16px rgba(36,60,84,.04);
}
.app-shell .topbar-avatar { background: #eaf0f6; color: #3b536b; }
.app-shell .content { background: var(--canvas); }
.app-shell h1,
.app-shell .hero h2 { font-family: Inter, "Segoe UI", Arial, sans-serif; font-weight: 700; letter-spacing: -.04em; }
.app-shell .eyebrow { color: #456f9c; }
.app-shell .btn-primary { background: #456f9c; box-shadow: 0 5px 14px rgba(59,83,107,.14); }
.app-shell .btn-primary:hover { background: #365b81; }
.app-shell .btn-secondary:hover { border-color: #9aafc0; }
.app-shell .hero {
  background: #3b536b;
  box-shadow: 0 12px 28px rgba(36,60,84,.11);
}
.app-shell .hero .eyebrow,
.app-shell .hero-link { color: #e4eff8; }
.app-shell .hero-detail { color: #e0eaf3; }
.app-shell .hero-art { background: radial-gradient(circle at 68% 38%, rgba(194,216,234,.12), transparent 37%); }
.app-shell .stat-card,
.app-shell .panel { border-color: var(--line); box-shadow: var(--shadow); }
.app-shell .stat-card { border-radius: 12px; }
.app-shell .stat-card::before { background: var(--blue); }
.app-shell .stat-foot { color: var(--muted); }
.app-shell .segmented { background: #eaf0f6; }
.app-shell .segmented button { color: #4e6173; }
.app-shell th,
.app-shell .annual-table th:first-child { background: #f0f4f7; color: #4e6173; }
.app-shell td { color: var(--ink-soft); border-color: var(--line); }
.app-shell tbody tr:hover { background: #f6f8fa; }
.app-shell .annual-table .row-section td,
.app-shell .annual-table .row-section td:first-child,
.app-shell .annual-table .row-section td:last-child,
.app-shell .annual-table .row-total td,
.app-shell .annual-table .row-total td:first-child,
.app-shell .annual-table th:last-child,
.app-shell .annual-table td:last-child { background: #eef3f7; }
.app-shell .field label { color: var(--ink-soft); }
.app-shell .dashboard-month-menu { box-shadow: 0 18px 38px rgba(36,60,84,.13); }
.app-shell .line-chart-grid { stroke: #dce5ec; }
.app-shell .line-chart-focus { fill: #eef3f7; }
.app-shell .due-metric { background: #fbfdff; }
.app-shell button.due-metric:hover { border-color: #9aafc0; background: #f0f4f7; }
.app-shell .dashboard-bank-badge.unstarted { background: #eef3f7; }
.app-shell .listing-sort:hover,
.app-shell .listing-sort:focus-visible { color: #456f9c; }
.app-shell :focus-visible { outline-color: #456f9c; }
.app-shell .search input:focus { border-color: #456f9c; }
.app-shell .field input,
.app-shell .field select,
.app-shell .field textarea { border-color: var(--line); }
.app-shell .field input:focus,
.app-shell .field select:focus,
.app-shell .field textarea:focus { border-color: #456f9c; box-shadow: 0 0 0 3px #eaf0f6; }
.app-shell .aside-card { background: #eef3f7; }
.app-shell .aside-card p { color: var(--ink-soft); }
.modal-backdrop { background: rgba(29,45,61,.5); }
.toast:not(.error) { background: #3b536b; }
.app-shell .breadcrumb { color: var(--ink); font-size: 15px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; }
.dashboard-modules { margin-top: 24px; }
.dashboard-modules-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dashboard-modules-symbol { width: 39px; height: 39px; display: grid; place-items: center;
  border-radius: 11px; background: var(--forest-light); color: var(--forest); font-size: 24px; }
.dashboard-modules-head h2 { color: var(--ink); font-size: 18px; margin: 0 0 3px; }
.dashboard-modules-head p { color: var(--muted); font-size: 12px; margin: 0; }
.dashboard-module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.dashboard-module-card { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 90px;
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  color: var(--ink); box-shadow: var(--shadow); text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.dashboard-module-card:hover { border-color: #9aafc0; box-shadow: 0 7px 18px rgba(36,60,84,.11); transform: translateY(-2px); }
.dashboard-module-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 11px; background: #eaf0f6; color: #456f9c; font-size: 11px; font-weight: 850; letter-spacing: .02em; }
.dashboard-module-copy { display: grid; gap: 4px; min-width: 0; }
.dashboard-module-copy strong { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.dashboard-module-copy small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.dashboard-module-arrow { color: #456f9c; font-size: 19px; margin-left: auto; flex: none; }
@media (max-width: 1220px) { .dashboard-module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 650px) {
  .dashboard-module-grid { gap: 9px; }
  .dashboard-module-card { display: grid; justify-items: start; align-content: start; gap: 8px; min-height: 128px; padding: 12px; }
  .dashboard-module-icon { width: 39px; height: 39px; }
  .dashboard-module-arrow { display: none; }
  .dashboard-module-copy strong { font-size: 12px; }
  .dashboard-module-copy small { font-size: 10px; }
}
@media (max-width: 370px) { .dashboard-module-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .app-shell *, .app-shell *::before, .app-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
