body {
    font-family: 'Inter', sans-serif;
    background-color: #f7fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.5));
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease; /* Transição suave para esconder */
}

.navbar.navbar-hidden {
    transform: translateY(-100%); /* Esconde a navbar movendo-a para fora da tela */
    /* display: none; */ /* Alternativa: usar display none, mas transform é mais suave */
}

.modal:not(.hidden) ~ .navbar {
    display: none; /* Esconde a navbar quando o modal está aberto */
}

.card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 6rem 1rem 2rem;
    transition: opacity 0.3s ease;
}

.page-title {
    position: relative;
    font-size: 2.5rem;
    font-weight: 700;
    color: rgb(0, 0, 0);
    background-color: rgb(236, 236, 88);
    border: 2px solid #cbd5e1;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
    overflow: hidden;
}

.page-title i {
    font-size: 2rem;
    color: #1e40af;
}

.page-title::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: light-sweep 5s infinite;
}

.plate-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
}

.plate-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.plate-text {
    width: 340px;
    height: 104px;
    max-width: 90%;
    background-image: url('../img/placa_mercosul.jpg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
    line-height: 1;
    padding-top: 10px;
    position: relative;
    overflow: hidden;
}

.plate-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: light-sweep 4s infinite;
    pointer-events: none;
    z-index: 1;
}

.plate-text span {
    position: relative;
    z-index: 2;
}

@keyframes light-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.search-form {
    display: flex;
    gap: 1rem;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

.form-control {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    flex: 1;
}

.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    transition: background-color 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background-color: #1e40af;
    transform: translateY(-1px);
}

.progress-container {
    margin: 2.5rem 0 3.5rem;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 1.5rem;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 6px;
    background-color: #e2e8f0;
    z-index: 1;
}

.progress-line-filled {
    position: absolute;
    top: 50%;
    left: 0;
    height: 6px;
    background-color: #2563eb;
    z-index: 2;
    transition: width 0.5s ease;
}

.step {
    width: 40px;
    height: 40px;
    background-color: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #64748b;
    z-index: 3;
    position: relative;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}

.step.completed {
    background-color: #2563eb;
    color: white;
}

.step.active {
    background-color: #dbeafe;
    color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.step-label {
    position: absolute;
    top: 48px;
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    white-space: nowrap;
}

.tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e40af;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 4;
}

.step:active .tooltip, .step.show-tooltip .tooltip {
    opacity: 1;
}

.vehicle-status {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.status-message {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563eb;
    margin: 0;
}

.last-movement {
    font-size: 0.95rem;
    color: #475569;
    background-color: #f7fafc;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
}

.vehicle-grid p {
    font-size: 1rem;
    color: #475569;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-width: 100%;
}

.vehicle-grid strong {
    color: #1e293b;
    font-weight: 600;
}

.vehicle-grid .model-text {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
}

.vehicle-grid .status-text {
    font-size: 1.125rem;
    font-weight: bold;
    text-align: center;
    width: 100%;
    color: #166534;
    text-transform: capitalize;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.media-item:hover {
    transform: scale(1.02);
}

.media-item img, .media-item video {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.media-item .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: white;
    opacity: 0.8;
}

.modal-media {
    max-height: 100%;
    max-width: 100%;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

#modalMediaContainer {
    max-height: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    transition: opacity 0.3s ease;
}

.modal:not(.hidden) {
    opacity: 1;
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

body.modal-open {
    overflow: hidden;
}

.modal-dialog {
    margin: auto;
    max-width: 95vw;
    width: 100%;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.btn-nav {
    background-color: #2563eb;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.btn-nav:hover:not(:disabled) {
    background-color: #1e40af;
}

.btn-nav:disabled {
    background-color: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.service-modal-content {
    padding: 1.5rem;
}

.service-column {
    flex: 1;
    min-width: 300px;
}

.service-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.service-table-container::-webkit-scrollbar {
    width: 8px;
}

.service-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.service-table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.service-table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #475569;
    border-bottom: 1px solid #e2e8f0;
}

.service-list li:last-child {
    border-bottom: none;
}

@media (max-width: 1024px) {
    .card {
        padding: 2rem;
        margin: 5rem 0.75rem 1.5rem;
    }

    .search-form {
        max-width: 600px;
    }

    .step {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .step-label {
        font-size: 0.85rem;
        top: 44px;
    }

    .vehicle-status {
        padding: 1.25rem;
    }

    .status-message {
        font-size: 1.05rem;
    }

    .last-movement {
        font-size: 0.9rem;
    }

    .media-item img, .media-item video {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .service-table-container {
        max-height: 300px;
    }

    .service-column {
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    .card {
        padding: 1.5rem;
        margin: 5rem 0.5rem 1rem;
    }

    .page-title {
        font-size: 1.875rem;
        padding: 0.75rem;
        margin-bottom: 2rem;
    }

    .plate-label {
        font-size: 1.125rem;
    }

    .plate-text {
        width: 255px;
        height: 78px;
        font-size: 2.625rem;
        padding-top: 8px;
    }

    .search-form {
        flex-direction: column;
    }

    .form-control {
        font-size: 1rem;
    }

    .btn-primary {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .progress-steps {
        gap: 0.5rem;
    }

    .progress-container {
        margin: 2.5rem 0;
    }

    .step {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .step-label {
        display: none;
    }

    .tooltip {
        top: -35px;
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .progress-line, .progress-line-filled {
        height: 4px;
    }

    .vehicle-status {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

    .status-message {
        font-size: 1rem;
    }

    .last-movement {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .vehicle-grid p {
        font-size: 0.95rem;
    }

    .vehicle-grid .status-text {
        font-size: 1rem;
    }

    .media-item img, .media-item video {
        height: 100px;
    }

    .modal-dialog {
        max-width: 90vw; /* Reduz a largura máxima do modal */
        margin: 0.5rem; /* Menor margem para aproveitar a tela */
    }

    .modal-content {
        max-height: 80vh; /* Reduz a altura máxima do modal */
        border-radius: 8px; /* Bordas menos arredondadas para telas pequenas */
    }

    .modal-body {
        padding: 0.5rem; /* Reduz o padding do corpo do modal */
    }

    .service-modal-content {
        padding: 0.75rem; /* Reduz o padding do conteúdo do modal */
    }

    .service-table-container {
        max-height: 200px; /* Reduz a altura máxima da tabela */
    }

    .service-table-container table {
        font-size: 0.85rem; /* Reduz o tamanho da fonte na tabela */
    }

    .service-table-container th,
    .service-table-container td {
        padding: 0.5rem; /* Reduz o padding das células da tabela */
    }

    .service-column {
        min-width: 100%; /* Garante que a coluna ocupe toda a largura */
    }

    .grid {
        grid-template-columns: 1fr; /* Força uma única coluna */
        gap: 0.5rem; /* Reduz o espaçamento entre elementos */
    }

    .service-modal-content h2 {
        font-size: 1.25rem; /* Reduz o tamanho do título */
    }

    .service-modal-content button[data-modal-close] {
        font-size: 1.5rem; /* Reduz o tamanho do botão de fechar */
        padding: 0.25rem; /* Menor padding */
    }

    .service-modal-content .bg-blue-600 {
        padding: 0.5rem 1rem; /* Reduz o padding do botão "Fechar" */
        font-size: 0.9rem; /* Reduz o tamanho da fonte do botão */
    }
}