:root {
    --firma-primary: #1a3a5c;
    --firma-accent: #c8a96e;
    --firma-light: #f8f9fa;
    --firma-border: #dee2e6;
}

body {
    background-color: #f5f6fa;
    font-size: 0.9rem;
}

.navbar-brand {
    letter-spacing: 0.05em;
    font-size: 1.2rem;
}

.bg-dark {
    background-color: var(--firma-primary) !important;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border-radius: 8px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--firma-border);
    font-weight: 600;
    padding: 0.875rem 1.25rem;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    border-bottom: 2px solid var(--firma-border);
}

.table-hover tbody tr:hover {
    background-color: rgba(26, 58, 92, 0.04);
    cursor: pointer;
}

/* Badges */
.badge-role {
    background-color: #e8f0fe;
    color: #1a3a5c;
    font-weight: 500;
}

/* Status badges */
.status-open { background-color: #d4edda; color: #155724; }
.status-closed { background-color: #f8d7da; color: #721c24; }
.status-on_hold { background-color: #fff3cd; color: #856404; }
.status-draft { background-color: #e2e3e5; color: #383d41; }
.status-sent { background-color: #d1ecf1; color: #0c5460; }
.status-paid { background-color: #d4edda; color: #155724; }
.status-overdue { background-color: #f8d7da; color: #721c24; }

/* Sidebar layout */
.sidebar {
    width: 260px;
    min-height: calc(100vh - 56px);
    background: white;
    border-right: 1px solid var(--firma-border);
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    font-size: 0.875rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(26, 58, 92, 0.08);
    color: var(--firma-primary);
}

.sidebar .nav-link i {
    width: 20px;
}

/* Timer */
.timer-running {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Forms */
.form-label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #495057;
}

.required-field::after {
    content: ' *';
    color: #dc3545;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--firma-primary);
    margin: 0;
}

/* Stats cards */
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--firma-primary);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Calendar */
.calendar-wrapper {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.deadline-item {
    border-left: 3px solid var(--firma-primary);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(26, 58, 92, 0.04);
    border-radius: 0 4px 4px 0;
}

/* Invoice */
.invoice-preview {
    background: white;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Timesheet */
.timesheet-row:hover .timesheet-actions {
    opacity: 1;
}

.timesheet-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

/* Active timer indicator */
.timer-badge {
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

/* Scrollable table */
.table-responsive-lg {
    overflow-x: auto;
}

/* Amount display */
.amount {
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
}
