/* Trade de Valor - Estilos Compartilhados */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

.container {
    background: white;
    border-radius: 16px;
    padding: 60px 50px;
    max-width: 750px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.container.container-wide {
    max-width: 1200px;
}

.logo { margin-bottom: 24px; }
.logo img { max-width: 200px; height: auto; }

h1 {
    font-size: 2rem;
    color: #1a202c;
    margin-bottom: 12px;
    font-weight: 600;
}

.subtitle {
    color: #718096;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ============================================
   HEADER COMPACTO (para páginas internas)
   ============================================ */
.page-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 24px;
    gap: 20px;
    text-align: left !important;
    width: 100%;
}

.page-header-left {
    flex: 1;
    text-align: left !important;
}

.page-header-left .back-link {
    margin-bottom: 12px;
    margin-left: 0;
    display: inline-flex;
}

.page-header-left h1 {
    margin-bottom: 8px;
    text-align: left !important;
}

.page-header-left .subtitle {
    margin-bottom: 0;
    text-align: left !important;
}

.page-header-right {
    flex-shrink: 0;
    text-align: right;
}

.page-header-right .logo {
    margin-bottom: 0;
}

.page-header-right .logo img {
    max-width: 120px;
    height: auto;
}

/* Buttons */
.btn-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 350px;
    margin: 0 auto;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: white;
    color: #2d3748;
    text-decoration: none;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.3px;
    transition: all 0.2s;
    width: 100%;
    cursor: pointer;
}

.btn-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-generic { border-color: #38a169; }
.btn-generic:hover {
    background: #38a169;
    border-color: #38a169;
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    background: white;
    color: #4a5568;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s;
    border: 1px solid #e2e8f0;
    cursor: pointer;
}

.btn-secondary:hover { background: #f7fafc; border-color: #cbd5e0; }

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-submit-green {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    box-shadow: 0 4px 12px rgba(56, 161, 105, 0.3);
}

.btn-submit-green:hover { box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4); }

/* Form styles */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #718096;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 12px;
    margin-bottom: 20px;
    margin-left: -12px;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.back-link:hover {
    color: #4a5568;
    background: #f7fafc;
}

.form-section { margin-bottom: 32px; text-align: left; }

.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db, transparent);
    margin: 28px 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-divider-title {
    display: flex;
    align-items: center;
    margin: 24px 0 16px 0;
    gap: 12px;
}

.section-divider-title::before,
.section-divider-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #d1d5db);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-divider-title::after {
    background: linear-gradient(to left, transparent, #d1d5db);
}

.section-divider-title span {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    white-space: nowrap;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; text-align: left; }

label {
    display: block;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 14px;
}

