.admin-shell{max-width:1450px;padding-top:32px}.admin-header{max-width:1450px}.admin-header .actions{gap:22px;font-size:13px}.admin-intro{margin-bottom:24px}.admin-intro h1,#accessState h1{font:700 clamp(28px,4vw,44px)/1.1 'Space Grotesk';letter-spacing:-1.5px;margin:12px 0}.admin-stats{grid-template-columns:repeat(4,minmax(0,1fr))}.admin-stats .stat{background:#181c16}.admin-stats b{font-size:32px}.admin-search{display:flex;gap:10px;align-items:center;margin:20px 0}.admin-search input{margin:0;min-width:0;flex:1}.admin-search button{flex-shrink:0}.admin-pager{display:flex;justify-content:flex-end;align-items:center;gap:12px;flex-wrap:wrap;margin:16px 0 28px;font-size:12px;color:#abb29e}.admin-pager .outline{padding:9px 14px}.admin-message:empty{display:none}.admin-filter{display:flex;align-items:center;justify-content:space-between;gap:14px;background:#26301a;border:1px solid #48562d;border-radius:8px;padding:12px 16px;color:#d4e1bb;font-size:13px}.admin-organization-picker{display:flex;justify-content:space-between;gap:16px;align-items:center;padding:15px;background:#22291b;border:1px solid #414b34;border-radius:7px}.admin-organization-picker strong{display:block;margin-top:7px;font-size:14px;font-weight:500;overflow-wrap:anywhere}.admin-organization-picker button{flex-shrink:0}.admin-dialog{background:#181c16;color:#f8f8f3;border:1px solid #59634d;border-radius:12px;padding:25px;width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 48px);overflow:auto}.admin-dialog::backdrop{background:#000b}.admin-dialog h2{margin:0;font-size:26px}.admin-dialog select{margin-bottom:20px}.admin-dialog .row>button{padding:8px 12px}.admin-target{overflow-wrap:anywhere;color:#d6ff46;font-size:15px}.admin-check{margin:20px 0}.admin-dialog[open]{display:block}.admin-dialog:not([open]){display:none}.admin-dialog .scroll{margin-top:20px}.admin-dialog td,.admin-dialog th{padding:12px 8px}.admin-muted{display:block;color:#aab39d;margin-top:5px;max-width:340px;overflow-wrap:anywhere}.admin-state-suspended{background:#442a24;color:#ffd1c2}.admin-role{color:#d6ff46}.admin-table-email{overflow-wrap:anywhere;max-width:270px}.admin-table-actions{min-width:190px}.admin-no-wrap{white-space:nowrap}.admin-count{font-variant-numeric:tabular-nums}.admin-shell h2{font-size:27px}.admin-shell tbody tr:hover{background:#20251b}.admin-shell td{vertical-align:top}.admin-row-choice{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 0;border-bottom:1px solid #35392f}.admin-row-choice strong{font-size:14px;overflow-wrap:anywhere}.admin-row-choice button{flex-shrink:0}#adminEventEditor,#adminTicketEditor{scroll-margin-top:20px}#adminEventTitle:focus,#adminTicketEvent:focus{outline:none}#eventMessage:empty,#ticketMessage:empty,#ticketLoadMessage:empty,#promoterMessage:empty,#userPermissionMessage:empty,#organizationPickerMessage:empty{display:none}.admin-dialog .error{margin-bottom:0}@media(max-width:900px){.admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.admin-shell{padding-left:4%;padding-right:4%}.admin-header{padding-left:4%;padding-right:4%}}@media(max-width:600px){.admin-header .actions{gap:12px;font-size:11px}.admin-search{flex-wrap:wrap}.admin-search input{flex-basis:100%}.admin-stats .stat{padding:17px 12px;font-size:12px}.admin-stats b{font-size:27px}.admin-organization-picker,.admin-filter{align-items:flex-start;flex-direction:column}.admin-organization-picker button{width:100%}.admin-intro h1{font-size:33px}.admin-dialog{padding:20px 16px}.admin-pager{justify-content:space-between;gap:7px}.admin-row-choice{align-items:flex-start}.admin-shell h2{font-size:24px}}

