/* Modern styling based on market.html and reports.html */

/* Card styles */
.card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease;
    margin-bottom: 24px;
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-1px);
}

.card-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.card-body {
    padding: 24px;
}

/* Portfolio summary styles */
.portfolio-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.portfolio-stat {
    text-align: center;
}

.portfolio-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.portfolio-stat-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Portfolio Performance Chart - Modern Style */
.portfolio-chart-section {
    margin-bottom: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
}

.portfolio-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.portfolio-chart-metrics {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.chart-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chart-metric-label {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-metric-main {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.chart-metric-pnl {
    font-size: 16px;
    font-weight: 600;
}

.chart-metric-percent {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.chart-metric-main.positive,
.chart-metric-main.positive .chart-metric-pnl,
.chart-metric-main.positive .chart-metric-percent {
    color: #10b981;
}

.chart-metric-main.negative,
.chart-metric-main.negative .chart-metric-pnl,
.chart-metric-main.negative .chart-metric-percent {
    color: #ef4444;
}

.chart-metric-main.neutral {
    color: #6b7280;
}

.portfolio-chart-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-collapse-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chart-collapse-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.chart-collapse-btn.collapsed i {
    transform: rotate(180deg);
}

.portfolio-chart-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: 200px;
}

.portfolio-chart-body.collapsed {
    max-height: 0;
    opacity: 0;
}

.portfolio-chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.chart-mode-selector {
    display: flex;
    gap: 2px;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px;
    position: relative;
}

.chart-mode-btn {
    padding: 5px 12px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
}

.chart-mode-btn:hover {
    color: #374151;
}

.chart-mode-btn.active {
    background: white;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.chart-mode-btn.active[data-mode="value"] {
    color: #3b82f6;
}

.chart-mode-btn.active[data-mode="return"] {
    color: #8b5cf6;
}

.chart-period-selector {
    display: flex;
    gap: 4px;
}

.chart-period-btn {
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

.chart-period-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.chart-period-btn.active {
    background: #111827;
    border-color: #111827;
    color: white;
}

.portfolio-line-chart {
    height: 160px;
    background: #fafafa;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.portfolio-line-chart svg {
    width: 100%;
    height: 100%;
}

.chart-line {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

.chart-line.positive {
    stroke: #10b981;
}

.chart-line.negative {
    stroke: #ef4444;
}

.chart-line.neutral {
    stroke: #6b7280;
}

/* Mode-specific chart colors */
.chart-line.mode-value {
    stroke: #3b82f6;
}

.chart-line.mode-return {
    stroke: #8b5cf6;
}

.chart-area {
    opacity: 0.08;
    transition: fill 0.3s ease;
}

.chart-area.positive {
    fill: #10b981;
}

.chart-area.negative {
    fill: #ef4444;
}

.chart-area.neutral {
    fill: #6b7280;
}

.chart-area.mode-value {
    fill: #3b82f6;
}

.chart-area.mode-return {
    fill: #8b5cf6;
}

.chart-dot {
    fill: white;
    stroke-width: 2;
    transition: stroke 0.3s ease;
}

.chart-dot.positive {
    stroke: #10b981;
}

.chart-dot.negative {
    stroke: #ef4444;
}

.chart-dot.neutral {
    stroke: #6b7280;
}

.chart-dot.mode-value {
    stroke: #3b82f6;
}

.chart-dot.mode-return {
    stroke: #8b5cf6;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
    font-size: 13px;
}

.chart-tooltip {
    position: absolute;
    background: #1f2937;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.chart-tooltip.visible {
    opacity: 1;
}

.chart-grid-line {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.chart-axis-label {
    font-size: 10px;
    fill: #9ca3af;
    font-weight: 500;
}

@media (max-width: 768px) {
    .portfolio-chart-section {
        padding: 12px 16px;
    }

    .portfolio-chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .portfolio-chart-metrics {
        width: 100%;
        gap: 16px;
    }

    .chart-metric-main {
        font-size: 15px;
    }

    .chart-metric-pnl {
        font-size: 14px;
    }

    .chart-metric-percent {
        font-size: 12px;
    }

    .portfolio-chart-controls-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }

    .chart-mode-selector {
        order: 1;
    }

    .chart-period-selector {
        order: 2;
        flex-wrap: wrap;
    }

    .chart-collapse-btn {
        order: 3;
    }

    .portfolio-line-chart {
        height: 100px;
    }
}

.position-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.position-table th,
.position-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    overflow: hidden;
}

.position-table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

/* Fixed column widths for 9 columns in holdings view */
.position-table .col-expand {
    width: 20px; /* Expand column - smaller */
    text-align: center;
    padding: 12px 2px !important;
}

.position-table .col-watchlist {
    width: 24px; /* Star column */
    text-align: center;
    padding: 12px 4px !important;
}

.position-table .col-asset {
    width: 24%; /* Asset Name - smaller */
}

.position-table .col-quantity {
    width: 8%; /* Quantity - smaller */
}

.position-table .col-valuation {
    width: 11%; /* Valuation - smaller */
}

.position-table .col-cost {
    width: 13%; /* Cost/Last Price - smaller */
}

.position-table .col-pnl {
    width: 12%; /* P&L - smaller */
}

.position-table .col-weight {
    width: 6%; /* Weight - smaller */
}

.position-table .col-actions {
    width: 14%; /* Actions - bigger for three buttons */
}

/* Column widths for portfolio detail view (9 columns: expand + watchlist + data + actions) */
.position-table-detail .col-expand {
    width: 26px; /* Expand */
    text-align: center;
    padding: 12px 4px !important;
}

.position-table-detail .col-watchlist {
    width: 32px; /* Watchlist */
    text-align: center;
    padding: 12px 4px !important;
}

.position-table-detail .col-asset {
    width: 30%; /* Asset Name */
}

.position-table-detail .col-quantity {
    width: 8%; /* Quantity */
}

.position-table-detail .col-valuation {
    width: 11%; /* Valuation */
}

.position-table-detail .col-cost {
    width: 14%; /* Cost/Last Price */
}

.position-table-detail .col-pnl {
    width: 11%; /* P&L */
}

.position-table-detail .col-weight {
    width: 6%; /* Weight */
}

.position-table-detail .col-actions {
    width: 20%; /* Actions */
}

.position-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.position-row:hover {
    background-color: #f9fafb;
}

.position-row.editing {
    background-color: #fef3cd;
}

.position-row.has-delete-confirmation {
    background-color: #fef2f2;
}

.asset-name {
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.asset-ticker {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Ensure asset name column enforces ellipsis */
.position-table td.col-asset,
.position-table-detail td.col-asset {
    max-width: 0; /* This forces the content to respect the width */
    overflow: hidden;
}

/* Editing styles */
.edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.edit-input:focus {
    outline: none;
    border-color: #1d4ed8;
}

/* Watchlist star button */
.star-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 4px;
    margin: 0;
}

.star-btn:hover {
    color: #fbbf24;
}

.star-btn.active {
    color: #fbbf24;
}

.star-btn.inactive {
    color: #d1d5db;
}

/* Action buttons */
.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.action-btn:hover {
    background-color: #f3f4f6;
}

.action-btn.edit-btn {
    color: #3b82f6;
}

.action-btn.delete-btn {
    color: #dc2626;
}

.action-btn.save-btn {
    color: #059669;
}

.action-btn.cancel-btn {
    color: #6b7280;
}

.action-btn.buy-btn {
    color: #059669;
    background-color: #ecfdf5;
    border: 1px solid #d1fae5;
    font-weight: 600;
}

.action-btn.buy-btn:hover {
    background-color: #d1fae5;
    border-color: #a7f3d0;
}

.action-btn.sell-btn {
    color: #dc2626;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    font-weight: 600;
}

.action-btn.sell-btn:hover {
    background-color: #fecaca;
    border-color: #fca5a5;
}

/* Tooltip - using native title but styled via CSS where possible */
.action-btn {
    position: relative;
}

/* Allow tooltips to overflow in action cells */
.position-table td:last-child,
.position-table td:has(.action-btn),
td:has(.action-btn) {
    overflow: visible !important;
}

.action-btn[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: tooltipFadeIn 0.15s ease;
}

.action-btn[title]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    z-index: 99999;
    pointer-events: none;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.price-cell {
    text-align: right;
}

.price-primary {
    font-weight: 600;
}

.price-secondary {
    font-size: 0.875rem;
    color: #6b7280;
}

.performance-positive {
    color: #059669;
}

.performance-negative {
    color: #dc2626;
}

.performance-neutral {
    color: #6b7280;
}

/* Button styles */
.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #1d4ed8;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-outline {
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #64748b;
}

.btn-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

.add-position-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 2px dashed #d1d5db;
}

.position-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.position-item:hover {
    background: #f3f4f6;
}

.position-item.has-data {
    background: #ecfdf5;
    border-color: #10b981;
}

.position-item.incomplete-data {
    background: #fefce8;
    border-color: #eab308;
}

.position-item.invalid {
    background: #fef2f2;
    border-color: #f87171;
    opacity: 0.8;
}

.position-item.invalid .position-form-input {
    background: #f9fafb;
    cursor: not-allowed;
}

.position-form-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px 80px;
    gap: 12px;
    align-items: end;
}

.position-form-group {
    display: flex;
    flex-direction: column;
}

.position-form-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.position-form-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.position-form-input:focus {
    outline: none;
    border-color: #1d4ed8;
}

.position-form-input.valid {
    border-color: #10b981;
    background-color: #f0fdf4;
}

.position-form-input.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.position-form-input.empty {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.position-remove-btn {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.position-remove-btn:hover {
    background: #fecaca;
}

.empty-positions {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    margin-bottom: 16px;
}

/* Alert Styles */
.alerts-container {
    position: relative;
    margin-bottom: 24px;
}

.alert {
    background: white;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInDown 0.3s ease-out;
}

.alert-success {
    border-left-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.alert-danger,
.alert-error {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
    color: #92400e;
}

.alert-info {
    border-left-color: #3b82f6;
    background: #eff6ff;
    color: #1e40af;
}

.alert .modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: currentColor;
    opacity: 0.5;
    padding: 0;
    margin-left: 16px;
    transition: opacity 0.2s ease;
}

.alert .modal-close:hover {
    opacity: 1;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hide alerts container when empty */
.alerts-container:empty {
    margin-bottom: 0;
}

/* Delete Confirmation Styles */
.delete-confirmation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 280px;
    max-width: 400px;
    z-index: 10001;
    animation: slideInDown 0.2s ease-out;
}

.delete-confirmation-content {
    text-align: center;
}

.delete-confirmation-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.delete-confirmation-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
    line-height: 1.4;
}

.delete-confirmation-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.delete-confirm-btn {
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-confirm-btn:hover {
    background: #b91c1c;
}

.delete-cancel-btn {
    background: #f3f4f6;
    color: #374151;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-cancel-btn:hover {
    background: #e5e7eb;
}

/* Backdrop for delete confirmation */
.delete-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

/* Method Selection Styles */
.method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.method-card {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.method-card:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.method-icon {
    font-size: 2rem;
    color: #3b82f6;
    margin-bottom: 12px;
}

.method-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.method-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Form styles - consistent across all pages */
.form-control,
.form-input,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-control:focus,
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #1d4ed8;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.2s, opacity 0.2s ease-in-out;
}

.modal.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s linear 0s, opacity 0.2s ease-in-out;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Step Content */
.step-content {
    display: none;
}

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

/* CSV Requirements */
.csv-requirements-list {
    margin: 0;
    padding-left: 20px;
    color: #374151;
}

.csv-requirements-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.csv-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    margin-top: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.csv-upload-area:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}

.csv-upload-area.dragover {
    border-color: #10b981;
    background: #ecfdf5;
}

/* CSV Mapping Styles */
.field-mapping {
    margin-bottom: 24px;
}

.field-mapping-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.field-mapping-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.2s ease;
}

.field-mapping-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.field-mapping-card.mapped {
    border-color: #10b981;
    background: #f0fdf4;
}

.field-mapping-card.mapped::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    background: #10b981;
    border-radius: 50%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="white"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg>');
}

.field-mapping-card {
    position: relative;
}

.csv-field-header {
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
    font-size: 14px;
    font-family: monospace;
    background: #f3f4f6;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.csv-field-preview {
    margin-bottom: 12px;
}

.csv-field-preview-item {
    padding: 4px 8px;
    margin-bottom: 4px;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 13px;
    color: #374151;
    border-left: 3px solid #e5e7eb;
}

.csv-field-preview-item:last-child {
    margin-bottom: 0;
}

.csv-field-preview-item.formatted-number {
    background: #f0f9ff;
    border-left-color: #3b82f6;
    font-weight: 500;
}

.csv-field-preview-item.identifier-field {
    background: #fefce8;
    border-left-color: #eab308;
    font-weight: 500;
    font-family: monospace;
}

.field-mapping-select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.field-mapping-select:focus {
    outline: none;
    border-color: #3b82f6;
}

.field-mapping-select.mapped {
    border-color: #10b981;
    background: #f0fdf4;
}

.target-field-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.csv-delimiter-control {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.csv-delimiter-control select {
    min-width: 120px;
}

@media (max-width: 768px) {
    .method-cards {
        grid-template-columns: 1fr;
    }

    .field-mapping-grid {
        grid-template-columns: 1fr;
    }

    .csv-delimiter-control {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .csv-delimiter-control select {
        min-width: auto;
        width: 100%;
    }
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.875rem;
    color: #374151;
}

.form-input,
.form-select {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #1d4ed8;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
    display: block;
}

.csv-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-top: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.csv-upload-area:hover {
    border-color: #3b82f6;
}

.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-item {
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.autocomplete-item:hover {
    background-color: #f9fafb;
}

.autocomplete-item.selected {
    background-color: #dbeafe;
}

.autocomplete-item-name {
    font-weight: 500;
    color: #111827;
}

.autocomplete-item-ticker {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 2px;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-type-section {
    margin-bottom: 24px;
}

/* Text styles */
.text-2xl {
    font-size: 1.5rem;
    font-weight: 700;
}

.text-lg {
    font-size: 18px;
}

.text-sm {
    font-size: 14px;
}

.text-xs {
    font-size: 12px;
}

.text-gray-600 {
    color: #64748b;
}

.text-gray-500 {
    color: #6b7280;
}

.text-primary-color {
    color: #1d4ed8;
}

/* Layout utilities */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.items-end {
    align-items: flex-end;
}

.items-start {
    align-items: flex-start;
}

.gap-sm {
    gap: 8px;
}

.gap-md {
    gap: 16px;
}

.gap-lg {
    gap: 24px;
}

.mb-md {
    margin-bottom: 16px;
}

.mb-lg {
    margin-bottom: 24px;
}

.mb-xl {
    margin-bottom: 32px;
}

/* Loading animation */
.loading {
    width: 24px;
    height: 24px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #1d4ed8;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    /* Page header compact mobile */
    .page-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .header-left h1 {
        font-size: 24px;
    }

    .header-right {
        width: 100%;
        gap: 8px;
        padding: 10px 12px;
    }

    .compact-stat {
        min-width: auto;
        flex: 1;
    }

    .compact-stat-value {
        font-size: 15px;
    }

    .compact-stat-label {
        font-size: 10px;
    }

    /* Tabs mobile */
    .tabs-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .tabs-buttons {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-buttons::-webkit-scrollbar {
        display: none;
    }

    .tabs-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .tabs-actions .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }

    .hide-mobile-text {
        display: none !important;
    }

    .show-mobile-text {
        display: inline !important;
    }

    /* Hide table on mobile - we'll show cards instead */
    .position-table {
        display: none;
    }

    /* Mobile card view for positions */
    .mobile-position-card {
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-card-title {
        flex: 1;
        min-width: 0;
    }

    .mobile-card-actions {
        display: flex;
        gap: 8px;
        flex-shrink: 0;
    }

    .mobile-card-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        font-size: 14px;
    }

    .mobile-card-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-card-label {
        font-size: 12px;
        color: #6b7280;
    }

    .mobile-card-value {
        font-weight: 600;
        color: #111827;
    }

    /* Tabs mobile */
    .tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-header::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        font-size: 13px;
        padding: 10px 16px;
        white-space: nowrap;
    }

    .btn-manage-portfolios {
        padding: 8px 12px;
        font-size: 13px;
    }

    /* Action buttons mobile */
    .action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .action-btn span {
        font-size: 12px !important;
    }

    .action-btn i {
        font-size: 12px !important;
    }

    /* Make buttons full width in mobile cards */
    .mobile-position-card .action-btn {
        flex: 1;
        justify-content: center;
    }

    /* Expand button */
    .expand-btn {
        transition: all 0.2s ease;
    }

    .expand-btn:hover {
        background-color: #e5e7eb !important;
    }

    .expand-btn:active {
        transform: scale(0.95);
        background-color: #d1d5db !important;
    }

    /* Breakdown items */
    .mobile-breakdown-item {
        transition: background-color 0.2s ease;
    }

    .mobile-breakdown-item:hover {
        background-color: #f3f4f6;
    }

    .mobile-breakdown-item:active {
        background-color: #e5e7eb !important;
    }

    /* Modals mobile */
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }

    /* Form elements mobile */
    .form-row {
        grid-template-columns: 1fr;
    }

    .position-form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Breadcrumbs mobile */
    .breadcrumbs {
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Portfolios table mobile */
    .portfolios-table {
        display: none;
    }

    /* Section titles mobile */
    .section-title {
        font-size: 1rem;
    }

    /* Empty states mobile */
    .empty-state {
        padding: 32px 16px;
    }

    .empty-state-title {
        font-size: 1.125rem;
    }
}

/* Enhanced Order Form Styles */
.quantity-amount-toggle {
    display: flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
}

.toggle-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: white;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.quantity-amount-input {
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.edit-expiration-btn {
    background: none;
    border: none;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.edit-expiration-btn:hover {
    background: #f1f5f9;
}

.expiration-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.expiration-option:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.expiration-option input[type="radio"] {
    margin: 0;
}

.expiration-option input[type="radio"]:checked + span {
    font-weight: 600;
    color: #1d4ed8;
}

#market-price-indicator {
    opacity: 1;
    transition: opacity 0.2s ease;
}

#market-price-indicator.hidden {
    opacity: 0;
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #64748b;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
}

/* Portfolio Selector Styles */
.portfolio-selector {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.portfolio-selector-label {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

.portfolio-select {
    flex: 1;
    max-width: 300px;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.portfolio-select:focus {
    outline: none;
    border-color: #1d4ed8;
}

.portfolio-select option.bank-portfolio {
    font-weight: 600;
    color: #059669;
}

.btn-manage-portfolios {
    padding: 10px 16px;
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-manage-portfolios:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.tabs-actions .btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Portfolio List in Modal */
.portfolio-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.portfolio-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.portfolio-item.bank-portfolio {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #86efac;
}

.portfolio-info {
    flex: 1;
}

.portfolio-name {
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    background: #059669;
    color: white;
    font-weight: 600;
}

.portfolio-meta {
    font-size: 12px;
    color: #6b7280;
}

.portfolio-actions {
    display: flex;
    gap: 8px;
}

.portfolio-actions button {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.portfolio-actions .btn-edit {
    background: #dbeafe;
    color: #1e40af;
}

.portfolio-actions .btn-edit:hover {
    background: #bfdbfe;
}

.portfolio-actions .btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.portfolio-actions .btn-delete:hover {
    background: #fecaca;
}

/* Page Header Compact */
.page-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 24px;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.header-right {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.compact-stat {
    text-align: center;
    min-width: 80px;
}

.compact-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.compact-stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.compact-stat-value.performance-positive {
    color: #10b981;
}

.compact-stat-value.performance-negative {
    color: #ef4444;
}

.compact-stat-value.performance-neutral {
    color: #6b7280;
}

/* Tabs styles */
.tabs-container {
    margin-bottom: 24px;
}

.tabs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 16px;
}

.tabs-buttons {
    display: flex;
    gap: 8px;
}

.tabs-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: -2px;
}

.hide-mobile-text {
    display: inline;
}

.show-mobile-text {
    display: none;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #1d4ed8;
    background: #f3f4f6;
}

.tab-btn.active {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
    font-weight: 600;
}

/* Breadcrumbs styles */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-link {
    color: #1d4ed8;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #d1d5db;
}

.breadcrumb-current {
    color: #111827;
    font-weight: 500;
}

/* Expandable rows styles */
.expandable-row {
    cursor: pointer;
}

.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #f3f4f6;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: #6b7280;
    font-size: 9px;
    transition: all 0.2s ease;
}

.expand-icon:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

.expand-icon.expanded {
    background: #dbeafe;
    color: #1d4ed8;
}

.expand-icon.expanded i {
    transform: rotate(90deg);
}

.expand-icon i {
    transition: transform 0.2s ease;
}

.sub-row {
    display: none;
    background: #fafbfc !important;
}

.sub-row.visible {
    display: table-row;
}

.sub-row > td {
    padding: 10px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

/* First column (empty) and second column (expand) in sub-rows */
.sub-row > td.col-expand,
.sub-row > td.col-watchlist {
    padding: 10px 4px !important;
}

.sub-row:hover {
    background: #f3f4f6 !important;
}

/* Lot rows styling (sub-sub-rows) */
.lot-row {
    background: #fafbfc !important;
}

.lot-row > td {
    padding: 8px 12px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13px;
}

.lot-row:hover {
    background: #f3f4f6 !important;
}

/* Lot action buttons */
.lot-action-btn {
    background: #f3f4f6;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    font-size: 11px;
    transition: all 0.2s ease;
    margin: 0 2px;
}

.lot-action-btn:hover {
    background: #e5e7eb;
    color: #3b82f6;
}

.lot-action-btn.danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* Edit Lot Modal */
.edit-lot-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.edit-lot-modal.active {
    display: flex;
}

.edit-lot-modal-content {
    background: white;
    border-radius: 12px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.edit-lot-modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.edit-lot-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.edit-lot-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6b7280;
}

.edit-lot-modal-body {
    padding: 20px;
}

.edit-lot-form-group {
    margin-bottom: 16px;
}

.edit-lot-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.edit-lot-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

.edit-lot-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
}

.edit-lot-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.edit-lot-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.edit-lot-btn.cancel {
    background: #f3f4f6;
    color: #374151;
}

.edit-lot-btn.cancel:hover {
    background: #e5e7eb;
}

.edit-lot-btn.save {
    background: #3b82f6;
    color: white;
}

.edit-lot-btn.save:hover {
    background: #2563eb;
}

.portfolio-link {
    color: #1d4ed8;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.portfolio-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Portfolios list table styles */
.portfolios-table {
    width: 100%;
    border-collapse: collapse;
}

.portfolios-table th,
.portfolios-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.portfolios-table th {
    background-color: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.portfolios-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s;
}

.portfolios-table tbody tr:hover {
    background-color: #f9fafb;
}

.portfolio-name-cell {
    font-weight: 600;
    color: #111827;
}

.portfolio-icon {
    margin-right: 8px;
}

/* Attention Badges for Portfolio Holdings */
.attention-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 4px;
}

.attention-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.attention-badge i {
    font-size: 9px;
}

/* Badge colors */
.attention-badge.green {
    background: #dcfce7;
    color: #16a34a;
}

.attention-badge.red {
    background: #fee2e2;
    color: #dc2626;
}

.attention-badge.blue {
    background: #dbeafe;
    color: #2563eb;
}

.attention-badge.orange {
    background: #ffedd5;
    color: #ea580c;
}

.attention-badge.purple {
    background: #f3e8ff;
    color: #9333ea;
}

.attention-badge.teal {
    background: #ccfbf1;
    color: #0d9488;
}

.attention-badge.indigo {
    background: #e0e7ff;
    color: #4f46e5;
}

.attention-badge.cyan {
    background: #cffafe;
    color: #0891b2;
}
