/* ==========================================
   Estilos Complementares ao Tailwind CSS
   ========================================== */

html {
    scroll-behavior: smooth;
}

.brand-logo {
    display: block;
    height: auto;
    object-fit: contain;
}

.brand-logo--wordmark {
    width: min(100%, 140px);
    margin-inline: auto;
}

.brand-logo--icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.brand-logo--compact {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #E8F0F0;
}

::-webkit-scrollbar-thumb {
    background: #C0D2D4;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8AA3A9;
}

/* Spinner de carregamento */
.loading-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #D6E3E4;
    border-top-color: #0E6F8C;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Barra de progresso de upload */
.upload-progress-bar {
    height: 4px;
    background: #D6E3E4;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.upload-progress-bar .fill {
    height: 100%;
    background: #1B87AA;
    border-radius: 2px;
    transition: width 0.2s ease;
    width: 0%;
}

/* Tabs ativas no admin */
.tab-btn {
    transition: all 0.2s ease;
}

.tab-btn.active {
    color: #0E6F8C;
    border-bottom: 3px solid #0E6F8C;
    font-weight: 600;
}

.tab-btn:not(.active) {
    color: #5A757D;
    border-bottom: 2px solid transparent;
}

.tab-btn:not(.active):hover {
    color: #33505A;
    border-bottom-color: #C0D2D4;
}

/* Preview de imagens de documentos */
.doc-preview {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #D6E3E4;
}

/* Card de frete hover */
.freight-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Só em telas com mouse: no toque o hover fica "preso" depois do toque */
@media (hover: hover) {
    .freight-card:hover {
        transform: translateY(-2px);
    }
}

/* File input estilizado */
.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 2px dashed #C0D2D4;
    border-radius: 8px;
    font-size: 0.75rem;
    color: #5A757D;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-input-label:hover,
.file-input-wrapper:focus-within .file-input-label {
    border-color: #0E6F8C;
    color: #0E6F8C;
    background: #EEF6F8;
}

.file-input-label.has-file {
    border-color: #22c55e;
    color: #16a34a;
    background: #f0fdf4;
}
