/* Inmobiliaria Atelier · v48. Presentation tokens; no data or financial logic. */
:root{
 --bg:#f5f4ee;--surface:#fffefa;--surface2:#f0f1e9;--ink:#153c32;--muted:#5b6d63;
 --line:#dce2d8;--line-strong:#a4b5a6;--brand:#185843;--brand-hover:#103f30;
 --brand-soft:#e9f1e8;--sidebar:#102f27;--brass:#a88242;--brass-ink:#785d29;
 --focus:#256f60;--radius:12px;--sh1:0 1px 3px #153c3205;--sh2:0 10px 36px #153c320a;
 --atelier-space:24px;--atelier-row:48px;--atelier-ease:160ms ease;
}
html{scroll-padding-top:24px}body{background:var(--bg);font-size:14px;color:var(--ink)}
button,input,select,textarea,summary{font-family:var(--sans)}
button,input,select,summary{min-height:44px}button{border-width:1px;box-shadow:none;font-weight:650;transition:background var(--atelier-ease),border-color var(--atelier-ease),box-shadow var(--atelier-ease)}
button:hover{box-shadow:0 2px 5px #153c320a}button:disabled{box-shadow:none;opacity:.5;cursor:not-allowed}
input,select,textarea{background:#fffefa;border:1px solid #adbcae;border-radius:8px}
:is(input,select,textarea):focus{outline:2px solid var(--focus);outline-offset:2px}
main{margin-left:224px;max-width:1920px;padding:24px 32px 40px;min-width:0}
.sidebar{width:224px;padding:22px 14px 14px;background:#102f27;box-shadow:none;border-right:1px solid #22473a}
.sidebar .brand{padding:3px 9px 22px;margin:0 0 16px;border-bottom:1px solid #ffffff1c}
.sidebar .brand img{width:176px}.sidebar .brand small{font-size:8px;letter-spacing:2px;color:#b8cbc0;margin-top:12px}
.sidebar>.nav-label{margin:0 10px 10px;color:#91ac9d;font-size:9px;letter-spacing:1.6px}
.sidebar nav{gap:3px;align-content:start;overflow-y:auto}
.sidebar nav .nav-section{padding:12px 10px 5px;margin:0;color:#92ad9e;font-size:9px;letter-spacing:1.5px}
.sidebar nav button{min-height:44px;font-size:12px;padding:6px 10px;gap:10px;border-radius:7px;font-weight:550}
.sidebar .nav-icon{width:28px;height:28px;flex-basis:28px;background:transparent;color:var(--nav-accent);border-radius:6px}
.sidebar .nav-icon svg{width:19px;height:19px}
.sidebar nav button[aria-current=page]{background:#e7efe4;color:#173e30;box-shadow:none;border-color:#e7efe4;font-weight:800}
.sidebar nav button[aria-current=page] .nav-icon{background:#d7e6d4;color:#185843}
.sidebar-bottom{padding:12px 9px 0;font-size:11px;color:#bbcdc2;border-color:#ffffff1a;margin-top:16px}
.cab{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:0 0 20px;margin:0 0 22px;background:none;border:0;border-bottom:1px solid var(--line);box-shadow:none;border-radius:0}
.cab>div:first-child{flex:1;min-width:200px}.cab h1{font:500 clamp(28px,2.7vw,38px)/1.15 var(--serif);letter-spacing:-1px;margin:6px 0 8px}
.cab p.muted{font-size:12px;max-width:660px;line-height:1.6;margin:0}.cab .eyebrow{font-size:9px;letter-spacing:1.5px;color:#698073;margin:0}
.atelier-primary:empty{display:none}.atelier-primary button{min-height:44px;padding:10px 18px;border-radius:8px;font-size:12px}
.atelier-session{position:relative;align-self:flex-start;margin-left:auto;z-index:6}
.atelier-session>summary{display:flex;align-items:center;gap:18px;font-size:11px;padding:0 12px;list-style:none;color:#506b5c;border:1px solid var(--line);border-radius:8px;background:#fffefa;cursor:pointer}
.atelier-session>summary::after{content:'⌄';font-size:15px}
.atelier-session>.header-actions{position:absolute;right:0;top:calc(100% + 8px);width:240px;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:14px;background:#fffefa;border:1px solid var(--line);border-radius:10px;box-shadow:0 14px 40px #102f2720}
.atelier-session:not([open])>.header-actions{display:none}.atelier-session .header-actions>*{width:100%;margin:0;font-size:11px}.atelier-session .env-badge{border:0;background:transparent;text-align:left;color:#697b70}
.app-footer{padding-top:22px;border-top:1px solid var(--line);font-size:11px;color:#738076;margin-top:30px}
.card,.module-card,.report-card{background:#fffefa;border-color:var(--line);box-shadow:var(--sh1);border-radius:12px}
.costs-layout{gap:16px}.costs-common-filters{display:grid;grid-template-columns:minmax(210px,1.5fr) repeat(3,minmax(120px,1fr)) auto auto;align-items:end;gap:12px;padding:20px;background:#fffefa;border:1px solid var(--line);border-radius:12px;box-shadow:var(--sh1)}
.atelier-period{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;gap:16px;padding-bottom:16px;margin-bottom:2px;border-bottom:1px solid var(--line)}
.atelier-kicker{display:block;font-size:9px;font-weight:750;letter-spacing:1.7px;color:#768578;margin-bottom:7px}
.atelier-month-name{font:500 26px/1.15 var(--serif);letter-spacing:-.5px;color:#193f30}
.atelier-period-controls{display:flex;gap:6px}.atelier-period-controls button{width:44px;min-height:44px;font-size:23px;padding:0;border-color:#d2ddcf;color:#2a5c40;border-radius:8px}
.costs-common-filters label{font-size:10px;font-weight:750;letter-spacing:.02em;gap:6px;color:#58705e;display:grid;min-width:0}
.costs-common-filters :is(input,select){font-size:12px;min-height:44px;padding:8px 10px;background:#fffefa;border:1px solid #bdcabc;border-radius:7px}
.costs-common-filters>button{font-size:11px;padding:8px 12px;white-space:normal}.costs-common-filters>button:last-child{border-color:transparent;background:transparent;color:#607865;padding-inline:6px}
.costs-applied.atelier-filter-summary{display:flex;flex-wrap:wrap;align-items:center;gap:7px;padding:0;border:0;background:none;border-radius:0;font-size:10px;color:#586c5e;margin:0}
.atelier-context-chip,.atelier-active-chip{display:inline-flex;align-items:center;padding:5px 9px;min-height:32px;border:1px solid #d9e1d3;background:#edf1e7;color:#4d6956;font-size:10px;border-radius:5px}
.atelier-active-chip{background:#e0edda;border-color:#c5d9bf;font-weight:700;min-height:44px;cursor:pointer}
.atelier-common-help{font-size:10px;margin:0 0 3px;color:#64786a}
.cost-group{background:#fffefa;padding:0;border-radius:12px;box-shadow:var(--sh1);border:1px solid var(--line);overflow:visible}
.cost-group>h2{font:650 17px/1.3 var(--sans);letter-spacing:-.4px;padding:20px 20px 0;margin:0 0 14px;color:#244735}
.cost-group>h2::before{width:8px;height:8px;border-radius:2px;background:#54896a}.cost-group.variable>h2::before{background:#bc9355}
.cost-group .records-workspace{padding:0}.cost-group .records-toolbar{border:0;border-radius:0;padding:0 20px 12px;box-shadow:none;background:transparent}
.records-workspace{position:relative}.records-toolbar{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px;padding:16px;background:#fffefa;border-color:var(--line);border-radius:12px 12px 0 0;box-shadow:none}
.records-filter-form{display:flex;align-items:end;gap:8px;flex:1 1 280px;min-width:0}
.records-filter-form>label{position:relative;flex:1 1 200px;max-width:370px;font-size:10px;gap:5px}
.records-filter-form>label:has(input[type=search])>input{padding-left:14px;background:#f7f8f2}
.records-workspace :is(input,select){border-color:#b9c9b9;border-radius:7px;font-size:12px;padding:8px 10px}
.records-workspace :is(button,summary){font-size:11px;border-radius:7px;min-height:44px}
.records-filter-form>button{margin:0;background:#edf2e8;color:#2c6046;border-color:#c9d9c5;min-width:80px;flex-shrink:0}
.records-filters{padding:0;flex:0 1 auto;min-width:100px}.records-filters>summary{padding:9px 12px;background:#fffefa;border-color:#cbd8c5;font-size:11px}
.records-filters[open]{order:5;flex-basis:100%;padding:12px;background:#f5f7ef;border:1px solid var(--line);border-radius:8px}
.records-filters[open]>.records-filter-grid{gap:12px;grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))}
.atelier-settings{position:relative;align-self:end;flex:0 0 auto;z-index:4}.atelier-settings>summary{display:flex;align-items:center;gap:16px;padding:10px 12px;border:1px solid #cbd8c5;background:#fffefa;list-style:none;cursor:pointer;font-size:11px;font-weight:650}
.atelier-settings>summary::after{content:'⌄';font-size:13px}
.atelier-settings>.records-preferences{display:flex;flex-wrap:wrap;gap:8px;position:absolute;right:0;top:calc(100% + 8px);padding:14px;margin:0;min-width:350px;max-width:min(540px,calc(100vw - 48px));border:1px solid var(--line);border-radius:10px;background:#fffefa;box-shadow:0 14px 40px #102f2720}
.atelier-settings:not([open])>.records-preferences{display:none}.records-preferences>select{flex:1;max-width:none}.records-preferences>details{flex:1 1 120px}.records-preferences>details[open]{flex-basis:100%;order:3;margin:0;background:#f7f8f2;padding:10px}
.records-view-body{font-size:11px}.records-view-body button{flex:1 1 100px}.records-columns{gap:6px}.records-columns label{font-size:11px;background:#eef3e8;min-height:44px;flex:1 1 120px}
.filter-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0;padding:0 16px 12px}.cost-group .filter-chips{padding:0 20px 10px}
.filter-chips button{font-size:11px;padding:6px 9px;border:1px solid #d7e3cf;background:#f0f5e8;min-height:44px}
.filter-chips>button:last-child{border-color:transparent;background:transparent;color:#5e7663;text-decoration:underline;text-underline-offset:3px}
.records-workspace>.filter-help{font-size:10px;margin:0;padding:8px 16px;color:#65796a;line-height:1.6}
.cost-group .records-workspace>.filter-help{padding:0 20px 6px}
.records-data{border-color:var(--line);border-width:1px 0 0;border-radius:0 0 12px 12px;background:#fffefa;box-shadow:none}
.records-scroll,.cost-group .records-scroll{max-height:min(660px,66dvh);overflow:auto;scrollbar-width:thin;scrollbar-color:#b8c6b1 #f3f5ee;overscroll-behavior:contain;scroll-padding-top:46px;border:0}
.records-table{font-size:12px;min-width:760px}
.records-table th{background:#f0f3e9;color:#64775e;font-size:9px;letter-spacing:.07em;font-weight:750;padding:2px 12px;border-bottom:1px solid #d0ddc7;height:44px;z-index:2}
.records-table th button{font-size:10px;text-transform:none;letter-spacing:0;color:#536c4a;font-weight:700;min-height:40px}
.records-table th:not(:last-child){border-right:1px solid #e1e8d9}
.records-table td{background:#fffefa!important;border-color:#e8ecdf;color:#3e5745;line-height:1.4;transition:background var(--atelier-ease)}
.records-table td:not(:last-child){border-right:1px solid #eef0e8}
.density-compact .records-table td{padding:2px 12px;font-size:11px;height:var(--atelier-row)}
.density-comfortable .records-table td{padding:10px 12px;font-size:12px}
.records-table tr:nth-child(even) td{background:#fafbf6!important}.records-table tr:hover td{background:#f0f5e8!important}.records-table tr.is-selected td{background:#e1eed9!important}
.records-table .record-identity{font-size:12px;font-weight:750;line-height:1.45;color:#244f36;min-height:44px;text-decoration:none;padding:5px 0;display:block;overflow:visible;-webkit-line-clamp:unset;white-space:normal;overflow-wrap:anywhere}
.records-table .record-identity:hover{color:#0e6f45;text-decoration:underline;text-underline-offset:3px}
.records-table td:has(.record-identity){min-width:175px;max-width:360px}
.records-table .numeric{font-weight:750;color:#1e4732;letter-spacing:.01em}
.records-table .badge{font:600 10px/1.35 var(--sans);padding:4px 7px;border-radius:5px;box-shadow:none;border-width:1px}
.records-table td.record-actions{position:static;min-width:178px;white-space:nowrap;box-shadow:none;border-left:1px solid #e4eadb}.records-table:has(.record-actions) th:last-child{right:auto;z-index:2}.record-action-group{align-items:center;gap:6px}
.records-table .record-action-group>button{background:transparent;border-color:#d2dfc9;color:#356444;font-size:10px;padding:5px 9px}
.record-more summary{background:transparent;border-color:transparent;color:#66795f;padding:11px 8px;font-size:10px}
.record-more[open]{background:#f6f8ef;border:1px solid #d5e0cc;border-radius:7px;padding:5px;white-space:normal}
.record-more[open]>summary{min-height:34px;padding:6px 8px}.record-more[open]>button{border:0;background:transparent!important;box-shadow:none;text-align:left;font-size:10px;min-width:145px;min-height:44px;margin:0;padding:8px;border-radius:4px}
.record-more[open]>button:hover{background:#e8eedf!important}
.records-workspace .pagination{display:flex;align-items:center;gap:8px;border-top:1px solid var(--line);padding:12px 16px;font-size:10px;background:#fffefa;min-width:0}
.records-workspace .pagination span{margin-right:auto;color:#6d7c66}.records-workspace .pagination button{font-size:10px;padding:6px 10px;background:transparent;border-color:#d7e0d0}
.records-workspace .pagination>select{width:auto;max-width:145px;font-size:10px;margin-left:4px}
.records-selection{top:10px;box-shadow:0 4px 12px #153c3210;border-color:#9ebf92;background:#e7f1df;font-size:12px;margin-inline:12px}
.records-selection button{font-size:11px;background:#fffefa}
.records-workspace input[type=checkbox]{width:18px;height:18px;min-height:18px;accent-color:#2f7752;outline-offset:4px}
.record-checkbox{min-width:44px;min-height:44px}
/* Opaque form surfaces, content-sized monthly sheet, original fields and actions. */
dialog,#editor.record-drawer,.records-dialog{background:#fffefa;color:#1e4434;border-color:#cbd8c3;box-shadow:0 24px 80px #0e2c2440}
dialog::backdrop,.records-dialog::backdrop{background:#102a245e;backdrop-filter:none}
#editor.record-drawer{width:min(760px,88%);border-radius:14px 0 0 14px}
#editor.record-drawer.atelier-monthly{width:min(570px,90%)}
#editor .dialog-heading{padding:24px;background:#f0f3e9;border-bottom:1px solid #d6e0cd;gap:16px}
#editor .dialog-heading h2{font:500 27px/1.2 var(--serif);letter-spacing:-.5px;margin:6px 0 0;overflow-wrap:anywhere}
#editor .dialog-heading .eyebrow{font-size:9px;letter-spacing:1.2px;color:#5b7651}
#editor .dialog-heading button{width:44px;height:44px;min-width:44px;font-size:17px;border-color:#d2dcc9;background:#fffefa}
#editor-body{padding:20px 24px 0;background:#fffefa}
.required-note{font-size:10px;line-height:1.7;margin:0 0 12px;color:#687b60}
.form-progress{padding:10px 12px;font-size:10px;line-height:1.6;margin-bottom:22px;background:#f8f4e5;box-shadow:none;border:1px solid #e2dabd;border-left:3px solid #b59a54}
.form-progress[data-complete=true]{background:#eef5e7;border-color:#d4e4c8;border-left-color:#7ba26b;color:#47613e}
.form-section{padding:18px 16px;border:1px solid #dee5d6;border-radius:9px;margin-bottom:22px;background:#fffefa}
.form-section legend{font-size:11px;letter-spacing:.025em;color:#496140;gap:8px;background:#fffefa}
.section-number{background:#edf2e4;color:#688055;font-size:9px;width:22px;height:22px;border-radius:4px}
.form-grid{gap:18px 16px}.form-grid label{font-size:11px;gap:6px;color:#405a38}
.form-grid input,.form-grid select,.form-grid textarea{font-size:13px;min-height:46px;border:1px solid #bdcbb2;background:#fffefa;border-radius:7px;padding:10px 11px;box-shadow:none}
.form-grid .field-required>input,.form-grid .field-required>select,.form-grid .field-required>textarea{background:#fffefa;border-color:#b6b98e;box-shadow:inset 3px 0 #b3a46c}
.field-label{gap:6px}.requirement{font-size:8px;padding:3px 4px;color:#6d7b60;background:#eff3e8}.field-required .requirement{color:#84622e;background:#f5eedb}
.field-help,.form-grid .field-help{font-size:10px;line-height:1.65;color:#64785a}
.atelier-monthly #field-monto{font-size:24px;font-weight:650;height:58px;letter-spacing:-.3px;text-align:left;background:#f6f8ef}
.atelier-monthly .form-section:first-of-type .form-grid{grid-template-columns:1fr}
.atelier-monthly .form-section:nth-of-type(2) .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.atelier-monthly .form-section:nth-of-type(2) .form-grid>label:has(#field-anulado){grid-column:1/-1}
#editor.record-drawer .form-actions,.form-actions{position:sticky;bottom:0;margin:12px 0 0;padding:16px 0;background:#fffefa;border-top:1px solid #dce4d3;box-shadow:none;gap:8px;z-index:5}
.form-actions button{min-height:44px;font-size:11px;padding:10px 15px;border-radius:7px}.form-actions .danger{margin-right:auto;background:transparent;border-color:transparent!important}
.form-preview{background:#f0f5e9;border-color:#cedec0;border-radius:8px;padding:16px;font-size:12px}.form-preview h3{font-size:21px}
.records-dialog>header{background:#f0f3e9;border-color:#d4dfca;padding:20px 24px}.records-dialog-body{padding:24px;font-size:12px}.record-detail :is(dt,dd){font-size:12px;padding:12px;border-color:#e0e8d7}
/* Each module keeps its composition; shared chrome, inputs and ledgers agree. */
.module-toolbar{background:#fffefa;border:1px solid var(--line);padding:16px;border-radius:10px;gap:12px;box-shadow:none}
.module-toolbar :is(input,select,button){font-size:12px;min-height:44px}.module-toolbar+.filter-help{font-size:11px}
.tab-button,.tab-nav button{border-radius:7px}.scroll{border-color:#d8e2d0;border-radius:10px;background:#fffefa}
.scroll th{background:#f0f3e9;color:#607356;font-size:10px;padding:13px 12px}.scroll td{font-size:12px;padding:12px;border-color:#e5ebdc}
.report-filters{padding:18px;background:#fffefa;border:1px solid var(--line);border-radius:12px;gap:14px}.report-filters label{font-size:11px}.report-filters :is(input,select,button){font-size:12px}
.report-totals{gap:14px}.report-totals>*{background:#fffefa;border-color:#d5e0cb;border-radius:10px;padding:20px}
body[data-module=panel] .cab{background:#173e30;background-image:none;border:1px solid #254d3a;border-radius:12px;box-shadow:none;padding:24px 28px}
body[data-module=panel] .cab h1{font-size:35px;color:#fbfaef}body[data-module=panel] .cab .eyebrow{color:#a9c5ac}body[data-module=panel] .cab p.muted{color:#d2dfcc}
.tarjeta{border:1px solid #d9e2d0;border-radius:12px;padding:22px;background:#fffefa!important;box-shadow:none;position:relative;overflow:hidden}
.tarjeta::before{content:'';position:absolute;top:0;left:0;bottom:0;width:3px;background:#5b9870}.tarjeta.proy::before{background:#8296be}.tarjeta.expense::before{background:#c4976c}
.tarjeta h4{font-size:11px;color:#5f7456}.tarjeta .v{font:600 clamp(23px,2.4vw,34px)/1.3 var(--sans);letter-spacing:-1px;color:#24462f}
.banda{background:none!important;border-bottom:1px solid #d7e2cd;border-radius:0;padding:12px 0;color:#496a3f;font:700 12px var(--sans);text-transform:uppercase;letter-spacing:.07em}
#combined-chart,.combo-card,.finance-chart,.finance-chart:nth-child(2){background:#fffefa;background-image:none;box-shadow:none;border-color:#d6e2ce;border-radius:12px}
.combo-card{padding:20px}.chart-filters{background:#f3f6ec;border:1px solid #dbe5d2;border-radius:9px;padding:16px}.chart-filters label{font-size:11px}
.combo-legend label{border-radius:7px;font-size:11px;padding:8px 10px}.combo-totals{gap:10px}.currency-chip{border-radius:5px;background:#285d40}
.finance-chart-head h3,.combo-card h3{font-size:23px}.finance-balance strong{font-family:var(--sans);font-size:25px}
@media(min-width:769px) and (max-height:780px){.sidebar{padding-top:14px}.sidebar .brand{padding-bottom:12px;margin-bottom:8px}.sidebar .brand small,.sidebar>.nav-label{display:none}.sidebar nav{display:flex;flex-direction:column;gap:0}.sidebar nav .nav-section{padding:7px 10px 2px}.sidebar nav button{min-height:38px;font-size:11px}.sidebar-bottom{margin-top:8px;padding-top:8px}}
@media(min-width:769px) and (max-width:1280px){main{margin-left:204px;padding:24px}.sidebar{width:204px}.sidebar .brand img{width:158px}.costs-common-filters{grid-template-columns:repeat(4,minmax(0,1fr))}.costs-common-filters>button{grid-row:3}.costs-common-filters>button:first-of-type{grid-column:3}.costs-common-filters>button:last-of-type{grid-column:4}.records-filter-form>label{max-width:310px}}
@media(max-width:1000px) and (min-width:769px){.atelier-settings{flex-grow:1}.atelier-settings>summary{justify-content:space-between}.atelier-settings>.records-preferences{right:0;min-width:300px}.cab>div:first-child{min-width:160px}.costs-common-filters{padding:16px;gap:10px}.records-filter-form{flex-basis:100%}.records-toolbar>button{order:1}.atelier-settings{order:2}.record-action-group{gap:3px}}
@media(max-width:768px){
 main{margin-left:0;padding:22px 20px}.sidebar{width:auto;position:sticky;top:0;padding:12px 20px;gap:10px;flex-direction:row;z-index:8}.sidebar .brand{border:0;padding:0;margin:0;flex:1}.sidebar .brand img{width:148px;max-width:100%}.sidebar .brand small,.sidebar>.nav-label,.sidebar-bottom{display:none}.sidebar .menu-toggle{display:block;font-size:11px;min-height:44px;padding:8px 12px;background:#1d4836;color:#e3eddb;border-color:#3b6550}.mobile-panel-link{min-height:44px;border-color:#5f8c6a;color:#e4efde;border-radius:7px;font-size:11px}.sidebar.nav-open nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;max-height:70dvh}.sidebar nav button{min-height:44px;font-size:12px}.sidebar nav .nav-section{grid-column:1/-1;padding-top:12px}.sidebar .nav-icon{width:26px;flex-basis:26px}.cab{gap:12px;padding-bottom:18px;margin-bottom:18px}.cab>div:first-child{flex-basis:100%;min-width:0}.cab h1{font-size:32px}.cab p.muted{font-size:12px}.atelier-primary{flex:1}.atelier-primary button{width:100%;font-size:12px}.atelier-session{margin-left:0;align-self:center}.atelier-session>.header-actions{right:0}.costs-common-filters{grid-template-columns:repeat(2,minmax(0,1fr));padding:16px;gap:12px}.costs-common-filters>button{width:100%}.atelier-month-name{font-size:25px}.atelier-period{padding-bottom:15px}.costs-common-filters label{font-size:10px}.costs-common-filters :is(input,select){font-size:12px}.costs-layout{gap:14px}.cost-group>h2{padding:18px 16px 0;font-size:16px}.cost-group .records-toolbar{padding:0 16px 12px;flex-direction:row}.records-toolbar{flex-direction:row;padding:14px}.records-filter-form{flex:1 1 100%;flex-direction:row;flex-wrap:wrap;align-items:end;width:100%;gap:8px}.records-filter-form>label{max-width:none;flex:1 1 160px}.records-filter-form>button{flex:0 0 auto;width:auto;margin:0;padding:9px 12px}.records-filters{flex:0 0 94px}.records-filters[open]{flex-basis:100%}.records-toolbar>button{width:auto;flex:1;order:1}.atelier-settings{order:2;flex:1}.atelier-settings>summary{justify-content:space-between}.atelier-settings>.records-preferences{right:0;min-width:min(340px,calc(100vw - 60px));max-width:calc(100vw - 60px)}.records-preferences details[open]{min-width:0}.records-view-body>*{min-width:0;max-width:100%}.records-workspace>.filter-help,.cost-group .records-workspace>.filter-help{padding:0 16px 10px;font-size:10px}.filter-chips,.cost-group .filter-chips{padding:0 16px 10px}.records-table{min-width:0}.records-scroll,.cost-group .records-scroll{max-height:none;overflow:visible}.records-data{border:0}.records-table thead tr{padding:4px 12px;background:#f0f3e9}.records-table tbody tr{margin:12px;border-radius:9px;border:1px solid #d9e4d0;box-shadow:0 2px 4px #153c3204;grid-template-columns:minmax(0,1fr) minmax(0,1fr);overflow:visible;min-width:0}.records-table tbody td{font-size:11px!important;padding:8px 12px!important;background:#fffefa!important;min-width:0;max-width:none;height:auto!important;border-right:0!important}.records-table tbody td::before{font-size:9px;letter-spacing:.04em;color:#738669}.records-table tr:nth-child(even) td{background:#fffefa!important}.records-table td.record-select{border-radius:9px 9px 0 0;min-height:44px;border-bottom:1px solid #e8eedd}.records-table .record-select::after{font-size:10px;color:#75866c}.records-table td:has(.record-identity){min-width:0;padding-top:12px!important;font-size:16px!important}.records-table .record-identity{font-size:15px;min-height:44px}.records-table td.record-actions{border-radius:0 0 9px 9px;min-width:0;border-top:1px solid #e6eddc;background:#f5f8ef!important}.record-action-group{width:100%;justify-content:space-between}.records-table .record-action-group>button{font-size:11px;background:#fffefa;flex:1}.record-more[open]{max-width:100%;flex:1}.record-more summary{font-size:11px;min-width:62px;text-align:center}.records-workspace .pagination{padding:12px;gap:8px}.records-workspace .pagination span{order:-1;width:100%}.records-workspace .pagination button{flex:1 1 100px;font-size:10px}.records-workspace .pagination>select{flex:1 1 100px;max-width:none;margin:0}.records-selection{top:82px;font-size:11px}.records-selection button{min-height:44px}.records-dialog,#editor.record-drawer,#editor.record-drawer.atelier-monthly{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0}#editor .dialog-heading{padding:20px}#editor .dialog-heading h2{font-size:27px}#editor-body{padding:18px 20px 0}.form-section{padding:16px 14px}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px}.form-actions button{flex:1;min-width:0}.form-actions .danger{flex:0 1 auto;margin:0}.records-dialog>header{padding:20px}.records-dialog-body{padding:20px}.tarjeta{padding:20px}.grid3{grid-template-columns:1fr}.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.dos{grid-template-columns:1fr}body[data-module=panel] .cab{padding:24px}.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.module-toolbar{padding:14px}.module-toolbar>*{max-width:100%}
}
@media(max-width:480px){main{padding:18px 14px}.sidebar{padding:10px 14px}.sidebar .brand img{width:126px}.sidebar .menu-toggle{padding:8px 10px}.mobile-panel-link{padding:8px 10px}.cab h1{font-size:31px}.cab .eyebrow{font-size:8px}.atelier-primary button{padding-inline:12px}.atelier-session>summary{font-size:10px;padding-inline:10px}.atelier-month-name{font-size:23px}.costs-common-filters{padding:14px;gap:11px}.atelier-period{gap:8px}.atelier-period-controls{gap:4px}.atelier-period-controls button{width:44px}.atelier-kicker{font-size:8px;letter-spacing:1.2px}.records-filter-form>label{flex:1 1 120px}.records-filter-form>button{font-size:10px;min-width:72px}.records-filters{flex:1 1 100%}.records-filters summary{justify-content:space-between}.records-filters[open]>.records-filter-grid{grid-template-columns:1fr}.atelier-settings>summary{font-size:10px;padding-inline:9px}.records-toolbar>button{font-size:10px}.cost-group>h2{padding:16px 14px 0}.cost-group .records-toolbar{padding-inline:14px}.grid2{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.atelier-monthly .form-section:nth-of-type(2) .form-grid{grid-template-columns:1fr}.form-grid .wide{grid-column:1/-1}.form-actions{flex-wrap:wrap}.form-actions .danger{flex-basis:100%}#editor .dialog-heading{padding:18px}#editor-body{padding:16px 16px 0}#editor .dialog-heading h2{font-size:25px}.form-section{padding:16px 12px}.report-filters{grid-template-columns:1fr}.records-dialog-body{padding:18px}.combo-card{padding:14px}.combo-legend{gap:8px}body[data-module=panel] .cab h1{font-size:29px}.tarjeta .v{font-size:30px}.app-footer{font-size:10px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.atelier-session,.atelier-primary,.atelier-settings{display:none!important}}
/* Legible operational text at normal zoom; density comes from layout, not tiny type. */
@media(min-width:769px){.density-compact .records-table td{font-size:12px}.records-table th{font-size:10px}.records-table .badge{font-size:11px}.records-table .record-identity{font-size:13px}}
.form-grid label{font-size:12px}.field-help,.form-grid .field-help{font-size:11px}
.atelier-settings .records-preferences>.filter-help{width:100%;font-size:11px;line-height:1.65;margin:0;padding:8px 0 0;border-top:1px solid var(--line)}
.atelier-settings .filter-chips{padding:0;margin:0}
.tarjeta.real.fuerte{background:#1d4836!important;border-color:#1d4836}.tarjeta.real.fuerte::before{background:#94bb83}.tarjeta.real.fuerte h4{color:#e3ecd9}.tarjeta.real.fuerte .v{color:#fbfbed}.tarjeta.real.fuerte .s,.tarjeta.real.fuerte .v>span:first-child,.tarjeta.real.fuerte .equivalencia{color:#d1dfc7}.tarjeta.real.fuerte .sello{color:#e5efd9;border-color:#73936b;background:#2f5b40}
.atelier-settings>.records-preferences{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:420px;max-width:calc(100vw - 60px)}
.atelier-settings .records-preferences>details[open],.atelier-settings .records-preferences>.filter-help,.atelier-settings .records-preferences>.filter-chips{grid-column:1/-1}
.atelier-preference-field{display:grid;gap:5px;min-width:0;font-size:10px;color:#5a7350;align-self:end}.atelier-preference-field>select{width:100%;max-width:100%;font-size:11px;min-width:0}
@media(max-width:768px){.atelier-settings>.records-preferences{width:min(340px,calc(100vw - 60px));min-width:0}}
/* Non-modal preference sheet: bounded to the viewport, outside table scroll areas. */
.atelier-settings[open]{z-index:12}
.atelier-settings>.records-preferences{position:fixed;top:92px;right:24px;width:420px;max-height:calc(100dvh - 116px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:18px;box-shadow:0 14px 55px #102f2733}
.atelier-preferences-heading{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:4px;font:650 15px var(--sans);gap:12px}
.atelier-preferences-close{width:44px;height:44px;padding:0;border-color:var(--line);background:#fffefa;flex-shrink:0}
@media(max-width:768px){.atelier-settings>.records-preferences{top:78px;right:14px;width:min(420px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:calc(100dvh - 96px);padding:16px}}
.records-data>.empty{display:grid;justify-items:center;align-content:center;gap:16px;min-height:190px;margin:0;padding:32px 24px;text-align:center;font-size:12px;line-height:1.7;color:#61745a;background:#fffefa}
.records-data>.empty::before{content:'';display:block;width:34px;height:42px;border:1px solid #b7c9a8;border-radius:5px;background:linear-gradient(#cfdbc4,#cfdbc4) 8px 12px/16px 2px no-repeat,linear-gradient(#cfdbc4,#cfdbc4) 8px 20px/16px 2px no-repeat,linear-gradient(#cfdbc4,#cfdbc4) 8px 28px/10px 2px no-repeat,#f1f5e9}
.records-table th button,.record-more[open]>summary,.combo-legend label,.seg span,button.chico,.chip{min-height:44px}
/* v40: third-party funds are explicit; each currency chart receives a full canvas. */
#third-party-panel{margin:24px 0;border:1px solid #d4dfcd;background:#fffefa;border-radius:12px;padding:22px}
#third-party-panel>h3{font:600 24px var(--serif);margin:0 0 8px}#third-party-panel>.section-note{font-size:12px;margin:0 0 18px;line-height:1.7}
.third-party-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.third-party-card{padding:18px 20px;background:#f1f5ea;border:1px solid #d6e3ca;border-radius:10px}.third-party-card:nth-child(2){background:#f0f3fa;border-color:#d2dbea}.third-party-card .eyebrow{font-size:9px}.third-party-card h4{margin:8px 0;color:#566c4e;font-size:12px;font-weight:650}.third-party-value{display:block;font:650 30px/1.3 var(--sans);letter-spacing:-.7px;color:#234c36;margin:8px 0 12px}.third-party-card p{font-size:12px;margin:7px 0}.third-party-card p.field-help{font-size:11px;color:#607355}.custody-link{display:inline-flex;align-items:center;min-height:44px;margin-top:10px;color:#285c40;font-size:12px;font-weight:700}.third-party-details{border-top:1px solid var(--line);margin-top:8px;padding-top:8px}.third-party-details>summary{cursor:pointer;font-size:12px;min-height:44px;padding:12px 0}
#combined-chart .combo-grid[data-both="true"]{grid-template-columns:minmax(0,1fr)}
#combined-chart .combo-grid[data-both="true"] .combo-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
.currency-jumps{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:12px 0 18px}
.currency-jumps p{flex:1 1 250px;margin:0}.currency-jumps button{min-height:44px;background:#edf4e9;border-color:#a9bda2;color:#164d3b;font-weight:650}
#combined-chart .currency-plot{scroll-margin-top:85px}#combined-chart .currency-plot:focus-visible{outline:3px solid #13795f;outline-offset:3px}
@container(min-width:800px){#combined-chart .combo-grid[data-both="true"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
#combined-chart .currency-plot{padding:22px;background:#fffefa;border-radius:12px}
#combined-chart .combo-totals{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.combo-totals>div{padding:14px}.combo-totals dd{font-size:20px}.combo-totals dt{font-size:12px}
.combo-canvas{max-width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:#aabd9d #f3f6ec;border:1px solid #e1e8d8;border-radius:9px;background:#fffefa;overscroll-behavior-x:contain}
#combined-chart .combo-canvas>svg{display:block;width:auto;min-width:100%;max-width:none;height:420px}
.combo-axis{font:500 12px var(--sans);fill:#4d6654}.combo-value{font:750 12px var(--sans);fill:#294e3a}.combo-gridline{stroke:#e0e7dc;stroke-dasharray:3 5}.combo-zero{stroke:#9eb499;stroke-width:1.5}.combo-hit{cursor:crosshair}.combo-hit:hover{fill:#598b6110}
.combo-period-detail{padding:16px;border:1px solid #d8e3cf;border-radius:9px;background:#f5f8ee;margin:16px 0}.combo-period-detail>label{font-size:12px;max-width:360px;gap:8px}.combo-period-detail select{background:#fffefa;min-height:44px;font-size:12px}.combo-period-values{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:16px}.combo-period-values span{display:block;font-size:11px;margin-bottom:6px}.combo-period-values strong{font-size:16px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
@media(max-width:768px){#third-party-panel{padding:18px}.third-party-value{font-size:26px}#combined-chart .currency-plot{padding:14px}#combined-chart .combo-totals,.combo-period-values{grid-template-columns:repeat(2,minmax(0,1fr))}.combo-totals dd{font-size:18px}.combo-period-detail{padding:14px}}
@media(max-width:480px){.third-party-grid{grid-template-columns:1fr}#third-party-panel{padding:16px}.third-party-card{padding:16px}#combined-chart .combo-totals{gap:8px}.combo-totals>div{padding:10px}.combo-totals dd{font-size:17px}}

/* Primary creation belongs to the module heading, separate from table tools. */
body:is([data-module="operaciones"],[data-module="movimientos"],[data-module="carteles"]) .cab{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;column-gap:18px}
body:is([data-module="operaciones"],[data-module="movimientos"],[data-module="carteles"]) .atelier-primary{grid-column:2}
body:is([data-module="operaciones"],[data-module="movimientos"],[data-module="carteles"]) .atelier-session{grid-column:3;align-self:center;margin:0}
.atelier-primary .atelier-create{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:11px 18px;background:var(--brand);color:#fffefa;border:1px solid var(--brand);font-size:14px;font-weight:750;line-height:1.3;white-space:nowrap;box-shadow:0 5px 12px #18584320}
.atelier-primary .atelier-create:hover{background:var(--brand-hover);border-color:var(--brand-hover);box-shadow:0 6px 16px #18584330}
.atelier-create-icon{display:inline-grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:6px;background:#ffffff1c;font-size:21px;font-weight:500;line-height:1}
.records-filter-form>button.principal{background:#fffefa;border-color:#a4b5a6;color:var(--brand);box-shadow:none}
.records-filter-form>button.principal:hover{background:var(--brand-soft)}
@media(max-width:1000px){body:is([data-module="operaciones"],[data-module="movimientos"],[data-module="carteles"]) .cab{grid-template-columns:minmax(0,1fr) auto}.cab .atelier-primary:has(.atelier-create){grid-column:1/-1;grid-row:2}.cab .atelier-primary .atelier-create{width:100%}body:is([data-module="operaciones"],[data-module="movimientos"],[data-module="carteles"]) .atelier-session{grid-column:2;grid-row:1;align-self:start}}
@media(max-width:480px){.atelier-primary .atelier-create{font-size:14px;white-space:normal;min-height:48px}.cab .atelier-primary{min-width:0}.records-toolbar{align-items:end}.atelier-create-icon{flex-shrink:0}}
/* v44: a deliberate month selection, followed by readable independent rows. */
.pagares-plan {display:grid;gap:20px;min-width:0}
.pagare-month-picker,.pagare-plan-row {border:1px solid var(--line,#d5e0d5);border-radius:14px;padding:16px;min-width:0;background:#fffef9}
.pagare-month-picker legend,.pagare-plan-row legend {font-weight:700;padding:0 8px;color:#195642}
.pagare-year {display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.pagare-months {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pagare-months label {display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px;border:1px solid #d5e0d5;border-radius:8px;cursor:pointer}
.pagare-months label:has(:checked) {background:#e2f1e8;border-color:#1c6c51;color:#164e3b;font-weight:700}
#editor .pagare-months input {width:20px;min-width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;padding:0;accent-color:#195642}
.pagare-cards {display:grid;gap:16px}
.pagare-row-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:12px}
.pagare-row-grid label {display:grid;gap:6px;min-width:0;font-size:.875rem;font-weight:600}
.pagare-row-grid input,.pagare-row-grid select {width:100%;min-width:0;min-height:44px;background:#fff;border:1px solid #afc2b4;border-radius:8px;padding:10px;color:#183c30;font:inherit}
.pagare-row-grid [hidden] {display:none}
.pagare-item {gap:12px;align-items:center}.pagare-item>div {min-width:0;overflow-wrap:anywhere}.pagare-item p {margin:6px 0}
@media(max-width:480px){.pagare-months{grid-template-columns:repeat(3,minmax(0,1fr))}.pagare-row-grid{grid-template-columns:1fr}.pagare-item{align-items:stretch;flex-direction:column}.pagare-month-picker,.pagare-plan-row{padding:12px}}

.numeric-feedback{display:block;color:#8c4b15;font-size:.78rem;font-weight:600;line-height:1.5}.numeric-feedback[hidden]{display:none}
.financing-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px;border:1px solid #c7dbce;border-radius:12px;background:#f0f6ef;margin:14px 0}.financing-summary>div{min-width:0}.financing-summary span{display:block;color:#466553;font-size:.8rem;margin-bottom:5px}.financing-summary strong{font-variant-numeric:tabular-nums;overflow-wrap:anywhere;color:#164f3b}.financing-summary .financing-note{grid-column:1/-1;margin:0;font-size:.82rem}.financing-limit{color:#9b342a;font-weight:700}
@media(max-width:390px){.financing-summary{grid-template-columns:1fr}}

/* V47: one search interaction for ledgers and reference pickers. */
.search-combobox{display:block;position:relative;min-width:0;width:100%;font:inherit}.search-combobox>input{width:100%;min-width:0;box-sizing:border-box}.search-suggestions{position:fixed;inset:auto;margin:0;padding:6px;overflow:auto;overscroll-behavior:contain;background:#fffefa;color:#173e30;border:1px solid #9eb8a5;border-radius:12px;box-shadow:0 12px 32px #123d3026;z-index:10000;font:500 13px/1.45 var(--sans);box-sizing:border-box}.search-suggestions[hidden]{display:none}.search-suggestions::backdrop{background:transparent;pointer-events:none}.search-status{padding:9px 10px;color:#4b6454;font-size:12px;line-height:1.5}.search-suggestions [role=option]{display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;min-height:52px;padding:10px 12px;border:1px solid transparent;border-radius:8px;background:transparent;color:#173e30;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;box-shadow:none;transition:background 140ms,border-color 140ms}.search-suggestions [role=option] strong{font-size:14px;font-weight:700}.search-suggestions [role=option] small{font-size:12px;color:#4b6454}.search-suggestions [role=option]:hover,.search-suggestions [role=option][aria-selected=true]{background:#e8f1e5;border-color:#abc4ab}.search-suggestions [role=option]:focus-visible{outline:3px solid #36715d;outline-offset:-3px}.catalog-search{margin-top:8px}

/* V47: hierarchy and contrast, with stable amounts and currency alignment. */
#panel .tarjeta{padding:22px 24px;display:flex;flex-direction:column;gap:10px;box-shadow:0 3px 12px #183e3008;border-radius:14px;transition:box-shadow 150ms,border-color 150ms}
#panel .tarjeta h4{display:flex;align-items:flex-start;flex-wrap:wrap;gap:10px 12px;margin:0 0 5px;font:700 14px/1.5 var(--sans);color:#34553e;min-height:42px}
#panel .tarjeta h4>span:first-child{flex:1 1 170px;min-width:0;overflow-wrap:anywhere}
#situacion .tarjeta h4{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(45px,auto) auto;gap:8px;align-items:start;justify-items:start;min-height:0}
#situacion .tarjeta h4>span:first-child{min-height:45px;width:100%}
#panel .tarjeta .sello{flex:0 1 auto;font:750 12px/1.4 var(--sans);letter-spacing:.035em;padding:6px 9px;border:1px solid #96b29c;border-radius:7px;color:#234d35;background:#e7f0e2;white-space:normal}
#panel .tarjeta.proy .sello{color:#294e80;background:#edf2fb;border-color:#9db1cf}
#panel .tarjeta.mixto .sello{color:#6b4a15;background:#fcf4e1;border-color:#baa473}
#panel .tarjeta.real.fuerte h4{color:#f1f4e7}#panel .tarjeta.real.fuerte .sello{background:#355f49;color:#f3f7df;border-color:#9ab48f}
#panel .tarjeta .v{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;align-items:baseline;font:650 clamp(28px,2.35vw,36px)/1.3 var(--sans);letter-spacing:-.7px;font-variant-numeric:tabular-nums lining-nums}
#panel .tarjeta .v>span:first-child{font:750 13px/1.4 var(--sans);letter-spacing:.04em;color:#44634c}
#panel .tarjeta .v>span:last-child{text-align:right;min-width:0;overflow-wrap:anywhere}
#panel .tarjeta .s{font:500 13px/1.6 var(--sans);color:#4c6653;margin-top:auto;padding-top:5px}
#panel .tarjeta.real.fuerte .v>span:first-child,#panel .tarjeta.real.fuerte .s{color:#dbe8d2}
#panel .third-party-card h4{font-size:14px;line-height:1.5;color:#34553e}#panel .third-party-card .eyebrow{font-size:11px;color:#46624a}#panel .third-party-value{font-variant-numeric:tabular-nums}
@media(min-width:1280px){#panel .tarjeta h4{font-size:15px}#panel .tarjeta .sello{font-size:13px}}
@media(max-width:480px){#panel .tarjeta{padding:18px;gap:9px}#panel .tarjeta h4{min-height:0;font-size:14px}#panel .tarjeta .sello{font-size:12px}#panel .tarjeta .v{font-size:28px;grid-template-columns:34px minmax(0,1fr);gap:8px}.search-suggestions{border-radius:10px}.search-suggestions [role=option]{min-height:56px}}
@media(prefers-reduced-motion:reduce){#panel .tarjeta,.search-suggestions [role=option]{transition:none}}
