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

html {
    overflow-y: auto;
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* More visible gradient: Deep Blue-Black to Slate Blue */
    background: linear-gradient(135deg, #0a0e17 0%, #1e2a38 100%);
    background-attachment: fixed;
    color: #ffffff;
    line-height: 1.6;
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}

/* CRITICAL: Lock body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    /* Removed touch-action: none - it was blocking bottom nav clicks */
}

.main-content,
.page,
.dashboard-stats-grid {
    background: transparent !important;
}

/* Header - Hidden for new layout */
.header {
    display: none !important;
    /* Hide the top black bar */
}

.header-container {
    max-width: 100%;
    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: 0;
    width: 280px;
    height: 100vh;
    background: #000000;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    transition: all 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

/* Sidebar Header & Brand */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 0 0.5rem 1.5rem 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: contain;
}

.sidebar-brand-text h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.sidebar-brand-text p {
    font-size: 0.75rem;
    color: #6c757d;
    margin: 0;
    font-weight: 400;
}

.sidebar-title {
    display: none !important;
}

.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;
}

.sidebar.collapsed .sidebar-brand-text {
    display: none;
}

.sidebar.collapsed .sidebar-logo {
    margin: 0 auto;
}

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

.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-btn.logout-nav-btn {
    color: #8c90a0;
}

.nav-btn.logout-nav-btn:hover {
    color: #ff7675;
    background: rgba(255, 118, 117, 0.1);
}

.nav-btn.logout-nav-btn:hover i {
    color: #ff7675;
}

.nav-btn {
    background: transparent;
    border: none;
    color: #8c90a0;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    text-align: left;
}

.nav-btn span {
    transition: opacity 0.2s ease;
}

.nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transform: none;
    box-shadow: none;
}

.nav-btn:hover i {
    color: #ffffff;
}

.nav-btn.active {
    background: #ff9f43;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(255, 159, 67, 0.3);
}

.nav-btn.active i {
    color: #ffffff;
}

.nav-btn i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #8c90a0;
    transition: color 0.2s;
}

/* Nav Badge (WhatsApp unread count) */
.nav-badge {
    background: #25D366;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Toggle Switch */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch input:checked+.slider {
    background-color: #25D366;
}

.switch input:checked+.slider:before {
    transform: translateX(24px);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

/* WhatsApp conversation hover */
.wa-conversation:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    padding: 2rem;
    min-height: 100vh;
    max-height: 100vh;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Hide leaked form elements that appear due to broken HTML nesting */
/* These elements escape the #nova-inspecao page and appear globally */
.main-content>.client-action-divider,
.main-content>.client-create-section,
.main-content>.form-actions,
.main-content>.client-search-results {
    display: none !important;
}

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

.page {
    display: none;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.page.active {
    display: block;
}

/* Login page - hidden by default, shown by JS when needed */
.login-page {
    display: none;
}

/* When login is active/visible */
.login-page.active {
    display: flex !important;
}

/* Hide login page when not active (after successful authentication) */
.login-page:not(.active) {
    display: none !important;
}

/* Fix Nova Inspeção page scroll and layout */
#nova-inspecao {
    max-height: calc(100vh - 2rem);
    padding-bottom: 2rem;
}

/* Fix scroll for detail pages */
#vehicle-details-view,
#client-details-page,
#dashboard,
#lista-inspecoes,
#detalhes-inspecao,
#revisoes,
#veiculos,
#clientes {
    max-height: calc(100vh - 4rem);
    height: calc(100vh - 4rem);
    padding-bottom: 2rem;
    overflow-y: auto !important;
    overflow-x: hidden;
}

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

.page-header h2 {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    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 {
    border-radius: 12px;
    padding: 2rem;
}

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

.section-title {
    color: #ffffff !important;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid #ff6b6b;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

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

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Responsivo para telas menores */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .form-group[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }
}

.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: rgba(255, 255, 255, 0.05);
    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-confirmed {
    background: #2ecc71 !important;
    color: white !important;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-confirmed i {
    font-size: 0.75rem;
}

.status-pending:not(.inspection-card-item) {
    background: #f39c12 !important;
    color: white !important;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Dashboard Panel Containers - Transparent Backgrounds */
.dashboard-alerts-list,
#dashboard-alerts-list,
.dashboard-notifications-list,
#dashboard-notifications-list {
    background: transparent !important;
}

/* Notification Item Styling */
.notification-item {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.notification-item.unread {
    background: rgba(46, 204, 113, 0.05) !important;
    border-left: 3px solid #2ecc71;
}

.notification-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.notification-content {
    flex: 1;
    min-width: 0;
    /* Text truncation fix */
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #888;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.notification-body {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
    word-break: break-word;
    /* Ensure long text wraps */
}

.notification-dot {
    position: absolute;
    top: 1rem;
    right: 0.5rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.5);
}

/* Notification Background Variants */
.bg-primary-soft {
    background: rgba(52, 152, 219, 0.15);
}

.bg-success-soft {
    background: rgba(46, 204, 113, 0.15);
}

.bg-warning-soft {
    background: rgba(241, 196, 15, 0.15);
}

.bg-danger-soft {
    background: rgba(231, 76, 60, 0.15);
}

.bg-info-soft {
    background: rgba(23, 162, 184, 0.15);
}

/* Ensure text colors are explicit if not inherited */
.text-primary {
    color: #3498db !important;
}

.text-success {
    color: #2ecc71 !important;
}

.text-warning {
    color: #f1c40f !important;
}

.text-danger {
    color: #e74c3c !important;
}

.text-info {
    color: #17a2b8 !important;
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}

.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: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    justify-content: center;
    align-items: center;
    max-width: 120px;
    margin: 0 auto;
}

.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: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    color: #ffffff;
    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,
.table-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    overflow-y: visible;
}

/* Espaço extra para o menu dropdown (3 pontinhos) não ser cortado */
.users-table-container {
    padding-bottom: 120px;
}

/* Garante scroll horizontal em telas pequenas */
.table-container.desktop-only {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling no iOS */
}

.inspections-table {
    width: 100%;
    min-width: 800px;
    /* Garante largura mínima para forçar scroll */
    border-collapse: collapse;
    margin: 0;
}

/* Overrides for Vehicles Page to fit better in available viewport and remove side scroll */
#veiculos .inspections-table,
#chamados .inspections-table {
    min-width: unset;
}

#chamados .inspections-table {
    min-width: unset;
    width: 100% !important;
}

#veiculos .inspections-table td:nth-child(3), /* Data Entrada */
#veiculos .inspections-table td:nth-child(5), /* Modelo */
#veiculos .inspections-table td:nth-child(9), /* Cliente */
#chamados .inspections-table td:nth-child(3)   /* Chamado / Descrição */ {
    white-space: normal;
    word-break: break-word; /* Safety wrap */
}

/* Overrides for Orçamentos page – remove forced min-width to prevent horizontal scroll */
#orcamentos .inspections-table,
#ordens-servico .inspections-table {
    min-width: unset;
}

#orcamentos .inspections-table th,
#orcamentos .inspections-table td {
    padding: 10px 8px;
    font-size: 0.82rem;
    white-space: nowrap;
}

#orcamentos .inspections-table td:nth-child(3), /* Cliente */
#orcamentos .inspections-table td:nth-child(4), /* Contato */
#orcamentos .inspections-table td:nth-child(5)  /* Veículo */ {
    white-space: normal;
    word-break: break-word;
}

.inspections-table th {
    background: #1a1a1a;
    font-weight: 600;
    padding: 12px 15px;
    border: none;
    border-bottom: 2px solid rgba(255, 165, 0, 0.3);
    text-align: center;
    color: #ffffff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.inspections-table td {
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #e0e6ed;
    background-color: transparent;
    font-size: 0.9rem;
    white-space: nowrap;
}

.inspections-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

.inspections-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.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-c.dashboard-panel {
    background: transparent !important;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: none !important;
}

.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: 5000;
    /* Below mobile navigation (10001) so nav is always clickable */
}

.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);
    }
}

/* Premium Car + Shield Preloader Animation */
.loading-content {
    text-align: center;
    position: relative;
}

.loading-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-icon-wrapper .fa-car {
    font-size: 50px;
    color: transparent;
    -webkit-text-stroke: 1px #DCA553;
    position: absolute;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(220, 165, 83, 0.5));
    animation: pulse-car 2s infinite ease-in-out;
    margin-right: 15px;
    margin-top: 10px;
}

.loading-icon-wrapper .shield-overlay {
    font-size: 90px;
    color: transparent;
    -webkit-text-stroke: 2px #DCA553;
    position: absolute;
    z-index: 2;
    filter: drop-shadow(0 0 15px rgba(220, 165, 83, 0.8));
    animation: pulse-shield 2s infinite ease-in-out;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fade-text 2s infinite;
}

.loading-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #DCA553;
    box-shadow: 0 0 15px #DCA553;
    animation: scan 1.5s linear infinite;
    opacity: 0.7;
    will-change: transform, opacity;
}

@keyframes pulse-shield {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes pulse-car {

    0%,
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }

    50% {
        transform: scale(1);
        opacity: 0.9;
    }
}

@keyframes fade-text {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    10%,
    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(100px);
        /* Approximate height adjustment */
        opacity: 0;
    }
}

