/* Dashboard Moderno - Cardápio Tech */

/* Remover navbar padrão no dashboard */
body.dashboard-page .navbar-top,
body.dashboard-page nav.navbar-top,
body.dashboard-page .navbar.navbar-top {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

body.dashboard-page .main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-left: 250px !important;
}

body.dashboard-page .sidenav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

/* Quando sidebar está escondida */
body.dashboard-page .g-sidenav-hidden ~ .main-content,
body.dashboard-page .main-content.g-sidenav-pinned {
    margin-left: 0 !important;
    transition: margin-left 0.3s ease;
}

body.dashboard-page .sidenav.g-sidenav-hidden {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

body.dashboard-page .sidenav.g-sidenav-show {
    transform: translateX(0);
    transition: transform 0.3s ease;
}

/* Header Dashboard */
.header-dashboard {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 999;
    background-color: #ffffff;
}

.header-dashboard .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}

.header-dashboard .row {
    margin: 0;
}

.header-dashboard .col-md-6 {
    padding: 0;
}

.header-dashboard .nav {
    flex-wrap: nowrap;
    gap: 0.25rem;
}

.header-dashboard .nav-item {
    flex-shrink: 0;
}

.header-dashboard .nav-link {
    padding: 0.5rem 0.75rem;
    color: #525f7f;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
    white-space: nowrap;
}

.header-dashboard .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #32325d;
}

.header-dashboard .dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.header-dashboard .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.header-dashboard .dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.header-dashboard .dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8898aa;
    font-weight: 600;
}

.header-dashboard .btn-link {
    text-decoration: none;
    padding: 0.5rem 1rem;
}

.header-dashboard .btn-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
}

/* Melhorar dropdowns do header */
.header-dashboard .dropdown-menu {
    min-width: 200px;
}

.header-dashboard .dropdown-toggle::after {
    display: none;
}

/* Ajustar posição do badge de notificação */
.header-dashboard .position-relative .badge {
    top: 8px !important;
    right: 8px !important;
}

/* Responsividade do header */
@media (max-width: 991px) {
    .header-dashboard .nav {
        gap: 0.125rem;
    }
    
    .header-dashboard .nav-link {
        padding: 0.5rem;
    }
    
    .header-dashboard .nav-link span {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body.dashboard-page .main-content {
        margin-left: 0 !important;
    }
    
    .header-dashboard .col-md-6 {
        width: 50%;
        flex: 0 0 50%;
    }
}

/* Cards de métricas */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 0.75rem;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.icon-shape {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #11cdef 0%, #1171ef 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #f5365c 0%, #f56036 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #fb6340 0%, #fbb140 100%);
}

/* Ícones circulares dos pedidos */
.bg-success {
    background-color: #2dce89 !important;
}

.bg-info {
    background-color: #11cdef !important;
}

.bg-warning {
    background-color: #fb6340 !important;
}

.bg-danger {
    background-color: #f5365c !important;
}

.bg-purple {
    background-color: #8965e0 !important;
}

/* Badges */
.badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: #2dce89;
    color: white;
}

.badge-info {
    background-color: #11cdef;
    color: white;
}

.badge-warning {
    background-color: #fb6340;
    color: white;
}

.badge-danger {
    background-color: #f5365c;
    color: white;
}

/* Badge com animação pulse */
.badge-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    padding: 0;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Lista de pedidos ao vivo */
#live-orders-list .border-bottom:last-child {
    border-bottom: none !important;
}

/* Mapa */
#map_location {
    height: 450px;
    width: 100%;
    border-radius: 0;
}

/* Card do mapa */
.card .card-body.p-0 {
    overflow: hidden;
}

/* Gráficos */
.chart-canvas {
    max-height: 300px;
}

/* Botões de grupo */
.btn-group-sm .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Dropdown customizado */
.dropdown-toggle::after {
    margin-left: 0.5rem;
}

/* Lista de despesas */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Card de plano */
.bg-gradient-primary {
    background: linear-gradient(87deg, #5e72e4 0, #825ee4 100%) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .icon-shape {
        width: 48px;
        height: 48px;
    }
    
    #map_location {
        height: 300px;
    }
    
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .card-header .btn-group {
        margin-top: 0.5rem;
    }
}

/* Scrollbar customizada */
.card-body::-webkit-scrollbar {
    width: 6px;
}

.card-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.card-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animações suaves */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badges personalizados */
.badge-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Cores dos ícones */
.text-primary {
    color: #5e72e4 !important;
}

.text-success {
    color: #2dce89 !important;
}

.text-danger {
    color: #f5365c !important;
}

.text-warning {
    color: #fb6340 !important;
}

.text-info {
    color: #11cdef !important;
}
