/* Orizon Gestão V6.3.12 · Design System Orizon 1.0
   Camada única de consolidação visual. Não altera regras de negócio. */
:root{
  --og-bg:#f4f7f5;--og-surface:#ffffff;--og-surface-soft:#f8fbf9;--og-ink:#102119;--og-muted:#607168;
  --og-line:#dce6e0;--og-line-strong:#c7d7cf;--og-green:#087047;--og-green-strong:#055b39;--og-green-soft:#eaf6ef;
  --og-gold:#d5ad3d;--og-gold-soft:#fff7df;--og-danger:#a83a31;--og-danger-soft:#fff0ee;--og-warning:#8b620c;--og-warning-soft:#fff6df;
  --og-info:#315e9b;--og-info-soft:#edf4ff;--og-radius-sm:8px;--og-radius-md:12px;--og-radius-lg:16px;--og-radius-xl:20px;
  --og-shadow-1:0 4px 14px rgba(14,35,24,.05);--og-shadow-2:0 12px 32px rgba(14,35,24,.08);--og-shadow-3:0 24px 64px rgba(5,22,14,.16);
  --og-control:44px;--og-sidebar:272px;--og-content:1520px;--og-mobile-nav:76px;
}
html{scroll-behavior:smooth}body{background:var(--og-bg);color:var(--og-ink);line-height:1.5;font-size:14px}
main{max-width:var(--og-content);padding:28px 36px 72px}.shell{margin-left:var(--og-sidebar)}
.sidebar{width:var(--og-sidebar);padding:18px 16px 20px}.sidebar nav{display:block;padding-right:5px}.brand-wrap{margin-bottom:12px}.brand-logo{max-width:184px!important;height:124px!important}.product-name{font-size:10px;letter-spacing:4px!important;margin-top:-1px!important}
.nav-group{display:grid;gap:4px;margin:0 0 13px}.nav-group-label{padding:5px 12px 4px;color:#93a69b;font-size:9px;font-weight:850;letter-spacing:.115em;text-transform:uppercase}.nav{width:100%;min-height:40px;padding:9px 11px;border-radius:var(--og-radius-md);gap:10px;font-size:12.5px}.nav .ico{width:21px;min-width:21px;height:21px;display:grid;place-items:center}.nav .ico svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav:hover{transform:none;background:rgba(255,255,255,.075)}.nav.active{box-shadow:inset 3px 0 var(--og-gold),0 7px 18px rgba(0,92,55,.18)}
.topbar{min-height:82px;height:auto;padding:12px 30px;margin:0 18px;border:1px solid var(--og-line);border-top:0;border-radius:0 0 var(--og-radius-lg) var(--og-radius-lg);box-shadow:var(--og-shadow-1)}
.top-actions{gap:9px}.top-actions .mini-link{white-space:nowrap}.icon-btn{width:42px;height:42px;border:1px solid var(--og-line);border-radius:var(--og-radius-md);display:grid;place-items:center;background:#fff;cursor:pointer;font-size:0}.icon-btn::before{content:' ';width:18px;height:18px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9M10 21h4'/%3E%3C/svg%3E") center/contain no-repeat}.avatar{width:40px;height:40px}
.page-header{margin:5px 0 20px;gap:18px;min-height:64px}.page-header>div:first-child{min-width:0}.page-header h1{font-size:clamp(25px,2.1vw,31px);font-weight:840;letter-spacing:-.035em}.page-header p{font-size:13px;max-width:920px;line-height:1.5}.page-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.page-header-context{display:inline-flex;align-items:center;min-height:36px;padding:7px 11px;border:1px solid var(--og-line);border-radius:999px;background:var(--og-surface-soft);color:#365648;font-size:11px;font-weight:750}
.primary,.secondary,.mini,.mini-link,.whatsapp,.danger-outline{border-radius:var(--og-radius-md);min-height:var(--og-control);padding:9px 14px;font-weight:740;transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}.mini,.mini-link{min-height:36px;padding:7px 10px;font-size:12px}.primary{background:linear-gradient(180deg,#0a7c4e,var(--og-green-strong));border-color:var(--og-green-strong);box-shadow:0 6px 16px rgba(8,112,71,.16)}.primary:hover{filter:none;background:#075f3d;transform:translateY(-1px)}.secondary{border-color:var(--og-line-strong);color:#174b34;box-shadow:none}.secondary:hover{background:var(--og-green-soft);border-color:#9fc5b2}
.card,.statement-card,.admin-card,.admin-metric,.chart-card,.statement{border-radius:var(--og-radius-lg);border-color:var(--og-line);box-shadow:var(--og-shadow-1)}.card{padding:20px}.metric .label,.hint,.muted{color:var(--og-muted)}.metric .label{font-size:12px}.metric .value{font-size:27px}
.form-grid{grid-template-columns:repeat(12,minmax(0,1fr));gap:14px}.form-grid>.field{grid-column:span 4}.form-grid>.field.span2{grid-column:span 8}.form-grid>.field.span3{grid-column:1/-1}.field{gap:6px}.field label,.filters label,.admin-fields label{font-size:12px;color:#455d51;font-weight:680}select,input,textarea,.filters input,.filters select,.admin-fields input,.admin-fields select,.admin-fields textarea{min-height:var(--og-control);border-color:var(--og-line-strong);border-radius:var(--og-radius-md);padding:10px 12px;font-size:14px;background:#fff}textarea{min-height:86px}select:focus,input:focus,textarea:focus{border-color:#6aaa8a;box-shadow:0 0 0 3px rgba(8,112,71,.11)}
.table-wrap{border:1px solid var(--og-line);border-radius:var(--og-radius-md);background:#fff;overflow:auto;box-shadow:none}.table-wrap table{margin:0}table{font-size:12.5px}th{position:sticky;top:0;z-index:1;background:#f3f7f5;color:#486157;font-size:11px;letter-spacing:.035em;padding:11px 10px}td{padding:11px 10px}tbody tr:hover{background:#f9fcfa}.numeric,td[data-type="number"]{font-variant-numeric:tabular-nums;text-align:right}.clickable-row{cursor:pointer}
.badge,.status-pill,.pending-pill,.free-pill{border-radius:999px;padding:5px 9px;font-size:11px;font-weight:780}.badge,.status-pill.free-pill,.free-pill{background:var(--og-green-soft);color:#09633f}.badge.warn,.pending-pill{background:var(--og-warning-soft);color:var(--og-warning)}.badge.danger,.danger{background:var(--og-danger-soft)!important;color:var(--og-danger)!important}.badge.blue{background:var(--og-info-soft);color:var(--og-info)}.badge.gray{background:#eef2f0;color:#5e6e66}
.empty{position:relative;padding:36px 24px 30px;border:1px dashed #cbd9d2;border-radius:var(--og-radius-lg);background:linear-gradient(180deg,#fbfdfc,#f6f9f7);color:var(--og-muted);font-size:13px}.empty::before{content:'—';display:grid;place-items:center;margin:0 auto 10px;width:38px;height:38px;border-radius:12px;background:#eaf2ee;color:#517062;font-size:20px;font-weight:800}.success,.note,.danger-note,.activation,.finance-note{border-radius:var(--og-radius-md);font-size:12.5px;line-height:1.5}
.modal-backdrop,.admin-modal{backdrop-filter:blur(4px)}.modal-card,.admin-form{border-radius:var(--og-radius-xl);box-shadow:var(--og-shadow-3);border:1px solid rgba(255,255,255,.4)}
#app[aria-busy="true"]{position:relative;min-height:220px;pointer-events:none}#app[aria-busy="true"]>*{opacity:.32}#app[aria-busy="true"]::before{content:'Carregando módulo…';position:absolute;z-index:8;top:14px;left:0;right:0;height:82px;border:1px solid var(--og-line);border-radius:var(--og-radius-lg);display:flex;align-items:flex-end;padding:16px 18px;color:#587066;font-size:12px;font-weight:750;background:linear-gradient(90deg,#edf3ef 25%,#f7faf8 37%,#edf3ef 63%);background-size:400% 100%;animation:ogSkeleton 1.35s ease infinite;box-shadow:var(--og-shadow-1)}@keyframes ogSkeleton{0%{background-position:100% 0}100%{background-position:0 0}}
.module-identity,.farm-module-head{border-radius:var(--og-radius-lg)}
.collapsible-head strong{font-size:12px}.filter-card-compact,.report-filter-panel,.budget-filter-card,.contract-filter-card,.farm-area-filter{border-color:var(--og-line)}
/* Navegação móvel: cinco destinos primários; módulos secundários ficam no drawer. */
.mobile-primary-nav,.mobile-nav-drawer{display:none}.mobile-primary-nav{position:fixed;left:8px;right:8px;bottom:8px;z-index:68;height:calc(var(--og-mobile-nav) + env(safe-area-inset-bottom));padding:7px 7px calc(7px + env(safe-area-inset-bottom));grid-template-columns:repeat(5,1fr);gap:3px;border:1px solid rgba(205,219,211,.9);border-radius:18px;background:rgba(255,255,255,.96);box-shadow:0 18px 48px rgba(4,22,13,.22);backdrop-filter:blur(16px)}.mobile-primary-nav button{border:0;background:transparent;min-width:0;border-radius:12px;color:#52665c;display:grid;place-items:center;align-content:center;gap:3px;padding:5px 2px;font:inherit;font-size:9.5px;font-weight:760}.mobile-primary-nav svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.mobile-primary-nav button.active{color:var(--og-green);background:var(--og-green-soft)}
.mobile-nav-drawer{position:fixed;inset:0;z-index:67;background:rgba(2,12,7,.45);align-items:flex-end;padding:14px 12px calc(var(--og-mobile-nav) + 18px + env(safe-area-inset-bottom));backdrop-filter:blur(3px)}.mobile-nav-drawer:not([hidden]){display:flex}body.mobile-nav-open .orizon-ai-assistant{display:none!important}.mobile-nav-sheet{width:100%;max-height:min(72dvh,680px);overflow:auto;border:1px solid var(--og-line);border-radius:20px;background:#fff;box-shadow:var(--og-shadow-3);padding:14px}.mobile-nav-sheet-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:4px 4px 10px}.mobile-nav-sheet-head h2{margin:0;font-size:18px}.mobile-nav-list{display:grid;grid-template-columns:1fr 1fr;gap:7px}.mobile-nav-item{min-height:52px;border:1px solid var(--og-line);border-radius:13px;background:#fff;color:#173b2b;display:grid;grid-template-columns:28px 1fr;align-items:center;gap:8px;padding:10px;text-align:left;font:inherit;font-weight:720}.mobile-nav-item.active{border-color:#8dc2a5;background:var(--og-green-soft)}.mobile-nav-item svg{width:20px;height:20px;fill:none;stroke:var(--og-green);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Administração passa a usar o mesmo shell visual da plataforma. */
.admin-shell{max-width:var(--og-content)!important;padding:24px 30px 64px!important}.admin-head{position:relative;padding:16px 18px;border:1px solid var(--og-line);border-radius:var(--og-radius-lg);background:#fff;box-shadow:var(--og-shadow-1)}.admin-brand img{width:116px!important}.admin-section-nav{position:sticky;top:8px;z-index:10;display:flex;gap:6px;overflow-x:auto;margin:14px 0;padding:7px;border:1px solid var(--og-line);border-radius:14px;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);box-shadow:var(--og-shadow-1)}.admin-section-nav a{white-space:nowrap;text-decoration:none;color:#355648;font-size:12px;font-weight:760;padding:8px 11px;border-radius:9px}.admin-section-nav a:hover,.admin-section-nav a:focus-visible{background:var(--og-green-soft);color:var(--og-green)}.admin-card{scroll-margin-top:76px}.admin-grid{gap:12px!important}.admin-table{border:1px solid var(--og-line);border-radius:12px;overflow:auto}.admin-table th{background:#f3f7f5!important}.admin-toolbar h2{margin:0 0 4px}.head-actions{gap:6px!important}.admin-head .head-actions .primary,.admin-head .head-actions .secondary{min-height:38px;padding:7px 10px;font-size:11.5px}
/* Portal Contábil e shells institucionais */
.accounting-portal-body .accounting-sidebar .product-name{letter-spacing:2.5px!important}.accounting-portal-body .side-footer b{letter-spacing:.08em}.institutional-shell{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 0 0,rgba(8,112,71,.12),transparent 32%),linear-gradient(145deg,#07130e,#0b2117)}.institutional-card{width:min(720px,100%);padding:32px;border:1px solid #315843;border-radius:var(--og-radius-xl);background:#0b281f;color:#f4faf6;box-shadow:var(--og-shadow-3)}.institutional-card .legal-brand{border:0;margin:0 0 16px}.institutional-card p{color:#c8d8cf}
/* Login: informação comercial continua disponível, mas o acesso vira a ação dominante. */
.strategic-login .landing-right{box-shadow:var(--og-shadow-3)}.strategic-login .authority-section,.strategic-login .value-panels{opacity:.92}.strategic-login .access-panel-head h2{font-size:27px}.strategic-login .stack-form .primary{min-height:48px}
@media(max-width:1100px){:root{--og-sidebar:92px}.sidebar{width:92px;padding:14px 9px}.shell{margin-left:92px}.sidebar .brand-logo{width:68px!important;height:68px!important}.nav-group-label,.nav .label,.product-name,.help-card,.side-footer{display:none!important}.nav-group{gap:5px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid rgba(255,255,255,.08)}.nav{justify-content:center;padding:9px}.nav .ico{width:24px;height:24px}.topbar{margin:0 10px;padding:10px 16px}main{padding-left:24px;padding-right:24px}.form-grid>.field{grid-column:span 6}.form-grid>.field.span2{grid-column:1/-1}}
@media(max-width:700px){
  body{padding-bottom:calc(var(--og-mobile-nav) + 16px + env(safe-area-inset-bottom))}.sidebar{display:none!important}.shell{margin-left:0!important}.mobile-primary-nav{display:grid}.mobile-brand-banner{display:flex!important}.topbar{margin:8px 8px 0!important;position:sticky;top:8px;min-height:0;padding:10px 12px!important;flex-wrap:wrap;gap:8px}.top-actions{width:100%;justify-content:flex-end;gap:6px}.top-actions .mini-link[title="Portal da Contabilidade"],.top-actions .user-meta{display:none}.top-actions .avatar{width:36px;height:36px}.icon-btn{width:38px;height:38px}.company-switch{width:100%}main{padding:20px 14px calc(var(--og-mobile-nav) + 42px + env(safe-area-inset-bottom));max-width:none}.page-header{align-items:stretch!important;flex-direction:column;gap:10px}.page-header-actions{justify-content:stretch}.page-header-actions>*{flex:1 1 auto}.page-header #pagePrimaryAction:not([hidden]){width:auto!important}.form-grid{grid-template-columns:1fr}.form-grid>.field,.form-grid>.field.span2,.form-grid>.field.span3{grid-column:auto}.grid2,.grid3,.grid4,.financial-kpis{grid-template-columns:1fr}.table-wrap{margin-left:-2px;margin-right:-2px}.mobile-nav-list{grid-template-columns:1fr}.orizon-ai-assistant{right:14px!important;bottom:calc(var(--og-mobile-nav) + 22px + env(safe-area-inset-bottom))!important}.orizon-ai-panel{inset:auto 8px calc(var(--og-mobile-nav) + 14px + env(safe-area-inset-bottom)) 8px!important;max-height:calc(100dvh - var(--og-mobile-nav) - 36px)!important}.admin-shell{padding:12px 10px calc(var(--og-mobile-nav) + 24px)!important}.admin-head{align-items:flex-start;flex-direction:column}.admin-section-nav{top:6px}.admin-grid,.filters,.admin-fields,.statement-grid,.charts,.ofx-grid{grid-template-columns:1fr!important}.admin-table{display:block;overflow:auto}.admin-brand img{width:90px!important}}
@media(prefers-reduced-motion:reduce){#app[aria-busy="true"]::before{animation:none}}

/* V6.3.12 · foco, ações e diálogos estruturados */
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid rgba(8,112,71,.28);outline-offset:2px}
button.primary,button.secondary,button.mini,button.danger-outline{display:inline-flex;align-items:center;justify-content:center;gap:8px}.page-header-actions .primary svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.profile-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.admin-structured-modal{z-index:90}.admin-structured-modal .admin-form{width:min(720px,100%)}.admin-structured-modal .admin-fields{margin-top:16px}.admin-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--og-line)}@media(max-width:700px){.admin-dialog-actions>*{flex:1}.admin-structured-modal{padding:10px}.admin-structured-modal .admin-form{max-height:calc(100dvh - 20px)}}
/* Diálogos padronizados substituem prompt/confirm nativos nos fluxos principais. */
.og-dialog-backdrop{position:fixed;inset:0;z-index:88;display:grid;place-items:center;padding:18px;background:rgba(3,17,10,.72);backdrop-filter:blur(5px)}
.og-dialog-card{width:min(680px,100%);max-height:calc(100dvh - 36px);overflow:auto;background:#fff;padding:22px}
.og-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}.og-dialog-head h2{margin:0;font-size:21px;letter-spacing:-.02em}.og-dialog-head p{margin:5px 0 0;max-width:520px}.og-dialog-fields{margin-top:2px}.og-dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px;padding-top:14px;border-top:1px solid var(--og-line)}
@media(max-width:700px){.og-dialog-backdrop{padding:10px}.og-dialog-card{max-height:calc(100dvh - 20px);padding:18px}.og-dialog-actions>*{flex:1}.og-dialog-head .secondary{min-width:88px}}
/* Iconografia operacional usa o mesmo traço SVG do sistema, sem glifos/emoji. */
.settings-card>span,.farm-operation-links .farm-operation-icon,.farm-asset-icon{display:grid;place-items:center;color:var(--og-green)}
.settings-card>span svg,.farm-operation-links .farm-operation-icon svg,.farm-asset-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.farm-operation-links .farm-operation-icon{width:38px;height:38px;border-radius:11px;background:var(--og-green-soft)}