/* 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: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    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;
    color: #333333;
}

.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;
        height: 100dvh !important;
        /* Dynamic viewport height */
        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: 0 !important;
        /* Remove padding from container to let children handle it */
        z-index: 1050 !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        transition: left 0.3s ease !important;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !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;
        display: none !important;
        /* Using display none to ensure it doesn't block anything */
    }

    .mobile-overlay.show {
        display: block !important;
        /* block or flex depending on need, block is fine for overlay */
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Sidebar header with close button */
    .sidebar-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 0 !important;
        /* Reset margin */
        padding: 1rem !important;
        /* Add padding here */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        flex-shrink: 0 !important;
        /* Prevent shrinking */
    }

    /* ... skipped unchanged parts ... */

    /* Vertical navigation container - NO SCROLL HERE */
    .nav-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
        flex: 1 !important;
        overflow: visible !important;
    }

    /* ... skipped unchanged parts ... */

    /* Sidebar footer - At the end of scroll content */
    .sidebar-footer {
        margin-top: auto !important;
        padding: 1rem !important;
        padding-bottom: 100px !important;
        /* Extra space for bottom navigation */
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: block !important;
        flex-shrink: 0 !important;
        background: rgba(15, 15, 15, 0.98) !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 90px 1rem !important;
        /* Top padding for header, bottom for nav */
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
        position: relative !important;
        z-index: 1 !important;
        /* Lower z-index, below navigation */
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    /* 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;
        margin: 0 auto !important;
    }

    #chamados .clients-table-container {
        display: block !important;
        overflow-x: auto !important;
        width: 100% !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 {
        display: grid !important;
        grid-template-columns: 1.5fr 1fr auto !important;
        gap: 0.4rem !important;
        align-items: center !important;
        width: 100% !important;
        text-align: left;
    }

    .checklist-item-header > div {
        width: auto !important;
        margin-bottom: 0 !important;
    }

    .checklist-item-header .checklist-controls {
        display: flex !important;
        justify-content: space-between !important;
        gap: 5px !important;
    }

    /* Mobile: Stack scan/photo buttons vertically */
    #nova-inspecao .form-section>div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }

    #nova-inspecao .form-section>div[style*="display: flex"] button {
        width: 100% !important;
        flex: none !important;
        height: 50px !important;
        font-size: 0.95rem;
    }

    /* Mobile: Improve checklist item layout */
    .checklist-item {
        padding: 1rem;
    }

    .checklist-item .item-name {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .checklist-item .form-group {
        width: 100%;
    }

    .checklist-item .form-group select,
    .checklist-item .form-group input {
        width: 100%;
        min-height: 44px;
        font-size: 1rem;
    }

    .checklist-controls {
        justify-content: center;
        margin: 0.5rem 0;
    }

    .checklist-controls .upload-btn {
        width: 38px !important;
        height: 38px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.9rem !important;
        min-width: 38px !important;
    }

    /* Mobile: Section titles */
    .section-title {
        font-size: 1.2rem !important;
        padding-bottom: 0.5rem;
    }

    /* Mobile: Dashboard panels padding */
    .dashboard-panel {
        padding: 1rem !important;
    }

    /* Mobile: Form actions buttons */
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    .form-actions .btn {
        width: 100%;
        min-height: 50px;
        font-size: 1rem;
    }

    /* Mobile: Service type buttons */
    .service-type-buttons {
        flex-wrap: wrap;
    }

    .service-type-buttons button {
        flex: 1 1 auto;
        min-width: 80px;
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }

    /* Mobile: General input improvements */
    #nova-inspecao input,
    #nova-inspecao select,
    #nova-inspecao textarea {
        min-height: 44px;
        font-size: 1rem;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
        padding: 10px !important;
        margin-bottom: 1rem !important;
    }

    .filter-main {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Elementos ocupando 100% por padrão */
    .filter-main .filter-group {
        flex: 1 1 100% !important;
    }

    /* Datas lado a lado (50% cada) */
    .filter-main .filter-group:nth-child(2),
    .filter-main .filter-group:nth-child(3) {
        flex: 1 1 calc(50% - 4px) !important;
    }

    /* Botão de Aplicar Filtros */
    .filter-main #apply-filters {
        flex: 1 1 100% !important;
        padding: 12px !important;
        justify-content: center !important;
    }

    /* Bubbles horizontais sem quebra de linha */
    .filter-quick.mobile-only {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 5px 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    .filter-quick.mobile-only .btn-quick {
        flex: 0 0 auto !important;
        padding: 8px 14px !important;
        font-size: 0.9rem !important;
    }

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

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

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

    /* Mobile: Service type selector (Blindagem/Manutenção/Revisão) */
    .service-type-selector {
        flex-wrap: wrap !important;
        gap: 5px !important;
    }

    .service-type-selector .service-option {
        flex: 1 1 calc(33% - 5px) !important;
        min-width: 80px !important;
        padding: 8px 5px !important;
        font-size: 0.85rem !important;
        white-space: nowrap;
    }
}

/* 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: 5px;
    right: 5px;
    background: rgba(220, 38, 38, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.remove-photo-btn:hover {
    background: #ef4444;
    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: 9999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    pointer-events: auto !important;
}

.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;
    pointer-events: auto !important;
}

/* 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;
    position: relative; /* Add position context for close button */
    padding-right: 4rem; /* Guarantee title doesn't crash into close button */
}

/* Ensure close button is absolutely positioned inside header */
.modal-header .modal-close {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1.5rem;
    z-index: 10 !important;
}

.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: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    overflow-x: auto;
}

#clients-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

#clients-table th {
    background: #1a1a1a;
    font-weight: 600;
    padding: 12px 15px;
    border: none;
    border-bottom: 2px solid rgba(255, 165, 0, 0.3);
    text-align: center;
    color: #ffffff;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

#clients-table td {
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #e0e6ed;
    background-color: transparent;
    font-size: 0.9rem;
    white-space: nowrap;
}

#clients-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

#clients-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.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;
    /* Removed heavy background and border */
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding-bottom: 1rem;
}

.details-section:last-child {
    border-bottom: none;
}

.details-section-title {
    background-color: transparent;
    color: #ffffff !important;
    /* Added !important to force visibility against dark background */
    fill: #ffffff;
    padding: 0 0 1rem 0;
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #ff6b6b;
    /* Restoring the border for better visibility */
}

.details-section-title i,
.details-section-title svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.details-grid {
    padding: 0;
    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;
}

/* Vehicle Details Tabs */
.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #888;
}

.tab-btn.active {
    border-bottom: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.details-section .table-container {
    margin-top: 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 Items - History List Style */
.client-file-item {
    background: rgba(17, 24, 39, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.client-file-item:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(255, 255, 255, 0.15);
}

.file-info-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    /* Allow children to shrink/truncate */
    flex: 1;
}

.file-type-badge {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 10px 14px;
    border-radius: 10px;
    min-width: 55px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.file-type-badge.type-image {
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

.file-type-badge.type-pdf {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.3);
}

.file-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    /* Critical for truncation of children */
    flex: 1;
}

.file-name {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 400;
}

.file-status-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.status-sent {
    background: rgba(6, 95, 70, 0.4);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.file-actions-hover {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.2s ease;
}

.client-file-item:hover .file-actions-hover {
    opacity: 1;
    transform: translateX(0);
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.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 1fr;
        padding: 1rem;
        gap: 1.5rem 1rem;
        text-align: center;
    }
    
    .detail-item {
        align-items: center;
        text-align: center;
    }

    .detail-value {
        font-size: 0.95rem;
        word-break: break-word;
    }

    .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 */
/* Authentication Styles */
.login-page {
    display: none;
    /* Hidden by default */
    background: transparent !important;
    min-height: 100vh !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;
}

.login-page.active {
    display: flex !important;
}

/* Hide mobile navigation when login page is active */
.login-page.active~#mobile-bottom-nav,
body:has(.login-page.active) #mobile-bottom-nav,
body:has(.login-page.active) .mobile-bottom-nav {
    display: none !important;
}

/* Mobile Bottom Navigation - Hidden on desktop */
.mobile-bottom-nav,
#mobile-bottom-nav {
    display: none !important;
}

/* Show mobile bottom nav only on mobile screens */
@media (max-width: 768px) {

    .mobile-bottom-nav,
    #mobile-bottom-nav {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #1a1a1a !important;
        border-top: 1px solid #333 !important;
        z-index: 10001 !important;
        /* Higher than everything else */
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px)) !important;
        /* iOS safe area */
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: #888;
        font-size: 0.7rem;
        padding: 0.5rem;
        cursor: pointer;
        transition: color 0.3s ease;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        position: relative !important;
        z-index: 10002 !important;
    }

    .bottom-nav-item i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .bottom-nav-item.active {
        color: #ff6b6b;
    }

    .bottom-nav-item:hover {
        color: #ff6b6b;
    }

    /* Hide mobile nav on login page even on mobile */
    body:has(.login-page.active) .mobile-bottom-nav,
    body:has(.login-page.active) #mobile-bottom-nav {
        display: none !important;
    }

    /* CRITICAL: Ensure body scroll doesn't overlap navigation */
    html,
    body {
        overflow-x: hidden !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Add safe padding to scrollable containers */
    body::after {
        content: '';
        display: block;
        height: 80px;
        /* Same as nav height */
        pointer-events: none;
    }

    /* Force all fixed/absolute positioned elements to respect navigation area */
    .modal-overlay,
    .modal,
    .toast-container {
        pointer-events: none;
    }

    .modal-overlay.show,
    .modal.show,
    .toast-container .toast {
        pointer-events: auto;
    }

    /* Ensure cards and content cannot overlap navigation */
    .inspection-card,
    .client-card,
    .vehicle-card,
    .revision-item,
    .table-container,
    .form-section {
        position: relative;
        z-index: 1;
    }
}



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

