:root {
    --portal-navy:#173b5f;
    --portal-blue:#246ba5;
    --portal-bg:#f3f6f9;
    --ops-ink:#17212b;
    --ops-muted:#667788;
    --ops-border:#dfe6ed;
    --ops-accent:#0d6efd;
}
body.portal { background:var(--portal-bg); color:#1d2935; }
.portal-nav { background:var(--portal-navy); }
.portal-card { border:0; border-radius:1rem; box-shadow:0 .35rem 1.5rem rgba(23,59,95,.09); }
.portal-card .card-body { padding:1.5rem; }
.portal-disabled { opacity:.65; cursor:not-allowed; }
.portal-step { width:2rem; height:2rem; background:#dbeaf7; color:var(--portal-navy); border-radius:50%; display:inline-grid; place-items:center; font-weight:700; }

/* Operação / apresentação */
body.ops-body { background:#f5f7fa; color:var(--ops-ink); }
.ops-navbar { background:#17212b; box-shadow:0 2px 12px rgba(0,0,0,.10); }
.ops-navbar .navbar-brand { font-weight:700; letter-spacing:.01em; }
.ops-navbar .navbar-brand small { display:block; font-size:.62rem; font-weight:500; color:#aeb9c3; letter-spacing:.08em; text-transform:uppercase; margin-top:-.15rem; }
.ops-navbar .nav-link { border-radius:.45rem; padding:.45rem .65rem !important; }
.ops-navbar .nav-link.active { color:#fff !important; background:rgba(255,255,255,.12); }
.ops-user { display:flex; align-items:center; gap:.6rem; color:#fff; }
.ops-user-avatar { width:2rem; height:2rem; border-radius:50%; display:grid; place-items:center; background:#fff; color:#17212b; font-weight:700; font-size:.78rem; }
.ops-user-meta { line-height:1.05; }
.ops-user-meta strong { display:block; font-size:.78rem; }
.ops-user-meta span { display:block; color:#aeb9c3; font-size:.68rem; margin-top:.15rem; }
.ops-shell { max-width:1800px; margin:0 auto; }
.ops-page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1.35rem; }
.ops-page-header h1 { font-weight:650; letter-spacing:-.02em; margin-bottom:.25rem; }
.ops-page-header p { color:var(--ops-muted); margin-bottom:0; }
.ops-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.5rem; }
.ops-table-card, .ops-card { border:1px solid var(--ops-border); border-radius:.8rem; box-shadow:0 .2rem .75rem rgba(23,33,43,.055); overflow:hidden; }
.ops-table-card .card-header, .ops-card .card-header { background:#fff; border-bottom:1px solid var(--ops-border); }
.ops-toolbar { background:#fff; border:1px solid var(--ops-border); border-radius:.8rem; padding:1rem; box-shadow:0 .2rem .75rem rgba(23,33,43,.04); }
.ops-create-panel { border:1px solid #b9d5ff; border-left:4px solid var(--ops-accent); border-radius:.8rem; background:#fff; box-shadow:0 .25rem 1rem rgba(13,110,253,.08); }
.ops-create-panel .ops-create-title { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem 1.15rem; border-bottom:1px solid #e5edf7; }
.ops-create-panel .ops-create-body { padding:1.15rem; }
.ops-section-title { font-size:.76rem; text-transform:uppercase; letter-spacing:.06em; font-weight:700; color:#647382; }
.ops-quick-actions .btn { min-width:8.5rem; }
.table > :not(caption) > * > * { border-color:#e3e8ed; }
.table thead th { color:#3d4a57; font-size:.78rem; text-transform:uppercase; letter-spacing:.025em; white-space:nowrap; }
.btn-primary { box-shadow:0 .15rem .4rem rgba(13,110,253,.16); }
.btn .plus-mark { font-weight:700; margin-right:.3rem; }
.demo-banner { background:#fff8db; color:#5f4b00; border:1px solid #f2de8a; border-radius:.7rem; padding:.65rem .9rem; font-size:.82rem; }
.demo-banner strong { color:#4f3e00; }

/* Indicador visual de atualização */
.r-staleness { display:inline-block; width:1.1rem; height:1.1rem; border-radius:50%; vertical-align:middle; box-shadow:0 0 0 2px rgba(0,0,0,.05); }
.r-staleness-green { background:#198754; }
.r-staleness-yellow { background:#ffc107; }
.r-staleness-red { background:#dc3545; }

/* KPI cards */
.kpi-card { border:1px solid var(--ops-border) !important; border-radius:.8rem; box-shadow:0 .2rem .75rem rgba(23,33,43,.055) !important; }
.kpi-card .kpi-label { display:block; font-size:.72rem; text-transform:uppercase; color:#6c757d; letter-spacing:.05em; font-weight:700; }
.kpi-card .kpi-value { display:block; font-size:1.9rem; font-weight:750; line-height:1.2; margin:.25rem 0 .25rem; }
.kpi-card .kpi-sub { display:block; }
.reference-card .card-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.reference-card .card-header h2 { margin:0; }

@media (max-width: 991px) {
    .ops-page-header { flex-direction:column; }
    .ops-actions { width:100%; justify-content:flex-start; }
    .ops-user-meta { display:none; }
}
@media (max-width: 575px) {
    .portal-card .card-body { padding:1.25rem; }
    .portal-nav .navbar-brand { font-size:1rem; }
    .ops-shell { padding-left:.75rem !important; padding-right:.75rem !important; }
    .demo-banner { margin-left:.75rem !important; margin-right:.75rem !important; }
    .ops-quick-actions .btn { flex:1 1 45%; min-width:0; }
}
