:root {
    --sivop-bg: #f5f6f8;
    --sivop-surface: #ffffff;
    --sivop-border: #dfe4ea;
    --sivop-muted: #6b7280;
    --sivop-text: #111827;
    --sivop-primary-soft: #eaf2ff;
}
html, body {
    min-height: 100vh;
}
.fine-ui {
    color: var(--sivop-text);
    font-size: .875rem;
    background: var(--sivop-bg) !important;
}
.fine-topbar {
    min-height: 46px;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.fine-topbar-inner {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 .75rem;
}
.fine-brand {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: .01em;
    white-space: nowrap;
    padding: .15rem .25rem;
}
.fine-brand:hover {
    color: #000;
}
.fine-nav {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex: 1 1 auto;
    overflow-x: auto;
    scrollbar-width: thin;
}
.fine-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: .25rem .55rem;
    border-radius: .5rem;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    font-size: .86rem;
    line-height: 1;
}
.fine-nav-link:hover {
    background: #f1f3f5;
    color: #111827;
}
.fine-nav-link.active {
    background: var(--sivop-primary-soft);
    color: var(--bs-primary);
    font-weight: 650;
}
.fine-userbar {
    display: flex;
    align-items: center;
    gap: .4rem;
    white-space: nowrap;
}
.fine-user-name {
    color: #4b5563;
    font-size: .82rem;
}
.fine-btn,
.btn-sm {
    --bs-btn-padding-y: .22rem;
    --bs-btn-padding-x: .55rem;
    --bs-btn-font-size: .82rem;
    --bs-btn-border-radius: .45rem;
}
.fine-main {
    max-width: 1920px;
    padding: .85rem .75rem 1.25rem;
}
.fine-alert {
    padding: .5rem .75rem;
    margin-bottom: .75rem;
    border-radius: .55rem;
}
.page-heading {
    margin-bottom: .75rem !important;
}
.page-heading h1,
h1.h2,
h1 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin-bottom: .15rem;
    letter-spacing: -.015em;
}
h2.h5,
.h5 {
    font-size: 1rem;
}
.card {
    border: 1px solid var(--sivop-border) !important;
    border-radius: .65rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04) !important;
}
.card-body {
    padding: .75rem !important;
}
.card-header {
    padding: .55rem .75rem;
    border-bottom-color: var(--sivop-border);
}
.metric-card .card-body {
    padding: .65rem .75rem !important;
}
.display-6 {
    font-size: 1.45rem;
    line-height: 1.05;
}
.row.g-3 {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem;
}
.row.g-2 {
    --bs-gutter-x: .5rem;
    --bs-gutter-y: .5rem;
}
.form-label {
    margin-bottom: .25rem;
    font-size: .78rem;
    color: #4b5563;
    font-weight: 600;
}
.form-control,
.form-select {
    min-height: 32px;
    padding: .32rem .55rem;
    font-size: .86rem;
    border-radius: .45rem;
}
textarea.form-control {
    min-height: 86px;
}
.table {
    --bs-table-bg: #fff;
    font-size: .84rem;
}
.table > :not(caption) > * > * {
    padding: .38rem .5rem;
}
.table th {
    color: #6b7280;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .025em;
    background: #f8fafc;
}
.badge {
    font-weight: 650;
    border-radius: .38rem;
}
.progress {
    background: #e5e7eb;
}
.audit-json {
    white-space: normal;
    word-break: break-word;
    color: var(--bs-pink);
    font-size: .78rem;
}
.rights-table {
    max-height: calc(100vh - 135px);
}
.rights-sticky {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    min-width: 240px;
}
.project-table td {
    vertical-align: middle;
}
.project-value,
.project-state {
    min-width: 200px;
}
.fine-kpi {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.fine-kpi-label {
    color: var(--sivop-muted);
    font-size: .78rem;
}
.fine-kpi-value {
    font-weight: 750;
    font-size: 1.25rem;
    line-height: 1;
}
@media (max-width: 991.98px) {
    .fine-topbar-inner {
        align-items: flex-start;
        flex-wrap: wrap;
        padding-top: .45rem;
        padding-bottom: .45rem;
    }
    .fine-nav {
        order: 3;
        width: 100%;
    }
    .fine-userbar {
        margin-left: auto;
    }
}
@media print {
    .fine-topbar, .btn, .alert, .page-heading .btn { display: none !important; }
    body { background: white !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; }
    .fine-main { padding: 0 !important; }
}