:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 60px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================================================
   LOGIN STYLES WITH FLOATING VEHICLES
   ============================================================================ */

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Clean background without any logos */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    opacity: 0;
    pointer-events: none;
}

/* Removidas as animações - fundo estático */

.login-box {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    border: 1px solid rgba(222, 226, 230, 0.3);
    position: relative;
    z-index: 10;
}

.login-header h2 {
    color: var(--primary-color);
    font-weight: 600;
}

.login-header img {
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.login-box .form-control {
    padding: 12px 16px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.login-box .form-control:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
    background: white;
}

.login-box .btn-primary {
    background: linear-gradient(45deg, #2c5aa0, #3d6fc0);
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-box .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 90, 160, 0.3);
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background: #2c3e50;
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .logo-img {
    display: none;
}

.sidebar.collapsed .sidebar-header h5 {
    display: none;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h4, .sidebar-header h5 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Logo styling in sidebar */
.logo-img {
    height: 35px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    background-color: white;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar.collapsed .sidebar-header h4 {
    display: none;
}

#sidebarCollapse {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
}

#sidebarCollapse:hover {
    color: var(--primary-color);
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    height: calc(100% - 80px);
    display: flex;
    flex-direction: column;
}

.sidebar-nav .nav-item {
    border-bottom: 1px solid #34495e;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background-color: #34495e;
    color: white;
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 15px;
    text-align: center;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.sidebar.collapsed .nav-link .fa-chevron-down {
    display: none;
}

/* Submenu Styles */
.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #1a252f;
}

.sub-menu li a {
    display: block;
    padding: 12px 20px 12px 55px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #2c3e50;
}

.sub-menu li a:hover {
    background: #34495e;
    color: white;
    padding-left: 60px;
}

.sidebar.collapsed .sub-menu {
    display: none !important;
}

/* Content Styles */
.content {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    border: none;
}

/* Badges */
.badge {
    font-size: 0.8rem;
    padding: 0.4em 0.6em;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    background-color: var(--light-color);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Fix for text visibility in tables - Force black text */
.table tbody td,
.table tbody tr td,
.table-striped tbody tr td,
.table-hover tbody tr td {
    color: #000000 !important;
}

.table tbody tr {
    color: #000000 !important;
}

/* Specific fix for fine tables */
.table tbody tr td strong,
.table tbody tr td span:not(.badge) {
    color: #000000 !important;
}

/* Fix for table headers - Force black text */
.table thead th,
.table-dark thead th,
.table thead tr th {
    color: #000000 !important;
    background-color: #f8f9fa !important;
}

/* Fix Select2 z-index to prevent overlapping with modals */
.select2-container {
    z-index: 1050 !important;
}

.select2-dropdown {
    z-index: 1051 !important;
}

/* Ensure modals have higher z-index than Select2 */
.modal {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1054 !important;
}

/* Timeline styles for fine details modal */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 20px;
    bottom: -15px;
    width: 2px;
    background-color: #dee2e6;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-item i {
    position: absolute;
    left: 0;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: white;
    border: 2px solid;
    z-index: 1;
}

.timeline-content {
    margin-left: 0;
}

.timeline-content small {
    display: block;
    font-size: 0.75rem;
    color: #6c757d;
}

.timeline-content p {
    margin-top: 2px;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn {
    border-radius: 6px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(25, 135, 84, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(13, 202, 240, 0.1);
}

/* Footer */
.footer {
    margin-top: auto;
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
}

.footer.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
    }
    
    .footer {
        margin-left: 0;
    }
}

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

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

/* Status Icons */
.status-expired {
    color: var(--danger-color);
}

.status-expiring {
    color: var(--warning-color);
}

.status-ok {
    color: var(--success-color);
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #34495e;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #4a5f7a;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

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

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Print Styles */
@media print {
    .sidebar,
    .navbar,
    .footer,
    .btn,
    .alert {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .table {
        font-size: 12px;
    }
}

/* Movement photo display - limit size and filter logos */
.movement-photo {
    max-height: 300px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Hide images that match VIGENT logo patterns - more comprehensive */
img[src*="vigent"], 
img[src*="VIGENT"],
img[src*="logo"],
img[src*="LOGO"],
img[src*="construcoes"],
img[src*="CONSTRUÇÕES"],
img[src*="logotipo"],
img[src*="marca"],
img[alt*="vigent"],
img[alt*="VIGENT"],
img[alt*="logo"],
img[alt*="LOGO"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Movement photo preview with size limits and logo filtering */
.preview-image {
    max-height: 300px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    overflow: hidden !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Photo containers in movement tables */
.movement-photo-container {
    max-height: 300px !important;
    overflow: hidden !important;
    display: inline-block;
}

/* Override any large images in movements */
.movement-photo-container img {
    max-height: 300px !important;
    max-width: 200px !important;
    object-fit: contain !important;
}

/* Hide oversized images completely */
img[style*="height"]:not([style*="max-height"]) {
    max-height: 300px !important;
    object-fit: contain !important;
}

/* Photo thumbnails in movement cards */
.photo-thumb {
    width: 35px !important;
    height: 35px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin-right: 4px !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Override any other photo styles to limit size */
.img-fluid.rounded.shadow {
    max-height: 300px !important;
    object-fit: contain !important;
}

.photo-preview {
    max-height: 200px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 6px;
    border: 2px solid #e9ecef;
}

.modal-photo {
    max-height: 300px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-photo:hover {
    transform: scale(1.02);
}

/* Navigation group headers */
.nav-group-header {
    margin-top: 15px;
    margin-bottom: 5px;
    padding: 8px 20px;
    border-bottom: 1px solid #2c3e50;
}

.nav-group-header span {
    color: #7fb3d3 !important;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-group-header .fas {
    color: #5dade2;
    font-size: 10px;
}

/* Improve spacing between groups */
.nav-item:first-child {
    margin-top: 0;
}

.sidebar-nav .nav-item + .nav-group-header {
    margin-top: 20px;
}

/* Sidebar logo styling */
.logo-container {
    background-color: white;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo {
    height: 35px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* Override logo filtering for the sidebar logo specifically */
.logo-container .sidebar-logo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Chat Assistant Floating Button */
.chat-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    z-index: 9999;
    transition: all 0.3s ease;
    border: none;
}

.chat-floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.chat-floating-btn i {
    color: white;
    font-size: 24px;
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 9998;
    border: 1px solid #e0e0e0;
}

.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: between;
    align-items: center;
}

.btn-close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.btn-close-chat:hover {
    opacity: 0.8;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    max-height: 360px;
}

.chat-message {
    margin-bottom: 15px;
}

.user-message {
    text-align: right;
}

.user-message .message-content {
    background: #007bff;
    color: white;
    padding: 10px 15px;
    border-radius: 18px 18px 4px 18px;
    display: inline-block;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: #f8f9fa;
    color: #333;
    padding: 12px 15px;
    border-radius: 18px 18px 18px 4px;
    display: inline-block;
    max-width: 90%;
    word-wrap: break-word;
    border: 1px solid #e9ecef;
}

.bot-message .message-content ul {
    font-size: 14px;
    padding-left: 20px;
}

.bot-message .message-content li {
    margin-bottom: 4px;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
    background: #f8f9fa;
}

.chat-input .form-control {
    border-radius: 20px;
    border: 1px solid #d0d7de;
    padding: 10px 15px;
}

.chat-input .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
        height: 450px;
    }
    
    .chat-floating-btn {
        width: 55px;
        height: 55px;
    }
    
    .chat-floating-btn i {
        font-size: 20px;
    }
}

/* Vehicle photo preview - always show regardless of logo filtering */
.vehicle-photo-preview,
.photo-preview-container img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Form photo preview container */
.photo-preview-container {
    padding: 10px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
    display: inline-block;
}

/* Vehicle photo management */
.vehicle-photo-thumbnail {
    width: 35px;
    height: 35px;
    object-fit: cover;
    border-radius: 4px;
}

/* Cost Center History Modal Styles */
#costCenterHistoryModal .modal-body {
    scrollbar-width: thin;
    scrollbar-color: #007bff #f8f9fa;
}

#costCenterHistoryModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#costCenterHistoryModal .modal-body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#costCenterHistoryModal .modal-body::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 4px;
}

#costCenterHistoryModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

#costCenterHistoryModal .table thead th {
    border-bottom: 2px solid #007bff;
    background-color: #007bff !important;
    color: white !important;
    font-weight: 600;
    font-size: 0.875rem;
}

#costCenterHistoryModal .table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

#costCenterHistoryModal .badge {
    max-width: 200px;
    white-space: normal;
    word-wrap: break-word;
}

/* ============================================================================
   TABLE TEXT OVERFLOW CONTROL
   ============================================================================ */

/* Table cell text overflow and wrapping control */
.table td, .table th {
    word-wrap: break-word;
    word-break: break-word;
    vertical-align: middle;
    white-space: normal;
    line-height: 1.4;
    padding: 12px 8px;
}

/* Allow text wrapping for specific columns that need it */
.table td.allow-wrap, .table th.allow-wrap {
    white-space: normal;
    word-wrap: break-word;
    max-width: none;
    line-height: 1.3;
}

/* Specific column width controls for different table types */
.table-tolls th:nth-child(1), .table-tolls td:nth-child(1) { /* Veículo */
    min-width: 150px;
    width: 180px;
}

.table-tolls th:nth-child(2), .table-tolls td:nth-child(2) { /* Centro de Custo */
    min-width: 180px;
    width: 220px;
}

.table-tolls th:nth-child(3), .table-tolls td:nth-child(3) { /* Mês */
    min-width: 80px;
    max-width: 100px;
}

.table-tolls th:nth-child(4), .table-tolls td:nth-child(4) { /* Valor */
    min-width: 80px;
    max-width: 100px;
    text-align: right;
}

.table-tolls th:nth-child(5), .table-tolls td:nth-child(5) { /* Apelido Contrato */
    min-width: 100px;
    max-width: 120px;
}

.table-tolls th:nth-child(6), .table-tolls td:nth-child(6) { /* Comprovante */
    min-width: 100px;
    max-width: 120px;
    text-align: center;
}

.table-tolls th:nth-child(7), .table-tolls td:nth-child(7) { /* Ações */
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    text-align: center;
}

/* General table improvements for assets and other tables */
.table-assets th:nth-child(1), .table-assets td:nth-child(1) { /* Prefixo */
    min-width: 80px;
    max-width: 100px;
}

.table-assets th:nth-child(2), .table-assets td:nth-child(2) { /* Categoria */
    min-width: 80px;
    max-width: 100px;
}

.table-assets th:nth-child(3), .table-assets td:nth-child(3) { /* Marca */
    min-width: 80px;
    max-width: 120px;
}

.table-assets th:nth-child(4), .table-assets td:nth-child(4) { /* Modelo */
    min-width: 180px;
    width: 250px;
    word-break: break-word;
}

.table-assets th:nth-child(5), .table-assets td:nth-child(5) { /* Tipo */
    min-width: 80px;
    max-width: 100px;
}

.table-assets th:nth-child(6), .table-assets td:nth-child(6) { /* Placa */
    min-width: 80px;
    max-width: 100px;
}

.table-assets th:nth-child(7), .table-assets td:nth-child(7) { /* Empresa */
    min-width: 100px;
    max-width: 150px;
}

.table-assets th:nth-child(8), .table-assets td:nth-child(8) { /* Centro de Custo */
    min-width: 140px;
    max-width: 200px;
}

.table-assets th:nth-child(9), .table-assets td:nth-child(9) { /* Status Docs */
    min-width: 80px;
    max-width: 100px;
    text-align: center;
}

.table-assets th:nth-child(10), .table-assets td:nth-child(10) { /* Ações */
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    text-align: center;
}

/* Text with full display and no truncation */
.text-full-display {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.3;
    max-width: 100%;
}

.text-truncate-hover:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table td, .table th {
        font-size: 0.875rem;
        padding: 0.5rem;
    }
    
    /* Hide less important columns on mobile */
    .table-tolls th:nth-child(5), .table-tolls td:nth-child(5), /* Apelido Contrato */
    .table-tolls th:nth-child(6), .table-tolls td:nth-child(6) { /* Comprovante */
        display: none;
    }
    
    .table-assets th:nth-child(5), .table-assets td:nth-child(5), /* Tipo */
    .table-assets th:nth-child(7), .table-assets td:nth-child(7), /* Empresa */
    .table-assets th:nth-child(8), .table-assets td:nth-child(8) { /* Centro de Custo */
        display: none;
    }
}

/* Badge text wrapping for long content */
.badge-wrap {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
    padding: 0.5em 0.75em;
}

/* Small text styling with proper wrapping */
.small-text-wrap {
    font-size: 0.875rem;
    line-height: 1.3;
    white-space: normal;
    word-wrap: break-word;
}

/* Ensure tables have adequate width and height */
.table-responsive {
    min-width: 100%;
}

.table-responsive table {
    table-layout: fixed;
    width: 100%;
    min-width: 1200px; /* Minimum width to accommodate all columns */
}

.table tbody tr {
    min-height: 60px; /* Minimum row height to accommodate wrapped text */
}

/* Enhanced table row styling */
.table tbody tr td {
    min-height: 60px;
    vertical-align: top;
    padding: 12px 8px;
}

/* Specific styling for multi-line content */
.table tbody tr td small {
    display: block;
    margin-top: 4px;
    line-height: 1.2;
}

/* ============================================================================
   ICON CONSISTENCY STYLING
   ============================================================================ */

/* Ensure cost center icon has consistent styling with other icons */
.fas.fa-sitemap {
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    padding: 2px;
    background-color: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    min-height: 16px;
}

/* Ensure all detail view icons have consistent border styling */
.fw-semibold .fas {
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 3px;
    padding: 2px;
    background-color: rgba(255,255,255,0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    min-height: 16px;
}

/* ============================================================================
   SELECT2 STYLING FOR CONSISTENT DROPDOWN APPEARANCE
   ============================================================================ */

/* Select2 container styling to match Bootstrap form-select */
.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(2.25rem + 2px) !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
}

/* Select2 selection rendered text - Base styling removed to avoid duplication */

/* Select2 arrow positioning */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 2px) !important;
    position: absolute !important;
    top: 1px !important;
    right: 1px !important;
    width: 20px !important;
}

