/* Navegação adaptada a telas pequenas sem esconder funções da conta. */
html,body{max-width:100%;overflow-x:hidden}
/* O cadastro pode ser mais alto que a janela; nunca esconda seus últimos campos. */
.entry:not([hidden]){height:100dvh;max-height:100dvh;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;align-items:start}
.entry-form{min-height:100dvh;align-items:center;padding-top:clamp(28px,5vh,64px);padding-bottom:72px}
.entry-panel{margin:auto 0;max-width:100%}
.entry-art{align-self:start;position:sticky;top:0;height:100dvh;min-height:100dvh}
.entry input,.entry select,.entry button{max-width:100%}
.shell,.main,.finance,.finance .panel-grid>*{min-width:0}
.brand-home{cursor:pointer;border:0;background:transparent;color:inherit;text-align:left;padding:0;text-decoration:none}
.brand-home:focus-visible{outline:3px solid #79d8b1;outline-offset:5px;border-radius:8px}
.mobile-menu-button{display:none;border:1px solid #41606a;border-radius:11px;background:#203c48;color:#fff;min-height:42px;min-width:44px;font-size:22px;align-items:center;justify-content:center}
.mobile-nav-backdrop{display:none}
.finance .section-head,.finance .filter-row{min-width:0}
.finance .section-head{flex-wrap:wrap}
.finance .transaction .debt-info{min-width:0;overflow-wrap:anywhere}
.finance .category-row>span{flex:0 0 90px;overflow-wrap:anywhere}
.finance .category-bar{min-width:24px}
.finance .card,.b-section,.b-card{min-width:0}
.finance .big{overflow-wrap:anywhere}
@media(max-width:950px){
  .mobile-head{position:sticky;top:0;z-index:35;gap:14px;padding:12px 18px;box-shadow:0 3px 18px #071b2740}
  .mobile-head .brand{font-size:19px;margin-right:auto}
  .mobile-head .logo{width:34px;height:34px;font-size:20px}
  .mobile-menu-button{display:inline-flex}
  .sidebar{display:flex!important;position:fixed;inset:0 auto 0 0;z-index:42;width:min(300px,85vw);max-height:100dvh;overflow:auto;transform:translateX(-110%);transition:transform .22s ease;box-shadow:15px 0 30px #071b272e}
  body.mobile-nav-open .sidebar{transform:translateX(0)}
  body.mobile-nav-open .mobile-nav-backdrop{display:block;position:fixed;inset:0;z-index:41;background:#061c2999;border:0;width:100%;height:100%;cursor:pointer}
  body.mobile-nav-open{overflow:hidden}
  .finance .panel-grid{grid-template-columns:1fr}
  .main.finance{width:100%;padding:22px 18px}
}
@media(max-width:760px){
  .entry-art{position:relative;top:auto;height:auto;min-height:210px;align-self:stretch}
  .entry-form{min-height:0;align-items:flex-start}
}
@media(max-width:600px){
  .entry{grid-template-rows:170px minmax(0,auto)}
  .entry-art{min-height:170px}
  .entry-form{min-height:0;align-items:flex-start;padding:22px 18px 90px}
  .entry-panel{margin:0 auto}
  .main.finance{padding:17px 12px 30px}
  .finance .cards{grid-template-columns:1fr;gap:10px}
  .finance .top{display:flex;flex-wrap:wrap;gap:13px;margin-bottom:17px}
  .finance .top>div:first-child{min-width:0;width:100%}
  .finance .top h1{font-size:clamp(24px,7vw,32px);line-height:1.15;overflow-wrap:anywhere}
  .finance .top .primary,.finance .top #profileSwitch{min-height:42px;white-space:normal}
  .finance .top #newTx{width:100%}
  .finance .finance-actions{display:flex;flex-wrap:wrap;width:100%}
  .finance .finance-actions button{flex:1 1 130px}
  .finance .card{padding:16px;border-radius:15px}
  .finance .big{font-size:clamp(22px,6vw,29px)}
  .finance .transaction{gap:9px;flex-wrap:wrap}
  .finance .transaction .bubble{width:34px;height:34px;flex:none}
  .finance .transaction .amount{font-size:13px;max-width:42%;text-align:right;overflow-wrap:anywhere;white-space:normal}
  .finance .transaction .remove{min-height:40px;min-width:40px}
  .finance .filter-row{width:100%;justify-content:space-between}
  .finance .filter-row input{max-width:unset;min-width:0;flex:1}
  .finance .category-row{gap:7px}
  .finance .category-row>span{flex-basis:76px;font-size:11px!important}
  .finance .category-row>strong{width:76px!important;font-size:11px!important}
  .modal{padding:18px}
  .modal-actions{flex-wrap:wrap}
  .modal-actions button{flex:1 1 120px}
  .b-tabs{max-width:100%;overscroll-behavior-x:contain}
  .b-grid,.b-fields{grid-template-columns:minmax(0,1fr)}
  .b-section{padding:15px}
  .b-head{align-items:flex-start}
}
/* Keep the navigation attached to the viewport while the page scrolls. */
@media(min-width:951px){.shell>.sidebar,.business-profile .shell>.sidebar{position:fixed;inset:0 auto 0 0;width:240px;height:100dvh;max-height:100dvh;z-index:36;display:flex;overflow:hidden;align-self:auto}.shell>.main{grid-column:2;margin:0 auto;align-self:start}.shell>.sidebar>.nav{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.shell>.sidebar>.brand,.shell>.sidebar>.sidebar-foot{flex:none}.shell>.sidebar>.sidebar-foot{margin-top:0}}
.sidebar .nav{overflow-x:hidden}.b-head>div:first-child{flex:1;min-width:0}.b-head h1{overflow-wrap:break-word}.b-head>button{flex:none;white-space:nowrap}
.b-import-steps{display:flex;gap:12px;flex-wrap:wrap;color:#547764;font-size:12px;margin:22px 0}.b-import-steps span{background:#eef6f0;padding:10px 14px;border-radius:8px}.b-import-file{display:grid;gap:12px;border:2px dashed #c8dfd0;border-radius:13px;padding:24px;background:#fafdfb;color:#39664a;font-size:14px;font-weight:700}.b-import-file input{width:100%;font-size:13px}.b-import-preview{border-top:1px solid #e0ebe2;margin-top:20px;padding-top:20px}#existingDataText{width:100%;max-width:100%;padding:12px;border:1px solid #d8e5db;border-radius:9px;resize:vertical;font:12px monospace}.b-import-preview button:disabled{opacity:.5;cursor:default}@media(max-width:570px){.b-head>button{white-space:normal}.b-import-file{padding:16px}.b-import-steps{display:grid;gap:6px}}
