/* ============================================
   SUBSCRIPTION DETAILS MODAL
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.modal-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.modal-large {
    max-width: 1200px;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.modal-header {
    padding: 24px 28px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header h2 i {
    font-size: 28px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ============================================
   SUBSCRIPTION DETAILS STYLES
   ============================================ */

/* Container Principal */
.subscription-details-container {
    padding: 0;
}

/* Estados de Loading e Erro */
.loading-state,
.error-state,
.no-subscription-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.loading-state i,
.error-state i,
.no-subscription-state i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.error-state {
    color: #dc3545;
}

.error-state i {
    color: #dc3545;
}

.no-subscription-state i {
    color: #17a2b8;
}

/* Seções */
.detail-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.detail-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.detail-section h5 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-section h5 i {
    color: #667eea;
    font-size: 20px;
}

/* Grid de Detalhes */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: #e9ecef;
}

.detail-label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge i {
    font-size: 12px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.badge-dark {
    background-color: #d6d8db;
    color: #1b1e21;
}

/* Cartão de Método de Pagamento */
.payment-method-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.card-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

.card-brand i {
    font-size: 32px;
}

.card-number {
    font-size: 22px;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
    margin-bottom: 12px;
}

.card-expiry {
    font-size: 14px;
    opacity: 0.9;
}

/* Próxima Fatura */
.upcoming-invoice {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.invoice-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.amount-label {
    font-size: 14px;
    opacity: 0.9;
}

.amount-value {
    font-size: 28px;
    font-weight: 700;
}

.invoice-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.95;
}

/* Uso de Propriedades */
.properties-usage {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat {
    text-align: center;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.usage-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.usage-progress {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 12px;
}

.usage-percentage {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    font-weight: 600;
}

/* Estatísticas de Pagamento */
.payment-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.success {
    background: #d4edda;
    color: #28a745;
}

.stat-icon.danger {
    background: #f8d7da;
    color: #dc3545;
}

.stat-icon.info {
    background: #d1ecf1;
    color: #17a2b8;
}

.stat-info .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-info .stat-label {
    font-size: 13px;
    color: #6c757d;
    margin-top: 4px;
}

/* Último Pagamento */
.last-payment {
    padding: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 14px;
}

.last-payment i {
    font-size: 18px;
}

.last-payment.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.last-payment.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Tabela de Faturas */
.invoices-table {
    overflow-x: auto;
}

.invoices-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.invoices-table thead {
    background: #f8f9fa;
}

.invoices-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.invoices-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
    font-size: 14px;
    color: #2c3e50;
}

.invoices-table tr:hover {
    background: #f8f9fa;
}

.invoices-table .text-center {
    text-align: center;
    padding: 32px;
    color: #6c757d;
    font-style: italic;
}

/* Botões */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: #667eea;
    color: #fff;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-container {
        max-height: 95vh;
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 16px 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .usage-stats {
        grid-template-columns: 1fr;
    }
    
    .payment-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-section {
        padding: 16px;
    }
    
    .payment-method-card,
    .upcoming-invoice {
        padding: 16px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .invoices-table {
        font-size: 12px;
    }
    
    .invoices-table th,
    .invoices-table td {
        padding: 8px;
    }
}

