/* styles.css - TruckCheck Pro 2025 - Layout Modernizado */

/* Importação de fontes otimizada */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* Variáveis CSS - Paleta Moderna 2025 */
:root {
    /* Primary Colors - Azul Vibrante */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Secondary Colors - Verde Moderno */
    --secondary-50: #f0fdf4;
    --secondary-100: #dcfce7;
    --secondary-200: #bbf7d0;
    --secondary-300: #86efac;
    --secondary-400: #4ade80;
    --secondary-500: #22c55e;
    --secondary-600: #16a34a;
    --secondary-700: #15803d;
    --secondary-800: #166534;
    --secondary-900: #14532d;
    
    /* Accent Colors - Gradientes Vibrantes */
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-cyan: #06b6d4;
    
    /* Neutral Colors - Escala Refinada */
    --neutral-50: #fafafa;
    --neutral-100: #f4f4f5;
    --neutral-200: #e4e4e7;
    --neutral-300: #d4d4d8;
    --neutral-400: #a1a1aa;
    --neutral-500: #71717a;
    --neutral-600: #52525b;
    --neutral-700: #3f3f46;
    --neutral-800: #27272a;
    --neutral-900: #18181b;
    --neutral-950: #09090b;
    
    /* Draggable Route Colors */
    --route-primary: #2563eb;
    --route-hover: #1d4ed8;
    --route-active: #1e40af;
    --waypoint-origin: #10b981;
    --waypoint-destination: #ef4444;
    --waypoint-intermediate: #f59e0b;
    
    /* Map Container Fixes */
    --map-height: 500px;

    /* =====================================================================
       D261 — o bloco que havia aqui saiu inteiro. Nao foi esquecimento.

       De 06/09/2025 a 10/09/2026 este :root fechava na linha 61, por um "}"
       que o commit 1b8f8e02 deixou junto com "Map Container Fixes". Tudo o
       que vinha depois -- gradientes, glass, layout, raios, transicoes,
       animacoes -- virava prelude de uma regra invalida e era descartado
       pelo parser, em silencio. 29 variaveis mortas, 86 declaracoes de
       styles.css apontando para elas, 28 regras de border-radius caindo
       para 0. Ver P181, D260 e D261 no AUDIT.md.

       Nada disto foi "restaurado": as variaveis foram APAGADAS junto com as
       declaracoes que as usavam, porque nenhuma pintava havia um ano e
       reviver as nove regras de gradiente (#667eea -> #764ba2, mais o
       --gradient-mesh do body::before) devolveria uma identidade que o
       D103c e o D107 tinham tirado de proposito.

       O bloco [data-theme="dark"], .dark que ficava logo abaixo tambem
       saiu, pela mesma razao: tokens.css:125 governa o modo escuro desde a
       repintura. Ver D261.2.

       O guarda contra a repeticao e scripts/estilo-vars.js.
       ===================================================================== */
    
    /* Glass Effects */
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-shadow-dark: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    /* Shadows - Mais Suaves e Modernas */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.5);
    --shadow-neumorphic: 9px 9px 16px #d1d5db, -9px -9px 16px #ffffff;
    --shadow-neumorphic-dark: 9px 9px 16px #0a0a0a, -9px -9px 16px #2a2a2a;
}


/* Base Reset & Typography */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--neutral-900);
    background: var(--neutral-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    position: relative;
    overflow-x: hidden;
}

/* Background Mesh Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.4;
    z-index: -1;
    animation: gradient-shift 20s ease infinite;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-400);
    border-radius: 10px;
    border: 2px solid var(--neutral-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

.dark ::-webkit-scrollbar-track {
    background: var(--neutral-800);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--neutral-600);
    border-color: var(--neutral-800);
}

/* Selection */
::selection {
    background: var(--primary-500);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: none;
}

*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-30px) rotate(2deg); 
    }
    66% { 
        transform: translateY(-15px) rotate(-1deg); 
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

@keyframes slide-right {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scale-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */






/* Glass Morphism Components */
.glass {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow);
}

.glass-dark {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--glass-shadow-dark);
}

/* Neumorphism */
.neumorphic {
    background: var(--neutral-100);
    box-shadow: var(--shadow-neumorphic);
}

.dark .neumorphic {
    background: var(--neutral-800);
    box-shadow: var(--shadow-neumorphic-dark);
}