.login-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.login-header p {
    color: #cccccc;
    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: #e0e6ed;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 1rem;
    color: #ffffff;
    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,
#blog-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,
#blog-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 and panels are properly sized and visible on mobile */
    #checklist-sections,
    #checklist-sections .form-section,
    #checklist-sections .checklist-items,
    #checklist-panel {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        max-height: none !important;
        margin-bottom: 2rem !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;
        padding-bottom: 80px !important;
        /* Space for bottom nav */
        margin: 0 !important;
    }

    /* Ensure pages don't overlap bottom nav */
    .page.active {
        min-height: calc(100vh - 80px) !important;
        max-height: none !important;
    }

    /* Tables responsive - Mobile Card View */
    .inspections-table {
        display: none !important;
    }
    
    /* Reduz padding do container geral no mobile para economizar espaço */
    .details-section .table-container {
        padding: 0 !important; /* Elimina preenchimento que consome tela */
        background: transparent !important;
        box-shadow: none !important;
        margin: 10px 0 !important;
        overflow-x: hidden !important; /* Trava totalmente o scroll lateral */
        width: 100% !important;
    }

    .details-section .inspections-table {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }
    
    .details-section .inspections-table thead {
        display: none !important; /* Oculta cabeçalhos planos */
    }

    .details-section .inspections-table tbody {
        display: block !important;
        width: 100% !important;
    }

    .details-section .inspections-table tr {
        display: grid !important;
        /* minmax(0, 1fr) impede que as colunas estiquem o card para fora da tela */
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
        gap: 12px 10px !important;
        background: #1e2430 !important;
        border: 1px solid rgba(255, 255, 255, 0.06) !important;
        border-radius: 14px !important;
        padding: 16px !important;
        margin-bottom: 12px !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12) !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* FORCE SELETOR PROFUNDO - Evita que qualquer regra esconda alternâncias */
    .details-section .table-container .inspections-table tbody tr td,
    .details-section .table-container .inspections-table tbody tr td:nth-child(odd),
    .details-section .table-container .inspections-table tbody tr td:nth-child(even) {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        flex-direction: column !important; /* Rótulo em cima, Valor embaixo */
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 0 !important;
        width: 100% !important;
        white-space: normal !important; /* Permite quebras se o texto for longo */
        word-break: break-all !important; /* Garante que strings longas não estiquem a track */
        color: #e0e0e0 !important;
    }

    .details-section .inspections-table td::before {
        display: block !important;
        content: attr(data-label) !important;
        font-size: 0.68rem !important;
        font-weight: 600 !important;
        color: rgba(255, 255, 255, 0.4) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        margin-bottom: 2px !important;
    }

    /* Rodapé de Ações esticado na largura total do Card */
    .details-section .inspections-table td:last-child {
        grid-column: span 2 !important;
        flex-direction: row !important; /* Botões lado a lado */
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 8px !important;
        padding-top: 12px !important;
        margin-top: 4px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
        width: 100% !important;
    }

    /* Correção do cabeçalho do veículo e placa */
    .vehicle-header {
        flex-wrap: wrap !important;
        gap: 12px !important;
    }

    #vehicle-details-plate {
        white-space: nowrap !important; /* Impede quebrar no hífen */
        display: inline-block !important; /* Bloqueia re-flows estranhos */
    }

    /* Universal Responsive Table for Tailwind Views */
    .responsive-table {
        display: block !important;
        width: 100%;
        border: none;
        background: transparent;
    }
    .responsive-table thead,
    .responsive-table th {
        display: none !important;
    }
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }
    .responsive-table tr {
        margin-bottom: 1rem;
        border-radius: 12px;
        padding: 15px;
        border: 1px solid rgba(128, 128, 128, 0.2); 
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        /* The background comes from Tailwind class on the tr or container */
    }
    /* Neutralize the divide-y borders from Tailwind when displaying as block */
    .responsive-table tbody {
        border-top: none !important;
    }
    .responsive-table tr {
        border-top: 1px solid rgba(128, 128, 128, 0.2) !important;
    }
    .responsive-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 12px 15px !important;
        width: 100%;
        border-bottom: 1px solid rgba(128, 128, 128, 0.1); 
        min-height: 48px;
        font-size: 0.95rem;
    }
    .responsive-table td:last-child {
        border-bottom: none;
        padding-bottom: 0 !important;
    }
    .responsive-table td:first-child {
        padding-top: 0 !important;
    }
    .responsive-table td::before {
        content: attr(data-label);
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    /* Forms responsive */
    .form-row {
        flex-direction: column !important;
    }

    .form-group {
        width: 100% !important;
        margin-bottom: 1rem !important;
    }

    /* Buttons - more specific selectors to avoid breaking inline action buttons */
    .btn.btn-primary,
    .btn.btn-secondary,
    .login-btn,
    .modal-footer .btn {
        width: 100% !important;
        min-height: 48px !important;
        margin-bottom: 0.5rem !important;
    }

    /* Action buttons in forms should NOT be full width */
    .action-buttons .btn,
    .btn-action,
    .checklist-item .btn,
    .item-actions button,
    .camera-buttons button,
    .photo-upload-btn,
    .scan-crlv-btn {
        width: auto !important;
        min-width: auto !important;
        min-height: 40px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    #fuel-photo-btn,
    #chassis-photo-btn,
    #add-client-btn {
        width: 45px !important;
        min-width: 45px !important;
        min-height: 40px !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
    }

    /* Nova Inspeção page specific fixes */
    #nova-inspecao {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
        padding: 0.5rem !important;
        padding-bottom: 80px !important;
        /* Space for bottom nav */
        box-sizing: border-box !important;
        max-height: none !important;
        height: auto !important;
    }

    /* Override max-height for all pages on mobile to prevent overlap with bottom nav */
    #vehicle-details-view,
    #client-details-page,
    #dashboard,
    #lista-inspecoes,
    #detalhes-inspecao,
    #revisoes,
    #veiculos,
    #clientes,
    #agenda,
    #usuarios,
    #estoque {
        max-height: none !important;
        height: auto !important;
        padding-bottom: 80px !important;
        /* Space for bottom nav */
    }

    #nova-inspecao .inspection-form {
        width: 100% !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    #nova-inspecao .form-section {
        width: 100% !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    #nova-inspecao .section-header {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    /* Vehicle actions buttons row */
    #nova-inspecao .vehicle-actions,
    .vehicle-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    #nova-inspecao .vehicle-actions button,
    #nova-inspecao .vehicle-actions .btn {
        flex: 1 1 calc(50% - 0.5rem) !important;
        max-width: calc(50% - 0.25rem) !important;
        min-height: 44px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Checklist items action buttons */
    .checklist-item .item-controls,
    .checklist-item .item-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
        justify-content: flex-start !important;
    }

    .checklist-item .item-controls button,
    .checklist-item .item-actions button {
        flex: 0 0 auto !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        padding: 0.5rem !important;
    }

    /* Camera/photo buttons in checklist */
    .camera-buttons,
    .photo-buttons {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .camera-buttons button,
    .photo-buttons button {
        flex: 0 0 auto !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0.5rem !important;
    }

    /* Form inputs full width */
    #nova-inspecao input,
    #nova-inspecao select,
    #nova-inspecao textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !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: #1f2128;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    min-width: 320px;
    max-width: 90%;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.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);
    }
}

/* Revisions Styles */
.revisions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.revision-card {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.revision-card.status-overdue {
    border-left: 4px solid #e74c3c;
}

.revision-card.status-upcoming {
    border-left: 4px solid #f1c40f;
}

.revision-card.status-notified {
    border-left: 4px solid #3498db;
}

.revision-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.revision-vehicle h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.plate-badge {
    background: #333;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #aaa;
    margin-top: 0.25rem;
    display: inline-block;
}

.revision-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.revision-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ccc;
    font-size: 0.9rem;
}

.revision-info i {
    width: 20px;
    text-align: center;
    color: #666;
}

