/* Locally hosted Noto Sans: Latin + Turkish + Hungarian. See portal-font-license.txt. */
@font-face { font-family:"Portal Sans"; src:url("portal-font-regular.woff2") format("woff2"); font-style:normal; font-weight:100 599; font-display:swap; }
@font-face { font-family:"Portal Sans"; src:url("portal-font-bold.woff2") format("woff2"); font-style:normal; font-weight:600 900; font-display:swap; }
:root {
  --ink: #102A2A;
  --muted: #667878;
  --paper: #F4F7F5;
  --surface: #FFFFFF;
  --line: #DCE7E2;
  --brand: #075F9B;
  --brand-2: #0B88CF;
  --green: #1689C9;
  --green-soft: #E5F5FD;
  --amber: #F3A117;
  --amber-soft: #FFF4D7;
  --red: #C24A4A;
  --red-soft: #FCE9E7;
  --blue: #3976A8;
  --shadow: 0 12px 34px rgba(7, 55, 88, .09);
  font-family: "Portal Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 320px; font-size:14px; line-height: 1.5; font-variant-numeric:lining-nums tabular-nums; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust:100%; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1, h2, h3 { line-height: 1.2; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; line-height: 1.2; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { background: linear-gradient(175deg,#075F9B 0%,#087EBB 58%,#064B7C 100%); color: white; padding: 22px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 24px; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; background: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.brand-mark img { width: 34px; height: 34px; }
.brand strong { display: block; font-size: 18px; letter-spacing: -.3px; }
.brand small { color: #B9D6D2; }
.brand-original { display: grid; padding: 6px 4px 24px; }
.brand-logo-frame { overflow: hidden; border: 1px solid rgba(255,255,255,.82); border-radius: 15px; background: #FFFFFF; box-shadow: 0 12px 28px rgba(3,42,69,.24); }
.brand-logo-frame::after { display: none; }
.brand-original .brand-logo { display: block; width: 100%; height: 84px; object-fit: contain; background: #FFFFFF; padding: 12px 16px; }
.brand-original small { text-align: center; color: #E1F2FC; margin-top: 13px; font-size: 11.5px; line-height: 1.4; }
.nav { display: grid; gap: 7px; }
.nav button { border: 0; background: transparent; color: #CFE3E0; text-align: left; padding: 12px 14px; border-radius: 10px; display: flex; align-items: center; gap: 11px; transition: .2s; }
.nav button:hover, .nav button.active { background: rgba(255,255,255,.12); color: white; }
.nav .ico { width: 22px; text-align: center; }
.sidebar-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 8px 0; color: #B9D6D2; font-size: 12px; line-height: 1.55; }
.content { min-width: 0; }
.topbar { min-height: 74px; padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: rgba(244,247,245,.93); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.6px; }
.topbar p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.topbar-title { min-width: 180px; }
.company-switch { display: inline-flex; align-items: center; gap: 6px; padding: 4px; border: 1px solid #C9DDE8; border-radius: 11px; background: white; box-shadow: 0 4px 14px rgba(7,95,155,.08); }
.company-switch > span { padding-left: 7px; color: #075F9B; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .45px; }
.company-switch select { width: clamp(180px,22vw,310px); min-width: 0; border: 0; outline: 0; background: #F5FAFD; color: var(--ink); border-radius: 7px; padding: 8px 9px; font-size: 12px; font-weight: 750; }
.company-switch .company-add, .company-switch .company-edit { width: 32px; height: 32px; padding: 0; }
.lang-switch { display: inline-flex; background: #E8EFEC; border-radius: 10px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-weight: 700; font-size: 12px; }
.lang-switch button.active { background: white; color: var(--brand); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.main { padding: 30px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; gap: 22px; align-items: flex-start; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 6px; font-size: 22px; }
.page-head p { margin: 0; color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.field { display: grid; gap: 6px; }
.field[hidden] { display: none; }

/* Focused banking workspace: account summary + one searchable movement list. */
.bank-simple-head { align-items:center; gap:16px; }
.bank-simple-head h2 { margin:0; font-size:22px; }
.bank-account-bar { display:flex; align-items:center; flex-wrap:wrap; gap:14px; padding:18px 20px; margin-bottom:14px; }
.bank-account-bar > .field { flex:1 1 220px; max-width:360px; }
.bank-account-bar .bank-account-caption { flex:1 1 150px; min-width:0; margin:0; }
.bank-account-bar .bank-account-caption small { font-size:13px; overflow-wrap:anywhere; }
.bank-balance-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:18px 4px; margin:14px 0; gap:0; }
.bank-balance-strip > div { padding:0 20px; border-right:1px solid var(--line); min-width:0; }
.bank-balance-strip > div:last-child { border:0; }
.bank-balance-strip span { display:block; color:var(--muted); font-size:14px; margin-bottom:7px; }
.bank-balance-strip strong { display:block; font-size:24px; line-height:1.25; letter-spacing:-.5px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.bank-balance-strip small { display:block; color:var(--muted); font-size:12px; line-height:1.5; margin-top:6px; }
.bank-inline-note { color:var(--muted); font-size:12px; line-height:1.5; margin:10px 2px; }
.bank-filter-form { padding:18px 20px; border-bottom:1px solid var(--line); }
.bank-presets { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:14px; }
.bank-filter-fields { display:flex; flex-wrap:wrap; align-items:end; gap:10px; }
.bank-filter-fields .field { flex:1 1 145px; }
.bank-filter-fields .bank-search { flex:3 1 240px; }
.bank-filter-fields .field label,.bank-report-controls .field label { font-size:14px; }
.bank-list-head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:14px 20px; }
.bank-list-head > small { color:var(--muted); font-size:12px; }
.bank-type-tabs { flex-wrap:wrap; }
.bank-type-tabs button { font-size:13px; padding:8px 12px; gap:7px; }
.bank-simple-table { width:100%; table-layout:fixed; min-width:760px; }
.bank-simple-table th { font-size:12px; padding:12px 14px; letter-spacing:.2px; white-space:normal; }
.bank-simple-table td { padding:13px 14px; font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
.bank-simple-table th:nth-child(1) { width:110px; }
.bank-simple-table th:nth-child(2) { width:145px; }
.bank-simple-table th:nth-child(4) { width:120px; }
.bank-simple-table th:nth-child(5) { width:140px; }
.bank-simple-table th:nth-child(6) { width:125px; }
.bank-simple-table td strong { font-weight:600; }
.bank-simple-table .badge { white-space:normal; font-size:12px; }
.bank-simple-table .cell-sub { font-size:12px; }
.bank-row-actions { display:flex; flex-wrap:wrap; gap:3px; }
.bank-row-actions .btn { font-size:13px; padding:6px 7px; }
.danger-text { color:#B83D36 !important; }
.bank-pagination { display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1px solid var(--line); color:var(--muted); font-size:13px; }
.bank-pagination > div { display:flex; gap:6px; }
.bank-report-controls { display:flex; flex-wrap:wrap; align-items:end; gap:14px; padding:18px 20px; }
.bank-report-controls > .field { flex:1 1 170px; }
@media(max-width:1100px){.bank-balance-strip strong{font-size:21px}.bank-balance-strip>div{padding:0 14px}.bank-simple-head{align-items:flex-start}}
@media(max-width:760px){.bank-balance-strip{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:20px}.bank-balance-strip>div:nth-child(2){border:0}.bank-simple-head{flex-direction:column}.bank-simple-head .bank-actions{width:100%}.bank-account-bar>.field{max-width:none}.bank-list-head,.bank-filter-form{padding:14px}.bank-type-tabs{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.bank-filter-fields>.btn{flex:1}.bank-balance-strip strong{font-size:22px}}
.field label { font-size: 12px; font-weight: 700; color: #516462; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 10px 11px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47,143,107,.12); }
.field textarea { min-height: 72px; resize: vertical; }
.field .hint { color: var(--muted); font-size: 11px; }
.inline-input { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; align-items: stretch; }
.inline-input .btn { white-space: nowrap; }
.grid { display: grid; gap: 18px; }
.grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.grid.two { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .8fr); }
.grid.form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card-head { padding: 18px 20px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h3 { margin: 0; font-size: 16px; }
.card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.card-head small { color: var(--muted); }
.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; width: 86px; height: 86px; border-radius: 50%; right: -32px; top: -34px; background: var(--tone, var(--green-soft)); }
.kpi .label { color: var(--muted); font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.kpi .value { font-size: clamp(20px,2vw,26px); font-weight: 800; letter-spacing: -.6px; line-height: 1.15; overflow-wrap: anywhere; }
.kpi .sub { margin-top: 7px; color: var(--muted); font-size: 12px; }
.btn { border: 1px solid transparent; border-radius: 9px; padding: 9px 13px; font-weight: 700; transition: .15s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg,#F3A117,#FFB515); color: #17324A; box-shadow: 0 5px 14px rgba(243,161,23,.22); }
.btn.secondary { background: white; border-color: var(--line); color: var(--ink); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.ghost { background: transparent; color: var(--brand-2); padding-left: 7px; padding-right: 7px; }
.btn.attachment { padding: 2px 4px; vertical-align: middle; }
.btn.small { padding: 6px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.table-wrap { overflow: auto; border-radius: 0 0 15px 15px; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
.invoice-table { min-width: 1460px; }
.invoice-page-head { align-items:center; margin-bottom:13px; }
.invoice-page-head .btn { flex:0 0 auto; }
.invoice-filter-card { margin-bottom:14px; padding:12px 14px; box-shadow:0 7px 22px rgba(7,55,88,.06); }
.invoice-filter-row { display:flex; align-items:flex-end; justify-content:space-between; gap:14px; }
.invoice-period-filters { flex:1 1 auto; flex-wrap:nowrap; gap:8px; }
.invoice-period-filters .field { min-width:0; }
.invoice-period-filters .field:nth-child(1) { flex:0 0 82px; }
.invoice-period-filters .field:nth-child(2) { flex:0 0 108px; }
.invoice-period-filters .field:nth-child(3) { flex:1 1 160px; max-width:250px; }
.invoice-period-filters .field label { font-size:9.5px; text-transform:uppercase; letter-spacing:.45px; }
.invoice-period-filters select { min-height:35px; padding:7px 9px; font-size:11px; }
.invoice-status-tabs { flex:0 0 auto; display:inline-flex; gap:3px; padding:3px; border:1px solid #D4E3EB; border-radius:11px; background:#EEF5F8; }
.invoice-status-tabs button { display:inline-flex; align-items:center; gap:7px; border:0; border-radius:8px; padding:8px 10px; color:#607781; background:transparent; font-size:10.5px; font-weight:800; white-space:nowrap; }
.invoice-status-tabs button b { min-width:20px; padding:2px 6px; border-radius:99px; color:#49616E; background:rgba(255,255,255,.82); font-size:9.5px; font-variant-numeric:tabular-nums; }
.invoice-status-tabs button.active { color:#075F9B; background:white; box-shadow:0 3px 10px rgba(7,95,155,.12); }
.invoice-status-tabs button.active b { color:white; background:#075F9B; }
.invoice-tab-short,.invoice-mobile-list { display:none; }
.invoice-list-card { overflow:hidden; }
.invoice-table-wrap { overflow:hidden; border-radius:15px; }
.invoice-list-card .invoice-table { min-width:0; width:100%; table-layout:fixed; }
.invoice-list-card .invoice-table .col-date { width:8%; }
.invoice-list-card .invoice-table .col-site { width:9%; }
.invoice-list-card .invoice-table .col-type { width:6%; }
.invoice-list-card .invoice-table .col-category { width:10%; }
.invoice-list-card .invoice-table .col-party { width:11%; }
.invoice-list-card .invoice-table .col-number { width:8%; }
.invoice-list-card .invoice-table .col-status { width:7%; }
.invoice-list-card .invoice-table .col-vat-rate { width:5%; }
.invoice-list-card .invoice-table .col-net { width:9%; }
.invoice-list-card .invoice-table .col-vat { width:8%; }
.invoice-list-card .invoice-table .col-gross { width:9%; }
.invoice-list-card .invoice-table .col-actions { width:10%; }
.invoice-list-card .invoice-table th { padding:9px 5px; font-size:8.7px; line-height:1.2; letter-spacing:.2px; }
.invoice-list-card .invoice-table td { padding:9px 5px; font-size:10.3px; line-height:1.25; }
.invoice-list-card .invoice-table th:first-child, .invoice-list-card .invoice-table td:first-child { padding-left:10px; }
.invoice-list-card .invoice-table th:last-child, .invoice-list-card .invoice-table td:last-child { padding-right:8px; }
.invoice-cell-text { display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow-wrap:anywhere; }
.invoice-number { display:inline-block; max-width:calc(100% - 23px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.invoice-date, .invoice-amount { white-space:nowrap; font-variant-numeric:tabular-nums; letter-spacing:-.15px; }
.invoice-currency-note { margin:0; padding:10px 14px; color:#4B687C; background:#F0F7FB; border-bottom:1px solid #DDEAF2; font-size:11px; line-height:1.55; }
.invoice-list-card .invoice-currency-amount { white-space:normal; min-width:0; }
.invoice-money-stack { display:flex; flex-direction:column; align-items:flex-end; gap:5px; min-width:0; max-width:100%; }
.invoice-money-original,.invoice-money-equivalent { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:baseline; gap:2px 4px; min-width:0; max-width:100%; line-height:1.4; white-space:normal; }
.invoice-money-original { font-weight:700; }
.invoice-money-total { font-weight:800; color:#173A42; }
.invoice-money-number { min-width:0; max-width:100%; white-space:normal; overflow-wrap:anywhere; word-break:normal; font-variant-numeric:tabular-nums; }
.invoice-currency-code { flex:0 0 auto; white-space:nowrap; font-size:max(8px,.9em); font-weight:700; letter-spacing:.2px; }
.invoice-money-equivalent { color:#677F8D; font-size:9px; font-weight:500; }
.compact-badge, .invoice-list-card td .badge { max-width:100%; padding:4px 5px; font-size:8.8px; overflow:hidden; text-overflow:ellipsis; }
.invoice-actions { display:flex; align-items:center; justify-content:flex-start; gap:2px; }
.icon-btn { width:25px; height:25px; min-width:25px; padding:0 !important; border-radius:7px; font-size:13px !important; }
.icon-btn.pay { color:#167252; }
.icon-btn.delete { color:#C24A4A; }
th { text-align: left; color: #516462; font-size: 10.5px; line-height: 1.3; text-transform: uppercase; letter-spacing: .35px; background: #F8FAF9; padding: 11px 13px; border-bottom: 1px solid var(--line); white-space: normal; vertical-align: bottom; }
td { padding: 12px 13px; border-bottom: 1px solid #EDF2EF; font-size: 13px; line-height: 1.35; vertical-align: middle; overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.amount.income { color: var(--green); font-weight: 800; }
.amount.expense { color: var(--red); font-weight: 800; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge.green { background: var(--green-soft); color: #237655; }
.badge.amber { background: var(--amber-soft); color: #9B630D; }
.badge.red { background: var(--red-soft); color: var(--red); }
.badge.blue { background: #E7F1F8; color: var(--blue); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .big { font-size: 32px; margin-bottom: 8px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,30,29,.46); z-index: 60; display: grid; place-items: center; padding: 20px; }
.modal { width: min(1040px, 100%); max-height: 92vh; overflow: auto; background: white; border-radius: 19px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; padding: 16px 22px; border-top: 1px solid var(--line); background: #FAFCFB; }
.invoice-entry-form { display:grid; gap:16px; }
.invoice-form-section { overflow:hidden; border:1px solid #D7E5EC; border-radius:14px; background:#FBFDFE; }
.invoice-section-head { display:flex; align-items:center; gap:11px; padding:12px 15px; border-bottom:1px solid #DDE9EF; background:linear-gradient(90deg,#F2F8FB,#FFF9EA); }
.invoice-section-head > span { flex:0 0 31px; height:31px; display:grid; place-items:center; border-radius:9px; color:white; background:#075F9B; font-size:10px; font-weight:900; box-shadow:0 5px 12px rgba(7,95,155,.18); }
.invoice-section-head h4 { margin:0; color:#173F59; font-size:13px; line-height:1.2; }
.invoice-section-head p { margin:3px 0 0; color:#71858F; font-size:10.5px; line-height:1.3; }
.invoice-form-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 16px; padding:17px; align-items:start; }
.invoice-form-grid .field { min-width:0; align-content:start; }
.invoice-form-grid .span-2 { grid-column:span 2; }
.invoice-form-grid .field label { min-height:17px; color:#385568; line-height:1.35; }
.invoice-form-grid .field input, .invoice-form-grid .field select, .invoice-form-grid .field textarea { border-color:#D2E0E7; background:white; }
.invoice-form-grid .field input:disabled { color:#5D7481; background:#F1F5F7; }
.invoice-form-grid .field .hint { display:block; min-height:29px; line-height:1.35; }
.required-mark { color:#C24A4A; font-weight:900; }
.invoice-document-field input[type="file"] { padding:6px; min-height:43px; color:#5A707D; font-size:11px; }
.invoice-document-field input[type="file"]::file-selector-button { margin-right:9px; border:0; border-radius:7px; padding:7px 10px; color:#075F9B; background:#E8F3F9; font-weight:800; cursor:pointer; }
.close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: #EEF3F1; font-size: 19px; }
.chart { padding: 18px 20px 22px; }
.bars { height: 245px; display: grid; grid-template-columns: repeat(12, minmax(24px,1fr)); align-items: end; gap: 8px; border-bottom: 1px solid var(--line); padding-top: 22px; }
.bar-group { height: 100%; display: flex; justify-content: center; align-items: end; gap: 3px; position: relative; }
.bar { width: 42%; min-height: 2px; border-radius: 4px 4px 0 0; transition: .2s; }
.bar:hover { filter: brightness(.92); }
.bar.rev { background: #0B91D5; }
.bar.exp { background: #E58B83; }
.month-labels { display: grid; grid-template-columns: repeat(12,1fr); gap: 8px; margin-top: 8px; color: var(--muted); font-size: 10px; text-align: center; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 11px; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.summary-list { padding: 12px 20px 20px; display: grid; gap: 11px; }
.summary-row { display: grid; grid-template-columns: minmax(110px,1.2fr) 2fr auto; gap: 10px; align-items: center; }
.track { height: 9px; border-radius: 999px; background: #EDF2EF; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#0B91D5,#55C8EB); }
.summary-row strong { font-size: 12px; }
.summary-row .value { font-size: 12px; font-variant-numeric: tabular-nums; }
.split-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.mini-kpi { padding: 13px; background: #F8FAF9; border: 1px solid var(--line); border-radius: 11px; }
.mini-kpi span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 5px; }
.mini-kpi strong { font-size: 17px; }
.report-total td { font-weight: 800; background: var(--green-soft); border-top: 2px solid #8CBFA9; }
.section-space { margin-top: 18px; }
.facility-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.facility-card { padding: 18px; }
.facility-card h3 { margin: 0 0 5px; }
.facility-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; }
.facility-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.facility-meta div { background: #F8FAF9; border-radius: 9px; padding: 10px; }
.facility-meta span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 3px; }
.facility-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.setting-block { padding: 20px; }
.setting-block h3 { margin: 0 0 8px; }
.setting-block p { color: var(--muted); font-size: 13px; line-height: 1.5; min-height: 40px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.api-key { display: grid; gap: 7px; margin-top: 14px; padding: 12px; border: 1px solid #F2CE78; border-radius: 10px; background: #FFF8E7; }
.api-key code { overflow-wrap: anywhere; color: #075F9B; font-size: 12px; }
.api-key small { color: #8A650F; }
.file-label input { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--brand); color: white; border-radius: 10px; padding: 12px 16px; box-shadow: 0 12px 34px rgba(0,0,0,.22); z-index: 100; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { transform: translateY(0); opacity: 1; }
.mobile-nav { display: none; }
.help-note { border-left: 4px solid var(--amber); background: var(--amber-soft); padding: 12px 14px; border-radius: 0 9px 9px 0; color: #76500F; font-size: 12px; line-height: 1.5; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: clamp(22px,4vw,56px); background: radial-gradient(circle at 8% 12%,rgba(247,191,15,.24),transparent 32%), radial-gradient(circle at 92% 86%,rgba(11,136,207,.18),transparent 34%), linear-gradient(145deg,#FFFDF7 0%,#F3F9FC 52%,#E9F4F9 100%); }
.login-shell { position: relative; isolation: isolate; width: min(1080px,100%); min-height: min(650px,calc(100vh - 60px)); display: grid; grid-template-columns: minmax(0,1.08fr) minmax(380px,.82fr); overflow: hidden; border: 1px solid rgba(7,95,155,.14); border-radius: 28px; background: rgba(255,255,255,.94); box-shadow: 0 32px 90px rgba(7,55,88,.18); }
.login-shell::after { content:""; position:absolute; z-index:-1; width:360px; height:360px; right:-180px; bottom:-220px; border-radius:50%; border:70px solid rgba(243,161,23,.12); }
.login-brand { position: relative; overflow: hidden; display: grid; align-items: center; padding: clamp(38px,5vw,68px); color: white; background: linear-gradient(150deg,#064A78 0%,#075F9B 58%,#0B88CF 100%); }
.login-brand::before { content:""; position:absolute; width:430px; height:430px; right:-230px; top:-210px; border-radius:50%; border:75px solid rgba(255,255,255,.055); }
.login-brand::after { content:""; position:absolute; left:-15%; right:-15%; bottom:-35%; height:58%; background:linear-gradient(120deg,rgba(247,191,15,.12),rgba(243,161,23,.72)); transform:rotate(-8deg); }
.login-visual { position: relative; z-index: 1; width: min(520px,100%); }
.login-brand-logo { width: min(350px,82%); padding: 13px 18px; border: 1px solid rgba(255,255,255,.20); border-radius: 17px; background: white; box-shadow: 0 18px 46px rgba(0,0,0,.17); }
.login-brand-logo img { display: block; width: 100%; height: 92px; object-fit: contain; }
.login-hero-copy { margin-top: clamp(34px,6vh,64px); max-width: 480px; }
.login-hero-copy span, .login-title > span { color:#F6B526; font-size:10px; font-weight:900; letter-spacing:1.45px; text-transform:uppercase; }
.login-hero-copy h1 { margin:9px 0 8px; color:white; font-size:clamp(34px,4.4vw,55px); letter-spacing:-1.6px; }
.login-hero-copy p { margin:0; color:#D9ECF7; font-size:16px; }
.login-features { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:38px; }
.login-features div { min-width:0; padding:13px 12px; border:1px solid rgba(255,255,255,.16); border-radius:13px; background:rgba(255,255,255,.08); backdrop-filter:blur(8px); }
.login-features b { display:block; color:white; font-size:13px; line-height:1.25; }
.login-features span { display:block; margin-top:4px; color:#C7E2F1; font-size:10px; line-height:1.3; overflow-wrap:anywhere; }
.login-panel { display:grid; place-items:center; padding:clamp(30px,4vw,54px); background:rgba(249,252,254,.92); }
.login-card { width:min(390px,100%); }
.login-title { margin:0 0 28px; }
.login-title h2 { margin:7px 0 9px; color:#075F9B; font-size:32px; letter-spacing:-.8px; }
.login-title p { margin:0; color:var(--muted); font-size:12px; line-height:1.65; }
.login-card form { display:grid; gap:17px; }
.login-card .field label { color:#294B60; }
.login-card .field input { min-height:46px; border-color:#CFE0E9; border-radius:11px; background:#fff; }
.login-button { width:100%; margin-top:4px; min-height:46px; padding:12px; }
.login-langs { margin:25px auto 0; width:max-content; }
.login-help { text-align:center; font-size:11px; color:var(--muted); margin:16px 0 0; }
.danger-zone { border-color: #F1C9C4; }
.right { text-align: right; }
.muted { color: var(--muted); }
.no-wrap { white-space: nowrap; }
.report-head { align-items: flex-start; }
.report-controls { justify-content: flex-end; }
.report-controls .field select { min-width: 150px; }
.report-controls .field:first-child select { min-width: 220px; }
.export-group { display: flex; gap: 7px; align-items: end; flex-wrap: wrap; }
.report-banner { display: grid; grid-template-columns: 1.4fr .55fr 1.2fr .8fr; gap: 1px; overflow: hidden; margin-bottom: 18px; background: #D2E2EB; border: 1px solid #C8DCE7; border-radius: 14px; box-shadow: var(--shadow); }
.report-banner > div { min-width: 0; padding: 13px 15px; background: white; }
.report-banner span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .45px; margin-bottom: 4px; }
.report-banner strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #17324A; font-size: 14px; }
.report-banner .report-check { background: linear-gradient(135deg,#E9F7FD,#F7FBFD); }
.report-banner .report-check strong { color: var(--brand); }
.report-kpis { grid-template-columns: repeat(5,minmax(0,1fr)); margin-bottom: 18px; }
.report-kpis .kpi .value { font-size: 21px; }
.report-section { margin-top: 18px; overflow: hidden; }
.report-panel { overflow: hidden; }
.report-split { margin-top: 18px; }
.report-bars { display: grid; gap: 12px; padding: 16px 20px 20px; }
.report-bar-row { display: grid; grid-template-columns: minmax(130px,1.15fr) minmax(120px,2fr) auto; gap: 12px; align-items: center; }
.report-bar-row > div:first-child { min-width: 0; }
.report-bar-row strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-bar-row small { color: var(--muted); font-size: 10px; }
.report-bar-row b { min-width: 95px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.report-track { height: 10px; border-radius: 99px; overflow: hidden; background: #EDF3F6; }
.report-track span { display: block; height: 100%; min-width: 3px; border-radius: inherit; }
.report-track .income { background: linear-gradient(90deg,#075F9B,#34AADB); }
.report-track .expense { background: linear-gradient(90deg,#D56C61,#F0A095); }
.report-control-note { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 14px 16px; border: 1px solid #BDD9E8; border-left: 5px solid var(--brand); background: #F1F8FC; border-radius: 10px; color: #315269; font-size: 12px; }
.report-control-note strong { color: var(--brand); white-space: nowrap; }
.notes-field { grid-column: 1 / -1; }
.invoice-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; padding: 14px; border: 1px solid #CFE1EB; border-radius: 14px; background: linear-gradient(135deg,#F7FBFD,#FFF9EA); }
.invoice-summary .mini-kpi { background: rgba(255,255,255,.9); }
.invoice-summary .gross { border-color: #F1C66A; }
.invoice-summary .gross strong { color: #075F9B; }
.invoice-summary > p { grid-column: 1 / -1; margin: 0; color: #476778; font-size: 11px; font-weight: 700; }
.management-card { overflow: hidden; }
.management-card .card-head { padding-bottom: 4px; align-items: flex-start; }
.management-metrics { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; padding: 16px 20px 20px; }
.management-metrics > div { min-width: 0; padding: 13px; border: 1px solid #DCE9EF; border-radius: 11px; background: #F8FBFD; }
.management-metrics span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; line-height: 1.35; margin-bottom: 6px; }
.management-metrics strong { display: block; color: #17324A; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.user-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); padding-top: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 7px 10px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px currentColor; opacity: .75; }
.status-pill.ready { color: #167252; background: #E6F5EF; }
.status-pill.pending { color: #9B630D; background: #FFF4D7; }
.backup-note { display:block; margin: 0 20px 18px; padding: 10px 12px; border-left: 3px solid var(--amber); background: #FFF9EA; border-radius: 0 8px 8px 0; }
.report-banner strong { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.3; }
@media (max-width: 1100px) {
  .topbar { align-items: flex-start; }
  .top-actions { max-width: 72%; }
  .user-badge { display: none; }
  .grid.kpis { grid-template-columns: repeat(2, 1fr); }
  .grid.two, .settings-grid { grid-template-columns: 1fr; }
  .facility-grid { grid-template-columns: repeat(2, 1fr); }
  .grid.form-grid { grid-template-columns: repeat(2, 1fr); }
  .invoice-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .report-head { flex-direction: column; }
  .report-controls { width: 100%; justify-content: flex-start; }
  .report-banner { grid-template-columns: repeat(2,1fr); }
  .report-kpis { grid-template-columns: repeat(2,1fr); }
  .management-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 960px) {
  .login-page { padding: 24px; }
  .login-shell { min-height: auto; grid-template-columns: 1fr; }
  .login-brand { padding: 28px 34px; }
  .login-visual { width: 100%; display:grid; grid-template-columns:minmax(210px,280px) minmax(0,1fr); gap:28px; align-items:center; }
  .login-brand-logo { width:100%; }
  .login-brand-logo img { height:76px; }
  .login-hero-copy { margin:0; }
  .login-hero-copy h1 { font-size:32px; }
  .login-hero-copy p { font-size:13px; }
  .login-features { display:none; }
  .login-panel { min-height:0; padding:36px 28px; }
}
@media (max-width: 760px) {
  .login-page { display:block; padding:0; background:#F3F9FC; }
  .login-shell { min-height:100vh; border:0; border-radius:0; box-shadow:none; }
  .login-brand { padding:20px; }
  .login-visual { display:block; }
  .login-brand-logo { width:min(270px,88%); margin:auto; padding:9px 13px; }
  .login-brand-logo img { height:62px; }
  .login-hero-copy { margin-top:18px; text-align:center; }
  .login-hero-copy span { display:none; }
  .login-hero-copy h1 { margin:0 0 4px; font-size:25px; letter-spacing:-.7px; }
  .login-hero-copy p { font-size:12px; }
  .login-panel { padding:28px 20px; }
  .login-title { margin-bottom:22px; }
  .login-title h2 { font-size:27px; }
  .app-shell { display: block; padding-bottom: 68px; }
  .sidebar { display: none; }
  .topbar { padding: 12px 16px; }
  .topbar-title { display: none; }
  .top-actions { width: 100%; max-width: none; justify-content: flex-end; }
  .company-switch { flex: 1 1 100%; order: -1; }
  .company-switch select { flex: 1; width: auto; }
  .company-switch > span { display: none; }
  .main { padding: 18px 14px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .grid.kpis, .grid.form-grid, .facility-grid { grid-template-columns: 1fr; }
  .inline-input { grid-template-columns: 1fr; }
  .filters { width: 100%; }
  .filters .field { flex: 1 1 140px; }
  .mobile-nav { position: fixed; z-index: 50; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(5,1fr); background: white; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
  .mobile-nav button { border: 0; background: white; padding: 9px 3px; font-size: 9px; color: var(--muted); display: grid; gap: 3px; place-items: center; }
  .mobile-nav button.active { color: var(--brand-2); font-weight: 800; }
  .mobile-nav .ico { font-size: 17px; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { border-radius: 18px 18px 0 0; max-height: 94vh; }
  .modal-head, .modal-body, .modal-actions { padding-left:16px; padding-right:16px; }
  .invoice-form-grid { grid-template-columns:1fr; padding:14px; }
  .invoice-form-grid .span-2 { grid-column:auto; }
  .invoice-form-grid .field .hint { min-height:0; }
  .invoice-section-head { align-items:flex-start; }
  .split-kpis { grid-template-columns: 1fr; }
  .report-controls .field, .report-controls .field:first-child { flex: 1 1 150px; }
  .report-controls .field select, .report-controls .field:first-child select { min-width: 0; }
  .export-group { width: 100%; }
  .export-group .btn { flex: 1 1 120px; }
  .report-banner { grid-template-columns: 1fr; }
  .report-kpis { grid-template-columns: 1fr; }
  .report-bar-row { grid-template-columns: 1fr auto; }
  .report-track { grid-column: 1 / -1; grid-row: 2; }
  .report-control-note { align-items: flex-start; flex-direction: column; }
  .invoice-summary, .management-metrics, .user-metrics { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .page-head .filters, .btn, .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  body { background: white; }
}

.bank-actions { display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.bank-actions .btn { font-size:12px; min-height:38px; }
.bank-filter { margin-bottom:18px; }
.bank-toolbar { display:flex; align-items:flex-end; flex-wrap:wrap; gap:14px 18px; padding:16px 18px; box-shadow:0 7px 22px rgba(7,55,88,.06); }
.bank-toolbar > .field { flex:1 1 210px; min-width:0; }
.bank-toolbar > .field select { min-height:40px; padding:9px 11px; font-size:13px; }
.bank-toolbar > .btn { min-height:40px; }
.bank-account-caption { display:grid; align-content:center; gap:3px; flex:1 1 160px; min-width:0; min-height:40px; padding-bottom:2px; }
.bank-account-caption strong { color:#244C65; font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.bank-account-caption small { color:var(--muted); font-size:11px; line-height:1.5; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.bank-account-caption:empty { display:none; }
.bank-day-control { display:grid; gap:6px; margin-left:auto; }
.bank-day-control > label { color:#516462; font-size:12px; font-weight:700; }
.bank-day-control > div { display:flex; align-items:stretch; gap:6px; }
.bank-day-control input { width:153px; min-width:0; min-height:40px; border:1px solid #CFDFE8; border-radius:9px; padding:8px 10px; background:white; color:var(--ink); font-size:13px; font-variant-numeric:tabular-nums; }
.bank-day-control .btn { min-width:36px; padding:6px 9px; color:var(--brand); font-size:17px; }
.bank-day-control input:focus { outline:0; border-color:var(--brand-2); box-shadow:0 0 0 3px rgba(11,136,207,.12); }
.bank-kpis { margin:18px 0; }
.bank-kpis .kpi { min-width:0; padding:17px; }
.bank-kpis .value { font-size:clamp(19px,1.8vw,25px); line-height:1.25; font-variant-numeric:tabular-nums; }
.bank-kpis .sub { line-height:1.5; }
.bank-reconciliation { display:flex; align-items:center; flex-wrap:wrap; gap:9px 22px; padding:15px 18px; border:1px solid #CDDDE8; border-left:4px solid var(--brand); border-radius:12px; background:#EEF6FB; color:#31576F; font-size:12px; line-height:1.5; }
.bank-reconciliation > strong { color:var(--brand); font-size:13px; }
.bank-reconciliation > span { font-variant-numeric:tabular-nums; }
.bank-reconciliation > b { margin-left:auto; padding:5px 9px; border-radius:7px; background:white; color:var(--brand); font-variant-numeric:tabular-nums; }
.bank-reconciliation > p { flex:1 1 100%; margin:0; font-size:12px; color:#5C7383; }
.bank-reconciliation.has-difference { border-color:#EDC2BE; border-left-color:var(--red); background:#FFF5F3; color:#854B44; }
.bank-reconciliation.has-difference > strong, .bank-reconciliation.has-difference > b { color:#A43D34; }
.bank-reconciliation.has-difference > b { background:#FBE5E0; }
.bank-table { min-width:850px; margin-top:14px; }
.bank-table th { padding:10px 9px; font-size:10px; line-height:1.35; letter-spacing:.2px; background:#F2F7FA; color:#456173; }
.bank-table td { padding:11px 9px; font-size:11.5px; line-height:1.45; }
.bank-table th:first-child, .bank-table td:first-child { padding-left:17px; }
.bank-table th:last-child, .bank-table td:last-child { padding-right:17px; }
.bank-table td:first-child { white-space:nowrap; font-variant-numeric:tabular-nums; }
.bank-table td:not(.num) { max-width:260px; }
.bank-table td.num { white-space:nowrap; font-weight:650; }
.bank-table td.income { color:#167252; }
.bank-table td.expense { color:var(--red); }
.bank-table tbody tr:hover { background:#F8FBFD; }
.bank-table .badge { padding:4px 7px; font-size:10px; }
.bank-table .btn.small { padding:6px 7px; font-size:11px; line-height:1.3; }
.bank-table .cell-sub { max-width:260px; white-space:normal; font-size:10px; line-height:1.4; }
.bank-table td:last-child > strong { font-size:11px; }
.bank-reconciliation ~ .card > .card-head { flex-wrap:wrap; }
.bank-reconciliation ~ .card > .card-head .filters .field { flex:0 1 auto; min-width:96px; }
.bank-invoice-tabs { flex:0 1 auto; flex-wrap:wrap; min-width:0; max-width:100%; }
.bank-invoice-tabs button { min-height:34px; }
.bank-empty { display:grid; place-items:center; gap:14px; min-height:220px; }
.cell-sub { display:block; color:var(--muted); margin-top:3px; }
.span-2 { grid-column:1/-1; }
.company-profile-link { width:32px; height:32px; min-width:32px; padding:0; }
.company-profile-head { align-items:center; }
.company-eyebrow { display:block; margin-bottom:7px; color:var(--brand); font-size:11px; font-weight:800; letter-spacing:.65px; text-transform:uppercase; }
.company-profile-head h2 { font-size:26px; }
.company-profile-head p { max-width:700px; font-size:13px; line-height:1.5; }
.company-profile-overview { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; overflow:hidden; border:1px solid #D3E3EC; border-radius:14px; background:#D3E3EC; margin:0 0 18px; }
.company-profile-overview > div { padding:17px 19px; background:#F7FBFD; }
.company-profile-overview span { display:block; color:var(--muted); font-size:11px; margin-bottom:5px; }
.company-profile-overview strong { display:block; color:#19445E; font-size:17px; overflow-wrap:anywhere; }
.company-profile-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:18px; }
.company-profile-card { min-width:0; padding:22px; }
.company-profile-card h3 { margin:0 0 16px; font-size:16px; color:#204B66; }
.company-profile-card dl { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 22px; margin:0; }
.company-detail { min-width:0; }
.company-detail dt { color:var(--muted); font-size:11px; line-height:1.4; margin-bottom:5px; }
.company-detail dd { margin:0; color:var(--ink); font-size:13px; font-weight:600; line-height:1.5; white-space:pre-line; overflow-wrap:anywhere; }
.company-section-heading { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:14px; }
.company-section-heading h3, .company-section-heading h4 { margin:0; }
.company-inline-meta { color:var(--muted); font-size:12px; }
.company-preserve-lines { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; line-height:1.65; margin:0; }
.company-empty-note { font-size:13px; color:var(--muted); margin:0; padding:14px 0; }
.company-partners-table { min-width:720px; }
.company-partners-table td { font-size:12px; }
.company-partners-table td.num { white-space:nowrap; }
.company-profile-form { display:grid; gap:17px; }
.company-form-section { border:1px solid #D9E6ED; border-radius:13px; padding:18px; background:#FCFEFF; }
.company-form-section h4 { font-size:14px; margin:0 0 16px; color:#214D68; }
.company-form-section .company-section-heading h4 { margin:0; }
.company-form-section .form-grid { gap:14px; align-items:start; }
.company-form-section .field { min-width:0; }
.company-form-section .field label { font-size:11px; line-height:1.35; }
.company-form-section .field input, .company-form-section .field select, .company-form-section .field textarea { font-size:13px; }
.company-form-section input[type="number"] { font-variant-numeric:tabular-nums; }
.profile-wide { grid-column:1/-1; }
.company-info-note { margin:0; padding:11px 13px; background:#EEF6FB; border:1px solid #D7E7F0; border-radius:10px; color:#486D83; font-size:12px; line-height:1.55; }
.ownership-summary { display:flex; flex-wrap:wrap; gap:8px 24px; padding:11px 13px; margin-bottom:15px; border-radius:9px; background:#F0F7F4; color:#3A675A; font-size:12px; font-variant-numeric:tabular-nums; }
.ownership-summary.has-error { color:#A23636; background:#FFF0EF; }
.company-partner-card { min-width:0; border:1px solid #D8E5ED; border-radius:11px; padding:16px; margin:15px 0 0; background:white; }
.company-partner-card legend { padding:0 7px; color:var(--brand); font-size:12px; font-weight:750; }
.company-partner-card > .btn { margin-top:10px; }
.company-vault-card { display:flex; align-items:center; gap:18px; padding:21px; border-color:#CFDEEA; background:linear-gradient(120deg,#F4F9FC,#FFFFFF); }
.company-vault-icon { display:grid; place-items:center; flex:0 0 46px; height:46px; color:var(--brand); background:#E0EFF7; border-radius:12px; font-size:26px; }
.company-vault-card > div:nth-child(2) { flex:1; min-width:0; }
.company-vault-card h3 { margin:0 0 6px; font-size:16px; }
.company-vault-card p, .company-vault-card small { display:block; margin:0; color:#567183; font-size:12px; line-height:1.55; }
.company-vault-card small { margin-top:5px; }
.company-vault-actions { display:grid; gap:7px; justify-items:start; }
.company-vault-modal .modal { width:min(980px,100%); }
.company-vault-modal form { display:grid; gap:16px; }
.company-vault-modal .modal-head { border-bottom-color:#CFE0EC; background:#F3F9FC; }
.company-vault-modal .modal-head h3 { font-size:18px; }
.vault-fields { border:0; padding:0; margin:0; min-width:0; display:grid; gap:16px; }
.vault-password-row { display:flex; gap:8px; min-width:0; }
.vault-password-row input { min-width:0; flex:1; }
.vault-password-row .btn { flex:0 0 auto; min-width:66px; }
.vault-context { margin:0; color:var(--brand); font-size:15px; font-weight:700; }
.company-vault-modal .field-hint { margin:-8px 0 0; color:var(--muted); font-size:11px; }
.vault-error { margin:0; padding:12px 14px; border:1px solid #E9BBBB; border-radius:10px; background:#FFF0EF; color:#A23939; font-size:13px; line-height:1.5; }
.vault-key-warning { margin:0; padding:15px; border:1px solid #EFC66E; border-left:4px solid var(--amber); border-radius:10px; background:#FFF7E4; color:#7D571A; font-size:13px; line-height:1.65; }
.vault-confirm { display:flex; align-items:flex-start; gap:10px; font-size:13px; line-height:1.6; }
.vault-confirm input { flex:0 0 auto; margin-top:5px; }
@media (max-width:1100px) { .company-profile-grid { grid-template-columns:1fr; } .company-vault-card { flex-wrap:wrap; } .company-vault-actions { flex:1 1 100%; grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .company-profile-head h2 { font-size:23px; }
  .company-profile-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-profile-overview > div { padding:13px; }
  .company-profile-card { padding:17px; }
  .company-profile-card dl { grid-template-columns:1fr; gap:15px; }
  .company-form-section { padding:14px; }
  .company-form-section .form-grid { grid-template-columns:1fr; }
  .company-partner-card { padding:12px; }
  .company-vault-card { gap:12px; padding:17px; }
  .company-vault-icon { display:none; }
  .company-vault-actions { grid-template-columns:1fr; }
  .company-vault-modal .form-grid { grid-template-columns:1fr; }
  .company-vault-modal .modal-head h3 { font-size:16px; }
}
@media print { .company-vault-modal, .company-vault-card { display:none !important; } }
@media (max-width:1100px) {
  .bank-toolbar { gap:12px; }
  .bank-account-caption { flex-basis:140px; }
  .bank-day-control { flex:1 1 100%; margin-left:0; padding-top:11px; border-top:1px solid #E1EAF0; }
  .bank-day-control > div { align-self:start; }
  .bank-reconciliation > strong { flex-basis:100%; }
}
@media (max-width:760px) {
  .bank-actions { width:100%; justify-content:flex-start; }
  .bank-actions .btn { flex:1 1 145px; min-height:42px; white-space:normal; }
  .bank-toolbar { padding:14px; gap:12px; }
  .bank-toolbar > .field { flex-basis:100%; }
  .bank-account-caption { flex:1 1 150px; }
  .bank-toolbar > .btn { flex:0 1 auto; white-space:normal; }
  .bank-day-control > div { width:100%; }
  .bank-day-control input { flex:1 1 auto; width:0; min-height:42px; }
  .bank-day-control .btn { min-width:42px; }
  .grid.kpis.bank-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .bank-kpis .kpi { padding:14px; }
  .bank-kpis .label, .bank-kpis .sub { font-size:11px; }
  .bank-kpis .value { font-size:20px; }
  .bank-reconciliation { display:grid; grid-template-columns:1fr; gap:7px; padding:13px 14px; }
  .bank-reconciliation > b { justify-self:start; margin:2px 0 0; }
  .bank-table { min-width:820px; }
  .bank-table th, .bank-table td { padding-left:10px; padding-right:10px; }
  .bank-table td { font-size:12px; }
  .bank-invoice-tabs { width:100%; }
  .bank-invoice-tabs button { flex:1 1 95px; justify-content:center; white-space:normal; line-height:1.35; }
  .mobile-nav { grid-template-columns:repeat(7,minmax(74px,1fr)); overflow-x:auto; overscroll-behavior-x:contain; }
  .span-2 { grid-column:auto; }
}
@media (max-width:400px) {
  .grid.kpis.bank-kpis { grid-template-columns:1fr; }
}
@media print {
  .bank-toolbar, .bank-invoice-tabs, .bank-actions { display:none !important; }
  .bank-table { min-width:0; font-size:9px; }
  .bank-table th, .bank-table td { padding:6px; font-size:9px; }
  .bank-reconciliation { break-inside:avoid; }
}

/* Unified portal layout. Screen-only rules never reshape printed report tables. */
.report-historical-note { margin:18px 0; padding:16px 20px; background:#FFF8E8; border:1px solid #EBD8A9; border-radius:12px; color:#655026; font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.report-historical-note p { margin:0 0 8px; }
.report-historical-note p:last-child { margin-bottom:0; }
.historical-import-preview { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.historical-import-preview h4 { margin:0 0 8px; font-size:17px; }
.historical-import-preview details { margin:20px 0; }
.historical-import-preview summary { cursor:pointer; padding:12px 0; font-weight:700; }
.historical-import-preview .table-wrap { margin:12px 0; max-height:480px; overflow:auto; }
.historical-confirm { display:flex; align-items:flex-start; gap:12px; margin:20px 0; font-size:14px; line-height:1.6; }
.historical-confirm input { width:20px; height:20px; flex:0 0 20px; margin-top:2px; }
.historical-table td:last-child { max-width:280px; overflow-wrap:anywhere; }
.mobile-menu-toggle, .mobile-menu-backdrop { display:none; }
:focus-visible { outline:3px solid #178CCC; outline-offset:3px; }
@media screen {
  h1,h2,h3,h4 { font-weight:700; line-height:1.3; }
  .sidebar { overflow-y:auto; scrollbar-width:thin; }
  .nav button { font-size:14px; line-height:1.4; min-height:44px; white-space:normal; }
  .sidebar-footer { padding-top:16px; margin-top:24px; font-size:12px; }
  .topbar { padding:16px 24px; gap:20px; }
  .topbar-title { flex:1 1 240px; min-width:0; }
  .topbar h1 { font-size:24px; letter-spacing:-.5px; }
  .topbar p { max-width:540px; line-height:1.5; }
  .top-actions { flex:0 1 570px; min-width:0; }
  .company-switch { min-width:0; max-width:100%; }
  .company-switch select { font-size:13px; font-weight:700; text-overflow:ellipsis; }
  .company-switch .btn { flex-shrink:0; }
  .top-actions .user-badge { max-width:230px; display:inline-block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .main { padding:24px; }
  .page-head { gap:16px; align-items:flex-start; margin-bottom:20px; }
  .page-head > div { min-width:0; }
  .page-head h2,.bank-simple-head h2,.company-profile-head h2 { font-size:22px; line-height:1.3; letter-spacing:-.3px; }
  .page-head p { font-size:14px; line-height:1.5; }
  .grid,.settings-grid,.company-profile-grid { gap:16px; }
  .card { border-radius:14px; }
  .card.pad,.kpi,.facility-card,.setting-block,.company-profile-card { padding:20px; }
  .card-head { padding:20px 20px 0; align-items:flex-start; flex-wrap:wrap; }
  .card-head h3,.company-profile-card h3,.company-vault-card h3 { font-size:16px; line-height:1.4; }
  .card-head p,.card-head small { font-size:12px; line-height:1.5; }
  .kpi { display:flex; flex-direction:column; min-width:0; }
  .kpi .label { font-size:13px; line-height:1.45; margin-bottom:12px; min-height:38px; }
  .kpi .value,.bank-kpis .value,.report-kpis .kpi .value { font-size:clamp(20px,1.65vw,24px); font-weight:700; line-height:1.3; letter-spacing:-.5px; }
  .kpi .sub { font-size:12px; line-height:1.5; margin-top:auto; padding-top:10px; }
  .bank-balance-strip > div { display:flex; flex-direction:column; }
  .bank-balance-strip span { min-height:40px; font-size:13px; line-height:1.5; }
  .bank-balance-strip strong { font-size:24px; font-weight:700; line-height:1.3; }
  .bank-balance-strip small { margin-top:auto; padding-top:8px; }
  .field { min-width:0; align-content:start; }
  .field label,.company-form-section .field label,.bank-filter-fields .field label,.bank-report-controls .field label,.invoice-period-filters .field label { font-size:12px; font-weight:700; line-height:1.5; text-transform:none; letter-spacing:0; }
  .field input,.field select,.field textarea,.company-form-section .field input,.company-form-section .field select,.company-form-section .field textarea { font-size:14px; line-height:1.5; min-height:42px; }
  .field .hint,.company-detail dt,.company-vault-modal .field-hint { font-size:12px; line-height:1.5; }
  .btn,.btn.small,.bank-actions .btn,.bank-row-actions .btn { font-size:13px; font-weight:700; line-height:1.4; min-height:36px; }
  .badge,.compact-badge,.status-pill { font-size:11px; line-height:1.4; font-weight:700; white-space:normal; }
  .invoice-filter-row { flex-wrap:wrap; align-items:end; }
  .invoice-period-filters { flex-wrap:wrap; flex:1 1 430px; }
  .invoice-period-filters .field { flex:1 1 110px; }
  .invoice-period-filters .field:nth-child(2) { flex-basis:150px; }
  .invoice-status-tabs { flex-wrap:wrap; max-width:100%; }
  .invoice-status-tabs button { font-size:12px; font-weight:700; min-height:36px; white-space:normal; line-height:1.4; }
  .invoice-status-tabs button b { font-size:11px; }
  .invoice-table-wrap { overflow:auto; }
  .invoice-list-card .invoice-table { min-width:920px; }
  .invoice-list-card .invoice-table .col-party { width:10%; }
  .invoice-list-card .invoice-table .col-status { width:8%; }
  .invoice-list-card .invoice-table th { padding:12px 6px; font-size:10px; line-height:1.4; text-transform:none; letter-spacing:0; }
  .invoice-list-card .invoice-table td { padding:12px 6px; font-size:11px; line-height:1.5; }
  .invoice-list-card td .badge { font-size:10px; line-height:1.4; }
  .invoice-actions { flex-wrap:wrap; gap:4px; }
  .icon-btn { width:26px; height:32px; min-width:26px; }
  th { font-size:11px; letter-spacing:0; line-height:1.45; }
  td { line-height:1.5; }
  .table-wrap { max-width:100%; -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain; }
  .invoice-section-head h4,.company-form-section h4 { font-size:14px; line-height:1.4; }
  .invoice-section-head p { font-size:12px; line-height:1.5; }
  .invoice-form-grid { align-items:start; }
  .invoice-form-grid .field label { min-height:36px; display:flex; align-items:end; }
  .invoice-summary .mini-kpi strong,.mini-kpi strong { display:block; font-size:20px; line-height:1.4; font-weight:700; overflow-wrap:anywhere; }
  .invoice-summary .mini-kpi span,.mini-kpi span { font-size:12px; line-height:1.5; min-height:36px; }
  .invoice-summary > p,.management-metrics span,.facility-meta span { font-size:12px; line-height:1.5; }
  .company-profile-overview span { font-size:12px; line-height:1.5; min-height:36px; }
  .company-profile-overview strong { font-size:16px; line-height:1.5; }
  .company-detail dd,.company-preserve-lines,.company-partners-table td { font-size:14px; }
  .report-banner span { font-size:11px; line-height:1.4; }
  .report-banner strong { font-size:14px; line-height:1.5; overflow-wrap:anywhere; }
  .report-controls { min-width:0; }
  .page-head > .filters:not(.report-controls) { display:grid; grid-template-columns:90px 120px minmax(170px,260px); }
  .production-page-head { align-items:center; }
  .production-add-button { flex:0 0 auto; min-height:44px; padding:11px 18px; }
  .production-filter-card { padding:16px; margin-bottom:18px; }
  .production-period-filters { display:grid; grid-template-columns:minmax(90px,.45fr) minmax(160px,.65fr) minmax(240px,1.6fr); align-items:end; gap:14px; width:100%; }
  .production-period-filters .field { min-width:0; }
  .report-bar-row strong,.summary-row strong { font-size:13px; white-space:normal; line-height:1.5; }
  .report-bar-row b,.summary-row .value { font-size:13px; overflow-wrap:anywhere; }
  .legend { flex-wrap:wrap; font-size:12px; gap:8px 14px; }
  .bars { grid-template-columns:repeat(12,minmax(0,1fr)); }
  .month-labels { grid-template-columns:repeat(12,minmax(0,1fr)); }
  .company-vault-actions .btn,.company-section-heading .btn,.button-row .btn { white-space:normal; }
  .modal-head { gap:16px; align-items:flex-start; }
  .modal-head h3 { font-size:20px; line-height:1.4; }
  .close { flex:0 0 40px; width:40px; height:40px; }
  .login-title h2 { line-height:1.3; }
  .login-title p,.login-help { font-size:13px; }
  .login-langs button { min-height:40px; min-width:44px; }
}
@media screen and (min-width:961px) and (max-width:1280px) {
  .app-shell { grid-template-columns:230px minmax(0,1fr); }
  .sidebar { padding:18px 12px; }
  .topbar { align-items:flex-start; flex-wrap:wrap; }
  .topbar-title { flex-basis:100%; }
  .top-actions { flex-basis:100%; max-width:100%; justify-content:flex-start; }
  .company-switch { flex:1; }
  .company-switch select { flex:1; width:auto; }
  .topbar p { max-width:none; }
  .report-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .bank-balance-strip { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 0; }
  .bank-balance-strip > div:nth-child(2) { border-right:0; }
}
@media screen and (max-width:960px) {
  .app-shell { display:block; padding-bottom:calc(80px + env(safe-area-inset-bottom)); }
  .sidebar { display:none; }
  .topbar { position:relative; padding:16px; display:grid; grid-template-columns:44px minmax(0,1fr); gap:12px; background:#F6F9FB; }
  .mobile-menu-toggle { display:inline-flex; width:44px; height:44px; align-items:center; justify-content:center; border:1px solid #CCDDE8; border-radius:12px; color:var(--brand); background:white; font-size:22px; }
  .topbar-title { display:block; min-width:0; align-self:center; }
  .topbar h1 { font-size:21px; line-height:1.3; }
  .topbar p { display:none; }
  .top-actions { display:flex; grid-column:1/-1; width:100%; max-width:none; justify-content:space-between; gap:10px; }
  .company-switch { flex:1 1 100%; order:-1; width:100%; gap:4px; padding:4px; }
  .company-switch > span { display:none; }
  .company-switch select { flex:1; width:0; min-width:0; min-height:44px; font-size:16px; padding:8px; }
  .company-switch .company-add,.company-switch .company-edit,.company-switch .company-profile-link { min-width:40px; width:40px; height:44px; padding:0; font-size:18px; }
  .top-actions .user-badge { display:none; }
  .top-actions > .btn { min-height:40px; font-size:12px; }
  .lang-switch { margin-left:auto; }
  .lang-switch button { min-width:42px; min-height:38px; }
  .main { padding:20px; }
  .grid.two,.settings-grid,.company-profile-grid { grid-template-columns:minmax(0,1fr); }
  .grid.kpis,.grid.kpis.bank-kpis,.report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mobile-nav { position:fixed; z-index:50; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); overflow:visible; padding:6px 4px calc(6px + env(safe-area-inset-bottom)); background:white; border-top:1px solid var(--line); box-shadow:0 -4px 20px rgba(7,55,88,.08); }
  .mobile-nav button { min-width:0; min-height:54px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; border:0; border-radius:10px; background:white; color:#5B7180; font-size:11px; line-height:1.3; padding:6px 2px; white-space:normal; overflow-wrap:anywhere; }
  .mobile-nav button.active { background:#EAF5FC; color:var(--brand); font-weight:700; }
  .mobile-nav .ico { font-size:20px; height:24px; line-height:24px; }
  .mobile-menu-backdrop { position:fixed; inset:0; z-index:80; display:flex; align-items:stretch; background:rgba(8,30,46,.48); padding:0; }
  .mobile-menu-panel { width:min(360px,calc(100% - 32px)); max-height:100vh; max-height:100dvh; overflow-y:auto; background:white; padding:24px 20px calc(24px + env(safe-area-inset-bottom)); box-shadow:16px 0 50px rgba(4,38,61,.18); }
  .mobile-menu-panel img { width:190px; max-width:calc(100% - 50px); height:76px; object-fit:contain; }
  body.mobile-menu-open { overflow:hidden; }
  .mobile-menu-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-top:16px; margin-bottom:20px; }
  .mobile-menu-heading > div { min-width:0; }
  .mobile-menu-heading h2 { margin:0 0 6px; font-size:21px; }
  .mobile-menu-heading p { margin:0; font-size:12px; color:var(--muted); overflow-wrap:anywhere; }
  .mobile-menu-close { width:44px; height:44px; flex-shrink:0; border:0; background:#EDF4F8; color:var(--brand); border-radius:12px; font-size:24px; }
  .mobile-menu-nav { display:grid; gap:8px; margin-top:20px; }
  .mobile-menu-nav button { display:flex; align-items:center; gap:14px; width:100%; min-height:54px; text-align:left; padding:14px; border:1px solid transparent; border-radius:12px; background:white; color:var(--ink); font-size:15px; line-height:1.4; white-space:normal; }
  .mobile-menu-nav button.active { background:#EAF5FC; border-color:#C5E2F3; color:var(--brand); font-weight:700; }
  .mobile-menu-nav .ico { width:24px; flex:0 0 24px; font-size:22px; text-align:center; }
  .toast { left:16px; right:16px; bottom:calc(86px + env(safe-area-inset-bottom)); max-width:500px; margin:auto; }
  .company-vault-card { flex-wrap:wrap; }
  .company-vault-actions { flex:1 1 100%; }
}
@media screen and (max-width:760px) {
  .main { padding:18px 12px; }
  .page-head { flex-direction:column; align-items:stretch; gap:12px; }
  .page-head h2,.bank-simple-head h2,.company-profile-head h2 { font-size:21px; }
  .page-head p { font-size:13px; }
  .page-head .btn { min-height:44px; white-space:normal; }
  .card.pad,.kpi,.facility-card,.setting-block,.company-profile-card { padding:16px; }
  .card-head { padding:16px 16px 0; gap:10px; }
  .grid,.settings-grid,.company-profile-grid,.facility-grid { gap:12px; }
  .grid.kpis,.grid.kpis.bank-kpis,.report-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .kpi { padding:14px; }
  .kpi .label { font-size:12px; min-height:36px; margin-bottom:6px; }
  .kpi .value,.bank-kpis .value,.report-kpis .kpi .value { font-size:clamp(18px,4.5vw,24px); letter-spacing:-.5px; }
  .kpi .sub { font-size:11px; line-height:1.5; padding-top:8px; }
  .btn,.btn.small,.bank-actions .btn,.bank-row-actions .btn { min-height:44px; font-size:13px; white-space:normal; }
  .field input,.field select,.field textarea,.company-form-section .field input,.company-form-section .field select,.company-form-section .field textarea,.bank-day-control input,.invoice-period-filters select { font-size:16px; line-height:1.5; min-height:46px; max-width:100%; }
  .field label,.company-form-section .field label,.invoice-period-filters .field label { font-size:12px; }
  .filters { gap:12px; }
  .filters .field { min-width:0; }
  .page-head > .filters:not(.report-controls) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-head > .filters:not(.report-controls) > .field:last-child { grid-column:1/-1; }
  .production-page-head { align-items:stretch; }
  .production-add-button { width:100%; }
  .production-filter-card { padding:14px; margin-bottom:14px; }
  .production-period-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .production-period-filters .field:last-child { grid-column:1/-1; }
  .grid.form-grid,.invoice-form-grid,.company-form-section .form-grid,.facility-grid { grid-template-columns:minmax(0,1fr); }
  .span-2,.invoice-form-grid .span-2 { grid-column:1/-1; }
  .invoice-page-head { display:flex; flex-direction:row; align-items:center; gap:10px; margin-bottom:10px; }
  .invoice-page-head > div { min-width:0; }
  .invoice-page-head h2 { font-size:20px; margin-bottom:3px; }
  .invoice-page-head p { font-size:11px; margin:0; }
  .invoice-desktop-description { display:none; }
  .invoice-page-head .btn { width:auto; min-height:40px; padding:8px 10px; font-size:12px; }
  .invoice-filter-card { padding:10px; margin-bottom:10px; }
  .invoice-filter-row { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
  .invoice-period-filters { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1fr) minmax(0,1.3fr); width:100%; gap:7px; }
  .invoice-period-filters .field:nth-child(n) { max-width:none; width:100%; }
  .invoice-period-filters .field:nth-child(3) { grid-column:auto; }
  .invoice-period-filters .field label { font-size:10px; margin-bottom:4px; letter-spacing:0; }
  .invoice-period-filters select { min-height:42px; padding:7px 5px; font-size:16px; text-overflow:ellipsis; }
  .invoice-status-tabs { width:100%; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  .invoice-status-tabs button { min-width:0; min-height:44px; padding:6px 4px; font-size:11px; justify-content:center; flex-wrap:wrap; gap:4px; }
  .invoice-status-tabs button b { font-size:10px; padding:2px 5px; }
  .invoice-tab-full { display:none; }
  .invoice-tab-short { display:inline; }
  .invoice-list-card { overflow:visible; background:transparent; border:0; box-shadow:none; }
  .invoice-list-card > .invoice-currency-note,.invoice-table-wrap { display:none; }
  .invoice-mobile-list { display:block; background:white; border:1px solid #D8E5ED; border-radius:12px; overflow:hidden; }
  .invoice-mobile-list-hint { margin:0; padding:8px 11px; background:#EFF6FA; color:#607888; font-size:10px; line-height:1.4; border-bottom:1px solid #DDE8EE; }
  .invoice-mobile-row { border-bottom:1px solid #E1E9EE; }
  .invoice-mobile-row summary { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,45%) 10px; align-items:center; gap:8px; min-height:82px; padding:10px 11px; list-style:none; cursor:pointer; -webkit-tap-highlight-color:rgba(0,109,173,.08); }
  .invoice-mobile-row summary::-webkit-details-marker { display:none; }
  .invoice-mobile-row summary::marker { display:none; content:""; }
  .invoice-mobile-row summary:focus-visible { outline:2px solid #1688BA; outline-offset:-3px; border-radius:6px; }
  .invoice-mobile-party { display:flex; flex-direction:column; gap:4px; min-width:0; }
  .invoice-mobile-party > strong { display:block; font-size:12px; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .invoice-mobile-party > small { display:block; color:#657C88; font-size:10px; font-variant-numeric:tabular-nums; line-height:1.4; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .invoice-mobile-direction { font-size:10px; font-weight:700; line-height:1.4; }
  .invoice-mobile-direction.income { color:#237655; }
  .invoice-mobile-direction.expense { color:#B34B4B; }
  .invoice-mobile-payment { display:flex; flex-direction:column; align-items:flex-end; gap:6px; min-width:0; }
  .invoice-mobile-gross { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:flex-end; gap:2px 4px; max-width:100%; min-width:0; color:#173A42; font-size:13px; line-height:1.35; text-align:right; font-variant-numeric:tabular-nums; }
  .invoice-mobile-gross > span:first-child { min-width:0; max-width:100%; overflow-wrap:anywhere; }
  .invoice-mobile-gross .invoice-currency-code { font-size:9px; }
  .invoice-mobile-payment .badge { max-width:100%; padding:3px 6px; font-size:10px; line-height:1.4; white-space:normal; text-align:right; }
  .invoice-mobile-chevron { color:#60808F; font-size:15px; line-height:1; transition:transform .15s; }
  .invoice-mobile-row[open] > summary { background:#F1F7FB; }
  .invoice-mobile-row[open] .invoice-mobile-chevron { transform:rotate(180deg); }
  .invoice-mobile-detail { padding:0 11px 12px; background:#F9FBFD; border-top:1px solid #E2ECF3; }
  .invoice-mobile-detail dl { margin:0; }
  .invoice-mobile-detail dl > div { display:grid; grid-template-columns:minmax(0,40%) minmax(0,1fr); gap:10px; align-items:start; padding:9px 0; border-bottom:1px solid #E6EDF2; }
  .invoice-mobile-detail dt { color:#607888; font-size:11px; line-height:1.5; font-weight:600; overflow-wrap:anywhere; }
  .invoice-mobile-detail dd { margin:0; min-width:0; color:#203D48; font-size:12px; line-height:1.5; text-align:right; overflow-wrap:anywhere; }
  .invoice-mobile-detail .invoice-money-original { font-size:12px; }
  .invoice-mobile-detail .invoice-money-equivalent { font-size:10px; }
  .invoice-mobile-detail .invoice-money-stack { gap:3px; }
  .invoice-mobile-detail-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; padding-top:10px; }
  .invoice-mobile-detail-actions:empty { display:none; }
  .invoice-mobile-detail-actions .invoice-actions { margin-left:auto; gap:10px; }
  .invoice-mobile-detail-actions .icon-btn { width:44px; min-width:44px; height:44px; font-size:17px !important; background:white; border:1px solid #DCE7ED; }
  .invoice-mobile-amount-note { margin:0; padding:9px 11px; color:#607888; background:#F5F9FC; font-size:10px; line-height:1.5; }
  table.mobile-card-table,.invoice-list-card table.mobile-card-table { display:block; min-width:0; width:100%; table-layout:auto; border-collapse:separate; }
  table.mobile-card-table colgroup { display:none; }
  table.mobile-card-table thead { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
  table.mobile-card-table tbody { display:block; padding:12px; }
  .invoice-list-card table.mobile-card-table tbody { padding:0; }
  table.mobile-card-table tr { display:block; width:100%; border:1px solid #D8E5ED; border-radius:12px; margin:0 0 12px; background:white; box-shadow:0 3px 10px rgba(7,55,88,.035); overflow:hidden; }
  table.mobile-card-table tr:last-child { margin-bottom:0; }
  table.mobile-card-table td,.invoice-list-card table.mobile-card-table td { display:grid; grid-template-columns:minmax(0,40%) minmax(0,1fr); align-items:start; gap:12px; position:relative; width:100%; min-height:42px; max-width:none; padding:10px 14px; text-align:left; font-size:13px; line-height:1.55; white-space:normal; overflow-wrap:anywhere; border-bottom:1px solid #ECF1F4; }
  table.mobile-card-table td::before { content:attr(data-label); grid-column:1; font-size:11px; line-height:1.55; font-weight:700; color:#607888; text-transform:none; letter-spacing:0; text-align:left; }
  table.mobile-card-table .mobile-cell-value { grid-column:2; min-width:0; }
  table.mobile-card-table td.num { text-align:right; font-weight:700; }
  table.mobile-card-table td:first-child,.invoice-list-card table.mobile-card-table td:first-child { background:#F5F9FC; padding-left:14px; }
  table.mobile-card-table td:last-child { border-bottom:0; }
  table.mobile-card-table td[colspan],.invoice-list-card table.mobile-card-table td[colspan] { display:block; padding:14px; text-align:left; }
  table.mobile-card-table td[colspan]::before { display:none; }
  table.mobile-card-table tr.mobile-total-row { border-color:#A8CEDF; }
  table.mobile-card-table tr.mobile-empty-row td { text-align:center; padding:28px 16px; }
  table.mobile-card-table .invoice-cell-text { display:block; -webkit-line-clamp:unset; overflow:visible; }
  table.mobile-card-table .invoice-number { max-width:100%; white-space:normal; text-overflow:clip; overflow:visible; }
  table.mobile-card-table .invoice-amount,table.mobile-card-table .no-wrap { white-space:normal; }
  table.mobile-card-table .invoice-money-stack { gap:4px; }
  table.mobile-card-table .invoice-money-original { font-size:14px; }
  table.mobile-card-table .invoice-money-equivalent { font-size:11px; }
  table.mobile-card-table .badge,.invoice-list-card table.mobile-card-table td .badge { font-size:11px; padding:5px 7px; white-space:normal; overflow:visible; }
  table.mobile-card-table .icon-btn { width:44px; min-width:44px; height:44px; font-size:17px !important; }
  .invoice-actions,.bank-row-actions { gap:6px; flex-wrap:wrap; }
  .bank-account-bar { padding:16px; gap:14px; align-items:stretch; }
  .bank-account-bar .bank-account-caption { flex:1 1 100%; }
  .bank-account-bar > .btn { flex:1 1 calc(50% - 7px); }
  .bank-account-bar > .field { flex:1 1 100%; max-width:none; }
  .bank-account-bar .bank-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bank-balance-strip { padding:16px 0; gap:18px 0; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bank-balance-strip > div { padding:0 14px; }
  .bank-balance-strip span { min-height:40px; font-size:12px; margin-bottom:4px; }
  .bank-balance-strip strong { font-size:clamp(18px,4.3vw,23px); }
  .bank-balance-strip small { font-size:11px; }
  .bank-filter-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .bank-filter-fields .bank-search { grid-column:1/-1; }
  .bank-filter-fields .field { min-width:0; }
  .bank-presets { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .bank-list-head { display:block; }
  .bank-list-head > small { display:block; margin-top:10px; }
  .bank-type-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .bank-pagination { flex-wrap:wrap; gap:12px; padding:14px; }
  .bank-pagination > div { margin-left:auto; }
  .chart { padding:16px 12px; }
  .bars { height:190px; gap:5px; }
  .bar-group { gap:2px; }
  .month-labels { gap:2px; font-size:9px; }
  .summary-list,.report-bars { padding:14px 16px 16px; }
  .summary-row { grid-template-columns:minmax(0,1fr) auto; gap:7px 12px; }
  .summary-row .track { grid-column:1/-1; grid-row:2; }
  .summary-row strong { font-size:12px; }
  .summary-row .value { font-size:12px; text-align:right; }
  .report-bar-row { grid-template-columns:minmax(0,1fr) minmax(0,auto); gap:7px 12px; }
  .report-bar-row b { min-width:0; max-width:150px; }
  .report-banner { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-banner > div { padding:12px; }
  .report-banner > div:first-child,.report-banner > div:last-child { grid-column:1/-1; }
  .report-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-controls > .field:first-child { grid-column:1/-1; }
  .report-controls .field select { width:100%; }
  .export-group { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); grid-column:1/-1; gap:8px; align-items:stretch; }
  .export-group .btn { padding:10px 6px; }
  .report-control-note strong { white-space:normal; }
  .management-metrics,.user-metrics,.split-kpis,.invoice-summary { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .split-kpis > :last-child:nth-child(odd),.invoice-summary .gross { grid-column:1/-1; }
  .management-metrics { padding:16px; }
  .management-metrics > div { padding:12px; }
  .management-metrics strong { font-size:16px; }
  .company-profile-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .company-profile-overview > div { padding:14px; }
  .company-profile-overview strong { font-size:14px; }
  .company-vault-actions { grid-template-columns:1fr; justify-items:stretch; }
  .company-vault-card { padding:16px; }
  .company-profile-card dl { gap:16px; }
  .company-section-heading { align-items:flex-start; }
  .company-section-heading .btn { width:100%; }
  .modal-backdrop { padding:0; align-items:end; }
  .modal { max-height:94vh; max-height:94dvh; width:100%; border-radius:18px 18px 0 0; overscroll-behavior:contain; }
  .modal-head { position:sticky; top:0; z-index:2; background:white; padding:16px; align-items:center; }
  .modal-head h3 { font-size:18px; }
  .modal-body { padding:16px 12px; }
  .modal-actions { padding:14px 16px calc(14px + env(safe-area-inset-bottom)); gap:8px; }
  .modal-actions .btn { flex:1 1 110px; }
  .invoice-form-grid .field label { min-height:0; }
  .invoice-form-grid { gap:16px; padding:14px; }
  .invoice-summary .mini-kpi strong { font-size:20px; }
  .invoice-document-field input[type=file] { font-size:13px; }
  .company-form-section { padding:14px; }
  .company-form-section .field { gap:7px; }
  .login-page { min-height:100vh; min-height:100dvh; padding:0; align-items:start; }
  .login-shell { min-height:100vh; min-height:100dvh; width:100%; grid-template-columns:minmax(0,1fr); grid-template-rows:auto 1fr; border:0; border-radius:0; }
  .login-brand { padding:24px 24px 20px; }
  .login-visual { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; text-align:center; justify-items:center; }
  .login-brand-logo { width:220px; max-width:85%; border-radius:12px; padding:8px 12px; box-shadow:none; }
  .login-brand-logo img { height:62px; }
  .login-hero-copy { margin:0; }
  .login-hero-copy > span,.login-features { display:none; }
  .login-hero-copy h1 { font-size:22px; margin:0 0 4px; letter-spacing:-.4px; }
  .login-hero-copy p { font-size:12px; line-height:1.5; }
  .login-panel { padding:24px 24px calc(24px + env(safe-area-inset-bottom)); align-items:start; }
  .login-card { max-width:430px; }
  .login-title { margin-bottom:20px; }
  .login-title h2 { font-size:26px; }
  .login-title p { font-size:13px; line-height:1.5; }
  .login-title > span { font-size:10px; }
  .login-card form { gap:16px; }
  .login-card .field input,.login-button { min-height:48px; }
  .login-langs { margin-top:20px; }
  .login-help { font-size:12px; line-height:1.5; }
}
@media screen and (max-width:360px) {
  .topbar { padding:12px; gap:10px; }
  .topbar h1 { font-size:19px; }
  .company-switch .company-add,.company-switch .company-edit,.company-switch .company-profile-link { min-width:36px; width:36px; }
  .mobile-nav button { font-size:10px; }
  .kpi { padding:12px; }
  .grid.kpis,.grid.kpis.bank-kpis,.report-kpis,.bank-balance-strip { grid-template-columns:minmax(0,1fr); }
  .kpi .label,.bank-balance-strip span { min-height:0; }
  .bank-balance-strip > div { border-right:0; }
  .kpi .value,.bank-balance-strip strong { font-size:18px; }
  .invoice-status-tabs button { font-size:10px; }
  .management-metrics { grid-template-columns:minmax(0,1fr); }
  .login-brand { padding:20px 20px 16px; }
  .login-panel { padding:22px 20px; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { scroll-behavior:auto !important; transition:none !important; }
}
@media print { .mobile-menu-toggle,.mobile-menu-backdrop { display:none !important; } }

/* Focused reporting workspace: one report, one period, one clear result. */
.report-workspace { min-width:0; width:100%; }
.report-page-heading { margin:0 0 20px; }
.report-page-heading h2 { margin:0 0 6px; font-size:25px; line-height:1.3; }
.report-page-heading p { margin:0; color:var(--muted); font-size:14px; line-height:1.6; }
.report-filter-panel { padding:22px; margin-bottom:26px; }
.report-filter-fields { display:grid; grid-template-columns:minmax(220px,1.7fr) minmax(85px,.6fr) minmax(110px,.8fr) minmax(160px,1.2fr); gap:16px; align-items:start; }
.report-filter-fields .field { min-width:0; margin:0; }
.report-filter-fields .field label { display:block; margin-bottom:7px; font-size:12px; line-height:1.5; font-weight:700; }
.report-filter-fields .field select { width:100%; min-width:0; min-height:44px; height:44px; font-size:13px; }
.report-filter-footer { display:flex; align-items:center; justify-content:space-between; gap:18px; padding-top:18px; margin-top:18px; border-top:1px solid #E3ECF1; }
.report-filter-footer > span { min-width:0; font-size:13px; color:var(--muted); line-height:1.5; overflow-wrap:anywhere; }
.report-downloads { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; flex-shrink:0; align-items:stretch; }
.report-downloads .btn { min-height:42px; font-size:12px; line-height:1.35; text-align:center; justify-content:center; white-space:normal; }
.report-selected-context { display:flex; align-items:baseline; justify-content:space-between; gap:12px 24px; flex-wrap:wrap; margin-bottom:10px; }
.report-selected-context > strong { font-size:19px; line-height:1.4; }
.report-selected-context > span { font-size:13px; color:var(--muted); line-height:1.5; overflow-wrap:anywhere; }
.report-basis-note { margin:6px 0; color:#667C89; font-size:12px; line-height:1.65; }
.report-workspace .report-summary-card { margin-top:18px; box-shadow:0 4px 18px rgba(20,60,80,.035); }
.report-workspace .card-head { gap:12px; padding:18px 22px; }
.report-workspace .card-head h3 { font-size:16px; line-height:1.5; }
.report-workspace .card-head small { font-size:12px; line-height:1.5; }
.report-workspace .report-summary-table { table-layout:fixed; width:100%; }
.report-workspace .report-summary-table th { background:#F4F8FA; font-size:12px; padding:14px 20px; line-height:1.5; text-transform:none; letter-spacing:0; white-space:normal; }
.report-workspace .report-summary-table td { padding:14px 20px; font-size:14px; line-height:1.55; font-variant-numeric:tabular-nums; }
.report-workspace .report-summary-table .num { text-align:right; }
.report-workspace .report-summary-table .report-total td { background:#EAF3F8; border-top:2px solid #B8D3E1; font-weight:750; }
.report-empty-legend { margin:12px 0 0; font-size:12px; color:var(--muted); }
.report-detail-overview { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:22px 0 18px; }
.report-detail-overview h3 { margin:0 0 5px; font-size:17px; }
.report-detail-overview p { margin:0; color:var(--muted); font-size:13px; }
.report-month-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; min-width:0; }
.report-month-totals > span { display:flex; flex-direction:column; gap:5px; min-width:0; text-align:right; }
.report-month-totals small { color:var(--muted); font-size:11px; font-weight:600; line-height:1.45; }
.report-month-totals strong { font-size:14px; font-weight:700; font-variant-numeric:tabular-nums; line-height:1.5; overflow-wrap:anywhere; }
.report-detail-overview > .report-month-totals { width:min(60%,540px); padding:14px 18px; border-radius:12px; background:#EAF3F8; }
.report-month-detail { margin:14px 0; overflow:hidden; box-shadow:none; }
.report-month-detail > summary { display:grid; grid-template-columns:minmax(115px,1fr) minmax(0,3fr) 20px; gap:18px; align-items:center; padding:20px 22px; cursor:pointer; list-style:none; }
.report-month-detail > summary::-webkit-details-marker { display:none; }
.report-month-detail > summary:hover { background:#F6FAFC; }
.report-month-detail > summary:focus-visible { outline:3px solid #F3A117; outline-offset:-3px; }
.report-month-label { display:flex; flex-direction:column; gap:5px; min-width:0; }
.report-month-label > strong { font-size:16px; line-height:1.45; }
.report-month-label > small { font-size:11px; color:var(--muted); }
.report-month-chevron { color:var(--brand); font-size:22px; transition:transform .15s; }
.report-month-detail[open] .report-month-chevron { transform:rotate(180deg); }
.report-month-body { padding:0 22px 22px; border-top:1px solid #E2ECF1; }
.report-source-section { margin-top:22px; }
.report-source-section h4 { display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:14px; line-height:1.5; }
.report-source-section h4 > span { padding:2px 7px; border-radius:6px; background:#EDF4F8; color:#617C8D; font-size:11px; }
.report-source-section .table-wrap { border:1px solid #E0EAF0; border-radius:9px; }
.report-detail-table { table-layout:fixed; width:100%; }
.report-detail-table th,.report-detail-table td { padding:12px 10px; font-size:12px; line-height:1.55; white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.report-detail-table th { text-transform:none; letter-spacing:0; background:#F6F9FB; }
.report-detail-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.report-detail-empty { margin-top:18px; padding:36px 22px; text-align:center; color:var(--muted); }
.report-input-error { margin:20px 0; padding:22px; border:1px solid #E6B5AB; border-left:4px solid #B8493C; background:#FFF7F4; color:#713B33; }
.report-input-error h3 { margin:0 0 10px; font-size:18px; }
.report-input-error p,.report-input-error li { font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.report-input-error ul { padding-left:22px; margin-bottom:0; }
.report-banking-workspace .bank-report-controls { display:grid; grid-template-columns:minmax(210px,1.4fr) minmax(160px,1fr) minmax(130px,.8fr) minmax(130px,.8fr); gap:16px; padding:22px; margin-bottom:22px; }
.report-banking-workspace .bank-report-controls > .btn { grid-column:4; justify-self:stretch; }
.report-banking-workspace .bank-report-controls .field { min-width:0; }
.report-banking-workspace .bank-report-controls select,.report-banking-workspace .bank-report-controls input { min-width:0; width:100%; min-height:44px; }
@media screen and (max-width:1100px) {
  .report-filter-fields { grid-template-columns:minmax(190px,1.5fr) minmax(80px,.6fr) minmax(105px,.8fr) minmax(145px,1.1fr); gap:12px; }
  .report-workspace .report-summary-table td,.report-workspace .report-summary-table th { padding:13px 14px; }
  .report-banking-workspace .bank-report-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-banking-workspace .bank-report-controls > .btn { grid-column:2; }
}
@media screen and (max-width:850px) {
  .report-filter-fields { grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
  .report-filter-fields .report-mode-field,.report-filter-fields .report-facility-field { grid-column:1/-1; }
  .report-filter-footer { flex-direction:column; align-items:stretch; }
  .report-downloads { width:100%; }
  .report-detail-overview { align-items:stretch; flex-direction:column; gap:14px; }
  .report-detail-overview > .report-month-totals { width:100%; }
}
@media screen and (max-width:760px) {
  .report-filter-panel { padding:18px; margin-bottom:20px; }
  .report-page-heading h2 { font-size:23px; }
  .report-selected-context > strong { font-size:17px; }
  .report-workspace .card-head { padding:16px; flex-wrap:wrap; }
  .report-workspace .report-summary-table { table-layout:auto; }
  .report-workspace table.mobile-card-table td,.report-workspace table.mobile-card-table th { font-size:13px; }
  .report-workspace table.mobile-card-table td { padding:11px 14px; }
  .report-workspace table.mobile-card-table td.num { text-align:right; }
  .report-month-detail > summary { grid-template-columns:minmax(0,1fr) 20px; gap:12px; padding:18px 16px; }
  .report-month-detail > summary .report-month-totals { grid-row:2; grid-column:1/-1; padding-top:10px; border-top:1px solid #E4EDF2; gap:10px; }
  .report-month-chevron { grid-column:2; grid-row:1; }
  .report-month-label { flex-direction:row; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:8px; }
  .report-month-totals strong { font-size:13px; }
  .report-month-body { padding:0 10px 14px; }
  .report-source-section h4 { padding:0 6px; }
  .report-source-section .table-wrap { border:0; border-radius:0; }
  .report-source-section table.mobile-card-table tbody { padding:0; }
  .report-banking-workspace .bank-report-controls { padding:18px; }
  .report-banking-workspace .bank-report-controls > .field:first-child,.report-banking-workspace .bank-report-controls > .field:nth-child(2) { grid-column:1/-1; }
  .report-banking-workspace .bank-report-controls > .btn { grid-column:1/-1; }
}
@media print {
  .report-filter-panel,.report-workspace .export-group,.report-workspace .bank-report-controls { display:none !important; }
  .report-workspace .report-summary-table { display:table; }
  .report-workspace .report-summary-table tr { break-inside:avoid; }
}

/* Energy workspace: consistent navigation and indivisible numeric values. */
.sidebar { background:linear-gradient(165deg,#073C60 0%,#075F92 55%,#084C70 100%); }
.nav-section-label { padding:6px 18px 12px; color:#AED3E8; font-size:10px; font-weight:700; letter-spacing:.15em; }
.nav button { position:relative; gap:12px; padding:12px 14px; border:1px solid transparent; border-radius:12px; color:#E4F1FA; text-align:left; }
.nav button:hover { background:rgba(255,255,255,.08); }
.nav button.active { background:rgba(255,255,255,.14); border-color:rgba(195,229,250,.2); box-shadow:inset 3px 0 #F8B331; }
.nav .ico,.mobile-menu-nav .ico { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; border-radius:10px; background:rgba(130,199,244,.14); color:#B9E1FF; }
.ico svg { display:block; width:21px; height:21px; }
.nav-label { min-width:0; white-space:normal; line-height:1.3; font-size:14px; font-weight:600; }
.nav-label small { display:block; margin-top:4px; font-size:10px; line-height:1.4; font-weight:400; color:#BED9E8; }
.nav [data-page="production"] .ico { color:#FFD181; background:rgba(247,170,40,.16); }
.nav [data-page="banking"] .ico { color:#89E1CE; background:rgba(43,185,158,.16); }
.nav [data-page="reports"] .ico { color:#D0C8FF; background:rgba(157,135,238,.16); }
.mobile-menu-nav .ico { color:#075F92; background:#EAF3F9; }
.mobile-menu-nav [data-page="production"] .ico { color:#A56000; background:#FFF3D9; }
.mobile-menu-nav [data-page="banking"] .ico { color:#087C65; background:#E4F6EF; }
.mobile-menu-nav .nav-label small { color:#5D7583; }
.mobile-nav .ico { display:grid; place-items:center; }
.sr-only { position:absolute!important; width:1px!important; height:1px!important; padding:0!important; margin:-1px!important; overflow:hidden!important; clip:rect(0,0,0,0)!important; white-space:nowrap!important; border:0!important; }
.counter-display { display:inline-grid; vertical-align:top; }
.counter-measure,.counter-current { grid-area:1/1; }
.counter-measure { visibility:hidden; }
.counter-current { text-align:left; }
.kpi .value,.bank-balance-strip strong,.mini-kpi strong,.report-month-totals strong,
td.num,.numeric-cell .mobile-cell-value,.invoice-amount,.summary-row .value,.report-bar-row b {
  white-space:nowrap; overflow-wrap:normal; word-break:normal; font-variant-numeric:tabular-nums; letter-spacing:0;
}
.kpi .value { max-width:100%; font-size:clamp(22px,2.3vw,36px); }
.bank-balance-strip > div,.mini-kpi,.report-month-totals > span { min-width:0; }
.bank-balance-strip strong,.mini-kpi strong,.report-month-totals strong { display:block; max-width:100%; }
.mini-kpi strong.text-value { white-space:normal; overflow-wrap:anywhere; }
.report-banking-workspace .bank-report-controls .export-group { grid-column:1/-1; justify-content:flex-end; flex-wrap:wrap; }
@media screen and (max-width:960px) {
  .main table.mobile-card-table td.numeric-cell { grid-template-columns:minmax(0,1fr); gap:5px; }
  .main table.mobile-card-table td.numeric-cell::before { text-align:left; }
  .main table.mobile-card-table td.numeric-cell .mobile-cell-value { width:100%; min-width:0; text-align:right; white-space:nowrap; overflow-wrap:normal; }
  .kpi .value { font-size:28px; }
}
@media screen and (max-width:520px) {
  .grid.kpis { grid-template-columns:minmax(0,1fr); }
  .kpi .value { font-size:30px; }
  .report-month-totals { grid-template-columns:minmax(0,1fr); }
  .report-month-totals > span { display:flex; align-items:baseline; justify-content:space-between; gap:10px; }
  .report-month-totals small { max-width:45%; }
  .report-month-totals strong { font-size:14px; }
  .bank-balance-strip { grid-template-columns:minmax(0,1fr); }
}
@media print {
  .counter-current { display:none; }
  .counter-measure { visibility:visible; }
}

/* Compact navigation: keep every destination visible at laptop heights. */
@media screen and (min-width:961px) {
  .sidebar { height:100vh; height:100dvh; padding:16px 12px; gap:0; }
  .sidebar .brand-original { flex:none; gap:0; padding:0 2px 16px; }
  .sidebar .brand-original .brand-logo { height:80px; padding:10px 14px; }
  .sidebar .brand-original small { display:none; }
  .nav-section-label { flex:none; padding:0 12px 12px; font-size:10px; line-height:14px; letter-spacing:.1em; }
  .sidebar .nav { flex:none; gap:4px; }
  .sidebar .nav button { min-height:46px; padding:7px 12px; gap:10px; border-radius:10px; }
  .sidebar .nav .ico { flex:0 0 30px; width:30px; height:30px; border-radius:8px; }
  .sidebar .nav-label { font-size:14px; line-height:20px; font-weight:600; white-space:nowrap; }
  .sidebar-footer { flex:none; margin-top:auto; padding:12px 12px 0; line-height:1.5; font-size:10px; }
  .sidebar-footer strong,.sidebar-footer span { display:block; }
  .sidebar-footer strong { color:#E5F3FB; font-size:10px; letter-spacing:.08em; font-weight:600; }
  .sidebar-footer span { margin-top:3px; color:#BDD5E4; }
}
@media screen and (min-width:961px) and (max-width:1280px) {
  .sidebar .nav-label { font-size:13px; }
}
@media screen and (min-width:961px) and (max-height:620px) {
  .sidebar { padding:12px; }
  .sidebar .brand-original { padding-bottom:12px; }
  .sidebar .brand-original .brand-logo { height:64px; padding:6px 12px; }
  .sidebar .nav { gap:3px; }
  .sidebar .nav button { min-height:44px; padding:6px 12px; }
  .nav-section-label { padding-bottom:10px; }
  .sidebar-footer { padding-top:8px; }
}
@media screen and (min-width:961px) and (max-height:520px) {
  .sidebar { padding:10px 12px; }
  .sidebar .brand-original { padding-bottom:10px; }
  .sidebar .brand-original .brand-logo { height:52px; padding:4px 12px; }
  .sidebar .nav-section-label,.sidebar-footer { display:none; }
}
@media screen and (max-width:960px) {
  .mobile-nav { gap:2px; }
  .mobile-nav button { font-weight:600; font-size:11px; letter-spacing:0; line-height:16px; }
  .mobile-nav button > span:last-child { white-space:nowrap; }
  .mobile-nav .ico { width:24px; height:24px; }
  .mobile-menu-backdrop { align-items:flex-end; justify-content:center; }
  .mobile-menu-panel { width:100%; max-width:520px; max-height:calc(100vh - 12px); max-height:calc(100dvh - 12px); padding:16px 18px calc(16px + env(safe-area-inset-bottom)); border-radius:22px 22px 0 0; box-shadow:0 -12px 44px rgba(4,38,61,.18); }
  .mobile-menu-panel .mobile-menu-logo { display:block; width:142px; height:44px; margin:0; }
  .mobile-menu-heading { align-items:center; margin:8px 0 12px; }
  .mobile-menu-heading h2 { margin:0 0 3px; font-size:18px; line-height:24px; }
  .mobile-menu-heading p { font-size:11px; line-height:16px; }
  .mobile-menu-nav { gap:4px; margin-top:12px; }
  .mobile-menu-nav button { min-height:44px; padding:6px 12px; gap:12px; border-radius:10px; }
  .mobile-menu-nav .ico { flex:0 0 30px; width:30px; height:30px; border-radius:8px; }
  .mobile-menu-nav .nav-label { font-size:14px; line-height:20px; font-weight:600; }
}
@media screen and (max-width:360px) {
  .mobile-nav button { font-size:10px; }
  .mobile-menu-panel { padding-left:14px; padding-right:14px; }
}
@media screen and (max-width:960px) and (max-height:500px) {
  .mobile-menu-panel .mobile-menu-logo { display:none; }
  .mobile-menu-panel { padding-top:10px; padding-bottom:calc(10px + env(safe-area-inset-bottom)); }
  .mobile-menu-heading { margin-top:0; margin-bottom:8px; }
  .mobile-menu-nav { margin-top:8px; gap:2px; }
}
@media screen and (min-width:600px) and (max-width:960px) and (max-height:500px) {
  .mobile-menu-panel { max-width:600px; }
  .mobile-menu-nav { grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
  .mobile-menu-nav button:last-child { grid-column:1/-1; }
}

/* Accounting periods, safe refresh and payment notifications. */
.portal-live-tools { display:flex; align-items:stretch; gap:8px; min-width:0; }
.portal-live-tools .btn { min-height:42px; padding:8px 12px; font-size:12px; line-height:18px; gap:7px; }
.portal-live-tools svg { width:18px; height:18px; flex:0 0 18px; }
.portal-refresh > span:first-child { font-size:20px; line-height:20px; }
#portal-notification-count { min-width:20px; padding:1px 5px; border-radius:10px; background:#b73e23; color:white; font-size:11px; line-height:18px; }
#portal-notification-count[hidden],.portal-update-notice[hidden],.portal-notification-center[hidden] { display:none!important; }
.portal-update-notice { margin:0 0 16px; padding:12px 16px; border:1px solid #b8d4e9; border-radius:12px; background:#edf6fc; color:#164e74; font-size:13px; line-height:1.6; }
.portal-notification-center { margin-bottom:22px; padding:20px; }
.portal-notification-center > header { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
.portal-notification-center > header > div { min-width:0; }
.portal-notification-center h2 { font-size:20px; line-height:1.4; margin:0 0 6px; }
.portal-notification-center p { font-size:13px; line-height:1.6; margin:0; color:var(--muted); }
.portal-notification-center select { width:auto; min-width:150px; max-width:100%; flex:none; min-height:44px; border:1px solid #d5e2ea; border-radius:9px; background:#fff; padding:9px 12px; font:inherit; font-size:14px; color:inherit; }
.portal-notification-list { display:grid; gap:12px; }
.payment-notice { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,auto); gap:20px; padding:16px; border:1px solid #d7e4eb; border-left:4px solid #1680b7; border-radius:12px; background:#f9fcfe; }
.payment-notice.priority { border-left-color:#c75a37; }
.payment-notice-copy,.payment-notice-amount { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; font-size:13px; line-height:1.5; overflow-wrap:anywhere; }
.payment-notice-copy .badge { white-space:normal; }
.payment-notice-copy small,.payment-notice-amount small { color:var(--muted); }
.payment-notice-amount { align-items:flex-end; text-align:right; }
.payment-notice-amount strong { font-size:18px; white-space:nowrap; font-variant-numeric:tabular-nums; overflow-wrap:normal; }
.payment-notice-amount .btn { margin-top:3px; }
.notification-empty { padding:12px 0; }
.form-errors { grid-column:1/-1; padding:14px 16px; margin-bottom:16px; border:1px solid #e8b5ab; border-left:4px solid #bd4936; border-radius:10px; background:#fff5f2; color:#883827; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.form-errors h4 { margin:0 0 5px; font-size:15px; }
.form-errors p { margin:0 0 8px; }
.form-errors ul { margin:0; padding-left:20px; }
.form-errors:focus { outline:2px solid #bd4936; outline-offset:3px; }
.period-select { display:grid; grid-template-columns:minmax(0,1fr) 100px; gap:8px; }
.period-select input,.period-select select { min-width:0; width:100%; }
.invoice-urgent-field { display:flex; flex-direction:column; justify-content:center; }
.invoice-urgent-field > label { display:flex; align-items:center; gap:9px; min-height:42px; cursor:pointer; }
.invoice-urgent-field input[type="checkbox"] { width:19px; height:19px; min-height:19px; flex:0 0 19px; accent-color:#086ba5; }
.company-activity-catalog { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; min-width:0; min-inline-size:0; border:1px solid #d5e2ea; border-radius:12px; padding:14px; }
.company-activity-catalog legend { font-size:14px; font-weight:600; padding:0 6px; }
.company-activity-catalog > p,.company-activity-catalog > a { grid-column:1/-1; margin:0; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.company-activity-option { display:flex; align-items:flex-start; gap:10px; padding:12px; border:1px solid #d5e2ea; border-radius:10px; background:#f8fbfd; cursor:pointer; min-width:0; }
.company-activity-option input[type="checkbox"] { width:18px; height:18px; min-height:18px; flex:0 0 18px; margin:3px 0 0; accent-color:#086ba5; }
.company-activity-option > span { display:flex; flex-direction:column; gap:4px; min-width:0; overflow-wrap:anywhere; }
.company-activity-option strong { font-size:13px; line-height:1.5; }
.company-activity-option small { color:var(--muted); font-size:12px; line-height:1.5; }
.company-transfer-table { width:100%; table-layout:fixed; }
.company-transfer-table th,.company-transfer-table td { white-space:normal; overflow-wrap:anywhere; vertical-align:top; }
.company-archived-partners { margin-top:18px; }
.company-archived-partners .company-partner-card { overflow-wrap:anywhere; }
@media screen and (min-width:961px) {
  .top-actions .company-switch { flex:1 1 400px; min-width:360px; }
  .top-actions .company-switch select { flex:1 1 180px; min-width:130px; }
  .portal-live-tools { flex:0 0 auto; }
}
@media screen and (max-width:960px) {
  .top-actions .portal-live-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; grid-column:1/-1; }
  .portal-live-tools .btn { justify-content:center; min-height:46px; padding:8px; white-space:normal; }
  .portal-live-tools .btn > span:not(:first-child) { min-width:0; }
  .portal-notification-center > header { flex-direction:column; gap:12px; }
  .portal-notification-center select { width:100%; }
  .company-activity-catalog { grid-template-columns:minmax(0,1fr); }
  .period-select input,.period-select select { font-size:16px; }
}
@media screen and (max-width:520px) {
  .payment-notice { grid-template-columns:minmax(0,1fr); gap:12px; padding:13px; }
  .payment-notice-amount { align-items:flex-start; text-align:left; }
  .payment-notice-amount .btn { width:100%; }
  .portal-live-tools .btn { font-size:11px; gap:5px; }
  .portal-notification-center h2 { font-size:18px; }
  .portal-notification-center { padding:15px; }
  .modal .company-transfer-table { min-width:620px; }
  .period-select { grid-template-columns:minmax(0,1fr) 86px; }
}
@media print { .portal-live-tools,#portal-notifications { display:none!important; } }

/* Long translated category labels retain their own row, without colliding with bars or amounts. */
.summary-row,.report-bar-row { grid-template-columns:minmax(0,1fr) max-content; gap:6px 12px; }
.summary-row strong,.report-bar-row strong { min-width:0; white-space:normal; overflow-wrap:anywhere; line-height:1.5; }
.summary-row strong,.report-bar-row > div:first-child { grid-column:1; grid-row:1; }
.summary-row .value,.report-bar-row b { grid-column:2; grid-row:1; }
.summary-row .track,.report-bar-row .report-track { grid-column:1/-1; grid-row:2; height:6px; }

.user-access-modal { display:flex; flex-direction:column; overflow:hidden; }
.user-access-modal .modal-head,.user-access-modal .modal-actions { flex:0 0 auto; }
.user-access-modal .modal-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; }
.user-access-modal .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.user-company-access { padding:16px; background:#f1f7fb; border:1px solid #d8e6ef; border-radius:12px; min-width:0; }
.user-company-access[hidden],#user-company-options[hidden],#user-role-access-note[hidden] { display:none!important; }
.user-company-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:230px; overflow-y:auto; margin-top:10px; }
.user-company-choice { display:flex; align-items:flex-start; gap:9px; padding:10px; background:#fff; border:1px solid #dbe7ed; border-radius:8px; cursor:pointer; font-size:12px; line-height:1.5; min-width:0; }
.user-company-choice input { flex:0 0 17px; width:17px; height:17px; min-height:17px; margin:2px 0 0; accent-color:#086ba5; }
.user-company-choice span,.user-access-cell { overflow-wrap:anywhere; }
.user-viewer-note,.viewer-access-notice { color:#25566e; background:#e9f4fa; font-size:12px; line-height:1.6; padding:10px 12px; border-radius:8px; }
.user-viewer-note { margin:12px 0 0; }
.viewer-access-notice { margin:0 0 16px; border-left:3px solid #2197cb; }
.viewer-empty { padding:32px 20px; }
@media (max-width:600px) { .user-access-modal .form-grid,.user-company-list { grid-template-columns:minmax(0,1fr); } .user-company-access { padding:12px; } }
@media (max-width:760px) {
  .report-filter-fields > .field:has(#report-invoice-direction) { grid-column:1 / -1; }
}
