body {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1f2630;
    color: white;
    transition: width 0.3s ease;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-title {
    display: none;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.sidebar-menu {
    padding: 15px 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-menu .icon {
    font-size: 20px;
    min-width: 24px;
    text-align: center;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    padding: 25px;
}

.main-content.expanded {
    margin-left: 70px;
    width: calc(100% - 70px);
}

.preview-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.table td,
.table th {
    padding: 6px 8px;
    font-size: 14px;
    vertical-align: middle;
}

th[onclick] {
    cursor: pointer;
    user-select: none;
}

th[onclick]:hover {
    background-color: #2c3440 !important;
}

.cliente,
.lente,
.telefone,
.numero_pedido,
.vendedor,
.os {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telefone {
    white-space: nowrap;
}

.numero-pedido-coluna {
    min-width: 110px;
    text-align: center;
}

.status-coluna {
    min-width: 130px;
    text-align: center;
}

.acoes-coluna {
    min-width: 300px;
    vertical-align: top !important;
}

.acoes-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.btn-acao {
    font-size: 11px;
    padding: 4px 8px;
    line-height: 1.2;
}

.status-badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
}

.status-pendente {
    background-color: #fff3cd;
    color: #856404;
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar .sidebar-title,
    .sidebar .menu-text {
        display: none;
    }

    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 15px;
    }

    .acoes-coluna {
        min-width: 260px;
    }
}