/* Orcamentos Page Styles */

.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
    margin-bottom: 16px;
}

.month-nav .btn-month {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #dce3ed);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary, #1e293b);
    transition: all 0.2s;
}

.month-nav .btn-month:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
    border-color: var(--primary-color, #3b82f6);
}

.month-nav #currentMonth {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    min-width: 160px;
    text-align: center;
}

/* Resumo Card */
.resumo-card {
    background: linear-gradient(135deg, var(--primary-color, #3b82f6), #2563eb);
    border-radius: 16px;
    padding: 20px;
    color: white;
    margin-bottom: 24px;
}

.resumo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.resumo-label {
    font-size: 14px;
    opacity: 0.9;
}

.btn-copy {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: rgba(255, 255, 255, 0.3);
}

.resumo-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.resumo-item {
    text-align: center;
}

.resumo-item .item-label {
    display: block;
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.resumo-item .item-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
}

.resumo-item .item-value::before {
    content: '\20AC';
    margin-right: 2px;
}

.resumo-item .item-value.gasto {
    color: #fecaca;
}

.resumo-item .item-value.disponivel {
    color: #bbf7d0;
}

.resumo-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.warning {
    background: #fbbf24;
}

.progress-fill.danger {
    background: #ef4444;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    min-width: 45px;
    text-align: right;
}

/* Orcamentos List */
.orcamentos-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.orcamento-card {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color, #dce3ed);
}

.orcamento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.orcamento-categoria {
    display: flex;
    align-items: center;
    gap: 10px;
}

.categoria-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.categoria-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
    margin: 0;
}

.categoria-info .limite {
    font-size: 13px;
    color: var(--text-secondary, #64748b);
}

.categoria-info .limite::before {
    content: 'Limite: \20AC';
}

.orcamento-actions {
    display: flex;
    gap: 8px;
}

.orcamento-actions button {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.orcamento-actions button:hover {
    opacity: 1;
}

.orcamento-progress {
    margin-bottom: 8px;
}

.orcamento-progress .progress-bar {
    height: 10px;
    background: var(--bg-secondary, #e8edf5);
    border-radius: 5px;
    overflow: hidden;
}

.orcamento-progress .progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.orcamento-progress .progress-fill.ok {
    background: #10b981;
}

.orcamento-progress .progress-fill.warning {
    background: #f59e0b;
}

.orcamento-progress .progress-fill.danger {
    background: #ef4444;
}

.orcamento-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orcamento-valores {
    display: flex;
    gap: 16px;
}

.valor-item {
    font-size: 13px;
}

.valor-item .label {
    color: var(--text-secondary, #64748b);
}

.valor-item .value {
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.valor-item .value.gasto {
    color: #ef4444;
}

.valor-item .value.disponivel {
    color: #10b981;
}

.valor-item .value.negativo {
    color: #ef4444;
}

.orcamento-percentagem {
    font-size: 20px;
    font-weight: 700;
}

.orcamento-percentagem.ok {
    color: #10b981;
}

.orcamento-percentagem.warning {
    color: #f59e0b;
}

.orcamento-percentagem.danger {
    color: #ef4444;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ok {
    background: var(--status-ok-bg, #d1fae5);
    color: var(--status-ok-text, #059669);
}

.status-badge.warning {
    background: var(--status-warning-bg, #fef3c7);
    color: var(--status-warning-text, #d97706);
}

.status-badge.danger {
    background: var(--status-danger-bg, #fee2e2);
    color: var(--status-danger-text, #dc2626);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #64748b);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-primary, #1e293b);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

/* Form Help */
.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-secondary, #64748b);
    margin-top: 4px;
}

/* Mobile Optimizations */
@media (max-width: 480px) {
    .resumo-values {
        gap: 8px;
    }

    .resumo-item .item-value {
        font-size: 16px;
    }

    .orcamento-valores {
        flex-direction: column;
        gap: 4px;
    }

    .orcamento-percentagem {
        font-size: 18px;
    }
}

/* Dark Mode via [data-theme="dark"] */
[data-theme="dark"] .month-nav .btn-month {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .month-nav #currentMonth {
    color: var(--text-primary);
}

[data-theme="dark"] .orcamento-card {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .categoria-info h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .valor-item .value {
    color: var(--text-primary);
}

[data-theme="dark"] .empty-state h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .orcamento-progress .progress-bar {
    background: var(--bg-secondary);
}
