

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
}

/* Body and layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Container spacing improvements */
.container,
.container-fluid {
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 80% !important;
}

/* More breathing room for main content */
.row {
    margin-left: -1rem;
    margin-right: -1rem;
}

.col,
[class*="col-"] {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Table improvements */
.table-responsive {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding: 0.5rem;
}

.table th,
.table td {
    padding: 0.75rem 0.5rem;
    white-space: nowrap;
}

.table th:first-child,
.table td:first-child {
    padding-left: 1rem;
}

.table th:last-child,
.table td:last-child {
    padding-right: 1rem;
}

/* Custom navbar styling */
.navbar-brand {
    font-weight: bold;
}

/* Card enhancements */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.card-body {
    padding: 1.5rem;
}

/* Alert improvements for sidebar */
.card-body .alert {
    position: relative;
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
}

.card-body .alert .btn-close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    padding: 0.25rem;
    font-size: 0.75rem;
}

.card-body .alert-dismissible {
    padding-right: 2.5rem;
}

/* Status badges */
.status-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.status-waiting {
    background-color: var(--warning-color);
    color: #000;
}

.status-in-progress {
    background-color: var(--info-color);
    color: #000;
}

.status-completed {
    background-color: var(--success-color);
    color: white;
}

.status-paused {
    background-color: var(--secondary-color);
    color: white;
}

.status-revision {
    background-color: var(--danger-color);
    color: white;
}

/* Timer display */
.timer-display {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: var(--primary-color);
}

/* File upload styling */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

/* Comments section */
.comment-item {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

/* Clickable rows */
.clickable-row {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

/* Sortable table headers */
.sortable-header {
    padding: 0 !important;
}

.sort-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.sort-link:hover {
    color: var(--primary-color);
}

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

.sort-icon-inactive {
    opacity: 0.3;
}

.sort-link:hover .sort-icon-inactive {
    opacity: 0.6;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
}

/* Fix table row vertical alignment */
.table td {
    vertical-align: middle;
}

/* Ensure consistent height for all flex containers in table cells */
.table td .d-flex {
    min-height: 32px; /* Match avatar height */
    align-items: center;
}

/* Remove default margin from progress bars in tables */
.table .progress {
    margin-bottom: 0;
}

/* Ensure badges align properly */
.table .badge {
    line-height: 1.2;
}

/* Force dark text on light-background badges for readability */
.badge.bg-warning,
.badge.bg-info {
    color: #000 !important;
}


/* Report builder styles */
.filter-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.export-buttons {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* Metric change indicators */
.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

.metric-change.neutral {
    color: #6c757d;
}

/* Period selector styling */
.period-selector {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
}

/* Print styles for reports */
@media print {
    .no-print { 
        display: none !important; 
    }
    .filter-section { 
        display: none !important; 
    }
}

.avatar-sm {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
}

/* Project name truncation */
.projects-table {
    table-layout: fixed;
}

.project-name-cell {
    max-width: 0;
    width: 35%; 
}

.project-name-link {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.project-description-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    max-height: 2.6em;
    white-space: normal;
}

/* Override table cell nowrap for the project name cell only */
.project-name-cell {
    white-space: normal;
}

/* Compact badges for project list table */
.badge-sm {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.35rem !important;
    line-height: 1.2 !important;
}

.project-name-cell .badge {
    white-space: nowrap;
}

.project-name-link {
    min-width: 0;
    max-width: 60%;
}

.dashboard-project-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}