body.detix-gerencia,body.owner-dossier{background:#f6f7f3;color:#171a18;font-family:Inter,system-ui,sans-serif;margin:0}
.owner-sidebar{position:fixed;inset:0 auto 0 0;width:224px;background:#191d1b;color:white;padding:24px 14px;overflow:auto;box-sizing:border-box;z-index:5}
.owner-brand{font-size:36px;font-weight:850;letter-spacing:-2px;color:white;text-decoration:none;display:block;margin:0 4px 28px}
.owner-brand span{color:#d1f747}.owner-brand small{font-size:15px;letter-spacing:0;font-weight:500;color:#ddd}
.owner-sidebar nav,.owner-sidebar nav.tabs{display:grid;gap:4px;border:0;padding:0;background:transparent}
.owner-sidebar nav :is(a,button){display:block;text-align:left;padding:12px 14px;margin:0;background:transparent;color:#eff2ed;border:0;border-radius:8px;text-decoration:none;font:inherit;cursor:pointer}
.owner-sidebar nav :is(a,button):hover{background:#383e38}.owner-sidebar nav [aria-current=page]{background:#d1f747;color:#182011;font-weight:700}
body.detix-gerencia:has(#adminApp:not(.hidden)) main.shell,body.owner-dossier main.shell{width:auto;max-width:1500px;margin:0 0 0 224px;padding:clamp(20px,4vw,58px);box-sizing:border-box}
.owner-box,.owner-dossier #detail,.detix-gerencia .stat{background:#fff;border:1px solid #dedfd9;border-radius:14px;padding:20px;margin:18px 0}
.owner-stage{display:inline-block;background:#e8f2cf;color:#33471e;border-radius:20px;padding:6px 12px}
.owner-box a,.owner-dossier a{font-weight:650}.owner-box table{border-collapse:collapse;width:100%}.owner-box :is(th,td){text-align:left;padding:12px 8px;border-bottom:1px solid #eee}.owner-box th{font-size:.85em;color:#515850}
#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList{overflow-x:auto}.owner-dossier label{display:grid;gap:5px;margin:12px 0}.owner-dossier :is(input:not([type=checkbox]),textarea,select){width:100%;max-width:100%;box-sizing:border-box;padding:10px;border:1px solid #bec5b9;border-radius:7px}
.owner-dossier [hidden]{display:none!important}.owner-dossier form,.owner-dossier #evidence{overflow-wrap:anywhere}
.owner-dossier .actions{display:flex;flex-wrap:wrap;gap:8px}.owner-dossier button,.owner-box .btn{background:#d1f747;border:0;color:#172010;border-radius:7px;padding:10px 14px}
@media(max-width:800px){.owner-sidebar{position:static;width:auto;padding:12px}.owner-brand{font-size:25px;margin:0 0 8px}.owner-sidebar nav,.owner-sidebar nav.tabs{display:flex;overflow-x:auto;flex-wrap:nowrap}.owner-sidebar nav :is(a,button){white-space:nowrap;flex-shrink:0;padding:9px}.detix-gerencia .admin-shell:has(.owner-sidebar),body.owner-dossier main.shell,body.detix-gerencia:has(#adminApp:not(.hidden)) main.shell{margin:0;padding:14px;width:100%}.owner-box{padding:12px}.admin-intro{flex-wrap:wrap}.owner-box td{min-width:5em}}

#ownerMenu {display:none}
@media(max-width:800px){
 .detix-gerencia #ownerMenu {display:block;min-height:44px;padding:0 16px;background:#d1f747;color:#182011;border:0;border-radius:10px;font-weight:700}
 .detix-gerencia .owner-sidebar {display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;border-radius:16px;padding:12px 16px}
 .detix-gerencia .owner-brand {margin:0}
 .detix-gerencia #ownerNavigation {grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:60dvh;overflow:auto}
 .detix-gerencia #ownerMenu[aria-expanded="false"] + nav {display:none}
 .detix-gerencia #ownerNavigation :is(button,a) {min-height:44px;white-space:normal}
 .detix-gerencia .admin-stats {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .detix-gerencia .admin-stats .stat {min-width:0;margin:0;padding:14px;overflow-wrap:anywhere}
 .detix-gerencia .admin-intro {margin-block:20px}
 .detix-gerencia :is(.fields,.admin-search),.owner-dossier .fields {display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
 :is(.detix-gerencia,.owner-dossier) :is(input:not([type=checkbox]),select,textarea){box-sizing:border-box;max-width:100%;min-width:0;font-size:16px;min-height:44px}
 .detix-gerencia #accessLogin {display:grid;gap:14px}
 .detix-gerencia #accessLogin.hidden {display:none}
 .detix-gerencia #accessLogin label:not(.hidden) {display:grid;gap:5px}
 .detix-gerencia .admin-dialog {box-sizing:border-box;width:calc(100% - 24px);max-height:88dvh;overflow:auto;overscroll-behavior:contain}
 .detix-gerencia :is(#usersList,#organizationsList,#activityList,#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList) table,.detix-gerencia :is(#usersList,#organizationsList,#activityList,#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList) tbody {display:block}
 .detix-gerencia :is(#usersList,#organizationsList,#activityList,#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList) thead {position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden}
 .detix-gerencia :is(#usersList,#organizationsList,#activityList,#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList) tr {display:block;padding:10px 0;border-bottom:1px solid #dfe4d9}
 .detix-gerencia :is(#usersList,#organizationsList,#activityList,#ownerMoney,#ownerTasks,#ledgerMonths,#ledgerRows,#forecastList,#repeatList,#settleList,#paymentList,#caseList,#refundList) td {display:grid;grid-template-columns:minmax(6em,42%) minmax(0,1fr);gap:8px;overflow-wrap:anywhere;border:0;padding:4px 0;min-width:0}
 .detix-gerencia td[data-label]::before {content:attr(data-label);color:#515850;font-size:.85em}
 .owner-dossier #detail {padding:14px}
 .owner-dossier .actions button {min-height:44px;flex:1 1 140px}
}

/* Dark panels sit on the light management workspace. */
:is(.detix-gerencia,.owner-dossier) .box,
.detix-gerencia .admin-organization-picker {
  background: #181c16;
  color: #f5f7f1;
}
.detix-gerencia .box :is(table, td, td strong, td a) { color: #f5f7f1; }
.detix-gerencia .box th { color: #cbd4c1; }
.detix-gerencia .box tbody tr:is(:hover,:focus-within) { background: #30382a; }
.detix-gerencia .box .outline { color: #fff; border-color: #899580; }
.detix-gerencia .box :focus-visible { outline: 3px solid #d1f747; outline-offset: 2px; }
.detix-gerencia .owner-box tbody tr:is(:hover,:focus-within) { background: #eff3e9; }
.detix-gerencia .admin-pager { color: #45503e; }
.detix-gerencia .admin-pager .outline { color: #273021; border-color: #798372; }

.detix-gerencia .owner-sidebar {background:#0a3328;color:#fff}
.detix-gerencia #adminApp .box {background:#fffdf7;color:#192820;border-color:#d5ddce}
.detix-gerencia #adminApp .box :is(table,th,td,td strong,td a,.outline) {color:#193428}
.detix-gerencia #adminApp .box tbody tr:is(:hover,:focus-within) {background:#eff5e9}
.detix-gerencia #ledgerForm {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,185px),1fr));gap:14px;align-items:end;margin-top:16px}
.detix-gerencia #ledgerForm label {display:grid;gap:6px}
.detix-gerencia #section-vision .owner-box {margin-block:16px}
.detix-gerencia #ledgerVat {padding:14px;background:#e8f5c7;color:#193428;border-radius:8px}

.detix-gerencia #ledgerRows input[type=file]{width:100%;max-width:16rem}

#ledgerChart{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-block:16px}
#ledgerChart div{display:grid;gap:4px}
#ledgerChart span{font-weight:600;text-transform:capitalize}
#ledgerChart progress{width:100%;height:12px;accent-color:#164936}
#ledgerChart progress.expense{accent-color:#859e27}
#caseUpdate{display:grid;gap:10px;max-width:38rem}
#caseUpdate label{display:grid;gap:6px}

body:is(.detix-gerencia,.owner-dossier){background:#faf8f1;color:#102c21}
:is(.detix-gerencia,.owner-dossier) .owner-sidebar{background:#072c20;color:#fff}
:is(.detix-gerencia,.owner-dossier) .owner-brand{font:700 27px/1.4 system-ui;letter-spacing:.22em}
.owner-brand small{display:block;font:600 13px/1.5 system-ui;letter-spacing:.12em}
:is(.detix-gerencia,.owner-dossier) :is(.admin-intro h1,.shell h1,.shell h2,.shell h3){font-family:Georgia,serif;letter-spacing:-.035em;color:#102c21}
:is(.detix-gerencia,.owner-dossier) .shell h1{font-size:clamp(2.4rem,5vw,4.7rem);margin:.15em 0}
.detix-gerencia .admin-intro{padding-block:16px;border-bottom:1px solid #c7ccbf}
.detix-gerencia #adminApp .stat{margin:0;background:transparent;color:#23392c;border:0;border-radius:0;border-inline-start:1px solid #c7ccbf}
.detix-gerencia #adminApp .stat b,#overviewTrend strong{display:block;font:600 clamp(1.8rem,3vw,3rem)/1.25 Georgia,serif;color:#102c21}
.detix-gerencia #ledgerTotals .stat:last-child{background:#dcfa9c;border-radius:10px}
.overview-columns{display:grid;grid-template-columns:1.2fr 1fr;gap:16px}
.overview-columns>*{min-width:0}
.detix-gerencia .owner-box,.owner-dossier #detail,.owner-dossier #detail .box{color:#163527;background:#fffdf7;border:1px solid #ccd0c3;box-shadow:none}
.owner-dossier #contract label{color:#193428}
#overviewTrend svg{display:block;width:100%;max-height:210px;margin:16px 0;border-bottom:1px solid #c7ccbf}
#overviewTrend polyline{fill:none;stroke:#146147;stroke-width:3}
.detix-gerencia #section-overview .admin-stats,.detix-gerencia #ledgerTotals{grid-template-columns:repeat(3,minmax(0,1fr))}
.admin-intro~section>h2:first-child,.admin-intro~section>.row:first-child>h2:first-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.stages{display:flex;list-style:none;padding:0;counter-reset:stage;margin:22px 0}
.stages li{counter-increment:stage;flex:1;text-align:center;font-size:clamp(.7rem,2vw,1rem);border-top:2px solid #cad2c1}
.stages li:before{content:counter(stage);display:grid;place-items:center;margin:-1em auto .35em;border-radius:50%;width:2em;height:2em;background:#dce2d4}
.stages .complete:before{content:'✓';background:#123a2a;color:white}
.stages [aria-current]:before{background:#c1fa39;color:#143422}
.owner-dock{display:none}
@media(max-width:800px){
body:is(.detix-gerencia,.owner-dossier){padding-bottom:calc(68px + env(safe-area-inset-bottom))}
.owner-dock{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,1fr);background:#082d21;padding:5px 4px calc(5px + env(safe-area-inset-bottom));z-index:7}
.owner-dock :is(a,button){display:grid;place-items:center;text-decoration:none;font:600 .81rem system-ui;color:white;background:transparent;border:0;border-radius:7px;padding:6px 2px;min-height:44px}
.owner-dock [aria-current=page]{color:#162f20;background:#c1fa39}
.overview-columns{display:contents}
#section-overview{display:flex;flex-direction:column}
#section-overview.hidden{display:none}
#section-overview .overview-columns>.owner-box:first-child{order:-1}
.detix-gerencia #section-overview .admin-stats,.detix-gerencia #ledgerTotals{grid-template-columns:repeat(2,minmax(0,1fr))}
#ledgerTotals .stat:last-child{grid-column:1/-1}
}

#ledgerChart svg{width:100%;height:clamp(80px,12vw,155px);border-bottom:1px solid #b5c1b4}
#ledgerChart div{text-align:center}.chart-key{font-size:.86rem;color:#31533d}
.dossier-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
#legalFacts{display:grid;grid-template-columns:1fr 1.4fr;gap:10px}
#legalFacts dd{margin:0;overflow-wrap:anywhere}
@media(max-width:800px){.dossier-grid{grid-template-columns:1fr;gap:0}}

/* Management content uses light surfaces; the navigation has its own dark palette. */
:is(.detix-gerencia,.owner-dossier) .shell {
  --management-ink:#183328;
  --management-secondary:#455749;
  --management-line:#798b7c;
}
:is(.detix-gerencia,.owner-dossier) .shell :is(.small,.eyebrow,.admin-muted,.field-hint,label) {
  color:var(--management-secondary);
}
.detix-gerencia .shell :is(#accessState,.admin-dialog,.admin-organization-picker,.admin-filter) {
  background:#fffdf7;color:var(--management-ink);border-color:var(--management-line);
}
.detix-gerencia .shell :is(.admin-target,.admin-role) {color:#245333}
:is(.detix-gerencia,.owner-dossier) .shell :is(input,textarea,select) {
  color-scheme:light;background:#fff;color:#183328;border-color:var(--management-line);
}
:is(.detix-gerencia,.owner-dossier) .shell ::placeholder {color:#55685a;opacity:1}
:is(.detix-gerencia,.owner-dossier) .shell :is(.outline,.admin-dialog .outline):not(.owner-sidebar *,.owner-dock *) {
  color:#193428;background:#fffdf7;border-color:var(--management-line);
}
:is(.detix-gerencia,.owner-dossier) .shell .error {color:#90251f}
.detix-gerencia .shell #accessState h1,.detix-gerencia .shell .admin-dialog h2 {color:#183328}
.detix-gerencia .admin-dialog tbody tr:hover {background:#edf3e8}
.detix-gerencia .shell .owner-sidebar nav :is(a,button) {background:#072c20;color:#f7faf6}
.detix-gerencia .shell .owner-sidebar nav :is(a,button):hover {background:#264e3d;color:white}
.detix-gerencia .shell .owner-sidebar nav [aria-current=page],
.owner-dossier .owner-sidebar nav [aria-current=page] {background:#cef63c;color:#152a1b}
:is(.detix-gerencia,.owner-dossier) .shell :is(.small,.admin-muted,.field-hint){font-size:.875rem;line-height:1.5}
:is(.detix-gerencia,.owner-dossier) .shell :focus-visible {outline:3px solid #28734b;outline-offset:2px}

#orgDossier header{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
#orgDossier header h3{font-size:clamp(2rem,5vw,4rem);margin:.25em 0}
#orgDossier .stages{margin-block:2rem}
#orgDossier .owner-box{min-width:0;margin:0}
#orgDossier h4{font:600 1.45rem/1.2 Georgia,serif;margin:.4rem 0 1rem}
#orgDossier dl{display:grid;grid-template-columns:minmax(6rem,40%) 1fr;gap:.65rem}
#orgDossier dd{margin:0;overflow-wrap:anywhere}
#orgDossier .dossier-grid{margin-bottom:1.5rem;gap:.85rem}