.neumorphic-inset {
    background: var(--neutral-100);
    box-shadow: inset 5px 5px 10px #d1d5db, inset -5px -5px 10px #ffffff;
}

/* Modern Cards */
.card {
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--neutral-200);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transform: scaleX(0);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

.card:hover::before {
    transform: scaleX(1);
}

.dark .card {
    background: var(--neutral-800);
    border-color: var(--neutral-700);
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-flow: dense;
}

.bento-item {
    background: white;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.bento-item-large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item-wide {
    grid-column: span 2;
}

.bento-item-tall {
    grid-row: span 2;
}

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary Button */
.btn-primary {
    color: white;
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(102, 126, 234, 0.4);
}

/* Secondary Button */
.btn-secondary {
    background: var(--neutral-100);
    color: var(--neutral-700);
    border: 2px solid var(--neutral-200);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--neutral-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.dark .btn-secondary {
    background: var(--neutral-800);
    color: var(--neutral-200);
    border-color: var(--neutral-700);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--neutral-700);
    box-shadow: none;
}

.btn-ghost:hover:not(:disabled) {
    background: var(--neutral-100);
    transform: translateY(-1px);
}

/* Icon Button */
.btn-icon {
    padding: 0.75rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    cursor: pointer;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

/* Modern Form Inputs */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--neutral-200);
    background: white;
    color: var(--neutral-900);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.form-input:hover:not(:focus) {
    border-color: var(--neutral-300);
}

.form-input::placeholder {
    color: var(--neutral-400);
}

/* Floating Label */
.form-label {
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    font-size: 1rem;
    color: var(--neutral-500);
    pointer-events: none;
    background: white;
    padding: 0 0.25rem;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -0.75rem;
    font-size: 0.75rem;
    color: var(--primary-500);
}

.dark .form-input {
    background: var(--neutral-800);
    border-color: var(--neutral-700);
    color: var(--neutral-100);
}

.dark .form-label {
    background: var(--neutral-800);
    color: var(--neutral-400);
}

/* Modern Select */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em 1.5em;
    padding-right: 3rem;
}

/* Modern Checkbox & Radio */
.form-checkbox,
.form-radio {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--neutral-300);
    background: white;
    cursor: pointer;
    position: relative;
}


.form-checkbox:checked {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}

.form-radio:checked {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.form-radio:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.5rem;
    height: 0.5rem;
    background: white;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--neutral-300);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 1.125rem;
    width: 1.125rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background: white;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-500);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(1.5rem);
}

/* Modern Tables */
.table-modern {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-modern thead {
    color: white;
}

.table-modern th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-modern td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--neutral-200);
    color: var(--neutral-700);
}


.table-modern tbody tr:hover {
    background: var(--neutral-50);
    transform: scale(1.01);
}

.dark .table-modern {
    background: var(--neutral-800);
}

.dark .table-modern td {
    border-color: var(--neutral-700);
    color: var(--neutral-200);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    line-height: 1;
    white-space: nowrap;
}

.badge-primary {
    background: #3b82f6;
    color: #ffffff;
    border: 1px solid #2563eb;
}

.badge-success {
    background: #22c55e;
    color: #ffffff;
    border: 1px solid #16a34a;
}

.badge-warning {
    background: #f59e0b;
    color: #ffffff;
    border: 1px solid #d97706;
}

.badge-danger {
    background: #ef4444;
    color: #ffffff;
    border: 1px solid #dc2626;
}

.badge-info {
    background: #06b6d4;
    color: #ffffff;
    border: 1px solid #0891b2;
}

.badge-secondary {
    background: #6b7280;
    color: #ffffff;
    border: 1px solid #4b5563;
}

/* Badge Dark Mode Support */
.dark .badge-primary {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #1d4ed8;
}

.dark .badge-success {
    background: #16a34a;
    color: #ffffff;
    border: 1px solid #15803d;
}

.dark .badge-warning {
    background: #d97706;
    color: #ffffff;
    border: 1px solid #b45309;
}

.dark .badge-danger {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #b91c1c;
}

.dark .badge-info {
    background: #0891b2;
    color: #ffffff;
    border: 1px solid #0e7490;
}

.dark .badge-secondary {
    background: #4b5563;
    color: #ffffff;
    border: 1px solid #374151;
}

