/* ==========================================================
   ATLAS VISUAL RESET V3
   Gestao para Engenharia e Construcao
   Camada visual autoritativa do produto.
   ========================================================== */
:root {
    --atlas-blue-hover:#1E40AF;
    --atlas-blue-soft:#EFF6FF;
    --atlas-midnight-2:#111B36;
    --atlas-text-2:#475569;
    --atlas-white:#FFFFFF;
    --atlas-cyan-strong:#0E7490;
    --atlas-cyan-soft:#ECFEFF;
    --atlas-amber-strong:#92400E;
    --atlas-amber-soft:#FFFBEB;
    --atlas-red-strong:#B91C1C;
    --atlas-red-soft:#FEF2F2;
    --atlas-surface:#FFFFFF;
    --atlas-surface-2:#F8FAFC;
    --atlas-line:#E2E8F0;
    --atlas-line-strong:#CBD5E1;
    --atlas-shadow-sm:0 1px 2px rgba(11,16,32,.05);
    --atlas-shadow-md:0 8px 28px rgba(11,16,32,.08);
    --atlas-shadow-lg:0 20px 60px rgba(11,16,32,.12);
    --atlas-radius-sm:8px;
    --atlas-radius:12px;
    --atlas-radius-lg:16px;
    --atlas-focus:0 0 0 3px rgba(29,78,216,.18);

    /* Compatibility bridge: nomes tecnicos antigos permanecem, visual ATLAS. */
    --cec-navy:var(--atlas-midnight)!important;
    --cec-navy-2:var(--atlas-midnight-2)!important;
    --cec-navy-3:#172554!important;
    --cec-blue:var(--atlas-blue)!important;
    --cec-red:var(--atlas-blue)!important;
    --cec-red-600:var(--atlas-blue)!important;
    --cec-bg:var(--atlas-off-white)!important;
    --cec-panel:var(--atlas-white)!important;
    --cec-line:var(--atlas-line)!important;
    --cec-border:var(--atlas-line)!important;
    --cec-text:var(--atlas-graphite)!important;
    --cec-muted:var(--atlas-steel)!important;
    --cec-muted-2:var(--atlas-steel)!important;
    --cec-ok:var(--atlas-cyan-strong)!important;
    --cec-success:var(--atlas-cyan-strong)!important;
    --cec-success-600:var(--atlas-cyan-strong)!important;
    --cec-info-600:var(--atlas-cyan-strong)!important;
    --cec-warning-600:var(--atlas-amber-strong)!important;
    --cec-danger:var(--atlas-red-strong)!important;
    --cec-danger-600:var(--atlas-red-strong)!important;
    --green-50:var(--atlas-cyan-soft)!important;
    --green-100:#CFFAFE!important;
    --green-200:#A5F3FC!important;
    --green-500:var(--atlas-cyan)!important;
    --green-600:var(--atlas-cyan-strong)!important;
    --green-700:#155E75!important;
}