/* Select2 focus state */
.select2-container--bootstrap-5.select2-container--focus .select2-selection--single {
    border-color: #86b7fe !important;
    outline: 0 !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* Select2 dropdown */
.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #ced4da !important;
    border-radius: 0.375rem !important;
    margin-top: -1px !important;
}

/* Select2 search input in dropdown */
.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
}

/* Select2 options */
.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.375rem 0.75rem !important;
    font-size: 1rem !important;
}

/* Select2 highlighted option */
.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* Ensure Select2 containers have same width as regular form-select */
.select2-container {
    width: 100% !important;
}

/* Additional styling for perfect form-select match */
.form-select-like .select2-selection--single {
    display: block !important;
    width: 100% !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: #212529 !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out !important;
    appearance: none !important;
}

/* Remove Select2's own arrow when using form-select-like */
.form-select-like .select2-selection__arrow {
    display: none !important;
}

/* ============================================================================
   SPECIFIC FIXES FOR COST CENTER AND INSURANCE FIELD VISUALIZATION
   ============================================================================ */

/* Fix for selected text display in cost center and insurance fields */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #212529 !important;
    padding-left: 0 !important;
    padding-right: 30px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.5 !important;
    display: block !important;
    margin-top: 0 !important;
}

/* Ensure proper alignment and spacing for selected items */
.select2-container--bootstrap-5 .select2-selection--single {
    min-height: calc(2.25rem + 2px) !important;
    display: flex !important;
    align-items: center !important;
}

/* Fix for input group with buttons (insurance field) */
.input-group .select2-container--bootstrap-5 .select2-selection--single {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-right: 0 !important;
}

/* Additional spacing to prevent text overlap with arrow - consolidated above */

/* Fix for clear button positioning if present */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    position: absolute !important;
    right: 25px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: #6c757d !important;
}

/* Ensure dropdown arrow is properly positioned */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    position: absolute !important;
    top: 50% !important;
    right: 8px !important;
    transform: translateY(-50%) !important;
    width: 20px !important;
    height: 20px !important;
}

/* Fix for placeholder text */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #6c757d !important;
    font-weight: 400 !important;
}