/* Progress Bars */
.progress {
    width: 100%;
    height: 0.5rem;
    background: var(--neutral-200);
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neutral-900);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--neutral-900);
}

.tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    box-shadow: var(--shadow-2xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
}

.modal-backdrop.active .modal {
    transform: scale(1) translateY(0);
}

.dark .modal {
    background: var(--neutral-800);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: between;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 8rem);
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Loading States */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--neutral-200) 25%,
        var(--neutral-300) 50%,
        var(--neutral-200) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 6rem;
    height: 6rem;
    margin: 0 auto 2rem;
    background: var(--neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--neutral-400);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--neutral-600);
    margin-bottom: 2rem;
}

/* Navigation Rail (Modern Sidebar) */
.nav-rail {
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}


.nav-rail-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin: 0.25rem 0.5rem;
    color: var(--neutral-600);
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
}

.nav-rail-item::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
}

.nav-rail-item:hover {
    color: var(--primary-600);
    background: rgba(59, 130, 246, 0.1);
}

.nav-rail-item.active {
    color: white;
}

.nav-rail-item.active::before {
    opacity: 1;
}

.nav-rail-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    z-index: 1;
}

.nav-rail-item:hover .nav-rail-icon {
    transform: scale(1.1);
}

.nav-rail-label {
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    z-index: 1;
}

.nav-rail.expanded .nav-rail-label {
    opacity: 1;
    transform: translateX(0);
}

.nav-rail-tooltip {
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    background: var(--neutral-900);
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    box-shadow: var(--shadow-xl);
    z-index: 1000;
}

.nav-rail:not(.expanded) .nav-rail-item:hover .nav-rail-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(5px);
}

/* Command Palette */
.command-palette {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 600px;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    visibility: hidden;
    z-index: 10000;
}

.command-palette.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.command-input {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.125rem;
    border: none;
    background: transparent;
    color: var(--neutral-900);
    outline: none;
}

.command-results {
    max-height: 400px;
    overflow-y: auto;
    border-top: 1px solid var(--neutral-200);
}

.command-result {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    cursor: pointer;
}

.command-result:hover,
.command-result.active {
    background: var(--primary-50);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 1rem;
        z-index: 1000;
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        padding: 0.5rem;
        color: var(--neutral-600);
        text-decoration: none;
        position: relative;
    }
    
    .mobile-nav-item.active {
        color: var(--primary-600);
    }
    
    .mobile-nav-item.active::before {
        content: '';
        position: absolute;
        top: -2px;
        left: 50%;
        transform: translateX(-50%);
        width: 2rem;
        height: 3px;
    }
    
    .mobile-nav-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .mobile-nav-label {
        font-size: 0.75rem;
        font-weight: 500;
    }
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-4xl {
    font-size: 2.25rem;
}

/* Hover Effects */

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}


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


.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* Gradient Text */
.gradient-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 640px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    
    .bento-item-large,
    .bento-item-wide {
        grid-column: span 1;
    }
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    .bento-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-500: #0052cc;
        --secondary-500: #00875a;
        --neutral-900: #000000;
        --neutral-50: #ffffff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom Scrollbar for Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-400) var(--neutral-100);
}

/* Loader */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Login Screen Specific */
.login-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Notification */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    min-width: 300px;
    background: white;
    box-shadow: var(--shadow-xl);
    padding: 1rem;
    transform: translateX(400px);
    z-index: 9999;
}

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

.notification-success {
    border-left: 4px solid var(--secondary-500);
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-warning {
    border-left: 4px solid var(--accent-orange);
}

.notification-info {
    border-left: 4px solid var(--accent-cyan);
}

/* ============================================
   🗺️ TRACKING MAP CONTAINER FIXES
   ============================================ */

/* Forçar dimensões corretas do container do mapa */
#mapContainer {
    min-height: var(--map-height) !important;
    height: 60vh !important;
    width: 100% !important;
    position: relative !important;
}

#trackingMap {
    min-height: var(--map-height) !important;
    height: 100% !important;
    width: 100% !important;
    position: absolute !important;
    inset: 0 !important;
    z-index: 1 !important;
}

/* Leaflet map específico */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    min-height: var(--map-height) !important;
}

