.sidebar {
    width: 220px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #f8f9fa;
    transition: left 0.3s;
    z-index: 1000;
}

.sidebar.show {
    left: 0;
}

.sidebar .nav-link {
    color: #003087 !important;
    padding: 15px 15px;
    border-radius: 8px;
    font-weight: 500;
    transition: 0.2s;
}

.sidebar .nav-link:hover {
    background: #e7efff;
    color: #003087 !important;
}

.sidebar .nav-link.active {
    background: #002c84;
    font-weight: 600;
    color: #ffffff !important;
}

.overlay-menu {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 900;
}

.content {
    padding-top: 90px;
    margin-left: 220px;
    padding: 20px;
}

.title {
    color: #003087;
}

.subtitle {
    color: #00276f;
}

.text {
    color: #00276f;
}

.hero-header {
    position: relative;
    height: 45vh;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.hero-header .bg-image {
    background-image: url('https://images.unsplash.com/photo-1658869163471-81665d648612?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&q=80&w=1080');
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    height: 100%;
    opacity: 0.4;
}

.hero-header .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(0, 128, 0, 0.75),
            rgba(0, 102, 204, 0.75),
            rgba(0, 128, 0, 0.75));
}

.hero-header .hero-text {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 10px;
}

.hero-header .hero-text h2 {
    font-size: 2.5rem;
    font-weight: bold;
}

.hero-header .hero-text p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.row-cards {
    display: flex;
    flex-wrap: wrap;
}

.row-cards .col-md-4 {
    display: flex;
}

.row-cards .card-index {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 100px;
}

.card-index {
    background: linear-gradient(135deg, #ffffff, #ffffff);
    color: white;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.icon-blue {
    color: #007bff;
    opacity: 0.7;
}

.icon-green {
    color: #28a745;
    opacity: 0.7;
}

.icon-red {
    color: #dc3545;
    opacity: 0.7;
}

.card-index:hover {
    transform: scale(1.03);
    opacity: 1;
    transition: 0.3s;
}

.img-suporte {
    width: 90px;
    height: auto;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.card-igual {
    height: 100%;
}

.card-index .card-title {
    color: #003087 !important;
}

.card-index .card-text {
    color: #00276f !important;
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 20px;
    padding: 15px;
}

.carousel::-webkit-scrollbar {
    display: none;
}

.viagem-card {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    flex: none;
    border-radius: 12px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.viagem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00276f;
}

.status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status.em_transito { background-color: #cce5ff; color: #004085; }
.status.concluido { background-color: #d4edda; color: #155724; }
.status.cancelado { background-color: #f8d7da; color: #721c24; }

.carousel-btn {
    background: #ffffff;
    color: #00276f;
    border: none;
    padding: 10px 10px;
    font-size: 20px;
    border-radius: 100%;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(16, 3, 103, 0.2);
    transition: 0.3s;
    display: none;
}

.carousel-btn:hover {
    background-color: #00276f;
    color: #fff;
}

.btn-addCarga,
.btn-removerCarga,
.btn-verViagem,
.btn-apagarViagem {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-addCarga {
    background-color: #d0f0fd;
    color: #0077b6;
}

.btn-addCarga:hover {
    background-color: #a0e1fb;
}

.btn-removerCarga {
    background-color: #fff3cd;
    color: #856404;
}

.btn-removerCarga:hover {
    background-color: #ffe69c;
}

.btn-verViagem {
    background-color: #e2f0d9;
    color: #2e7d32;
}

.btn-verViagem:hover {
    background-color: #c6e5b3;
}

.btn-apagarViagem {
    background-color: #f8d7da;
    color: #842029;
}

.btn-apagarViagem:hover {
    background-color: #f1aeb1;
}

.btn-addCarga i,
.btn-removerCarga i,
.btn-verViagem i,
.btn-apagarViagem i {
    font-size: 18px;
}

.header-fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 230px);
    margin-left: 220px;
    z-index: 1050;
    background: white;
    transition: margin-left .3s ease, width .3s ease;
}

.sidebar-collapsed .header-fixed {
    width: 100% !important;
    margin-left: 0 !important;
}

.logo-box {
    background: linear-gradient(135deg, #007bff, #00c853);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #1d4ed8;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.menu-avatar {
    position: absolute;
    top: 60px;
    right: 160px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px;
    width: 150px;
    display: none;
    z-index: 999;
}

.menu-avatar button {
    width: 100%;
    padding: 8px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 6px;
}

.menu-avatar button:hover {
    background: #e5e7eb;
}

.role-badge {
    font-size: 0.8rem;
    background: #0d6efd20;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cargas-container, .viagem-container {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0px 4px 14px rgba(0, 0, 0, 0.08);
}

.table-cargas {
    width: 100%;
    color:#00276f;
    border-collapse: collapse;
}

.table-cargas thead th {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
    color: #555;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.table-cargas tbody tr {
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
}

.table-cargas tbody tr:hover {
    background: #f8fafc;
}

.table-cargas td {
    padding: 14px 12px;
}

.status {
    padding: 6px 16px;
    border-radius: 22px;
    font-weight: 600;
    font-size: 0.8rem;
    display: inline-block;
    text-transform: capitalize;
}

.status.pendente {
    background: #fff3cd;
    color: #8a6d3b;
}

.status.em_transporte {
    background: #cfe2ff;
    color: #084298;
}

.status.entregue {
    background: #d1e7dd;
    color: #0f5132;
}

.status.cancelada {
    background: #f8d7da;
    color: #842029;
}

.btn-disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(60%);
}

.action-icons i {
    cursor: pointer;
    font-size: 1.1rem;
    margin-right: 12px;
    transition: 0.2s;
}

.action-icons i:hover {
    opacity: 0.6;
    transform: scale(1.15);
}

@media (max-width: 767px) {

    #btn-menu {
        position: absolute;
        top: 55px;
        left: 10px;
        z-index: 100;
        background: #fff;
        font-size: 18px;
        padding: 6px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .sidebar {
        left: -260px;
    }

    .sidebar.show {
        left: 0;
        z-index: 3000;
    }

    .content {
        margin-left: 0 !important;
        padding-top: 80px;
    }

    .sidebar.show+.content {
        margin-left: 220px;
    }

    .header-fixed {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0.6rem 1rem;
    }

    .logo-box {
        width: 34px;
        height: 34px;
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .menu-avatar {
        top: 40px;
        right: 0;
    }

    header .d-flex.flex-column {
        display: none !important;
    }

    h4 {
        font-size: 1.1rem !important;
    }

    .d-flex.align-items-center.gap-3 {
        gap: 0.7rem !important;
    }

    .col-peso {
        display: none !important;
    }

    .carousel-btn {
        display: none !important;
    }
}
