/* 
 * Facturación Inteligente CSS - CRM Dentistas iA
 * Estilos específicos para la landing de facturación inteligente
 */

/* Invoice Demo Styles - Hero Section */
.invoice-demo {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    overflow: hidden;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.invoice-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.invoice-logo h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #212529;
    font-weight: 600;
}

.invoice-details {
    display: flex;
    gap: 20px;
}

.invoice-id, .invoice-date {
    display: flex;
    flex-direction: column;
}

.invoice-id span, .invoice-date span {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 2px;
}

.invoice-id strong, .invoice-date strong {
    font-size: 1rem;
    color: #212529;
}

.invoice-client {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.client-info h4 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #6c757d;
}

.client-info p {
    margin: 0 0 5px;
    font-size: 0.9rem;
    color: #212529;
}

.payment-status {
    text-align: right;
}

.status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

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

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

.status.overdue {
    background-color: #f8d7da;
    color: #721c24;
}

.due-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.invoice-items {
    padding: 20px;
}

.invoice-items table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-items th {
    text-align: left;
    padding: 10px;
    font-size: 0.9rem;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.invoice-items td {
    padding: 10px;
    font-size: 0.9rem;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
}

.invoice-items tbody tr:last-child td {
    border-bottom: none;
}

.invoice-items tfoot {
    border-top: 2px solid #dee2e6;
}

.invoice-items tfoot td {
    font-weight: 600;
    color: #212529;
}

.invoice-items tfoot td:last-child {
    font-size: 1.1rem;
    color: #007bff;
}

.invoice-actions {
    padding: 15px 20px;
    background-color: #e9f5ff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #d0e6f7;
}

.ai-recommendation {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #0056b3;
    padding: 5px 12px;
    border-radius: 20px;
    background-color: rgba(0, 123, 255, 0.1);
}

.ai-recommendation.active {
    animation: pulse-light 2s infinite;
}

@keyframes pulse-light {
    0% { background-color: rgba(0, 123, 255, 0.1); }
    50% { background-color: rgba(0, 123, 255, 0.2); }
    100% { background-color: rgba(0, 123, 255, 0.1); }
}

.ai-recommendation i {
    color: #007bff;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background-color: #f8f9fa;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.btn-icon.primary {
    background-color: #007bff;
    color: white;
}

/* Payment Analytics Demo Styles */
.payment-analytics-demo {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 100%;
}

.analytics-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.analytics-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #212529;
}

.analytics-body {
    padding: 20px;
}

.chart-container {
    margin-bottom: 25px;
}

.chart-title {
    font-size: 1rem;
    color: #495057;
    margin-bottom: 15px;
    font-weight: 500;
    text-align: center;
}

.pie-chart {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background-color: #fff;
    overflow: hidden;
}

.chart-segment {
    position: absolute;
    width: 100%;
    height: 100%;
    clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 0 100%, 0 0, 50% 0);
    transform-origin: 50% 50%;
    background-color: var(--color);
    transition: transform 1s ease-in-out;
}

.chart-segment:nth-child(1) {
    z-index: 4;
    transform: rotate(0deg);
    clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%);
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
}

.chart-segment:nth-child(2) {
    z-index: 3;
    transform: rotate(162deg);
    clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%);
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
}

.chart-segment:nth-child(3) {
    z-index: 2;
    transform: rotate(252deg);
    clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%);
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
}

.chart-segment:nth-child(4) {
    z-index: 1;
    transform: rotate(306deg);
    clip-path: polygon(50% 50%, 50% 0, 100% 0, 100% 100%, 50% 100%);
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
}

.chart-center {
    position: absolute;
    width: 60%;
    height: 60%;
    background-color: white;
    border-radius: 50%;
    top: 20%;
    left: 20%;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    color: #495057;
    margin-right: 10px;
}

.color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.analytics-metrics {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.metric {
    flex: 1;
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.metric-title {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 5px;
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 5px;
}

.metric-trend {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 20px;
}

.metric-trend.positive {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.metric-trend.negative {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Reminder System Demo Styles */
.reminder-system-demo {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 100%;
}

.reminder-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.reminder-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #212529;
}

.reminder-body {
    padding: 20px;
}

.reminders-list {
    margin-bottom: 20px;
}

.reminder-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
}

.reminder-item:last-child {
    margin-bottom: 0;
}

.reminder-item.scheduled {
    border-left: 4px solid #007bff;
}

.reminder-item.sent {
    border-left: 4px solid #ffc107;
}

.reminder-item.paid {
    border-left: 4px solid #28a745;
}

.reminder-status {
    margin-right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reminder-item.scheduled .reminder-status {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.reminder-item.sent .reminder-status {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.reminder-item.paid .reminder-status {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.reminder-content {
    flex: 1;
}

.reminder-content h5 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: #212529;
}

.reminder-content p {
    margin: 0 0 3px;
    font-size: 0.9rem;
    color: #495057;
}

.reminder-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.reminder-amount {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    white-space: nowrap;
}

.ai-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background-color: #e9f5ff;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #0056b3;
}

.ai-suggestion i {
    color: #007bff;
    font-size: 1.1rem;
}

.ai-suggestion.active {
    border: 1px solid rgba(0, 123, 255, 0.3);
    animation: pulse-light 2s infinite;
}

/* Integration Demo Styles */
.integration-demo {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    max-width: 100%;
}

.integration-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.integration-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #212529;
}

.integration-body {
    padding: 25px 20px;
}

.integration-flow {
    display: flex;
    flex-direction: column;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
}

.flow-step.active {
    background-color: #e9f5ff;
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.flow-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.flow-step.active .flow-icon {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.1);
}

.flow-content h5 {
    margin: 0 0 5px;
    font-size: 1rem;
    color: #212529;
}

.flow-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
}

.flow-arrow {
    display: flex;
    justify-content: center;
    padding: 5px 0;
    color: #adb5bd;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .invoice-demo,
    .payment-analytics-demo,
    .reminder-system-demo,
    .integration-demo {
        margin-top: 30px;
    }
    
    .invoice-header,
    .invoice-client {
        flex-direction: column;
    }
    
    .invoice-details,
    .payment-status {
        margin-top: 15px;
    }
    
    .analytics-metrics {
        flex-direction: column;
    }
    
    .metric {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    .chart-legend {
        flex-direction: column;
    }
    
    .invoice-items table {
        display: block;
        overflow-x: auto;
    }
    
    .reminder-item {
        flex-direction: column;
    }
    
    .reminder-status {
        margin-bottom: 10px;
    }
    
    .reminder-amount {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .action-buttons {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .btn-icon {
        width: 30px;
        height: 30px;
    }
}
