:root {
  --rb: #1f4e5f;
  --rb-escuro: #163a47;
}

body { background: #f4f6f8; }

.bg-rb { background: var(--rb); }
.text-rb { color: var(--rb); }

.btn-rb { background: var(--rb); color: #fff; border-color: var(--rb); }
.btn-rb:hover, .btn-rb:focus { background: var(--rb-escuro); color: #fff; border-color: var(--rb-escuro); }

.card { border: 0; }
.card-header { background: #fff; font-weight: 600; }

.indicador .valor { font-size: 1.5rem; font-weight: 700; }
.indicador .rotulo { color: #6c757d; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

.table td, .table th { vertical-align: middle; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.foto-miniatura { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: .375rem; }

/* Tela de escolha da obra */
.cartao-obra { transition: transform .12s, box-shadow .12s; overflow: hidden; }
.cartao-obra:hover { transform: translateY(-3px); box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12) !important; }
.cartao-obra-atual { outline: 3px solid var(--rb); }
.capa-obra { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.capa-vazia { display: flex; align-items: center; justify-content: center; background: #e3e9ec; color: #9fb1b9; font-size: 3rem; }

.status-andamento { background: #fd7e14; }
.status-planejamento { background: #0d6efd; }
.status-pausada { background: #6c757d; }
.status-concluida { background: #198754; }

/* Obra ativa na barra superior */
.obra-ativa img, .obra-ativa .sem-foto { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.obra-ativa .sem-foto { display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .2); }
.capa-detalhe { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; border-radius: .375rem .375rem 0 0; }

/* Blocos de custo */
.tipo-mao_obra { background: #0b7a8a; }
.tipo-material { background: #8a6d0b; }
.tipo-projeto { background: #6f42c1; }
.tipo-imposto { background: #b02a37; }
.tipo-terreno { background: #3d7a2a; }
.topico { border-top: 4px solid transparent !important; }
.topico-mao_obra { border-top-color: #0b7a8a !important; }
.topico-material { border-top-color: #8a6d0b !important; }
.topico-projeto { border-top-color: #6f42c1 !important; }
.topico-imposto { border-top-color: #b02a37 !important; }
.topico-terreno { border-top-color: #3d7a2a !important; }
.topico-linha { border-top: 0 !important; border-left: 4px solid; }
.topico-linha.topico-mao_obra { border-left-color: #0b7a8a; }
.topico-linha.topico-material { border-left-color: #8a6d0b; }
.topico-linha.topico-projeto { border-left-color: #6f42c1; }
.topico-linha.topico-imposto { border-left-color: #b02a37; }
.topico-linha.topico-terreno { border-left-color: #3d7a2a; }

/* Cronograma */
.calendario { table-layout: fixed; min-width: 720px; }
.calendario th { text-align: center; font-size: .85rem; }
.calendario td { height: 110px; vertical-align: top !important; padding: 0 !important; }
.calendario .dia-link { display: block; height: 100%; padding: .35rem; color: inherit; text-decoration: none; }
.calendario .dia-link:hover { background: #eef4f6; }
.calendario .numero-dia { font-weight: 600; }
.calendario .fora-do-mes { background: #f8f9fa; }
.calendario .fora-do-mes .dia-link { color: #adb5bd; }
.calendario .dia-hoje { box-shadow: inset 0 0 0 2px var(--rb); }
.calendario .servico-dia { font-size: .75rem; background: #e3eef1; border-radius: .25rem; padding: 0 .3rem; margin-top: .2rem; }
.calendario .adicionar-dia { opacity: 0; text-align: center; margin-top: 1.2rem; }
.calendario .dia-link:hover .adicionar-dia { opacity: 1; }

.etapa-concluida { color: #198754; }
.etapa-andamento { color: #fd7e14; }
.etapa-pendente { color: #adb5bd; }
/* Feriados no cronograma */
.calendario .dia-feriado { background: #fde4e4; }
.calendario .dia-feriado .dia-link:hover { background: #fbd3d3; }
.calendario .fora-do-mes.dia-feriado { background: #fdf1f1; }
.calendario .nome-feriado { font-size: .7rem; color: #b02a37; font-weight: 600; margin-top: .1rem; }
.legenda-feriado { display: inline-block; width: .9rem; height: .9rem; background: #fde4e4; border: 1px solid #f1aeb5; border-radius: .2rem; vertical-align: -2px; }
