/* CashFlow.ai - Working Capital Forecaster Styles */

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
}

.tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tool-header h1 i {
    margin-right: 0.5rem;
    color: var(--accent);
}

/* Cash Position Cards */
.cash-position {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.cash-card {
    background: var(--white, #fff);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--neu-shadow-dark), var(--neu-shadow-light);
}

.cash-card .cash-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.cash-card.current .cash-icon {
    background: linear-gradient(135deg, #6c63ff 0%, #4a42e4 100%);
}

.cash-card.incoming .cash-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.cash-card.outgoing .cash-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.cash-card.forecast .cash-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.cash-info {
    display: flex;
    flex-direction: column;
}

.cash-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.cash-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
}

/* Crunch Alert */
.crunch-alert {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.crunch-alert .alert-icon {
    font-size: 2.5rem;
    color: #f59e0b;
}

.crunch-alert .alert-content {
    flex: 1;
}

.crunch-alert .alert-content h4 {
    font-size: 1.25rem;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.crunch-alert .alert-content p {
    color: #b45309;
    margin: 0;
}

/* Timeline Section */
.timeline-section {
    background: var(--white, #fff);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--neu-shadow-dark), var(--neu-shadow-light);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-header h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-filters {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 50px;
    background: var(--bg-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn.active {
    background: var(--accent);
    color: white;
}

.timeline-list {
    max-height: 400px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    background: var(--bg-primary);
    transition: all 0.2s;
}

.timeline-item:hover {
    transform: translateX(5px);
}

.timeline-item .item-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.1rem;
}

.timeline-item.payout .item-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.timeline-item.expense .item-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.timeline-item.inventory .item-icon {
    background: rgba(108, 99, 255, 0.1);
    color: var(--accent);
}

.timeline-item .item-info {
    flex: 1;
}

.timeline-item .item-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.timeline-item .item-info p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

.timeline-item .item-amount {
    font-size: 1.1rem;
    font-weight: 700;
}

.timeline-item .item-amount.positive {
    color: var(--success);
}

.timeline-item .item-amount.negative {
    color: var(--danger);
}

/* Forecast Cards */
.forecast-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.forecast-card {
    background: var(--white, #fff);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--neu-shadow-dark), var(--neu-shadow-light);
}

.forecast-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forecast-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.forecast-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
}

.forecast-stat .stat-label {
    color: var(--text-light);
    font-size: 0.85rem;
}

.forecast-stat .stat-value {
    font-weight: 700;
}

.forecast-stat .stat-value.positive {
    color: var(--success);
}

.forecast-stat .stat-value.negative {
    color: var(--danger);
}

/* Reorder Section */
.reorder-section {
    background: var(--white, #fff);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--neu-shadow-dark), var(--neu-shadow-light);
}

.reorder-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reorder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.reorder-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border-left: 4px solid var(--accent);
}

.reorder-card h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.reorder-card .stock-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.reorder-card .recommendation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--white, #fff);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.reorder-card .recommendation i {
    color: var(--success);
}

/* Modal Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    box-shadow: var(--neu-shadow-dark), var(--neu-shadow-light);
    font-family: var(--font-body);
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid var(--accent);
}

/* Chart Container */
.chart-container.large {
    height: 300px;
}

.chart-card.wide {
    grid-column: 1 / -1;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .cash-position {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .forecast-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 1.75rem;
    }
    
    .cash-position {
        grid-template-columns: 1fr;
    }
    
    .cash-card {
        flex-direction: column;
        text-align: center;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .crunch-alert {
        flex-direction: column;
        text-align: center;
    }
}