
/* RITMO Gestão — layout corporativo isolado da aplicação Campo */
#gestao{max-width:1150px;margin:0 auto}.mg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}.mg-head h1{margin:0 0 9px}.mg-head .eyebrow{margin-bottom:10px}
.mg-wrap{display:grid;grid-template-columns:205px minmax(0,1fr);gap:22px;align-items:start}.mg-sidebar{background:#fff;border:1px solid var(--line);border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:5px;position:sticky;top:20px}
.mg-sidebar button{display:flex;align-items:center;justify-content:flex-start;background:transparent;border-color:transparent;min-height:42px;color:#516985;font-size:13px;text-align:left;padding:12px;border-radius:10px;font-weight:650;width:100%}
.mg-sidebar button:hover{background:#f2f6fc}.mg-sidebar button.active{background:#e8f0fd;color:#082e79;border-color:#d7e7ff}
.mg-sidebar .mg-lock{margin-top:18px;border-top:1px solid var(--line);padding-top:12px}.mg-main{min-width:0}
.mg-breadcrumb{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}.mg-breadcrumb h2{font-size:23px}.mg-breadcrumb-controls{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.mg-breadcrumb input{font:inherit;color:var(--ink);background:#fff;border:1px solid #d6e0ed;border-radius:8px;padding:8px 10px;min-height:40px;max-width:155px}.mg-breadcrumb button{font-size:12px;min-height:40px;padding:8px 12px}
.mg-panel{border:1px solid var(--line);background:#fff;border-radius:15px;padding:23px;margin-bottom:18px;overflow:hidden}.mg-panel h3{margin:0 0 6px;font-size:16px}.mg-panel p{font-size:13px}
.mg-section-head{margin-bottom:18px}.mg-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:18px}
.mg-metric{min-width:0;border:1px solid var(--line);border-radius:13px;background:#fff;padding:19px;display:flex;flex-direction:column;gap:9px}
.mg-metric>span{font-size:12px;font-weight:700;color:#61748c}.mg-metric strong{font-size:clamp(18px,2vw,25px);color:#0a3b73;line-height:1.25;letter-spacing:-.03em;overflow-wrap:anywhere}
.mg-metric small{font-size:11px;color:#7b8ca0;line-height:1.5}.mg-info{padding:17px;background:#f5f8fd;border:1px solid #e1eaf7;border-radius:12px}
.mg-info strong{display:block;font-size:13px;margin-bottom:8px}.mg-info p{line-height:1.6}
.mg-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.mg-summary div{display:flex;flex-direction:column;gap:7px;border-right:1px solid var(--line);padding:5px 12px}.mg-summary div:last-child{border-right:0}
.mg-summary span{font-size:12px;color:#70849a}.mg-summary strong{font-size:23px;color:#0a3b73}
.mg-scroll{overflow:auto;max-width:100%}table{width:100%;border-collapse:collapse;font-size:12px;text-align:left;min-width:615px}th{color:#60758b;font-weight:800;font-size:11px;background:#f6f8fc;text-transform:uppercase;letter-spacing:.02em}th,td{padding:13px 12px;border-bottom:1px solid #e8eef6;white-space:nowrap}td{color:#2b435d}tbody tr:last-child td{border-bottom:0}
.mg-empty{font-size:13px;color:#697d93;background:#f7f9fc;border:1px dashed #d9e3f0;border-radius:11px;padding:18px}.mg-view-state{padding:24px;background:#fff;border:1px solid var(--line);border-radius:15px}
.mg-view-state h3{font-size:18px;margin:0 0 10px}.mg-view-state>p{margin-bottom:15px;font-size:14px}.mg-gate{max-width:470px}.mg-gate form{display:flex;flex-direction:column;gap:10px;margin:16px 0}.mg-gate label{font-size:13px;font-weight:700}.mg-gate input{font:inherit;letter-spacing:.28em;font-size:19px;padding:12px 14px;border:1px solid #bdcfe3;border-radius:9px;width:100%;max-width:250px}.mg-gate button{align-self:flex-start}.mg-gate .mg-pin-message{font-size:12px;color:#8c3333;margin-top:8px}.mg-warning{background:#fff6e9;border:1px solid #f5deb5;color:#805a18;border-radius:10px;padding:12px;margin-bottom:15px;font-size:13px}
.mg-gate-link{margin-top:12px}.mg-button-muted{background:#fff;color:#0b3a78}.mg-button-muted:hover{background:#eef4fb}
@media(max-width:800px){.mg-wrap{grid-template-columns:1fr}.mg-sidebar{position:static;display:flex;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;white-space:nowrap;padding:8px}.mg-sidebar button{width:auto;flex-shrink:0}.mg-sidebar .mg-lock{margin:0;border:0;padding:0}.mg-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-panel{padding:18px}}
@media(max-width:520px){.mg-head{flex-direction:column}.mg-breadcrumb{flex-direction:column;align-items:flex-start}.mg-metrics{grid-template-columns:1fr 1fr;gap:8px}.mg-metric{padding:14px}.mg-metric strong{font-size:18px}.mg-summary{grid-template-columns:1fr}.mg-summary div{border-right:0;border-bottom:1px solid var(--line);padding:10px 0}.mg-summary div:last-child{border:0}}

/* CRM Gestão: formulários e cadastros (mobile-first, sem sobrepor o Campo) */
.crm-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:16px}
.crm-bar p{font-size:13px}.crm-bar button{flex-shrink:0}
.crm-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.mg-field{display:flex;flex-direction:column;gap:7px;min-width:0;color:#23405e;font-size:12px;font-weight:700}
.mg-field-wide{grid-column:1/-1}
.mg-field input,.mg-field select,.mg-field textarea{font:inherit;font-size:14px;color:var(--ink);border:1px solid #cbd7e5;border-radius:9px;background:white;min-height:43px;padding:10px;width:100%;letter-spacing:normal;resize:vertical}
.mg-field textarea{min-height:95px}.mg-field input:focus,.mg-field select:focus,.mg-field textarea:focus{outline:3px solid #98c2ff;outline-offset:1px}
.crm-form-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}
.crm-error{color:#9c3131;font-size:12px;margin-top:10px;min-height:16px}
.crm-help{font-size:12px!important;margin-top:15px;background:#eff4fb;padding:13px;border-radius:10px}
.crm-mini{font-size:12px;min-height:30px;padding:6px 10px;background:#fff;color:#082e79;border:1px solid #cad9ea;white-space:nowrap}
.crm-mini:hover{background:#eff5fb}.crm-sub{display:block;color:#718197;font-size:11px;line-height:1.5;margin-top:4px}
.crm-notice{border:1px solid #bddfc9;background:#f0faf3;border-radius:10px;color:#21603a;padding:12px;margin-bottom:15px;font-size:13px}
@media(max-width:600px){.crm-grid{grid-template-columns:1fr}.crm-bar{align-items:flex-start;flex-direction:column}.crm-bar button{width:100%}}

/* Etapa 1A: classificações e centros de custo (isolado do Campo). */
.cls-toolbar{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;margin:0 0 18px;flex-wrap:wrap}
.cls-toolbar .cls-search{flex:1;min-width:170px;max-width:360px}
.cls-toolbar button{min-height:42px}
.cls-toolbar button:disabled,.cls-toolbar .crm-mini:disabled{cursor:not-allowed;opacity:.58}
.cls-banner{padding:14px 17px;margin-bottom:17px;font-size:13px!important;line-height:1.55;background:#f3f7fd;border:1px solid #dae6f6;border-radius:12px;color:#274a70}
.cls-status{display:inline-block;padding:5px 10px;border-radius:99px;font-size:11px;font-weight:700}
.cls-active{background:#e8f6ee;color:#245b3b}.cls-inactive{background:#f2f3f6;color:#667387}
.cls-success,.cls-error{font-size:13px!important;padding:12px;border-radius:9px;margin:12px 0}
.cls-success{color:#27613e;background:#eef8f0}.cls-error{color:#8c3030;background:#fcefed}
@media(max-width:650px){.cls-toolbar{flex-direction:column;align-items:stretch}.cls-toolbar .cls-search{width:100%;max-width:none}.cls-toolbar button{width:100%}}


/* Gestão 1E.4: conferência local de CSV. Nenhum estilo da RITMO Campo é alterado. */
#gestao .mg-recon-notice{padding:13px 15px;border:1px solid #cbd9ea;border-radius:10px;background:#f1f6fc;color:#24446a;font-size:13px;line-height:1.5;margin-bottom:18px}
#gestao .mg-recon-notice strong{display:block;color:var(--rt-navy,#061b43);margin-bottom:3px}
#gestao .mg-recon-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,210px);gap:12px;align-items:end;margin-bottom:15px}
#gestao .mg-recon-controls .mg-field{min-width:0;margin:0}
#gestao .mg-recon-controls .mg-field span{display:block;font-weight:700;color:#173250;font-size:12px;margin-bottom:7px}
#gestao .mg-recon-controls input,#gestao .mg-recon-controls select,#gestao .mg-recon-search input{width:100%;min-width:0;min-height:43px;border:1px solid #cbd7e5;border-radius:9px;background:white;color:#173250;padding:9px 11px;font:inherit;font-size:13px}
#gestao .mg-recon-controls input:focus-visible,#gestao .mg-recon-controls select:focus-visible,#gestao .mg-recon-search input:focus-visible{outline:3px solid #8fbbfc;outline-offset:2px}
#gestao .mg-recon-buttons{grid-column:1/-1;display:flex;gap:9px;flex-wrap:wrap}
#gestao .mg-recon-buttons button{min-height:42px}
#gestao .mg-recon-buttons button:disabled,#gestao .mg-recon-pages button:disabled{opacity:.55;cursor:not-allowed}
#gestao .mg-recon-feedback{font-size:12px;line-height:1.5;min-height:18px;color:#355676;margin:0 0 14px}
#gestao .mg-recon-empty{padding:23px;border:1px dashed #b9cce1;border-radius:11px;text-align:center;background:#f8fbff}
#gestao .mg-recon-empty strong{display:block;margin-bottom:7px}
#gestao .mg-recon-file{display:flex;align-items:flex-start;flex-direction:column;gap:5px;margin:3px 0 14px;overflow-wrap:anywhere}
#gestao .mg-recon-file strong{font-size:13px;color:#173250}
#gestao .mg-recon-file span{font-size:11px;color:#61758e}
#gestao .mg-recon-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:15px 0}
#gestao .mg-recon-summary>div{border:1px solid #e1e8f1;background:#fff;border-radius:10px;padding:13px;min-width:0}
#gestao .mg-recon-summary span{display:block;font-size:11px;color:#61758e;margin-bottom:7px}
#gestao .mg-recon-summary strong{font-size:16px;overflow-wrap:anywhere;color:#173250}
#gestao .mg-recon-search{margin:15px 0 12px}
#gestao .mg-recon-search label{display:block;font-weight:700;color:#173250;font-size:12px;margin-bottom:7px}
#gestao .mg-recon-pending{display:inline-flex;background:#f1f3f7;color:#53677f;border-radius:7px;padding:5px 8px;font-size:11px;font-weight:700;white-space:nowrap}
#gestao .mg-recon-pages{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:12px}
#gestao .mg-recon-pages>span{font-size:12px;color:#61758e}
#gestao .mg-recon-pages>div{display:flex;gap:7px}
#gestao .mg-recon-pages button{font-size:12px;min-height:38px;padding:8px 12px}
#gestao .mg-recon-disclaimer{font-size:12px;color:#61758e;margin-top:20px;line-height:1.6}
@media(max-width:760px){#gestao .mg-recon-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:570px){#gestao .mg-recon-controls{grid-template-columns:minmax(0,1fr)}#gestao .mg-recon-buttons button{flex:1}#gestao .mg-recon-pages>div{width:100%}#gestao .mg-recon-pages>div button{flex:1}}


/* 5A — simulação local de rentabilidade, identidade RITMO oficial preservada. */
#gestao .mg-sim-notice{padding:14px 16px;border:1px solid #cbd9ea;border-radius:12px;background:#f1f6fc;color:#24446a;font-size:13px;line-height:1.5;margin-bottom:16px}
#gestao .mg-sim-notice strong{display:block;color:#082e79;font-weight:750;margin-bottom:4px}
#gestao .mg-sim-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:8px 0 18px}
#gestao .mg-sim-field{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;font-weight:700;color:#173250}
#gestao .mg-sim-field input{width:100%;min-width:0;min-height:43px;border:1px solid #cbd7e5;border-radius:9px;background:#fff;color:#173250;padding:9px 12px;font:inherit;font-size:14px}
#gestao .mg-sim-field input:focus-visible,#gestao .mg-sim-check input:focus-visible{outline:3px solid #91bafd;outline-offset:2px}
#gestao .mg-sim-check{display:flex;align-items:flex-start;gap:10px;padding:7px 0;font-size:13px;color:#355676;line-height:1.5}
#gestao .mg-sim-check input{width:17px;height:17px;flex:0 0 17px;margin-top:2px;accent-color:#082e79}
#gestao .mg-sim-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:15px}
#gestao .mg-sim-actions button{min-height:42px}
#gestao .mg-sim-feedback{color:#5e7084;font-size:12px;line-height:1.5;min-height:20px;margin-top:12px}
#gestao .mg-sim-results{margin-top:21px;border-top:1px solid #e1e8f1;padding-top:18px}
#gestao .mg-sim-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
#gestao .mg-sim-kpi{min-width:0;padding:13px;border:1px solid #e1e8f1;border-radius:11px;background:#fff}
#gestao .mg-sim-kpi span{display:block;font-size:11px;line-height:1.35;color:#61758e;margin-bottom:6px}
#gestao .mg-sim-kpi strong{display:block;color:#173250;font-size:17px;font-weight:750;overflow-wrap:anywhere}
#gestao .mg-sim-result-ready{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px}
#gestao .mg-sim-result-ready .mg-sim-kpi{background:#edf3fc;border-color:#cbdcee}
#gestao .mg-sim-result-ready .mg-sim-kpi strong{color:#082e79}
#gestao .mg-sim-incomplete{border:1px solid #d7dfe9;border-radius:11px;padding:15px;margin-top:12px;color:#355676;font-size:13px;background:#f7f9fc}
#gestao .mg-sim-incomplete strong{display:block;color:#173250;font-size:14px}
#gestao .mg-sim-incomplete p{margin:6px 0}
#gestao .mg-sim-incomplete ul{margin:8px 0 0;padding-left:20px}
#gestao .mg-sim-caution{font-size:12px;color:#647690;line-height:1.6;margin-top:12px}
@media(max-width:650px){#gestao .mg-sim-grid,#gestao .mg-sim-stats,#gestao .mg-sim-result-ready{grid-template-columns:1fr}#gestao .mg-sim-actions button{flex:1 1 100%}}


/* 0E — auditoria read-only do livro financeiro, sem novos componentes de escrita */
#gestao .mg-la-head{padding:14px 16px;border:1px solid #cbd9ea;border-radius:12px;background:#f1f6fc;margin-bottom:16px;color:#24446a}
#gestao .mg-la-head strong{display:block;font-size:15px;font-weight:750;color:#082e79}
#gestao .mg-la-head p{font-size:12px;line-height:1.6;margin:7px 0 0}
#gestao .mg-la-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
#gestao .mg-la-stats div{border:1px solid #dbe5f0;background:#fff;border-radius:10px;padding:12px}
#gestao .mg-la-stats span{display:block;font-size:12px;color:#5e7390;line-height:1.4}
#gestao .mg-la-stats strong{display:block;font-size:23px;color:#082e79;margin-top:5px}
#gestao .mg-la-hint{font-size:12px;color:#667990;line-height:1.6;margin-top:12px}
#gestao .mg-la-notice{padding:15px;border:1px solid #dde5ee;border-radius:11px;background:#f8fafc;color:#405775;font-size:13px;line-height:1.6}
@media(max-width:650px){#gestao .mg-la-stats{grid-template-columns:1fr}}
