/* Custom CSS for Vehicle Document Management System - Enhanced */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f1f5f9;
    overflow-x: hidden;
}

/* Sidebar Styles */
#wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

#sidebar-wrapper {
    min-height: 100vh;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    transition: margin 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

#page-content-wrapper {
    width: 100%;
    margin-left: var(--sidebar-width);
    transition: margin 0.3s ease;
    min-height: 100vh;
}

.sidebar-heading {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.list-group-item {
    background-color: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.9rem 1.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.list-group-item:hover {
    background-color: rgba(37, 99, 235, 0.1);
    color: #ffffff;
    border-left-color: var(--primary-color);
}

.list-group-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.2) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: #ffffff;
    font-weight: 600;
    border-left-color: var(--primary-color);
}

.list-group-item i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 1rem 1.5rem 0.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .dropdown-toggle {
    border: none;
    background: transparent;
}

.sidebar-footer .dropdown-toggle:hover {
    background-color: rgba(37, 99, 235, 0.1);
}

/* Top Navigation Bar */
.navbar {
    padding: 0.8rem 1rem;
}

/* Toggle Sidebar */
#wrapper.toggled #sidebar-wrapper {
    margin-left: calc(var(--sidebar-width) * -1);
}

#wrapper.toggled #page-content-wrapper {
    margin-left: 0;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Dashboard Cards */
.card.text-white {
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
}

.card.text-white::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.card.text-white .card-body {
    padding: 1.75rem;
    position: relative;
    z-index: 1;
}

.card.bg-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.card.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.card.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.card.bg-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.card.bg-dark {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.card.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f9fafb;
    cursor: pointer;
}

.table-responsive {
    border-radius: 0.5rem;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

/* Badge Styles */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
    font-size: 0.75rem;
}

.badge.bg-critical {
    background-color: var(--danger-color) !important;
}

.badge.bg-warning {
    background-color: var(--warning-color) !important;
    color: #000;
}

.badge.bg-ok, .badge.bg-success {
    background-color: var(--success-color) !important;
}

/* Form Styles */
.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.form-control, .form-select {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* File upload area */
.form-control[type="file"] {
    padding: 0.5rem;
}

/* Loading spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Toast notifications */
.toast {
    min-width: 300px;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
}

.page-link {
    border: 1px solid #d1d5db;
    color: var(--primary-color);
    padding: 0.5rem 0.75rem;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Activity log */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

/* Search and Filter Section */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: calc(var(--sidebar-width) * -1);
    }
    
    #page-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0;
    }
    
    .card.text-white .card-body {
        padding: 1.25rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    #sidebar-wrapper,
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    #page-content-wrapper {
        margin-left: 0 !important;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .table-responsive {
    animation: slideIn 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-indicator.status-ok {
    background-color: var(--success-color);
}

.status-indicator.status-warning {
    background-color: var(--warning-color);
}

.status-indicator.status-critical {
    background-color: var(--danger-color);
}

/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #9ca3af;
}

/* Enhanced select dropdowns */
.ts-wrapper {
    width: 100%;
}

.ts-dropdown {
    z-index: 3000 !important;
    pointer-events: auto;
}


