/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #2b2b2b;
    color: #ffffff;
    line-height: 1.6;
}

/* Header */
.header {
    background: #000000;
    padding: 2rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    padding: 0.75rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    flex: 1;
}

.logo {
    width: 120px;
    height: auto;
    filter: brightness(1.2);
}

.header-text h1 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.header-text p {
    color: #e0e6ed;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 140px;
    width: 280px;
    height: calc(100vh - 140px);
    background: rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Sidebar Header */
.sidebar-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.sidebar-title {
    display: none !important; /* Hide 'Menu' text on desktop and mobile */
}

.sidebar-collapse-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    padding: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    opacity: 0.7;
    margin: 0 auto; /* Center the button in footer */
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    opacity: 1;
}

.sidebar-collapse-btn i {
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    width: 70px;
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .nav-container {
    padding: 0.5rem 0.25rem;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    margin-bottom: 1rem;
}

.sidebar.collapsed .sidebar-collapse-btn {
    width: 32px;
    height: 32px;
    padding: 0.4rem;
    margin: 0 auto; /* Keep centered in collapsed state */
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-btn {
    padding: 1rem 0.5rem;
    justify-content: center;
    min-width: auto !important;
    width: 58px;
    margin: 0 auto;
}

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

.sidebar.collapsed .nav-btn i {
    margin: 0;
    font-size: 1.2rem;
}

.nav-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem;
    flex: 1; /* Takes remaining space */
}

.sidebar-footer {
    margin-top: auto; /* Push to bottom */
    padding-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    white-space: normal;
    text-align: left;
    position: relative;
    min-height: 48px;
    min-width: 100%;
    word-wrap: break-word;
}

.nav-btn span {
    transition: opacity 0.3s ease;
    flex: 1;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-color: #ff6b6b;
}

.nav-btn i {
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: calc(100vh - 140px);
    transition: all 0.3s ease;
}

.main-content.sidebar-collapsed {
    margin-left: 70px;
}

.page {
    display: none;
    max-width: 1000px;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 600;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 0.5rem;
    position: relative;
}

.page-header h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 100%);
}

/* Form Styles */
.inspection-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-section {
    margin-bottom: 2rem;
}