.revision-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-action {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.btn-action.notify {
    background: #3498db;
    color: white;
}

.btn-action.notify:hover {
    background: #2980b9;
}

.btn-action.check {
    background: #2ecc71;
    color: white;
    max-width: 40px;
}

.btn-action.check:hover {
    background: #27ae60;
}

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

.status-badge.status-overdue {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.status-badge.status-upcoming {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.status-badge.status-notified {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.status-badge.status-success {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.revision-card.status-success {
    border-left: 4px solid #2ecc71;
}

/* Inspection Details Page Styles */
/* Inspection Details Page Styles (Dark Mode) */
.details-container {
    background: #1a1a1a;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.details-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.summary-card.ok {
    border-bottom: 4px solid #2ecc71;
    background: linear-gradient(180deg, rgba(46, 204, 113, 0.05) 0%, rgba(46, 204, 113, 0.1) 100%);
}

.summary-card.ok .summary-value,
.summary-card.ok i {
    color: #2ecc71;
}

.summary-card.damaged {
    border-bottom: 4px solid #e74c3c;
    background: linear-gradient(180deg, rgba(231, 76, 60, 0.05) 0%, rgba(231, 76, 60, 0.1) 100%);
}

.summary-card.damaged .summary-value,
.summary-card.damaged i {
    color: #e74c3c;
}

.summary-card.absent {
    border-bottom: 4px solid #f1c40f;
    background: linear-gradient(180deg, rgba(241, 196, 15, 0.05) 0%, rgba(241, 196, 15, 0.1) 100%);
}

.summary-card.absent .summary-value,
.summary-card.absent i {
    color: #f1c40f;
}

.summary-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin: 0.5rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.summary-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

/* Details Sections */
.detail-section {
    margin-bottom: 3rem;
}

.detail-section-title {
    font-size: 1.2rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section-title i {
    color: #3498db;
}

/* Info Grid */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-info-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid #3498db;
    transition: background 0.2s;
}

.detail-info-item:hover {
    background: rgba(255, 255, 255, 0.07);
}

.detail-info-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
}

.detail-info-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Checklist Items */
.detail-checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.detail-check-item {
    position: relative;
    padding: 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.detail-check-item:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
}

.detail-check-item.status-ok {
    border-left: 4px solid #2ecc71;
}

.detail-check-item.status-damaged {
    border-left: 4px solid #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.detail-check-item.status-absent {
    border-left: 4px solid #f1c40f;
    background: rgba(241, 196, 15, 0.05);
}

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

.check-item-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 1rem;
}

.check-item-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge-ok {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.status-badge-damaged {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge-absent {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

.check-item-obs {
    font-size: 0.9rem;
    color: #cccccc;
    margin-top: 0.75rem;
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.check-item-photos {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.check-photo-thumb {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s;
}

.check-photo-thumb:hover {
    transform: scale(1.1);
    z-index: 2;
    border-color: white;
}

/* =========================================
   DASHBOARD REDESIGN - PREMIUM STYLES
   ========================================= */

/* Stats Grid Layout */
.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium Stat Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.stat-card:hover::before {
    transform: translateX(100%);
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Card Variants with Modern Gradients */
.stat-card.blue {
    border-bottom: 3px solid #4facfe;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, rgba(79, 172, 254, 0.2), rgba(0, 242, 254, 0.2));
    color: #4facfe;
    box-shadow: 0 8px 16px rgba(79, 172, 254, 0.2);
}

.stat-card.green {
    border-bottom: 3px solid #43e97b;
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, rgba(67, 233, 123, 0.2), rgba(56, 249, 215, 0.2));
    color: #43e97b;
    box-shadow: 0 8px 16px rgba(67, 233, 123, 0.2);
}

.stat-card.orange {
    border-bottom: 3px solid #fa709a;
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, rgba(250, 112, 154, 0.2), rgba(254, 225, 64, 0.2));
    color: #fa709a;
    box-shadow: 0 8px 16px rgba(250, 112, 154, 0.2);
}

.stat-card.red {
    border-bottom: 3px solid #ff0844;
}

.stat-card.red .stat-icon {
    background: linear-gradient(135deg, rgba(255, 8, 68, 0.2), rgba(255, 177, 153, 0.2));
    color: #ff0844;
    box-shadow: 0 8px 16px rgba(255, 8, 68, 0.2);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    transition: transform 0.4s ease;
}

.stat-card:hover .stat-icon {
    transform: rotate(10deg) scale(1.1);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* Dashboard Content Grid */
.dashboard-content-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Full width panels (tables) */
.dashboard-panel-fullwidth {
    width: 100%;
    grid-column: 1 / -1;
}

/* Horizontal cards row with scroll */
.dashboard-cards-row {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.dashboard-cards-row::-webkit-scrollbar {
    height: 6px;
}

/* Charts row */
.dashboard-charts-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
    margin-top: 1rem;
}

.dashboard-cards-row::-webkit-scrollbar-track {
    background: transparent;
}

.dashboard-cards-row::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.dashboard-cards-row::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Card panels (fixed width for scroll) */
.dashboard-panel-card {
    flex: 0 0 350px;
    min-width: 300px;
    height: fit-content;
}

@media (max-width: 992px) {
    .dashboard-cards-row {
        flex-wrap: nowrap;
    }

    .dashboard-panel-card {
        flex: 0 0 280px;
        min-width: 260px;
    }
}

@media (max-width: 768px) {
    .dashboard-cards-row {
        flex-direction: column;
        overflow-x: visible;
        gap: 1rem;
    }

    .dashboard-panel-card {
        flex: 1 1 auto;
        width: 100% !important;
        min-width: 0 !important;
    }

    .dashboard-charts-row {
        flex-direction: column;
    }

    .chart-container {
        height: 250px;
    }

    .dashboard-table {
        min-width: 600px; /* Forces horizontal scroll to work beautifully on mobile viewports */
    }
}

.dashboard-panel {
    background: rgba(255, 255, 255, 0.02) !important;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem;
    height: 100%;
    min-height: min-content;
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2), inset 0 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    transition: all 0.3s ease;
}

.dashboard-panel:hover {
    box-shadow: 0 8px 32px -1px rgba(0, 0, 0, 0.3), inset 0 1px 0 0 rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

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

.panel-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

/* TIMELINE (TIME LAPSE) STYLES */
.timeline-list {
    position: relative;
    padding-left: 20px;
}

.timeline-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 6px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, #4facfe, rgba(255, 255, 255, 0.1));
}

.timeline-item {
    position: relative;
    padding: 0 0 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 2px solid #4facfe;
    box-shadow: 0 0 0 4px rgba(79, 172, 254, 0.2);
    z-index: 2;
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
    background: #4facfe;
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(79, 172, 254, 0.3);
}

.timeline-content {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    transition: transform 0.2s ease;
}

.timeline-item:hover .timeline-content {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(5px);
}

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

.timeline-time {
    font-size: 0.8rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.timeline-title {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.timeline-desc {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.5rem;
}

.timeline-actions {
    display: flex;
    justify-content: flex-end;
}

/* PREMIUM ALERTS */
.alert-card {
    display: flex;
    gap: 1rem;
    background: linear-gradient(to right, rgba(255, 8, 68, 0.1), rgba(255, 8, 68, 0.05));
    border-left: 4px solid #ff0844;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    align-items: flex-start;
    transition: transform 0.2s ease;
}

.alert-card:hover {
    transform: translateX(5px);
    background: linear-gradient(to right, rgba(255, 8, 68, 0.15), rgba(255, 8, 68, 0.08));
}

.alert-icon-wrapper {
    background: rgba(255, 8, 68, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff0844;
    flex-shrink: 0;
}

.alert-details {
    flex: 1;
}

.alert-card-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.25rem;
}

.alert-card-desc {
    font-size: 0.85rem;
    color: #ddd;
}

/* ================================================
   ESTILOS PADRONIZADOS - TODAS AS TABELAS
   Tema escuro consistente com página Nova Inspeção
   ================================================ */

/* Responsive Table Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 1rem;
}

/* Dashboard Table */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

.dashboard-table thead th {
    background: transparent;
    color: #ffffff;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 165, 0, 0.3);
}

.dashboard-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease;
}

.dashboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-table td {
    padding: 12px 15px;
    color: #e0e6ed;
    font-size: 0.9rem;
}

.dashboard-table .btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.dashboard-table .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Selected Client Card Styling */
.selected-client-card {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
    animation: fadeIn 0.4s ease;
}

.selected-client-card:hover {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.selected-client-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.selected-client-avatar i {
    color: white;
    font-size: 1.25rem;
}

.selected-client-info-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.client-name-row h4 {
    margin: 0;
    color: var(--text-main, #ffffff);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.client-details-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: var(--text-muted, #aaa);
    font-size: 0.9rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-item i {
    color: var(--primary, #ffa502);
    font-size: 0.85rem;
    opacity: 0.9;
}

.detail-separator {
    color: #555;
    font-weight: bold;
    font-size: 0.8rem;
}

#btn-remove-client {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#btn-remove-client:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .selected-client-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    .selected-client-inner {
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
    }

    .client-details-row {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .detail-separator {
        display: none;
    }

    #btn-remove-client {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* =========================================
   NOVOS ESTILOS (Integrados do revisao_teste)
   ========================================= */

/* --- Toolbar e Filtros da Página de Revisão --- */
.controls-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    background: #000000;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    background: #2d303e;
    color: #fff;
}

.tab-btn[data-filter="overdue"].active {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.tab-btn[data-filter="pending"].active {
    background: rgba(255, 159, 67, 0.15);
    color: var(--primary);
}

.tab-btn[data-filter="completed"].active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.search-wrapper-new {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input-new {
    width: 100%;
    background: #2a2d36;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 15px 12px 40px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.search-wrapper-new i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* --- CARDS EXPANSÍVEIS --- */
.revisions-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.revision-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--text-muted);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.revision-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: #252832;
}

.revision-card.expanded {
    background: #262933;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 159, 67, 0.2);
}

/* Header do Card */
.card-header-compact {
    padding: 18px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.header-main-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

.car-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

.plate-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #ccc;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px dashed #444;
}

.expand-icon {
    color: var(--text-muted);
    transition: transform 0.4s;
    font-size: 1.1rem;
}

.revision-card.expanded .expand-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Body Expandido */
.card-body-expanded {
    max-height: 0;
    opacity: 0;
    padding: 0 25px;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.4s ease, padding 0.4s ease;
    border-top: 1px solid transparent;
}

.revision-card.expanded .card-body-expanded {
    max-height: 2000px;
    /* Aumentado para caber inputs */
    opacity: 1;
    padding-bottom: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 5px;
    overflow: visible !important;
}

/* Elementos Internos do Card */
.progress-section {
    margin: 20px 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.progress-track {
    width: 100%;
    height: 6px;
    background: #131517;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 1s ease 0.2s;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-title {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
}

.stat-data {
    font-size: 0.95rem;
    font-weight: 500;
    color: #fff;
}

/* --- ÁREA DE EVIDÊNCIAS E INPUTS (Novo Pedido) --- */
.evidence-container {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.evidence-label {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.media-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.btn-media {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2d303e;
    border: 1px solid #444;
    color: #fff;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-media:hover {
    background: #3a3f4b;
    border-color: var(--primary);
}

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

.obs-textarea {
    width: 100%;
    background: #131517;
    border: 1px solid #333;
    color: #ddd;
    padding: 10px;
    border-radius: 6px;
    resize: vertical;
    min-height: 80px;
    font-family: 'Inter', sans-serif;
}

.obs-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Ações */
.actions-row {
    display: flex;
    gap: 10px;
}

.btn-action {
    flex: 1;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-whatsapp {
    background: transparent;
    border: 1px solid #2ecc71;
    color: #2ecc71;
}

.btn-whatsapp:hover {
    background: rgba(46, 204, 113, 0.1);
}

.btn-schedule {
    background: var(--primary);
    color: #fff;
    border: none;
}

.btn-schedule:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Timeline Modal */
.timeline {
    position: relative;
    padding-left: 20px;
    margin-top: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #2d303e;
}

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

.timeline-dot {
    position: absolute;
    left: -20px;
    top: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #2d303e;
    border: 2px solid #1f2128;
    z-index: 2;
}

.timeline-item.done .timeline-dot {
    background: #2ecc71;
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4);
}

.timeline-item.current .timeline-dot {
    background: var(--primary);
}

.t-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.t-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Space Grotesk', monospace;
}

.loading-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* =========================================
   ESTILOS ESPECÍFICOS: PÁGINA DE REVISÕES (NOVO DESIGN - GROUPED)
   ========================================= */

/* Fontes Especiais */
.page-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 5px;
}

/* Toolbar de Filtros (Novo Design) */
.controls-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-tabs {
    display: flex;
    background: #000;
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    background: #2d303e;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.tab-btn[data-filter="overdue"].active {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.tab-btn[data-filter="pending"].active {
    background: rgba(255, 159, 67, 0.15);
    color: var(--primary);
}

.tab-btn[data-filter="completed"].active {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

.search-wrapper-new {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input-new {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 15px 12px 40px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.search-wrapper-new i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* CARDS AGRUPADOS (Grouped Cards) */
.revisions-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 50px;
}

.grouped-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--text-muted);
    border-radius: 12px;

    transition: all 0.3s;
    margin-bottom: 15px;
}

.grouped-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.grouped-card.open {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Header do Card */
.grouped-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    user-select: none;
}

.car-info-block h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    margin-top: 0;
}

.car-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: #888;
    font-family: monospace;
}

.plate-badge {
    background: #2d303e;
    padding: 2px 8px;
    border-radius: 4px;
    color: #ccc;
    border: 1px solid #444;
    font-weight: bold;
}

.header-status-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.main-status-text {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.header-date-badge {
    font-size: 0.8rem;
    background: #111;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #333;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-count {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chevron {
    transition: transform 0.3s ease;
}

/* Corpo do Card (Lista) */
.grouped-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    background: #0e0f11;
    opacity: 0;
}

.grouped-card.open .grouped-body {
    max-height: 2000px;
    opacity: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    overflow: visible;
}

.revisions-list-inner {
    padding: 0;
}

.revision-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr auto;
    padding: 18px 25px;
    align-items: center;
    border-bottom: 1px solid #1f2128;
    transition: background 0.2s;
}

.revision-row:hover {
    background: #16181d;
}

.col-date {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.col-date i {
    color: #666;
    font-size: 0.9rem;
}

.col-km {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-overdue {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.badge-pending {
    background: rgba(255, 159, 67, 0.15);
    color: #ff9f43;
    border: 1px solid rgba(255, 159, 67, 0.3);
}

.badge-future {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-done {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.col-menu {
    color: #444;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px;
}

.col-menu:hover {
    color: #fff;
}

/* Footer de Ações */
.card-footer-actions {
    padding: 15px 25px 20px 25px;
    background: #131517;
    display: flex;
    gap: 15px;
    border-top: 1px solid #1f2128;
    position: relative;
    z-index: 10;
}

.btn-history {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: 0.2s;
}

.btn-history:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.btn-reminder {
    flex: 1;
    height: 45px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-reminder:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 159, 67, 0.05);
}

.btn-schedule-large {
    flex: 1.5;
    height: 45px;
    border-radius: 8px;
    border: none;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.2);
    transition: 0.2s;
}

.btn-schedule-large:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-delete-vehicle {
    height: 45px;
    width: 45px;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-vehicle:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
    transform: translateY(-2px);
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #666;
}

@media (max-width: 768px) {
    .revision-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .grouped-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .header-status-block {
        align-items: flex-start;
        text-align: left;
        width: 100%;
        border-top: 1px solid #333;
        padding-top: 10px;
    }

    .card-footer-actions {
        flex-direction: column;
    }
}

/* Enhanced Timeline Styles for History Modal */
.timeline-item-card {
    background: #252830;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    transition: transform 0.2s;
}

.timeline-item-card:hover {
    transform: translateX(5px);
    background: #2a2d36;
}

.timeline-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.t-status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.t-status-done {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.t-status-pending {
    color: var(--primary);
    background: rgba(255, 159, 67, 0.1);
}

.t-status-future {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

/* =========================================
   4. ESTILOS DA PÁGINA AGENDA (NOVO!)
   ========================================= */
.agenda-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    height: calc(100vh - 150px);
}

@media (max-width: 768px) {
    .agenda-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        gap: 20px !important;
    }
    .timeline-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 15px !important;
    }
    .date-navigator {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .timeline-body {
        padding: 15px !important;
        overflow-y: visible !important;
        flex: none !important;
    }
    .timeline-wrapper {
        display: block !important;
        overflow: visible !important;
        height: auto !important;
    }
}

/* Timeline Esquerda */
.timeline-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.timeline-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 100;
}

.date-navigator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-arrow {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
}

.nav-arrow:hover {
    color: #fff;
}

.timeline-body {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding: 20px;
    background: repeating-linear-gradient(to bottom, transparent 0px, transparent 59px, #2d303e 60px);
    background-size: 100% 60px;
    /* Linhas das horas */
}

/* Pending Appointments Styles */
.pending-appointments-section {
    background: rgba(255, 159, 67, 0.1);
    border: 1px solid rgba(255, 159, 67, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.pending-appointments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.appointment-card {
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 15px;
    transition: 0.2s;
}

.appointment-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.1);
}

.appointment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.appointment-card-type {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    text-transform: uppercase;
    font-weight: 600;
}

.appointment-card-type.revisao {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.appointment-card-type.manutencao {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.appointment-card-type.blindagem {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.appointment-card-type.vistoria {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.appointment-card-date {
    font-size: 0.85rem;
    color: #888;
}

.appointment-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.appointment-card-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.appointment-card-actions {
    display: flex;
    gap: 10px;
}

.btn-complete-appt {
    flex: 1;
    padding: 10px;
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-complete-appt:hover {
    background: #27ae60;
}

.btn-edit-appt {
    padding: 10px 15px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-edit-appt:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Calendar Popup Styles */
.date-navigator {
    position: relative;
}

.calendar-popup {
    position: absolute;
    top: 100%;
    left: auto;
    right: -100px;
    transform: none;
    margin-top: 10px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    min-width: 280px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    color: #fff;
}

.cal-nav {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: 0.2s;
}

.cal-nav:hover {
    background: rgba(255, 159, 67, 0.1);
    color: var(--primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #ccc;
    transition: 0.2s;
    border: none;
    background: transparent;
}

.cal-day:hover {
    background: rgba(255, 159, 67, 0.1);
    color: #fff;
}

.cal-day.today {
    border: 2px solid var(--primary);
    font-weight: 700;
}

.cal-day.selected {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}

.cal-day.other-month {
    color: #444;
}

.cal-day.has-appointments {
    position: relative;
}

.cal-day.has-appointments::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background: #2ecc71;
    border-radius: 50%;
}

.calendar-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
    text-align: center;
}

.btn-cal-today {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-cal-today:hover {
    background: var(--primary);
    color: #fff;
}


/* Grid de Horas */
.time-marker {
    position: absolute;
    left: 0;
    font-size: 0.75rem;
    color: #666;
    width: 50px;
    text-align: right;
    transform: translateY(-50%);
}

/* Blocos de Agendamento */
.appointment-block {
    position: absolute;
    left: 70px;
    right: 20px;
    background: rgba(52, 152, 219, 0.15);
    border-left: 4px solid #3498db;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
    transition: 0.2s;
    overflow: hidden;
}

.appointment-block:hover {
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.appt-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.appt-meta {
    font-size: 0.8rem;
    color: #ccc;
    display: flex;
    gap: 10px;
}

.appt-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0;
    transition: 0.2s;
}

.appointment-block:hover .appt-actions {
    opacity: 1;
}

.action-icon {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    padding: 4px;
    border-radius: 4px;
    margin-left: 2px;
}

.action-icon:hover {
    background: var(--primary);
}

/* Cores por Status */
.appt-confirmed {
    background: rgba(46, 204, 113, 0.15);
    border-left-color: #2ecc71;
}

.appt-pending {
    background: rgba(255, 159, 67, 0.15);
    border-left-color: #ff9f43;
}

/* Lista Lateral Direita */
.upcoming-wrapper {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.upcoming-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.upcoming-list {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upcoming-card {
    background: #16181d;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    transition: 0.2s;
}

.upcoming-card:hover {
    border-color: #555;
}

.up-date {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 5px;
}

.up-title {
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.up-sub {
    font-size: 0.8rem;
    color: #888;
}

.up-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid #444;
    background: transparent;
    color: #ccc;
    cursor: pointer;
}

.btn-xs:hover {
    border-color: #fff;
    color: #fff;
}

/* =========================================
   6. MODAL AGENDAMENTO (SMART SCHEDULING)
   ========================================= */
.modal-lg {
    max-width: 800px;
    width: 95%;
    overflow: hidden;
    background: #1f2128;
    border-radius: 16px;
    border: 1px solid #333;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-header-hero {
    background: linear-gradient(135deg, #1f2128 0%, #16181d 100%);
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hero-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 159, 67, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    padding: 10px 0;
}

.col-title {
    color: var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.input-dark {
    width: 100%;
    background: #0e0f11;
    border: 1px solid #333;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.input-dark:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 159, 67, 0.1);
}

.close-modal-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-footer-hero {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #2d303e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.notification-hub {
    background: #16181d;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.hub-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
}

.hub-channels {
    display: flex;
    gap: 8px;
}

.channel-toggle input {
    display: none;
}

.channel-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #252830;
    border: 1px solid #444;
    border-radius: 6px;
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.channel-toggle input:checked+.channel-btn {
    transform: translateY(-1px);
    color: #fff;
    border-color: transparent;
}

.channel-toggle:nth-child(1) input:checked+.channel-btn {
    background: #3498db;
}

.channel-toggle:nth-child(2) input:checked+.channel-btn {
    background: #9b59b6;
}

.channel-toggle:nth-child(3) input:checked+.channel-btn {
    background: #2ecc71;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

.btn-ghost {
    background: transparent;
    color: #888;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
}

.btn-schedule-confirm {
    background: linear-gradient(to right, #ff9f43, #ffb56b);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.3);
}

/* Autocomplete Styles */
.autocomplete-results {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #2d303e;
    transition: background 0.2s;
}

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

.autocomplete-item:hover {
    background: rgba(255, 159, 67, 0.1);
}

.autocomplete-item strong {
    color: var(--primary);
}

/* Toast Animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Danger Button Styles */
.btn-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: #e74c3c;
}


/* =========================================
   INSPECTION DETAILS DASHBOARD STYLES
   ========================================= */

/* Summary Cards Row */
.summary-card-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.insp-stat-card {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.insp-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.insp-stat-info h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.insp-stat-info .val {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-top: 5px;
}

.insp-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* Issues Summary Section */
.issues-summary-section {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.issue-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 1rem;
    transition: background 0.2s;
}

.issue-card.damaged {
    border-left-color: #e74c3c;
}

.issue-card.absent {
    border-left-color: #f1c40f;
}

.issue-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

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

.issue-title {
    font-weight: 600;
    color: white;
    font-size: 1.1rem;
}

.issue-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.issue-badge.damaged {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.issue-badge.absent {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.issue-obs {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.issue-media {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.issue-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #555;
    transition: transform 0.2s;
}

.issue-thumb:hover {
    transform: scale(1.1);
}

/* Layout Adjustments */
.detail-main-card {
    background: #1f1f1f;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #333;
}

.detail-header-row {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.info-group label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.checklist-group {
    background: #1a1a1a;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid #333;
}

.checklist-group-header {
    background: #252525;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: white;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.check-item-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.st-issue {
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.05);
}

.st-absent {
    border-color: rgba(241, 196, 15, 0.3);
    background: rgba(241, 196, 15, 0.05);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .summary-card-row {
        grid-template-columns: 1fr;
    }

    .detail-header-row {
        grid-template-columns: 1fr;
    }

    .detail-photo-box {
        margin-bottom: 1rem;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEW INSPECTION LIST (CARD VIEW) STYLES
   ========================================= */

.inspections-list-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-bottom: 2rem;
}

.inspection-card-item {
    background: rgba(255, 255, 255, 0.05);
    /* Transparent card background */
    border-radius: 12px;
    border: 1px solid #333;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    /* ✅ Não permite quebra de linha */
    gap: 1rem;
    /* ✅ Espaçamento entre seções */
    transition: all 0.2s ease;
    position: relative;
    overflow-x: auto;
    /* ✅ Permite scroll horizontal */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* ✅ Smooth scrolling no iOS */
    min-width: 100%;
}

.inspection-card-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    bottom: 15%;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: #444;
    /* Default accent */
}

.inspection-card-item.status-done::before {
    background: #3498db;
}

/* Blue for done */
.inspection-card-item.status-pending::before {
    background: #f39c12;
}

/* Orange for pending */

.inspection-card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    border-color: #555;
}

/* LEFT SECTION: Vehicle Info */
.card-vehicle-section {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    width: 28%;
    min-width: 250px;
    flex-shrink: 0;
    /* ✅ Não permite compressão */
}

.card-icon-box {
    width: 50px;
    height: 50px;
    background: #252830;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #666;
    flex-shrink: 0;
}

.card-vehicle-info h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

.plate-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #f39c12;
    /* Orange text */
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.client-name {
    margin: 4px 0 0 0;
    color: #888;
    font-size: 0.9rem;
}

/* MIDDLE SECTION: Timeline & Stats */
.card-center-section {
    flex: 1;
    min-width: 400px;
    /* ✅ Largura mínima */
    flex-shrink: 0;
    /* ✅ Não permite compressão */
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid #333;
    border-right: 1px solid #333;
    margin: 0 1rem;
}

.os-info-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
}

.os-item {
    font-size: 0.8rem;
    color: #aaa;
}

.os-item strong {
    display: block;
    color: #666;
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.os-item span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Timeline Visual */
.timeline-visual {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.timeline-line {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 12px;
    height: 2px;
    background: #333;
    z-index: 1;
}

.timeline-point {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 100px;
}

.tp-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: #1a1c23;
    /* Same as card bg to mask line */
    border: 2px solid #333;
}

.tp-icon.active {
    background: #1a1c23;
    border-color: #2ecc71;
    color: #2ecc71;
}

.tp-icon.pending {
    border-color: #f39c12;
    color: #f39c12;
}

.tp-icon.waiting {
    border-color: #95a5a6;
    color: #95a5a6;
}

.tp-icon.done {
    border-color: #3498db;
    color: #3498db;
}

.tp-label {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
}

.tp-date {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

/* RIGHT SECTION: Actions */
.card-actions-section {
    width: auto;
    /* ✅ Ajustado de 25% para auto */
    min-width: 150px;
    /* ✅ Reduzido de 200px para 150px */
    flex-shrink: 0;
    /* ✅ Não permite compressão */
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.btn-main-action {
    width: 100%;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    background: #f39c12;
    /* Default: Orange */
    color: white;
}

.btn-main-action:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-main-action.view-summary {
    background: #34495e;
    color: white;
    border: 1px solid #444;
}

.btn-main-action.view-summary:hover {
    background: #2c3e50;
    border-color: #666;
}

.btn-main-action.btn-blue {
    background: #3498db;
}

.btn-main-action.btn-blue:hover {
    background: #2980b9;
}

.action-row {
    display: flex;
    gap: 8px;
}

.btn-icon-action {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    /* Lighter transparent bg */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    /* Lighter icon */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-action:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

/* Mobile Responsive For Cards */
@media (max-width: 900px) {
    .inspection-card-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
        overflow-x: hidden;
        /* Remove scroll horizontal */
        min-width: unset;
    }

    .inspection-card-item::before {
        top: 0;
        bottom: 0;
        width: 3px;
    }

    .card-vehicle-section,
    .card-center-section,
    .card-actions-section {
        width: 100%;
        border: none;
        padding: 0;
        margin: 0;
        min-width: unset;
        /* Remove min-width no mobile */
    }

    .card-vehicle-section {
        border-bottom: 1px solid #333;
        padding-bottom: 0.75rem;
        min-width: unset;
    }

    /* OS Info Grid - Layout para 3 colunas no mobile */
    .os-info-row {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .os-item {
        text-align: center;
        font-size: 0.75rem;
    }

    .os-item strong {
        font-size: 0.6rem;
        white-space: nowrap;
    }

    .os-item span {
        font-size: 0.75rem;
        word-break: break-all;
        /* Permite quebra em OS longos */
    }

    .timeline-visual {
        margin: 0.75rem 0;
    }

    .timeline-point {
        min-width: 70px;
        /* Menor no mobile */
    }

    .tp-label {
        font-size: 0.6rem;
    }

    .tp-date {
        font-size: 0.75rem;
    }

    .card-center-section {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #333;
        min-width: unset;
    }

    /* Actions Section - Ajuste */
    .card-actions-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 0.5rem;
    }

    .btn-main-action {
        flex: 1;
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .action-row {
        flex-shrink: 0;
    }

    .btn-icon-action {
        width: 44px;
        /* Increased from 32px for better tap target */
        height: 44px;
        /* Increased from 32px for better tap target */
        font-size: 1.1rem;
        /* Slightly larger icon */
    }
}

/* Vehicle Thumbnail for Inspection Cards */
.vehicle-card-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* --- NEW INSPECTION DETAILS LAYOUT --- */

/* Hero Header */
.inspection-hero-card {
    background: #1a1c23;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    border: 1px solid #333;
}

.hero-photo {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #444;
}

.hero-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #2c3e50;
    border-radius: 6px;
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Section Headers */
.category-section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.dot-red {
    background-color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.5);
}

.dot-yellow {
    background-color: #f1c40f;
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.5);
}

.dot-green {
    background-color: #2ecc71;
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.5);
}

.text-red {
    color: #e74c3c;
}

.text-yellow {
    color: #f1c40f;
}

.text-green {
    color: #2ecc71;
}

/* Item Grid */
.status-grouped-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .status-grouped-grid {
        grid-template-columns: 1fr;
    }
}

/* Item Cards */
.status-item-card {
    background: #181a20;
    /* Slightly darker than main bg if main is #141414 */
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #555;
    /* Default */
    position: relative;
    /* border: 1px solid #2a2a2a; Optional if you want full border too */
}

.status-item-card.border-red {
    border-left-color: #e74c3c;
}

.status-item-card.border-yellow {
    border-left-color: #f1c40f;
}

.status-item-card.border-green {
    border-left-color: #2ecc71;
}

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

.item-card-title {
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.item-card-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.badge-red {
    border: 1px solid #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.badge-yellow {
    border: 1px solid #f1c40f;
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.badge-green {
    border: 1px solid #2ecc71;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.item-card-obs {
    font-style: italic;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
}

.item-card-photos {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.item-thumb {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #444;
    cursor: pointer;
    transition: transform 0.2s;
}

.item-thumb:hover {
    transform: scale(1.1);
}

/* Hero Detail Grid */
.hero-content {
    flex: 1;
}

.hero-main {
    margin-bottom: 1.5rem;
}

.hero-details-grid {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

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

.hero-detail-item .lbl {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.hero-detail-item .val {
    font-size: 1rem;
    color: white;
    font-weight: 500;
}

/* Fix for OS Number Display */
.os-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

/* Timeline Interactivity */
.timeline-point.interactive {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.timeline-point.interactive:hover {
    transform: scale(1.1);
}

.timeline-point.interactive::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: -1;
}

.timeline-point.interactive:hover::after {
    opacity: 1;
}

/* Revisions Dropdown Menu */
.revision-menu-container {
    position: relative;
    cursor: pointer;
}

.revision-dropdown {
    position: absolute;
    right: 0;
    bottom: 100%;
    top: auto;
    background: #2c2f36;
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    z-index: 9999;
    min-width: 200px;
    padding: 8px 0;
    overflow: visible;
    display: none;
    /* Hidden by default */
}

/* Show when active */
.revision-menu-container.active .revision-dropdown {
    display: block;
}

/* Ensure container doesn't clip dropdown */
.revision-rows-container {
    overflow: visible !important;
}

.revision-row {
    overflow: visible !important;
    position: relative;
}

.revision-dropdown div {
    padding: 10px 15px;
    color: #eee;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.2s;
}

.revision-dropdown div:hover {
    background: #3a3f48;
    color: #fff;
}

/* Appointment Confirmation Badges */
.confirmed-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #2ecc71;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.confirmed-badge i {
    font-size: 12px;
}

.confirmed-badge-small {
    background: #2ecc71;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    font-weight: 600;
}

.confirmed-badge-small i {
    font-size: 10px;
}

.confirmed-appointment {
    border-left: 3px solid #2ecc71 !important;
}

/* PRINT STYLES */
@media print {
    @page {
        margin: 1cm 1.5cm;
        size: A4;
    }

    @page :first {
        margin-top: 0;
    }

    body {
        background: white !important;
        color: black !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        display: block;
        overflow: visible;
        height: auto;
    }

    /* Logo size */
    .print-brand-logo {
        height: 80px !important;
        width: auto !important;
    }

    /* Hide Everything Else */
    .header,
    .sidebar,
    .mobile-menu-toggle,
    .filters,
    .page-header button,
    .header-actions button,
    .controls-toolbar,
    .btn,
    .no-print,
    .modal,
    #login,
    .dashboard-stats-grid,
    .nav-container,
    .sidebar-footer {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
        background: white !important;
        position: static !important;
        max-height: none !important;
        width: 100% !important;
    }

    .page {
        display: none !important;
        max-height: none !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* Show Print Section */
    #print-section {
        display: block !important;
        padding: 1.5cm;
        background: white;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        box-sizing: border-box;
        z-index: 9999;
    }

    /* Reset Styles for Print */
    #print-section * {
        box-sizing: border-box;
    }

    #print-section h1,
    #print-section h2,
    #print-section h3,
    #print-section h4 {
        color: #000 !important;
    }

    /* Print Layout Styling */
    .print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 4px solid #ff9f43;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }

    .print-logo-box {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .print-logo {
        height: 50px;
        width: auto;
    }

    .print-company-name {
        font-size: 24px;
        font-weight: 800;
        text-transform: uppercase;
        color: #111;
        letter-spacing: 1px;
    }

    .print-company-sub {
        font-size: 12px;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 2px;
    }

    .print-meta {
        text-align: right;
    }

    .print-title-large {
        color: #ff9f43;
        font-size: 20px;
        font-weight: 800;
        text-transform: uppercase;
        margin: 0;
    }

    .print-date {
        color: #666;
        margin-top: 5px;
        font-size: 11px;
    }

    .print-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 25px;
        page-break-inside: avoid;
    }

    .print-card {
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 15px;
        background: #fdfdfd;
    }

    .print-card h3 {
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        color: #444;
        border-bottom: 1px solid #eee;
        padding-bottom: 8px;
        margin-bottom: 12px;
        letter-spacing: 0.5px;
    }

    .print-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 6px;
        font-size: 12px;
    }

    .print-row:last-child {
        margin-bottom: 0;
    }

    .print-label {
        color: #666;
    }

    .print-val {
        font-weight: 600;
        color: #000;
        text-align: right;
    }

    .print-section-header {
        font-size: 16px;
        font-weight: 700;
        color: #111;
        margin: 30px 0 15px;
        padding-bottom: 8px;
        border-bottom: 2px solid #ff9f43;
        page-break-after: avoid;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11px;
        margin-bottom: 20px;
    }

    .print-table th {
        background: #f4f4f4;
        color: #333;
        font-weight: 700;
        padding: 8px;
        text-align: left;
        border-bottom: 2px solid #ddd;
    }

    .print-table td {
        padding: 8px;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .print-table tr:nth-child(even) {
        background: #fcfcfc;
    }

    .print-footer {
        margin-top: 40px;
        border-top: 1px solid #eee;
        padding-top: 15px;
        text-align: center;
        font-size: 10px;
        color: #888;
    }

    .status-pill {
        display: inline-block;
        padding: 2px 8px;
        border-radius: 10px;
        font-size: 10px;
        font-weight: 600;
        background: #eee;
        color: #333;
    }
}

/* NEW PRINT STYLES (Mockup Based) */
@media print {

    /* Repeating Header for all pages */
    .print-running-header {
        display: table-header-group;
        position: running(pageHeader);
    }

    @page {
        @top-center {
            content: element(pageHeader);
        }
    }

    /* Header Structure */
    .print-header-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 4px solid #ff9f43;
    }

    .print-branding {
        display: flex;
        flex-direction: column;
    }

    .print-brand-logo {
        height: 80px !important;
        width: auto !important;
    }

    .print-brand-name {
        font-family: 'Inter', sans-serif;
        font-size: 24px;
        font-weight: 900;
        color: #000;
        text-transform: uppercase;
        margin: 0;
        line-height: 1;
        letter-spacing: -0.5px;
    }

    .print-brand-sub {
        font-size: 10px;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-top: 4px;
    }

    .print-doc-info {
        text-align: right;
    }

    .print-doc-title {
        font-size: 16px;
        font-weight: 800;
        color: #ff9f43;
        /* Orange */
        text-transform: uppercase;
        margin: 0;
    }

    .print-doc-date {
        font-size: 10px;
        color: #666;
        text-transform: uppercase;
        margin-top: 2px;
    }

    .print-header-divider {
        display: none;
        /* Divider now in header-top border */
    }

    /* Table headers repeat on each page */
    .print-table thead {
        display: table-header-group;
    }

    .print-table-section {
        page-break-inside: auto;
    }

    .print-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    /* Hero Section */
    .print-hero {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 30px;
        margin-bottom: 30px;
        align-items: center;
    }

    .print-photo-box img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #ddd;
    }

    /* License Plate Badge */
    .print-plate-badge {
        background: white;
        border: 3px solid #000;
        border-radius: 8px;
        width: fit-content;
        margin-bottom: 20px;
        overflow: hidden;
    }

    .plate-stripe {
        background: #003399;
        /* Standard Plate Blue */
        color: white;
        font-size: 10px;
        font-weight: 700;
        text-align: right;
        padding: 4px 8px;
        text-transform: uppercase;
    }

    .plate-number {
        font-family: 'Inter', sans-serif;
        /* Fallback to sans if specialized font unavailable */
        font-size: 42px;
        font-weight: 900;
        color: #000;
        padding: 5px 20px;
        line-height: 1;
        text-align: center;
        letter-spacing: 2px;
    }

    /* Model Info */
    .print-model-group h1 {
        font-size: 24px;
        font-weight: 900;
        color: #000;
        text-transform: uppercase;
        margin: 0 0 5px 0;
    }

    .print-model-group p {
        font-size: 14px;
        color: #555;
        margin: 0;
    }

    /* Details Bar */
    .print-details-bar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-bottom: 15px;
    }

    .print-details-bar:last-of-type {
        grid-template-columns: repeat(2, 1fr);
        /* 2 items on second row based on mockup */
        border-top: none;
        padding-top: 0;
        margin-bottom: 30px;
    }

    .print-detail-item {
        margin-bottom: 5px;
    }

    .print-detail-item label {
        display: block;
        font-size: 9px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        margin-bottom: 4px;
    }

    .print-detail-item div {
        font-size: 14px;
        font-weight: 600;
        color: #000;
    }

    .print-section-divider {
        border: 0;
        border-top: 1px solid #eee;
        margin: 20px 0;
    }

    /* Table Sections */
    .print-table-section {
        margin-bottom: 30px;
        page-break-inside: avoid;
    }

    .print-section-title {
        font-size: 12px;
        font-weight: 800;
        color: #ff9f43;
        text-transform: uppercase;
        margin-bottom: 15px;
        display: flex;
        align-items: center;
        border-left: 4px solid #ff9f43;
        padding-left: 10px;
    }

    .print-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 11px;
    }

    .print-table th {
        text-align: left;
        font-size: 9px;
        font-weight: 800;
        color: #000;
        text-transform: uppercase;
        border-bottom: 2px solid #000;
        padding: 8px 0;
    }

    .print-table td {
        padding: 12px 0;
        border-bottom: 1px solid #eee;
        color: #333;
        vertical-align: middle;
    }

    .print-table tr:last-child td {
        border-bottom: none;
    }

    /* Badges */
    .status-pill {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 12px;
        font-size: 9px;
        font-weight: 700;
        text-transform: uppercase;
        text-align: center;
        min-width: 80px;
    }

    /* Status Colors (Outline Style) */
    .status-completed,
    .badge-done {
        border: 1px solid #2ecc71;
        color: #2ecc71;
        background: transparent;
    }

    .status-pending,
    .badge-pending {
        border: 1px solid #f1c40f;
        color: #f1c40f;
        background: transparent;
    }

    .status-overdue,
    .badge-overdue {
        border: 1px solid #e74c3c;
        color: #e74c3c;
        background: transparent;
    }

    .status-future,
    .badge-future {
        border: 1px solid #95a5a6;
        color: #95a5a6;
        background: transparent;
    }

    /* Footer */
    .print-footer-signature {
        margin-top: 60px;
        text-align: right;
        font-size: 10px;
        color: #444;
        page-break-inside: avoid;
    }

    .signature-line {
        border-top: 1px solid #000;
        width: 250px;
        margin-left: auto;
        margin-bottom: 5px;
    }

    .print-footer-note {
        margin-top: 40px;
        text-align: center;
        color: #888;
        font-size: 9px;
        line-height: 1.4;
    }
}

/* =============================================
   CLIENT DETAILS PAGE - REDESIGN STYLES
   ============================================= */

/* Page Content */
.client-page-content {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Profile Header */
.client-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(30, 35, 45, 0.6);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
}

.client-profile-left {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    flex: 1;
}

/* Avatar */
.client-avatar-container {
    position: relative;
    flex-shrink: 0;
}

.client-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #f97316;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.client-avatar i {
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.client-status-indicator {
    position: absolute;
    bottom: 5px;
    left: 5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #1a1d24;
    background: #6b7280;
}

.client-status-indicator.active {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

/* Profile Info */
.client-profile-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    /* Critical for flex child overflow handling */
    max-width: 100%;
}

.client-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.client-name-row h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.client-vip-badge {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.client-contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: #94a3b8;
    word-break: break-all;
    /* Prevent long strings from stretching container */
    overflow-wrap: break-word;
}

.contact-item i {
    color: #64748b;
    font-size: 0.75rem;
}

.client-actions-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    /* Allow buttons to wrap to next line if space is tight */
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Stats Cards */
.client-stats-cards {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.client-stat-card {
    background: rgba(20, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 90px;
}

.client-stat-card .stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.client-stat-card .stat-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.25rem;
}

/* Tabs */
.client-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.5rem;
    padding-bottom: 0;
}

.client-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.client-tab:hover {
    color: #94a3b8;
}

.client-tab.active {
    color: #f97316;
    border-bottom-color: #f97316;
}

.tab-count {
    font-size: 0.8rem;
    color: inherit;
    opacity: 0.7;
}

/* Tab Contents */
.client-tab-contents {
    min-height: 300px;
}

.client-tab-content {
    display: none;
}

.client-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Grid */
.client-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Info Cards */
.client-info-card,
.client-notes-card {
    background: rgba(25, 30, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
}

.client-info-card .card-header,
.client-notes-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.client-info-card .card-header h4,
.client-notes-card .card-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.card-icon {
    color: #f97316;
    font-size: 1rem;
}

.client-info-card .card-body,
.client-notes-card .card-body {
    padding: 1rem 1.25rem;
}

/* Info Rows */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: #64748b;
    font-size: 0.85rem;
}

.info-value {
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: right;
}

/* Notes Card */
.notes-text {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: #64748b;
}

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

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

/* Vehicles Grid */
.client-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Loading Overlay */
.client-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .client-profile-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
        /* Ensure children fill width */
        padding: 1.25rem;
    }

    .client-stats-cards {
        width: 100%;
        justify-content: center;
    }

    .client-info-grid {
        grid-template-columns: 1fr;
    }

    .client-contact-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .client-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        overflow-x: visible;
        border-bottom: none;
    }

    .client-tab {
        white-space: normal;
        flex-shrink: 0;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
    }
    
    .client-tab.active {
        background: rgba(249, 115, 22, 0.1);
        border-color: #f97316;
    }

    .client-actions-row {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
    }

    .client-actions-row .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.5rem);
        /* Stack as 2 per row on medium mobile */
        justify-content: center;
        white-space: nowrap;
        width: auto;
    }

    @media (max-width: 480px) {
        .client-actions-row .btn {
            min-width: 0;
            width: 100%;
            /* Full width stack on small mobile */
            flex: 0 0 100%;
        }
    }

    /* Documents Refinement for Mobile */
    .client-file-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.25rem;
    }

    .file-info-group {
        width: 100%;
    }

    .file-status-group {
        width: 100%;
        justify-content: space-between;
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .file-actions-hover {
        opacity: 1;
        transform: none;
        position: static;
    }

    .action-btn {
        width: 40px;
        /* Better tap target */
        height: 40px;
    }
}

/* =============================================
   FINANCIAL HISTORY STYLES
   ============================================= */

/* Summary Cards Grid */
.financial-summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.financial-summary-card {
    background: rgba(25, 30, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.financial-summary-card.pending {
    border-color: #f9731650;
}

.financial-summary-card.pending .financial-card-value {
    color: #f97316;
}

.financial-card-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.financial-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Inter', sans-serif;
}

/* Table Header */
.financial-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.financial-table-header h4 {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.financial-table-header h4 i {
    color: #64748b;
}

/* Table Container */
.financial-table-container {
    background: rgba(20, 25, 35, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* Status Badges */
.badge-pago,
.badge-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-pendente,
.badge-pending {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.2s ease;
}

.badge-pago:hover,
.badge-pendente:hover,
.badge-proxima:hover,
.badge-vencida:hover {
    transform: scale(1.05);
}

/* Badge Próxima (blue/info) */
.badge-proxima {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Badge Vencida (red/danger) */
.badge-vencida {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
    }
}

/* Transaction Actions */
.transaction-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.transaction-actions button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.transaction-actions button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.transaction-actions button.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Input Dark Variant */
.input-dark {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(20, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.input-dark:focus {
    outline: none;
    border-color: #f97316;
}

.input-dark::placeholder {
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .financial-summary-cards {
        grid-template-columns: 1fr;
    }

    .financial-table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    /* Users Table Mobile - Keep visible with horizontal scroll */
    /* Users Table Mobile - Convert rows to beautiful Cards */
    .users-table-container {
        display: block !important;
        overflow-x: hidden !important;
        padding: 5px 10px 80px 10px !important; /* Extra bottom padding for floating bar */
    }

    .users-table-container .inspections-table,
    #users-table {
        display: block !important;
        width: 100% !important;
        min-width: unset !important;
        background: transparent !important;
        border: none !important;
    }

    .users-table-container .inspections-table thead,
    #users-table thead {
        display: none !important; /* Hide headers */
    }

    .users-table-container .inspections-table tbody,
    #users-table tbody {
        display: block !important;
        width: 100% !important;
    }

    .users-table-container .inspections-table tr,
    #users-table tr {
        display: block !important;
        background: #1e1e1e !important;
        border: 1px solid #333 !important;
        border-radius: 12px !important;
        margin-bottom: 20px !important;
        padding: 15px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4) !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .users-table-container .inspections-table td,
    #users-table td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 0 !important;
        border: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
        font-size: 0.9rem !important;
        text-align: right !important;
        min-height: 40px !important;
        background: transparent !important;
    }

    .users-table-container .inspections-table td:last-child,
    #users-table td:last-child {
        border-bottom: none !important;
        margin-top: 10px !important;
    }

    .users-table-container .inspections-table td::before,
    #users-table td::before {
        content: attr(data-label) !important;
        font-weight: 600 !important;
        color: #ff9f43 !important; /* Gold/Orange accent matching application */
        text-align: left !important;
        display: block !important;
        font-size: 0.85rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }

    /* Actions buttons centering on mobile */
    .users-table-container .action-buttons {
        display: flex !important;
        gap: 8px !important;
        justify-content: flex-end !important;
        width: auto !important;
    }

    .users-table-container .btn-action {
        width: 36px !important;
        height: 36px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        font-size: 1rem !important;
    }
}

/* Mobile Sidebar - Scrollable Layout (Final Override) */
@media (max-width: 768px) {

    /* Sidebar is scrollable container with touch support */
    .sidebar {
        display: flex !important;
        flex-direction: column !important;
        padding-bottom: 0 !important;
        position: fixed !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }

    /* Sidebar header stays at top */
    .sidebar-header {
        flex-shrink: 0 !important;
    }

    /* Nav container takes available space, no scroll */
    .nav-container {
        flex: 1 !important;
        overflow: visible !important;
    }

    /* Footer at end of sidebar with padding for bottom nav */
    .sidebar-footer {
        position: relative !important;
        margin-top: auto !important;
        padding: 1rem !important;
        padding-bottom: 100px !important;
        /* Space for bottom navigation */
        background: #0f0f0f !important;
        border-top: 1px solid rgba(255, 255, 255, 0.2) !important;
        display: block !important;
        flex-shrink: 0 !important;
    }

    /* Ensure logout button is visible and styled */
    .sidebar-footer .logout-nav-btn {
        display: flex !important;
        width: 100% !important;
        background: rgba(255, 100, 100, 0.1) !important;
        border: 1px solid rgba(255, 100, 100, 0.3) !important;
    }

    /* Collapse button hidden on mobile */
    .sidebar-footer .sidebar-collapse-btn {
        display: none !important;
    }

    /* Fix scroll buttons position on mobile so they don't overlap bottom nav */
    #mobile-nav-buttons,
    .scroll-buttons-container {
        display: none !important;
    }
}

/* Role-based Menu Visibility */
/* Manager Role Restrictions */
body.role-manager .nav-btn[data-page="dashboard"],
body.role-manager .nav-btn[data-page="clientes"],
body.role-manager .nav-btn[data-page="estoque"],
body.role-manager .nav-btn[data-page="agenda"],
body.role-manager .nav-btn[data-page="gerenciar-usuarios"],
body.role-manager .bottom-nav-item[data-page="dashboard"],
body.role-manager .bottom-nav-item[data-page="clientes"] {
    display: none !important;
}

/* Adjust grid for Bottom Nav when items are hidden */
body.role-manager .mobile-bottom-nav {
    grid-template-columns: repeat(3, 1fr) !important;
    /* Only 3 items: Nova, Inspeções, Menu */
}

/* Director Role Restrictions */
body.role-director .nav-btn[data-page="dashboard"],
body.role-director .nav-btn[data-page="estoque"],
body.role-director .nav-btn[data-page="agenda"],
body.role-director .nav-btn[data-page="gerenciar-usuarios"],
body.role-director .bottom-nav-item[data-page="dashboard"] {
    display: none !important;
}

/* Adjust grid for Bottom Nav when items are hidden */
body.role-director .mobile-bottom-nav {
    grid-template-columns: repeat(4, 1fr) !important;
    /* Only 4 items: Clientes, Nova, Inspeções, Menu */
}

/* --- INSPECTION DETAILS ACCORDION STYLES --- */
details.inspection-details-group {
    background-color: #1E232E;
    /* var(--bg-item) */
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    overflow: hidden;
}

details.inspection-details-group[open] {
    border-color: #3B82F6;
    /* var(--accent-blue) */
    box-shadow: 0 0 0 1px #3B82F6;
}

details.inspection-details-group summary {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    list-style: none;
    outline: none;
}

details.inspection-details-group summary::-webkit-details-marker {
    display: none;
}

/* Color-specific open states */
details.group-issue[open] {
    border-color: #EF4444;
    box-shadow: 0 0 0 1px #EF4444;
}

details.group-absent[open] {
    border-color: #F59E0B;
    box-shadow: 0 0 0 1px #F59E0B;
}

details.group-ok[open] {
    border-color: #34D399;
    box-shadow: 0 0 0 1px #34D399;
}

/* Arrow Icon */
details.inspection-details-group .action-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #2D3340;
    /* var(--border-color) */
    color: #DCA553;
    /* var(--accent-gold) */
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

details.inspection-details-group[open] .action-icon {
    /* Generic open color, overridden below */
    background: #3B82F6;
    border-color: #3B82F6;
    color: white;
}

details.group-issue[open] .action-icon {
    background: #EF4444;
    border-color: #EF4444;
}

details.group-absent[open] .action-icon {
    background: #F59E0B;
    border-color: #F59E0B;
}

details.group-ok[open] .action-icon {
    background: #34D399;
    border-color: #34D399;
}

/* Inner Content */
.details-body {
    border-top: 1px solid #2D3340;
    background-color: #161a23;
    padding: 0;
}

.checklist-item {
    padding: 16px;
    border-bottom: 1px solid #2D3340;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.check-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    font-weight: 500;
    align-items: center;
    color: #ffffff;
}

.obs-box {
    font-size: 0.85rem;
    color: #9CA3AF;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 6px;
    border-left: 2px solid #DCA553;
}

/* Media in checklist item */
.media-gallery {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.media-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #444;
}

.media-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #3B82F6;
    cursor: pointer;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

/* --- MOBILE HEADER & LAYOUT FIXES --- */
@media (max-width: 768px) {

    /* Remove any top spacing causing the "bar" effect */
    body,
    html {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .main-content {
        padding-top: 15px !important;
        padding-bottom: 85px !important;
        /* Adjusted breathing room */
        margin-top: 0 !important;
    }

    /* Force hide header completely */
    .header,
    .header-container,
    .top-bar {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* Ensure sidebar toggle doesn't float weirdly */
    .sidebar-toggle {
        top: 10px !important;
    }
}

/* Transaction Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-indicator i {
    font-size: 0.5rem;
}

.status-vencida {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-vencida:hover {
    background: rgba(239, 68, 68, 0.25);
}

.status-pendente {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
    border: 1px solid rgba(249, 115, 22, 0.3);
}

.status-pendente:hover {
    background: rgba(249, 115, 22, 0.25);
}

.status-ok {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-ok:hover {
    background: rgba(34, 197, 94, 0.25);
}

.status-none {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
    cursor: default;
}

.status-none:hover {
    transform: none;
    box-shadow: none;
}
/* Fix for empty table state on mobile */
@media (max-width: 768px) {
    .inspections-table td.empty-table-state {
        padding-left: 1rem !important;
        text-align: center !important;
    }
    .inspections-table td.empty-table-state::before {
        display: none !important;
    }

    /* Client Profile Header Layout Adjustment */
    .client-profile-header .client-profile-left {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .client-profile-header .client-profile-info {
        width: 100% !important;
        text-align: center !important;
    }

    .client-profile-header .client-name-row {
        justify-content: center !important;
    }

    .client-profile-header .client-contact-row {
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
    }

    .client-profile-header .client-actions-row {
        justify-content: center !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }
}

/* Vehicle Details Desktop Layout */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.5rem 1rem;
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #333;
}

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

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

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

/* Ajuste de visualização na tabela de estoque */
.item-name-cell {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    max-width: 250px;
    line-height: 1.3;
    font-weight: 500;
}



/* Modal Loading Overlay */
.modal-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    border-radius: 12px;
}

.modal-loading-overlay .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--accent-color, #ff9800);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.modal-loading-overlay span {
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Leads Page Responsiveness Styles */
.leads-filter-container {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 12px !important;
}

.leads-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#leads .inspections-table th {
    padding: 12px 10px !important;
}

#leads .inspections-table td {
    padding: 12px 10px !important;
}

#leads .inspections-table th:first-child,
#leads .inspections-table td:first-child {
    padding-left: 20px !important;
}

/* Site Lead Cards styling */
.site-lead-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.site-lead-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.site-lead-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.site-lead-card-email {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.site-lead-card-badge {
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.site-lead-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    font-size: 0.85rem;
    color: #e0e6ed;
}

.site-lead-card-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-lead-card-info-item i {
    color: var(--primary);
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.site-lead-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.site-lead-card-date {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.site-lead-card-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    /* Mobile filter stacking */
    .leads-filter-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .leads-filter-container .form-input {
        width: 100% !important;
        flex: none !important;
    }
}

/* Select de Status como Badge */
.lead-status-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 28px !important;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 18px !important;
    text-align: left;
}

.lead-status-select option {
    background-color: var(--bg-secondary, #1a2235) !important;
    color: #ffffff !important;
    font-weight: normal;
}

/* Global fix for Safari Macbook 13 (and others) rendering blank panels */
#checklist-sections,
#checklist-sections .form-section,
#checklist-sections .checklist-items,
#checklist-panel {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    max-height: none !important;
    margin-bottom: 2rem !important;
}

/* 
 * Hide the Vidros (Glass) form section whenever the selected service type is 'blindagem'
 * We use a data attribute on the body for robust hiding, even when sections are injected asynchronously 
 */
body[data-service-type="blindagem"] #glass-form-section {
    display: none !important;
}

/* =========================================
   NEW DASHBOARD COMPONENTS
   ========================================= */

/* Badges */
.badge-time {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: #1e1e24;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.badge-time.active {
    background: #3b2a24;
    color: #ff5722;
}
.badge-count {
    background: #ff5722;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.85rem;
}

/* Donut Chart Layout */
.dashboard-donut-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 40px;
    margin-top: 20px;
}
.donut-chart-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
}
.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.donut-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    line-height: 1;
}
.donut-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-top: 5px;
}

/* Donut Legend */
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}
.legend-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.legend-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 15px;
}
.legend-text {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}
.legend-brand {
    font-weight: 700;
    color: #fff;
}
.legend-models {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.legend-val {
    font-weight: 700;
    color: #fff;
    margin-right: 15px;
}
.legend-pct {
    color: var(--text-muted);
    font-size: 0.85rem;
    width: 35px;
    text-align: right;
}

/* Inadimplência List */
.inadimplencia-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.inadimplencia-item {
    display: flex;
    align-items: center;
    gap: 15px;
}
.in-label {
    width: 75px;
    font-size: 0.85rem;
    color: #fff;
}
.in-bar-container {
    flex: 1;
    height: 12px;
    background: transparent;
    border-radius: 6px;
}
.in-bar {
    height: 100%;
    background: #ff5722;
    border-radius: 6px;
}
.in-val {
    width: 50px;
    text-align: right;
    font-size: 0.85rem;
    color: #fff;
}
.inadimplencia-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.btn-link {
    color: #ff5722;
    text-decoration: none;
    font-weight: 600;
}
.btn-link:hover {
    text-decoration: underline;
}

/* Revisões List */
.revisoes-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.revisao-item {
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.revisao-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.rev-date {
    font-size: 0.85rem;
    font-weight: bold;
    color: #ff5722;
    width: 45px;
}
.rev-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.rev-title {
    font-weight: bold;
    color: #fff;
    font-size: 0.95rem;
}
.rev-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.rev-days {
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-muted);
}

/* Funnel Chart */
.funnel-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.funnel-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.funnel-label {
    width: 110px;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}
.funnel-badge {
    width: 30px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
}
.funnel-bar-wrapper {
    flex: 1;
    height: 16px;
    background: transparent;
    border-radius: 4px;
}
.funnel-bar {
    height: 100%;
    border-radius: 4px;
}
.funnel-val {
    width: 70px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Responsive adjust for new dashboard */
@media (max-width: 768px) {
    .dashboard-cards-row {
        flex-direction: column !important;
    }
    .dashboard-donut-container {
        flex-direction: column;
    }
}

/* Director role dashboard visibility */
body.role-director #dashboard-row-financeiro,
body.role-director #dashboard-row-operacional {
    display: none !important;
}

/* Fix for dropdown menus inside overflow containers and mobile stacking */
.dashboard-panel.desktop-only {
    overflow: visible !important;
}
.leads-table-wrapper {
    padding-bottom: 140px; /* Space for the dropdown menu */
}

.site-lead-card {
    position: relative;
    z-index: 1;
}
.site-lead-card:has(.prop-dropdown-menu.show) {
    z-index: 101;
}

/* Proposal Dropdown Menu */
.prop-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #1e1e24;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    z-index: 100;
    min-width: 160px;
    padding: 8px 0;
}
.prop-dropdown-menu.show {
    display: block;
}
.prop-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    color: #e2e8f0;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
}
.prop-dropdown-menu button:hover {
    background: rgba(255,255,255,0.05);
}
.prop-dropdown-menu button i {
    width: 20px;
    opacity: 0.7;
}

/* Responsive overrides for Vehicle Details Layout (Moved from index.html) */
.vd-wrapper { padding: 2rem; }
.vd-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #27272A; padding-bottom: 1.5rem; }
.vd-header-left { display: flex; align-items: center; gap: 1rem; }
.vd-header-actions { display: flex; gap: 0.75rem; }
.vd-2col { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 2.5rem; min-width: 0; width: 100%; }
.vd-2col > div { min-width: 0; }
.vd-pendency { display: flex; justify-content: space-between; align-items: center; }
.vd-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.vd-timeline-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.5rem; }
.vd-timeline-title { display: flex; align-items: center; gap: 0.75rem; }
.vd-photo-row { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.vd-action-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.client-tab { background: transparent; border: 1px solid #3F3F46; color: #A1A1AA; border-radius: 20px; padding: 0.5rem 1rem; font-weight: 600; font-size: 0.85rem; cursor: pointer; white-space: nowrap; transition: all 0.2s ease; }
.client-tab.active { background: rgba(249, 115, 22, 0.1); border-color: #F97316; color: #F97316; }

@media (max-width: 1024px) {
    .vd-wrapper { padding: 1rem !important; }
    .vd-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .vd-header-left { flex-wrap: wrap; }
    .vd-header-actions { width: 100%; justify-content: space-between; }
    .vd-2col { grid-template-columns: minmax(0, 1fr) !important; gap: 1.5rem; }
    .vd-pendency { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .vd-pendency button { width: 100%; }
    .vd-timeline-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .vd-timeline-title { flex-wrap: wrap; }
}

@media (max-width: 600px) {
    .dashboard-panel[style*="display:flex"] {
        overflow-x: auto !important;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    .vd-tab-item {
        padding: 12px 16px !important;
        flex: 0 0 auto !important;
    }
}

/* Custom Global Scrollbar - Orange (Match Site) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #18181B;
}

::-webkit-scrollbar-thumb {
    background: #F97316;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ea580c;
}

/* Site Leads Card Mobile Layout */
.site-lead-card-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 16px;
}
@media (max-width: 768px) {
    .site-lead-card-grid {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .site-lead-card-grid > div {
        max-width: 100% !important;
        flex: 1 1 100% !important;
        justify-content: flex-start !important;
        text-align: left !important;
        width: 100%;
    }
    .site-lead-card-grid .status-badge {
        width: 100%;
        text-align: center;
        display: block;
    }
    .site-lead-card-grid .dropdown-wrapper {
        position: absolute !important;
        top: 16px;
        right: 16px;
    }
}
