/* ================================
   VENDEDOR - ESTILOS PERSONALIZADOS
   ================================ */

/* PAINEL DO VENDEDOR */
.vendedor-painel {
    padding: 20px;
}

.vendedor-header {
    margin-bottom: 30px;
}

.vendedor-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.vendedor-header p {
    color: #7f8c8d;
    font-size: 14px;
}

/* Cards de Estatísticas - escopo para evitar conflitos */
.vendedor-painel .stats-grid,
.vendedor-pedidos .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vendedor-painel .stat-card,
.vendedor-pedidos .stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.vendedor-painel .stat-card:hover,
.vendedor-pedidos .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.vendedor-painel .stat-card.vendas,
.vendedor-pedidos .stat-card.vendas {
    border-left-color: #3498db;
}

.stat-card.pendentes {
    border-left-color: #f39c12;
}

.stat-card.entregues {
    border-left-color: #27ae60;
}

.stat-card.clientes {
    border-left-color: #9b59b6;
}

.stat-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card.vendas .stat-icon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.stat-card.pendentes .stat-icon {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}

.stat-card.entregues .stat-icon {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.stat-card.clientes .stat-icon {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.stat-card-body h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.stat-card-body p {
    font-size: 13px;
    color: #7f8c8d;
    margin: 4px 0 0 0;
}

/* Ações Rápidas */
.acoes-rapidas {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.acoes-rapidas h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.acoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.acao-btn {
    padding: 16px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
}

.acao-btn:hover {
    border-color: #3498db;
    background: #f8fbff;
    transform: translateX(4px);
}

.acao-btn i {
    font-size: 20px;
    color: #3498db;
}

/* Meta Mensal */
.meta-mensal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.meta-mensal h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.meta-valor {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

.meta-total {
    font-size: 14px;
    color: #7f8c8d;
}

.progress-bar {
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 12px;
}

.progress-text {
    font-size: 12px;
    color: white;
    font-weight: 600;
}

/* Pedidos Recentes */
.pedidos-recentes {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pedidos-recentes h3 {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.pedido-item {
    padding: 16px;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pedido-item:hover {
    border-color: #3498db;
    background: #f8fbff;
}

.pedido-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pedido-numero {
    font-weight: 600;
    color: #2c3e50;
}

.pedido-valor {
    font-weight: 700;
    color: #27ae60;
}

.pedido-item-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #7f8c8d;
}

.pedido-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pedido-status.pendente {
    background: #fff3cd;
    color: #856404;
}

.pedido-status.pago {
    background: #d4edda;
    color: #155724;
}

.pedido-status.enviado {
    background: #d1ecf1;
    color: #0c5460;
}

.pedido-status.entregue {
    background: #d4edda;
    color: #155724;
}

/* MEUS PEDIDOS */
.vendedor-pedidos {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: #2c3e50;
}

/* Toolbar de Filtros */
.pedidos-toolbar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.filtros-pedidos {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 10px 20px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
}

.filtro-btn:hover {
    border-color: #3498db;
    background: #f8fbff;
}

.filtro-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.filtro-btn i {
    margin-right: 6px;
}

/* Grid de Pedidos */
.pedidos-grid {
    display: grid;
    gap: 20px;
}

.pedido-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e8ecef;
}

.pedido-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.pedido-card.pendente {
    border-left-color: #f39c12;
}

.pedido-card.pago {
    border-left-color: #27ae60;
}

.pedido-card.separacao {
    border-left-color: #3498db;
}

.pedido-card.enviado {
    border-left-color: #9b59b6;
}

.pedido-card.entregue {
    border-left-color: #27ae60;
}

.pedido-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pedido-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pedido-card-title h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.pedido-card-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pedido-card-badge.pendente {
    background: #fff3cd;
    color: #856404;
}

.pedido-card-badge.pago {
    background: #d4edda;
    color: #155724;
}

.pedido-card-badge.separacao {
    background: #d1ecf1;
    color: #0c5460;
}

.pedido-card-badge.enviado {
    background: #e2e3e5;
    color: #383d41;
}

.pedido-card-badge.entregue {
    background: #d4edda;
    color: #155724;
}

.pedido-card-body {
    margin-bottom: 16px;
}

.pedido-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
    font-size: 14px;
}

.pedido-info-row:last-child {
    border-bottom: none;
}

.pedido-info-label {
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pedido-info-value {
    font-weight: 600;
    color: #2c3e50;
}

.pedido-card-footer {
    display: flex;
    gap: 10px;
}

.btn-card {
    flex: 1;
    padding: 10px;
    border: 2px solid #e8ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-card:hover {
    border-color: #3498db;
    background: #f8fbff;
    color: #3498db;
}

.btn-card.primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-card.primary:hover {
    background: #2980b9;
}

/* Modal de Detalhes */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.24);
}

@keyframes slideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e8ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    color: #2c3e50;
    margin: 0;
}

.close-modal {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    color: #7f8c8d;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.modal-body {
    padding: 24px;
}

.modal-section {
    margin-bottom: 24px;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section h3 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detalhes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.detalhe-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.detalhe-label {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.detalhe-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Tabela de Itens */
.itens-table {
    width: 100%;
    border-collapse: collapse;
}

.itens-table th,
.itens-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e8ecef;
}

.itens-table th {
    background: #f8f9fa;
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
}

.itens-table td {
    font-size: 14px;
    color: #2c3e50;
}

/* Upload de Comprovante */
.upload-area {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #3498db;
    background: #f8fbff;
}

.upload-area.dragover {
    border-color: #3498db;
    background: #e8f4ff;
}

.upload-icon {
    font-size: 48px;
    color: #3498db;
    margin-bottom: 12px;
}

.upload-text h4 {
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.upload-text p {
    font-size: 13px;
    color: #7f8c8d;
}

.preview-area {
    margin-top: 20px;
}

.preview-image {
    max-width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
}

.preview-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
}

.remove-file {
    padding: 6px 12px;
    border: none;
    background: #e74c3c;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.remove-file:hover {
    background: #c0392b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e0;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .acoes-grid {
        grid-template-columns: 1fr !important;
    }
    .detalhes-grid {
        grid-template-columns: 1fr !important;
    }
    .modal-content {
        width: 95% !important;
        max-height: 95vh !important;
        margin: 10px auto !important;
    }
    .pedido-card-footer {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .page-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }
    .page-header h1 {
        font-size: 20px !important;
    }
    /* Novo Pedido — formulário */
    .form-grid, .form-row {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }
    .pedido-card {
        padding: 14px !important;
    }
    .pedido-card-header {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }
    /* Tabelas scroll horizontal */
    .table-container, .tabela-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    table {
        min-width: 500px;
        font-size: 12px !important;
    }
    th, td {
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }
    /* Filtros */
    .filtros-bar, .filtros-row {
        flex-direction: column !important;
        gap: 8px !important;
    }
    .filtros-bar input,
    .filtros-bar select {
        width: 100% !important;
    }
}