html,body,input,select,textarea,button {
    font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif!important;
}
html,body { color:var(--atlas-graphite); background:var(--atlas-off-white); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
body { font-size:14px; }
::selection { background:rgba(29,78,216,.18); color:var(--atlas-midnight); }
*:focus-visible { outline:2px solid var(--atlas-blue)!important; outline-offset:2px!important; }

/* Frappe / controles nativos */
body .form-control,body .input-with-feedback,body .control-input input,body .control-input select,body .control-input textarea {
    min-height:40px!important; border:1px solid var(--atlas-line-strong)!important; border-radius:10px!important;
    background:#fff!important; color:var(--atlas-graphite)!important; font-size:13px!important; box-shadow:none!important;
}
body textarea.form-control,body .control-input textarea { min-height:96px!important; line-height:1.5!important; }
body .form-control::placeholder,body input::placeholder,body textarea::placeholder { color:#64748B!important; opacity:.88!important; }
body .form-control:focus,body .control-input input:focus,body .control-input select:focus,body .control-input textarea:focus {
    border-color:var(--atlas-blue)!important; box-shadow:var(--atlas-focus)!important;
}
body .control-label,body .frappe-control .control-label,body .form-group label { color:var(--atlas-text-2)!important; font-size:12px!important; font-weight:650!important; }
body .help-box,body .form-text,body .text-muted { color:var(--atlas-steel)!important; }
body .btn { min-height:38px; border-radius:9px!important; font-size:12.5px!important; font-weight:650!important; box-shadow:none!important; }
body .btn-sm { min-height:34px!important; font-size:12px!important; }
body .btn-xs { min-height:30px!important; font-size:12px!important; }
body .btn-primary,body .cec-primary,body .cec-btn-primary { background:var(--atlas-blue)!important; border-color:var(--atlas-blue)!important; color:#fff!important; }
body .btn-primary:hover,body .cec-primary:hover,body .cec-btn-primary:hover { background:var(--atlas-blue-hover)!important; border-color:var(--atlas-blue-hover)!important; }
body .btn-success { background:var(--atlas-cyan)!important; border-color:var(--atlas-cyan)!important; color:var(--atlas-midnight)!important; }
body .btn-warning { background:var(--atlas-amber)!important; border-color:var(--atlas-amber)!important; color:#451A03!important; }
body .btn-danger,body .cec-danger-btn,body .cec-btn-danger { background:var(--atlas-red-soft)!important; border:1px solid #FCA5A5!important; color:var(--atlas-red-strong)!important; }
body .btn-default,body .cec-secondary,body .cec-btn-secondary { background:#fff!important; border:1px solid var(--atlas-line-strong)!important; color:var(--atlas-graphite)!important; }
body .btn:disabled,body button:disabled,body .disabled { opacity:.52!important; cursor:not-allowed!important; }
body .modal-content,body .msgprint-dialog .modal-content { border:1px solid var(--atlas-line)!important; border-radius:16px!important; box-shadow:var(--atlas-shadow-lg)!important; }
body .modal-title { color:var(--atlas-midnight)!important; font-size:18px!important; font-weight:750!important; }
body .modal-body { color:var(--atlas-graphite)!important; font-size:13px!important; }
body .modal-header,body .modal-footer { border-color:var(--atlas-line)!important; }
body .list-row,body .list-row-container,body .result { color:var(--atlas-graphite)!important; font-size:13px!important; }
body table { font-variant-numeric:tabular-nums; }
body table th { color:var(--atlas-steel)!important; font-size:12px!important; font-weight:750!important; letter-spacing:.025em; }
body table td { color:var(--atlas-graphite)!important; font-size:12.5px!important; }

/* Nenhum verde visual: sucesso e confirmacao sao ciano. */
body .indicator.green,body .indicator-pill.green,body .badge-success,body .text-success,body .text-green,
body .status-success,body .alert-success { color:var(--atlas-cyan-strong)!important; }
body .indicator.green::before,body .indicator-pill.green::before,body .indicator.green:before { background:var(--atlas-cyan)!important; }
body .badge-success,body .alert-success { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; }
body input[type="checkbox"],body input[type="radio"] { accent-color:var(--atlas-blue)!important; }

/* Shell */
body.cec-shell-route { background:var(--atlas-off-white)!important; color:var(--atlas-graphite)!important; }
.cec-app-shell { grid-template-columns:268px minmax(0,1fr)!important; background:var(--atlas-off-white)!important; color:var(--atlas-graphite)!important; }
.cec-app-sidebar { background:linear-gradient(180deg,#0B1020 0%,#0D1730 58%,#080D1A 100%)!important; box-shadow:8px 0 30px rgba(11,16,32,.10)!important; }
.cec-app-brand { min-height:108px!important; height:108px!important; padding:17px 18px!important; border-bottom:1px solid rgba(255,255,255,.08)!important; }
.atlas-reset-brand { width:100%; display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.atlas-reset-brand-main { display:flex; align-items:center; gap:10px; }
.atlas-reset-brand-main img { width:34px!important; height:34px!important; object-fit:contain!important; filter:none!important; }
.atlas-reset-brand-main strong { color:#fff!important; font-size:19px!important; line-height:1!important; letter-spacing:.08em!important; font-weight:800!important; }
.atlas-reset-brand > span { color:#CBD5E1!important; font-size:12px!important; line-height:1.35!important; font-weight:500!important; white-space:normal!important; }
.cec-nav-section { border-color:rgba(255,255,255,.065)!important; }
.cec-nav-section-head { min-height:38px!important; color:#94A3B8!important; font-size:12px!important; }
.cec-nav-link { min-height:42px!important; border-radius:9px!important; color:#CBD5E1!important; font-size:13px!important; }
.cec-nav-link:hover { background:rgba(255,255,255,.06)!important; color:#fff!important; }
.cec-nav-link.active { background:linear-gradient(90deg,rgba(29,78,216,.34),rgba(29,78,216,.16))!important; color:#fff!important; box-shadow:inset 3px 0 0 var(--atlas-blue)!important; }
.cec-nav-icon { color:#94A3B8!important; }
.cec-nav-link.active .cec-nav-icon { color:#93C5FD!important; }
.cec-nav-count { background:var(--atlas-blue)!important; color:#fff!important; font-size:12px!important; }
.cec-nav-dev,.cec-nav-lock { color:#94A3B8!important; font-size:12px!important; }
.cec-app-user { border-top:1px solid rgba(255,255,255,.08)!important; padding:14px 15px!important; }
.cec-app-user span { color:#F8FAFC!important; font-size:12px!important; }
.cec-app-user small { color:#94A3B8!important; font-size:12px!important; }
.cec-user-avatar,.cec-top-avatar { background:rgba(29,78,216,.20)!important; color:#DBEAFE!important; border:1px solid rgba(147,197,253,.22)!important; }
.cec-app-main { background:var(--atlas-off-white)!important; }
.cec-app-topbar { min-height:64px!important; height:64px!important; background:rgba(255,255,255,.96)!important; border-bottom:1px solid var(--atlas-line)!important; box-shadow:0 1px 0 rgba(11,16,32,.02)!important; backdrop-filter:blur(14px); }
.cec-entity-context span { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-entity-context select { color:var(--atlas-midnight)!important; font-size:12.5px!important; font-weight:650!important; }
.cec-top-icon { width:38px!important; height:38px!important; border-radius:10px!important; color:var(--atlas-text-2)!important; }
.cec-top-icon:hover { background:var(--atlas-blue-soft)!important; color:var(--atlas-blue)!important; }
.cec-dot { background:var(--atlas-red)!important; box-shadow:0 0 0 2px #fff!important; }
.cec-app-main-inner { max-width:1600px!important; width:100%!important; margin:0 auto!important; padding:26px 30px 36px!important; }

/* Tipografia operacional - piso de legibilidade */
body.cec-shell-route .cec-app-main h1 { color:var(--atlas-midnight); font-size:32px!important; line-height:1.08!important; letter-spacing:-.025em!important; }
body.cec-shell-route .cec-app-main h2 { color:var(--atlas-midnight); font-size:20px!important; line-height:1.2!important; }
body.cec-shell-route .cec-app-main h3 { color:var(--atlas-midnight); font-size:16px!important; line-height:1.3!important; }
body.cec-shell-route .cec-app-main p { color:var(--atlas-text-2); font-size:13.5px!important; line-height:1.55!important; }
body.cec-shell-route .cec-app-main small { font-size:12px!important; line-height:1.4!important; }
body.cec-shell-route .cec-app-main label { font-size:12px!important; line-height:1.35!important; }
body.cec-shell-route .cec-app-main [class*="badge"],body.cec-shell-route .cec-app-main [class*="pill"],body.cec-shell-route .cec-app-main [class*="chip"] { font-size:12px!important; line-height:1.25!important; }
body.cec-shell-route .cec-app-main [class*="kicker"],body.cec-shell-route .cec-app-main [class*="eyebrow"] { font-size:12px!important; letter-spacing:.10em!important; }
body.cec-shell-route .cec-app-main [class*="row"] { font-size:12.5px!important; }
body.cec-shell-route .cec-app-main [class*="row"] strong { font-size:12.5px!important; }
body.cec-shell-route .cec-app-main [class*="help"],body.cec-shell-route .cec-app-main [class*="meta"] { font-size:12px!important; }

/* Heros */
.cec-hero,.cec-home-hero,.cec-supplier-site-hero,.cec-detail-hero,.cec-v5-hero,.cec-public-int-hero {
    border-radius:16px!important; border:1px solid rgba(255,255,255,.08)!important;
    background:linear-gradient(115deg,rgba(11,16,32,.97),rgba(17,27,54,.91)),url('/assets/construbes_erp/images/hero_construbes.jpg') center 52%/cover!important;
    box-shadow:var(--atlas-shadow-md)!important; color:#fff!important;
}
.cec-hero,.cec-supplier-site-hero,.cec-detail-hero,.cec-v5-hero,.cec-public-int-hero { min-height:150px!important; padding:27px 30px!important; }
.cec-home-hero { min-height:210px!important; padding:34px 36px!important; }
.cec-home-hero h1 { color:#fff!important; font-size:46px!important; }
.cec-hero h1,.cec-supplier-site-hero h1,.cec-detail-hero h1,.cec-v5-hero h1,.cec-public-int-hero h1 { color:#fff!important; }
.cec-hero p,.cec-home-hero p,.cec-supplier-site-hero p,.cec-detail-hero p,.cec-v5-hero p,.cec-public-int-hero p { color:#CBD5E1!important; max-width:780px!important; }
.cec-kicker,.cec-site-eyebrow,.cec-v5-eyebrow { color:#93C5FD!important; }

/* Superficies */
.cec-panel,.cec-site-panel,.cec-search-card,.cec-master-list-card,.cec-catalog-card,.cec-collab-panel,.cec-v5-panel,
.cec-cat-layout,.cec-cat-intro,.cec-rh-param-card,.cec-public-int-card,.cec-public-int-test,.cec-info-box,.cec-finance-block,
.cec-liquidation-card,.cec-ui-dialog,.cec-placeholder-card,.cec-access-denied {
    background:#fff!important; border:1px solid var(--atlas-line)!important; border-radius:14px!important; box-shadow:var(--atlas-shadow-sm)!important;
}
.cec-search-card,.cec-master-list-card,.cec-collab-panel,.cec-v5-panel,.cec-site-panel { padding:20px!important; }
.cec-master-list-head,.cec-panel-title,.cec-v5-panel-head { border-color:var(--atlas-line)!important; }
.cec-master-list-head h2,.cec-panel-title h2,.cec-v5-panel-head strong { color:var(--atlas-midnight)!important; }
.cec-master-list-head span,.cec-master-list-head small,.cec-panel-title p { color:var(--atlas-steel)!important; }
.cec-master-row,.cec-collab-row,.cec-collab-row-test,.cec-document-row,.cec-payment-row,.cec-entity-access-row,.cec-access-row,.cec-rh-param-row,.cec-v5-table-row,.cec-v5-record {
    border-color:var(--atlas-line)!important; color:var(--atlas-graphite)!important;
}
.cec-master-row:hover,.cec-collab-row:hover,.cec-collab-row-test:hover,.cec-v5-table-row:hover,.cec-v5-record:hover { background:#F8FAFC!important; }
.cec-master-row.is-head,.cec-collab-row.is-head,.cec-document-row.is-head,.cec-payment-row.is-head,.cec-access-row.is-head,.cec-v5-table-head { background:#F8FAFC!important; color:var(--atlas-steel)!important; }
.cec-master-main strong,.cec-master-cell strong,.cec-master-cell span { color:var(--atlas-graphite)!important; }
.cec-master-cell small { color:var(--atlas-steel)!important; }
.cec-master-empty,.cec-empty-state,.cec-v5-empty,.cec-cat-empty { color:var(--atlas-steel)!important; font-size:12.5px!important; }
.cec-master-empty b,.cec-empty-state b,.cec-v5-empty strong,.cec-cat-empty strong { color:var(--atlas-midnight)!important; font-size:13px!important; }

/* KPIs, numeros e dados */
.cec-home-kpis,.cec-master-metrics,.cec-alert-metrics,.cec-v5-stats,.cec-v5-metrics,.cec-cdash-metrics { gap:12px!important; }
.cec-home-kpis>div,.cec-master-metrics>div,.cec-alert-metrics>div,.cec-v5-stat,.cec-v5-metric,.cec-cdash-metric-card {
    background:#fff!important; border:1px solid var(--atlas-line)!important; border-radius:14px!important; box-shadow:var(--atlas-shadow-sm)!important; padding:17px 18px!important;
}
.cec-home-kpis span,.cec-master-metrics span,.cec-alert-metrics span,.cec-v5-stat span,.cec-v5-metric span,.cec-cdash-metric-label { color:var(--atlas-steel)!important; font-size:12px!important; font-weight:650!important; }
.cec-home-kpis strong,.cec-master-metrics strong,.cec-alert-metrics strong,.cec-v5-stat strong,.cec-v5-metric strong,.cec-cdash-metric-card strong {
    color:var(--atlas-midnight)!important; font-size:28px!important; line-height:1.05!important; letter-spacing:-.02em!important; font-variant-numeric:tabular-nums lining-nums!important;
}
.cec-home-kpis small,.cec-master-metrics small,.cec-alert-metrics small,.cec-v5-stat small,.cec-v5-metric small,.cec-cdash-metric-meta { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-v5-table-row.measure>span:last-child,.cec-v5-table-row.flow>span:last-child,.cec-v5-table-row.report>span:nth-child(n+3),
.cec-payment-row,.cec-cdash-metric-card strong,.cec-home-kpis strong { font-variant-numeric:tabular-nums lining-nums!important; }

/* Estados */
.cec-badge,.cec-status-chip,.cec-v5-status,.cec-cat-pill,.cec-stage-pill,.cec-priority,.cec-alert-severity,.cec-alert-module-badge,.cec-status {
    display:inline-flex!important; align-items:center!important; min-height:25px!important; padding:4px 8px!important; border-radius:999px!important; font-weight:700!important;
}
.cec-badge.ok,.cec-status-chip.ok,.cec-v5-status.ok,.cec-v5-status.success,.cec-cat-pill.is-active,.cec-status.ok,.cec-review-ok,
.cec-ui-message.is-success .cec-ui-message-icon { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; color:var(--atlas-cyan-strong)!important; }
.cec-badge.warning,.cec-status-chip.warning,.cec-v5-status.warning,.cec-alert-severity.attention,.cec-priority.medium { background:var(--atlas-amber-soft)!important; border-color:#FCD34D!important; color:var(--atlas-amber-strong)!important; }
.cec-badge.danger,.cec-status-chip.danger,.cec-v5-status.danger,.cec-alert-severity.critical,.cec-priority.high { background:var(--atlas-red-soft)!important; border-color:#FCA5A5!important; color:var(--atlas-red-strong)!important; }
.cec-badge.neutral,.cec-status-chip.neutral,.cec-v5-status.neutral,.cec-cat-pill.is-inactive { background:#F1F5F9!important; border-color:var(--atlas-line)!important; color:var(--atlas-text-2)!important; }

/* Avisos - redesenho */
.cec-alerts-page .cec-alert-metrics>div:nth-child(1) { border-top:3px solid var(--atlas-blue)!important; }
.cec-alerts-page .cec-alert-metrics>div:nth-child(2) { border-top:3px solid var(--atlas-red)!important; }
.cec-alerts-page .cec-alert-metrics>div:nth-child(3),.cec-alerts-page .cec-alert-metrics>div:nth-child(4) { border-top:3px solid var(--atlas-amber)!important; }
.cec-alert-filters { padding:16px 18px!important; }
.cec-alert-module-tabs { gap:6px!important; }
.cec-alert-module-tabs button { min-height:34px!important; padding:0 12px!important; border:1px solid var(--atlas-line)!important; border-radius:999px!important; background:#fff!important; color:var(--atlas-text-2)!important; font-size:12px!important; }
.cec-alert-module-tabs button.active { background:var(--atlas-blue-soft)!important; border-color:#BFDBFE!important; color:var(--atlas-blue)!important; }
.cec-alert-list { display:grid!important; gap:12px!important; }
.cec-alert-card { position:relative!important; padding:18px 19px 17px 21px!important; border:1px solid var(--atlas-line)!important; border-left-width:4px!important; border-radius:14px!important; background:#fff!important; box-shadow:var(--atlas-shadow-sm)!important; }
.cec-alert-card.critical { border-left-color:var(--atlas-red)!important; }
.cec-alert-card.important,.cec-alert-card.attention { border-left-color:var(--atlas-amber)!important; }
.cec-alert-card.info { border-left-color:var(--atlas-cyan)!important; }
.cec-alert-card h2 { font-size:17px!important; margin:12px 0 6px!important; }
.cec-alert-card p { color:var(--atlas-text-2)!important; }
.cec-alert-card-top small,.cec-alert-card-foot { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-alert-severity.critical { background:var(--atlas-red-soft)!important; color:var(--atlas-red-strong)!important; }
.cec-alert-severity.important,.cec-alert-severity.attention { background:var(--atlas-amber-soft)!important; color:var(--atlas-amber-strong)!important; }
.cec-alert-severity.info { background:var(--atlas-cyan-soft)!important; color:var(--atlas-cyan-strong)!important; }
.cec-alert-module-badge { background:var(--atlas-blue-soft)!important; color:var(--atlas-blue)!important; }

/* Pendencias / aprovacoes */
.cec-pendencias-page [class*="pending"],.cec-pendencias-page [class*="pend-"] { font-size:12px!important; }
.cec-pend-danger-soft { background:var(--atlas-red-soft)!important; border-color:#FCA5A5!important; color:var(--atlas-red-strong)!important; }
.cec-stage-pill.ok,.cec-priority.low { background:var(--atlas-cyan-soft)!important; color:var(--atlas-cyan-strong)!important; border-color:#A5F3FC!important; }
.cec-v5-table-row.approval .cec-btn-primary { background:var(--atlas-blue)!important; color:#fff!important; }
.cec-v5-table-row.approval .cec-btn-danger { background:var(--atlas-red-soft)!important; color:var(--atlas-red-strong)!important; }

/* V5 operacional */
.cec-v5-root { color:var(--atlas-graphite)!important; }
.cec-v5-panel { overflow:hidden!important; }
.cec-v5-table-head { min-height:42px!important; padding:0 15px!important; font-size:12px!important; font-weight:750!important; letter-spacing:.025em!important; }
.cec-v5-table-row { min-height:56px!important; padding:10px 15px!important; font-size:12.5px!important; }
.cec-v5-table-row strong,.cec-v5-record strong { color:var(--atlas-midnight)!important; font-size:12.5px!important; }
.cec-v5-table-row small,.cec-v5-record small,.cec-v5-user small,.cec-v5-perm small { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-v5-record { min-height:58px!important; border-radius:10px!important; }
.cec-v5-shortcut { border:1px solid var(--atlas-line)!important; border-radius:12px!important; background:#fff!important; color:var(--atlas-graphite)!important; }
.cec-v5-shortcut:hover { border-color:#BFDBFE!important; background:var(--atlas-blue-soft)!important; }
.cec-v5-arrow { color:var(--atlas-blue)!important; }

/* Colaboradores / RH */
.cec-colaboradores-page .cec-cdash-head p,.cec-colaboradores-page .cec-cdash-panel-head p { color:var(--atlas-steel)!important; font-size:12.5px!important; }
.cec-colaboradores-page .cec-cdash-panel,.cec-colaboradores-page .cec-cdash-chart,.cec-colaboradores-page .cec-cdash-regularity {
    background:#fff!important; border:1px solid var(--atlas-line)!important; border-radius:14px!important; box-shadow:var(--atlas-shadow-sm)!important;
}
.cec-colaboradores-page .cec-cdash-track,.cec-colaboradores-page .cec-cdash-bar-track { background:#E2E8F0!important; }
.cec-colaboradores-page .cec-cdash-track i { background:var(--atlas-cyan)!important; }
.cec-colaboradores-page .cec-cdash-bar-track i { background:var(--atlas-blue)!important; }
.cec-colaboradores-page .cec-cdash-bar-row,.cec-colaboradores-page .cec-cdash-bar-copy,.cec-colaboradores-page .cec-cdash-bar-copy span { font-size:12px!important; color:var(--atlas-text-2)!important; }
.cec-colaboradores-page .cec-cpf-box.ok,.cec-colaboradores-page .cec-collab-attention.ok,.cec-colaboradores-page .cec-ui-file.is-ready { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; color:var(--atlas-cyan-strong)!important; }
.cec-colaboradores-page .cec-document-requirements article.ok>span { background:var(--atlas-cyan-soft)!important; color:var(--atlas-cyan-strong)!important; }
.cec-colaboradores-page .cec-collab-tabs button.is-active:after { background:var(--atlas-blue)!important; }
.cec-colaboradores-page .cec-collab-audit i { background:var(--atlas-blue)!important; }

/* Obras / categorias / parametrizacoes */
.cec-obras-tab { color:var(--atlas-steel)!important; font-size:12.5px!important; }
.cec-obras-tab:hover,.cec-obras-tab.is-active,.cec-obras-tab.active { color:var(--atlas-midnight)!important; }
.cec-obras-tab.is-active:after,.cec-obras-tab.active:after { background:var(--atlas-blue)!important; }
.cec-audit-marker { background:var(--atlas-blue)!important; }
.cec-cat-node { min-height:44px!important; color:var(--atlas-graphite)!important; }
.cec-cat-node:hover { background:#F8FAFC!important; }
.cec-cat-node.is-selected { background:var(--atlas-blue-soft)!important; box-shadow:inset 0 0 0 1px #BFDBFE!important; }
.cec-cat-pill.is-active { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; color:var(--atlas-cyan-strong)!important; }
.cec-cat-tree-meta,.cec-cat-node-copy small,.cec-cat-detail-code,.cec-cat-info span,.cec-cat-detail-section p { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-rh-param-row small,.cec-public-int-card p,.cec-public-int-meta,.cec-param-note { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-public-free { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; color:var(--atlas-cyan-strong)!important; }
.cec-public-int-card b.ok,.cec-public-health-list .ok { background:var(--atlas-cyan-soft)!important; color:var(--atlas-cyan-strong)!important; border-color:#A5F3FC!important; }

/* Core UI: dialogs, mensagens, toasts, loading */
.cec-ui-modal-backdrop,.modal-backdrop.show { background:rgba(11,16,32,.48)!important; backdrop-filter:blur(2px)!important; }
.cec-ui-dialog { border-radius:16px!important; box-shadow:var(--atlas-shadow-lg)!important; }
.cec-ui-dialog-header { padding:18px 20px!important; border-color:var(--atlas-line)!important; }
.cec-ui-dialog-header h3 { color:var(--atlas-midnight)!important; font-size:18px!important; }
.cec-ui-modal-body { padding:20px!important; }
.cec-ui-field>label { color:var(--atlas-text-2)!important; font-size:12px!important; }
.cec-ui-field>small { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-ui-field .form-control,.cec-ui-control { min-height:40px!important; font-size:13px!important; border-radius:10px!important; border-color:var(--atlas-line-strong)!important; }
.cec-ui-check { color:var(--atlas-text-2)!important; font-size:12.5px!important; }
.cec-ui-check input { accent-color:var(--atlas-blue)!important; }
.cec-ui-message p { color:var(--atlas-text-2)!important; font-size:13px!important; }
.cec-ui-message-details summary,.cec-ui-message-details pre { font-size:12px!important; }
.cec-ui-toast { border-radius:12px!important; box-shadow:var(--atlas-shadow-lg)!important; }
.cec-ui-toast strong { color:var(--atlas-midnight)!important; font-size:12px!important; }
.cec-ui-toast span { color:var(--atlas-text-2)!important; font-size:12px!important; }
.cec-ui-toast.is-success::before { background:var(--atlas-cyan)!important; }
.cec-ui-toast.is-warning::before { background:var(--atlas-amber)!important; }
.cec-ui-toast.is-error::before { background:var(--atlas-red)!important; }
.cec-ui-loading-root { background:rgba(11,16,32,.42)!important; backdrop-filter:blur(2px)!important; }
.cec-ui-loading-box { min-width:260px!important; padding:16px 18px!important; border-radius:12px!important; color:var(--atlas-midnight)!important; font-size:12.5px!important; }
.cec-ui-spinner { border-color:#DBEAFE!important; border-top-color:var(--atlas-blue)!important; }
.cec-ui-progress-bar { background:linear-gradient(90deg,var(--atlas-blue),var(--atlas-cyan))!important; }
.cec-ui-progress-meta { color:var(--atlas-steel)!important; font-size:12px!important; font-variant-numeric:tabular-nums!important; }

/* Paginas de sistema dentro do shell */
.cec-system-card { border:1px solid var(--atlas-line)!important; border-radius:16px!important; box-shadow:var(--atlas-shadow-lg)!important; }
.cec-system-card-top { border-left:5px solid var(--atlas-blue)!important; background:linear-gradient(120deg,var(--atlas-midnight),#172554)!important; }
.cec-system-card-top small { color:#93C5FD!important; font-size:12px!important; }
.cec-system-card-top h1 { color:#fff!important; font-size:28px!important; }
.cec-system-card-body p { color:var(--atlas-text-2)!important; font-size:13px!important; }
.cec-system-code { color:var(--atlas-steel)!important; font-size:12px!important; }
.cec-placeholder-card p,.cec-access-denied p { color:var(--atlas-text-2)!important; font-size:13px!important; }
.cec-footer { color:var(--atlas-steel)!important; font-size:12px!important; }

/* Graficos: Blue/Cyan/Violet/Amber/Red. */
.chart-container text,.frappe-chart text,.cec-cdash-chart text { fill:var(--atlas-steel)!important; color:var(--atlas-steel)!important; font-size:12px!important; }
.chart-container .guide-line,.frappe-chart .guide-line { stroke:var(--atlas-line)!important; }
.chart-container .dataset-0 .line-graph-path,.chart-container .dataset-0 .bar,.frappe-chart .dataset-0 .line-graph-path,.frappe-chart .dataset-0 .bar { stroke:var(--atlas-blue)!important; fill:var(--atlas-blue)!important; }
.chart-container .dataset-1 .line-graph-path,.chart-container .dataset-1 .bar,.frappe-chart .dataset-1 .line-graph-path,.frappe-chart .dataset-1 .bar { stroke:var(--atlas-cyan)!important; fill:var(--atlas-cyan)!important; }
.chart-container .dataset-2 .line-graph-path,.chart-container .dataset-2 .bar,.frappe-chart .dataset-2 .line-graph-path,.frappe-chart .dataset-2 .bar { stroke:var(--atlas-violet)!important; fill:var(--atlas-violet)!important; }
.chart-container .dataset-3 .line-graph-path,.chart-container .dataset-3 .bar,.frappe-chart .dataset-3 .line-graph-path,.frappe-chart .dataset-3 .bar { stroke:var(--atlas-amber)!important; fill:var(--atlas-amber)!important; }
.chart-container .dataset-4 .line-graph-path,.chart-container .dataset-4 .bar,.frappe-chart .dataset-4 .line-graph-path,.frappe-chart .dataset-4 .bar { stroke:var(--atlas-red)!important; fill:var(--atlas-red)!important; }
.chart-container .data-point,.frappe-chart .data-point { stroke:#fff!important; stroke-width:2px!important; }

/* Login */
body:has(.for-login) { min-height:100vh!important; background:linear-gradient(125deg,rgba(11,16,32,.97),rgba(11,16,32,.84)),url('/assets/construbes_erp/images/hero_construbes.jpg') center/cover fixed!important; }
.for-login { min-height:calc(100vh - 80px)!important; display:grid!important; place-items:center!important; padding:32px 18px!important; }
.for-login .page-card { width:min(440px,100%)!important; padding:30px!important; border:1px solid rgba(255,255,255,.12)!important; border-radius:20px!important; background:rgba(255,255,255,.98)!important; box-shadow:0 28px 90px rgba(0,0,0,.26)!important; }
.for-login .page-card-head img,.for-login .app-logo { display:none!important; }
.atlas-login-brand { display:flex; flex-direction:column; align-items:center; gap:10px; margin:2px 0 26px; text-align:center; }
.atlas-login-brand-main { display:flex; align-items:center; gap:11px; }
.atlas-login-brand-main img { width:42px!important; height:42px!important; }
.atlas-login-brand-main strong { color:var(--atlas-midnight)!important; font-size:25px!important; letter-spacing:.08em!important; font-weight:800!important; }
.atlas-login-brand span { color:var(--atlas-steel)!important; font-size:12.5px!important; }
.for-login .btn-office_365 { min-height:46px!important; border-radius:11px!important; border:1px solid var(--atlas-blue)!important; background:var(--atlas-blue)!important; color:#fff!important; font-size:13px!important; font-weight:700!important; }
.for-login .btn-office_365:hover { background:var(--atlas-blue-hover)!important; }

/* Portal de fornecedor */
.cec-portal-shell { max-width:1120px!important; color:var(--atlas-graphite)!important; }
.cec-portal-hero { padding:32px 38px 38px!important; border-radius:20px 20px 0 0!important; background:linear-gradient(118deg,rgba(11,16,32,.97),rgba(17,27,54,.90)),url('/assets/construbes_erp/images/hero_construbes.jpg') center/cover!important; }
.atlas-portal-brand { display:flex!important; align-items:center!important; gap:12px!important; margin-bottom:28px!important; }
.atlas-portal-brand img { width:38px!important; height:38px!important; }
.atlas-portal-brand strong { display:block!important; color:#fff!important; font-size:21px!important; letter-spacing:.08em!important; }
.atlas-portal-brand span { display:block!important; margin-top:3px!important; color:#CBD5E1!important; font-size:12px!important; letter-spacing:0!important; opacity:1!important; }
.atlas-portal-context { display:block!important; margin-top:8px!important; color:#94A3B8!important; font-size:12px!important; }
.cec-portal-kicker { color:#93C5FD!important; font-size:12px!important; }
.cec-portal-card { border-color:var(--atlas-line)!important; border-radius:0 0 20px 20px!important; box-shadow:var(--atlas-shadow-lg)!important; }
.cec-portal-card h2 { color:var(--atlas-midnight)!important; }
.cec-portal-grid label,.cec-check { color:var(--atlas-text-2)!important; font-size:12px!important; }
.cec-portal-grid input,.cec-portal-grid select,.cec-doc-card input,.cec-doc-card select { min-height:42px!important; border:1px solid var(--atlas-line-strong)!important; border-radius:10px!important; color:var(--atlas-graphite)!important; font-size:13px!important; }
.cec-portal-alert.success,.cec-status.ok,.cec-review-ok,.cec-done>span { background:var(--atlas-cyan-soft)!important; border-color:#A5F3FC!important; color:var(--atlas-cyan-strong)!important; }
.cec-portal-progress i.active,.cec-portal-progress i.done { background:var(--atlas-blue)!important; }
.cec-portal-shell .cec-primary { background:var(--atlas-blue)!important; color:#fff!important; }
.cec-portal-shell .cec-secondary { background:#fff!important; border-color:var(--atlas-line-strong)!important; color:var(--atlas-graphite)!important; }

/* Dark readiness */
html[data-theme="dark"] { --atlas-surface:#0F172A; --atlas-surface-2:#111827; --atlas-off-white:#081020; --atlas-line:#243047; --atlas-line-strong:#334155; --atlas-graphite:#E5E7EB; --atlas-text-2:#CBD5E1; --atlas-steel:#94A3B8; }
html[data-theme="dark"] body,html[data-theme="dark"] .cec-app-main { background:#081020!important; color:#E5E7EB!important; }
html[data-theme="dark"] .cec-panel,html[data-theme="dark"] .cec-site-panel,html[data-theme="dark"] .cec-search-card,html[data-theme="dark"] .cec-master-list-card,html[data-theme="dark"] .cec-v5-panel { background:#0F172A!important; border-color:#243047!important; }

@media(max-width:1250px) { .cec-app-shell { grid-template-columns:236px minmax(0,1fr)!important; } .cec-app-main-inner { padding:22px!important; } }
@media(max-width:980px) { .cec-app-shell { grid-template-columns:1fr!important; } .cec-app-sidebar { display:none!important; } .cec-app-main-inner { padding:18px!important; } .cec-home-hero { min-height:190px!important; } }
@media(max-width:680px) { body.cec-shell-route .cec-app-main h1 { font-size:27px!important; } .cec-home-hero h1 { font-size:36px!important; } .cec-home-kpis,.cec-master-metrics,.cec-alert-metrics,.cec-v5-stats,.cec-cdash-metrics { grid-template-columns:1fr 1fr!important; } .cec-hero,.cec-home-hero,.cec-v5-hero { padding:22px!important; } }
@media(max-width:440px) { .cec-home-kpis,.cec-master-metrics,.cec-alert-metrics,.cec-v5-stats,.cec-cdash-metrics { grid-template-columns:1fr!important; } }

@media print { .cec-app-sidebar,.cec-app-topbar,.cec-top-actions,.btn,.cec-footer-links { display:none!important; } .cec-app-shell { display:block!important; } .cec-app-main-inner { max-width:none!important; padding:0!important; } body { background:#fff!important; color:#000!important; } }

/* ============================================================
   ERP ATLAS - SIDEBAR COUNTERS
   Contadores discretos, sem fundo.
   ============================================================ */

.cec-app-sidebar .cec-nav-count {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;

    min-width: auto !important;
    width: auto !important;
    height: auto !important;

    margin-left: auto !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    box-shadow: none !important;

    color: #8FA7FF !important;

    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}


/* ATLAS_LOGIN_BRAND_LIGHT_SOURCE_V3 */
body:has(.for-login) .atlas-login-brand .atlas-login-brand-main strong,
html body .for-login .atlas-login-brand .atlas-login-brand-main strong {
    color: #FFFFFF !important;
    opacity: 1 !important;
    text-shadow: 0 2px 14px rgba(0, 0, 0, .32) !important;
}

body:has(.for-login) .atlas-login-brand > span,
html body .for-login .atlas-login-brand > span {
    color: #E6ECF8 !important;
    opacity: 1 !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .28) !important;
}

body:has(.for-login) .atlas-login-brand .atlas-login-brand-main img,
html body .for-login .atlas-login-brand .atlas-login-brand-main img {
    opacity: 1 !important;
    filter: brightness(1.24) saturate(1.08)
        drop-shadow(0 2px 10px rgba(0, 0, 0, .28)) !important;
}