/* D161.1b: aqui havia um "Fix para fullscreen tracking" com duas regras que
   nunca dispararam: ninguem adiciona a classe .fullscreen (toggleFullscreen
   aplica estilo inline) e .vehicle-list-tv nao existe em nenhum markup.
   O painel passou a ser uma coluna flex, que resolve o mesmo problema sem
   depender de uma classe que ninguem poe. Ver P89. */

/* Loading state para mapa */
.map-loading {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    background: #f8fafc !important;
}

.map-error {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
    background: #fef2f2 !important;
    border: 2px dashed #f87171 !important;
    border-radius: 8px !important;
}

/* ============================================
   🎯 DRAGGABLE ROUTES - ESTILO MONISAT
   ============================================ */

/* Estilo para rota sendo arrastada */
.draggable-route {
    cursor: grab;
    stroke: var(--route-primary) !important;
    stroke-width: 6 !important;
    stroke-opacity: 0.8 !important;
    fill: none !important;
    transition: all 0.2s ease;
}

.draggable-route:hover {
    stroke: var(--route-hover) !important;
    stroke-width: 8 !important;
    stroke-opacity: 1 !important;
    cursor: grab;
}

.draggable-route:active {
    cursor: grabbing;
    stroke: var(--route-active) !important;
}

/* Marcadores de waypoint customizados */
.waypoint-marker {
    background: var(--waypoint-intermediate);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    cursor: grab;
    font-size: 14px;
    transition: all 0.2s ease;
}

.waypoint-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.waypoint-marker:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Cores específicas por tipo de waypoint */
.waypoint-marker.origin {
    background: var(--waypoint-origin) !important;
}

.waypoint-marker.destination {
    background: var(--waypoint-destination) !important;
}

.waypoint-marker.intermediate {
    background: var(--waypoint-intermediate) !important;
}

/* Indicador de "arraste aqui para ajustar" */
.route-hint {
    position: absolute;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

/* Menu de contexto da rota */
.route-context-menu {
    position: absolute;
    z-index: 10000;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--neutral-200);
    padding: 4px;
    min-width: 200px;
    animation: fadeInScale 0.15s ease-out;
}

.route-context-menu button {
    width: 100%;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--neutral-700);
    transition: background-color 0.15s ease;
}

.route-context-menu button:hover {
    background: var(--neutral-100);
    color: var(--neutral-900);
}

/* Lista de waypoints na UI */
.waypoints-list {
    background: var(--primary-50);
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
}

.waypoint-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--primary-100);
    font-size: 12px;
    color: var(--primary-700);
}

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

.waypoint-remove-btn {
    color: var(--accent-orange);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    transition: color 0.15s ease;
}

.waypoint-remove-btn:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

/* Animações */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Leaflet Routing Machine customização */
.leaflet-routing-container {
    display: none !important; /* Ocultar painel padrão */
}

.leaflet-routing-alternatives-container {
    display: none !important; /* Ocultar alternativas */
}

.leaflet-routing-geocoders {
    display: none !important; /* Ocultar campos de busca */
}

/* Garantir que waypoints sejam visíveis e arrastáveis */
.waypoint-div-icon {
    z-index: 1000 !important;
}

/* Linha da rota - garantir interatividade */
.leaflet-interactive {
    cursor: pointer !important;
}

/* Estilo específico para rota OSRM */
.leaflet-routing-line {
    cursor: grab !important;
}

.leaflet-routing-line:active {
    cursor: grabbing !important;
}

/* Fix para marcadores Leaflet */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

/* Tooltips para métricas SaaS - usando Tailwind group */
.group:hover .group-hover\:visible {
    visibility: visible !important;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1 !important;
}

/* Fallback para tooltips sem Tailwind */
.tooltip-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.tooltip-container:hover .tooltip-content {
    visibility: visible !important;
    opacity: 1 !important;
}

.tooltip-content {
    white-space: normal;
    line-height: 1.4;
    font-weight: normal;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.2s ease-in-out;
}

/* Ajuste para ícone de ajuda */
[data-lucide="help-circle"] {
    opacity: 0.6;
    transition: all 0.2s ease;
}

.group:hover [data-lucide="help-circle"],
.tooltip-container:hover [data-lucide="help-circle"] {
    opacity: 1;
}

/* ========================================
   LOADING ANIMATIONS - ELEGANTES
   ======================================== */

