:root{--bg:#f3f6f8;--card:#fff;--ink:#11283b;--muted:#758697;--navy:#071625;--gold:#c7a86a;--line:#e3eaee;--green:#2e8b6d;--red:#b75151}*{box-sizing:border-box}html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink)}body{margin:0;background:var(--bg);color:var(--ink)}button,input,select{font:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}.shell{min-height:100vh;display:grid;grid-template-columns:270px 1fr}.sidebar{background:linear-gradient(180deg,#071625,#0a1d2f);color:#fff;padding:26px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;gap:12px;align-items:center;padding:0 8px 24px;border-bottom:1px solid rgba(255,255,255,.09)}.brandmark{width:44px;height:44px;border:1px solid rgba(199,168,106,.8);border-radius:4px;display:grid;place-items:center;font-weight:800;color:#d7bf8b;flex:0 0 auto}.brandcopy{display:grid}.brandcopy b{font-size:12px;letter-spacing:.18em}.brandcopy strong{font-size:17px;color:var(--gold)}.brandcopy small{font-size:7px;color:#7890a5;letter-spacing:.22em}.side-note{margin:auto 8px 18px;padding:16px;border:1px solid rgba(199,168,106,.25);border-radius:12px;background:rgba(255,255,255,.025)}.side-note small{font-size:9px;color:var(--gold);letter-spacing:.16em;font-weight:700}.side-note p{margin:8px 0 0;line-height:1.55;color:#d8e1e8;font-size:14px;font-weight:700}.logout{border:0;background:transparent;color:#8da2b6;text-align:left;padding:12px 8px;width:100%}.logout:hover{color:#fff}main{min-width:0}.topbar{height:72px;background:#fff;border-bottom:1px solid #e6ecef;display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:10}.who{display:grid}.who small{color:#8a9aa8;font-size:10px}.who strong{font-size:14px}.privacy{display:flex;align-items:center;gap:7px;color:#718395;font-size:10px}.privacy i{width:7px;height:7px;background:#3d9679;border-radius:50%}.content{max-width:1450px;margin:0 auto;padding:34px}.hero{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;margin-bottom:26px}.eyebrow{font-size:9px;letter-spacing:.18em;font-weight:800;color:#9d7b43;margin:0 0 7px}.hero h1,.card h2{margin:0;line-height:1.15}.hero h1{font-size:30px}.hero .sub{margin:7px 0 0;color:#7c8b9b;font-size:13px}.month{display:flex;align-items:center;background:#fff;border:1px solid var(--line);border-radius:11px;padding:6px}.month>a{border:0;background:transparent;color:#66788a;padding:8px 12px;font-size:20px}.month .label{min-width:170px;padding:0 17px;text-align:center;border-left:1px solid #e8edef;border-right:1px solid #e8edef;display:grid}.month small{font-size:9px;color:#97a5b1}.month strong{font-size:12px;text-transform:capitalize}.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.stat,.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 8px 24px rgba(22,46,67,.045)}.stat-top{display:flex;justify-content:space-between;align-items:center;color:#718194;font-size:11px}.stat-icon{width:36px;height:36px;border-radius:10px;background:#edf2f5;display:grid;place-items:center}.stat>strong{display:block;font-size:23px;margin-top:12px}.actions{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0}.actions button{border:1px solid #dbe3e8;background:#fff;color:#27445d;border-radius:8px;padding:10px 13px;font-size:11px}.actions button:hover{border-color:#b9c7d0;background:#f9fbfc}.split{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}.card h2{font-size:17px}.card-head{display:flex;justify-content:space-between;align-items:flex-start}.bill-list,.goal-list,.tx-list{margin-top:15px}.bill{display:grid;grid-template-columns:25px 38px 1fr auto;gap:11px;align-items:center;padding:11px 0;border-bottom:1px solid #edf1f3}.bill form{margin:0}.check{width:21px;height:21px;border:1px solid #d4dde3;border-radius:50%;background:#fff;padding:0}.check.done{background:var(--green);border-color:var(--green);color:#fff}.due{display:grid;text-align:center;line-height:1}.due small{font-size:7px;color:#98a5b0}.due strong{font-size:13px}.billinfo{display:grid}.billinfo strong{font-size:12px}.billinfo span{font-size:9px;color:#94a1ad}.billamt strong{font-size:12px}.goal{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #edf1f3}.goal strong{font-size:12px}.goal span{font-size:9px;color:#8796a4;display:block}.progress{height:6px;background:#e9eef1;border-radius:99px;overflow:hidden;margin:8px 0}.progress span{display:block;height:100%;background:var(--gold);border-radius:99px}.investment{background:linear-gradient(150deg,#0b2137,#10304e);color:#fff;border:0}.investment h2{font-size:22px}.investment p:not(.eyebrow){color:#98acbc;font-size:11px}.goal-number{display:flex;align-items:flex-end;gap:6px;margin-top:35px}.goal-number strong{font-size:25px}.goal-number span{font-size:10px;color:#8fa4b6;padding-bottom:4px}.investment .progress{background:rgba(255,255,255,.12)}.inline-edit{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:14px}.inline-edit input{min-width:0;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;border-radius:8px;padding:10px}.lightbtn{border:1px solid rgba(255,255,255,.18);background:#fff;color:#0b2137;border-radius:8px;padding:10px 14px}.recent{margin-top:16px}.tx{display:grid;grid-template-columns:36px 1fr auto auto;gap:11px;align-items:center;padding:11px 0;border-bottom:1px solid #edf1f3}.txicon{width:34px;height:34px;border-radius:9px;background:#f7eee8;display:grid;place-items:center}.txicon.income{background:#eaf4ef;color:var(--green)}.txinfo{display:grid}.txinfo strong{font-size:12px}.txinfo span{font-size:9px;color:#94a1ad}.txval{font-size:11px;font-weight:700;white-space:nowrap}.txval.pos{color:var(--green)}.txval.neg{color:#9a5a43}.iconbtn{border:0;background:transparent;color:#587086;padding:6px;font-size:10px}.iconbtn:hover{color:#163650}.iconbtn.danger{color:#a95d5d}.row-actions{display:flex;align-items:center;gap:4px}.row-actions form{margin:0}.empty{text-align:center;padding:32px 15px;color:#80909e}.empty .bubble{font-size:22px}.alert{background:#fff1f1;border:1px solid #f0d1d1;color:#934d4d;border-radius:10px;padding:12px 14px;margin-bottom:16px;font-size:12px}.alert.success{background:#edf8f3;border-color:#cde8dc;color:#2d745b}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 60% 20%,#12324f,#071625 50%)}.login-card{width:min(430px,100%);background:#fff;border-radius:18px;padding:30px;box-shadow:0 30px 90px rgba(0,0,0,.28)}.brand-dark{border-bottom:1px solid #e9edef;padding:0 0 22px}.brand-dark .brandcopy b{color:#18344d}.login-copy{padding:28px 0 8px}.login-copy h1,.installer h1{margin:0;font-size:28px}.login-copy>p:last-child,.installer>p{color:#778999;font-size:12px;line-height:1.6}.login-form,.install-form{display:grid;gap:14px}.login-form label,.install-form label,.dialog-form label{display:grid;gap:6px;font-size:10px;font-weight:700;color:#53677a}.login-form input,.install-form input,.dialog-form input,.dialog-form select{width:100%;border:1px solid #dbe3e8;border-radius:8px;padding:11px 12px;background:#fff;color:#173248}.primary,.primary-link{border:0;background:#0d2943;color:#fff;border-radius:8px;padding:11px 14px;display:inline-block;text-align:center}.login-button{width:100%}.form-error{font-size:11px;color:#a14c4c;background:#fff3f3;border:1px solid #f1dede;border-radius:8px;padding:10px}.install-body{min-height:100vh;background:#eef3f6;padding:30px}.installer{width:min(760px,100%);margin:0 auto;background:#fff;padding:30px;border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px rgba(24,51,73,.08)}.install-form fieldset{border:1px solid var(--line);border-radius:12px;padding:18px;display:grid;gap:12px}.install-form legend{font-size:12px;font-weight:800;color:#173248;padding:0 8px}.installer code{background:#eef2f4;border-radius:4px;padding:2px 5px}.installer .primary-link{margin-top:12px}dialog{border:0;border-radius:16px;padding:0;width:min(460px,calc(100vw - 28px));box-shadow:0 30px 100px rgba(5,22,37,.28);color:var(--ink)}dialog::backdrop{background:rgba(4,16,27,.58);backdrop-filter:blur(3px)}.dialog-form{display:grid;gap:13px;padding:22px}.dialog-head{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #edf1f3;padding-bottom:15px;margin-bottom:2px}.dialog-head h3{margin:0;font-size:19px}.dialog-head>button{border:0;background:#eef2f4;color:#607384;border-radius:50%;width:30px;height:30px;font-size:18px}.dialog-form>.primary{margin-top:4px}@media(max-width:1000px){.shell{grid-template-columns:90px 1fr}.brandcopy,.side-note,.sidebar form{display:none}.brand{justify-content:center}.grid4{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}}@media(max-width:650px){.shell{display:block}.sidebar{display:none}.topbar{height:58px;padding:0 18px}.privacy{display:none}.content{padding:20px 15px}.hero{align-items:flex-start;flex-direction:column}.hero h1{font-size:24px}.month{width:100%}.month .label{flex:1}.grid4{grid-template-columns:1fr 1fr;gap:9px}.stat{padding:14px}.stat>strong{font-size:18px}.tx{grid-template-columns:34px 1fr auto}.tx .txval{grid-column:2}.tx form{grid-column:3;grid-row:1/3}.inline-edit{grid-template-columns:1fr}.bill{grid-template-columns:25px 32px 1fr}.billamt{grid-column:3}.install-body{padding:14px}.installer{padding:22px}.debt-row{grid-template-columns:1fr}.row-actions{justify-content:flex-end}}
/* Navegação e páginas internas */
.side-nav{display:grid;gap:5px;margin-top:22px}.nav-label{font-size:8px;letter-spacing:.18em;color:#607b91;font-weight:800;padding:0 10px 7px}.nav-item{display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:9px;color:#91a7b9;font-size:12px;font-weight:650;transition:.18s}.nav-item:hover{background:rgba(255,255,255,.055);color:#fff}.nav-item.active{background:rgba(199,168,106,.12);color:#fff;border:1px solid rgba(199,168,106,.2)}.nav-icon{width:21px;text-align:center;color:#c7a86a;font-size:14px}.nav-sub{display:grid;margin:2px 0 4px 43px;border-left:1px solid rgba(255,255,255,.1);padding-left:10px}.nav-sub a{font-size:10px;color:#7890a5;padding:6px 0}.nav-sub a.active,.nav-sub a:hover{color:#d7bf8b}.side-footer{margin-top:auto}.side-footer .side-note{margin:18px 8px}.page-heading{margin-bottom:25px}.page-heading h1{margin:0;font-size:30px;line-height:1.12}.page-heading>p:last-child{margin:7px 0 0;color:#7c8b9b;font-size:13px}.page-head-row{display:flex;align-items:flex-end;justify-content:space-between;gap:25px}.page-head-row .page-heading{margin-bottom:25px}.month.compact .label{min-width:120px}.stack-form{display:grid;gap:12px;margin-top:17px}.stack-form label,.goal-edit label{display:grid;gap:6px;font-size:10px;font-weight:700;color:#53677a}.stack-form input,.stack-form select,.goal-edit input{width:100%;border:1px solid #dbe3e8;border-radius:8px;padding:10px 11px;background:#fff;color:#173248}.form-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.compact-form{margin-top:12px}.secondary,.secondary-link{border:1px solid #d6e0e6;background:#fff;color:#21415b;border-radius:8px;padding:10px 13px;display:inline-block}.secondary:hover,.secondary-link:hover{background:#f5f8fa}.primary:disabled{opacity:.45;cursor:not-allowed}.mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:20px}.mini-stats>div{background:#f5f8fa;border:1px solid #e4eaee;border-radius:10px;padding:14px;display:grid;gap:5px}.mini-stats span{font-size:9px;color:#8393a1}.mini-stats strong{font-size:15px}.page-split{grid-template-columns:minmax(320px,.8fr) 1.2fr}.goal-edit{align-items:end}.compact-fields{margin-bottom:8px}.bill-page{grid-template-columns:25px 38px 1fr auto}.narrow-card{max-width:650px}.debt-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:16px}.debt-card>.card-head>strong{font-size:18px}.muted-copy{color:#7d8d9b;font-size:11px;line-height:1.6}.text-danger{border:0;background:transparent;color:#ad5a5a;font-size:10px;padding:10px 0}.settings-grid{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}.settings-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px;display:grid;grid-template-columns:42px 1fr auto;gap:14px;align-items:center;box-shadow:0 8px 24px rgba(22,46,67,.04)}.settings-card:hover:not(.disabled){border-color:#c7d3db;transform:translateY(-1px)}.settings-card.disabled{opacity:.58}.settings-card strong{font-size:13px}.settings-card p{font-size:10px;line-height:1.55;color:#8292a0;margin:5px 0 0}.settings-card>span:last-child{font-size:10px;color:#8496a5}.settings-icon{width:42px;height:42px;border-radius:10px;background:#edf2f5;display:grid;place-items:center;color:#9b793e}.status-dot{width:8px;height:8px;border-radius:50%;display:inline-block}.status-dot.ok{background:#3d9679}.status-dot.warn{background:#d5a443}.small-stat{font-size:15px!important;overflow-wrap:anywhere}.pill{font-size:9px;font-weight:800;padding:6px 8px;border-radius:99px}.pill.success{background:#e9f6f0;color:#34785f}.pill.warning{background:#fff5dd;color:#9a6f19}.migration-list{display:grid;margin:14px 0 18px}.migration-row{display:grid;grid-template-columns:28px 1fr auto;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #edf1f3}.migration-status{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;font-size:10px;font-weight:900}.migration-status.done{background:#e8f5ef;color:#2e8064}.migration-status.pending{background:#fff1d9;color:#9a6d16}.migration-row strong{font-size:11px}.migration-row p{margin:3px 0 0;font-size:9px;color:#7f909e}.migration-row small{font-size:8px;color:#91a0ac}.diagnostic-list{display:grid;margin:14px 0 18px}.diagnostic-list>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #edf1f3}.diagnostic-list dt{font-size:10px;color:#7d8d9b}.diagnostic-list dd{margin:0;font-size:10px;font-weight:750;text-align:right;overflow-wrap:anywhere}.table-wrap{overflow:auto;margin-top:14px}.data-table{width:100%;border-collapse:collapse;font-size:10px}.data-table th{text-align:left;color:#7e8e9b;font-size:9px;padding:10px;border-bottom:1px solid #dfe7eb}.data-table td{padding:11px 10px;border-bottom:1px solid #edf1f3}.maintenance-stats{margin-bottom:16px}
@media(max-width:1000px){.side-nav .nav-item span:last-child,.nav-label,.nav-sub,.side-footer{display:none}.side-nav{justify-items:center}.nav-item{padding:10px}.settings-grid{grid-template-columns:1fr}.debt-grid{grid-template-columns:1fr}}
@media(max-width:650px){.page-head-row{align-items:flex-start;flex-direction:column}.page-heading h1{font-size:24px}.form-grid-2,.mini-stats{grid-template-columns:1fr}.settings-grid{grid-template-columns:1fr}.page-split{grid-template-columns:1fr}.maintenance-stats{grid-template-columns:1fr 1fr}}

/* Gestão de contas fixas */
.bills-head{align-items:flex-start}.month-filter{display:flex;gap:8px;align-items:flex-end;background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px}.month-filter label{display:grid;gap:4px}.month-filter label span{font-size:8px;letter-spacing:.12em;color:#8c9aa6;font-weight:800}.month-filter input{border:0;outline:0;color:#173248;font-weight:700;background:transparent}.bills-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.summary-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:17px 18px;display:grid;gap:5px;box-shadow:0 7px 20px rgba(22,46,67,.035)}.summary-card>span{font-size:9px;color:#7d8d9c}.summary-card>strong{font-size:20px}.summary-card>small{font-size:9px;color:#9aa7b1}.summary-card.attention{border-color:#ead7ae;background:#fffdf7}.summary-card.attention>strong{color:#9a6f19}.summary-card.success{border-color:#cfe7dc;background:#fbfffd}.summary-card.success>strong{color:#34785f}.bills-workspace{display:grid;grid-template-columns:minmax(290px,390px) 1fr;gap:16px}.new-bill-card{align-self:start;position:sticky;top:90px}.section-title{display:flex;justify-content:space-between;align-items:flex-start}.section-icon{width:35px;height:35px;border-radius:10px;background:#f2f5f7;display:grid;place-items:center;color:#9b793e;font-size:18px}.money-input{display:flex;align-items:center;border:1px solid #dbe3e8;border-radius:8px;overflow:hidden;background:#fff}.money-input span{font-size:10px;color:#8c9aa6;padding-left:10px}.money-input input{border:0!important;padding-left:6px!important}.bills-list-card{padding:19px 20px}.bills-list-head{align-items:center}.list-legend{font-size:8px;color:#8796a3;display:flex;align-items:center;gap:5px}.legend-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-left:7px}.legend-dot.paid{background:#3d9679}.legend-dot.pending{background:#d7af60}.managed-bill-list{margin-top:12px}.managed-bill{display:grid;grid-template-columns:34px 48px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:14px 4px;border-bottom:1px solid #edf1f3;transition:.16s}.managed-bill:hover{background:#fafcfd}.managed-bill.is-paid{opacity:.78}.bill-check-form{margin:0}.check.large{width:26px;height:26px}.bill-date-badge{width:44px;height:44px;border:1px solid #e2e8ec;border-radius:10px;display:grid;place-content:center;text-align:center;background:#fbfcfd}.bill-date-badge small{font-size:6px;color:#9aa7b1}.bill-date-badge strong{font-size:14px}.managed-bill-info{display:grid;gap:4px;min-width:0}.managed-bill-info>span{font-size:8px;color:#92a0ab;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bill-name-line{display:flex;align-items:center;gap:8px;min-width:0}.bill-name-line>strong{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.status-pill{font-size:7px;font-weight:800;padding:4px 6px;border-radius:99px}.status-pill.paid{background:#e8f5ef;color:#2e8064}.status-pill.pending{background:#fff5df;color:#9a701f}.managed-bill-amount{font-weight:800;font-size:12px;white-space:nowrap}.managed-bill-actions{display:flex;align-items:center;gap:4px}.managed-bill-actions form{margin:0}.action-button{border:1px solid #dce5ea;background:#fff;color:#294961;border-radius:7px;padding:7px 9px;font-size:8px;font-weight:700}.action-button:hover{background:#f4f7f9}.action-button.muted{border-color:transparent;background:transparent;color:#8999a6}.bills-empty{display:grid;justify-items:center;gap:5px}.bills-empty span{font-size:9px}.archived-section{margin-top:16px;padding:0}.archived-section details{padding:18px 20px}.archived-section summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center}.archived-section summary::-webkit-details-marker{display:none}.archived-section summary strong{font-size:12px}.archived-section summary>span{font-size:9px;color:#778a99}.archived-list{margin-top:14px;border-top:1px solid #edf1f3}.archived-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 0;border-bottom:1px solid #edf1f3}.archived-row>div{display:grid;gap:3px}.archived-row strong{font-size:11px}.archived-row span{font-size:8px;color:#8f9da8}.small-button{padding:7px 9px;font-size:8px}.bill-edit-dialog{width:min(520px,calc(100vw - 28px))}.dialog-note{background:#f4f7f9;border:1px solid #e5ebee;border-radius:8px;padding:10px;font-size:9px;line-height:1.5;color:#748694}
@media(max-width:1100px){.bills-summary{grid-template-columns:repeat(2,1fr)}.bills-workspace{grid-template-columns:1fr}.new-bill-card{position:static}.managed-bill{grid-template-columns:34px 48px 1fr auto}.managed-bill-actions{grid-column:3/5;justify-content:flex-end}}
@media(max-width:650px){.month-filter{width:100%}.bills-summary{grid-template-columns:1fr 1fr}.managed-bill{grid-template-columns:30px 42px 1fr}.managed-bill-amount{grid-column:3}.managed-bill-actions{grid-column:3;justify-content:flex-start}.list-legend{display:none}.bill-date-badge{width:39px;height:39px}}


/* ===== Dashboard 2.0 + Sidebar moderna ===== */
:root{
  --sidebar-expanded:248px;
  --sidebar-collapsed:82px;
  --surface:#ffffff;
  --surface-soft:#f7f9fb;
  --surface-dark:#0a1e31;
  --surface-dark-2:#0d2942;
  --border-soft:#e2e9ee;
  --text-main:#10283c;
  --text-soft:#7d8f9e;
  --brand-gold:#c4a35f;
  --success:#2f8d73;
  --danger:#c46a5c;
}
body{background:#f3f6f8}
.shell{
  grid-template-columns:var(--sidebar-expanded) minmax(0,1fr);
  transition:grid-template-columns .22s ease;
}
html.sidebar-collapsed .shell{grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr)}

.sidebar{
  padding:20px 16px 16px;
  background:linear-gradient(180deg,#071727 0%,#092036 100%);
  border-right:1px solid rgba(255,255,255,.035);
  overflow:hidden;
  transition:padding .22s ease,transform .22s ease;
  z-index:50;
}
.sidebar-top{display:flex;align-items:center;gap:8px;min-height:58px}
.modern-brand{
  flex:1;
  min-width:0;
  padding:0 4px 16px;
  border-bottom:0;
  transition:.2s ease;
}
.modern-brand .brandmark{
  width:40px;height:40px;border-radius:10px;
  background:rgba(198,166,98,.06);
  border-color:rgba(198,166,98,.7)
}
.modern-brand .brandcopy{overflow:hidden;white-space:nowrap}
.modern-brand .brandcopy b{font-size:10px;color:#f5f8fa}
.modern-brand .brandcopy strong{font-size:15px}
.modern-brand .brandcopy small{font-size:6px}

.sidebar-toggle{
  width:30px;height:30px;border-radius:8px;border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.035);color:#8ba0b1;display:grid;place-items:center;
  transition:.2s ease;flex:0 0 auto
}
.sidebar-toggle:hover{background:rgba(255,255,255,.08);color:#fff}
.sidebar-toggle svg,.mobile-menu-toggle svg,.nav-icon svg{
  width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round
}
.sidebar-toggle svg{transition:transform .2s ease}

.modern-nav{gap:4px;margin-top:15px}
.modern-nav .nav-label{padding:0 11px 9px;font-size:7px;color:#5f778b}
.modern-nav .nav-item{
  position:relative;min-height:44px;padding:0 11px;border-radius:10px;border:1px solid transparent;
  color:#8fa5b7;font-size:11px;font-weight:650;gap:12px
}
.modern-nav .nav-item:hover{background:rgba(255,255,255,.045);color:#eef4f8}
.modern-nav .nav-item.active{
  background:linear-gradient(90deg,rgba(196,163,95,.14),rgba(196,163,95,.06));
  border-color:rgba(196,163,95,.18);color:#fff
}
.modern-nav .nav-item.active:before{
  content:"";position:absolute;left:-1px;top:10px;bottom:10px;width:2px;border-radius:3px;background:var(--brand-gold)
}
.modern-nav .nav-icon{
  width:20px;height:20px;display:grid;place-items:center;color:#c1a160;flex:0 0 auto
}
.nav-item-label{white-space:nowrap;overflow:hidden;transition:opacity .16s ease}
.sidebar-spacer{flex:1}

.sidebar-user{
  display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;align-items:center;
  padding:12px 8px;margin-top:14px;border-top:1px solid rgba(255,255,255,.07)
}
.user-avatar{
  width:34px;height:34px;border-radius:10px;background:rgba(196,163,95,.12);
  border:1px solid rgba(196,163,95,.22);color:#d8bd82;display:grid;place-items:center;font-size:12px;font-weight:800
}
.sidebar-user-copy{display:grid;min-width:0}
.sidebar-user-copy strong{font-size:10px;color:#eef4f7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-user-copy span{font-size:7px;color:#6f8799;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sidebar-logout{margin:0!important}
.modern-logout{
  display:flex;align-items:center;gap:12px;width:100%;min-height:40px;padding:0 10px;border-radius:9px;
  color:#718a9e;font-size:10px
}
.modern-logout:hover{background:rgba(255,255,255,.04);color:#dce8ef}

html.sidebar-collapsed .sidebar{padding-left:12px;padding-right:12px}
html.sidebar-collapsed .modern-brand{justify-content:center;padding-left:0;padding-right:0}
html.sidebar-collapsed .brandcopy,
html.sidebar-collapsed .nav-item-label,
html.sidebar-collapsed .nav-label,
html.sidebar-collapsed .nav-sub,
html.sidebar-collapsed .sidebar-user-copy{display:none}
html.sidebar-collapsed .sidebar-top{flex-direction:column;gap:4px}
html.sidebar-collapsed .sidebar-toggle{width:38px;border-color:transparent;background:transparent}
html.sidebar-collapsed .sidebar-toggle svg{transform:rotate(180deg)}
html.sidebar-collapsed .modern-nav .nav-item{justify-content:center;padding:0;width:48px;margin:0 auto}
html.sidebar-collapsed .modern-nav .nav-item.active:before{left:-7px}
html.sidebar-collapsed .sidebar-user{grid-template-columns:1fr;justify-items:center;padding-left:0;padding-right:0}
html.sidebar-collapsed .modern-logout{justify-content:center;padding:0;width:48px;margin:0 auto}

.modern-topbar{
  height:64px;padding:0 28px;background:rgba(255,255,255,.92);backdrop-filter:blur(14px);
  border-bottom:1px solid #e5ebef
}
.topbar-left,.topbar-right{display:flex;align-items:center;gap:12px}
.modern-topbar .who small{font-size:7px;letter-spacing:.08em}
.modern-topbar .who strong{font-size:12px}
.mobile-menu-toggle{
  display:none;width:36px;height:36px;border:1px solid #e0e7eb;background:#fff;border-radius:9px;
  color:#345067;place-items:center
}
.sidebar-overlay{display:none}

.dashboard-content{max-width:1540px;padding:30px 34px 42px}
.dashboard-heading{
  display:flex;justify-content:space-between;gap:24px;align-items:flex-end;margin-bottom:22px
}
.dashboard-heading h1{margin:0;font-size:30px;letter-spacing:-.035em;line-height:1.1}
.dashboard-heading>div:first-child>p:last-child{margin:8px 0 0;color:#80909e;font-size:12px}
.dashboard-heading-actions{display:flex;gap:10px;align-items:center}
.modern-month{height:48px;padding:5px}
.modern-month .label{min-width:165px}
.quick-primary{height:48px;display:flex;align-items:center;padding:0 16px;font-size:10px;font-weight:750;white-space:nowrap}

.dashboard-kpis{
  display:grid;grid-template-columns:1.25fr repeat(3,1fr);gap:12px;margin-bottom:12px
}
.kpi-card{
  min-height:137px;padding:18px 19px;background:#fff;border:1px solid #e1e8ed;border-radius:14px;
  box-shadow:0 8px 24px rgba(23,48,68,.04);display:flex;flex-direction:column;justify-content:space-between
}
.kpi-card.balance-kpi{
  color:#fff;border-color:transparent;background:linear-gradient(135deg,#0a2034 0%,#103552 100%);
  box-shadow:0 14px 32px rgba(9,31,50,.14)
}
.kpi-top{display:flex;align-items:center;justify-content:space-between;color:#788b9b;font-size:9px}
.balance-kpi .kpi-top{color:#9db0bf}
.kpi-symbol{
  width:31px;height:31px;border-radius:9px;background:rgba(255,255,255,.08);
  display:grid;place-items:center;font-size:15px;color:#d4bd8c
}
.metric-dot{width:8px;height:8px;border-radius:50%}
.metric-dot.income{background:var(--success)}
.metric-dot.outflow{background:var(--danger)}
.metric-dot.investment{background:var(--brand-gold)}
.kpi-card>strong{font-size:24px;letter-spacing:-.035em;margin:10px 0}
.balance-kpi>strong{font-size:29px}
.kpi-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
.kpi-bottom small{font-size:7px;color:#7590a4}
.trend{font-size:8px;font-weight:700;color:#8798a6}
.trend.positive{color:#2f8d73}.trend.negative{color:#bb675b}.trend.neutral{color:#8a9aa7}
.balance-kpi .trend.positive{color:#73c5a8}
.balance-kpi .trend.negative{color:#e7a096}
.balance-kpi .trend.neutral{color:#90a9bb}

.dashboard-context-strip{
  display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:#dde5ea;border:1px solid #dde5ea;
  border-radius:13px;overflow:hidden;margin-bottom:16px
}
.context-stat{background:#fff;padding:13px 16px;display:grid;gap:3px;transition:.15s ease}
.context-stat:hover{background:#fbfcfd}
.context-stat>span{font-size:8px;color:#81919e}
.context-stat>strong{font-size:14px}
.context-stat>small{font-size:7px;color:#9ba7b1}

.dashboard-main-grid{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(285px,.9fr);gap:14px;margin-bottom:14px}
.chart-card{padding:19px 20px}
.card-title-row{display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.card-title-row h2{font-size:16px}
.card-title-row>div>p:last-child{font-size:9px;color:#8b99a5;margin:5px 0 0}
.card-link{font-size:8px;color:#587187;white-space:nowrap;padding-top:3px}
.card-link:hover{color:#102f48}
.chart-shell{position:relative;width:100%;min-height:250px;margin-top:13px}
.large-chart{height:320px}.history-chart{height:285px}.category-chart{height:285px}
.chart-empty-message{
  display:none;position:absolute;inset:0;align-items:center;justify-content:center;text-align:center;
  color:#8d9ba7;font-size:10px;padding:30px
}
.chart-shell.chart-empty canvas{display:none}.chart-shell.chart-empty .chart-empty-message{display:flex}
.chart-shell.chart-unavailable:after{
  content:"Não foi possível carregar os gráficos.";position:absolute;inset:0;display:grid;place-items:center;
  font-size:10px;color:#8797a4
}

.insights-card{padding:19px 20px;background:#0a2034;color:#fff;border:0}
.insights-card .card-title-row h2{color:#fff}
.insight-badge{font-size:7px;letter-spacing:.1em;border:1px solid rgba(255,255,255,.12);border-radius:99px;padding:5px 7px;color:#8fa6b7}
.insights-list{display:grid;margin-top:13px}
.insight-item{display:grid;grid-template-columns:9px 1fr;gap:10px;padding:13px 0;border-bottom:1px solid rgba(255,255,255,.075)}
.insight-item:last-child{border-bottom:0}
.insight-dot{width:7px;height:7px;border-radius:50%;margin-top:4px;background:#7890a3}
.insight-item.success .insight-dot{background:#55aa8c}
.insight-item.attention .insight-dot{background:#d9ae5f}
.insight-item.info .insight-dot{background:#7698b1}
.insight-item strong{font-size:10px;color:#eef5f8}
.insight-item p{font-size:8px;line-height:1.55;color:#8ea5b6;margin:4px 0 0}

.dashboard-chart-grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(300px,.8fr);gap:14px;margin-bottom:14px}
.dashboard-bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.dashboard-list-card{padding:19px 20px}
.dashboard-bills,.dashboard-transactions{margin-top:12px}
.dashboard-bill-row,.dashboard-tx-row{
  display:grid;align-items:center;gap:11px;padding:10px 0;border-bottom:1px solid #edf1f3
}
.dashboard-bill-row{grid-template-columns:38px 1fr auto 28px}
.dashboard-tx-row{grid-template-columns:34px 1fr auto}
.dashboard-due{
  width:36px;height:36px;border-radius:9px;background:#f4f7f9;display:grid;place-content:center;text-align:center
}
.dashboard-due small{font-size:5px;color:#9aa7b2}.dashboard-due strong{font-size:11px}
.dashboard-bill-copy,.dashboard-tx-copy{display:grid;min-width:0}
.dashboard-bill-copy strong,.dashboard-tx-copy strong{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dashboard-bill-copy span,.dashboard-tx-copy span{font-size:7px;color:#91a0ac;margin-top:2px}
.dashboard-row-value{font-size:10px;white-space:nowrap}
.dashboard-row-value.positive-value{color:#2f8d73}
.dashboard-check{
  width:26px;height:26px;border-radius:8px;border:1px solid #d9e3e8;background:#fff;color:#698093;font-size:10px
}
.dashboard-check:hover{background:#eaf5f0;border-color:#badbcc;color:#2f8d73}
.dashboard-tx-icon{
  width:31px;height:31px;border-radius:9px;background:#f7eee9;color:#a25e4f;display:grid;place-items:center;font-size:11px
}
.dashboard-tx-icon.income{background:#e9f5ef;color:#2f8d73}
.dashboard-tx-icon.investment{background:#fff5e2;color:#a47725}
.list-more{display:inline-block;font-size:8px;color:#617a8e;margin-top:10px}
.dashboard-empty-state{min-height:170px;display:grid;place-content:center;justify-items:center;text-align:center;color:#8b9aa6}
.dashboard-empty-state>span{width:38px;height:38px;border-radius:12px;background:#f3f6f8;display:grid;place-items:center;margin-bottom:8px;color:#6f8799}
.dashboard-empty-state strong{font-size:10px;color:#5f7588}
.dashboard-empty-state p{font-size:8px;margin:4px 0 0;max-width:230px}

.investment-progress-card{
  display:grid;grid-template-columns:minmax(220px,1.2fr) auto minmax(220px,1fr) auto;
  gap:16px;align-items:center;padding:18px 20px
}
.investment-progress-copy h2{font-size:15px}
.investment-progress-copy>p:last-child{font-size:8px;color:#8393a0;margin:4px 0 0}
.investment-progress-values{display:flex;align-items:baseline;gap:5px;white-space:nowrap}
.investment-progress-values strong{font-size:17px}.investment-progress-values span{font-size:8px;color:#8a9aa7}
.investment-progress-bar{height:7px;background:#e9eef1;border-radius:99px;overflow:hidden}
.investment-progress-bar span{display:block;height:100%;background:linear-gradient(90deg,#b9934d,#d2b875);border-radius:99px}
.investment-progress-card .secondary{font-size:8px;white-space:nowrap}

@media(max-width:1200px){
  .dashboard-kpis{grid-template-columns:repeat(2,1fr)}
  .dashboard-context-strip{grid-template-columns:repeat(2,1fr)}
  .dashboard-main-grid,.dashboard-chart-grid{grid-template-columns:1fr}
  .insights-list{grid-template-columns:1fr 1fr;column-gap:18px}
  .investment-progress-card{grid-template-columns:1fr auto}
  .investment-progress-bar{grid-column:1/-1}
}
@media(max-width:1000px) and (min-width:761px){
  .shell{grid-template-columns:var(--sidebar-expanded) minmax(0,1fr)}
  html.sidebar-collapsed .shell{grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr)}
  .side-nav .nav-item span:last-child,.nav-label,.nav-sub,.side-footer{display:initial}
  html.sidebar-collapsed .nav-item-label,
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .nav-sub,
  html.sidebar-collapsed .sidebar-user-copy{display:none}
}
@media(max-width:900px){
  .dashboard-heading{align-items:flex-start;flex-direction:column}
  .dashboard-heading-actions{width:100%;justify-content:space-between}
  .dashboard-bottom-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .shell,.shell.sidebar-collapsed,html.sidebar-collapsed .shell{display:block!important}
  .sidebar{
    display:flex!important;position:fixed;left:0;top:0;bottom:0;width:min(285px,84vw);height:100vh;
    transform:translateX(-102%);box-shadow:20px 0 60px rgba(4,18,29,.24)
  }
  html.sidebar-mobile-open .sidebar{transform:translateX(0)}
  html.sidebar-collapsed .sidebar{padding:20px 16px 16px}
  html.sidebar-collapsed .sidebar-top{flex-direction:row}
  html.sidebar-collapsed .brandcopy,
  html.sidebar-collapsed .nav-item-label,
  html.sidebar-collapsed .nav-label,
  html.sidebar-collapsed .sidebar-user-copy{display:grid}
  html.sidebar-collapsed .nav-item-label{display:inline}
  html.sidebar-collapsed .nav-label{display:block}
  html.sidebar-collapsed .modern-nav .nav-item{justify-content:flex-start;padding:0 11px;width:auto;margin:0}
  html.sidebar-collapsed .sidebar-user{grid-template-columns:36px minmax(0,1fr);justify-items:stretch;padding:12px 8px}
  html.sidebar-collapsed .modern-logout{justify-content:flex-start;padding:0 10px;width:100%;margin:0}
  .sidebar-toggle{display:none}
  .sidebar-overlay{display:block;position:fixed;inset:0;border:0;background:rgba(4,17,28,.48);z-index:45;opacity:0;visibility:hidden;transition:.2s}
  html.sidebar-mobile-open .sidebar-overlay{opacity:1;visibility:visible}
  .mobile-menu-toggle{display:grid}
  .modern-topbar{height:60px;padding:0 16px}
  .dashboard-content{padding:22px 15px 34px}
  .dashboard-heading h1{font-size:25px}
  .dashboard-heading-actions{align-items:stretch;flex-direction:column}
  .modern-month{width:100%}.modern-month .label{flex:1}
  .quick-primary{justify-content:center}
  .dashboard-kpis{grid-template-columns:1fr 1fr}
  .kpi-card{min-height:125px;padding:15px}
  .balance-kpi>strong,.kpi-card>strong{font-size:20px}
  .dashboard-context-strip{grid-template-columns:1fr 1fr}
  .insights-list{grid-template-columns:1fr}
  .dashboard-bottom-grid{grid-template-columns:1fr}
  .investment-progress-card{grid-template-columns:1fr}
  .investment-progress-bar{grid-column:auto}
}
@media(max-width:520px){
  .dashboard-kpis{grid-template-columns:1fr}
  .dashboard-context-strip{grid-template-columns:1fr}
  .dashboard-heading-actions{gap:8px}
  .card-title-row{align-items:flex-start}
  .large-chart{height:270px}.history-chart,.category-chart{height:250px}
  .dashboard-bill-row{grid-template-columns:38px 1fr auto}
  .dashboard-bill-row form{grid-column:3}
  .dashboard-row-value{grid-column:2;grid-row:2}
}

/* Correções de compatibilidade da sidebar com os breakpoints antigos */
.sidebar .sidebar-logout{display:block!important}
@media(max-width:1000px) and (min-width:761px){
  .modern-brand .brandcopy{display:grid!important}
  html.sidebar-collapsed .modern-brand .brandcopy{display:none!important}
}

.auto-transaction-badge{
  display:inline-flex;align-items:center;justify-content:center;
  padding:5px 8px;border-radius:999px;
  background:#eef4f7;color:#60798c;
  border:1px solid #dce6eb;
  font-size:7px;font-weight:800;letter-spacing:.04em;
  white-space:nowrap
}

/* Tipos de recorrência */
.recurring-explainer{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.recurring-explainer>div{background:#fff;border:1px solid var(--border-soft);border-radius:12px;padding:12px 14px;display:grid;grid-template-columns:10px auto;column-gap:8px;align-items:center}
.recurring-explainer strong{font-size:10px}.recurring-explainer small{grid-column:2;font-size:8px;color:#8797a4;margin-top:2px;line-height:1.45}
.recurring-accounting-note{margin:-3px 0 14px;padding:10px 13px;border-radius:10px;background:#fffaf0;border:1px solid #eedfbf;color:#81662e;font-size:8px;line-height:1.55}.recurring-accounting-note strong{font-weight:850}
.bill-type-dot{width:8px;height:8px;border-radius:50%}.bill-type-dot.fixed{background:#59758b}.bill-type-dot.variable{background:#c4a35f}.bill-type-dot.installment{background:#6c8e7e}
.recurring-form select{width:100%;border:1px solid #dbe3e8;border-radius:8px;padding:10px 11px;background:#fff;color:#173248}
.installment-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.installment-fields[hidden]{display:none!important}
.billing-form-hint{font-size:8px;line-height:1.55;color:#768a99;background:#f5f8fa;border:1px solid #e4ebef;border-radius:8px;padding:9px 10px}
.recurring-bill{grid-template-columns:34px 48px minmax(0,1fr) auto auto}
.recurring-bill.needs-value{background:#fffdf8}
.bill-type-badge{font-size:6px;font-weight:850;letter-spacing:.04em;padding:4px 6px;border-radius:999px}
.bill-type-badge.fixed{background:#edf2f5;color:#557083}.bill-type-badge.variable{background:#fff4dc;color:#966c1f}.bill-type-badge.installment{background:#eaf3ef;color:#547768}
.status-pill.value-needed{background:#fff0d0;color:#986b18}
.recurring-amount{display:grid;text-align:right;gap:2px}.recurring-amount small{font-size:7px;color:#8b9aa6}.amount-missing{color:#b58735;font-size:18px}
.recurring-actions{flex-wrap:wrap;justify-content:flex-end}.action-button.emphasis{background:#0e2a43;color:#fff;border-color:#0e2a43}
.check:disabled{opacity:.35;cursor:not-allowed;background:#eef2f4}
.recurring-secondary-section{margin-top:16px}.scheduled-list{margin-top:12px}.scheduled-row{display:grid;grid-template-columns:34px 1fr auto;gap:11px;align-items:center;padding:11px 0;border-bottom:1px solid #edf1f3}
.scheduled-icon{width:30px;height:30px;border-radius:9px;background:#f1f5f7;color:#728899;display:grid;place-items:center}
.scheduled-row>div:nth-child(2){display:grid;gap:3px}.scheduled-row strong{font-size:10px}.scheduled-row span{font-size:8px;color:#8b9ba7}
@media(max-width:900px){.recurring-explainer{grid-template-columns:1fr}.recurring-bill{grid-template-columns:34px 44px 1fr auto}.recurring-actions{grid-column:3/5}}
@media(max-width:650px){.installment-fields{grid-template-columns:1fr}.recurring-bill{grid-template-columns:30px 40px 1fr}.recurring-amount{grid-column:3;text-align:left}.recurring-actions{grid-column:3/4;justify-content:flex-start}.scheduled-row{grid-template-columns:30px 1fr}.scheduled-row .action-button{grid-column:2;justify-self:start}}
.dashboard-value-link{display:grid;place-items:center;text-decoration:none;font-weight:800}


/* =========================================================
   REFERÊNCIA VISUAL — VISÃO GERAL / FAMÍLIA ALMEIDA
   ========================================================= */
:root{
  --ref-bg:#f4f7f8;
  --ref-sidebar:#10343c;
  --ref-sidebar-deep:#0d3037;
  --ref-sidebar-active:#28525a;
  --ref-green:#0f8e75;
  --ref-green-dark:#164f4c;
  --ref-green-soft:#e8f4f0;
  --ref-ink:#122538;
  --ref-muted:#72838f;
  --ref-line:#dfe7eb;
  --ref-card:#ffffff;
  --ref-blue:#4e7fc4;
  --ref-gold:#c49b45;
  --ref-purple:#8b63c5;
  --ref-red:#c9473e;
  --sidebar-expanded:220px;
  --sidebar-collapsed:76px;
}

body{background:var(--ref-bg)}
.ref-shell{grid-template-columns:var(--sidebar-expanded) minmax(0,1fr)}
html.sidebar-collapsed .ref-shell{grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr)}

.ref-sidebar{
  background:linear-gradient(180deg,var(--ref-sidebar) 0%,var(--ref-sidebar-deep) 100%);
  padding:20px 14px 14px;
  border-right:0;
  color:#d9e8e9;
  box-shadow:none;
}
.ref-sidebar-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  min-height:52px;margin-bottom:20px
}
.ref-brand{
  display:flex;align-items:center;gap:10px;min-width:0;color:#fff
}
.ref-brand-icon{
  width:40px;height:40px;border-radius:10px;
  border:1px solid rgba(176,217,212,.38);
  display:grid;place-items:center;color:#b5ddd7;flex:0 0 auto
}
.ref-brand-icon svg{
  width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round
}
.ref-brand-copy{display:grid;line-height:1.05;white-space:nowrap}
.ref-brand-copy small{
  color:#83aaa9;font-size:7px;font-weight:800;letter-spacing:.18em;margin-bottom:3px
}
.ref-brand-copy strong{
  color:#f6fbfb;font-size:20px;letter-spacing:-.045em;font-weight:800
}
.ref-collapse{
  width:29px;height:29px;border-radius:8px;border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.04);color:#8eb1b1
}
.ref-nav{margin-top:2px;gap:4px}
.ref-nav .nav-item{
  min-height:42px;padding:0 11px;border-radius:7px;color:#bdd0d1;
  font-size:10px;font-weight:650;border:0;gap:11px
}
.ref-nav .nav-item:hover{background:rgba(255,255,255,.05);color:#fff}
.ref-nav .nav-item.active{
  background:var(--ref-sidebar-active);color:#dff6ef;border:0
}
.ref-nav .nav-item.active:before{display:none}
.ref-nav .nav-icon{color:#a8cfca;width:18px}
.ref-nav .nav-icon svg{
  width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.65
}
.ref-nav-divider{
  height:1px;background:rgba(255,255,255,.08);margin:13px 8px 8px
}
.ref-sidebar-message{
  margin-top:auto;padding:18px 10px;border-top:1px solid rgba(255,255,255,.08);
  display:grid;gap:4px;color:#85aaa9
}
.ref-sidebar-message>span{color:#80c6b8;margin-bottom:5px}
.ref-sidebar-message>span svg{
  width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.55
}
.ref-sidebar-message small{font-size:8px}
.ref-sidebar-message strong{font-size:9px;color:#c4d8d8;font-weight:600}
.ref-sidebar-user{
  border-top:1px solid rgba(255,255,255,.08);margin-top:0;padding:14px 8px 10px;
  grid-template-columns:34px minmax(0,1fr)
}
.ref-sidebar-user .user-avatar{
  width:32px;height:32px;border-radius:50%;
  color:#d5eeea;background:#315961;border-color:rgba(255,255,255,.05)
}
.ref-sidebar-user .sidebar-user-copy strong{font-size:9px;color:#fff}
.ref-sidebar-user .sidebar-user-copy span{font-size:7px;color:#769b9c}
.ref-sidebar .modern-logout{min-height:34px;color:#86a7a8;font-size:9px}
.ref-sidebar .modern-logout:hover{background:rgba(255,255,255,.04);color:#fff}

.ref-topbar{
  height:58px;padding:0 30px;background:#fff;border-bottom:1px solid #edf1f3;
  backdrop-filter:none;position:sticky;top:0;z-index:20
}
.ref-topbar-title{font-size:9px;color:#6e7f89}
.ref-private{display:flex;align-items:center;gap:7px;color:#4f6d6c;font-size:8px}
.ref-private svg{
  width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.7
}

.ref-dashboard{max-width:1200px;padding:30px 32px 20px}
.ref-dashboard-heading{
  display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:20px
}
.ref-dashboard-heading .eyebrow{color:#597b75;font-size:7px;letter-spacing:.22em;margin-bottom:7px}
.ref-dashboard-heading h1{
  margin:0;color:var(--ref-ink);font-size:26px;font-weight:500;letter-spacing:-.035em
}
.ref-dashboard-heading>div:first-child>p:last-child{
  color:#788994;font-size:10px;margin:7px 0 0
}
.ref-month-picker{
  height:38px;display:flex;align-items:center;gap:4px;
  border:1px solid var(--ref-line);border-radius:9px;background:#fff;padding:0 8px
}
.ref-month-picker>a{
  width:26px;height:30px;display:grid;place-items:center;color:#58717b;font-size:14px
}
.ref-month-picker>span:nth-child(2){
  min-width:122px;text-align:center;font-size:9px;color:#415762;text-transform:lowercase
}
.ref-calendar{font-size:9px;color:#657c84}

.ref-kpi-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px
}
.ref-kpi{
  min-height:120px;background:#fff;border:1px solid var(--ref-line);border-radius:10px;
  padding:16px 17px;display:flex;flex-direction:column;justify-content:space-between;
  box-shadow:none
}
.ref-kpi-balance{background:#e8f3ef;border-color:#d0e6df}
.ref-kpi-balance.negative strong{color:var(--ref-red)}
.ref-kpi-head{display:flex;align-items:center;justify-content:space-between;color:#617782;font-size:9px}
.ref-kpi-head>span:last-child{color:#6e878f}
.ref-kpi-arrow.income{color:#0b9478}.ref-kpi-arrow.expense{color:#c97851}
.ref-debt-icon{color:#855eb5!important}
.ref-kpi>strong{
  font-size:20px;letter-spacing:-.035em;color:#13283a;font-weight:800;margin:6px 0
}
.ref-kpi-balance>strong{font-size:22px}
.ref-kpi>a,.ref-kpi>small{font-size:8px;color:#738791}
.ref-kpi>a{color:#11866f;font-weight:600}

.ref-primary-grid{
  display:grid;grid-template-columns:minmax(0,1.58fr) minmax(300px,.92fr);gap:16px;margin-bottom:16px
}
.ref-money-card,.ref-list-card,.ref-transactions-card{
  border:1px solid var(--ref-line);border-radius:10px;box-shadow:none;padding:0
}
.ref-card-heading{
  display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 18px 8px
}
.ref-card-heading h2,.ref-section-header h2{
  margin:0;color:#173044;font-size:13px;font-weight:600
}
.ref-card-heading p,.ref-section-header p{
  font-size:8px;color:#86959f;margin:5px 0 0
}
.ref-green-button{
  display:inline-flex;align-items:center;justify-content:center;height:34px;padding:0 14px;
  background:#0e9277;color:#fff;border-radius:6px;font-size:9px;font-weight:750
}
.ref-donut-area{
  display:grid;grid-template-columns:minmax(220px,.9fr) minmax(240px,1fr);
  gap:20px;align-items:center;padding:12px 24px 20px
}
.ref-donut-wrap{position:relative;width:230px;height:190px;justify-self:center}
.ref-donut-wrap canvas{position:absolute!important;inset:0}
.ref-donut-center{
  position:absolute;inset:0;display:grid;place-content:center;text-align:center;pointer-events:none
}
.ref-donut-center small{font-size:7px;color:#7f9099}
.ref-donut-center strong{font-size:17px;color:#173044;margin:4px 0}
.ref-donut-center span{font-size:7px;color:#9aa6ad}
.ref-donut-legend{display:grid;gap:14px}
.ref-donut-legend>div{
  display:grid;grid-template-columns:8px 1fr auto;gap:8px;align-items:center
}
.ref-donut-legend span:nth-child(2){font-size:8px;color:#687c87}
.ref-donut-legend strong{font-size:9px;color:#172b3c}
.ref-legend-dot{width:6px;height:6px;border-radius:50%}
.ref-legend-dot.recurring{background:#1d8e76}
.ref-legend-dot.variable{background:#4e7fc4}
.ref-legend-dot.debt{background:#c49b45}
.ref-legend-dot.investment{background:#8b63c5}
.ref-money-card>footer{
  border-top:1px solid #edf1f3;padding:10px 18px;font-size:7px;color:#97a3aa
}

.ref-investment-card{
  background:#174f4d;border-radius:10px;color:#fff;padding:21px 22px;
  display:flex;flex-direction:column;min-height:330px
}
.ref-investment-top{display:flex;justify-content:space-between;align-items:center}
.ref-investment-top .eyebrow{color:#6ed0ba;font-size:7px;letter-spacing:.18em}
.ref-investment-top>span{color:#72beaE}
.ref-investment-copy{margin-top:18px}
.ref-investment-copy h2{font-size:17px;margin:0 0 8px;font-weight:500}
.ref-investment-copy p{font-size:8px;line-height:1.55;color:#b8d3d0;margin:0;max-width:210px}
.ref-investment-value{display:flex;align-items:baseline;gap:5px;margin-top:22px}
.ref-investment-value strong{font-size:20px}
.ref-investment-value span{font-size:8px;color:#9abfba}
.ref-investment-progress{height:4px;background:rgba(255,255,255,.17);border-radius:99px;margin-top:11px;overflow:hidden}
.ref-investment-progress span{display:block;height:100%;background:#5bc0aa;border-radius:99px}
.ref-investment-meta{
  margin-top:8px;display:flex;align-items:center;justify-content:space-between;
  color:#b7d4d0;font-size:7px
}
.ref-investment-button{
  margin-top:auto;height:35px;border:1px solid rgba(255,255,255,.22);border-radius:6px;
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:9px
}
.ref-investment-button:hover{background:rgba(255,255,255,.05)}

.ref-secondary-grid{
  display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px
}
.ref-list-card{padding:17px 18px}
.ref-section-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px
}
.ref-section-header>a{font-size:8px;color:#21866f;white-space:nowrap;padding-top:2px}
.ref-account-list,.ref-goals-list{display:grid}
.ref-account-row{
  display:grid;grid-template-columns:34px 1fr auto 18px;gap:10px;align-items:center;
  min-height:55px;border-bottom:1px solid #edf1f3
}
.ref-account-row:last-child{border-bottom:0}
.ref-day-box{
  width:31px;height:31px;border-radius:7px;background:#f1f5f6;display:grid;place-content:center;text-align:center
}
.ref-day-box small{font-size:5px;color:#8ca0aa}.ref-day-box strong{font-size:10px;color:#3e5662}
.ref-account-copy{display:grid;gap:2px;min-width:0}
.ref-account-copy strong{font-size:9px;color:#162c3d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ref-account-copy span{font-size:7px;color:#8b99a2}
.ref-account-value{font-size:9px;color:#172b3b;white-space:nowrap}
.ref-edit-link{font-size:10px;color:#8da0a9;text-align:center}
.ref-empty{padding:28px 10px;text-align:center;color:#8c9aa3;font-size:8px}

.ref-goal-row{
  display:grid;grid-template-columns:28px 1fr;gap:10px;padding:9px 0;border-bottom:1px solid #edf1f3
}
.ref-goal-row:last-child{border-bottom:0}
.ref-goal-icon{
  width:26px;height:26px;border-radius:7px;display:grid;place-items:center;font-size:8px;font-weight:800
}
.ref-goal-icon.tone-1{background:#e5f5ee;color:#21856f}
.ref-goal-icon.tone-2{background:#eaf1fb;color:#4d78b4}
.ref-goal-icon.tone-3{background:#fbf1dc;color:#a27b2c}
.ref-goal-icon.tone-4{background:#f0eafa;color:#7656ad}
.ref-goal-main{display:grid;gap:4px}
.ref-goal-title{display:flex;justify-content:space-between;gap:10px}
.ref-goal-title strong{font-size:9px;color:#172d3d}
.ref-goal-title a{font-size:9px;color:#8ea0a9}
.ref-goal-main>span{font-size:7px;color:#667b87}
.ref-goal-progress{height:3px;background:#e8edef;border-radius:99px;overflow:hidden}
.ref-goal-progress span{display:block;height:100%;background:#26947c;border-radius:99px}
.ref-goal-main small{font-size:6px;color:#9aa6ad}

.ref-transactions-card{margin-bottom:16px;padding:16px 0 0}
.ref-transactions-card>.ref-section-header{padding:0 18px;margin-bottom:12px}
.ref-table-wrap{overflow:auto}
.ref-table-head,.ref-transaction-row{
  min-width:690px;display:grid;grid-template-columns:2.1fr 1fr .8fr 1fr 38px;gap:12px;align-items:center
}
.ref-table-head{
  padding:8px 18px;background:#fbfcfc;border-top:1px solid #edf1f3;border-bottom:1px solid #d9e1e5
}
.ref-table-head span{font-size:7px;color:#86959f}
.ref-transaction-row{padding:10px 18px;border-bottom:1px solid #edf1f3}
.ref-transaction-row:last-child{border-bottom:0}
.ref-transaction-row>span{font-size:8px;color:#4c626f}
.ref-transaction-row>strong{font-size:8px;text-align:right}
.ref-transaction-row>strong.positive{color:#18856f}
.ref-transaction-row>strong.negative{color:#1c303e}
.ref-transaction-description{display:grid;grid-template-columns:28px 1fr;gap:8px;align-items:center}
.ref-tx-icon{
  width:26px;height:26px;border-radius:50%;background:#f1f5f7;color:#7d919c;display:grid;place-items:center;font-size:8px
}
.ref-tx-icon.income{background:#e7f5ef;color:#1c8b73}
.ref-tx-icon.investment{background:#f1eafa;color:#7656ad}
.ref-transaction-description>div{display:grid;gap:2px}
.ref-transaction-description strong{font-size:8px;color:#1e3342}
.ref-transaction-description small{font-size:6px;color:#91a0a8}
.ref-table-actions{display:flex;justify-content:flex-end}
.ref-table-actions form{margin:0}
.ref-table-actions button,.ref-table-actions a{
  width:24px;height:24px;border:0;background:transparent;color:#8498a2;display:grid;place-items:center;font-size:9px
}
.ref-table-empty{min-width:0}
.ref-page-footer{
  display:flex;justify-content:space-between;gap:16px;padding:8px 0 0;
  color:#82939c;font-size:7px
}

html.sidebar-collapsed .ref-brand-copy,
html.sidebar-collapsed .ref-sidebar-message,
html.sidebar-collapsed .ref-sidebar-user .sidebar-user-copy,
html.sidebar-collapsed .ref-nav .nav-item-label{display:none}
html.sidebar-collapsed .ref-sidebar-head{flex-direction:column}
html.sidebar-collapsed .ref-brand{justify-content:center}
html.sidebar-collapsed .ref-nav .nav-item{justify-content:center;width:46px;margin:0 auto;padding:0}
html.sidebar-collapsed .ref-nav-divider{margin-left:4px;margin-right:4px}
html.sidebar-collapsed .ref-sidebar-user{grid-template-columns:1fr;justify-items:center}
html.sidebar-collapsed .ref-sidebar .modern-logout{justify-content:center;width:46px;margin:0 auto;padding:0}

@media(max-width:1050px){
  .ref-kpi-grid{grid-template-columns:repeat(2,1fr)}
  .ref-primary-grid{grid-template-columns:1fr}
  .ref-investment-card{min-height:280px}
}
@media(max-width:900px){
  .ref-secondary-grid{grid-template-columns:1fr}
}
@media(max-width:760px){
  .ref-dashboard{padding:20px 14px}
  .ref-topbar{padding:0 14px}
  .ref-dashboard-heading{align-items:flex-start;flex-direction:column}
  .ref-month-picker{width:100%;justify-content:space-between}
  .ref-month-picker>span:nth-child(2){flex:1}
  .ref-kpi-grid{grid-template-columns:1fr 1fr}
  .ref-donut-area{grid-template-columns:1fr}
  .ref-donut-wrap{width:210px;height:180px}
  .ref-donut-legend{width:min(100%,330px);justify-self:center}
  .ref-page-footer{flex-direction:column}
  html.sidebar-collapsed .ref-brand-copy,
  html.sidebar-collapsed .ref-sidebar-user .sidebar-user-copy,
  html.sidebar-collapsed .ref-nav .nav-item-label{display:grid}
  html.sidebar-collapsed .ref-nav .nav-item-label{display:inline}
}
@media(max-width:500px){
  .ref-kpi-grid{grid-template-columns:1fr}
  .ref-card-heading{flex-direction:column}
  .ref-green-button{width:100%}
  .ref-account-row{grid-template-columns:32px 1fr auto}
  .ref-edit-link{grid-column:3}
  .ref-account-value{grid-column:2;grid-row:2}
}


/* =========================================================
   CONTAS FIXAS — LAYOUT DE REFERÊNCIA
   ========================================================= */
.fixed-reference-page{max-width:1220px}
.fixed-reference-heading{margin-bottom:26px}
.fixed-reference-summary{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  background:#fff;
  border:1px solid var(--ref-line);
  border-radius:14px;
  margin-bottom:22px;
  overflow:hidden
}
.fixed-reference-summary>div{
  min-height:112px;
  padding:26px 34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-right:1px solid #e9eef1
}
.fixed-reference-summary>div:last-child{border-right:0}
.fixed-reference-summary span{font-size:11px;color:#7b8d97}
.fixed-reference-summary strong{
  margin-top:12px;
  color:#13283a;
  font-size:25px;
  line-height:1;
  letter-spacing:-.035em
}
.fixed-reference-summary .paid strong{color:#0f8e75}
.fixed-reference-summary small{margin-top:8px;font-size:7px;color:#a0acb3}

.fixed-reference-card{
  padding:0;
  border:1px solid var(--ref-line);
  border-radius:14px;
  box-shadow:none;
  overflow:hidden
}
.fixed-reference-card-head{
  padding:24px 22px 17px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px
}
.fixed-reference-card-head h2{
  margin:0;
  color:#13283a;
  font-size:15px;
  font-weight:600
}
.fixed-reference-card-head p{
  margin:8px 0 0;
  color:#7f919c;
  font-size:10px
}
.fixed-add-button{height:40px;padding:0 17px;font-size:10px;border:0}

.fixed-reference-list{padding:0 22px}
.fixed-reference-row{
  display:grid;
  grid-template-columns:40px minmax(0,1fr) auto auto;
  gap:12px;
  align-items:center;
  min-height:72px;
  border-top:1px solid #edf1f3
}
.fixed-reference-row.is-paid{background:linear-gradient(90deg,rgba(15,142,117,.025),transparent)}
.fixed-reference-day{
  width:38px;
  height:38px;
  display:grid;
  place-content:center;
  text-align:center;
  border-radius:9px;
  background:#f2f5f7
}
.fixed-reference-day small{font-size:6px;color:#8da0a9;line-height:1}
.fixed-reference-day strong{margin-top:2px;font-size:14px;color:#405967;line-height:1}

.fixed-reference-copy{display:grid;gap:4px;min-width:0}
.fixed-reference-title{display:flex;align-items:center;gap:6px;min-width:0}
.fixed-reference-title>strong{
  font-size:11px;
  color:#13283a;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis
}
.fixed-reference-copy>span{font-size:9px;color:#7f919c}
.fixed-type-tag,.fixed-paid-tag{
  display:inline-flex;
  align-items:center;
  height:18px;
  padding:0 6px;
  border-radius:99px;
  font-size:6px;
  font-weight:800;
  white-space:nowrap
}
.fixed-type-tag.fixed{background:#edf2f4;color:#647b86}
.fixed-type-tag.variable{background:#fff4de;color:#99701f}
.fixed-type-tag.installment{background:#eaf4f0;color:#4e7768}
.fixed-paid-tag{background:#e7f5ef;color:#27836d}

.fixed-reference-value{
  display:grid;
  justify-items:end;
  gap:2px;
  min-width:85px
}
.fixed-reference-value strong{font-size:11px;color:#10283b;white-space:nowrap}
.fixed-reference-value small{font-size:7px;color:#8b9ba4}

.fixed-reference-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:6px;
  min-width:160px
}
.fixed-reference-actions form{margin:0}
.fixed-text-action{
  min-height:28px;
  padding:0 7px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#16836d;
  font-size:7px;
  font-weight:700;
  white-space:nowrap
}
.fixed-text-action:hover{background:#edf7f4}
.fixed-text-action.emphasis{background:#0f8e75;color:#fff;padding:0 9px}
.fixed-text-action.emphasis:hover{background:#0d8069}
.fixed-text-action.muted{color:#83949d}
.fixed-icon-action{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border:0;
  background:transparent;
  color:#8397a1;
  border-radius:6px;
  font-size:11px
}
.fixed-icon-action:hover{background:#f1f5f6;color:#34515d}
.fixed-icon-action.danger:hover{background:#fff1ef;color:#c95349}

.fixed-reference-footer{
  border-top:1px solid #edf1f3;
  padding:14px 22px;
  background:#fbfcfc;
  color:#84959e;
  font-size:8px;
  line-height:1.5
}
.fixed-reference-secondary{display:grid;gap:10px;margin-top:14px}
.fixed-reference-details{
  border:1px solid var(--ref-line);
  border-radius:10px;
  background:#fff;
  padding:12px 15px
}
.fixed-reference-details summary{
  cursor:pointer;
  color:#435b67;
  font-size:9px;
  font-weight:700;
  list-style:none;
  display:flex;
  justify-content:space-between;
  align-items:center
}
.fixed-reference-details summary::-webkit-details-marker{display:none}
.fixed-reference-details summary span{
  min-width:22px;
  height:20px;
  display:grid;
  place-items:center;
  background:#f1f5f6;
  border-radius:99px;
  font-size:7px
}
.fixed-reference-details>div{padding-top:10px}
.fixed-reference-details p{margin:6px 0;font-size:8px;color:#7b8d96}
.fixed-archived-list{display:grid}
.fixed-archived-list>div{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:7px 0;
  border-top:1px solid #edf1f3;
  font-size:8px
}
.fixed-reference-page-footer{margin-top:22px}

/* Modal inspirado na referência */
.fixed-reference-dialog{
  width:min(520px,calc(100vw - 28px));
  padding:0;
  border:0;
  border-radius:16px;
  color:#203344;
  background:#fff;
  box-shadow:0 24px 90px rgba(10,31,42,.26)
}
.fixed-reference-small-dialog{width:min(450px,calc(100vw - 28px))}
.fixed-reference-dialog::backdrop{
  background:rgba(22,31,35,.52);
  backdrop-filter:blur(1px)
}
.fixed-reference-dialog-form{padding:25px 26px 22px;display:grid;gap:14px}
.fixed-reference-dialog-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:1px
}
.fixed-reference-dialog-head h3{
  margin:0;
  font-size:20px;
  letter-spacing:-.025em;
  color:#243648
}
.fixed-reference-dialog-head p{
  margin:10px 0 0;
  color:#748792;
  font-size:11px;
  line-height:1.45
}
.fixed-reference-dialog-head>button{
  width:26px;
  height:26px;
  border:0;
  background:transparent;
  color:#768b96;
  font-size:21px;
  line-height:1
}
.fixed-reference-dialog-form label{
  display:grid;
  gap:7px;
  color:#607782;
  font-size:10px;
  font-weight:500
}
.fixed-reference-dialog-form input,
.fixed-reference-dialog-form select{
  width:100%;
  height:46px;
  padding:0 12px;
  border:1px solid #d8e3e7;
  border-radius:8px;
  background:#fff;
  color:#203747;
  font:inherit
}
.fixed-reference-dialog-form input::placeholder{color:#9daab1}
.fixed-reference-dialog-form input:focus,
.fixed-reference-dialog-form select:focus{
  outline:none;
  border-color:#71c5b1;
  box-shadow:0 0 0 3px rgba(15,142,117,.10)
}
.fixed-reference-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.fixed-reference-dialog .billing-form-hint{
  margin-top:-2px;
  padding:9px 10px;
  border-radius:7px;
  border:1px solid #e4ecef;
  background:#f7f9fa;
  color:#778a95;
  font-size:7px;
  line-height:1.5
}
.fixed-reference-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:3px
}
.fixed-cancel-button,.fixed-save-button{
  min-height:42px;
  border-radius:8px;
  padding:0 16px;
  font-size:10px;
  font-weight:700
}
.fixed-cancel-button{
  border:1px solid #dce5e8;
  background:#fff;
  color:#536b76
}
.fixed-save-button{
  border:1px solid #0f8e75;
  background:#0f8e75;
  color:#fff
}
.fixed-save-button:hover{background:#0c816a}
.fixed-reference-empty{padding:45px 20px}

@media(max-width:920px){
  .fixed-reference-row{grid-template-columns:40px minmax(0,1fr) auto}
  .fixed-reference-actions{grid-column:2/4;justify-content:flex-end;padding-bottom:10px}
}
@media(max-width:700px){
  .fixed-reference-summary{grid-template-columns:1fr}
  .fixed-reference-summary>div{min-height:auto;padding:18px 20px;border-right:0;border-bottom:1px solid #e9eef1}
  .fixed-reference-summary>div:last-child{border-bottom:0}
  .fixed-reference-card-head{align-items:stretch;flex-direction:column}
  .fixed-add-button{width:100%}
}
@media(max-width:560px){
  .fixed-reference-list{padding:0 14px}
  .fixed-reference-card-head{padding:20px 14px 14px}
  .fixed-reference-row{grid-template-columns:38px 1fr}
  .fixed-reference-value{grid-column:2;justify-items:start}
  .fixed-reference-actions{grid-column:2;justify-content:flex-start;flex-wrap:wrap;padding-bottom:12px;min-width:0}
  .fixed-reference-dialog-grid{grid-template-columns:1fr}
  .fixed-reference-dialog-form{padding:22px 18px 18px}
}


/* =========================================================
   METAS FINANCEIRAS — GASTOS + INVESTIMENTO
   ========================================================= */
.goals-reference-page{max-width:1220px}
.goals-reference-heading{margin-bottom:18px}

.goals-tabs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:18px
}
.goals-tabs>a{
  min-height:62px;
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px;
  align-items:center;
  padding:11px 14px;
  border:1px solid var(--ref-line);
  border-radius:10px;
  background:#fff;
  color:#6f838e;
  transition:.16s ease
}
.goals-tabs>a:hover{border-color:#cbd9dd;background:#fbfdfd}
.goals-tabs>a.active{
  border-color:#8bc6b9;
  background:#edf7f4;
  color:#184f47
}
.goals-tabs>a>span{
  width:32px;height:32px;border-radius:8px;background:#f1f5f6;
  display:grid;place-items:center;font-size:13px
}
.goals-tabs>a.active>span{background:#dcefe9;color:#0f8e75}
.goals-tabs>a>div{display:grid;gap:2px}
.goals-tabs strong{font-size:10px}
.goals-tabs small{font-size:7px;color:#8b9aa3}

.goals-summary-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border:1px solid var(--ref-line);
  border-radius:12px;
  overflow:hidden;
  background:#fff;
  margin-bottom:16px
}
.goals-summary-grid>article{
  min-height:104px;
  padding:20px 24px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  border-right:1px solid #e9eef1
}
.goals-summary-grid>article:last-child{border-right:0}
.goals-summary-grid span{font-size:9px;color:#7c8e98}
.goals-summary-grid strong{font-size:22px;color:#142a3c;margin-top:9px;letter-spacing:-.035em}
.goals-summary-grid small{font-size:7px;color:#95a2aa;margin-top:7px}
.goals-summary-grid article.positive strong{color:#0f8e75}
.goals-summary-grid article.attention strong{color:#bd7b32}

.goals-reference-card,.investment-history-card{
  padding:0;
  border:1px solid var(--ref-line);
  border-radius:12px;
  box-shadow:none;
  overflow:hidden
}
.goals-reference-card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:20px 21px 15px
}
.goals-reference-card-head .eyebrow{font-size:7px;color:#98752b;letter-spacing:.16em;margin-bottom:5px}
.goals-reference-card-head h2{font-size:14px;color:#173044;margin:0}
.goals-reference-card-head p{font-size:8px;color:#8797a0;margin:5px 0 0}
.goals-add-button{height:36px;padding:0 14px;border:0;font-size:9px}

.goals-clean-list{padding:0 21px}
.goal-clean-row{
  display:grid;
  grid-template-columns:36px minmax(0,1fr) 32px;
  gap:12px;
  align-items:center;
  min-height:92px;
  border-top:1px solid #edf1f3
}
.goal-clean-icon{
  width:34px;height:34px;border-radius:9px;display:grid;place-items:center;
  font-size:9px;font-weight:800
}
.goal-clean-icon.tone-1{background:#e6f4ef;color:#1e856f}
.goal-clean-icon.tone-2{background:#eaf1fb;color:#4f79b7}
.goal-clean-icon.tone-3{background:#fbf1dd;color:#a07b30}
.goal-clean-icon.tone-4{background:#f0eafb;color:#7659ad}
.goal-clean-main{display:grid;gap:7px;min-width:0}
.goal-clean-title{display:flex;align-items:center;gap:7px;min-width:0}
.goal-clean-title strong{font-size:10px;color:#172d3d}
.goal-clean-title span{
  padding:3px 6px;border-radius:99px;background:#fff0ed;color:#b85b4f;
  font-size:6px;font-weight:800
}
.goal-clean-values{display:flex;justify-content:space-between;gap:12px}
.goal-clean-values span{font-size:8px;color:#657a86}
.goal-clean-values strong{font-size:8px;color:#536b77}
.goal-clean-progress{height:5px;background:#e9eef0;border-radius:99px;overflow:hidden}
.goal-clean-progress>span{display:block;height:100%;border-radius:99px;background:#239179}
.goal-clean-progress>span.over{background:#cc7565}
.goal-clean-main>small{font-size:7px;color:#93a0a8}
.goal-clean-row.is-over{background:linear-gradient(90deg,rgba(204,117,101,.035),transparent)}
.goal-clean-edit{
  width:30px;height:30px;border:0;border-radius:7px;background:transparent;
  color:#8599a3;font-size:11px
}
.goal-clean-edit:hover{background:#f0f5f6;color:#36515d}

.goals-empty-state{
  min-height:260px;display:grid;place-content:center;justify-items:center;text-align:center;
  padding:30px;color:#80919a
}
.goals-empty-state>span{
  width:42px;height:42px;border-radius:12px;background:#eef5f3;color:#16866f;
  display:grid;place-items:center;font-size:16px;margin-bottom:10px
}
.goals-empty-state strong{font-size:11px;color:#405864}
.goals-empty-state p{font-size:8px;max-width:280px;margin:5px 0 14px;line-height:1.5}

.goal-delete-zone{
  display:grid;grid-template-columns:auto 1fr;gap:9px;align-items:center;
  padding:10px;border-radius:8px;background:#fff7f5;border:1px solid #f1dcd8
}
.goal-delete-zone[hidden]{display:none!important}
.goal-delete-zone button{
  border:0;background:transparent;color:#bc5e52;font-size:9px;font-weight:750;padding:0
}
.goal-delete-zone span{font-size:7px;color:#9b7c77}
.goals-page-footer{margin-top:18px}

/* Investimento dentro de Metas financeiras */
.investment-unified-grid{
  display:grid;
  grid-template-columns:minmax(0,1.65fr) minmax(260px,.75fr);
  gap:14px;
  margin-bottom:14px
}
.investment-unified-hero{
  min-height:315px;
  background:linear-gradient(135deg,#113b3b 0%,#174f4d 100%);
  color:#fff;
  border-radius:12px;
  padding:23px 24px;
  display:flex;
  flex-direction:column
}
.investment-unified-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:15px
}
.investment-unified-head .eyebrow{font-size:7px;color:#6bc9b5;letter-spacing:.18em}
.investment-unified-head h2{margin:5px 0 0;font-size:18px;font-weight:550}
.investment-unified-head p:last-child{font-size:8px;color:#add0cc;margin:7px 0 0;max-width:390px;line-height:1.5}
.investment-edit-button{
  height:31px;padding:0 10px;border:1px solid rgba(255,255,255,.18);
  border-radius:7px;background:rgba(255,255,255,.04);color:#d8eeeb;font-size:8px
}
.investment-edit-button:hover{background:rgba(255,255,255,.08)}
.investment-unified-numbers{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;
  background:rgba(255,255,255,.12);margin-top:30px;border-radius:9px;overflow:hidden
}
.investment-unified-numbers>div{
  background:rgba(8,42,43,.55);padding:15px 16px;display:grid;gap:6px
}
.investment-unified-numbers span{font-size:7px;color:#97c2bd}
.investment-unified-numbers strong{font-size:16px;color:#fff}
.investment-unified-progress{
  height:6px;background:rgba(255,255,255,.14);border-radius:99px;overflow:hidden;margin-top:23px
}
.investment-unified-progress span{display:block;height:100%;background:#65c5af;border-radius:99px}
.investment-progress-caption{
  display:flex;justify-content:space-between;gap:12px;margin-top:7px;
  color:#9cc4bf;font-size:7px
}
.investment-register-button{
  margin-top:auto;height:38px;border:1px solid rgba(255,255,255,.2);border-radius:7px;
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:9px;font-weight:700
}
.investment-register-button:hover{background:rgba(255,255,255,.06)}

.investment-unified-summary{
  border:1px solid var(--ref-line);border-radius:12px;background:#fff;padding:20px 20px;
  display:flex;flex-direction:column
}
.investment-unified-summary .eyebrow{font-size:7px;color:#99762d;letter-spacing:.15em}
.investment-unified-summary h2{font-size:15px;color:#173044;margin:6px 0 16px}
.investment-summary-stat{
  display:grid;gap:4px;padding:13px 0;border-top:1px solid #edf1f3
}
.investment-summary-stat span{font-size:8px;color:#85959e}
.investment-summary-stat strong{font-size:18px;color:#173044}
.investment-unified-summary>small{
  margin-top:auto;padding-top:16px;font-size:7px;line-height:1.55;color:#8b9aa3
}

.investment-history-card{padding-bottom:10px}
.investment-history-list{padding:0 21px 8px}
.investment-history-row{
  display:grid;grid-template-columns:65px minmax(0,1fr) 100px;gap:14px;
  align-items:center;min-height:46px;border-top:1px solid #edf1f3
}
.investment-history-row>span{font-size:8px;color:#667b86}
.investment-history-row>strong{font-size:9px;color:#173044;text-align:right}
.investment-history-track{height:6px;background:#edf1f3;border-radius:99px;overflow:hidden}
.investment-history-track span{display:block;height:100%;background:#278f79;border-radius:99px}

@media(max-width:900px){
  .investment-unified-grid{grid-template-columns:1fr}
  .investment-unified-summary{min-height:220px}
}
@media(max-width:700px){
  .goals-summary-grid{grid-template-columns:1fr}
  .goals-summary-grid>article{min-height:auto;padding:18px 20px;border-right:0;border-bottom:1px solid #e9eef1}
  .goals-summary-grid>article:last-child{border-bottom:0}
}
@media(max-width:560px){
  .goals-tabs{grid-template-columns:1fr}
  .goals-reference-card-head{flex-direction:column}
  .goals-add-button{width:100%}
  .goal-clean-row{grid-template-columns:32px 1fr 28px}
  .goals-clean-list{padding:0 14px}
  .investment-unified-numbers{grid-template-columns:1fr}
  .investment-progress-caption{flex-direction:column}
  .investment-history-row{grid-template-columns:50px 1fr}
  .investment-history-row>strong{grid-column:2;text-align:left}
}


/* =========================================================
   LANÇAMENTOS + NOTAS / COMPROVANTES
   ========================================================= */
.movements-reference-page{max-width:1220px}
.movements-reference-heading{margin-bottom:20px}
.movements-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--ref-line);border-radius:12px;overflow:hidden;background:#fff;margin-bottom:16px}
.movements-summary-grid>article{min-height:100px;padding:19px 21px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #e9eef1}
.movements-summary-grid>article:last-child{border-right:0}
.movements-summary-grid span{font-size:8px;color:#7f9099}
.movements-summary-grid strong{font-size:20px;color:#142a3c;margin-top:8px;letter-spacing:-.03em}
.movements-summary-grid small{font-size:7px;color:#95a2aa;margin-top:6px}
.movements-summary-grid .receipt-stat strong{color:#0f8e75}
.movements-main-grid{display:grid;grid-template-columns:minmax(300px,.78fr) minmax(0,1.22fr);gap:14px;margin-bottom:14px}
.movement-entry-card,.daily-spending-card,.movement-history-card{padding:0;border:1px solid var(--ref-line);border-radius:12px;box-shadow:none;overflow:hidden}
.movement-card-heading{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:20px 20px 13px}
.movement-card-heading .eyebrow,.movement-history-head .eyebrow{font-size:7px;color:#98752b;letter-spacing:.16em;margin-bottom:5px}
.movement-card-heading h2,.movement-history-head h2{font-size:14px;color:#173044;margin:0}
.movement-card-heading p{font-size:8px;color:#8797a0;margin:5px 0 0}
.movement-entry-form{padding:0 20px 20px;display:grid;gap:12px}
.movement-entry-form label{display:grid;gap:6px;font-size:9px;font-weight:600;color:#607782}
.movement-entry-form input,.movement-entry-form select{width:100%;height:42px;padding:0 11px;border:1px solid #d9e3e7;border-radius:8px;background:#fff;color:#203747;font:inherit}
.movement-entry-form input:focus,.movement-entry-form select:focus{outline:none;border-color:#74c4b2;box-shadow:0 0 0 3px rgba(15,142,117,.09)}
.movement-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.receipt-upload-field{border:1px dashed #cfdde1;border-radius:9px;background:#f9fbfb;padding:11px}
.receipt-upload-field[hidden]{display:none!important}
.receipt-upload-field label{font-size:9px}
.receipt-upload-field label>span{font-size:7px;color:#9ba7ad;font-weight:500}
.receipt-upload-field input[type=file]{height:auto;border:0;padding:6px 0;background:transparent;font-size:8px}
.receipt-upload-field>small{font-size:7px;color:#8b9aa3;line-height:1.5}
.movement-save-button{width:100%;height:39px;border:0;font-size:9px}
.largest-day-badge{padding:5px 8px;border-radius:99px;background:#eef5f3;color:#267c69;font-size:7px;white-space:nowrap}
.daily-spending-list{padding:0 20px 16px}
.daily-spending-row{display:grid;grid-template-columns:42px 145px minmax(0,1fr);gap:11px;align-items:center;min-height:54px;border-top:1px solid #edf1f3}
.daily-spending-date{width:36px;height:36px;border-radius:9px;background:#f1f5f6;display:grid;place-content:center;text-align:center}
.daily-spending-date strong{font-size:12px;color:#405865;line-height:1}
.daily-spending-date span{font-size:5px;color:#8b9ca5;margin-top:2px}
.daily-spending-copy{display:grid;gap:2px}
.daily-spending-copy strong{font-size:10px;color:#173044}
.daily-spending-copy span{font-size:7px;color:#8a9aa3}
.daily-spending-bar{height:5px;background:#edf1f3;border-radius:99px;overflow:hidden}
.daily-spending-bar span{display:block;height:100%;border-radius:99px;background:#278f79}
.movements-empty-state{min-height:180px;display:grid;place-content:center;justify-items:center;text-align:center;padding:25px}
.movements-empty-state>span{width:40px;height:40px;border-radius:11px;background:#edf5f2;color:#16866f;display:grid;place-items:center;margin-bottom:8px}
.movements-empty-state strong{font-size:10px;color:#405864}
.movements-empty-state p{font-size:7px;color:#8a9aa3;max-width:280px;line-height:1.5;margin:4px 0 0}
.movement-history-card{margin-bottom:14px}
.movement-history-head{padding:19px 20px 13px;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.movement-history-head>span{font-size:8px;color:#81939d}
.movement-history-list{padding:0 20px 8px}
.movement-history-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto auto;gap:11px;align-items:center;min-height:68px;border-top:1px solid #edf1f3}
.movement-history-icon{width:31px;height:31px;border-radius:50%;background:#f7eeeb;color:#b46656;display:grid;place-items:center;font-size:9px}
.movement-history-icon.income{background:#e7f4ef;color:#18866f}
.movement-history-icon.investment{background:#efeafb;color:#7557aa}
.movement-history-copy{display:grid;gap:3px;min-width:0}
.movement-history-copy>strong{font-size:9px;color:#183040;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.movement-history-copy>span{font-size:7px;color:#8898a1}
.movement-history-value{font-size:9px;font-weight:800;white-space:nowrap}
.movement-history-value.positive{color:#18866f}
.movement-history-value.negative{color:#1c303e}
.movement-history-actions{display:flex;align-items:center;justify-content:flex-end;gap:5px;min-width:110px}
.movement-history-actions form{margin:0}
.receipt-attach-button,.movement-delete-button{min-height:27px;border-radius:6px;padding:0 7px;font-size:7px;font-weight:700}
.receipt-attach-button{border:1px solid #cfe2dc;background:#f1f8f6;color:#167d69}
.movement-delete-button{border:0;background:transparent;color:#8798a1}
.movement-delete-button:hover{color:#bd5b50;background:#fff3f1}
.receipt-chip-list{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.receipt-chip{display:inline-flex;align-items:center;gap:2px;min-height:22px;border-radius:99px;background:#edf7f4;border:1px solid #d7eae5;padding-left:7px;color:#167d69}
.receipt-chip>a{font-size:7px;color:#167d69}
.receipt-chip form{margin:0}
.receipt-chip button{width:20px;height:20px;border:0;background:transparent;color:#71978e;font-size:11px;display:grid;place-items:center}
.receipt-chip button:hover{color:#bd5b50}
.receipt-dialog-help{padding:9px 10px;border-radius:7px;background:#f7f9fa;border:1px solid #e4ecef;color:#788b95;font-size:7px}
.movements-page-footer{margin-top:4px}
@media(max-width:950px){.movements-main-grid{grid-template-columns:1fr}}
@media(max-width:760px){
  .movements-summary-grid{grid-template-columns:1fr 1fr}
  .movements-summary-grid>article:nth-child(2){border-right:0}
  .movements-summary-grid>article{border-bottom:1px solid #e9eef1}
  .movements-summary-grid>article:nth-last-child(-n+2){border-bottom:0}
  .movement-history-row{grid-template-columns:32px minmax(0,1fr) auto}
  .movement-history-actions{grid-column:2/4;justify-content:flex-start;padding-bottom:9px}
}
@media(max-width:560px){
  .movements-summary-grid{grid-template-columns:1fr}
  .movements-summary-grid>article{border-right:0;border-bottom:1px solid #e9eef1}
  .movements-summary-grid>article:last-child{border-bottom:0}
  .movement-form-grid{grid-template-columns:1fr}
  .daily-spending-row{grid-template-columns:38px 1fr}
  .daily-spending-bar{grid-column:2}
  .movement-history-row{grid-template-columns:30px 1fr}
  .movement-history-value{grid-column:2}
  .movement-history-actions{grid-column:2;flex-wrap:wrap}
}


/* =========================================================
   LISTAS DE COMPRAS — MERCADO E MÓVEIS
   ========================================================= */
.shopping-page{max-width:1220px}
.shopping-heading{margin-bottom:18px}
.shopping-tabs{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px
}
.shopping-tabs>a{
  min-height:62px;display:grid;grid-template-columns:36px 1fr;gap:10px;align-items:center;
  padding:11px 14px;border:1px solid var(--ref-line);border-radius:10px;background:#fff;color:#6e828d
}
.shopping-tabs>a>span{
  width:34px;height:34px;border-radius:9px;background:#f1f5f6;display:grid;place-items:center;font-size:14px
}
.shopping-tabs>a>div{display:grid;gap:2px}
.shopping-tabs strong{font-size:10px}
.shopping-tabs small{font-size:7px;color:#8b9ba4}
.shopping-tabs>a.active{background:#edf7f4;border-color:#8bc7b9;color:#184f47}
.shopping-tabs>a.active>span{background:#dcefe9}
.shopping-summary-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:#fff;border:1px solid var(--ref-line);
  border-radius:12px;overflow:hidden;margin-bottom:16px
}
.shopping-summary-grid>article{
  min-height:102px;padding:20px 23px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #e9eef1
}
.shopping-summary-grid>article:last-child{border-right:0}
.shopping-summary-grid span{font-size:9px;color:#7d8f99}
.shopping-summary-grid strong{font-size:21px;color:#152c3d;margin-top:9px;letter-spacing:-.03em}
.shopping-summary-grid small{font-size:7px;color:#95a2aa;margin-top:6px}
.shopping-summary-grid article.positive strong{color:#0f8e75}
.shopping-summary-grid article.priority-high strong{color:#b86454}
.shopping-list-card{padding:0;border:1px solid var(--ref-line);border-radius:12px;box-shadow:none;overflow:hidden}
.shopping-card-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:20px 21px 15px
}
.shopping-card-head .eyebrow{font-size:7px;color:#98752b;letter-spacing:.16em;margin-bottom:5px}
.shopping-card-head h2{font-size:14px;color:#173044;margin:0}
.shopping-card-head p{font-size:8px;color:#8797a0;margin:5px 0 0}
.shopping-card-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.shopping-card-actions form{margin:0}
.shopping-secondary-button{
  height:36px;padding:0 12px;border:1px solid #d8e3e7;border-radius:7px;background:#fff;color:#516b77;font-size:8px;font-weight:700
}
.shopping-secondary-button:hover{background:#f7fafb}
.shopping-mode-button{height:36px;padding:0 13px;font-size:8px;border:0}
.shopping-mode-button.disabled{pointer-events:none;opacity:.45}
.shopping-market-list,.furniture-list{padding:0 21px 10px}
.shopping-market-row{
  display:grid;grid-template-columns:34px minmax(0,1.5fr) minmax(100px,.7fr) minmax(100px,.7fr) auto;
  gap:11px;align-items:center;min-height:70px;border-top:1px solid #edf1f3
}
.shopping-market-row.is-purchased{background:linear-gradient(90deg,rgba(15,142,117,.03),transparent)}
.shopping-market-check{
  width:30px;height:30px;border-radius:50%;border:1px solid #d5e0e4;display:grid;place-items:center;
  color:#fff;font-size:9px
}
.shopping-market-row.is-purchased .shopping-market-check{background:#138970;border-color:#138970}
.shopping-market-copy{display:grid;gap:3px;min-width:0}
.shopping-market-copy>div{display:flex;align-items:center;gap:6px;min-width:0}
.shopping-market-copy strong{font-size:9px;color:#183040;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.shopping-market-copy>span{font-size:7px;color:#8899a2}
.shopping-done-tag{
  padding:3px 6px;border-radius:99px;background:#e8f5ef;color:#27836d;font-size:6px;font-weight:800;white-space:nowrap
}
.shopping-price-column,.shopping-line-total{display:grid;gap:3px}
.shopping-price-column small,.shopping-line-total small{font-size:6px;color:#94a2aa}
.shopping-price-column strong,.shopping-line-total strong{font-size:9px;color:#173044}
.shopping-row-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.shopping-row-actions form{margin:0}
.shopping-history-link{font-size:7px;color:#19816c;white-space:nowrap}
.shopping-empty-state{
  min-height:270px;display:grid;place-content:center;justify-items:center;text-align:center;padding:30px
}
.shopping-empty-state>span{
  width:44px;height:44px;border-radius:12px;background:#edf5f2;display:grid;place-items:center;font-size:18px;margin-bottom:9px
}
.shopping-empty-state strong{font-size:11px;color:#405864}
.shopping-empty-state p{font-size:8px;color:#8a9aa3;line-height:1.5;max-width:300px;margin:5px 0 14px}
.shopping-dialog-note{
  padding:9px 10px;border-radius:7px;background:#f7f9fa;border:1px solid #e4ecef;color:#788b95;font-size:7px;line-height:1.5
}
.shopping-page-footer{margin-top:18px}

/* móveis */
.furniture-row{
  display:grid;grid-template-columns:70px minmax(0,1.4fr) minmax(100px,.7fr) minmax(120px,.7fr) auto;
  gap:12px;align-items:center;min-height:70px;border-top:1px solid #edf1f3
}
.furniture-priority{
  display:inline-flex;justify-self:start;align-items:center;justify-content:center;min-width:58px;height:23px;
  padding:0 8px;border-radius:99px;font-size:6px;font-weight:850
}
.furniture-priority.high{background:#fff0ed;color:#b75d50}
.furniture-priority.medium{background:#fff5df;color:#9b7426}
.furniture-priority.low{background:#eaf4f0;color:#53796b}
.furniture-copy{display:grid;gap:3px;min-width:0}
.furniture-copy strong{font-size:9px;color:#173044;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.furniture-copy span{font-size:7px;color:#8a9aa3}
.furniture-price{display:grid;gap:3px}
.furniture-price small{font-size:6px;color:#94a2aa}
.furniture-price strong{font-size:9px;color:#173044}
.furniture-link a{font-size:7px;color:#16806b}
.furniture-link span{font-size:7px;color:#9aa6ad}

/* =========================================================
   MODO COMPRA — MOBILE / OFFLINE
   ========================================================= */
.shopping-mode-body{
  margin:0;background:#f2f6f7;color:#173044;min-height:100vh;padding-bottom:96px
}
.shopping-mode-shell{min-height:100vh}
.shopping-mode-header{
  position:sticky;top:0;z-index:30;min-height:72px;padding:11px max(16px,env(safe-area-inset-right)) 11px max(16px,env(safe-area-inset-left));
  background:#10343c;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:0 3px 16px rgba(8,35,41,.12)
}
.shopping-mode-header>div:first-child{display:flex;align-items:center;gap:11px}
.shopping-mode-back{
  width:36px;height:36px;border-radius:9px;border:1px solid rgba(255,255,255,.15);
  display:grid;place-items:center;color:#dcebea;font-size:17px
}
.shopping-mode-header small{font-size:6px;color:#7eaaa9;letter-spacing:.18em}
.shopping-mode-header h1{font-size:17px;margin:3px 0 0;font-weight:650}
.shopping-connection-status{
  display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:99px;background:rgba(54,168,139,.13);
  color:#9ed8c9;font-size:7px
}
.shopping-connection-status>span{width:7px;height:7px;border-radius:50%;background:#45b795}
.shopping-connection-status.offline{background:rgba(224,174,91,.12);color:#e5c58d}
.shopping-connection-status.offline>span{background:#d8a953}
.shopping-mode-main{max-width:820px;margin:0 auto;padding:14px 14px 20px}
.shopping-live-summary{
  display:grid;grid-template-columns:.7fr 1fr 1.3fr;background:#fff;border:1px solid #dde7ea;border-radius:12px;overflow:hidden;margin-bottom:12px
}
.shopping-live-summary>div{
  min-height:80px;padding:14px 15px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #e9eef1
}
.shopping-live-summary>div:last-child{border-right:0}
.shopping-live-summary span{font-size:7px;color:#80919a}
.shopping-live-summary strong{font-size:16px;color:#173044;margin-top:7px}
.shopping-live-summary .actual{background:#ecf7f3}
.shopping-live-summary .actual strong{color:#0f8e75;font-size:18px}
.shopping-offline-banner,.shopping-pending-sync-banner{
  display:grid;gap:2px;border-radius:9px;padding:10px 12px;margin-bottom:10px
}
.shopping-offline-banner{background:#fff6e4;border:1px solid #efdbae;color:#866729}
.shopping-pending-sync-banner{background:#edf4fb;border:1px solid #d6e3ef;color:#526f87}
.shopping-offline-banner[hidden],.shopping-pending-sync-banner[hidden]{display:none!important}
.shopping-offline-banner strong,.shopping-pending-sync-banner strong{font-size:8px}
.shopping-offline-banner span,.shopping-pending-sync-banner span{font-size:7px;line-height:1.45}
.shopping-use-card{background:#fff;border:1px solid #dde7ea;border-radius:12px;overflow:hidden}
.shopping-use-card>header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:17px 16px 12px
}
.shopping-use-card .eyebrow{font-size:6px;color:#98752b;letter-spacing:.16em;margin-bottom:4px}
.shopping-use-card h2{font-size:13px;margin:0}
.shopping-use-card header p{font-size:7px;color:#8797a0;margin:4px 0 0}
.shopping-use-card>header>strong{
  min-width:28px;height:24px;padding:0 7px;border-radius:99px;background:#f1f5f6;display:grid;place-items:center;font-size:7px;color:#647985
}
.shopping-live-list{padding:0 12px 8px}
.shopping-live-row{
  display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:center;
  padding:13px 4px;border-top:1px solid #edf1f3;transition:.16s ease
}
.shopping-live-row.selected{background:#fbfefd}
.shopping-live-row.pending-sync{opacity:.68}
.shopping-live-row.needs-price{background:#fff7f5}
.shopping-live-check{position:relative;width:31px;height:31px}
.shopping-live-check input{position:absolute;opacity:0;pointer-events:none}
.shopping-live-check>span{
  width:31px;height:31px;border-radius:50%;border:1.5px solid #cddadd;background:#fff;color:transparent;
  display:grid;place-items:center;font-size:11px;transition:.15s ease
}
.shopping-live-check input:checked+span{background:#0f8e75;border-color:#0f8e75;color:#fff}
.shopping-live-product{display:grid;gap:3px;min-width:0}
.shopping-live-product strong{font-size:10px;color:#173044}
.shopping-live-product span{font-size:7px;color:#8798a1;line-height:1.35}
.shopping-live-estimated{display:grid;gap:3px;text-align:right}
.shopping-live-estimated small{font-size:6px;color:#94a2aa}
.shopping-live-estimated strong{font-size:9px;color:#5b707b}
.shopping-purchase-fields{
  grid-column:2/4;display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:end;padding:5px 0 2px
}
.shopping-purchase-fields[hidden]{display:none!important}
.shopping-purchase-fields label{display:grid;gap:5px}
.shopping-purchase-fields label span,.shopping-purchase-fields>div>span{font-size:6px;color:#7e919b}
.shopping-purchase-fields input{
  width:100%;height:42px;border:1px solid #d5e2e6;border-radius:8px;padding:0 10px;background:#fff;color:#173044;
  font-size:14px
}
.shopping-purchase-fields input:focus{outline:none;border-color:#69bca9;box-shadow:0 0 0 3px rgba(15,142,117,.09)}
.shopping-purchase-fields>div{display:grid;gap:5px;min-width:95px;padding-bottom:8px}
.shopping-purchase-fields>div strong{font-size:11px;color:#0f8e75}
.shopping-sync-lock{
  grid-column:2/4;display:inline-flex;justify-self:start;padding:4px 7px;border-radius:99px;background:#eef4fa;color:#5e7990;font-size:6px;font-weight:700
}
.shopping-sync-lock[hidden]{display:none!important}
.shopping-mode-empty{min-height:190px;display:grid;place-content:center;justify-items:center;text-align:center;padding:25px}
.shopping-mode-empty>span{
  width:40px;height:40px;border-radius:50%;background:#e9f5ef;color:#18856f;display:grid;place-items:center;margin-bottom:8px
}
.shopping-mode-empty strong{font-size:10px}
.shopping-mode-empty p{font-size:7px;color:#8999a2;max-width:280px;margin:4px 0 0}
.shopping-bought-section{
  margin-top:12px;background:#fff;border:1px solid #dde7ea;border-radius:12px;padding:0 14px
}
.shopping-bought-section summary{
  min-height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:8px;font-weight:700;color:#536a75;list-style:none
}
.shopping-bought-section summary::-webkit-details-marker{display:none}
.shopping-bought-section summary strong{
  min-width:24px;height:22px;border-radius:99px;background:#edf5f2;color:#1c806b;display:grid;place-items:center;font-size:7px
}
.shopping-bought-section article{
  display:grid;grid-template-columns:28px 1fr auto;gap:9px;align-items:center;min-height:54px;border-top:1px solid #edf1f3
}
.shopping-bought-section article>span{
  width:25px;height:25px;border-radius:50%;background:#e8f5ef;color:#16846e;display:grid;place-items:center;font-size:8px
}
.shopping-bought-section article>div{display:grid;gap:2px}
.shopping-bought-section article>div strong{font-size:8px}
.shopping-bought-section article>div small{font-size:6px;color:#8999a2}
.shopping-bought-section article>strong{font-size:8px}
.shopping-offline-info{
  margin-top:12px;display:grid;grid-template-columns:34px 1fr;gap:10px;padding:13px;border-radius:10px;
  background:#eaf3f1;color:#385e5a
}
.shopping-offline-info>span{width:32px;height:32px;border-radius:9px;background:#d9ebe7;display:grid;place-items:center}
.shopping-offline-info>div{display:grid;gap:3px}
.shopping-offline-info strong{font-size:8px}
.shopping-offline-info p{font-size:7px;line-height:1.45;margin:0;color:#617e7b}
.shopping-mode-footer{
  position:fixed;left:0;right:0;bottom:0;z-index:40;min-height:78px;padding:10px max(14px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
  background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-top:1px solid #dce5e8;
  display:flex;align-items:center;justify-content:space-between;gap:14px
}
.shopping-mode-footer>div{display:grid;gap:2px}
.shopping-mode-footer span{font-size:6px;color:#81939d}
.shopping-mode-footer strong{font-size:17px;color:#173044}
.shopping-mode-footer button{
  min-width:160px;height:46px;border:0;border-radius:9px;background:#0f8e75;color:#fff;font-size:10px;font-weight:800
}
.shopping-mode-footer button:disabled{background:#c7d5d5;color:#829494}
.shopping-mode-unavailable{
  max-width:600px;margin:80px auto;padding:30px;text-align:center;background:#fff;border:1px solid #dde7ea;border-radius:12px
}
.shopping-mode-unavailable strong{font-size:13px}
.shopping-mode-unavailable p{font-size:8px;color:#83949d;line-height:1.5}
.shopping-mode-unavailable a{font-size:8px;color:#0f8e75}

@media(max-width:900px){
  .shopping-market-row{grid-template-columns:32px minmax(0,1fr) auto auto}
  .shopping-price-column{grid-column:2}
  .shopping-line-total{grid-column:3}
  .shopping-row-actions{grid-column:4;grid-row:1/3}
  .furniture-row{grid-template-columns:70px minmax(0,1fr) auto}
  .furniture-price{grid-column:2}
  .furniture-link{grid-column:2}
  .furniture-row>.shopping-row-actions{grid-column:3;grid-row:1/4}
}
@media(max-width:700px){
  .shopping-tabs{grid-template-columns:1fr}
  .shopping-summary-grid{grid-template-columns:1fr}
  .shopping-summary-grid>article{min-height:auto;padding:17px 20px;border-right:0;border-bottom:1px solid #e9eef1}
  .shopping-summary-grid>article:last-child{border-bottom:0}
  .shopping-card-head{flex-direction:column}
  .shopping-card-actions{width:100%;justify-content:flex-start}
  .shopping-mode-button{flex:1;justify-content:center}
}
@media(max-width:560px){
  .shopping-market-list,.furniture-list{padding:0 14px 8px}
  .shopping-market-row{grid-template-columns:30px 1fr auto;padding:11px 0}
  .shopping-price-column{grid-column:2}
  .shopping-line-total{grid-column:3}
  .shopping-row-actions{grid-column:2/4;grid-row:auto;justify-content:flex-start}
  .furniture-row{grid-template-columns:1fr auto;padding:12px 0}
  .furniture-priority{grid-column:1}
  .furniture-copy{grid-column:1}
  .furniture-price,.furniture-link{grid-column:1}
  .furniture-row>.shopping-row-actions{grid-column:2;grid-row:1/5}
  .shopping-live-summary{grid-template-columns:1fr 1fr}
  .shopping-live-summary .actual{grid-column:1/3}
  .shopping-live-summary>div:nth-child(2){border-right:0}
  .shopping-live-summary .actual{border-top:1px solid #e9eef1}
  .shopping-live-row{grid-template-columns:32px 1fr}
  .shopping-live-estimated{grid-column:2;text-align:left}
  .shopping-purchase-fields{grid-column:2;grid-template-columns:1fr}
  .shopping-purchase-fields>div{padding-bottom:0}
  .shopping-sync-lock{grid-column:2}
  .shopping-mode-footer button{min-width:145px}
}


/* =========================================================
   ESTOQUE DOMÉSTICO
   ========================================================= */
.inventory-page{max-width:1220px}
.inventory-heading{margin-bottom:18px}
.inventory-add-button{height:38px;padding:0 14px;border:0;font-size:9px}
.inventory-summary-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:#fff;border:1px solid var(--ref-line);
  border-radius:12px;overflow:hidden;margin-bottom:16px
}
.inventory-summary-grid>article{
  min-height:102px;padding:20px 22px;display:flex;flex-direction:column;justify-content:center;border-right:1px solid #e9eef1
}
.inventory-summary-grid>article:last-child{border-right:0}
.inventory-summary-grid span{font-size:8px;color:#7e909a}
.inventory-summary-grid strong{font-size:21px;color:#163043;margin-top:8px;letter-spacing:-.03em}
.inventory-summary-grid small{font-size:7px;color:#95a2aa;margin-top:6px}
.inventory-summary-grid article.attention strong{color:#b3832f}
.inventory-summary-grid article.danger strong{color:#be5e51}

.inventory-list-card,.inventory-history-card{
  padding:0;border:1px solid var(--ref-line);border-radius:12px;box-shadow:none;overflow:hidden
}
.inventory-list-card{margin-bottom:14px}
.inventory-card-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:20px 21px 15px
}
.inventory-card-head .eyebrow{font-size:7px;color:#98752b;letter-spacing:.16em;margin-bottom:5px}
.inventory-card-head h2{font-size:14px;color:#173044;margin:0}
.inventory-card-head p{font-size:8px;color:#8797a0;margin:5px 0 0}
.inventory-search-wrap{
  width:230px;height:36px;display:grid;grid-template-columns:28px 1fr;align-items:center;
  border:1px solid #dbe5e8;border-radius:8px;background:#fff;color:#8da0a9
}
.inventory-search-wrap>span{text-align:center;font-size:11px}
.inventory-search-wrap input{height:34px;border:0;outline:0;background:transparent;color:#203747;font-size:8px;padding:0 9px 0 0}
.inventory-table-head,.inventory-row{
  display:grid;grid-template-columns:minmax(0,1.55fr) minmax(100px,.55fr) minmax(90px,.5fr) 100px auto;
  gap:12px;align-items:center
}
.inventory-table-head{
  min-height:34px;padding:0 21px;background:#fbfcfc;border-top:1px solid #edf1f3;border-bottom:1px solid #e6edef
}
.inventory-table-head span{font-size:6px;color:#91a0a8;text-transform:uppercase;letter-spacing:.08em}
.inventory-list{padding:0 21px 8px}
.inventory-row{min-height:68px;border-bottom:1px solid #edf1f3}
.inventory-row[hidden]{display:none!important}
.inventory-product{display:grid;grid-template-columns:34px 1fr;gap:9px;align-items:center;min-width:0}
.inventory-product-icon{
  width:32px;height:32px;border-radius:9px;background:#edf5f2;color:#1d806c;display:grid;place-items:center;font-size:9px;font-weight:800
}
.inventory-product>div:last-child{display:grid;gap:3px;min-width:0}
.inventory-product strong{font-size:9px;color:#183040;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.inventory-product span{font-size:6px;color:#8a9aa3}
.inventory-balance strong{font-size:11px;color:#173044}
.inventory-balance.low strong{color:#aa7a27}
.inventory-balance.out strong{color:#bd5f53}
.inventory-minimum{font-size:8px;color:#687d88}
.inventory-status{
  display:inline-flex;align-items:center;justify-content:center;min-width:66px;height:22px;padding:0 7px;border-radius:99px;
  font-size:6px;font-weight:800
}
.inventory-status.ok{background:#e8f5ef;color:#27836d}
.inventory-status.low{background:#fff4dd;color:#9a7224}
.inventory-status.out{background:#fff0ed;color:#b85d50}
.inventory-actions{display:flex;align-items:center;justify-content:flex-end;gap:4px}
.inventory-move-button{
  min-height:28px;padding:0 8px;border-radius:6px;font-size:7px;font-weight:700
}
.inventory-move-button.entry{border:1px solid #cfe3dd;background:#f1f8f6;color:#167e69}
.inventory-move-button.exit{border:1px solid #e7d9d5;background:#fff8f6;color:#a46155}
.inventory-move-button:disabled{opacity:.4;cursor:not-allowed}
.inventory-no-results{padding:25px;text-align:center;color:#8a9aa3;font-size:8px}
.inventory-no-results[hidden]{display:none!important}
.inventory-empty{
  min-height:250px;display:grid;place-content:center;justify-items:center;text-align:center;padding:28px
}
.inventory-empty.small{min-height:140px}
.inventory-empty>span{
  width:42px;height:42px;border-radius:11px;background:#edf5f2;color:#1a806b;display:grid;place-items:center;margin-bottom:8px
}
.inventory-empty strong{font-size:10px;color:#415965}
.inventory-empty p{font-size:7px;color:#8999a2;max-width:310px;line-height:1.5;margin:5px 0 14px}

.inventory-history-card{margin-bottom:14px}
.inventory-history-list{padding:0 21px 8px}
.inventory-history-row{
  display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:10px;align-items:center;min-height:58px;border-top:1px solid #edf1f3
}
.inventory-history-icon{
  width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:8px
}
.inventory-history-icon.entry{background:#e8f5ef;color:#18846e}
.inventory-history-icon.exit{background:#fff0ed;color:#b85d50}
.inventory-history-copy{display:grid;gap:3px;min-width:0}
.inventory-history-copy>div{display:flex;align-items:center;gap:6px;min-width:0}
.inventory-history-copy strong{font-size:8px;color:#183040}
.inventory-history-copy>span{font-size:6px;color:#8999a2}
.inventory-source-tag{
  display:inline-flex;height:18px;padding:0 6px;align-items:center;border-radius:99px;font-size:5px;font-weight:800;white-space:nowrap
}
.inventory-source-tag.purchase{background:#e9f3fb;color:#527996}
.inventory-source-tag.manual{background:#f1f4f5;color:#73858e}
.inventory-history-quantity{font-size:9px;white-space:nowrap}
.inventory-history-quantity.entry{color:#16836d}
.inventory-history-quantity.exit{color:#b45b50}
.inventory-page-footer{margin-top:16px}
.inventory-exit-submit{background:#a85f54!important;border-color:#a85f54!important}

@media(max-width:1000px){
  .inventory-table-head{display:none}
  .inventory-row{grid-template-columns:minmax(0,1fr) auto auto}
  .inventory-product{grid-column:1}
  .inventory-balance{grid-column:2}
  .inventory-minimum{display:none}
  .inventory-row>div:nth-child(4){grid-column:3}
  .inventory-actions{grid-column:1/4;justify-content:flex-start;padding-bottom:10px}
}
@media(max-width:760px){
  .inventory-summary-grid{grid-template-columns:1fr 1fr}
  .inventory-summary-grid>article:nth-child(2){border-right:0}
  .inventory-summary-grid>article{border-bottom:1px solid #e9eef1}
  .inventory-summary-grid>article:nth-last-child(-n+2){border-bottom:0}
  .inventory-card-head{flex-direction:column}
  .inventory-search-wrap{width:100%}
}
@media(max-width:560px){
  .inventory-summary-grid{grid-template-columns:1fr}
  .inventory-summary-grid>article{border-right:0;border-bottom:1px solid #e9eef1}
  .inventory-summary-grid>article:last-child{border-bottom:0}
  .inventory-list,.inventory-history-list{padding:0 14px 8px}
  .inventory-row{grid-template-columns:1fr auto;padding:10px 0}
  .inventory-product{grid-column:1}
  .inventory-balance{grid-column:2}
  .inventory-row>div:nth-child(4){grid-column:1}
  .inventory-actions{grid-column:1/3;flex-wrap:wrap}
  .inventory-history-row{grid-template-columns:30px 1fr}
  .inventory-history-quantity{grid-column:2}
}


/* =========================================================
   REPOSIÇÃO DO ESTOQUE → LISTA DE MERCADO
   ========================================================= */
.inventory-restock-card{
  display:grid;
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
  margin-bottom:14px;
  padding:16px 18px;
  border:1px solid #d6e5df;
  border-radius:12px;
  background:linear-gradient(135deg,#f5faf8 0%,#edf7f3 100%)
}
.inventory-restock-icon{
  width:42px;
  height:42px;
  border-radius:11px;
  background:#dcefe8;
  display:grid;
  place-items:center;
  font-size:17px
}
.inventory-restock-copy{min-width:0}
.inventory-restock-copy .eyebrow{
  margin:0 0 4px;
  color:#1a816c;
  font-size:6px;
  letter-spacing:.16em
}
.inventory-restock-copy h2{
  margin:0;
  color:#173044;
  font-size:12px;
  font-weight:700
}
.inventory-restock-copy p:last-child{
  margin:5px 0 0;
  color:#70858e;
  font-size:7px;
  line-height:1.5
}
.inventory-restock-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap
}
.inventory-restock-actions form{margin:0}
.inventory-restock-all-button{
  min-height:34px;
  padding:0 12px;
  border:0;
  border-radius:7px;
  background:#0f8e75;
  color:#fff;
  font-size:8px;
  font-weight:800
}
.inventory-restock-all-button:hover{background:#0c806a}
.inventory-open-market-list{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border:1px solid #cddfd9;
  border-radius:7px;
  background:#fff;
  color:#327565;
  font-size:7px;
  font-weight:700
}
.inventory-open-market-list:hover{background:#f9fcfb}
.inventory-restock-complete{
  min-height:30px;
  display:inline-flex;
  align-items:center;
  padding:0 9px;
  border-radius:99px;
  background:#dff1ea;
  color:#267963;
  font-size:7px;
  font-weight:800
}
.inventory-restock-hint{
  color:#98752b!important;
  font-size:6px!important;
  font-weight:700
}
.inventory-add-list-button{
  min-height:28px;
  padding:0 8px;
  border:1px solid #cfe3dd;
  border-radius:6px;
  background:#f0f8f5;
  color:#157e68;
  font-size:7px;
  font-weight:800;
  white-space:nowrap
}
.inventory-add-list-button:hover{background:#e4f3ed}
.inventory-market-badge{
  min-height:26px;
  display:inline-flex;
  align-items:center;
  padding:0 8px;
  border-radius:99px;
  background:#e7f4ef;
  color:#23806b;
  font-size:6px;
  font-weight:800;
  white-space:nowrap
}

@media(max-width:900px){
  .inventory-restock-card{
    grid-template-columns:42px 1fr
  }
  .inventory-restock-actions{
    grid-column:2;
    justify-content:flex-start
  }
}
@media(max-width:560px){
  .inventory-restock-card{
    grid-template-columns:36px 1fr;
    padding:14px
  }
  .inventory-restock-icon{
    width:36px;height:36px;font-size:14px
  }
  .inventory-restock-actions{
    grid-column:1/3;
    justify-content:stretch
  }
  .inventory-restock-all-button,
  .inventory-open-market-list{
    flex:1;
    justify-content:center
  }
}


.shopping-offline-back{background:transparent}
.shopping-offline-open-link{
  display:inline-flex;
  margin-top:4px;
  color:#1a7e69;
  font-size:7px;
  font-weight:800
}
.shopping-offline-open-link:hover{text-decoration:underline}


/* =========================================================
   MODO COMPRA — RESPONSIVIDADE E QUANTIDADE REAL
   ========================================================= */
.shopping-quantity-field{min-width:138px}
.shopping-quantity-control{
  height:44px;
  display:grid;
  grid-template-columns:40px minmax(58px,1fr) 40px;
  align-items:stretch;
  border:1px solid #d5e2e6;
  border-radius:9px;
  overflow:hidden;
  background:#fff
}
.shopping-quantity-control button{
  border:0;
  background:#f2f6f7;
  color:#36525d;
  font-size:18px;
  font-weight:700;
  display:grid;
  place-items:center;
  padding:0;
  touch-action:manipulation
}
.shopping-quantity-control button:hover{background:#e8f0f2}
.shopping-quantity-control button:active{background:#dce8eb}
.shopping-quantity-control button:disabled{opacity:.45}
.shopping-quantity-control input{
  height:42px!important;
  min-width:0;
  border:0!important;
  border-left:1px solid #e0e8eb!important;
  border-right:1px solid #e0e8eb!important;
  border-radius:0!important;
  text-align:center;
  padding:0 5px!important;
  font-size:16px!important;
  font-weight:750;
  color:#173044
}
.shopping-quantity-control input:focus{box-shadow:none!important}
.shopping-line-total-box{
  display:grid;
  gap:5px;
  min-width:105px;
  padding-bottom:7px
}
.shopping-line-total-box>span{font-size:6px;color:#7e919b}
.shopping-line-total-box>strong{font-size:12px;color:#0f8e75}
.shopping-live-row.needs-quantity,
.shopping-live-row.needs-price{
  outline:2px solid rgba(190,95,82,.18);
  outline-offset:-1px;
  background:#fff8f6
}

@media(max-width:760px){
  .shopping-mode-body{overflow-x:hidden;padding-bottom:100px}
  .shopping-mode-header{
    min-height:66px;
    padding-top:max(9px,env(safe-area-inset-top));
    gap:8px
  }
  .shopping-mode-header>div:first-child{min-width:0;gap:8px}
  .shopping-mode-header h1{
    font-size:15px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    max-width:52vw
  }
  .shopping-mode-header small{font-size:5.5px}
  .shopping-mode-back{width:34px;height:34px;flex:0 0 auto}
  .shopping-connection-status{padding:5px 7px;flex:0 0 auto}
  .shopping-mode-main{padding:10px 10px 18px}
  .shopping-live-summary{margin-bottom:9px;border-radius:10px}
  .shopping-live-summary>div{min-height:70px;padding:11px 12px}
  .shopping-live-summary strong{font-size:15px}
  .shopping-live-summary .actual strong{font-size:18px}
  .shopping-use-card{border-radius:10px}
  .shopping-use-card>header{padding:14px 12px 10px}
  .shopping-live-list{
    display:grid;
    gap:9px;
    padding:7px 8px 10px;
    background:#f8fafb
  }
  .shopping-live-row{
    grid-template-columns:34px minmax(0,1fr) auto;
    gap:9px;
    padding:13px 12px;
    border:1px solid #dfe8eb;
    border-radius:11px;
    background:#fff;
    box-shadow:0 3px 10px rgba(28,55,68,.035)
  }
  .shopping-live-row.selected{
    border-color:#acd5ca;
    background:#fbfefd
  }
  .shopping-live-row+.shopping-live-row{border-top:1px solid #dfe8eb}
  .shopping-live-product strong{font-size:11px}
  .shopping-live-product span{font-size:7px;line-height:1.45}
  .shopping-live-estimated{
    align-self:start;
    padding-top:2px
  }
  .shopping-purchase-fields{
    grid-column:1/4;
    display:grid;
    grid-template-columns:minmax(132px,.8fr) minmax(140px,1fr);
    gap:10px;
    align-items:end;
    padding:10px 0 0;
    border-top:1px dashed #dce6e9;
    margin-top:2px
  }
  .shopping-purchase-fields[hidden]{display:none!important}
  .shopping-purchase-fields label{gap:6px}
  .shopping-purchase-fields label>span,
  .shopping-line-total-box>span{font-size:7px}
  .shopping-purchase-fields>label:not(.shopping-quantity-field) input{
    height:44px;
    font-size:16px;
    border-radius:9px
  }
  .shopping-store-field{grid-column:1/3}
  .shopping-line-total-box{
    grid-column:1/3;
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:35px;
    padding:0 3px
  }
  .shopping-line-total-box>strong{font-size:14px}
  .shopping-sync-lock{grid-column:1/4}
  .shopping-bought-section{border-radius:10px}
  .shopping-offline-info{border-radius:10px}
  .shopping-mode-footer{
    min-height:82px;
    padding-top:9px;
    padding-bottom:calc(9px + env(safe-area-inset-bottom))
  }
  .shopping-mode-footer strong{font-size:16px}
  .shopping-mode-footer button{
    min-width:150px;
    height:48px;
    border-radius:10px;
    font-size:10px
  }
}

@media(max-width:480px){
  .shopping-mode-main{padding-left:8px;padding-right:8px}
  .shopping-live-summary{grid-template-columns:1fr 1fr}
  .shopping-live-summary .actual{grid-column:1/3}
  .shopping-live-summary>div:nth-child(2){border-right:0}
  .shopping-live-summary .actual{
    min-height:64px;
    border-top:1px solid #e9eef1
  }
  .shopping-use-card>header{align-items:center}
  .shopping-use-card>header p:last-child{max-width:230px}
  .shopping-live-row{
    grid-template-columns:32px minmax(0,1fr);
    padding:12px 10px
  }
  .shopping-live-check,
  .shopping-live-check>span{width:30px;height:30px}
  .shopping-live-estimated{
    grid-column:2;
    display:flex;
    align-items:center;
    gap:6px;
    text-align:left
  }
  .shopping-live-estimated small:after{content:":"}
  .shopping-purchase-fields{
    grid-column:1/3;
    grid-template-columns:1fr;
    gap:9px
  }
  .shopping-store-field,
  .shopping-line-total-box{grid-column:1}
  .shopping-quantity-field{min-width:0}
  .shopping-quantity-control{
    width:100%;
    grid-template-columns:48px 1fr 48px;
    height:48px
  }
  .shopping-quantity-control input{height:46px!important}
  .shopping-purchase-fields>label:not(.shopping-quantity-field) input{height:48px}
  .shopping-line-total-box{
    min-height:40px;
    padding:3px 1px
  }
  .shopping-sync-lock{grid-column:1/3}
  .shopping-mode-footer{
    gap:9px;
    padding-left:10px;
    padding-right:10px
  }
  .shopping-mode-footer>div{min-width:0}
  .shopping-mode-footer span{font-size:6px}
  .shopping-mode-footer strong{
    font-size:15px;
    white-space:nowrap
  }
  .shopping-mode-footer button{
    min-width:138px;
    padding:0 12px
  }
}

@media(max-width:360px){
  .shopping-mode-header h1{max-width:46vw;font-size:14px}
  .shopping-connection-status strong{display:none}
  .shopping-connection-status{width:28px;height:28px;justify-content:center;padding:0}
  .shopping-mode-footer button{min-width:126px;font-size:9px}
}


/* =========================================================
   MOBILE 2.0 — COMPRAS + SIDEBAR
   ========================================================= */
.shopping-stock-tag{
  display:inline-flex;
  align-items:center;
  min-height:20px;
  padding:0 7px;
  border-radius:99px;
  font-size:9px;
  font-weight:800;
  white-space:nowrap
}
.shopping-stock-tag.stock{background:#e7f4ef;color:#247d69}
.shopping-stock-tag.quick{background:#fff1dc;color:#9b6c1f}
.shopping-live-product-title{display:flex;align-items:center;gap:7px;min-width:0}
.shopping-live-product-title>strong{min-width:0}
.shopping-destination-field select{
  width:100%;
  height:44px;
  border:1px solid #d5e2e6;
  border-radius:9px;
  background:#fff;
  color:#173044;
  padding:0 10px;
  font-size:14px
}
.shopping-offline-head-actions{display:flex;align-items:center;gap:8px}
.shopping-offline-head-actions>button{
  min-height:32px;
  padding:0 10px;
  border:1px solid #b9d9d1;
  border-radius:8px;
  background:#edf7f4;
  color:#147a66;
  font-size:11px;
  font-weight:800
}
.shopping-offline-head-actions>strong{
  min-width:30px;
  height:30px;
  padding:0 8px;
  border-radius:99px;
  background:#f1f5f6;
  color:#647985;
  display:grid;
  place-items:center;
  font-size:10px
}
.shopping-offline-product-dialog{
  width:min(520px,calc(100vw - 24px));
  max-height:calc(100dvh - 24px);
  border:0;
  border-radius:16px;
  padding:0;
  overflow:auto;
  box-shadow:0 24px 70px rgba(10,38,48,.28)
}
.shopping-offline-product-dialog::backdrop{background:rgba(7,28,35,.54);backdrop-filter:blur(3px)}
.shopping-offline-product-dialog form{padding:20px;display:grid;gap:15px;background:#fff}
.shopping-offline-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.shopping-offline-dialog-head small{font-size:9px;letter-spacing:.14em;color:#98752b;font-weight:800}
.shopping-offline-dialog-head h2{margin:4px 0 0;font-size:20px;color:#173044}
.shopping-offline-dialog-head p{margin:6px 0 0;font-size:12px;line-height:1.45;color:#7c8f99}
.shopping-offline-dialog-head>button{
  width:38px;height:38px;border:0;border-radius:9px;background:#f2f5f6;color:#617780;font-size:20px
}
.shopping-offline-product-dialog label{display:grid;gap:7px}
.shopping-offline-product-dialog label>span{font-size:12px;font-weight:700;color:#526a75}
.shopping-offline-product-dialog input,
.shopping-offline-product-dialog select{
  width:100%;height:48px;border:1px solid #d5e2e6;border-radius:9px;background:#fff;
  color:#173044;padding:0 12px;font-size:16px
}
.shopping-offline-dialog-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.shopping-offline-dialog-note{
  padding:11px 12px;border-radius:9px;background:#fff8e9;border:1px solid #f0dfb9;
  color:#79622f;font-size:11px;line-height:1.5
}
.shopping-offline-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:2px}
.shopping-offline-dialog-actions button{
  min-height:44px;padding:0 16px;border-radius:9px;font-size:13px;font-weight:800
}
.shopping-offline-dialog-actions button:first-child{border:1px solid #d8e2e6;background:#fff;color:#5d747e}
.shopping-offline-dialog-actions button:last-child{border:0;background:#0f8e75;color:#fff}

/* Sidebar vira drawer completo mais cedo para tablets e celulares. */
@media(max-width:900px){
  .shell,.shell.sidebar-collapsed,html.sidebar-collapsed .shell{display:block!important}
  .sidebar.ref-sidebar{
    display:flex!important;
    position:fixed!important;
    left:0!important;top:0!important;bottom:0!important;
    width:min(320px,88vw)!important;
    height:100dvh!important;
    padding:20px 16px 16px!important;
    transform:translateX(-105%)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    z-index:60!important;
    box-shadow:20px 0 60px rgba(4,18,29,.28)
  }
  html.sidebar-mobile-open .sidebar.ref-sidebar{transform:translateX(0)!important}
  .sidebar-toggle.ref-collapse{display:none!important}
  .mobile-menu-toggle{display:grid!important}
  .sidebar-overlay{display:block!important;z-index:55!important}
  html.sidebar-mobile-open .sidebar-overlay{opacity:1!important;visibility:visible!important}
  .ref-brand{justify-content:flex-start!important}
  .ref-brand-copy{display:grid!important}
  .ref-nav .nav-item{
    width:100%!important;
    min-height:48px!important;
    margin:0!important;
    padding:0 12px!important;
    justify-content:flex-start!important;
    gap:12px!important
  }
  .ref-nav .nav-item-label{display:inline!important;font-size:13px!important;opacity:1!important}
  .ref-nav .nav-icon{width:22px!important;height:22px!important;flex:0 0 22px!important}
  .ref-sidebar-user{grid-template-columns:38px minmax(0,1fr)!important;justify-items:stretch!important}
  .ref-sidebar-user .sidebar-user-copy{display:grid!important}
  .ref-sidebar .modern-logout{
    width:100%!important;justify-content:flex-start!important;padding:0 11px!important;margin:0!important
  }
  .ref-sidebar .modern-logout .nav-item-label{display:inline!important;font-size:13px!important}
}

/* Compra mobile com tipografia legível e alvos de toque maiores. */
@media(max-width:760px){
  .shopping-mode-header{min-height:72px!important}
  .shopping-mode-header small{font-size:9px!important;letter-spacing:.11em!important}
  .shopping-mode-header h1{font-size:20px!important;max-width:56vw!important}
  .shopping-mode-back{width:40px!important;height:40px!important;font-size:20px!important}
  .shopping-connection-status{min-height:30px!important;font-size:10px!important;padding:6px 9px!important}
  .shopping-live-summary span{font-size:11px!important}
  .shopping-live-summary strong{font-size:19px!important}
  .shopping-live-summary .actual strong{font-size:22px!important}
  .shopping-offline-banner strong,.shopping-pending-sync-banner strong{font-size:12px!important}
  .shopping-offline-banner span,.shopping-pending-sync-banner span{font-size:11px!important;line-height:1.45!important}
  .shopping-use-card .eyebrow{font-size:9px!important}
  .shopping-use-card h2{font-size:18px!important}
  .shopping-use-card header p{font-size:11px!important;line-height:1.4!important}
  .shopping-use-card>header>strong{font-size:10px!important}
  .shopping-live-row{padding:15px 13px!important}
  .shopping-live-check,.shopping-live-check>span{width:36px!important;height:36px!important}
  .shopping-live-product strong{font-size:15px!important;line-height:1.25!important}
  .shopping-live-product>span{font-size:11px!important;line-height:1.45!important}
  .shopping-stock-tag{font-size:9px!important;min-height:21px!important}
  .shopping-live-estimated small{font-size:10px!important}
  .shopping-live-estimated strong{font-size:13px!important}
  .shopping-purchase-fields label>span,.shopping-line-total-box>span{font-size:11px!important}
  .shopping-purchase-fields input,.shopping-purchase-fields select{font-size:16px!important}
  .shopping-destination-field select{height:48px!important;font-size:16px!important}
  .shopping-line-total-box>strong{font-size:17px!important}
  .shopping-sync-lock{font-size:10px!important;padding:6px 9px!important}
  .shopping-bought-section summary{font-size:12px!important}
  .shopping-bought-section article>div strong{font-size:12px!important}
  .shopping-bought-section article>div small{font-size:10px!important;line-height:1.4!important}
  .shopping-bought-section article>strong{font-size:12px!important}
  .shopping-offline-info strong{font-size:12px!important}
  .shopping-offline-info p{font-size:10px!important}
  .shopping-mode-footer span{font-size:10px!important}
  .shopping-mode-footer strong{font-size:19px!important}
  .shopping-mode-footer button{font-size:13px!important;font-weight:800!important}
}

@media(max-width:480px){
  .shopping-mode-header h1{font-size:18px!important;max-width:58vw!important}
  .shopping-live-list{gap:11px!important}
  .shopping-live-row{grid-template-columns:36px minmax(0,1fr)!important;gap:10px!important}
  .shopping-live-product-title{align-items:flex-start;flex-direction:column;gap:5px}
  .shopping-purchase-fields{grid-template-columns:1fr!important;gap:11px!important}
  .shopping-quantity-field,.shopping-store-field,.shopping-destination-field,.shopping-line-total-box{grid-column:1!important}
  .shopping-quantity-control{height:52px!important;grid-template-columns:52px 1fr 52px!important}
  .shopping-quantity-control input{height:50px!important}
  .shopping-quantity-control button{font-size:22px!important}
  .shopping-purchase-fields>label:not(.shopping-quantity-field) input,
  .shopping-destination-field select{height:50px!important}
  .shopping-offline-head-actions>button{min-height:36px;font-size:11px}
  .shopping-mode-footer{min-height:86px!important}
  .shopping-mode-footer button{height:52px!important;min-width:145px!important}
  .shopping-offline-dialog-grid{grid-template-columns:1fr}
  .shopping-offline-product-dialog form{padding:17px}
}

@media(max-width:360px){
  .shopping-mode-header h1{font-size:17px!important;max-width:62vw!important}
  .shopping-mode-footer button{min-width:132px!important;font-size:12px!important}
}


/* =========================================================
   CACHE / ATUALIZAÇÃO DO APP
   ========================================================= */
.settings-cache-card{
  width:100%;
  text-align:left;
  font:inherit;
  cursor:pointer
}
.settings-cache-card:disabled{cursor:wait;opacity:.72}
.settings-cache-card>span:last-child{
  color:#0f8e75;
  font-size:10px;
  font-weight:800;
  white-space:nowrap
}
.settings-cache-card:hover:not(:disabled){
  border-color:#b9d9d1;
  background:#f7fbfa
}

@media(max-width:760px){
  .settings-grid{grid-template-columns:1fr!important}
  .settings-card{
    min-height:86px;
    padding:16px!important;
    gap:12px!important
  }
  .settings-card strong{font-size:14px!important}
  .settings-card p{font-size:11px!important;line-height:1.45!important}
  .settings-card>span:last-child{font-size:11px!important}
}
