:root {
  --ink: #18201c;
  --muted: #68736c;
  --paper: #f5f5f0;
  --surface: #ffffff;
  --line: #dfe3dd;
  --green: #1f6b4f;
  --green-dark: #154b38;
  --orange: #d9772d;
  --danger: #a83434;
  --shadow: 0 12px 32px rgba(31, 49, 40, .08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: .35rem; font-size: clamp(1.8rem, 3vw, 2.7rem); letter-spacing: -.045em; line-height: 1.08; }
h2 { font-size: 1.05rem; }

.link-button { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; }

.app-shell { display: flex; align-items: stretch; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex: 0 0 264px; flex-direction: column; width: 264px; height: 100vh; padding: 20px 14px; overflow-y: auto; color: #cbd5e1; background: #111827; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.sidebar::-webkit-scrollbar { width: 7px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 99px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .3); }
.sidebar-back { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 4px; border-radius: 10px; color: #94a3b8; font-size: 12.5px; font-weight: 650; }
.sidebar-back:hover { color: white; background: rgba(255, 255, 255, .07); }
.sidebar-back svg { width: 15px; height: 15px; stroke: currentColor; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 22px; color: white; }
.sidebar-brand:hover { color: white; }
.sidebar-brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #2563eb; }
.sidebar-brand-mark svg { width: 20px; height: 20px; stroke: white; }
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.3; overflow: hidden; }
.sidebar-brand-text strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-brand-text small { overflow: hidden; color: #94a3b8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 2px; overflow-y: auto; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: #cbd5e1; font-size: 13.5px; font-weight: 650; }
.sidebar-nav a:hover { color: white; background: rgba(255, 255, 255, .07); }
.sidebar-nav a.active { color: white; background: #4f46e5; }
.sidebar-icon { display: inline-flex; width: 20px; justify-content: center; font-size: 15px; }
.sidebar-icon-tile { display: grid; flex: 0 0 auto; place-items: center; width: 26px; height: 26px; border-radius: 7px; }
.sidebar-icon-tile svg { width: 15px; height: 15px; stroke: white; }
.tile-blue { background: #2563eb; }
.tile-purple { background: #7c3aed; }
.tile-orange { background: #ea580c; }
.tile-teal { background: #0d9488; }
.tile-pink { background: #db2777; }
.tile-yellow { background: #ca8a04; }
.tile-green { background: #16a34a; }
.tile-brown { background: #92400e; }
.sidebar-footer { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 13px; }
.sidebar-footer a, .sidebar-footer .link-button { color: #94a3b8; }
.sidebar-footer a:hover, .sidebar-footer .link-button:hover { color: white; }
.sidebar-user { color: white; font-weight: 700; }
.main-area { flex: 1; min-width: 0; background: var(--paper); }
.sidebar-toggle {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 60;
  width: 42px; height: 42px; align-items: center; justify-content: center;
  border: 0; border-radius: 10px; background: #111827; color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); cursor: pointer;
}
.sidebar-toggle svg { width: 20px; height: 20px; stroke: currentColor; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 40;
  background: rgba(15, 23, 42, .5); opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}

.container { width: min(1720px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 70px; }
.container-auth { display: grid; width: 100%; min-height: 100vh; place-items: center; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { margin-bottom: 8px; color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.muted, .hint { color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; gap: 7px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--muted); font-weight: 700; }
.breadcrumbs a:hover { color: var(--green-dark); text-decoration: underline; }
.breadcrumbs > span:not(:last-child) { color: #b7c0ba; font-size: 11px; }
.breadcrumbs > span:last-child { color: var(--ink); font-weight: 700; }
.obra-nav { display: flex; gap: 5px; margin: -8px 0 22px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.obra-nav a { flex: 0 0 auto; padding: 9px 12px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; }
.obra-nav a:hover, .obra-nav a.active { color: var(--green-dark); background: #e6efe9; }
.module-subnav { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.module-subnav a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 700; }
.module-subnav a:hover, .module-subnav a.active { border-color: #b8cbbf; color: var(--green-dark); background: #e6efe9; }
.module-subnav-grouped { display: flex; flex-direction: column; gap: 8px; }
.subnav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.subnav-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-right: 4px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-grid a { padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fafbf8; }
.quick-grid span, .data-table td small { display: block; color: var(--muted); font-size: 12px; }
.report-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-filters { display: grid; grid-template-columns: minmax(200px, 1fr) 180px auto; gap: 10px; margin: 0 0 16px; }
.row-actions { display: flex; gap: 10px; font-size: 12px; font-weight: 700; }
.reorder-form { display: inline; }
.reorder-button { padding: 0; border: 0; background: none; color: var(--green); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.reorder-button:hover { color: var(--green-dark); }
.danger-link { color: var(--danger); }
.data-table td > a + a { margin-left: 10px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; cursor: pointer; font: inherit; font-weight: 700; }
.button:hover { border-color: #bdc6bf; color: var(--ink); }
.button.primary { border-color: var(--green); color: white; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.small { min-height: 34px; padding: 6px 11px; font-size: 13px; }
.button-chevron { gap: 6px; }
.button-chevron svg { width: 15px; height: 15px; }
.button.danger { color: var(--danger); }
.button.danger-solid { border-color: var(--danger); color: white; background: var(--danger); }
.actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.inline-motivo-form { display: flex; align-items: center; gap: 6px; }
.inline-motivo-form input[type="text"] { width: 220px; min-height: 38px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.metrics article { padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 4px 14px rgba(31, 49, 40, .035); }
.metrics span { display: block; color: var(--muted); font-size: 13px; }
.metrics strong { display: block; margin-top: 8px; font-size: 1.8rem; letter-spacing: -.04em; }
.metrics article small { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.metrics-5col { grid-template-columns: repeat(5, 1fr); }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 22px; }
.two-columns ul { margin: 6px 0 0; padding-left: 20px; }
.metrics-5col article { min-height: 108px; }
.metrics-6col { grid-template-columns: repeat(6, 1fr); }
.metrics-6col article { min-height: 100px; padding: 16px; }
.metrics-6col strong { font-size: 1.5rem; }
.metrics article:has(.metric-icon) { display: flex; align-items: center; gap: 14px; }
.metric-icon { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-size: 19px; }
.metric-icon.c-blue { background: #dbeafe; }
.metric-icon.c-orange { background: #fed7aa; }
.metric-icon.c-green { background: #bbf7d0; }
.metric-icon.c-gray { background: #e5e7eb; }
.metric-icon.c-purple { background: #e9d5ff; }
.metric-icon.c-pink { background: #fbcfe8; }
.metric-icon.c-danger { background: #fecaca; }

.metrics-stat-cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 22px; }
.stat-card { display: flex; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 4px 14px rgba(31, 49, 40, .035); }
.clickable-stat-card { text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
.clickable-stat-card:hover, .clickable-stat-card:focus-visible { box-shadow: 0 6px 20px rgba(31, 49, 40, .09); transform: translateY(-1px); }
[data-resize-key] { resize: both; overflow: auto; min-width: 190px; min-height: 120px; }
.stat-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 12px; border-radius: 50%; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.c-blue { background: #dbeafe; color: #2563eb; }
.stat-icon.c-green { background: #bbf7d0; color: #16a34a; }
.stat-icon.c-orange { background: #fed7aa; color: #ea580c; }
.stat-icon.c-purple { background: #e9d5ff; color: #9333ea; }
.stat-icon.c-pink { background: #fbcfe8; color: #db2777; }
.stat-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stat-value { margin-top: 6px; font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.stat-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.stat-sub.positivo { color: #16a34a; }
.stat-sub.negativo { color: #dc2626; }

.painel-avanco-etapas { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; align-items: stretch; }
.painel-avanco-etapas-titulo { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.painel-avanco-etapas .panel { display: flex; flex-direction: column; margin-bottom: 0; }
.avanco-obra-panel { padding: 22px; }
.avanco-obra-panel h2 { margin: 0; }
.avanco-obra-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 40px; margin-bottom: 14px; }

.semi-gauge-wrap { position: relative; flex: 0 0 auto; width: 190px; height: 100px; overflow: hidden; }
.semi-gauge { width: 190px; height: 190px; border-radius: 50%; background: conic-gradient(from -90deg, var(--green-dark) 0deg, var(--green) calc(var(--pct) * 1.8deg), #e5ebe6 calc(var(--pct) * 1.8deg) 180deg, transparent 180deg 360deg); }
.semi-gauge-wrap::before { content: ""; position: absolute; left: 50%; top: 14px; transform: translateX(-50%); width: 162px; height: 162px; border-radius: 50%; background: var(--surface); }
.semi-gauge-center { position: absolute; left: 0; right: 0; bottom: 4px; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.semi-gauge-center strong { font-size: 2.5rem; letter-spacing: -.03em; color: var(--green); }
.semi-gauge-center span { color: var(--muted); font-size: 13px; }

.avanco-obra-legenda.avanco-obra-legenda-colunas { flex-direction: row; gap: 38px; }
.avanco-obra-legenda-colunas li { display: flex; flex-direction: column; gap: 4px; }
.avanco-obra-legenda-colunas span { font-size: 13px; }
.avanco-obra-legenda-colunas strong { font-size: 1.5rem; }

.etapas-progresso-lista { display: flex; flex-direction: column; gap: 6px; max-height: 580px; padding-right: 6px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.etapas-progresso-lista::-webkit-scrollbar { width: 8px; }
.etapas-progresso-lista::-webkit-scrollbar-track { background: transparent; }
.etapas-progresso-lista::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
.etapas-progresso-lista::-webkit-scrollbar-thumb:hover { background: #bdc6bf; }

.painel-resumo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 22px; }
.resumo-card { display: flex; flex-direction: column; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 4px 14px rgba(31, 49, 40, .035); }
.resumo-card-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.resumo-card-heading .stat-icon { width: 32px; height: 32px; margin: 0; }
.resumo-card-heading .stat-icon svg { width: 16px; height: 16px; }
.resumo-card-heading h3 { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.resumo-linhas { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.resumo-linhas div { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.resumo-linhas dt { color: var(--muted); font-weight: 400; }
.resumo-linhas dd { margin: 0; font-weight: 700; }
.resumo-destaque { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; }
.resumo-destaque-verde { color: var(--green-dark); background: #e7f4ee; }
.resumo-destaque-verde strong { font-size: 13px; }
.resumo-badge { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.resumo-badge-danger { color: #991b1b; background: #fee2e2; }
.situacao-orcamento small { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; color: var(--muted); }
.situacao-orcamento-positivo strong { color: var(--green-dark); }
.situacao-orcamento-negativo strong { color: var(--danger); }
.situacao-orcamento-neutro strong { color: var(--muted); }
@keyframes resumo-piscar { 0%, 100% { background: transparent; } 50% { background: #fee2e2; } }
.resumo-linha-piscando { border-radius: 6px; cursor: pointer; animation: resumo-piscar 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .resumo-linha-piscando { animation: none; background: #fee2e2; } }
.resumo-badge-verde { color: var(--green-dark); background: #e7f4ee; }
.resumo-badge-azul { color: #1e40af; background: #dbeafe; }
.resumo-lista { display: flex; flex-direction: column; gap: 2px; margin: 0 0 10px; padding: 0; list-style: none; }
.resumo-lista-scroll { max-height: 220px; overflow-y: auto; margin-bottom: 0; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.resumo-item-link { display: block; padding: 5px 6px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 12.5px; }
.resumo-item-link:hover { background: var(--paper); }
.resumo-item-link strong { margin-right: 5px; }
.resumo-lista-timeline li { display: flex; align-items: baseline; gap: 6px; padding: 4px 6px; font-size: 12.5px; }
.resumo-lista-timeline small { color: var(--muted); flex: 0 0 auto; }
.resumo-lista-timeline .empty { color: var(--muted); }
.resumo-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #2563eb; }
.resumo-link { margin-top: auto; padding-top: 8px; color: var(--green); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.resumo-link:hover { text-decoration: underline; }
.resumo-link-danger { color: var(--danger); }
.etapa-progresso-linha { display: grid; grid-template-columns: 44px 1fr auto auto 48px; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 10px; text-decoration: none; color: inherit; }
.etapa-progresso-linha:hover { background: var(--paper); }
.etapa-progresso-icon { margin: 0; }
.etapa-progresso-nome { font-weight: 600; }
.etapa-progresso-quantidade { font-weight: 700; color: var(--ink); text-align: right; }
.etapa-progresso-legenda { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.etapa-ring { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: conic-gradient(#2563eb calc(var(--pct) * 1%), #e5ebe6 0); }
.etapa-ring::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--surface); }
.etapa-ring-center { position: relative; z-index: 1; font-size: 11px; font-weight: 700; }
.gauge { position: relative; display: grid; flex: 0 0 auto; place-items: center; width: 168px; height: 168px; border-radius: 50%; background: conic-gradient(var(--danger) calc(var(--pct) * 1%), #e5ebe6 0); }
.gauge.nivel-medio { background: conic-gradient(var(--orange) calc(var(--pct) * 1%), #e5ebe6 0); }
.gauge.nivel-alto { background: conic-gradient(var(--green) calc(var(--pct) * 1%), #e5ebe6 0); }
.gauge::before { position: absolute; inset: 13px; border-radius: 50%; background: var(--surface); content: ""; }
.gauge-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gauge-center strong { font-size: 1.9rem; letter-spacing: -.03em; }
.gauge-center span { color: var(--muted); font-size: 12px; }
.avanco-obra-legenda { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.avanco-obra-legenda strong { font-size: 1.1rem; }
.avanco-obra-legenda strong { color: var(--ink); }

.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.search { display: flex; gap: 10px; margin-bottom: 16px; }
.search input { flex: 1; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); background: #fafbf8; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
.dashboard-evolution { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.dashboard-evolution strong { min-width: 38px; }
.dashboard-evolution progress { width: 110px; height: 11px; border: 0; border-radius: 99px; accent-color: var(--green); }
.dashboard-client { max-width: 360px; }
.dashboard-client-name { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status { display: inline-block; padding: 4px 9px; border-radius: 999px; background: #e7ece8; font-size: 12px; font-weight: 750; }
.status-ok { color: #155c42; background: #d8f0e4; }
.status-danger { color: #8d3535; background: #f8dddd; }
.linha-origem-app { background: #f4f8fb; }
.badge-origem-app { display: inline-block; padding: 1px 7px; border-radius: 999px; background: #dfeafa; color: #315898; font-size: 11px; font-weight: 750; margin-left: 4px; }
.status-em_andamento { color: #155c42; background: #d8f0e4; }
.status-planejamento { color: #7d5412; background: #fbebc8; }
.status-concluida { color: #315898; background: #dfeafa; }
.status-pausada, .status-cancelada { color: #8d3535; background: #f8dddd; }
.status-disponivel { color: #155c42; background: #d8f0e4; }
.status-em_operacao { color: #315898; background: #dfeafa; }
.status-em_manutencao { color: #7d5412; background: #fbebc8; }
.status-parado { color: #8d3535; background: #f8dddd; }


.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin-bottom: 18px; }
.info-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 28px; margin: 0 0 20px; }
.info-list p { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.info-list p > span { display: block; color: var(--muted); font-size: 0.82rem; margin-bottom: 2px; }
.info-list p > strong { font-weight: 650; }
.info-card, .history-card, .files-panel { padding: 22px; }
.info-overview-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.info-overview-heading > h2 { flex: 0 0 auto; margin-top: 8px; }
.execution-indicators { display: grid; grid-template-columns: repeat(4, minmax(78px, 1fr)); gap: 7px; width: min(440px, 100%); }
.execution-indicators div { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f5f8f5; }
.execution-indicators span { display: block; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.execution-indicators strong { display: block; margin-top: 4px; color: var(--green-dark); font-size: 14px; }
.etapas-timeline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.etapa-chip { display: flex; flex-direction: column; gap: 3px; min-width: 108px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #f5f8f5; }
.etapa-chip-nome { color: var(--ink); font-size: 11px; font-weight: 700; }
.etapa-chip-percentual { color: var(--muted); font-size: 11px; }
.etapa-concluida { border-color: #b8cbbf; background: #e6efe9; }
.etapa-concluida .etapa-chip-percentual { color: var(--green-dark); font-weight: 700; }
.etapa-em_andamento { border-color: #ecd2ab; background: #fbf1e3; }
.etapa-em_andamento .etapa-chip-percentual { color: var(--orange); font-weight: 700; }
.schedule-card { padding: 22px; }
.schedule-summary { display: grid; grid-template-columns: 110px 1fr; gap: 12px; margin: 12px 0; }
.schedule-summary div { padding: 11px 12px; border-radius: 9px; background: #f4f7f4; }
.schedule-summary span { display: block; color: var(--muted); font-size: 11px; }
.schedule-summary strong { display: block; margin-top: 3px; font-size: 14px; }
.schedule-progress { width: 100%; height: 14px; accent-color: var(--green); }
.schedule-chart { margin: 12px 0 4px; }
.schedule-chart svg { display: block; width: 100%; height: auto; }
.schedule-chart text { fill: var(--muted); font-size: 9px; }
.chart-grid { stroke: #e2e7e2; stroke-width: 1; }
.chart-axis { stroke: #aab5ad; stroke-width: 1; }
.chart-plan { fill: none; stroke: #4776c5; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-marker { fill: var(--orange); stroke: white; stroke-width: 3; }
.measurement-performance { margin: 18px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.schedule-chart-title { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.schedule-chart-title h3 { margin: 0; font-size: 14px; }
.schedule-chart-title p { margin: 2px 0 0; font-size: 11px; }
.measurement-estimate { text-align: right; }
.measurement-estimate span { display: block; color: var(--muted); font-size: 10px; }
.measurement-estimate strong { font-size: 12px; }
.measurement-metrics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.measurement-metrics span { padding: 4px 8px; border-radius: 99px; color: var(--green-dark); background: #e7f0e9; font-size: 10px; font-weight: 750; }
.measurement-chart { margin-top: 8px; }
.chart-reference { fill: none; stroke: #aab5ad; stroke-width: 2; stroke-dasharray: 5 5; }
.chart-measurement { fill: none; stroke: var(--green); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart-projection { fill: none; stroke: var(--orange); stroke-width: 3; stroke-dasharray: 7 5; }
.chart-measurement-marker { fill: var(--green); stroke: white; stroke-width: 3; }
.chart-legend { display: flex; justify-content: center; gap: 16px; color: var(--muted); font-size: 10px; }
.chart-legend span::before { display: inline-block; width: 18px; height: 3px; margin: 0 5px 3px 0; background: #aab5ad; content: ""; }
.chart-legend .legend-measurement::before { background: var(--green); }
.chart-legend .legend-projection::before { background: var(--orange); }
.chart-legend .legend-plan::before { background: #4776c5; }

.curva-s-chart { position: relative; }
.chart-area { fill: rgba(31, 107, 79, .12); stroke: none; }
.chart-line { fill: none; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-line-planejado { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 6 5; stroke-linejoin: round; stroke-linecap: round; }
.chart-point { fill: var(--green); stroke: white; stroke-width: 2; }
.curva-s-tooltip { position: absolute; transform: translate(-50%, -130%); display: flex; flex-direction: column; align-items: center; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; white-space: nowrap; }
.curva-s-tooltip strong { font-size: 13px; color: var(--green); }
.curva-s-tooltip span { color: var(--muted); font-size: 10px; }
.curva-s-legend { margin-top: 6px; }
.curva-s-legend span::before { display: inline-block; width: 18px; height: 3px; margin: 0 5px 3px 0; content: ""; }
.curva-s-legend .curva-s-legend-planejado::before { background: #94a3b8; }
.curva-s-legend .curva-s-legend-realizado::before { background: var(--green); }
.schedule-table { max-height: 790px; overflow-x: hidden; overflow-y: auto; border: 1px solid var(--line); border-radius: 9px; }
.schedule-table th, .schedule-table td { padding: 8px 10px; font-size: 11px; text-align: center; }
.schedule-table thead { position: sticky; top: 0; z-index: 1; }
.schedule-table tbody tr { height: 39px; }
.schedule-table td:first-child { max-width: 260px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.schedule-table td:first-child span { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 7px; border-radius: 6px; background: #edf1ed; font-weight: 800; vertical-align: middle; }
.schedule-table tbody tr.clickable-row { cursor: pointer; }
.schedule-table tbody tr.clickable-row:hover { background: #f0f5f0; }
.schedule-concluida td:first-child span { color: white; background: var(--green); }
.schedule-em_andamento { background: #fff8e9; }
.schedule-em_andamento td:first-child span { color: white; background: var(--orange); }
.schedule-register { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; }
.schedule-register-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.schedule-register-head span { color: var(--danger); font-weight: 800; }
.schedule-register-head span.complete { color: var(--green); }
.schedule-register-rows { display: grid; gap: 8px; }
.schedule-register-row { display: grid; grid-template-columns: 34px minmax(220px, 1fr) 130px 18px; align-items: center; gap: 8px; }
.schedule-register-row > strong { text-align: center; }
.schedule-register-row input { min-height: 40px; }
.module-panel { padding: 24px; }
.pendencias-panel { margin-bottom: 20px; border: 1px solid #ecd2ab; }
.pendencia-quantidade { width: 48px; font-size: 18px; font-weight: 800; text-align: center; }
.linha-selecionada { background: #e6efe9; }
.linha-total td { border-top: 2px solid var(--border, #ddd); background: #f5f8f5; }
#ficha-servicos { scroll-margin-top: 20px; }
.module-metrics { margin-top: 18px; }
.house-list-heading { margin-top: 30px; }
.house-operational-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 18px; }
.house-search { display: grid; grid-template-columns: minmax(280px, 1fr) auto auto; align-items: end; gap: 10px; margin: 14px 0; padding: 18px; border-radius: 11px; background: #f5f8f5; }
.house-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; gap: 10px; margin: 14px 0 20px; padding: 18px; border-radius: 11px; background: #f5f8f5; }
.house-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.house-filters input:not([type="checkbox"]), .house-filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 13px; }
.checkbox-inline { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 600; font-size: 13px; }
.etapas-aplicar-lote { margin: 14px 0 20px; padding: 18px; border-radius: 11px; background: #f5f8f5; }
.etapas-aplicar-lote .house-filters { margin: 12px 0 0; padding: 0; background: transparent; }
.etapa-avanco-hint { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }
.etapas-aplicar-lote ~ .table-wrap input[type="checkbox"] { width: 15px; height: 15px; min-width: 15px; min-height: 15px; padding: 0; accent-color: var(--green); vertical-align: middle; }
.checkbox-inline input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; min-height: auto; margin: 0; accent-color: var(--green); }
.funcoes-checklist > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-top: 8px; }
.funcoes-checklist label { display: flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 600; font-size: 13px; }
.funcoes-checklist input[type="checkbox"] { flex: 0 0 auto; width: 15px; height: 15px; min-width: 15px; min-height: 15px; padding: 0; margin: 0; accent-color: var(--green); }
.photo-filters-actions { display: flex; gap: 10px; }
.casas-resumo-linha { margin: 4px 0 0; color: var(--ink); font-size: 14px; }
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f0f5f0; }
.alerta-linha { background: #fbeceb; }
.alerta-linha:hover { background: #f6d4d1; }
.perimetro-ok { color: #2e7d32; font-weight: 600; white-space: nowrap; }
.perimetro-fora { color: var(--danger); font-weight: 600; white-space: nowrap; }
.quick-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.quick-filters a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: white; font-size: 12px; font-weight: 750; }
.quick-filters a.active { border-color: var(--green); color: white; background: var(--green); }
.document-filters { display: grid; grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(135px, .7fr)) auto auto; align-items: end; gap: 10px; margin: 18px 0 12px; padding: 16px; border-radius: 11px; background: #f5f8f5; }
.document-quick-filters { margin-bottom: 10px; }
.document-results { margin: 8px 0 18px; color: var(--muted); font-size: 13px; }
.document-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 16px 0; }
.document-summary article { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf8; }
.document-summary span { display: block; color: var(--muted); font-size: 12px; }
.document-summary strong { display: block; margin-top: 5px; font-size: 22px; }
.operational-metrics { grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.house-operations-table th a { color: inherit; }
.house-operations-table td:nth-child(4) { min-width: 245px; }
.house-operations-table td:last-child { width: 1%; text-align: right; }
.module-empty { min-height: 310px; display: grid; place-items: center; align-content: center; text-align: center; }
.module-empty p { max-width: 520px; color: var(--muted); }
.module-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 12px; border-radius: 14px; color: var(--green-dark); background: #e6efe9; font-size: 13px; font-weight: 850; }
.house-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.house-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.house-card span { display: block; color: var(--muted); font-size: 12px; }
.house-card-info { min-width: 0; flex: 1; }
.house-progress { --progress-color: #6982a8; display: grid; gap: 7px; min-width: 210px; }
.house-progress > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.house-progress > div > strong { font-size: 18px; }
.house-progress small { color: var(--muted); font-size: 11px; }
.house-progress progress { width: 100%; height: 14px; overflow: hidden; border: 0; border-radius: 99px; background: #e5ebe6; accent-color: var(--progress-color); }
.house-progress progress::-webkit-progress-bar { border-radius: 99px; background: #e5ebe6; }
.house-progress progress::-webkit-progress-value { border-radius: 99px; background: var(--progress-color); }
.house-progress progress::-moz-progress-bar { border-radius: 99px; background: var(--progress-color); }
.progress-nao_iniciada { --progress-color: #9aa29d; }
.progress-cadastrada { --progress-color: #4f7dbb; }
.progress-com_pendencia { --progress-color: #d39a27; }
.progress-em_execucao { --progress-color: #2e9a67; }
.progress-concluida { --progress-color: #155c42; }
.progress-paralisada { --progress-color: #b63d3d; }
.house-status, .document-status { display: inline-block; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.house-status-nao_iniciada { color: #555f59; background: #e7eae8; }
.house-status-cadastrada { color: #315f9d; background: #e0eaf7; }
.house-status-com_pendencia { color: #7d5412; background: #fbebc8; }
.house-status-em_execucao { color: #155c42; background: #d8f0e4; }
.house-status-concluida { color: white; background: #154b38; }
.house-status-paralisada { color: white; background: #a83434; }
.house-status-nao_iniciado { color: #555f59; background: #e7eae8; }
.house-status-paralisado { color: white; background: #a83434; }
.house-status-aguardando_material { color: #7d5412; background: #fbebc8; }
.house-status-concluido { color: white; background: #154b38; }
.house-status-pendente { color: #7d5412; background: #fbebc8; }
.house-status-aprovada { color: #155c42; background: #d8f0e4; }
.house-status-rejeitada { color: white; background: #a83434; }
.house-status-medido { color: #315f9d; background: #e0eaf7; }
.house-status-pago { color: white; background: #1f6b4f; }
.house-status-critico { color: white; background: #a83434; }
.house-status-baixo { color: #7d5412; background: #fbebc8; }
.house-status-normal { color: #155c42; background: #d8f0e4; }
.document-status.complete { color: #155c42; background: #d8f0e4; }
.document-status.missing { color: #8d3535; background: #f8dddd; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.pagination-bar form, .pagination-bar label { display: flex; align-items: center; gap: 8px; }
.pagination-bar select { width: auto; min-height: 36px; }
.pagination-tamanhos { display: flex; align-items: center; gap: 6px; color: var(--muted, #6b7280); font-size: 13px; }
.pagination-tamanhos a { padding: 2px 8px; border-radius: 6px; color: inherit; text-decoration: none; }
.pagination-tamanhos a.active { background: var(--verde, #1f6f4a); color: #fff; font-weight: 600; }
.button.disabled { opacity: .45; cursor: default; pointer-events: none; }


.house-selector { display: grid; grid-template-columns: minmax(220px, 360px) auto; align-items: end; justify-content: start; gap: 10px; margin: 6px 0 24px; padding: 18px; border-radius: 11px; background: #f5f8f5; }
.back-link { font-size: 13px; font-weight: 700; display: inline-block; margin-bottom: 10px; }
.house-nav { display: flex; gap: 5px; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.house-summary-panel { background: #e6efe9; border-color: #b8cbbf; margin-bottom: 18px; }
.house-summary-panel .panel-heading { margin-bottom: 0; }
.house-summary-metrics { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; flex: 1; }
.house-summary-metrics article { display: flex; flex-direction: column; justify-content: center; min-height: 74px; padding: 10px 16px; border: 1px solid #b8cbbf; border-radius: 11px; background: var(--surface); }
.house-summary-metrics span { display: block; color: var(--muted); font-size: 12px; }
.house-summary-metrics strong { display: block; margin-top: 3px; font-size: 1.05rem; line-height: 1.25; }
.house-nav a { flex: 0 0 auto; padding: 9px 11px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.report-picker { position: relative; }
.report-picker summary { list-style: none; cursor: pointer; }
.report-picker summary::-webkit-details-marker { display: none; }
.report-picker form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; display: flex; flex-direction: column; gap: 9px; min-width: 260px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 28px rgba(31, 49, 40, .12); }
.report-picker label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.report-picker label input { width: auto; min-height: auto; }
.report-picker form button { margin-top: 6px; }
.house-nav a.active { border-color: var(--green); color: var(--green-dark); }
.photo-grid {
  display: flex; flex-wrap: nowrap; gap: 12px; margin-bottom: 18px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.photo-grid::-webkit-scrollbar { height: 6px; }
.photo-grid::-webkit-scrollbar-track { background: transparent; }
.photo-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.galeria-fotos-mapa-oculta .photo-grid { display: none; }
.photo-thumb-wrap { position: relative; flex: 0 0 160px; }
.photo-thumb-checkbox { position: absolute; top: 8px; left: 8px; z-index: 2; width: 20px; height: 20px; min-height: auto; accent-color: var(--green); cursor: pointer; }
.photo-thumb { position: relative; display: block; width: 160px; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #101512; box-shadow: var(--shadow); cursor: zoom-in; }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .15s ease; }
.photo-thumb:hover img { transform: scale(1.05); }
.photo-thumb-legenda { position: absolute; inset: auto 0 0 0; overflow: hidden; padding: 6px 10px; color: white; font-size: 11px; text-align: left; text-overflow: ellipsis; white-space: nowrap; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); }
.lightbox { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 40px; background: rgba(9, 14, 11, .92); }
.lightbox[hidden] { display: none; }
.lightbox figure { position: relative; display: flex; flex-direction: column; align-items: center; max-width: min(90vw, 1100px); max-height: 90vh; margin: 0; }
.lightbox figure[data-lightbox-moldura] { overflow: hidden; border-radius: 8px; }
.lightbox img { max-width: 100%; max-height: 74vh; border-radius: 8px; object-fit: contain; background: #101512; cursor: zoom-in; touch-action: none; -webkit-user-select: none; user-select: none; will-change: transform; transition: transform .15s ease; }
.lightbox img.arrastando { transition: none; }
.lightbox img.zoom-ativo { cursor: grab; border-radius: 0; }
.lightbox figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; margin-top: 12px; color: white; text-align: center; }
.lightbox figcaption span { color: #aebbb4; font-size: 12px; }
.lightbox-dica { flex-basis: 100%; opacity: .65; }
.local-ponto-modal { position: fixed; inset: 0; z-index: 4000; display: grid; place-items: center; padding: 24px; background: rgba(9, 14, 11, .78); }
.local-ponto-modal[hidden] { display: none; }
.local-ponto-card { position: relative; width: min(640px, 92vw); max-height: 90vh; overflow-y: auto; background: var(--branco, #fff); border-radius: 10px; padding: 20px; }
.local-ponto-card h3 { margin: 0 0 12px; padding-right: 28px; font-size: 16px; }
.local-ponto-fechar { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 22px; line-height: 1; cursor: pointer; color: inherit; }
.local-ponto-mapa { height: 280px; border-radius: 8px; margin-bottom: 12px; background: #eef1ee; }
.local-ponto-mapa[hidden] { display: none; }
.mapa-ponto-geral { height: 520px; border-radius: 10px; background: #eef1ee; }
.local-ponto-fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.local-ponto-foto { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 88px; font-size: 11px; text-decoration: none; color: inherit; }
.local-ponto-foto img { width: 88px; height: 88px; object-fit: cover; border-radius: 6px; background: #101512; }

.lightbox-fechar { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border: 0; border-radius: 50%; color: white; background: rgba(255, 255, 255, .12); cursor: pointer; font-size: 24px; line-height: 1; }
.lightbox-fechar:hover { background: rgba(255, 255, 255, .24); }
.lightbox-botao { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 48px; height: 56px; border: 0; border-radius: 10px; color: white; background: rgba(255, 255, 255, .12); cursor: pointer; font-size: 34px; }
.lightbox-botao:hover { background: rgba(255, 255, 255, .24); }
.lightbox-botao.anterior { left: 18px; }
.lightbox-botao.proxima { right: 18px; }
body.lightbox-aberto { overflow: hidden; }
.map-panel { margin-top: 18px; padding: 22px; }
.gps-map { width: 100%; height: 440px; border-radius: 10px; background: #e9eee9; }
.mapa-tooltip-link { pointer-events: auto; cursor: pointer; }
.mapa-tooltip-link a { color: inherit; text-decoration: none; }
.mapa-tooltip-link a:hover { text-decoration: underline; }
.coordinates-line { margin: 10px 0 0; color: var(--muted); text-align: center; }
.location-actions { display: flex; align-items: center; gap: 12px; }
dl { margin: 0 0 20px; }
dl div { display: grid; grid-template-columns: 110px 1fr; padding: 9px 0; border-bottom: 1px solid var(--line); }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 650; }
.timeline { max-height: 310px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.timeline li { position: relative; padding: 0 0 17px 18px; border-left: 2px solid #dfe8e2; }
.timeline li::before { position: absolute; top: 4px; left: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); content: ""; }
.timeline span, .timeline small { display: block; color: var(--muted); }
.timeline-compact { max-height: none; }
.timeline-compact li { padding-bottom: 10px; }
.timeline-compact small { display: inline; margin-right: 8px; color: var(--ink); font-weight: 700; }
.timeline-compact span { display: inline; color: var(--ink); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.panel-heading-actions { display: flex; align-items: center; gap: 10px; }
.tabs { display: flex; gap: 5px; }
.tabs a { padding: 6px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; }
.tabs a.active { color: var(--green-dark); background: #e6efe9; font-weight: 750; }
.file-row { display: grid; grid-template-columns: 48px minmax(220px, 1fr) 170px auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.file-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; color: var(--green-dark); background: #e7f0e9; font-size: 10px; font-weight: 850; }
.file-main span { display: block; color: var(--muted); font-size: 13px; }
.file-row > small { color: var(--muted); }

.form-panel { max-width: 850px; padding: 26px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid > label { align-self: start; width: 100%; }
.app-modulo-grupo { border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 6px; margin: 0 0 18px; background: #fafaf9; }
.app-modulo-grupo legend { padding: 0 8px; font-weight: 750; font-size: 14px; color: #2f3a33; }
.app-modulo-grupo-trava { background: #fdf6e8; border-color: #e6cf9a; }
.form-stack { display: grid; gap: 17px; }
label { display: grid; gap: 7px; color: #364139; font-size: 13px; font-weight: 720; }
label:has(> input[type="checkbox"]) { display: flex; align-items: center; gap: 8px; }
label:has(> input[type="checkbox"]) input[type="checkbox"] { order: -1; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cfd6d0; border-radius: 8px; color: var(--ink); background: white; font: inherit; }
input[type="checkbox"] { width: 16px; height: 16px; min-width: 16px; min-height: 16px; padding: 0; accent-color: var(--green); }
input:disabled, select:disabled, textarea:disabled { background: #f1f3f1; color: var(--muted); cursor: not-allowed; }
.data-armazenada { border-color: #8fb39c; color: #123c2d; background: #e8f3eb; font-weight: 750; }
.data-armazenada:disabled { color: #123c2d; background: #e8f3eb; opacity: 1; cursor: not-allowed; }
.campo-armazenado, .campo-armazenado:disabled { border-color: #8fb39c; color: #123c2d; background: #e8f3eb; font-weight: 750; opacity: 1; cursor: not-allowed; }
.campo-bloqueado, .campo-bloqueado:disabled { color: #6f7872; background: #eef0ee; opacity: 1; cursor: not-allowed; }
input[type="date"]:disabled:not(.data-armazenada) { color: #7a837d; background: #eef0ee; opacity: 1; cursor: not-allowed; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(31, 107, 79, .15); border-color: var(--green); }
textarea { resize: vertical; }
.span-2 { grid-column: span 2; }
.field-error { color: var(--danger); }
.text-danger { color: var(--danger) !important; }
.text-info { color: #2563eb !important; }
.text-success { color: var(--green) !important; }
.text-warning { color: #7d5412 !important; }
.field-status { color: var(--muted); font-size: 12px; }
.field-status.success { color: var(--green); }
.field-status.error { color: var(--danger); }
.form-section { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section h2 { margin: 0; }
.form-section p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.field-calculated-total { display: block; margin-top: 7px; color: var(--green); font-size: 12px; font-weight: 700; }
.financial-ceiling-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px; border: 1px solid #b9d1c2; border-radius: 10px; background: #f0f6f2; }
.financial-ceiling-summary span { display: grid; gap: 4px; min-width: 0; }
.financial-ceiling-summary small { color: var(--muted); font-size: 11px; }
.financial-ceiling-summary strong { font-size: 14px; overflow-wrap: anywhere; }
.financial-ceiling-summary.exceeded { border-color: #e2aaa5; background: #fff1ef; }
.financial-value { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.beneficiary-source { margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.beneficiary-source h2 { margin: 2px 0 0; }
.beneficiary-details { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 10px 0 0; }
.beneficiary-details div { grid-template-columns: 135px minmax(0, 1fr); }
.empty-beneficiary { padding: 6px 0; }
.empty-beneficiary h2 { margin-bottom: 8px; }
.empty-beneficiary .button { margin-top: 8px; }
.total-uh-inline { color: var(--green); font-size: 12px; font-weight: 700; text-align: right; }
.hint { margin: -4px 0 0; font-size: 13px; }

.campo-arquivo { display: flex; flex-direction: column; gap: 6px; }
.campo-arquivo-atual { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; padding: 6px 10px; background: #f5f5f4; border-radius: 6px; }
.campo-arquivo-atual a { word-break: break-all; }
.campo-arquivo-remover { display: flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 500; white-space: nowrap; cursor: pointer; }
.campo-arquivo-remover input { width: auto; }
.empty { padding: 28px; color: var(--muted); text-align: center; }
.app-footer { padding: 28px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.login-shell { display: grid; place-items: center; width: 100%; }
.login-card { width: min(430px, 100%); padding: 36px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.confirm-card { max-width: 560px; margin: 70px auto; padding: 30px; }
.message { margin-bottom: 18px; padding: 12px 15px; border: 1px solid #add1bc; border-radius: 9px; color: #155c42; background: #e5f4eb; }
.message.error { border-color: #e4b8b8; color: #8d3535; background: #fbeaea; }
.disbursement-view { display: grid; gap: 24px; }
.disbursement-view-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.disbursement-view-header span, .disbursement-view-metrics span { color: var(--muted); font-size: 12px; }
.disbursement-view-header h2 { margin: 3px 0 0; font-size: 1.55rem; }
.finance-status { padding: 7px 12px; border-radius: 99px; font-weight: 800; }
.finance-status-previsto { color: #555f59 !important; background: #e7eae8; }
.finance-status-solicitado { color: #7d5412 !important; background: #fbebc8; }
.finance-status-liberado { color: #155c42 !important; background: #d8f0e4; }
.finance-status-estornado { color: #8d3535 !important; background: #f8dddd; }
.severidade-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.severidade-chip-critico { color: #8d3535; background: #f8dddd; }
.severidade-chip-baixo { color: #7d5412; background: #fbebc8; }
.severidade-chip-proximo { color: #7d5412; background: #fbf3d8; }
.severidade-chip-normal { color: #155c42; background: #d8f0e4; }
tr.linha-severidade-critico { background: #fdf2f2; }
tr.linha-severidade-critico:hover { background: #fbe6e6; }
tr.linha-severidade-baixo { background: #fdf8ec; }
tr.linha-severidade-baixo:hover { background: #faf0d8; }
.file-row-critico { background: #fdf2f2; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 8px; }
.file-row-atencao { background: #fdf8ec; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-radius: 8px; }
.disbursement-view-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.disbursement-view-metrics article { padding: 18px; border: 1px solid var(--line); border-radius: 11px; background: #f8faf8; }
.disbursement-view-metrics strong { display: block; margin-top: 6px; font-size: 1.55rem; }
.disbursement-composition h3 { margin: 0 0 12px; }
.disbursement-composition-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.disbursement-composition-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8faf8; }
.disbursement-composition-grid span { display: block; color: var(--muted); font-size: 12px; }
.disbursement-composition-grid strong { display: block; margin-top: 5px; font-size: 1.2rem; }
.disbursement-history h3, .disbursement-notes h3 { margin: 0 0 12px; }
.disbursement-date-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.disbursement-date-grid article { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbf9; }
.disbursement-date-grid article > span { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 50%; color: var(--muted); background: #e7eae8; font-weight: 800; }
.disbursement-date-grid article.completed > span { color: white; background: var(--green); }
.disbursement-date-grid article.estornado > span { background: var(--danger); }
.disbursement-date-grid small { display: block; color: var(--muted); }
.disbursement-date-grid strong { display: block; margin-top: 2px; }
.disbursement-notes { padding: 17px; border-radius: 11px; background: #f8faf8; }
.disbursement-notes p { margin: 0; color: var(--muted); }

@media (max-width: 800px) {
  .sidebar-toggle { display: flex; }
  .sidebar-backdrop { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 50; width: 82vw; max-width: 300px;
    height: 100vh; transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, .3);
  }
  .app-shell.sidebar-aberta .sidebar { transform: translateX(0); }
  .app-shell.sidebar-aberta .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .sidebar-brand-text small { display: none; }
  .app-shell .container { padding-top: 62px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics-6col { grid-template-columns: repeat(3, 1fr); }
  .metrics-stat-cards { grid-template-columns: repeat(3, 1fr); }
  .house-summary-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .info-overview-heading { flex-direction: column; }
  .execution-indicators { width: 100%; }
  .house-grid { grid-template-columns: 1fr 1fr; }
  .file-row { grid-template-columns: 42px 1fr; }
  .file-row > small, .file-row > .actions { grid-column: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .beneficiary-details { grid-template-columns: 1fr; }
  .schedule-register-row { grid-template-columns: 30px minmax(150px, 1fr) 90px 16px; }
  .quick-grid { grid-template-columns: 1fr; }
  .inline-filters { grid-template-columns: 1fr; }
  .house-search { grid-template-columns: 1fr; }
  .document-filters { grid-template-columns: 1fr 1fr; }
  .document-summary { grid-template-columns: repeat(3, 1fr); }
  .operational-metrics { grid-template-columns: 1fr 1fr; }
  .disbursement-date-grid { grid-template-columns: 1fr; }
  .disbursement-composition-grid { grid-template-columns: 1fr 1fr; }
  .financial-ceiling-summary { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-column: span 1; }
  .page-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .topbar nav a { display: none; }
  .metrics { grid-template-columns: 1fr; }
  .metrics-stat-cards { grid-template-columns: 1fr 1fr; }
  .disbursement-view-header { align-items: flex-start; }
  .disbursement-view-metrics { grid-template-columns: 1fr; }
  .disbursement-composition-grid { grid-template-columns: 1fr; }
  .execution-indicators { grid-template-columns: 1fr 1fr; }
  .operational-metrics { grid-template-columns: 1fr; }
  .document-filters { grid-template-columns: 1fr; }
  .document-summary { grid-template-columns: 1fr 1fr; }
  .financial-ceiling-summary { grid-template-columns: 1fr; }
  .house-grid { grid-template-columns: 1fr; }
  .house-selector { grid-template-columns: 1fr; }
  .photo-thumb-wrap { flex-basis: 120px; }
  .photo-thumb { width: 120px; }
  .lightbox { padding: 16px; }
  .lightbox-botao { width: 40px; height: 48px; font-size: 28px; }
  .panel-heading { align-items: start; flex-direction: column; }
  .pagination-bar { align-items: stretch; flex-direction: column; }
  .login-card { padding: 24px; }
}