/* Animação da barra de progresso */
@keyframes loading-bar {
    0% {
        width: 0%;
        opacity: 1;
    }
    50% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0.7;
    }
}

.animate-loading-bar {
    animation: loading-bar 2s ease-in-out infinite;
}

/* Loading Spinner Aprimorado */
@keyframes spin-slow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* Pulse Suave para textos */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Efeito shimmer para skeleton loaders */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

/* ========================================
   SIDEBAR RETRATIL - DESKTOP (>=1024px)
   ======================================== */

@media (min-width: 1024px) {
    /* Transicao suave de largura no desktop */
    #sidebar {
        transition: width 250ms ease, transform 300ms ease-out;
        overflow: hidden;
    }

    /* Estado colapsada */
    #sidebar.sidebar-collapsed {
        width: 68px !important;
    }

    /* Esconder textos (labels, badges texto) */
    #sidebar.sidebar-collapsed .nav-label {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        pointer-events: none;
        transition: opacity 100ms ease;
    }

    /* Remover gap/space-x dos nav items quando colapsada */
    #sidebar.sidebar-collapsed .nav-item > * + * {
        margin-left: 0 !important;
    }

    /* Centralizar icones nos nav items */
    #sidebar.sidebar-collapsed .nav-item {
        justify-content: center;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        position: relative;
    }

    /* Logo: esconder full, mostrar mini */
    #sidebar.sidebar-collapsed .sidebar-logo-full {
        display: none;
    }
    #sidebar.sidebar-collapsed .sidebar-logo-mini {
        display: flex !important;
    }

    /* Toggle button: trocar icone */
    #sidebar.sidebar-collapsed .sidebar-toggle-collapse {
        display: none;
    }
    #sidebar.sidebar-collapsed .sidebar-toggle-expand {
        display: block !important;
    }

    /* Badges: virar ponto pequeno */
    #sidebar.sidebar-collapsed .nav-badge {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 8px;
        height: 8px;
        font-size: 0;
        line-height: 0;
        padding: 0;
        min-width: 8px;
        border-radius: 50%;
        margin: 0;
    }

    /* Dashboard pulse dot quando colapsada */
    #sidebar.sidebar-collapsed .nav-pulse {
        position: absolute;
        top: 6px;
        right: 6px;
        margin: 0;
    }

    /* User section: esconder info, manter avatar */
    #sidebar.sidebar-collapsed .sidebar-user-inner {
        justify-content: center;
        padding: 0.75rem;
    }
    #sidebar.sidebar-collapsed .sidebar-user-info,
    #sidebar.sidebar-collapsed .sidebar-user-logout {
        display: none;
    }
    #sidebar.sidebar-collapsed .sidebar-user-avatar {
        margin: 0 auto;
    }

    /* Tooltip no hover quando colapsada */
    #sidebar.sidebar-collapsed .nav-item[data-tooltip]:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: calc(100% + 4px);
        top: 50%;
        transform: translateY(-50%);
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        z-index: 9999;
        pointer-events: none;
        background: #1f2937;
        color: #f3f4f6;
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }

    /* Botao toggle: visivel no desktop */
    .sidebar-toggle-btn {
        display: flex;
    }

    /* Logo header quando colapsada - centralizar */
    #sidebar.sidebar-collapsed .sidebar-header {
        justify-content: center;
        padding: 1rem;
    }
}

/* Mobile: NÃO aplicar collapsed */
@media (max-width: 1023px) {
    #sidebar.sidebar-collapsed {
        width: 16rem !important;
    }
    #sidebar.sidebar-collapsed .nav-label {
        opacity: 1;
        width: auto;
        overflow: visible;
        pointer-events: auto;
    }
    #sidebar.sidebar-collapsed .nav-item > * + * {
        margin-left: 1rem;
    }
    #sidebar.sidebar-collapsed .nav-item {
        justify-content: flex-start;
    }
    #sidebar.sidebar-collapsed .sidebar-logo-full {
        display: flex;
    }
    #sidebar.sidebar-collapsed .sidebar-logo-mini {
        display: none !important;
    }
    #sidebar.sidebar-collapsed .nav-badge {
        position: static;
        width: auto;
        height: auto;
        font-size: 0.75rem;
        line-height: 1rem;
        padding: 0.25rem 0.5rem;
        min-width: auto;
        margin-left: auto;
    }
    #sidebar.sidebar-collapsed .nav-pulse {
        position: static;
        margin-left: auto;
    }
    #sidebar.sidebar-collapsed .sidebar-user-inner {
        justify-content: space-between;
        padding: 1rem;
    }
    #sidebar.sidebar-collapsed .sidebar-user-info,
    #sidebar.sidebar-collapsed .sidebar-user-logout {
        display: block;
    }
    /* Esconder botao toggle no mobile */
    .sidebar-toggle-btn {
        display: none !important;
    }
}

