/* Layout and navigation across phones, tablets and desktop screens. */
html,body{max-width:100%;min-width:0}main,.page-content,header,.panel,.panel-heading,.form-grid,.detail-grid,.bank-layout,.stats,.filters,.form-actions,.title-header-actions{min-width:0}main{width:calc(100% - 248px)}.page-content{width:100%}.form-grid>*{min-width:0}input,select,textarea{min-width:0;max-width:100%}header>div{min-width:0}header h1,.panel-heading h2,.detail-grid h2,td,td small,.flash,.notice{overflow-wrap:anywhere}.stats strong{white-space:normal;overflow-wrap:anywhere;font-size:clamp(22px,2vw,32px);line-height:1.35}.table-wrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}.table-wrap>table{min-width:640px}.table-wrap:focus-visible{outline:2px solid #007b6c;outline-offset:3px}.panel-heading{flex-wrap:wrap}.filters{gap:14px}.filters label{flex:1 1 145px;min-width:0}.filters label:first-child{flex:2 1 220px}.form-actions{flex-wrap:wrap}.title-header-actions{flex-wrap:wrap}aside{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.sidebar-note{flex-shrink:0}.sidebar-backdrop,.sidebar-close,.menu-toggle{display:none}.app-topbar{gap:14px;min-width:0}.breadcrumb{min-width:0;flex-wrap:wrap;gap:8px}.topbar-right{flex-shrink:0;gap:12px}footer{flex-wrap:wrap;gap:12px;line-height:1.7}.login-main{width:100%;min-height:100dvh}.login-card{min-width:0}.login-brand-panel{min-width:0}.login-main>footer{overflow-wrap:anywhere}.login-main>.flash{position:fixed;top:16px;right:20px;max-width:min(480px,calc(100% - 40px));z-index:5}.manual-row{min-width:0;flex-wrap:wrap}.manual-row label{flex:1 1 150px;min-width:0}.supplier-picker{max-width:100%}#supplier-results button{overflow-wrap:anywhere}input[type=file]{white-space:normal}input[type=file]::file-selector-button{max-width:100%}dialog{max-height:90dvh;overflow-y:auto}
@media(max-width:1200px){main{width:calc(100% - 216px)}.page-content{padding:28px 24px}.bank-layout{grid-template-columns:1fr}.bank-layout .form-grid{grid-template-columns:1fr 1fr}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-height:780px) and (min-width:1001px){.sidebar-note{display:none}.aside-bottom{margin-top:auto}aside{padding-top:20px}.nav-label{margin-top:20px}}
@media(max-width:1000px){
 main{margin:0;width:100%}.page-content{padding:28px 24px}.app-topbar{height:auto;min-height:64px;padding:12px 24px;position:sticky;top:0;z-index:30;background:#f7fbf9f5}.breadcrumb{flex:1;font-size:13px}.network-status{display:none}.menu-toggle{display:grid;place-items:center;flex-shrink:0;width:42px;height:42px;border:1px solid #c9e1d5;border-radius:10px;background:#fff;color:#007b6c}.menu-toggle svg{width:22px;height:22px}.access-label{font-size:11px}.user-avatar{width:32px;height:32px}
 aside{position:fixed;inset:0 auto 0 0;width:280px;max-width:86vw;height:100dvh;z-index:100;padding:44px 18px 24px;display:flex;flex-direction:column;transform:translateX(-105%);visibility:hidden;transition:transform .2s,visibility .2s;box-shadow:15px 0 50px #003b322b}.menu-open aside{transform:translateX(0);visibility:visible}.menu-open{overflow:hidden}.sidebar-close{position:absolute;right:10px;top:8px;display:grid;place-items:center;width:38px;height:38px;border:1px solid #ffffff40;border-radius:9px;background:#ffffff15;color:#fff;font-size:28px;line-height:1}.menu-open .sidebar-backdrop{display:block;position:fixed;inset:0;z-index:90;border:0;background:#0c322877;backdrop-filter:blur(2px)}aside .brand{flex-direction:column;justify-content:center;gap:0;padding:0 10px 12px}aside .brand-identity{width:190px;height:58px}aside .brand .brand-product{font-size:10px;max-width:none;text-align:center;margin-top:8px}aside .nav-label{display:block;margin:24px 15px 14px;font-size:11px}aside nav{display:grid;overflow:visible;margin:0;padding:0;gap:6px}aside nav a{padding:14px 15px;font-size:15px;gap:12px}aside nav svg{width:19px;height:19px}.nav-dot{display:block}aside .aside-bottom{display:block;margin-top:auto;padding-top:20px}aside .sidebar-note{display:none}.account-link,.logout{font-size:14px}.login-main{margin:0;width:100%}.login-brand-panel{padding:24px;min-height:100dvh}.login-card{max-width:calc(100% - 40px);padding:28px 18px}.login-brand-panel>img{width:96%}.login-main>footer{right:20px;max-width:46%}
}
@media(max-width:700px){
 .app-topbar{padding:10px 16px;gap:10px;min-height:64px}.page-content{padding:24px 16px}.breadcrumb{font-size:12px;gap:6px}.topbar-right{gap:8px}.access-label{max-width:96px;overflow-wrap:anywhere;font-size:10px}.user-avatar{width:30px;height:30px}header{align-items:flex-start;flex-wrap:wrap;min-height:0;margin-bottom:24px;gap:18px}header h1{font-size:28px;line-height:1.25;overflow-wrap:anywhere}header>.primary,header>.secondary{align-self:flex-start}header>div:first-child{flex:1 1 220px}.title-header-actions{width:100%;justify-content:flex-start}.title-header-actions .secondary{font-size:14px;min-height:44px}.form-grid,.bank-layout .form-grid,.detail-grid{grid-template-columns:minmax(0,1fr)}.wide{grid-column:1/-1}.panel,.form-panel{max-width:100%;padding:22px 16px}.stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.stats article{padding:18px 13px}.stats strong{font-size:clamp(20px,5vw,27px)}.stats span{font-size:13px}.stats small{font-size:12px}input,textarea,select{font-size:16px;min-height:48px}.filters label,.filters label:first-child{flex:1 1 calc(50% - 14px);min-width:0}.filters label:first-child{flex-basis:100%}.filters .secondary{flex:1}.form-actions{justify-content:flex-start;gap:10px}.form-actions>.primary,.form-actions>.secondary{flex:1 1 130px}.form-actions.wide{width:100%}.form-actions a{white-space:normal;text-align:center}.cnpj-search{max-width:100%;flex-direction:column;align-items:stretch;gap:12px}.cnpj-search label{min-width:0}.cnpj-search button{width:100%}.bank-tabs{overflow-x:auto;white-space:nowrap;max-width:100%}.bank-tabs a{flex-shrink:0}.workflow{grid-template-columns:minmax(0,1fr)}.step small{margin-left:0;font-size:12px}.manual-row{gap:10px;padding-bottom:16px;border-bottom:1px solid #dce8df}.manual-row label{flex-basis:calc(50% - 10px)}.manual-row .remove-installment{min-height:40px;padding:8px 12px;border:1px solid #decbbd;border-radius:8px;margin:0;font-size:13px}.table-footer{flex-direction:column;align-items:flex-start;gap:8px}.table-wrap>table{min-width:620px}td{max-width:300px}footer{font-size:11px;justify-content:flex-start}.login-main{display:flex;min-height:100dvh;padding-bottom:20px}.login-brand-panel{min-height:200px;max-height:32dvh;padding:22px}.login-brand-panel>img{width:min(80%,360px);max-height:150px;aspect-ratio:2.4}.login-card{width:440px;max-width:100%;margin:8px auto 0;padding:24px}.login-card form{margin-top:24px}.login-main>footer{position:static;max-width:100%;padding:10px 24px;justify-content:center}.login-main>.flash{top:10px;right:10px;max-width:calc(100% - 20px)}
}
@media(max-width:380px){.page-content{padding:20px 12px}.app-topbar{padding:9px 12px;gap:8px}.access-label{display:none}.stats{grid-template-columns:minmax(0,1fr)}.stats strong{font-size:28px}.manual-row label{flex-basis:100%}.form-actions>*{flex-basis:100%!important}.breadcrumb{font-size:11px}header h1{font-size:26px}.login-card{padding:20px}}
@media(prefers-reduced-motion:reduce){aside{transition:none}}
/* Dashboard contrast, keeping the Meta Premiada palette. */
body:has(.dashboard-screen){background:radial-gradient(ellipse at 92% 0%,#c9dbab66,transparent 42%),linear-gradient(145deg,#dceae2,#cddfd6)}.dashboard-screen>header{padding:24px 28px;background:linear-gradient(115deg,#00695d,#008e7a);border:1px solid #ffffff33;border-radius:18px;box-shadow:0 12px 32px #004d401c;min-height:125px}.dashboard-screen>header h1{color:#fff}.dashboard-screen>header .eyebrow{color:#f0e78d}.dashboard-screen>header .muted{color:#e3f5ec}.dashboard-screen>header .primary{background:#e4db83;color:#365036;box-shadow:0 6px 18px #003e3422;border:1px solid #f2edb6}.dashboard-screen>header .primary:hover{background:#f0e89f}.dashboard-screen .stats article{background:#e1eee5;border:1px solid #a9c6b5;box-shadow:0 8px 20px #224b3610}.dashboard-screen .stats article:first-child{background:radial-gradient(circle at 90% 5%,#b4ac4044,transparent 80%),linear-gradient(130deg,#00685b,#009582);border-color:#007d6b}.dashboard-screen .stats article:nth-child(2){background:#f0dfd2;border-color:#d1ac91}.dashboard-screen .stats article:nth-child(2) span,.dashboard-screen .stats article:nth-child(2) small{color:#70482e}.dashboard-screen .stats article:nth-child(2) strong{color:#854b2a}.dashboard-screen .stats article:nth-child(3){background:linear-gradient(135deg,#e4dc9c,#d6ce78);border-color:#b9b05d}.dashboard-screen .stats article:nth-child(4){background:#c7e5d6;border-color:#8abda6}.dashboard-screen .stats article:nth-child(4) strong{color:#145b44}.dashboard-screen>.panel{background:#edf4ee;border:1px solid #a9c7b6;box-shadow:0 12px 32px #174a3520;overflow:hidden}.dashboard-screen>.panel>.panel-heading{padding:18px 22px;margin:-27px -27px 0;background:linear-gradient(100deg,#165d49,#29785e);border-bottom:3px solid #b4ac40}.dashboard-screen>.panel>.panel-heading h2{color:#fff}.dashboard-screen>.panel>.panel-heading .text-link{color:#fff5b0}.dashboard-screen .filters{padding:22px 0}.dashboard-screen input,.dashboard-screen select{background:#f8fcf6;border-color:#a8c4b2;color:#244734}.dashboard-screen input::placeholder{color:#52755e}.dashboard-screen th{background:#d1e3d7;color:#274d37;border-bottom:2px solid #94b49f}.dashboard-screen tbody tr{background:#f6faf4}.dashboard-screen tbody tr:nth-child(even){background:#e0ece2}.dashboard-screen tbody tr:hover{background:#d1e5d8}.dashboard-screen td{border-color:#b9d1c0}.dashboard-screen td small{color:#486a52}.dashboard-screen .table-footer{color:#355b43;border-top:1px solid #a8c6b1;padding-top:18px}.dashboard-screen .actions>a,.dashboard-screen .actions button{background:#e5f1e7;border-color:#aac7b3;color:#1e5e43}.dashboard-screen .badge:not(.paid):not(.overdue):not(.incomplete){background:#ded394;color:#5b4d1b;border:1px solid #c2b46a}body:has(.dashboard-screen) footer{color:#365c46;border-top-color:#9fbea9}
@media(max-width:1200px){.dashboard-screen>.panel>.panel-heading{margin:-22px -22px 0}}
@media(max-width:700px){.dashboard-screen>header{padding:22px 20px;border-radius:15px;gap:18px}.dashboard-screen>header h1{font-size:27px}.dashboard-screen>header>div:first-child{flex-basis:100%}.dashboard-screen>.panel>.panel-heading{margin:-22px -16px 0;padding:18px 16px}.dashboard-screen .stats article{padding:18px 13px}.dashboard-screen>.panel{border-radius:14px}.dashboard-screen .filters{padding:20px 0}}
/* Status badges: consistent semantic colors with strong text contrast. */
.badge{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border-radius:7px;font-size:12px;font-weight:700;line-height:1.35;letter-spacing:.15px;border:1px solid #8cb5df!important;background:#dcecff!important;color:#164574!important;white-space:normal;max-width:100%;vertical-align:middle}.badge:before{content:'';display:inline-block;width:6px;height:6px;flex:0 0 6px;border-radius:50%;margin:0;background:currentColor}.badge.paid{background:#d7f0dd!important;color:#17552b!important;border-color:#79b68b!important}.badge.overdue{background:#ffe0df!important;color:#8f2320!important;border-color:#db8e8a!important}.badge.incomplete{background:#ffe8c5!important;color:#7b4208!important;border-color:#d6a262!important;margin:0 0 7px}.badge.incomplete+small{color:#80501d!important;font-size:12px}.badge+small{line-height:1.6}.dashboard-screen .badge:not(.paid):not(.overdue):not(.incomplete){background:#dcecff!important;color:#164574!important;border-color:#8cb5df!important}
/* Compact dashboard: less vertical space without shrinking labels. */
.dashboard-screen>header{min-height:0;padding:18px 24px;margin-bottom:20px;border-radius:14px;gap:16px}.dashboard-screen>header .eyebrow{margin-bottom:6px;font-size:11px}.dashboard-screen>header h1{font-size:28px;margin:0 0 6px;line-height:1.2}.dashboard-screen>header .muted{font-size:14px;line-height:1.5}.dashboard-screen>header .primary{min-height:42px;padding:10px 16px}.dashboard-screen .stats{gap:14px;margin-bottom:20px}.dashboard-screen .stats article{padding:16px 20px;border-radius:14px}.dashboard-screen .stats article:before{width:27px;height:3px;margin-bottom:11px}.dashboard-screen .stats span{font-size:13px;line-height:1.4}.dashboard-screen .stats strong{font-size:27px;line-height:1.2;margin:10px 0 9px}.dashboard-screen .stats small{font-size:12px;line-height:1.4;display:block}.dashboard-screen>.panel>.panel-heading{padding:14px 22px}.dashboard-screen>.panel>.panel-heading h2{font-size:18px}.dashboard-screen .filters{padding:17px 0;gap:12px}.dashboard-screen .filters label{gap:7px}.dashboard-screen .filters input,.dashboard-screen .filters select{min-height:44px;padding:10px 12px}.dashboard-screen .filters .secondary{min-height:42px}.dashboard-screen .panel-heading .text-link{padding:4px 0}
@media(max-width:700px){.dashboard-screen>header{padding:17px 18px;gap:12px;margin-bottom:16px}.dashboard-screen>header h1{font-size:25px}.dashboard-screen>header .muted{font-size:13px}.dashboard-screen>header>div:first-child{flex:1 1 185px}.dashboard-screen>header .primary{min-height:42px}.dashboard-screen .stats{gap:10px;margin-bottom:16px}.dashboard-screen .stats article{padding:15px 13px;border-radius:12px}.dashboard-screen .stats article:before{margin-bottom:9px}.dashboard-screen .stats strong{font-size:24px;margin:8px 0}.dashboard-screen .stats span{font-size:13px}.dashboard-screen .stats small{font-size:12px;line-height:1.45}.dashboard-screen>.panel>.panel-heading{padding:13px 16px}.dashboard-screen>.panel>.panel-heading h2{font-size:17px}.dashboard-screen .filters input,.dashboard-screen .filters select{font-size:16px;min-height:46px}.dashboard-screen .filters{padding:16px 0}}
/* Denser dashboard. */
body:has(.dashboard-screen) .app-topbar{height:58px;min-height:58px}body:has(.dashboard-screen) .page-content{padding-top:20px}.dashboard-screen>header{padding:13px 20px;margin-bottom:14px;border-radius:11px}.dashboard-screen>header .eyebrow{display:none}.dashboard-screen>header h1{font-size:25px;margin-bottom:4px}.dashboard-screen>header .muted{font-size:13px;line-height:1.35}.dashboard-screen>header .primary{min-height:38px;padding:9px 14px;font-size:13px}.dashboard-screen .stats{gap:12px;margin-bottom:14px}.dashboard-screen .stats article{padding:12px 16px;border-radius:11px}.dashboard-screen .stats article:before{display:none}.dashboard-screen .stats span{font-size:13px}.dashboard-screen .stats strong{font-size:25px;margin:7px 0 5px;line-height:1.15}.dashboard-screen .stats small{font-size:11px;line-height:1.35}.dashboard-screen>.panel{padding:20px;border-radius:11px}.dashboard-screen>.panel>.panel-heading{margin:-20px -20px 0;padding:11px 20px}.dashboard-screen>.panel>.panel-heading h2{font-size:17px}.dashboard-screen .filters{padding:13px 0;gap:10px}.dashboard-screen .filters label{font-size:12px;gap:5px}.dashboard-screen .filters input,.dashboard-screen .filters select{min-height:39px;padding:8px 11px;font-size:14px}.dashboard-screen .filters .secondary{min-height:39px;padding:8px 14px;font-size:13px}.dashboard-screen th{padding:10px 12px}.dashboard-screen td{padding:13px 12px}.dashboard-screen td small{margin-top:4px}.dashboard-screen .table-footer{padding-top:12px}.dashboard-screen .badge{padding:5px 9px;font-size:11px}
@media(max-width:700px){body:has(.dashboard-screen) .app-topbar{height:auto;min-height:60px}body:has(.dashboard-screen) .page-content{padding-top:16px}.dashboard-screen>header{padding:14px 16px;gap:10px}.dashboard-screen>header h1{font-size:24px}.dashboard-screen>header .muted{font-size:13px}.dashboard-screen>header .primary{min-height:42px}.dashboard-screen .stats{gap:9px}.dashboard-screen .stats article{padding:13px 12px}.dashboard-screen .stats strong{font-size:23px;margin:7px 0 4px}.dashboard-screen .stats small{font-size:11px}.dashboard-screen>.panel{padding:18px 14px}.dashboard-screen>.panel>.panel-heading{margin:-18px -14px 0;padding:12px 14px}.dashboard-screen .filters input,.dashboard-screen .filters select{font-size:16px;min-height:44px}.dashboard-screen .filters .secondary{min-height:44px}.dashboard-screen .filters label{font-size:13px}.dashboard-screen td{padding:13px 11px}}
/* Original high-resolution brand asset: no stretching, cropping or raster enlargement. */
.login-brand-panel>img{width:min(88%,560px);height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;object-position:center;border-radius:0;background:transparent}.brand-identity{object-fit:contain;aspect-ratio:auto;background:transparent;border-radius:0}aside .brand-identity{width:190px;height:auto;max-width:100%}.brand .brand-product{margin-top:14px}@media(max-width:1000px){aside .brand-identity{width:190px;height:auto}}@media(max-width:700px){.login-brand-panel>img{width:min(90%,380px);height:auto;max-height:none;aspect-ratio:auto;object-fit:contain}}
