﻿/* ============================================
   e-SendBill - Enviar Cobrança
   CSS para Send.cshtml
   Paleta: Cinza e Laranja (#ff8c00, #e94e1b)
   ============================================ */

/* Container principal */
.collections-send {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem;
    background-color: white;
    box-sizing: border-box;
}

/* ========== HEADER ========== */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-orange {
    background: #ff8c00;
    color: white;
}

.badge-green {
    background: #4caf50;
    color: white;
}

.page-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* ========== ANIMATIONS ========== */
.fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== DEBTOR CARD ========== */
.debtor-card {
    background: linear-gradient(135deg, #fff8f0 0%, #fff4e6 100%);
    border: 1px solid #ffe0b2;
    border-left: 4px solid #ff8c00;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.debtor-card-title {
    font-size: 0.65rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.debtor-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.debtor-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff8c00, #e67e00);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 3px 10px rgba(255, 140, 0, 0.3);
    flex-shrink: 0;
}

.debtor-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.debtor-id {
    font-size: 0.75rem;
    color: #666;
    font-family: 'SF Mono', 'Courier New', monospace;
}

/* ========== FORM SECTION ========== */
.form-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 0.35rem;
    letter-spacing: 0.3px;
}

.required {
    color: #ff8c00;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
    background: white;
    color: #333;
    box-sizing: border-box;
}

    .form-input:focus {
        outline: none;
        border-color: #ff8c00;
        box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.1);
    }

    .form-input::placeholder {
        color: #bbb;
    }

    .form-input.error {
        border-color: #c62828;
    }

.calculated-field {
    background: #e8f5e9 !important;
    border-color: #4caf50 !important;
    color: #2e7d32 !important;
    font-weight: 600;
}

.form-helper {
    font-size: 0.65rem;
    color: #999;
    margin-top: 0.25rem;
    display: block;
}

.validation-error {
    color: #c62828;
    font-size: 0.65rem;
    margin-top: 0.25rem;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* ========== INFO BANNER ========== */
.info-banner {
    background: linear-gradient(135deg, #fff8f0 0%, #fff4e6 100%);
    border-left: 4px solid #ff8c00;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-banner-text {
    flex: 1;
}

.info-banner-title {
    font-weight: 700;
    color: #e67e00;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.info-banner-description {
    color: #666;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ========== ERROR BANNER ========== */
.error-banner {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-left: 4px solid #c62828;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.error-banner-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.error-banner-content {
    flex: 1;
}

.error-banner-title {
    font-weight: 700;
    color: #c62828;
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
}

.error-banner-text {
    color: #b71c1c;
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ========== PREVIEW PARCELAS ========== */
.preview-section {
    background: #f8f9fa;
    border: 1px dashed #ddd;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.preview-title {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.preview-item {
    background: white;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

    .preview-item.preview-more {
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.preview-item-label {
    font-size: 0.6rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
}

.preview-item-value {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

.preview-item-date {
    font-size: 0.65rem;
    color: #999;
    margin-top: 0.2rem;
}

/* ========== SUMMARY SECTION ========== */
.summary-section {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.summary-title {
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    text-align: center;
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.summary-label {
    font-size: 0.6rem;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
}

.summary-value {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

    .summary-value.highlight {
        font-size: 1.25rem;
        color: #ff8c00;
    }

/* ========== BUTTON GROUP FOOTER ========== */
.btn-group-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.btn {
    flex: 1;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    text-decoration: none;
}

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

.btn-primary {
    background: linear-gradient(135deg, #ff8c00, #e67e00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
}

    .btn-primary:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
    }

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
}

    .btn-secondary:hover:not(:disabled) {
        border-color: #ff8c00;
        color: #ff8c00;
    }

/* ========== SPINNER ========== */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

/* ========== FOOTER INFO ========== */
.footer-info {
    text-align: center;
    margin-top: 1rem;
}

.footer-text {
    font-size: 0.75rem;
    color: #999;
    margin: 0;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 768px) {
    .collections-send {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .collections-send {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .preview-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .btn-group-footer {
        flex-direction: column;
    }
}