/* ============================================================================
   D106 — SEM SOMBRA EM SUPERFICIE DE APLICACAO

   O anexo-a-tema-claro.html nao usa `box-shadow` uma unica vez em 380 linhas
   (conferido: zero ocorrencias). A separacao entre card e fundo vem da borda
   sobre paper, e nao de elevacao -- ver a secao 03 e a regra 09 do anexo.

   Este bloco fica NO FIM do styles.css de proposito: e daqui que ele vence as
   ~31 regras de sombra declaradas acima e as variaveis --shadow-* do :root.
   (D261: o numero de linha que estava aqui saiu -- ele apontava para uma linha
    que a limpeza moveu, e numero de linha em comentario apodrece sozinho.)
   O que ele desliga:

     1. as variaveis --shadow-*, que zeram toda regra `box-shadow: var(...)`;
     2. qualquer classe utilitaria com "shadow-" no nome -- as do Tailwind
        (shadow-sm/lg/2xl, hover:shadow-md, dark:shadow-*) e as locais
        (shadow-soft, shadow-glow, shadow-neumorphic). O !important existe
        porque o Tailwind CDN injeta o <style> dele depois deste arquivo;
     3. o deslocamento de hover que so fazia sentido acompanhado de sombra --
        um card que sobe 4px sem sombra nenhuma le como defeito, nao como
        elevacao.

   O QUE FICA DE PROPOSITO (nao e esquecimento):
     - marcador de waypoint, menu de contexto de rota e tooltip da sidebar.
       Sao elementos FLUTUANTES sobre mapa e sobre outro conteudo, nao card
       de superficie. Sem sombra eles se perdem na imagem de satelite.
     - a sombra do .login-botao e do .login-input:focus, em tokens.css: aquela
       tela e navy, e ali a sombra e halo cyan da marca, nao elevacao.
     - plates-mercosul.css: relevo da placa, e desenho da placa e nao da tela.

   Para reverter: apague este bloco inteiro. Nada acima dele foi alterado.
   ========================================================================= */
:root {
    --shadow-xs:              none;
    --shadow-sm:              none;
    --shadow-md:              none;
    --shadow-lg:              none;
    --shadow-xl:              none;
    --shadow-2xl:             none;
    --shadow-inner:           none;
    --shadow-glow:            none;
    --shadow-neumorphic:      none;
    --shadow-neumorphic-dark: none;
    --glass-shadow:           none;
    --glass-shadow-dark:      none;
}

[class*="shadow-"] { box-shadow: none !important; }

.neumorphic-inset { box-shadow: none; }
.login-card       { box-shadow: none; }

/* Foco de campo: o anel azul #3B82F6 nao esta na paleta, e o translateY era
   elevacao. O foco visivel da aplicacao inteira e o outline de tokens.css. */
.form-input:focus {
    box-shadow: none;
    transform: none;
    border-color: rgb(var(--focus-ring));
}

/* Hover sem sombra tambem nao tem por que ter salto. */
.card:hover,
.hover-lift:hover { transform: none; }

/* A barra de 3px em gradiente roxo (#667eea -> #764ba2) que o .card desenha
   no hover nao existe na paleta. Some junto. */
.card::before,
.card:hover::before { display: none; }

