/* Portfolio Dashboard Styles */
.portfolio-dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: transparent;
    color: #ffffff;
}

/* Dashboard Header */
.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 136, 0.1));
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    backdrop-filter: blur(10px);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #00d4ff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-icon {
    margin-right: 15px;
    font-size: 2.2rem;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    margin: 0 0 20px 0;
}

.dashboard-note {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(0, 255, 136, 0.1));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 20px;
}

.dashboard-note p {
    color: #ffffff;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.dashboard-note strong {
    color: #00d4ff;
}

/* Portfolio Summary */
.portfolio-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.summary-card:hover::before {
    left: 100%;
}

.summary-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #00d4ff;
}

.summary-value.positive {
    color: #00ff88;
}

.summary-value.negative {
    color: #ff4757;
}

.summary-label {
    font-size: 0.9rem;
    color: #b0b0b0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Add Investment Section */
.add-investment-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.add-investment-section h3 {
    color: #00d4ff;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

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

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

.form-group label {
    color: #b0b0b0;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    background: rgba(20, 20, 20, 0.9);
}

.form-group input::placeholder {
    color: #666;
}

/* Button Styles */
.btn {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    border: none;
    border-radius: 10px;
    padding: 12px 25px;
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: linear-gradient(45deg, #0099cc, #00d4ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-secondary {
    background: linear-gradient(45deg, #666, #888);
    font-size: 0.9rem;
    padding: 8px 15px;
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #888, #666);
}

.btn-danger {
    background: linear-gradient(45deg, #ff4757, #cc3a47);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #cc3a47, #ff4757);
}

/* Investments Section */
.investments-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.investments-section h3 {
    color: #00d4ff;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.investments-table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.investments-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(20, 20, 20, 0.8);
}

.investments-table th {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0.1));
    color: #00d4ff;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
}

.investments-table td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.95rem;
}

.investments-table tbody tr {
    transition: all 0.3s ease;
}

.investments-table tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
}

.profit-positive {
    color: #00ff88 !important;
    font-weight: 600;
}

.profit-negative {
    color: #ff4757 !important;
    font-weight: 600;
}

.no-investments {
    text-align: center;
    padding: 40px 20px;
    color: #ffffff;
}

.no-investments-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.no-investments-message h4 {
    color: #00d4ff;
    margin: 0;
    font-size: 1.3rem;
}

.no-investments-message ul {
    text-align: left;
    color: #b0b0b0;
    margin: 10px 0;
}

.no-investments-message ul li {
    margin: 5px 0;
}

.no-investments-message p {
    color: #ffffff;
    margin: 10px 0;
    line-height: 1.5;
}

.no-investments-message strong {
    color: #00ff88;
}

.no-investments-icon {
    font-size: 3rem;
    opacity: 0.7;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-spinner {
    text-align: center;
    color: #ffffff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Portfolio Chart Section */
.portfolio-chart-section {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.9), rgba(50, 50, 50, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.portfolio-chart-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.chart-note {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
}

.chart-note p {
    color: #ffffff;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chart-note strong {
    color: #00d4ff;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 20px;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 10px;
    padding: 20px;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chart-controls .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.chart-controls .btn.active {
    background: linear-gradient(45deg, #00d4ff, #0099cc);
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-dashboard-container {
        padding: 15px;
    }

    .dashboard-title {
        font-size: 2rem;
    }

    .portfolio-summary {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .investment-form .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .investments-table {
        font-size: 0.85rem;
    }

    .investments-table th,
    .investments-table td {
        padding: 10px 8px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .chart-container {
        height: 300px;
        padding: 15px;
    }

    .chart-controls {
        gap: 5px;
    }

    .chart-controls .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Edit Form Styles */
.edit-form {
    display: none;
    background: rgba(30, 30, 30, 0.95);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin: 10px 0;
}

.edit-form.active {
    display: block;
}

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

.edit-form .form-group input {
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.9rem;
}

.edit-form .action-buttons {
    justify-content: flex-start;
    margin-top: 15px;
}
