/* Documents Tracking Page Styles */

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #007bff, #0056b3);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    width: 100%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 20px;
    width: 50%;
    height: 2px;
    background: linear-gradient(90deg, #007bff, transparent);
    z-index: 1;
}

.timeline-item.left::before {
    right: 50%;
    margin-right: 20px;
}

.timeline-item.right::before {
    left: 50%;
    margin-left: 20px;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.timeline-marker:hover {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.timeline-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    border-color: #007bff;
}

.timeline-item.left .timeline-content {
    margin-right: 50%;
    margin-left: 20px;
}

.timeline-item.right .timeline-content {
    margin-left: 50%;
    margin-right: 20px;
}

.timeline-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.timeline-header h6 {
    color: #495057;
    font-weight: 600;
    margin: 0;
}

.timeline-body {
    color: #6c757d;
}

.timeline-body p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.timeline-actions {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
    margin-top: 15px;
}

.timeline-actions .btn {
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Statistics Cards */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.text-xs {
    font-size: 0.7rem;
}

.text-dark {
    color: #212529 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.card-header {
    border-radius: 15px 15px 0 0 !important;
    border: none;
    padding: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.card-body {
    padding: 25px;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background: #ffffff;
    transform: translateY(-1px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 12px 25px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(45deg, #007bff, #0056b3);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-info {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(45deg, #6f42c1, #e83e8c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    color: #212529;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #fd7e14, #dc3545);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: white;
}

.btn-secondary {
    background: linear-gradient(45deg, #6c757d, #5a6268);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #5a6268, #495057);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-outline-primary {
    border: 2px solid #007bff;
    color: #007bff;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
}

.btn-outline-primary.active {
    background: #007bff;
    color: white;
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

/* Badge Styles */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.badge-info {
    background: linear-gradient(45deg, #17a2b8, #6f42c1);
    color: white;
}

.badge-warning {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #212529;
}

.badge-primary {
    background: linear-gradient(45deg, #007bff, #6610f2);
    color: white;
}

.badge-danger {
    background: linear-gradient(45deg, #dc3545, #e83e8c);
    color: white;
}

.badge-secondary {
    background: linear-gradient(45deg, #6c757d, #495057);
    color: white;
}

/* Table Styles */
.table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table thead th {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    padding: 15px 12px;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table tbody td {
    padding: 15px 12px;
    border-color: #e9ecef;
    vertical-align: middle;
}

/* Modal Styles */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border: none;
    padding: 20px 25px;
    font-weight: 600;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-radius: 0 0 15px 15px;
    border: none;
    padding: 20px 25px;
    background: #f8f9fa;
}

/* Map Container */
#mapContainer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

#mapContainer:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-item::before {
        display: none;
    }
    
    .timeline-marker {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 60px;
        margin-right: 20px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    .timeline-content {
        padding: 15px;
    }
    
    .timeline-marker {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .card-header {
        padding: 15px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        margin-left: 50px;
        margin-right: 10px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Timeline Animation */
.timeline-item {
    opacity: 0;
    animation: timelineFadeIn 0.6s ease-out forwards;
}

.timeline-item:nth-child(odd) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(even) {
    animation-delay: 0.2s;
}

@keyframes timelineFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shine 1.5s infinite;
}

@keyframes loading-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #0056b3, #004085);
}

/* Search Form Styles */
#searchForm {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

#searchForm .form-control {
    background: white;
    border: 2px solid #e9ecef;
}

#searchForm .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Button Group Styles */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-radius: 8px 0 0 8px;
}

.btn-group .btn:last-child {
    border-radius: 0 8px 8px 0;
}

.btn-group .btn:only-child {
    border-radius: 8px;
}

/* Empty State Styles */
.text-center.py-5 {
    padding: 60px 20px;
}

.text-center.py-5 i {
    opacity: 0.5;
}

.text-center.py-5 h5 {
    margin-top: 20px;
    color: #6c757d;
}

.text-center.py-5 p {
    color: #adb5bd;
    margin-top: 10px;
}
