/**
 * IRA Cash Deployment Engine CSS
 * Phase 2: Cash Deployment Engine
 * WCAG 2.1 AA Compliant
 * Matches dashboard.php design system
 */

/* Deployment Steps */
.deployment-step {
    display: none;
}

.deployment-step.active {
    display: block;
}

.deployment-step.hidden {
    display: none;
}

.step-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.step-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary, #e2e8f0);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.step-header p {
    color: var(--text-secondary, #94a3b8);
    font-size: 1rem;
}

/* Configuration Form */
.config-form {
    margin-top: 2rem;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .config-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.config-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.config-card.roth-card {
    border-top: 4px solid #029D6E; /* Green for Roth */
}

.config-card.traditional-card {
    border-top: 4px solid #3b82f6; /* Blue for Traditional */
}

.config-card.brokerage-card {
    border-top: 4px solid #fbbf24; /* Yellow for Brokerage */
}

.config-card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.config-card-header h3 {
    font-size: 1.25rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin: 0;
}

.config-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-fields .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-fields label {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.9rem;
    font-weight: 500;
}

.config-fields input {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 6px;
    color: var(--text-primary, #e2e8f0);
    font-size: 1rem;
    transition: all 0.2s;
}

.config-fields input:focus {
    outline: none;
    border-color: #029D6E;
    box-shadow: 0 0 0 2px rgba(2, 157, 110, 0.2);
}

.config-fields input:hover {
    border-color: rgba(148, 163, 184, 0.4);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-generate {
    background: linear-gradient(135deg, #029D6E 0%, #027a56 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 157, 110, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 157, 110, 0.4);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #e2e8f0);
    border: 1px solid rgba(148, 163, 184, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.4);
}

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.summary-card-header h3 {
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 0.75rem 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-card-value {
    font-size: 1.75rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-card-sub {
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

/* Plan Tables */
.plan-tables-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.plan-table-section {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.account-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    flex-wrap: wrap;
    gap: 1rem;
}

.account-plan-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
    margin: 0;
}

.account-summary {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary, #94a3b8);
}

.account-summary span {
    white-space: nowrap;
}

.table-container {
    overflow-x: auto;
}

.deployment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.deployment-table thead {
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 2px solid rgba(148, 163, 184, 0.2);
}

.deployment-table th {
    padding: 1rem;
    text-align: left;
    color: var(--text-secondary, #94a3b8);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.deployment-table tbody tr {
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.2s;
}

.deployment-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.deployment-table td {
    padding: 1rem;
    color: var(--text-primary, #e2e8f0);
}

.deployment-table td strong {
    color: var(--text-primary, #e2e8f0);
    font-weight: 600;
}

.priority-badge {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    line-height: 2rem;
    text-align: center;
    background: rgba(2, 157, 110, 0.2);
    color: #029D6E;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
}

.rationale-cell {
    max-width: 300px;
    font-size: 0.85rem;
    color: var(--text-secondary, #94a3b8);
}

.btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-primary, #e2e8f0);
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-action:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(148, 163, 184, 0.4);
    transform: scale(1.05);
}

/* No Positions State */
.no-positions {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary, #94a3b8);
}

.no-positions p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.no-positions-reason {
    font-size: 0.85rem !important;
    color: var(--text-muted, #64748b) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .account-plan-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .account-summary {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .deployment-table {
        font-size: 0.8rem;
    }
    
    .deployment-table th,
    .deployment-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .rationale-cell {
        max-width: 150px;
        font-size: 0.75rem;
    }
}

