body {
    background-color: #f5f7fb;
    font-size: 14px;
}

/* =========================
   LOGIN PAGE
   ========================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 440px;
    padding: 48px 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.logo-image {
    max-width: 280px;
    height: auto;
    display: block;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

.login-subtitle {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form .form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.login-form .form-control {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    color: #1f2937;
}

.login-form .form-control:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.login-form .form-control::placeholder {
    color: #9ca3af;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.toggle-password:hover {
    color: #6b7280;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

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

.forgot-password {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #22c55e;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f3f4f6;
    color: #9ca3af;
    font-size: 13px;
}

.login-form .alert {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
}

@media (max-width: 576px) {
    .login-card {
        padding: 32px 24px 24px;
    }
    
    .logo-image {
        max-width: 220px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a, #020617);
    color: #fff;
    position: sticky;
    top: 0;
    align-self: flex-start;
}

/* Logo da Sidebar */
.sidebar-logo {
    padding: 0 20px;
    text-align: center;
}

.sidebar-logo img {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sidebar a {
    color: #cbd5e1;
    text-decoration: none;
}

.sidebar a.active,
.sidebar a:hover {
    background-color: #1e293b;
    color: #fff;
    border-radius: 8px;
}

.topbar {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.card {
    border: none;
    border-radius: 14px;
}

.badge-status {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.border-dashed {
    border: 2px dashed #e5e7eb;
    border-radius: 12px;
}

.contador-colab {
    font-weight: 600;
    color: #2563eb;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* DESKTOP */
@media (min-width: 992px) {
    .sidebar-wrapper {
        width: 260px;
        flex-shrink: 0;
    }

    .content-wrapper {
        flex-grow: 1;
    }
}

/* MOBILE */
@media (max-width: 991px) {
    .app-layout {
        flex-direction: column;
    }

    .content-wrapper {
        width: 100%;
    }
}

/* =========================
   AJUSTES DE UX PARA MOBILE
   ========================= */
@media (max-width: 576px) {

    html {
        font-size: 18px;
    }    

    body {
        font-size: 16px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    .card-title {
        font-size: 17px;
    }

    .badge-status {
        font-size: 13px;
        padding: 6px 12px;
    }

    .btn {
        font-size: 16px;
        padding: 10px 14px;
    }

    .sidebar a {
        font-size: 16px;
        padding: 14px 16px;
    }

    .sidebar a.active {
        background: rgba(255,255,255,0.08);
        border-radius: 6px;
    }   

    .topbar input,
    .topbar .form-control {
        font-size: 16px;
    }
}

.offcanvas-start {
    width: 260px;
}

.offcanvas-body {
    padding: 0 !important;
}

/* =========================
   SELECT COM OPTGROUP
   ========================= */
select optgroup {
    font-weight: 700;
    font-style: normal;
    color: #374151;
    background-color: #f9fafb;
    padding: 8px 0;
}

select option {
    padding-left: 8px;
    font-weight: 400;
}

/* Remove fundo branco do offcanvas */
.offcanvas {
    background-color: transparent;
}

/* Garante que a sidebar seja o fundo visível */
.offcanvas .sidebar {
    width: 100%;
    min-height: 100%;
    height: 100%;
    margin-top: 0;
    background: linear-gradient(180deg, #0f172a, #020617); /* ou sua cor atual */
}

.offcanvas .btn-close {
    filter: invert(1);
    opacity: 1;
}
/* =========================
   ROTEIRIZAÇÃO - ORDENAÇÃO
   ========================= */
.btn-group .btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.btn-group .btn.active:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Transição suave para botões de ordenação */
.btn-group .btn {
    transition: all 0.3s ease;
}

/* Ícones nos botões de ordenação */
.btn-group .btn i {
    margin-right: 4px;
}


/* =========================
   PAGINAÇÃO
   ========================= */
.pagination .page-item.disabled .page-link {
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination .page-item.active .page-link {
    z-index: 3;
    font-weight: 600;
}

.pagination .page-link {
    color: #0d6efd;
    border-color: #dee2e6;
    padding: 0.375rem 0.75rem;
}

.pagination .page-link:hover:not(.disabled) {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Ícones nos botões de navegação */
.pagination .page-link i {
    font-size: 0.875rem;
}


/* ============================================================================
   PAGINATION IMPROVEMENTS
   ========================================================================== */

/* Container da paginação */
.pagination {
    gap: 4px;
}

/* Estilo dos botões de paginação */
.pagination .page-link {
    color: #4A5568;
    background-color: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 38px;
    text-align: center;
}

/* Hover dos botões */
.pagination .page-link:hover:not(.disabled) {
    color: #2D3748;
    background-color: #F7FAFC;
    border-color: #CBD5E0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Página ativa */
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #4299E1 0%, #3182CE 100%);
    border-color: #3182CE;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

/* Botões desabilitados */
.pagination .page-item.disabled .page-link {
    color: #CBD5E0;
    background-color: #F7FAFC;
    border-color: #E2E8F0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Reticências */
.pagination .page-item.disabled span.page-link {
    background-color: transparent;
    border: none;
    padding: 6px 8px;
}

/* Ícones de navegação */
.pagination .page-link i {
    font-size: 12px;
    vertical-align: middle;
}

/* Botões de primeira e última página */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    font-weight: 600;
}

/* Informações de registros */
.text-muted small {
    font-size: 14px;
    color: #718096;
}

.text-muted strong.text-dark {
    color: #2D3748;
    font-weight: 600;
}

/* Borda superior do container de paginação */
.border-top {
    border-top: 1px solid #E2E8F0 !important;
}

/* Responsivo */
@media (max-width: 576px) {
    .pagination .page-link {
        padding: 4px 8px;
        min-width: 32px;
        font-size: 13px;
    }
    
    .text-muted small {
        font-size: 12px;
    }
}


/* Símbolos de navegação da paginação */
.pagination .page-link span {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

/* Previne cliques em links desabilitados */
.pagination .page-item.disabled .page-link {
    pointer-events: none;
}

/* Melhora o espaçamento dos botões de navegação */
.pagination .page-item:first-child .page-link,
.pagination .page-item:nth-child(2) .page-link,
.pagination .page-item:nth-last-child(2) .page-link,
.pagination .page-item:last-child .page-link {
    padding: 6px 10px;
}

/* ===========================================
   ROTEIRIZAÇÃO - SOLICITAÇÕES COM DATA EXPIRADA
   =========================================== */

/* Card com data expirada */
.solicitacao-data-passada {
    opacity: 0.6;
    background-color: #fff5f5 !important;
    border: 2px solid #feb2b2 !important;
    position: relative;
}

.solicitacao-data-passada::before {
    content: '⚠️ DATA EXPIRADA';
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.solicitacao-data-passada .form-check-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.solicitacao-data-passada .card-body {
    cursor: not-allowed;
}

/* Responsivo */
@media (max-width: 768px) {
    .solicitacao-data-passada::before {
        font-size: 10px;
        padding: 3px 8px;
        top: 8px;
        right: 8px;
    }
}

/* Card de viagem com data expirada */
.viagem-data-passada {
    opacity: 0.7;
    background-color: #fff5f5 !important;
    border: 2px solid #feb2b2 !important;
}

.viagem-data-passada .card-body {
    position: relative;
}
