/* ==========================================================================
   Encanto do Jasmim - B2B Reseller Portal Styling
   Painel do Revendedor, Orçamentos para Aprovação, Entregas e Faturamento
   ========================================================================== */

.encanto-b2b-portal-wrapper {
    margin: 20px 0;
}

.encanto-b2b-header-card {
    background: linear-gradient(135deg, #FAF7F2 0%, #F4ECE4 100%);
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

.encanto-b2b-badge {
    background: var(--color-secondary);
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
}

.encanto-b2b-profile-info h2 {
    font-size: 26px;
    margin-bottom: 6px;
    color: var(--color-text-main);
}

.encanto-b2b-profile-info p {
    font-size: 13.5px;
    color: var(--color-text-muted);
}

.encanto-b2b-profile-info .highlight {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.encanto-b2b-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.encanto-btn-primary {
    background-color: var(--color-primary);
    color: #ffffff !important;
    padding: 12px 22px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.encanto-btn-primary:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
}

/* Stats Grid */
.encanto-b2b-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.encanto-stat-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

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

.stat-gold { background: #fdf5e6; color: #b07242; }
.stat-green { background: #e8f5e9; color: #2e7d32; }
.stat-blue { background: #e3f2fd; color: #1565c0; }
.stat-purple { background: #f3e5f5; color: #7b1fa2; }

.stat-details {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-val {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-main);
}

/* Modules Grid */
.encanto-b2b-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.encanto-module-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.encanto-module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary);
}

.module-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.encanto-module-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.encanto-module-card p {
    font-size: 13.5px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.module-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   Orçamentos para Aprovação
   -------------------------------------------------------------------------- */
.encanto-b2b-section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.encanto-b2b-section-header h2 {
    font-size: 24px;
    margin-bottom: 6px;
}

.encanto-b2b-section-header p {
    color: var(--color-text-muted);
    font-size: 14px;
}

.encanto-quotes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.encanto-quote-card {
    background: #ffffff;
    border: 1.5px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.encanto-quote-card:hover {
    border-color: var(--color-primary);
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0ebe4;
    padding-bottom: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.quote-id {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-main);
    margin-right: 12px;
}

.quote-date {
    font-size: 13px;
    color: var(--color-text-muted);
}

.quote-badges {
    display: flex;
    gap: 8px;
}

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

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-approved {
    background: #d4edda;
    color: #155724;
}

.badge-delivery, .badge-pickup, .badge-shipping {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.quote-body h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.quote-details-box {
    background: #faf7f2;
    padding: 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 16px;
}

.quote-pricing-row {
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
    background: #fdfaf7;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px dashed #decbb9;
    margin-bottom: 18px;
}

.price-item span {
    font-size: 12px;
    color: var(--color-text-muted);
    display: block;
}

.price-item.highlight .total-value {
    font-size: 22px;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.discount-tag {
    color: #28a745;
    font-weight: 700;
}

.quote-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.encanto-btn-approve-quote {
    background-color: #28a745;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: var(--transition);
}

.encanto-btn-approve-quote:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.encanto-btn-whatsapp-outline {
    border: 1.5px solid #25D366;
    color: #25D366 !important;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 13.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.encanto-btn-whatsapp-outline:hover {
    background: #25D366;
    color: #ffffff !important;
}

.approved-msg {
    color: #28a745;
    font-weight: 700;
    font-size: 14px;
}

/* --------------------------------------------------------------------------
   Linha do Tempo de Entregas (Timeline)
   -------------------------------------------------------------------------- */
.encanto-deliveries-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.encanto-delivery-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.delivery-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0ebe4;
}

.encanto-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 10px;
    position: relative;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.timeline-step.completed .step-circle {
    background: #28a745;
    color: #ffffff;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    max-width: 100px;
}

.timeline-step.completed .step-label {
    color: var(--color-text-main);
}

.timeline-line {
    flex: 1;
    height: 4px;
    background: #e9ecef;
    margin: 0 -5px;
    position: relative;
    top: -14px;
    z-index: 1;
}

.timeline-line.completed {
    background: #28a745;
}

.delivery-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid #f0ebe4;
    font-size: 13.5px;
    flex-wrap: wrap;
    gap: 10px;
}

/* --------------------------------------------------------------------------
   Controle Financeiro & A Receber
   -------------------------------------------------------------------------- */
.encanto-financial-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 26px;
}

.fin-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fin-card.highlight-green { border-left: 4px solid #28a745; }
.fin-card.highlight-orange { border-left: 4px solid #f39c12; }

.fin-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
}

.fin-val {
    font-size: 22px;
    font-weight: 700;
}

.text-green { color: #28a745; }
.text-orange { color: #d35400; }
.text-dark { color: #1f2421; }

.encanto-invoices-table-wrapper {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    overflow-x: auto;
}

.encanto-invoices-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.encanto-invoices-table th, 
.encanto-invoices-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.encanto-invoices-table th {
    background: #faf7f2;
    font-weight: 700;
    color: var(--color-text-main);
}

.badge-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
}

.badge-paid { background: #d4edda; color: #155724; }
.badge-unpaid { background: #fff3cd; color: #856404; }

.encanto-btn-sm-pix {
    background: #28a745;
    color: #ffffff !important;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.encanto-btn-sm-view {
    background: #e9ecef;
    color: #333333 !important;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}