/* ============================================================================
   D107 — BADGE REPINTADO PELA CAMADA DE TOKENS (Lote 3)

   As .badge-* declaradas por volta da linha 805 acima usam hex fixo com texto
   BRANCO por cima. Medido contra o proprio fundo de cada uma:

     branco sobre #22c55e (success)  -> 2,07   reprova AA
     branco sobre #f59e0b (warning)  -> 2,15   reprova AA (o anexo cita 2,15)
     branco sobre #ef4444 (danger)   -> 3,35   reprova AA em texto pequeno
     branco sobre #06b6d4 (info)     -> 2,26   reprova AA
     branco sobre #3b82f6 (primary)  -> 3,68   reprova AA em texto pequeno
     branco sobre #6b7280 (secondary)-> 4,83   passa, mas fora da paleta

   Cinco dos seis reprovam, e o badge e texto de 12px em maiuscula -- o pior
   caso. O anexo (secao 06) resolve isso dando DOIS valores a cada estado:
   preenchimento para o ponto/barra, e um tom escuro para o TEXTO. O padrao
   aplicado aqui e o das pilulas .st-ok/.st-wr/.st-er do proprio anexo: fundo
   no tint claro do estado, texto no tom escuro do estado.

   Estas regras vem depois das originais e por isso vencem, sem editar o bloco
   antigo -- que continua no arquivo como registro do que havia.
   ========================================================================= */
.badge {
    border-radius: 100px;
    border: var(--hairline) solid transparent;
}

.badge-success,  .dark .badge-success  { background: rgb(var(--success-tint)); color: rgb(var(--success-text)); border-color: rgb(var(--success-tint-2)); }
.badge-warning,  .dark .badge-warning  { background: rgb(var(--warning-tint)); color: rgb(var(--warning-text)); border-color: rgb(var(--warning-tint-2)); }
.badge-danger,   .dark .badge-danger   { background: rgb(var(--danger-tint));  color: rgb(var(--danger-text));  border-color: rgb(var(--danger-tint-2)); }
.badge-info,     .dark .badge-info     { background: rgb(var(--info-tint));    color: rgb(var(--info-text));    border-color: rgb(var(--info-tint-2)); }
.badge-primary,  .dark .badge-primary  { background: rgb(var(--info-tint));    color: rgb(var(--accent-text));  border-color: rgb(var(--info-tint-2)); }

/* Cinza tem UM uso legitimo: estado desligado por decisao (Inativo). */
.badge-secondary, .dark .badge-secondary {
    background: rgb(var(--surface-sunken));
    color: rgb(var(--text-secondary));
    border-color: rgb(var(--border));
}

/* D107a — AUSENCIA DE DADO NAO E UM ESTADO.
   "Sem status" nao pode usar o verde (afirmaria ativo), nem o cinza cheio do
   .badge-secondary (afirmaria inativo, que e uma decisao que ninguem tomou).
   Fica em superficie de card com a borda hairline visivel: le como campo
   vazio, que e o que ele e. Mesma familia do P0-b e do P36 -- a tela nao
   afirma o que o dado nao sustenta. */
.badge-neutro, .dark .badge-neutro {
    background: rgb(var(--surface-raised));
    color: rgb(var(--text-muted));
    border-color: rgb(var(--border-strong));
    font-style: italic;
    text-transform: none;
    letter-spacing: 0;
}

/* D386: a altura do painel é a área VISÍVEL. `h-screen` (100vh) no iPhone é a altura
   com as barras do Safari recolhidas: o fim do painel ficava atrás da barra inferior.
   100dvh acompanha a barra; 100vh fica de reserva para navegador sem dvh. */
#mainApp.h-screen, #sidebar.h-screen { height: 100vh; height: 100dvh; }

/* D386: no celular o botão do menu é fixo (top-4 left-4, 48 px: ocupa de 16 a 64 px)
   e cobria o título destas telas — o mesmo defeito já corrigido em Rotas (D381) e no
   Rastreamento (D386). A linha do título (o 1º filho do bloco da tela) começa depois
   do botão. Varredura no WebKit (iPhone 13) em todas as telas: as demais não têm nada
   embaixo do botão. Tela nova com o título no topo esquerdo entra nesta lista. */
@media (max-width: 767px) {
    #checklistsView > div:first-of-type > :first-child,
    #tripsView > div:first-of-type > :first-child,
    #abastecimentosView > div:first-of-type > :first-child,
    #driversView > div:first-of-type > :first-child,
    #posicionamentoView > div:first-of-type > :first-child,
    #financesView > div:first-of-type > :first-child,
    #controllerView .ctl-raiz > div:first-of-type,
    #reportsView > div:first-of-type > :first-child,
    #settingsView > div:first-of-type > :first-child { padding-left: 60px; }
}
