/* ============================================
   Recurring Transactions Page Styles
   ============================================ */

.recorrentes-page {
    max-width: 800px;
    padding-bottom: 100px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    flex: 1;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: var(--hover-bg);
    transform: scale(1.05);
}

.btn-header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-header-action:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.btn-header-action i {
    width: 20px;
    height: 20px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.summary-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.summary-icon i {
    width: 22px;
    height: 22px;
    color: white;
}

.summary-card.receitas .summary-icon {
    background: linear-gradient(135deg, var(--success), var(--success-light));
}

.summary-card.despesas .summary-icon {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
}

.summary-card.saldo .summary-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
}

.summary-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.summary-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-card.receitas .summary-value {
    color: var(--success);
}

.summary-card.despesas .summary-value {
    color: var(--danger);
}

/* Pending Alert */
.pending-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--warning);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.alert-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--warning);
    border-radius: 10px;
    flex-shrink: 0;
}

.alert-icon i {
    width: 20px;
    height: 20px;
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.alert-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Recorrentes List */
.recorrentes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Recurring Item Card */
.recurring-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.recurring-item:hover {
    box-shadow: var(--shadow-md);
}

.recurring-item.inactive {
    opacity: 0.6;
}

.recurring-item.paused {
    border-left: 3px solid var(--warning);
}

.recurring-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.recurring-icon i,
.recurring-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.recurring-info {
    flex: 1;
    min-width: 0;
}

.recurring-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recurring-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.recurring-frequency {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.recurring-frequency i {
    width: 14px;
    height: 14px;
}

.recurring-next {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.recurring-next i {
    width: 14px;
    height: 14px;
}

.recurring-value {
    text-align: right;
    flex-shrink: 0;
}

.recurring-amount {
    font-size: 1.125rem;
    font-weight: 700;
}

.recurring-amount.receita {
    color: var(--success);
}

.recurring-amount.despesa {
    color: var(--danger);
}

.recurring-category {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.recurring-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
}

.recurring-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.recurring-action-btn i {
    width: 18px;
    height: 18px;
}

.recurring-action-btn:hover {
    background: var(--hover-bg);
}

.recurring-action-btn.play:hover {
    color: var(--success);
}

.recurring-action-btn.edit:hover {
    color: var(--primary);
}

.recurring-action-btn.delete:hover {
    color: var(--danger);
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
}

.empty-state > i {
    width: 64px;
    height: 64px;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-lg), 0 4px 12px rgba(59, 130, 246, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 90;
}

.fab i {
    width: 24px;
    height: 24px;
}

.fab:hover {
    transform: scale(1.05);
}

@supports (bottom: env(safe-area-inset-bottom)) {
    .fab {
        bottom: calc(24px + env(safe-area-inset-bottom));
    }
}

/* Modal Styles */
.modal-small {
    max-width: 400px;
}

.modal-body {
    padding: 0 1.5rem 1.5rem;
}

.delete-warning {
    text-align: center;
}

.delete-warning i {
    width: 48px;
    height: 48px;
    color: var(--warning);
    margin-bottom: 1rem;
}

.delete-warning p {
    margin: 0 0 0.5rem;
    color: var(--text-primary);
}

.delete-warning .text-muted {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Type Selector */
.type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.type-option {
    cursor: pointer;
}

.type-option input {
    display: none;
}

.type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.type-card i {
    width: 24px;
    height: 24px;
}

.type-card span {
    font-size: 0.875rem;
    font-weight: 600;
}

.type-option input:checked + .type-card {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.1);
}

.type-card.despesa i {
    color: var(--danger);
}

.type-card.receita i {
    color: var(--success);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--text-primary);
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

/* Responsive Design */
@media (max-width: 640px) {
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .summary-card {
        padding: 0.875rem;
    }

    .pending-alert {
        flex-direction: column;
        text-align: center;
    }

    .recurring-item {
        flex-wrap: wrap;
    }

    .recurring-info {
        width: calc(100% - 60px);
    }

    .recurring-value {
        width: 100%;
        text-align: left;
        padding-left: 60px;
        margin-top: -0.5rem;
    }

    .recurring-actions {
        width: 100%;
        justify-content: flex-end;
        padding-top: 0.75rem;
        margin-top: 0.75rem;
        border-top: 1px solid var(--border-color);
    }

    .fab {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
}