.required { color: #e53e3e; }
.help-text { font-size: 13px; color: #a0aec0; margin-top: 6px; line-height: 1.4; }

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.2s;
    background: white;
    color: #2d3748;
}

input[type="color"] { padding: 4px; height: 44px; cursor: pointer; }

input:focus, select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input::placeholder { color: #cbd5e0; }

/* Products */
.products-grid { display: grid; gap: 12px; margin-bottom: 20px; }

.product-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.product-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.product-card.selected {
    border-color: #667eea;
    background: #e6f0ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.product-card.selected-green {
    border-color: #38a169;
    background: #f0fff4;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
}

.product-card.disabled { opacity: 0.6; cursor: not-allowed; }
.product-info { flex: 1; cursor: pointer; }
.product-name { font-weight: 600; color: #2d3748; margin-bottom: 4px; }
.product-description { font-size: 13px; color: #718096; margin-bottom: 4px; }
.product-price { font-weight: 700; color: #667eea; font-size: 18px; }
.product-price.green { color: #38a169; }

.product-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
}

.edit-price-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #edf2f7;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.edit-price-btn:hover {
    background: #667eea;
    transform: scale(1.1);
}

.product-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #cbd5e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
    cursor: pointer;
}

.product-card.selected .product-check {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.product-card.selected-green .product-check {
    background: #38a169;
    border-color: #38a169;
    color: white;
}

.no-price-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-top: 8px;
}

/* Indicação de Produto Parceiro (pode receber desconto) */
.partner-badge {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Indicação de Produto Próprio (preço fixo - não recebe desconto) */
.own-badge {
    font-size: 14px;
    vertical-align: middle;
    margin-left: 4px;
}

.own-info {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    border: 1px solid #6366f1;
    color: #4338ca;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    margin-top: 8px;
    font-weight: 600;
}

/* Result */
.result-card {
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #86efac;
    padding: 24px;
    margin-top: 24px;
    text-align: left;
}

.result-title {
    color: #166534;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.link-container {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    word-break: break-all;
    border: 1px solid #d1fae5;
}

.link-label { font-size: 13px; color: #065f46; font-weight: 600; margin-bottom: 8px; display: block; }
.link-url { color: #667eea; font-weight: 500; font-size: 14px; }

.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }

.copy-btn, .whatsapp-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.copy-btn { background: white; color: #667eea; border: 1px solid #667eea; }
.copy-btn:hover { background: #667eea; color: white; }
.whatsapp-btn { background: #25D366; color: white; }
.whatsapp-btn:hover { background: #1fb855; }

.order-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d1fae5;
    font-size: 13px;
    color: #065f46;
}

.order-info-item { display: flex; justify-content: space-between; margin-bottom: 8px; }
.order-info-label { font-weight: 600; }

/* Total */
.total-section {
    background: #e6f7ff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #91d5ff;
    margin-top: 20px;
}

.total-section.green { background: #f0fff4; border-color: #68d391; }
.total-row { display: flex; justify-content: space-between; align-items: center; }
.total-label { font-weight: 600; color: #1890ff; font-size: 16px; }
.total-label.green { color: #38a169; }
.total-value { font-weight: 700; color: #1890ff; font-size: 20px; }
.total-value.green { color: #38a169; }

/* Promoção / Preço Customizado */
.promo-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px dashed #f59e0b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.promo-header {
    margin-bottom: 12px;
}

.promo-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #92400e;
    font-size: 15px;
}

.promo-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #f59e0b;
}

.promo-fields {
    background: white;
    padding: 16px;
    border-radius: 8px;
    margin-top: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.promo-input-group label {
    color: #92400e;
    font-weight: 600;
    margin-bottom: 8px;
}

.promo-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.promo-input-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #f59e0b;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    color: #92400e;
}

.promo-input-row input:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

/* Resumo do Combo com Desconto */
.combo-summary {
    background: #fffbeb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    border: 1px solid #fcd34d;
}

.combo-summary-title {
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.combo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}

.combo-item-selectable {
    cursor: pointer;
    transition: all 0.2s;
}

.combo-item-selectable:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.combo-item-selectable:has(input:checked) {
    background: #dcfce7;
    border-color: #22c55e;
}

.combo-item-fixed-row {
    background: #f1f5f9;
    border-color: #cbd5e1;
    opacity: 0.8;
}

.combo-item-disabled {
    background: #f1f5f9;
    border-color: #cbd5e1;
    opacity: 0.5;
    cursor: not-allowed;
}

.combo-item-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 10px;
}

.combo-item-info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.combo-item-name {
    font-size: 13px;
    color: #78350f;
    font-weight: 500;
}

.combo-item-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.combo-item-badge.partner {
    background: #dcfce7;
    color: #166534;
}

.combo-item-badge.own {
    background: #e0e7ff;
    color: #4338ca;
}

.combo-item-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.combo-item-original {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 12px;
}

.combo-item-new {
    color: #059669;
    font-weight: 700;
}

.combo-item-fixed {
    color: #64748b;
    font-weight: 600;
}

/* Configuração de modo de desconto */
.discount-mode-config {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.discount-mode-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}

.discount-mode-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.discount-mode-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.discount-mode-option:hover {
    border-color: #f59e0b;
    background: #fffbeb;
}

.discount-mode-option:has(input:checked) {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
}

.discount-mode-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.discount-mode-option.disabled:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.discount-mode-option input[type="radio"] {
    accent-color: #f59e0b;
    margin: 0;
}

.discount-mode-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

/* Seleção rápida */
.combo-select-all {
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid #fcd34d;
}

.combo-select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #78350f;
    font-weight: 600;
}

.combo-select-all-label input {
    accent-color: #22c55e;
}

/* Linha de selecionados */
.combo-selected-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #166534;
    border-top: 1px dashed #22c55e;
    margin-top: 8px;
}

.combo-selected-label {
    font-weight: 500;
}

.combo-selected-value {
    font-weight: 700;
}

.combo-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #f59e0b;
}

.combo-total-label {
    font-size: 14px;
    font-weight: 700;
    color: #92400e;
}

.combo-total-value {
    font-size: 18px;
    font-weight: 800;
    color: #059669;
}

.combo-discount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
}

.combo-discount-label {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
}

.combo-discount-value {
    font-size: 14px;
    font-weight: 700;
    color: #dc2626;
}

.promo-apply-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.promo-apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* Preço Final */
.final-price-section {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.final-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.final-price-label {
    font-weight: 600;
    color: white;
    font-size: 18px;
}

.final-price-value {
    font-weight: 800;
    color: white;
    font-size: 28px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.discount-info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.3);
    color: #d1fae5;
    font-size: 14px;
    font-weight: 500;
}

/* Loading & Error */
.loading { text-align: center; padding: 24px; background: #f7fafc; border-radius: 12px; margin-top: 24px; }

.spinner {
    border: 3px solid #e2e8f0;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text { color: #718096; font-size: 14px; }

.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
}

.success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
}

.info-box {
    background: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.info-box.green { background: #f0fff4; border-color: #68d391; }
.info-box-title { font-weight: 600; color: #0050b3; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.info-box-title.green { color: #22543d; }
.info-box-text { font-size: 14px; color: #1890ff; line-height: 1.5; }
.info-box-text.green { color: #276749; }

/* Collapsible */
.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: background 0.2s;
}

.collapsible-header:hover { background: #edf2f7; }
.collapsible-content { display: none; padding: 0 8px; }
.collapsible-content.show { display: block; animation: fadeIn 0.3s ease; }
.toggle-icon { transition: transform 0.3s; }
.toggle-icon.open { transform: rotate(180deg); }

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

.hidden { display: none !important; }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: white;
    border-radius: 16px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal { transform: scale(1); }

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

.modal-title { font-size: 1.25rem; font-weight: 600; color: #2d3748; display: flex; align-items: center; gap: 8px; }

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f7fafc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover { background: #edf2f7; }

/* Modal de Edição de Preço */
.edit-price-product-info {
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: center;
    border: 1px solid #c3dafe;
}

.edit-price-product-name {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.edit-price-current {
    font-size: 14px;
    color: #4a5568;
}

.edit-price-current strong {
    color: #38a169;
    font-size: 16px;
}

.edit-price-input {
    font-size: 24px !important;
    font-weight: 700 !important;
    text-align: center;
    color: #38a169 !important;
    border: 2px solid #68d391 !important;
}

.edit-price-input:focus {
    border-color: #38a169 !important;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2) !important;
}

/* Histórico de Preços */
.price-history-list {
    max-height: 400px;
    overflow-y: auto;
}

.price-history-item {
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #cbd5e0;
}

.price-history-item.current {
    background: #f0fff4;
    border-left-color: #38a169;
}

.price-history-values {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.price-history-old {
    color: #a0aec0;
    text-decoration: line-through;
    font-size: 14px;
}

.price-history-arrow {
    color: #718096;
}

.price-history-new {
    color: #38a169;
    font-weight: 600;
    font-size: 16px;
}

.price-history-meta {
    font-size: 12px;
    color: #718096;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Add product button */
.add-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #38a169;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s;
    margin-left: 12px;
}

.add-product-btn:hover { background: #2f855a; transform: scale(1.1); }

/* Blocked CPFs */
.blocked-cpf-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
}

.blocked-cpf-item.unblocked { background: #f0fff4; border-color: #9ae6b4; }
.blocked-cpf-info { flex: 1; }
.blocked-cpf-number { font-weight: 600; font-size: 16px; color: #2d3748; font-family: monospace; }
.blocked-cpf-reason { font-size: 13px; color: #718096; margin-top: 4px; }
.blocked-cpf-date { font-size: 12px; color: #a0aec0; margin-top: 4px; }

.blocked-cpf-status { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; margin-right: 10px; }
.blocked-cpf-status.blocked { background: #fed7d7; color: #c53030; }
.blocked-cpf-status.unblocked { background: #c6f6d5; color: #276749; }

.blocked-cpf-actions { display: flex; gap: 8px; }
.blocked-cpf-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-unblock { background: #48bb78; color: white; }
.btn-unblock:hover { background: #38a169; }
.btn-block-again { background: #e53e3e; color: white; }
.btn-block-again:hover { background: #c53030; }
.btn-remove { background: #a0aec0; color: white; }
.btn-remove:hover { background: #718096; }

.empty-list { text-align: center; padding: 40px; color: #a0aec0; }

/* Inline block form */
.inline-block-form {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: #f7fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.inline-input { padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; width: 140px; }
.inline-input-large { flex: 1; }
.inline-input:focus { outline: none; border-color: #e53e3e; }

.inline-btn-block {
    padding: 10px 20px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.inline-btn-block:hover { background: #c53030; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.pagination-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) { background: #f7fafc; border-color: #cbd5e0; }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.pagination-info { color: #718096; font-size: 14px; }

/* ============================================
   LAYOUT DE DUAS COLUNAS
   ============================================ */

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.column-config {
    position: sticky;
    top: 20px;
}

.column-products {
    background: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

/* Filtro de produtos */
.products-filter {
    margin-bottom: 16px;
}

.product-filter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
    background: white;
}

.product-filter-input:focus {
    outline: none;
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.1);
}

.product-filter-input::placeholder {
    color: #a0aec0;
}

/* Grid de produtos com scroll */
.products-grid-scrollable {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.products-grid-scrollable::-webkit-scrollbar {
    width: 6px;
}

.products-grid-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.products-grid-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.products-grid-scrollable::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Paginação de produtos */
.products-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.products-pagination .pagination-btn {
    padding: 8px 14px;
    font-size: 13px;
}

.products-pagination .pagination-info {
    font-size: 13px;
    color: #718096;
    min-width: 100px;
    text-align: center;
}

/* Contagem de selecionados */
.selected-count {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    border-radius: 8px;
    text-align: center;
}

.selected-count span {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

/* Ajuste do section-title com action */
.section-title-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================
   CAMPOS DE RECORRÊNCIA
   ============================================ */

.recurrence-toggle {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 2px solid #f9a8d4;
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.recurrence-toggle:has(input:checked) {
    background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    border-color: #ec4899;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: none;
    margin-bottom: 0;
}

/* Ajuste para múltiplos toggles de recorrência seguidos */
.recurrence-toggle + .recurrence-toggle {
    margin-top: 0;
    border-top: 1px dashed #f9a8d4;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.recurrence-toggle + .recurrence-toggle:has(input:checked) {
    border-top: 1px dashed #ec4899;
}

.recurrence-checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #9d174d;
    font-size: 15px;
}

.recurrence-checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    cursor: pointer;
    accent-color: #ec4899;
}

.recurrence-checkbox-text {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recurrence-toggle .help-text {
    margin-top: 8px;
    margin-left: 34px;
    color: #9d174d;
    opacity: 0.8;
}

.recurrence-fields {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border: 2px solid #ec4899;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    margin-top: -2px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recurrence-info-box {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #9d174d;
    border: 1px solid #f9a8d4;
}

.recurrence-info-box span {
    font-size: 16px;
}

/* Seletor de modo de recorrência */
.recurrence-mode-selector {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.recurrence-mode-option {
    flex: 1;
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
    background: white;
}

.recurrence-mode-option:hover {
    border-color: #ec4899;
    background: #fdf2f8;
}

.recurrence-mode-option.selected {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.recurrence-mode-option input {
    display: none;
}

.recurrence-mode-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.recurrence-mode-icon {
    font-size: 28px;
}

.recurrence-mode-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.recurrence-mode-desc {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.payment-methods-inline {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.payment-methods-inline label {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 13px;
}

.recurrence-fields .form-group label {
    color: #9d174d;
}

.recurrence-fields input,
.recurrence-fields select {
    border-color: #f9a8d4;
}

.recurrence-fields input:focus,
.recurrence-fields select:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.recurrence-fields .help-text {
    color: #9d174d;
    opacity: 0.7;
}

/* Checkboxes de Métodos de Pagamento (em linha) */
.payment-methods-checkboxes-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-method-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 100px;
}

.payment-method-checkbox:hover {
    border-color: #38a169;
    background: #f0fff4;
}

.payment-method-checkbox:has(input:checked) {
    border-color: #38a169;
    background: linear-gradient(135deg, #f0fff4 0%, #dcfce7 100%);
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.15);
}

.payment-method-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #38a169;
    cursor: pointer;
}

.payment-method-checkbox span {
    font-weight: 600;
    color: #4b5563;
    font-size: 14px;
    white-space: nowrap;
}

.payment-method-checkbox:has(input:checked) span {
    color: #166534;
}

/* Métodos de Pagamento da Recorrência */
.recurrence-payment-methods {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.recurrence-method-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #f9a8d4;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 160px;
}

.recurrence-method-checkbox:hover {
    border-color: #ec4899;
    background: #fdf2f8;
}

.recurrence-method-checkbox:has(input:checked) {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.recurrence-method-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ec4899;
    cursor: pointer;
}

.recurrence-method-checkbox .method-icon {
    font-size: 20px;
}

.recurrence-method-checkbox .method-label {
    font-weight: 600;
    color: #4b5563;
    font-size: 14px;
}

.recurrence-method-checkbox:has(input:checked) .method-label {
    color: #9d174d;
}

/* Tipos de Cobrança */
.billing-type-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 768px) {
    .billing-type-options {
        grid-template-columns: 1fr;
    }
}

.billing-type-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.billing-type-option:hover {
    border-color: #f9a8d4;
    background: #fdf2f8;
}

.billing-type-option:has(input:checked) {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.billing-type-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #ec4899;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.billing-type-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.billing-type-header {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 4px;
}

.billing-type-icon {
    display: none;
}

.billing-type-name {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.billing-type-option:has(input:checked) .billing-type-name {
    color: #9d174d;
}

.billing-type-desc {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

.billing-type-desc strong {
    color: #ec4899;
}

/* Campo de Dia de Cobrança */
.billing-day-field {
    margin-top: 12px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-radius: 10px;
    border: 2px solid #f9a8d4;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.billing-day-field label {
    color: #9d174d;
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    white-space: nowrap;
}

.billing-day-field input {
    border-color: #f9a8d4;
    max-width: 80px;
    padding: 8px 12px;
    text-align: center;
    font-weight: 600;
    margin: 0;
}

.billing-day-field input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.15);
}

.billing-day-field .help-text {
    margin: 0;
    font-size: 12px;
}

@media (max-width: 600px) {
    .recurrence-payment-methods {
        flex-direction: column;
    }
    
    .recurrence-method-checkbox {
        min-width: auto;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .two-column-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .column-config {
        position: static;
    }
    
    .column-products {
        order: -1; /* Produtos aparecem primeiro no mobile */
    }
    
    .products-grid-scrollable {
        max-height: 300px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column-reverse;
        align-items: center;
        gap: 16px;
    }
    
    .page-header-left {
        text-align: center;
    }
    
    .page-header-left .back-link {
        justify-content: center;
    }
    
    .page-header-left h1 {
        text-align: center;
    }
    
    .page-header-left .subtitle {
        text-align: center;
    }
    
    .page-header-right .logo img {
        max-width: 100px;
    }
}

@media (max-width: 600px) {
    .container { padding: 40px 30px; }
    .container.container-wide { padding: 30px 20px; }
    h1 { font-size: 1.75rem; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .action-buttons { grid-template-columns: 1fr; }
    .inline-block-form { flex-direction: column; }
    .inline-input { width: 100%; }
    
    .column-products {
        padding: 16px;
    }
    
    .products-pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-header-right .logo img {
        max-width: 80px;
    }
}

