/* Enhanced Budget Calculator Styles */

/* ING Integration Styles */
.ing-integration {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.ing-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 10px;
}

.ing-status.connected {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ing-status.disconnected {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ing-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ing-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.ing-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.ing-btn.connect {
    background-color: #ff6200;
    color: white;
}

.ing-btn.connect:hover:not(:disabled) {
    background-color: #e55a00;
}

.ing-btn.refresh {
    background-color: #007bff;
    color: white;
}

.ing-btn.refresh:hover:not(:disabled) {
    background-color: #0056b3;
}

.ing-btn.disconnect {
    background-color: #6c757d;
    color: white;
}

.ing-btn.disconnect:hover:not(:disabled) {
    background-color: #545b62;
}

.ing-btn.loading {
    position: relative;
    color: transparent;
}

.ing-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    color: white;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ING Notification Styles */
.ing-notification {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 0.9em;
    animation: slideIn 0.3s ease-out;
}

.ing-notification.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ing-notification.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.ing-notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ing-buttons {
        flex-direction: column;
    }
    
    .ing-btn {
        width: 100%;
        text-align: center;
    }
}
.redesigned-budget {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.budget-content {
    padding: 0;
}

.budget-layout-redesigned {
    padding: 24px;
}

.budget-input-section {
    margin-bottom: 24px;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-group label i {
    color: #3b82f6;
    font-size: 0.875rem;
}

.input-group input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    background: white;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-group input::placeholder {
    color: #94a3b8;
}

.calculate-btn-redesigned {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calculate-btn-redesigned:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.calculate-btn-redesigned:active {
    transform: translateY(0);
}

.budget-results-redesigned {
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.budget-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
}

.summary-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.summary-item.income {
    border-left: 4px solid #10b981;
}

.summary-item.expenses {
    border-left: 4px solid #ef4444;
}

.summary-item.remaining {
    border-left: 4px solid #3b82f6;
}

.summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.income .summary-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.expenses .summary-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.remaining .summary-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.summary-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.summary-amount {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
}

.summary-amount.positive {
    color: #10b981;
}

.summary-amount.negative {
    color: #ef4444;
}

.bills-preview {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.bills-preview:empty::before {
    content: "No bills data available";
    color: #94a3b8;
    font-style: italic;
    display: block;
    text-align: center;
    padding: 20px;
}

/* Enhanced Bill Item Styles */
.bill-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.bill-item:hover {
    background: #f1f5f9;
    transform: translateX(2px);
}

.bill-item.overdue {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.bill-item.due {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.bill-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bill-name {
    font-weight: 600;
    color: white !important;
    font-size: 0.875rem;
}

.bill-name:hover,
.bill-name:active,
.bill-name:focus,
.bill-item:hover .bill-name,
.bill-item:active .bill-name,
.bill-item.clicked .bill-name {
    color: white !important;
}

.bill-due-date {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.bill-due-date.overdue {
    color: #ef4444;
    font-weight: 600;
}

.bill-due-date.due {
    color: #f59e0b;
    font-weight: 600;
}

.bill-amount {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.875rem;
}

.bill-amount.overdue {
    color: #ef4444;
}

.bill-amount.due {
    color: #f59e0b;
}

.no-bills-message {
    text-align: center;
    color: #94a3b8;
    font-style: italic;
    padding: 20px;
}

.input-with-currency.enhanced {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-currency.enhanced .currency-symbol {
    position: absolute;
    left: 16px;
    color: var(--primary-color);
    font-weight: 700;
    z-index: 2;
    font-size: 16px;
}

.input-with-currency.enhanced input {
    width: 100%;
    padding: 16px 16px 16px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.input-with-currency.enhanced input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.calculate-btn.enhanced {
    width: 100%;
    padding: 0;
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 56px;
}

.calculate-btn.enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.calculate-btn.enhanced:hover .btn-glow {
    left: 100%;
}

/* Results Panel Styles */
.budget-results-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(10px);
    animation: slideInRight 0.5s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.budget-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.budget-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.budget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.budget-card.income-card {
    border-left: 4px solid var(--success);
}

.budget-card.expenses-card {
    border-left: 4px solid #ef4444;
}

.budget-card.remaining-card {
    border-left: 4px solid var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.income-card .card-icon {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.expenses-card .card-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.remaining-card .card-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.card-content {
    flex: 1;
}

.card-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.card-amount {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card-amount.positive {
    color: var(--success);
}

.card-amount.negative {
    color: #ef4444;
}

.breakdown-header h4 {
    margin: 0 0 16px 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.breakdown-header i {
    color: var(--primary-color);
}

.bills-container {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

.bills-container::-webkit-scrollbar {
    width: 6px;
}

.bills-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.bills-container::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 3px;
}

/* Responsive Design for Enhanced Budget Calculator */
@media (max-width: 1024px) {
    .budget-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .budget-content {
        padding: 24px !important;
    }
}

@media (max-width: 768px) {
    .budget-widget {
        margin: 0 -16px;
    }
    
    .budget-content {
        padding: 20px !important;
    }
    
    .budget-input-panel,
    .budget-results-panel {
        padding: 20px;
    }
    
    .widget-title-text h3 {
        font-size: 1.25rem;
    }
    
    .input-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .budget-summary {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}