/* Portfolio View Styles */
.portfolio-view-container {
    padding: 12px 20px 20px 20px;
}

.portfolio-header-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e0e6ed;
    border-radius: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.portfolio-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 200px;
}

.capital-input {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    width: 150px;
}

.portfolio-btn {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portfolio-btn:hover {
    background: #5a6fd8;
}

.portfolio-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 0;
    font-size: 16px;
}

.portfolio-table th {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-dark);
    padding: 14px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    border-bottom: 2px solid var(--primary-color);
}

.portfolio-table td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 16px;
    vertical-align: top;
}

.portfolio-table tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.portfolio-table tr:last-child td {
    border-bottom: none;
}

.add-holding-btn {
    width: 100%;
    padding: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-holding-btn:hover {
    background: #218838;
}

.edit-btn, .delete-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 4px;
    font-size: 12px;
}

.edit-btn {
    background: #007bff;
    color: white;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.edit-btn:hover {
    background: #0056b3;
}

.delete-btn:hover {
    background: #c82333;
}

.capital-label {
    margin-right: 5px;
    font-size: 14px;
    color: #333;
}

.portfolio-bottom-summary {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.portfolio-summary-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.summary-card {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.summary-card-label {
    color: #666;
    margin-bottom: 4px;
    font-size: 12px;
}

.summary-card-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.portfolio-distribution-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.distribution-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.allocation-distribution,
.dividend-distribution,
.sector-distribution,
.category-distribution,
.country-distribution,
.type-distribution {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.allocation-allocation-title,
.dividend-allocation-title,
.sector-allocation-title,
.category-allocation-title,
.country-allocation-title,
.type-allocation-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 14px;
}

.allocation-item,
.dividend-item,
.sector-item,
.category-item,
.country-item,
.type-item {
    margin-bottom: 8px;
}

.allocation-item-header,
.dividend-item-header,
.sector-item-header,
.category-item-header,
.country-item-header,
.type-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.allocation-name,
.dividend-name,
.sector-name,
.category-name,
.country-name,
.type-name {
    font-size: 12px;
    font-weight: 500;
}

.allocation-percent,
.dividend-percent,
.sector-percent,
.category-percent,
.country-percent,
.type-percent {
    font-size: 11px;
    color: #666;
}

.allocation-progress-bar,
.dividend-progress-bar,
.sector-progress-bar,
.category-progress-bar,
.country-progress-bar,
.type-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.sector-progress-fill {
    background: linear-gradient(90deg, #007bff, #0056b3);
    height: 100%;
    transition: width 0.3s ease;
}

.category-progress-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.3s ease;
}

.country-progress-fill {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
    height: 100%;
    transition: width 0.3s ease;
}

.allocation-progress-fill {
    background: linear-gradient(90deg, #17a2b8, #20c997);
    height: 100%;
    transition: width 0.3s ease;
}

.dividend-progress-fill {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
    height: 100%;
    transition: width 0.3s ease;
}

.type-progress-fill {
    background: linear-gradient(90deg, #6f42c1, #e83e8c);
    height: 100%;
    transition: width 0.3s ease;
}

.allocation-amount,
.dividend-amount,
.sector-amount,
.category-amount,
.country-amount,
.type-amount {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.symbol-allocation-title {
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.symbol-item {
    margin-bottom: 8px;
}

.symbol-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.symbol-name {
    font-size: 12px;
    font-weight: 500;
}

.symbol-amounts {
    font-size: 10px;
    color: #666;
}

.symbol-progress-bars {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.symbol-progress-bar {
    background: #e9ecef;
    border-radius: 6px;
    height: 4px;
    overflow: hidden;
}

.symbol-progress-fill.investment {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.3s ease;
}

.symbol-progress-fill.dividend {
    background: linear-gradient(90deg, #ffc107, #fd7e14);
    height: 100%;
    transition: width 0.3s ease;
}

.list-options-hidden {
    display: none;
}

.list-options-visible {
    display: block;
}

.custom-allocation-hidden {
    display: none;
}

.custom-allocation-visible {
    display: block;
}

.modal-form-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-form-grid label {
    font-weight: 600;
    margin-bottom: 4px;
    color: #2c3e50;
}

.modal-form-grid input,
.modal-form-grid select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}

.dividend-cell {
    text-align: center;
}

.monthly-div {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.annual-div {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.investment-cell {
    text-align: center;
}

.investment-amount {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.shares-count {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.allocation-cell {
    text-align: center;
    padding: 8px 4px;
}

.allocation-text {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.allocation-bar {
    background: #e9ecef;
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
    width: 100%;
}

.allocation-fill {
    background: linear-gradient(90deg, #28a745, #20c997);
    height: 100%;
    transition: width 0.3s ease;
}

.dividend-text {
    margin-bottom: 2px;
}

.dividend-percentage {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-align: center;
    margin-bottom: 2px;
}

.portfolio-table th:nth-child(5),
.portfolio-table td:nth-child(5) {
    max-width: 120px;
    word-wrap: break-word;
    white-space: normal;
}

.portfolio-table th:nth-child(11),
.portfolio-table td:nth-child(11) {
    white-space: nowrap;
    min-width: 80px;
}

.dividend-bar {
    background: #e9ecef;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    width: 100%;
}

.dividend-fill {
    background: #007bff;
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}