.import-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.import-preview{min-width:1600px}.import-preview td{vertical-align:top}.import-preview input:not([type=checkbox]){min-width:100px;width:100%;margin:4px 0}.import-preview textarea{min-width:290px;min-height:100px}.import-preview input[type=checkbox],.import-confirm input{width:20px;height:20px;accent-color:var(--gold)}.import-confirm{display:flex;align-items:flex-start;gap:12px;line-height:1.7;margin:24px 0}.import-warning{color:#8a4f15;background:#fff5e7;padding:8px;border-radius:5px;line-height:1.5}.import-original{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}.source-field{display:none!important}#unified-body{min-width:0}#unified-body>details{margin:20px 0}#live-sinapi-results .data-table td:nth-child(3){min-width:260px}#picker-components{margin:20px 0}
/* Login: altura da viewport; espaçamento compacto sem cortar conteúdo. */
.login.refined-login{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);height:100vh;height:100dvh;min-height:0}
.refined-login .login-brand{position:relative;isolation:isolate;min-width:0;width:100%;max-width:100%;height:100%;min-height:0;aspect-ratio:auto;padding:clamp(20px,4vh,44px) clamp(24px,3vw,54px);gap:16px;justify-content:space-between;overflow:hidden;background:#191c1c}
.refined-login .login-photo{position:absolute;inset:0;z-index:-2;width:100%;height:100%;margin:0;border-radius:0;background:none}
.refined-login .login-photo img{width:100%;height:100%;max-height:none;object-fit:cover;object-position:50% 52%;border-radius:0}
.refined-login .login-brand:before{content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(6,12,17,.65),transparent 24%,transparent 50%,rgba(6,12,17,.92) 100%)}
.refined-login .login-brand-top{width:100%;height:auto}.refined-login .company-logo{width:clamp(90px,15vh,150px);height:auto;aspect-ratio:1}
.refined-login .login-brand-copy{margin: auto 0 0;padding:0;max-width:600px}.refined-login .login-brand-copy .eyebrow{display:inline-block;color:#000;background:#e2cfaa;padding:6px 10px;border-radius:2px;font-size:10px;font-weight:700;letter-spacing:1.2px}
.refined-login .login-brand-copy h1{font-size:clamp(28px,3vw,43px);line-height:1.12;margin:12px 0;color:#fff}.refined-login .login-brand-copy p{display:block;color:#fff;margin:0;font-size:13px;line-height:1.6}.refined-login .login-brand>small{display:block;color:#fff;margin:0;font-size:9px;line-height:1.5}
.refined-login .login-form{display:grid;grid-template-rows:1fr auto;justify-items:center;align-items:center;min-width:0;min-height:0;height:100%;padding:clamp(20px,4vh,44px) clamp(24px,4vw,60px);gap:20px}
.refined-login .login-form>div{width:100%;max-width:385px}.refined-login .login-form h2{margin:14px 0 8px}.refined-login .login-form p{margin:0 0 20px}.refined-login .login-form form>label{margin:14px 0}.refined-login .login-form footer{position:static;width:100%;margin:0;gap:8px;line-height:1.6;display:flex;flex-wrap:wrap}.refined-login .login-note{margin-top:18px}
@media(max-width:899px){
 .login.refined-login{grid-template-columns:minmax(0,1fr);grid-template-rows:38% minmax(0,1fr);min-height:720px}
 .refined-login .login-brand{padding:20px 28px;gap:8px}.refined-login .login-brand-top{position:absolute;top:18px;left:28px;width:calc(100% - 56px)}.refined-login .company-logo{width:76px}.refined-login .login-brand-top>span:not(.company-logo){max-width:140px;font-size:8px}
 .refined-login .login-brand-copy{max-width:65%;margin-top:auto}.refined-login .login-brand-copy h1{font-size:clamp(23px,3.6vw,32px);margin:8px 0}.refined-login .login-brand-copy p{font-size:11px}.refined-login .login-brand>small{font-size:8px}.refined-login .login-brand-copy .eyebrow{font-size:8px;padding:4px 7px}
 .refined-login .login-form{padding:20px 28px;gap:12px}.refined-login .login-form>div{max-width:385px}.refined-login .login-form h2{font-size:27px}.refined-login .login-form footer{font-size:9px}
}
@media(max-width:600px){
 .login.refined-login{grid-template-rows:34% minmax(0,1fr)}.refined-login .login-brand{padding:14px 22px}.refined-login .login-brand-top{top:10px;left:22px;width:calc(100% - 44px)}.refined-login .company-logo{width:60px}.refined-login .login-brand-copy{max-width:100%;padding-top:54px}.refined-login .login-brand-copy h1{font-size:24px;margin:6px 0}.refined-login .login-brand-copy p{font-size:10px}.refined-login .login-brand>small{font-size:7px}.refined-login .login-brand-copy .eyebrow{font-size:7px}.refined-login .login-form{padding:18px 24px}.refined-login .login-form h2{font-size:25px}.refined-login .login-form p{font-size:11px;margin-bottom:14px}.refined-login .login-note{margin-top:14px}.import-tools{gap:8px}.import-tools .btn{white-space:normal}
}
@media(min-width:900px) and (max-height:620px){
 .refined-login .login-brand,.refined-login .login-form{padding-top:16px;padding-bottom:16px;gap:10px}.refined-login .company-logo{width:80px}.refined-login .login-brand-copy h1{font-size:28px}.refined-login .login-form h2{font-size:26px;margin:8px 0}.refined-login .login-form p{margin-bottom:10px}.refined-login .login-form form>label{margin:10px 0}.refined-login .login-form input{margin-top:5px}.refined-login .login-note{margin-top:10px}
}

/* Busca e planilha: colunas legíveis, campos compactos e rolagem local. */
.modal.sinapi-search-modal{width:1440px;max-width:calc(100vw - 32px)}
#live-sinapi-results .data-table{min-width:1000px;table-layout:fixed}#live-sinapi-results .data-table th,#live-sinapi-results .data-table td{padding:10px 8px;word-break:normal;overflow-wrap:normal;max-width:none}
#live-sinapi-results .data-table th:nth-child(1){width:100px}#live-sinapi-results .data-table th:nth-child(2){width:72px}#live-sinapi-results .data-table th:nth-child(4){width:48px}#live-sinapi-results .data-table th:nth-child(5){width:115px}#live-sinapi-results .data-table th:nth-child(6){width:180px}#live-sinapi-results .data-table th:nth-child(7){width:105px}#live-sinapi-results .data-table th:nth-child(8){width:125px}#live-sinapi-results .data-table td:nth-child(3){min-width:0}.reference-origin span{display:block;margin-bottom:4px;overflow-wrap:normal;word-break:normal}#live-sinapi-results .data-table td:nth-child(1),#live-sinapi-results .data-table td:nth-child(4),#live-sinapi-results .data-table td:nth-child(7){white-space:nowrap}
.budget-table{min-width:800px;table-layout:fixed}.budget-table th,.budget-table td{padding:12px 8px;min-width:0!important;max-width:none;overflow-wrap:normal}.budget-table th{white-space:normal}.budget-table th:first-child{width:30%}.budget-table th:nth-child(2){width:65px}.budget-table th:nth-child(3){width:44px}.budget-table th:nth-child(4){width:85px}.budget-table th:nth-child(5){width:125px}.budget-table th:nth-child(6){width:65px}.budget-table th:nth-child(7),.budget-table th:nth-child(8){width:120px}.budget-table th:last-child{width:70px}.budget-table td:first-child{overflow-wrap:break-word}.budget-table input{width:100%;min-width:0!important;padding:8px 5px;min-height:36px;border:1px solid #c7cdd1;background:#fff;border-radius:4px;font-size:12px;text-align:right}.budget-table input:focus{outline:2px solid var(--gold);outline-offset:1px}.budget-money{display:flex;align-items:center;gap:4px;white-space:nowrap}.budget-table td:nth-child(7),.budget-table td:nth-child(8){white-space:nowrap}
/* Planilha: cabeçalhos fixos no contêiner; encadeamento natural no final. */
.budget-scroll{max-height:65vh;max-height:65dvh;overflow:auto;overscroll-behavior:auto;position:relative;scrollbar-gutter:stable}.budget-table{border-collapse:separate;border-spacing:0}.budget-table thead th{position:sticky;top:0;z-index:2;background:#f5f6f5;text-align:center;box-shadow:0 1px 0 #d5d9dc}.budget-table thead th:first-child{text-align:left}.budget-table td:not(:first-child){text-align:center}@media(max-width:899px){.budget-scroll{max-height:60dvh}}