.section-title {
    color: #ffffff;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ff6b6b;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #ff6b6b 0%, #ffa500 100%);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: #e0e6ed;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    color: #333333;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Validation Error Styles */
.form-group select.validation-error {
    border: 2px solid #ff4757 !important;
    box-shadow: 0 0 10px rgba(255, 71, 87, 0.3) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group input:read-only {
    background: #f8f9fa;
    color: #666;
    cursor: not-allowed;
}

/* Checklist Items */
.checklist-item {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 1.2rem;
    margin: 0.5rem 0;
    transition: all 0.3s ease;
}

.checklist-item:nth-child(odd) {
    background: #000000;
}

.checklist-item:nth-child(even) {
    background: #1a1a1a;
}

.checklist-item:hover {
    background: #333333 !important;
}

.checklist-item-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.item-name {
    font-weight: 600;
    color: #ffffff;
}

.checklist-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.upload-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Images Gallery Styles */
.images-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.image-thumb {
    position: relative;
    display: inline-block;
}

.image-thumb img {
    display: block;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.image-thumb img:hover {
    border-color: #ff6b6b;
    transform: scale(1.05);
}

.remove-image-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* Table Loading Styles */
.loading-cell, .error-cell {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
}

.table-loading, .table-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
}

.loading-spinner-small {
    font-size: 1.5rem;
    color: #ff6b6b;
}

.table-error i {
    font-size: 2rem;
    color: #ff4757;
}

/* Inspection Details Modal Images */
.checklist-details-section {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
}

.checklist-details-section h5 {
    color: #ff6b6b;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.item-details {
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.item-header-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-header-details h6 {
    color: #ffffff;
    margin: 0;
    font-size: 0.95rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-ok {
    background: #27ae60;
    color: white;
}

.status-avariado {
    background: #e74c3c;
    color: white;
}

.status-ausente {
    background: #f39c12;
    color: white;
}

.item-observations {
    color: #cccccc;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.item-images {
    margin-top: 0.75rem;
}

.item-images strong {
    color: #ffffff;
    display: block;
    margin-bottom: 0.5rem;
}

.images-gallery-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.5rem;
}

.image-thumbnail {
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.image-thumbnail:hover {
    transform: scale(1.05);
}

.image-thumbnail img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Image Modal */
.image-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border-radius: 8px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.image-modal-header h3 {
    color: #ffffff;
    margin: 0;
}

.image-modal-body {
    padding: 1rem;
    text-align: center;
}

.image-modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Action Buttons for Desktop Table */
.btn-action {
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    margin: 0 2px;
}

.btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action.btn-view {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.btn-action.btn-edit {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #000;
}

.btn-action.btn-print {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.btn-action.btn-delete {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

.btn-action.btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.btn-action.btn-copy {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

.actions {
    display: flex;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

/* Filters */
.filters {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.filter-main {
    display: flex;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-quick {
    display: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    color: #e0e6ed;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-group input {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    color: #333333;
    font-size: 1rem;
    min-width: 120px;
    width: 140px;
}

.btn-quick {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.btn-quick:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.btn-quick.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-color: #ff6b6b;
}

/* Table */
.inspections-table-container,
.users-table-container {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.inspections-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.inspections-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: center;
    color: #333;
}

.inspections-table td {
    padding: 10px;
    border: 1px solid #dee2e6;
    text-align: center;
    color: #333;
    background-color: white;
}

.inspections-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.inspections-table tbody tr:hover {
    background-color: #e9ecef;
}

.action-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.print-btn {
    background-color: #007bff;
    color: white;
}

.print-btn:hover {
    background-color: #0056b3;
}

/* Mobile Cards */
.inspections-cards-container {
    display: none;
}

.inspections-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.inspection-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
    position: relative;
    transition: all 0.3s ease;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.card-vehicle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.vehicle-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.vehicle-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.vehicle-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.card-date {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-field-label {
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-field-value {
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.card-btn {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px; /* Touch-friendly */
}

.card-btn-view {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.card-btn-print {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.card-btn-edit {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #000;
}

.card-btn-delete {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    color: white;
}

.card-btn-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
}

.card-btn-copy {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: white;
}

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

.card-btn:active {
    transform: translateY(0);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #666;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive helpers */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* CSS Spinner */
.css-spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #ffffff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.css-spinner-dark {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 3px solid #007bff;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Mobile Cards Loading */
.cards-loading {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.cards-loading .css-spinner-dark {
    width: 40px;
    height: 40px;
}

.cards-loading p {
    margin: 1rem 0 0 0;
    font-size: 0.9rem;
}

/* Load More Button */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
    padding: 1rem;
}

.load-more-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 48px;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Table Loading Row */
.table-loading-row td {
    text-align: center;
    padding: 2rem !important;
    color: #666;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.toast {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.toast-message {
    color: #666;
    font-size: 0.9rem;
}

/* Sidebar collapsed tooltip */
.sidebar.collapsed .nav-btn {
    position: relative;
}

.sidebar.collapsed .nav-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-left: 10px;
    pointer-events: none;
}

.sidebar.collapsed .nav-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide sidebar toggle and collapse buttons on mobile */
    .sidebar-toggle,
    .sidebar-collapse-btn {
        display: none !important;
    }
    
    /* Ensure checklist sections are visible in mobile */
    #checklist-sections,
    #checklist-sections .form-section,
    #checklist-sections .checklist-items {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Transform sidebar into slide-in menu */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important; /* Hidden by default */
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: rgba(15, 15, 15, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
        padding: 1rem !important;
        z-index: 1050 !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
    }
    
    /* Show sidebar when open */
    .sidebar.mobile-menu-open {
        left: 0 !important;
    }
    
    /* Mobile overlay */
    .mobile-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: 1040 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-overlay.show {
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Sidebar header with close button */
    .sidebar-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 2rem !important;
        padding-bottom: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .sidebar-title {
        display: none !important; /* Hide 'Menu' text */
    }
    
    .mobile-menu-close {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 6px !important;
        color: #ffffff !important;
        padding: 0.5rem !important;
        font-size: 1rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .mobile-menu-close:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }
    
    /* Vertical navigation container */
    .nav-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 0 !important;
    }
    
    /* Mobile navigation buttons - vertical */
    .nav-btn {
        width: 100% !important;
        padding: 1rem !important;
        font-size: 0.9rem !important;
        justify-content: flex-start !important;
        text-align: left !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }
    
    /* Navigation button icons */
    .nav-btn i {
        font-size: 1.2rem !important;
        margin: 0 !important;
        width: 20px !important;
        text-align: center !important;
    }
    
    .nav-btn span {
        font-size: 0.9rem !important;
        line-height: 1 !important;
        font-weight: 500 !important;
        margin: 0 !important;
    }
    
    /* Active button styling */
    .nav-btn.active {
        background: rgba(255, 165, 0, 0.8) !important;
        border-color: rgba(255, 165, 0, 1) !important;
        color: #ffffff !important;
    }
    
    /* Hover effect */
    .nav-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.3) !important;
    }
    
    /* Sidebar footer */
    .sidebar-footer {
        margin-top: auto !important;
        padding-top: 1rem !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: block !important;
    }
    
    /* Force main content to full width with top spacing for fixed header */
    .main-content,
    .main-content.sidebar-collapsed {
        margin-left: 0 !important; /* Mobile full width */
        margin-top: 0 !important; /* Remove margin, use padding instead */
        width: 100% !important;
        padding: 100px 1rem 1rem 1rem !important; /* Top padding to clear header */
        min-height: calc(100vh - 100px) !important;
        position: relative !important;
        z-index: auto !important; /* Below header, use normal stacking */
    }
    
    /* Header adjustments - compact mobile header */
    .header {
        position: sticky;
        top: 0;
        z-index: 1000 !important; /* Header must be on top */
        padding: 1rem 0 !important; /* Reduced padding */
    }
    
    .header-container {
        padding: 0 1rem !important;
        gap: 1rem !important;
        position: relative !important;
    }
    
    /* Mobile hamburger menu button */
    .mobile-menu-toggle {
        background: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        border-radius: 8px !important;
        color: #ffffff !important;
        padding: 0.75rem !important;
        font-size: 1.2rem !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 45px !important;
        height: 45px !important;
        position: absolute !important;
        left: 1rem !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        z-index: 1001 !important;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: translateY(-50%) scale(1.05) !important;
    }
    
    /* Hide header text on mobile - logo only */
    .header-text {
        display: none !important;
    }
    
    /* Compact centered logo */
    .logo {
        width: 60px !important;
        margin: 0 auto !important;
    }
    
    .logo-container {
        justify-content: center !important;
        margin-left: 0 !important; /* No offset needed - logo is centered */
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Mobile responsive utilities */
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    /* Security: Ensure access-denied elements stay hidden in mobile */
    .nav-btn.access-denied {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Cards container mobile */
    .inspections-cards-container {
        display: block !important;
        width: 100% !important;
    }
    
    /* Filters mobile friendly */
    .filter-quick {
        display: flex !important;
        flex-wrap: wrap !important;
    }
    
    .filter-main {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
    }
    
    .filter-group {
        text-align: center !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .filter-group label {
        text-align: center !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .filter-group input {
        text-align: center !important;
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
    }
    
    /* Card body and actions mobile */
    .card-body {
        grid-template-columns: 1fr !important;
    }
    
    .card-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .card-btn {
        min-height: 48px !important;
        width: 100% !important;
    }
    
    .logo-container {
        justify-content: flex-start;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .header-text p {
        font-size: 0.9rem;
    }
    
    .header-container {
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .header {
        padding: 0.75rem 0;
        position: sticky;
        top: 0;
        z-index: 1200;
    }
    
    .sidebar-toggle {
        position: relative;
        z-index: 1300;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .checklist-item-header {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        text-align: center;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .inspections-table-container {
        padding: 10px;
    }

    .inspections-table {
        font-size: 0.8rem;
    }

    .inspections-table th,
    .inspections-table td {
        padding: 8px;
    }
}

/* Inspection Details Modal Styling */
.inspection-details {
    color: #ffffff;
}

.inspection-details .details-section {
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2a2a2a, #1e1e1e);
    border-radius: 12px;
    border: 1px solid #444;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.inspection-details .details-section h4 {
    background: linear-gradient(135deg, #4a4a4a, #3a3a3a);
    color: #ffffff;
    margin: 0;
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid #555;
}

.inspection-details .details-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.inspection-details .details-grid > div {
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.inspection-details .details-grid > div:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.inspection-details .details-grid > div strong {
    color: #f0f0f0;
    font-weight: 600;
    margin-right: 0.5rem;
}

.inspection-details .inspection-meta {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    text-align: center;
}

.inspection-details .inspection-meta small {
    color: #4caf50;
    font-size: 0.9rem;
    font-weight: 500;
}

.inspection-details .inspection-meta strong {
    color: #ffffff;
}

/* Mobile responsive for inspection details */
@media (max-width: 768px) {
    .inspection-details .details-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .inspection-details .details-section h4 {
        padding: 0.8rem 1rem;
        font-size: 1.1rem;
    }
}

/* Desktop - Disable mobile overlay completely */
@media (min-width: 769px) {
    .mobile-overlay {
        display: none !important;
    }
}

/* Vehicle Actions */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.vehicle-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.scan-crlv-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.scan-crlv-btn:hover {
    background: #1e7e34;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.scan-crlv-btn i {
    font-size: 1rem;
}

.vehicle-photo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.photo-upload-btn {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-upload-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.vehicle-photo-preview {
    position: relative;
    display: inline-block;
}

.vehicle-photo-preview img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #ff6b6b;
}

.remove-photo-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: #b02a37;
    transform: scale(1.1);
}

/* Avatar styles for cards and table */
.vehicle-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.vehicle-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid #ff6b6b;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff6b6b;
    font-size: 1.2rem;
}

/* Table avatar cell */
.avatar-cell {
    width: 70px;
    text-align: center;
    padding: 0.5rem !important;
    vertical-align: middle;
}

.avatar-cell .vehicle-avatar,
.avatar-cell .vehicle-avatar-placeholder {
    width: 45px;
    height: 45px;
}

.vehicle-avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

/* Card avatar adjustments */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.5rem;
}

.card-vehicle {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.card-vehicle .vehicle-avatar,
.card-vehicle .vehicle-avatar-placeholder {
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .photo-upload-btn span {
        display: inline !important; /* Show text on mobile */
    }
    
    .photo-upload-btn {
        padding: 0.75rem;
        background: rgba(255, 107, 107, 0.9) !important; /* Darker background for better contrast */
        color: #ffffff !important; /* White text for better readability */
        border: 2px solid #ff6b6b !important;
        font-weight: 600 !important;
    }
    
    /* Larger avatars on mobile */
    .vehicle-avatar {
        width: 60px;
        height: 60px;
    }
    
    .vehicle-avatar-placeholder {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .vehicle-avatar-wrapper {
        margin-right: 0.5rem;
    }
}

/* Subsection Icons for Car Sides */
.subsection-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #ff6b6b;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem 0;
    padding: 0.5rem 0;
    border-bottom: 2px solid rgba(255, 107, 107, 0.3);
}

.subsection-icon {
    height: 1.2rem;
    width: auto;
    filter: brightness(1.1) contrast(1.1);
    transition: all 0.3s ease;
}

.subsection-title:hover .subsection-icon {
    transform: scale(1.05);
    filter: brightness(1.2) contrast(1.2);
}

/* Mobile responsiveness for subsection icons */
@media (max-width: 768px) {
    .subsection-title {
        font-size: 1.1rem;
        gap: 0.5rem;
    }
    
    .subsection-icon {
        height: 1.1rem;
    }
}

/* Mobile Navigation Buttons */
.mobile-nav-buttons {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-buttons.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-buttons .nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-nav-buttons .nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.mobile-nav-buttons .nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.mobile-nav-buttons .nav-btn.hidden {
    display: none;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-nav-buttons {
        display: none;
    }
}

/* Ensure buttons are above other elements */
@media (max-width: 768px) {
    .mobile-nav-buttons {
        display: flex;
    }
}

/* Modal Styles for Clients */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 2% auto;
    padding: 0;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #333, #444);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #444;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background-color: rgba(255,255,255,0.2);
}

/* Image Modal Close Button Mobile Optimization */
#image-modal .modal-close {
    width: 32px;
    height: 32px;
    font-size: 1.2rem;
    padding: 0.25rem;
    line-height: 1;
    transition: all 0.3s ease;
}

#image-modal .modal-close:hover {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff4444;
    transform: scale(1.1);
}

/* Mobile specific styling for image modal close button */
@media (max-width: 768px) {
    #image-modal .modal-close {
        width: 28px;
        height: 28px;
        font-size: 1rem;
        padding: 0.2rem;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 1000;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
    }
    
    #image-modal .modal-close:hover {
        background-color: rgba(255, 0, 0, 0.8);
        color: #ffffff;
        transform: scale(1.05);
    }
    
    #image-modal .image-modal-header {
        padding: 0.75rem 1rem;
    }
    
    #image-modal .image-modal-header h3 {
        font-size: 1rem;
        padding-right: 45px; /* Make room for close button */
    }
}

.modal-body {
    padding: 2rem;
    background-color: #1a1a1a;
    color: #ffffff;
    flex: 1;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    background-color: #222;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #333;
}

.client-form {
    padding: 2rem;
    background-color: #1a1a1a;
    flex: 1;
    overflow-y: auto;
}

.client-form .form-section {
    margin-bottom: 2rem;
}

.client-form .section-title {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #333;
}

/* CEP Input Group */
.cep-input-group {
    display: flex;
    gap: 0.5rem;
}

.cep-input-group input {
    flex: 1;
}

.cep-input-group .btn {
    min-width: auto;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

/* Page Header with Button */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    flex: 1;
    margin: 0;
    color: #ffffff;
}

.page-header .btn {
    margin: 0;
}

/* Client Table Styles */
.clients-table-container {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
}

.clients-cards-container {
    display: none;
}

@media (max-width: 768px) {
    .clients-table-container {
        display: none;
    }
    
    .clients-cards-container {
        display: block;
    }
}

/* Mobile responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1rem;
        flex-shrink: 0;
    }
    
    .client-form {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-actions {
        padding: 1rem;
        flex-direction: column;
        flex-shrink: 0;
    }
    
    .modal-actions .btn {
        width: 100%;
        margin: 0;
    }
    
    .cep-input-group {
        flex-direction: column;
    }
    
    .cep-input-group .btn {
        width: 100%;
    }
    
    /* Hide custom scrollbar on mobile for better touch scrolling */
    .modal-content::-webkit-scrollbar {
        display: none;
    }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    min-width: 300px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateX(100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.notification-warning {
    background-color: #f59e0b;
}

.notification-info {
    background-color: #3b82f6;
}

.notification i {
    font-size: 1.2rem;
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #444;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

.empty-state-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid #333;
    color: #888;
}

.empty-state-card i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #444;
}

.empty-state-card h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.empty-state-card p {
    margin-bottom: 2rem;
    color: #888;
}

/* Table actions */
.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.table-actions .btn {
    padding: 0.5rem;
    min-width: 36px;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 12px;
    background-color: #333;
    color: #ffffff;
    text-align: center;
}

/* Client Linking Styles */
.client-linking-container {
    background-color: #222;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #333;
    margin-top: 1rem;
}

.client-search-section {
    margin-bottom: 1.5rem;
}

.client-search-input-group {
    display: flex;
    gap: 0.5rem;
}

.client-search-input-group input {
    flex: 1;
}

.client-search-input-group .btn {
    min-width: auto;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.client-search-results {
    margin-top: 1rem;
    border: 1px solid #444;
    border-radius: 8px;
    background-color: #1a1a1a;
    max-height: 300px;
    overflow-y: auto;
}

.client-result-item {
    padding: 1rem;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-result-item:hover {
    background-color: #333;
}

.client-result-item:last-child {
    border-bottom: none;
}

.client-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #444;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 1.2rem;
}

.client-result-info {
    flex: 1;
}

.client-result-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.client-result-details {
    color: #888;
    font-size: 0.9rem;
}

.client-action-divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.client-action-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #444;
    z-index: 1;
}

.client-action-divider span {
    background-color: #222;
    color: #888;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.client-create-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

.selected-client {
    background-color: #1a4a1a;
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.selected-client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.client-details {
    flex: 1;
}

.client-details h4 {
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.client-details p {
    color: #ccc;
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.selected-client .btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* Mobile responsiveness for client linking */
@media (max-width: 768px) {
    .client-linking-container {
        padding: 1rem;
    }
    
    .client-search-input-group {
        flex-direction: column;
    }
    
    .client-search-input-group .btn {
        width: 100%;
    }
    
    .selected-client-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .selected-client .btn {
        margin-left: 0;
        align-self: center;
    }
    
    .client-result-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Client Details Modal Styles */
.client-details-content {
    padding: 2rem;
    flex: 1;
    overflow-y: auto;
}

.details-section {
    margin-bottom: 2rem;
    background-color: #222;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
}

.details-section-title {
    background-color: #333;
    color: #ffffff;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #444;
}

.details-grid {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    word-break: break-word;
}

.detail-notes {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 1.5rem;
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.inspection-count {
    background-color: #4caf50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Client Inspections List */
.client-inspections-container {
    padding: 1rem 1.5rem;
}

.client-inspections-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.client-inspection-item {
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.client-inspection-item:hover {
    border-color: #555;
    background-color: #252525;
}

.inspection-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.inspection-info {
    flex: 1;
    min-width: 200px;
}

.inspection-os {
    font-size: 1.2rem;
    font-weight: 700;
    color: #4caf50;
    margin-bottom: 0.25rem;
}

.inspection-vehicle {
    font-size: 1rem;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.inspection-plate {
    color: #888;
    font-size: 0.9rem;
}

.inspection-date {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

.inspection-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.inspection-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.no-inspections {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.no-inspections i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #444;
}

.no-inspections p {
    font-size: 1rem;
    margin: 0;
}

/* Client Files Section */
.client-files-container {
    padding: 1rem;
}

.client-files-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.client-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.client-file-item .file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

.file-icon-wrapper {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.file-icon-wrapper i {
    color: white;
    font-size: 1.2rem;
}

.file-icon-wrapper .fa-file-pdf {
    color: white;
}

.file-icon-wrapper .fa-file-image {
    color: white;
}

.client-file-item .file-details {
    flex: 1;
    min-width: 0;
}

.client-file-item .file-name {
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.client-file-item .file-meta {
    font-size: 0.85rem;
    color: #888;
}

.client-file-item .file-description {
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 0.25rem;
    font-style: italic;
}

.client-file-item .file-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.no-files {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.no-files i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #444;
}

.no-files p {
    font-size: 1rem;
    margin: 0;
}

.files-count {
    font-weight: normal;
    color: #888;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

/* btn-info style */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

.card-btn.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.card-btn.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #117a8b 100%);
}

/* Mobile responsive for details modal */
@media (max-width: 768px) {
    .client-details-content {
        padding: 1rem;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .details-section-title {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .detail-notes {
        margin: 1rem;
    }
    
    .client-inspections-container {
        padding: 1rem;
    }
    
    .client-inspection-item {
        padding: 1rem;
    }
    
    .inspection-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .inspection-actions {
        justify-content: center;
    }
    
    .inspection-actions .btn {
        flex: 1;
        max-width: 150px;
    }
}

/* Mobile Navigation Buttons - Override with high specificity */
.mobile-nav-buttons {
    position: fixed !important;
    right: 20px !important;
    bottom: 20px !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    pointer-events: none !important;
}

.mobile-nav-buttons.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.mobile-nav-buttons .nav-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    background: rgba(0, 0, 0, 0.7) !important;
    color: white !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    pointer-events: auto !important;
}

.mobile-nav-buttons .nav-btn:hover {
    background: rgba(0, 0, 0, 0.9) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.mobile-nav-buttons .nav-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.mobile-nav-buttons .nav-btn.hidden {
    display: none !important;
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-nav-buttons {
        display: none !important;
    }
}

/* Show on mobile */
@media (max-width: 768px) {
    .mobile-nav-buttons {
        display: flex !important;
    }
}

/* Authentication Styles */
.login-page {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
    min-height: 100vh !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999 !important;
    max-width: none !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
}

.login-header h2 {
    color: #333;
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.login-header p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.login-form {
    padding: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.login-form input:invalid {
    border-color: #dc3545;
}

.login-form input:valid {
    border-color: #198754;
}

/* Melhorar posicionamento das mensagens de validação do browser */
.login-form .form-group {
    position: relative;
}

.login-form input {
    box-sizing: border-box;
}

/* Responsividade da tela de login */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
        margin: 0 1rem;
    }
    
    .login-card {
        margin: 0;
    }
    
    .login-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .login-form {
        padding: 1.5rem;
    }
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: #0d6efd;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background: #0b5ed7;
}

.login-btn i {
    margin-right: 0.5rem;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 0.5rem;
}

/* Logout button as navigation button */
.logout-nav-btn {
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.5rem;
    color: #ff6b6b !important;
}

.logout-nav-btn:hover {
    background: rgba(255, 107, 107, 0.1) !important;
    color: #ff8787 !important;
}

.logout-nav-btn i {
    color: inherit;
}

/* Old logout button styles kept for compatibility */
.logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 0.3rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* User Management Styles */
.users-container {
    margin-top: 2rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #0d6efd;
    color: white;
}

.btn-edit:hover {
    background: #0b5ed7;
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
}

/* Modal Base Styles - Ensure specific modals start hidden */
#user-modal,
#client-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* General modal overlay positioning */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

/* Show modal when active */
.modal-overlay.show,
#user-modal.show,
#client-modal.show {
    display: flex !important;
}

/* Image Modal - Higher z-index to appear above inspection details modal */
#image-modal {
    z-index: 10000 !important;
}

#image-modal .image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #2c2c2c;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

#image-modal .image-modal-header {
    padding: 1rem;
    background: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #444;
}

#image-modal .image-modal-header h3 {
    color: #fff;
    margin: 0;
    font-size: 1.1rem;
}

#image-modal .image-modal-body {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1a1a1a;
}

#image-modal .image-modal-body img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

/* User Modal Styles */
#user-modal .modal-content {
    max-width: 500px;
}

#user-modal .form-group {
    margin-bottom: 1.5rem;
}

#user-modal label {
    display: block;
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 500;
}

#user-modal input,
#user-modal select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#user-modal input:focus,
#user-modal select:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

#user-modal input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Responsive login and mobile adjustments */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        border-radius: 8px;
    }
    
    .login-header,
    .login-form {
        padding: 1.5rem;
    }
    
    .sidebar-footer {
        padding: 0.25rem;
    }
    
    /* Mobile vehicle actions */
    .vehicle-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    
    .scan-crlv-btn {
        justify-content: center !important;
        width: 100% !important;
    }
    
    /* Force page content to be visible and full width */
    .page.active {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Critical: Ensure checklist sections are always visible in mobile */
    #checklist-sections {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    #checklist-sections .form-section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 2rem !important;
    }
    
    #checklist-sections .checklist-items {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    #checklist-sections .checklist-item {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        margin-bottom: 1rem !important;
        padding: 1rem !important;
        /* Use the same dark theme as desktop */
        background: #2c2c2c !important;
        border: 1px solid #444 !important;
        border-radius: 8px !important;
        color: #fff !important;
    }
    
    /* Ensure specific modals are properly hidden on mobile */
    #user-modal:not(.show),
    #client-modal:not(.show) {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        z-index: -1 !important;
    }
    .page {
        width: 100% !important;
        padding: 1rem !important;
        margin: 0 !important;
    }
    
    /* Tables responsive */
    .inspections-table {
        display: none !important;
    }
    
    /* Forms responsive */
    .form-row {
        flex-direction: column !important;
    }
    
    .form-group {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }
    
    /* Buttons full width on mobile */
    .btn, button {
        width: 100% !important;
        min-height: 48px !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* Header text smaller on mobile */
    .header-text h1 {
        font-size: 1.8rem !important;
    }
    
    .header-text p {
        font-size: 1rem !important;
    }
    
    /* Logo smaller on mobile */
    .logo {
        width: 80px !important;
    }
}

/* Auto-filled field animation */
.auto-filled {
    background: linear-gradient(90deg, #d4edda 0%, #ffffff 100%) !important;
    border-color: #28a745 !important;
    animation: fillPulse 1s ease-in-out;
}

@keyframes fillPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Desktop - Fix collapsed sidebar main content spacing */
@media (min-width: 769px) {
    .main-content {
        margin-left: 280px !important; /* Full sidebar width */
        width: calc(100% - 280px) !important;
        padding: 2rem !important;
        margin-top: 0 !important;
    }
    
    .main-content.sidebar-collapsed {
        margin-left: 70px !important; /* Collapsed sidebar width */  
        width: calc(100% - 70px) !important;
        padding: 2rem !important;
        margin-top: 0 !important;
    }
}

/* User management table styling - same as inspections table */
.users-table-container .action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.users-table-container .btn-action {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    color: #ff6b6b;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.users-table-container .btn-action:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: translateY(-1px);
}

.users-table-container .btn-action.btn-edit {
    color: #007bff;
    border-color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.users-table-container .btn-action.btn-edit:hover {
    background: rgba(0, 123, 255, 0.2);
}

.users-table-container .btn-action.btn-delete {
    color: #dc3545;
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.users-table-container .btn-action.btn-delete:hover {
    background: rgba(220, 53, 69, 0.2);
}

/* Status badges for users table */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Form Preloader */
.form-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.preloader-content {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
    min-width: 320px;
    max-width: 90%;
}

.preloader-spinner {
    font-size: 2rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.preloader-spinner i {
    animation: spin 1.5s linear infinite;
}

.preloader-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.preloader-progress {
    margin-top: 1rem;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-steps {
    text-align: left;
}

.progress-steps .step {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0.25rem 0;
    padding: 0.25rem 0;
    transition: color 0.3s ease;
}

.progress-steps .step.active {
    color: #28a745;
    font-weight: 600;
}

.progress-steps .step.current {
    color: #007bff;
    font-weight: 600;
}

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

/* Mobile responsive preloader */
@media (max-width: 768px) {
    .preloader-content {
        margin: 1rem;
        padding: 1.5rem;
        min-width: auto;
    }
    
    .preloader-text {
        font-size: 1rem;
    }
    
    .progress-steps .step {
        font-size: 0.8rem;
    }
}

/* File Preview Modal */
.file-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.file-preview-content {
    background: #1e1e1e;
    border-radius: 12px;
    width: 100%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.file-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: #2d2d2d;
    border-bottom: 1px solid #444;
}

.file-preview-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 1rem;
}

.file-preview-close {
    background: #dc3545;
    border: none;
    border-radius: 8px;
    color: #fff;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-preview-close:hover {
    background: #c82333;
    transform: scale(1.05);
}

.file-preview-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #000;
}

.file-preview-body .preview-image {
    max-width: 100%;
    max-height: calc(90vh - 80px);
    object-fit: contain;
    border-radius: 4px;
}

.file-preview-body .preview-pdf {
    width: 100%;
    height: calc(90vh - 80px);
    border: none;
    background: #fff;
    border-radius: 4px;
}

.file-preview-body .preview-unsupported {
    text-align: center;
    color: #888;
    padding: 3rem;
}

.file-preview-body .preview-unsupported i {
    color: #555;
    margin-bottom: 1rem;
}

.file-preview-body .preview-unsupported p {
    margin: 0.5rem 0;
}

/* Button info style */
.btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.btn-info:hover {
    background: #138496;
    border-color: #117a8b;
}

/* Mobile responsive file preview */
@media (max-width: 768px) {
    .file-preview-modal {
        padding: 0;
    }
    
    .file-preview-content {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }
    
    .file-preview-header {
        padding: 0.75rem 1rem;
    }
    
    .file-preview-header h3 {
        font-size: 0.9rem;
    }
    
    .file-preview-body .preview-image {
        max-height: calc(100vh - 60px);
    }
    
    .file-preview-body .preview-pdf {
        height: calc(100vh - 60px);
    }
}
