/* static/css/procurement.css */
.kanban-board {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
}

.kanban-column {
    min-width: 300px;
}

.kanban-item {
    transition: all 0.2s ease;
}

.kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.activity-feed {
    max-height: 500px;
    overflow-y: auto;
}

.comment-item {
    padding: 10px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.comment-item:hover {
    background-color: #e9ecef;
}

.document-item {
    padding: 8px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.document-item:hover {
    background-color: #e9ecef;
}

.badge {
    font-size: 0.85em;
    padding: 5px 8px;
}

/* Status badges */
.badge.bg-draft { background-color: #6c757d; }
.badge.bg-submitted { background-color: #17a2b8; }
.badge.bg-under_review { background-color: #ffc107; color: #212529; }
.badge.bg-rfq_sent { background-color: #6610f2; }
.badge.bg-quotations_received { background-color: #6f42c1; }
.badge.bg-quotation_selected { background-color: #e83e8c; }
.badge.bg-awaiting_approval { background-color: #fd7e14; }
.badge.bg-approved { background-color: #28a745; }
.badge.bg-rejected { background-color: #dc3545; }
.badge.bg-po_issued { background-color: #20c997; }
.badge.bg-proforma_received { background-color: #0dcaf0; }
.badge.bg-payment_pending { background-color: #6c757d; }
.badge.bg-payment_processing { background-color: #ffc107; color: #212529; }
.badge.bg-payment_completed { background-color: #198754; }
.badge.bg-awaiting_delivery { background-color: #0d6efd; }
.badge.bg-delivered { background-color: #6f42c1; }
.badge.bg-testing { background-color: #fd7e14; }
.badge.bg-testing_passed { background-color: #198754; }
.badge.bg-testing_failed { background-color: #dc3545; }
.badge.bg-completed { background-color: #198754; }

/* Status timeline */
.status-timeline {
    position: relative;
    padding-bottom: 30px;
}

.status-timeline-progress {
    position: absolute;
    top: 20px;
    left: 0;
    height: 4px;
    background-color: #0d6efd;
    transition: width 0.5s ease;
    z-index: 1;
}

.status-step {
    position: relative;
    text-align: center;
    z-index: 2;
}

.status-step-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background-color: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.status-step.completed .status-step-icon {
    background-color: #198754;
    color: white;
}

.status-step.current .status-step-icon {
    background-color: #0d6efd;
    color: white;
}

.status-step-label {
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.status-step-date {
    font-size: 0.7rem;
    color: #6c757d;
}

/* Document sections */
.doc-section {
    margin-bottom: 20px;
}

.doc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #dee2e6;
}

.upload-toggle-btn {
    background: none;
    border: none;
    color: #0d6efd;
    cursor: pointer;
}

.upload-toggle-btn:hover {
    color: #0b5ed7;
}

.doc-actions .btn {
    padding: 0.15rem 0.5rem;
    font-size: 0.75rem;
}

/* Activity tabs */
.activity-tabs .nav-link {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem 0.375rem 0 0;
    color: #6c757d;
    font-weight: 500;
}

.activity-tabs .nav-link.active {
    color: #0d6efd;
    background-color: transparent;
    border-bottom: 2px solid #0d6efd;
}

.activity-comment {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    border-left: 4px solid #dee2e6;
}

.activity-comment:hover {
    background-color: #e9ecef;
}

.attachment-item {
    padding: 0.5rem;
    background-color: white;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.attachment-item:hover {
    background-color: #f8f9fa;
}

.avatar {
    object-fit: cover;
}

.editable-field {
    min-height: 20px;
    padding: 5px;
    border-radius: 3px;
}

.editable-field:focus {
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}


/* static/css/procurement.css */
/* Custom styles for procurement app */

/* Global styles */
body {
    background-color: #f8f9fa;
}

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

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Button enhancements */
.btn {
    border-radius: 6px;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Form enhancements */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Table enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 600;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 1);
}

/* Avatar styles */
.avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-md {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-lg {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* Priority indicators */
.priority-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.priority-low { background-color: #198754; }
.priority-medium { background-color: #ffc107; }
.priority-high { background-color: #dc3545; }
.priority-critical { background-color: #6f42c1; }

/* Loading animation */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Select2 customization */
.select2-container--bootstrap-5 .select2-selection {
    border-radius: 6px;
    border: 1px solid #ced4da;
    min-height: 38px;
}

.select2-container--bootstrap-5 .select2-selection:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .no-print {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
}