:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --surface: #f8fafc;
    --surface-alt: #f1f5f9;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-muted: #64748b;
}

body {
    background: var(--surface);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -.02em;
}

.card {
    border: 1px solid var(--border);
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}

.card-header {
    font-weight: 600;
    letter-spacing: -.01em;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary);
}

.table-params {
    font-size: .82rem;
}

.table-params th {
    background: var(--surface-alt);
    font-weight: 600;
    white-space: nowrap;
    vertical-align: middle;
    font-size: .78rem;
}

.table-params td {
    vertical-align: middle;
}

.table-params input,
.table-params select {
    font-size: .82rem;
    padding: .25rem .4rem;
    border-radius: .375rem;
}

.table-params .form-control {
    min-width: 60px;
}

.table-params .form-control-name {
    min-width: 200px;
}

.input-highlight {
    background: #fef2f2;
    border-color: #fca5a5;
}

.input-highlight:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(239, 68, 68, .15);
}

.result-card {
    background: white;
    border-left: 4px solid var(--primary);
}

.result-card.success {
    border-left-color: var(--success);
}

.result-card.warning {
    border-left-color: var(--warning);
}

.result-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.result-label {
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.results-table th {
    background: var(--primary);
    color: white;
    font-size: .82rem;
    font-weight: 600;
}

.results-table td {
    font-size: .85rem;
}

.results-table .total-row {
    font-weight: 700;
    background: #eff6ff;
}

.tab-content {
    padding-top: 1rem;
}

.nav-tabs .nav-link {
    font-weight: 500;
    color: var(--text-muted);
    border-radius: .5rem .5rem 0 0;
}

.nav-tabs .nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.btn-calculate {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    padding: .6rem 2.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: .5rem;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .3);
    transition: all .2s;
}

.btn-calculate:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, .4);
    transform: translateY(-1px);
}

.pr-row-disabled {
    opacity: .5;
}

.badge-service {
    font-size: .7rem;
    padding: .3em .6em;
    border-radius: .375rem;
}

.chart-container {
    position: relative;
    height: 320px;
}

#results-section {
    display: none;
}

.sticky-calc {
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: white;
    border-top: 2px solid var(--border);
    padding: .75rem 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .06);
}

.form-label-sm {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: .2rem;
}

.detail-card {
    border-left: 3px solid var(--border);
}

.detail-card .card-header {
    font-size: .88rem;
}

.detail-card .results-table th {
    background: var(--surface-alt);
    color: var(--text);
    font-size: .78rem;
}

.detail-card .results-table td {
    font-size: .82rem;
}

.tooltip-help {
    cursor: help;
    text-decoration: underline dotted;
}

.staff-group-header td {
    background: var(--surface-alt) !important;
    font-weight: 700;
    font-size: .85rem;
    color: var(--text);
    padding: .5rem .75rem !important;
    border-bottom: 2px solid var(--border);
}

.staff-group-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
}

.role-col-header {
    background: var(--primary) !important;
    color: white !important;
}

.text-danger {
    font-weight: 600;
}

@media (max-width: 768px) {
    .table-params {
        font-size: .75rem;
    }
}
