:root {
    --ge-gold: #b8860b;
    --ge-gold-soft: rgba(184, 134, 11, .12);
    --sidebar-w: 250px;
    --c-vazio: #2f6db5;
    --c-ponta: #c2410c;
    --c-cheia: #15803d;
}
[data-bs-theme="dark"] {
    --ge-gold: #e0b04a;
    --ge-gold-soft: rgba(224, 176, 74, .15);
}
body { background: var(--bs-tertiary-bg); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--bs-body-bg); border-right: 1px solid var(--bs-border-color); }
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; flex: 0 0 var(--sidebar-w); }
}
.sidebar .brand { display: flex; gap: .5rem; align-items: center; padding: 1rem 1.25rem; font-weight: 700; font-size: 1.1rem; color: var(--bs-body-color); text-decoration: none; }
.sidebar .brand i, .brand-icon { color: var(--ge-gold); font-size: 1.5rem; }
.sidebar .nav-link { color: var(--bs-body-color); padding: .45rem 1.25rem; display: flex; gap: .65rem; align-items: center; border-left: 3px solid transparent; font-size: .93rem; }
.sidebar .nav-link:hover { background: var(--ge-gold-soft); }
.sidebar .nav-link.active { background: var(--ge-gold-soft); border-left-color: var(--ge-gold); font-weight: 600; }
.sidebar .nav-section { padding: 1rem 1.25rem .25rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.25rem; background: var(--bs-body-bg); border-bottom: 1px solid var(--bs-border-color); position: sticky; top: 0; z-index: 10; }
.content { padding: 1.25rem; flex: 1; }
.footer { padding: .75rem 1.25rem; border-top: 1px solid var(--bs-border-color); }
.card { border-color: var(--bs-border-color-translucent); }
.kpi .card-body { padding: 1rem 1.1rem; }
.kpi .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); }
.kpi .value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.kpi .sub { font-size: .8rem; color: var(--bs-secondary-color); }
.kpi i.kpi-icon { font-size: 1.6rem; color: var(--ge-gold); opacity: .8; }
.estimate { border: 1px dashed var(--ge-gold) !important; background: var(--ge-gold-soft) !important; }
.badge-estimate { background: var(--ge-gold-soft); color: var(--ge-gold); border: 1px solid var(--ge-gold); font-weight: 600; }
.total-highlight { font-size: 2.1rem; font-weight: 800; color: var(--ge-gold); }
.table-sm td, .table-sm th { white-space: nowrap; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table thead th a { color: inherit; text-decoration: none; }
.table thead th a:hover { text-decoration: underline; }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 380px; }
.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.dot-vazio { background: var(--c-vazio); } .dot-ponta { background: var(--c-ponta); } .dot-cheia { background: var(--c-cheia); }
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.auth-card { width: 100%; max-width: 420px; }
.editor-table input, .editor-table select { min-width: 5.5rem; font-size: .85rem; }
.editor-table input.wide { min-width: 16rem; }
.progress { height: 1.25rem; }
.import-log { max-height: 420px; overflow-y: auto; }
pre.log { font-size: .78rem; max-height: 70vh; overflow: auto; white-space: pre-wrap; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bs-body-bg); border-top: 1px solid var(--bs-border-color); padding: .75rem; z-index: 5; }
@media print {
    .sidebar, .topbar, .footer, .no-print, .btn { display: none !important; }
    .content { padding: 0; }
    body { background: #fff; }
}
