/* Management workspace, scoped to the management account and existing hub. */
body.gerencia-mode #gerencia-command-center{background:#071321;border:1px solid #263a51;border-radius:18px;color:#f6f8fb;box-shadow:none}
body.gerencia-mode #gerencia-command-center>header h2{color:#fff}
body.gerencia-mode #gerencia-command-center>header p{color:#ffd21c}
body.gerencia-mode #gerencia-command-center .gerencia-toolbar button,
body.gerencia-mode #gerencia-command-center .gerencia-hub-search input{background:#17263a;border-color:#33465d;color:#fff}
#gerencia-command-center .gerencia-workspace{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px}
#gerencia-redesign{min-width:0}
body:not(.gerencia-hub) #gerencia-redesign{display:none}
.mgmt-landing{min-width:0;display:grid;gap:16px}
.mgmt-heading p{margin:0;color:#ffd21c;font-size:11px;font-weight:900;letter-spacing:.12em}
.mgmt-heading h2{margin:4px 0;color:#fff;font-size:clamp(24px,3vw,34px)}
.mgmt-heading small,.mgmt-card p,.mgmt-kpis small{color:#b2c1d0}
.mgmt-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.mgmt-kpis button{display:grid;gap:7px;min-height:120px;padding:18px;border:1px solid #33465e;border-radius:14px;background:#192a40;color:#fff;text-align:left}
.mgmt-kpis span{font-weight:750}.mgmt-kpis b{font-size:30px;color:#fff}.mgmt-kpis small{font-size:12px}
.mgmt-board{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.9fr);gap:14px}
.mgmt-card{min-width:0;padding:18px;border:1px solid #31445b;border-radius:14px;background:#142338}
.mgmt-card header{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:12px}
.mgmt-card h3{margin:0;color:#fff;font-size:18px}.mgmt-card p{margin:4px 0 0;font-size:12px}
.mgmt-card header button{border:0;background:transparent;color:#ffd21c;font-weight:800}
.mgmt-work-list{display:grid}.mgmt-work{display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;align-items:center;gap:12px;width:100%;padding:12px 2px;border:0;border-top:1px solid #34465b;background:transparent;color:#f7f9fb;text-align:left}
.mgmt-work span:first-child{min-width:0;display:grid;gap:4px}.mgmt-work b,.mgmt-work small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mgmt-work small{color:#afbfce}.mgmt-work em{font-style:normal;color:#c6d5e5}.mgmt-work i{font-style:normal;color:#ffd21c}
.mgmt-empty{padding:12px 0}.mgmt-attention{display:grid}.mgmt-attention button{display:flex;justify-content:space-between;gap:12px;padding:15px 2px;border:0;border-top:1px solid #34465b;background:transparent;color:#fff;text-align:left}.mgmt-attention button span{color:#ffd21c}
.mgmt-quick>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.mgmt-quick>div button{min-height:58px;padding:10px;border:1px solid #41546a;border-radius:10px;background:#21354d;color:#fff;text-align:left;font-weight:750}
.mgmt-kpis button:hover,.mgmt-quick button:hover,.mgmt-work:hover,.mgmt-attention button:hover{outline:2px solid #ffd21c;outline-offset:-2px}
@media(max-width:900px){.mgmt-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.mgmt-board{grid-template-columns:1fr}.mgmt-quick>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:500px){.mgmt-work{grid-template-columns:minmax(0,1fr) auto}.mgmt-work em{grid-column:1}.mgmt-kpis button{padding:14px;min-height:105px}.mgmt-kpis b{font-size:26px}.mgmt-card{padding:14px}}

/* Existing management sections retain their original controls and data. */
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area{background:#142338;border:1px solid #31445b;border-radius:14px;padding:20px;color:#f5f8fc}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header{border-bottom:1px solid #34465b;padding-bottom:14px;margin-bottom:16px}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header b{color:#fff}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid>button,
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-company-kpis>button{border:1px solid #344b65;border-radius:12px;background:#1d3048;color:#fff}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid>button:hover,
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-company-kpis>button:hover{border-color:#ffd21c}
body.gerencia-mode #gerencia-command-center .gerencia-area-tabs button{border-radius:10px}
@media(max-width:500px){body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area{padding:14px}}

/* Consistent, responsive management screens; operational controls stay in their original modules. */
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header{display:flex;align-items:center;gap:14px}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header>span{display:grid;place-items:center;min-width:48px;min-height:48px;border-radius:12px;background:#263b52;color:#ffcf23;font-weight:800}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header b{display:block;font-size:24px}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-area>header small{display:block;color:#b5c3d1;margin-top:5px}
.mgmt-area-shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:12px;margin:0 0 20px}
.mgmt-area-shortcuts button{display:grid;grid-template-columns:1fr auto;gap:5px;padding:16px;text-align:left;border:1px solid #3a5069;border-radius:12px;background:#1b3048;color:white}
.mgmt-area-shortcuts b{font-size:15px}.mgmt-area-shortcuts small{grid-column:1;color:#b8c6d4}.mgmt-area-shortcuts span{grid-column:2;grid-row:1 / 3;align-self:center;color:#ffd21c}
.mgmt-area-shortcuts button:hover{border-color:#ffd21c}
.mgmt-detail-top{display:flex;justify-content:space-between;align-items:stretch;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.mgmt-detail-top article{display:grid;gap:4px;min-width:220px;padding:16px;border:1px solid #3a5069;border-radius:12px;background:#1c3048}
.mgmt-detail-top article small,.mgmt-detail-top article span{color:#bbc8d5}.mgmt-detail-top article b{font-size:30px}
.mgmt-detail-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mgmt-detail-list{padding:16px;border:1px solid #3a5069;border-radius:12px;background:#102034}
.mgmt-detail-list>header{display:flex;justify-content:space-between;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.mgmt-detail-list h2{margin:0;font-size:18px;color:white}.mgmt-detail-list p{margin:4px 0;color:#b5c3d1}
.mgmt-detail-list label{display:grid;gap:4px;color:#cbd6df}.mgmt-detail-list input{min-width:220px;max-width:100%;border:1px solid #506379;border-radius:8px;background:#172a40;color:white;padding:9px}
@media(max-width:500px){.mgmt-detail-list{padding:12px}.mgmt-detail-list label,.mgmt-detail-list input{width:100%;min-width:0}.mgmt-detail-top article{width:100%}.mgmt-detail-actions>*{flex:1}}

/* Detailed area dashboards */
.mgmt-area-dashboard{display:grid;gap:14px;margin:0 0 20px;min-width:0}
.mgmt-area-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.mgmt-area-metrics article{display:grid;gap:6px;min-width:0;padding:18px;border:1px solid #3b5067;border-radius:12px;background:#1b3048}
.mgmt-area-metrics small,.mgmt-area-metrics span{color:#bdcbd8}
.mgmt-area-metrics b{font-size:clamp(20px,2.4vw,29px);color:#fff;overflow-wrap:anywhere}
.mgmt-area-box{min-width:0;padding:16px;border:1px solid #384f67;border-radius:12px;background:#102034;color:#eaf0f6}
.mgmt-area-box>header{display:flex;align-items:start;justify-content:space-between;gap:12px;margin-bottom:12px}
.mgmt-area-box h2{margin:0;color:#fff;font-size:18px}.mgmt-area-box p{color:#bdcbd8;margin:5px 0}
.mgmt-area-box header button{border:0;background:transparent;color:#ffd21c;font-weight:800;white-space:nowrap}
.mgmt-area-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #354960}
.mgmt-area-row span{min-width:0;display:grid;gap:4px}.mgmt-area-row b{overflow-wrap:anywhere;color:#fff}.mgmt-area-row small{color:#bdcbd8}
.mgmt-area-row em{font-size:12px;font-style:normal;color:#ffe07a;text-align:right}.mgmt-area-empty{padding:10px 0}
.mgmt-area-search{display:grid;gap:5px;margin:10px 0;color:#cbd6df}.mgmt-area-search input{width:100%;padding:10px;border:1px solid #506379;border-radius:8px;background:#172a40;color:white}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:12px}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid>button{min-width:0;min-height:112px;text-align:left}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid>button small{color:#c2cedb}
body.gerencia-mode #gerencia-command-center .gerencia-area-panels .gerencia-module-grid>button span{color:#ffdc55}
body.gerencia-mode #gerencia-command-center .executive-agenda-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
body.gerencia-mode #gerencia-command-center .executive-agenda-summary article,
body.gerencia-mode #gerencia-command-center .executive-daily-section{border:1px solid #3b5067;border-radius:12px;background:#1b3048;color:#fff}
body.gerencia-mode #gerencia-command-center .executive-daily-section{margin-top:14px;padding:18px}
body.gerencia-mode #gerencia-command-center .executive-daily-section h2{color:#fff}
body.gerencia-mode #gerencia-command-center .executive-daily-list>button{border-color:#3b5067;background:#12263b;color:#fff}
@media(max-width:600px){.mgmt-area-metrics{grid-template-columns:1fr 1fr}.mgmt-area-metrics article{padding:13px}.mgmt-area-box>header{flex-wrap:wrap}.mgmt-area-row{align-items:start}body.gerencia-mode #gerencia-command-center .executive-agenda-summary{grid-template-columns:1fr}}

/* Management directory and the selected module share the same workspace. */
#gerencia-command-center #management-directory,
#gerencia-command-center #gerencia-area-overview,
#gerencia-command-center #gerencia-area-panels {min-width:0;align-self:start}
body.gerencia-mode #gerencia-command-center {background:#f2f4f7;color:#182a3e;border-color:#d6dde4}
body.gerencia-mode #gerencia-command-center>header :is(h2,p,small),
#gerencia-command-center .gerencia-hub-search>label,#gerencia-command-center #gerencia-search-status {color:#27384a}
body.gerencia-mode #gerencia-command-center .gerencia-workspace {display:grid!important;grid-template-columns:minmax(145px,.8fr) minmax(160px,.95fr) minmax(0,2.4fr)!important;gap:12px!important;align-items:start}
#gerencia-command-center #management-directory,
body.gerencia-mode #gerencia-command-center #gerencia-area-overview {display:grid!important;grid-template-columns:minmax(0,1fr)!important;position:static;background:white;border:1px solid #d6dde4;border-radius:12px;padding:12px;gap:4px!important}
#management-directory h3,#gerencia-area-overview [data-gerencia-hub-group]>header h3 {margin:0 0 10px;font-size:19px;color:#142539}
#management-directory button,#gerencia-command-center #gerencia-area-overview .gerencia-hub-links>button {display:block;text-align:left;background:white;border:0;border-bottom:1px solid #e1e6eb;border-radius:4px;color:#17283b;min-height:42px;width:100%;padding:8px;font-size:14px;line-height:1.35}
#management-directory button[aria-pressed=true],#gerencia-command-center #gerencia-area-overview .gerencia-hub-links>button.active {background:#ffd323;color:#142335}
#management-directory button:focus-visible,#gerencia-area-overview button:focus-visible {outline:2px solid #176a9b;outline-offset:1px}
#gerencia-command-center #gerencia-area-overview .gerencia-hub-group {background:transparent;padding:0;border:0}
#gerencia-command-center #gerencia-area-overview .gerencia-hub-group:not([data-current-group]) {display:none!important}
#gerencia-command-center #gerencia-area-overview .gerencia-hub-links {display:grid;grid-template-columns:1fr}
#gerencia-area-overview .gerencia-hub-links>button :is(small,span),#gerencia-area-overview .gerencia-hub-group>header :is(p,span) {display:none!important}
body.gerencia-mode #gerencia-command-center #gerencia-area-panels,#gerencia-command-center #gerencia-redesign {grid-column:3!important;grid-row:1}
#gerencia-command-center #gerencia-area-tabs {display:none!important}
#gerencia-command-center #gerencia-area-panels:has([data-gerencia-area-panel="partners"]:not(.hidden)) .gerencia-panel-navigation {margin-bottom:6px}
body.gerencia-mode #gerencia-command-center .gerencia-area[data-gerencia-area-panel="partners"] {background:white;color:#192b3e;border-color:#d5dde5;padding:14px}
body.gerencia-mode #gerencia-command-center .gerencia-area[data-gerencia-area-panel="partners"]>header :is(b,small) {color:#223348}
[data-gerencia-area-panel="partners"]>header>span {display:none!important}
#company-partner-cards {display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
#company-partner-cards .company-partner-card {background:#fff;border:1px solid #cbd5df;border-radius:10px;padding:12px;color:#192b3e}
#company-partner-cards header small {display:none}
#company-partner-cards h3 {color:#112237;font-size:19px}
#company-partner-cards article>div {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:6px 0}
#company-partner-cards article>div>span {display:grid;align-content:start;color:#435467;background:none;border:0;border-left:1px solid #dce1e6;border-radius:0;padding:2px 6px;font-size:12px}
#company-partner-cards span b {color:#13283d;font-size:clamp(14px,1.3vw,20px);overflow-wrap:anywhere}
#company-partner-cards span.due b {background:#ffda46;color:#152435;border-radius:4px;width:fit-content;padding:0 3px}
#company-partner-cards footer {display:flex;gap:4px}
#company-partner-cards footer button {flex:1;background:#edf1f5;color:#1b3249;border:0;min-height:36px;border-radius:5px}
[data-gerencia-area-panel="partners"] :is(.partner-form,.partner-movement-section,.partner-ledger-section,.partner-capital-kpis article) {color:#f1f5f8}
#company-partner-count {color:#36475b}
@media(max-width:1030px){
 body.gerencia-mode #gerencia-command-center .gerencia-workspace {grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 body.gerencia-mode #gerencia-command-center #gerencia-area-panels,#gerencia-command-center #gerencia-redesign {grid-column:1/-1!important;grid-row:auto}
 #management-directory button {display:none}
 #management-directory select {width:100%;min-width:0}
}
@media(min-width:1031px){#management-directory select{display:none}}
@media(max-width:600px){
 body.gerencia-mode #gerencia-command-center .gerencia-workspace {grid-template-columns:minmax(0,1fr)!important}
 #company-partner-cards article>div {grid-template-columns:repeat(2,minmax(0,1fr))}
 #gerencia-command-center #gerencia-area-overview .gerencia-hub-links {grid-template-columns:repeat(2,minmax(0,1fr))}
 #gerencia-command-center #gerencia-area-overview .gerencia-hub-links>button {min-height:36px}
}

#gerencia-command-center .management-tools {margin:0 0 8px;color:#21374e}
#gerencia-command-center .management-tools summary {width:fit-content;cursor:pointer;font-size:13px;font-weight:650;padding:5px}
body.gerencia-mode #gerencia-command-center .gerencia-hub-search {display:grid!important}
body.gerencia-mode #gerencia-command-center .gerencia-hub-search input {background:white;color:#1b3046;border-color:#a9b5c2}
