/* Profile Page Styles */

[v-cloak] {
    display: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

/* Loading State */
.profile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    gap: 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Container */
.profile-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.profile-header {
    margin-bottom: 30px;
}

.back-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #6366f1;
}

.profile-header h1 {
    margin: 0;
    font-size: 28px;
    color: #ffffff;
}

/* Content Layout */
.profile-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

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

/* Sidebar */
.profile-sidebar {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.avatar-section {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #9ca3af;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.user-info h2 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #ffffff;
}

.user-email {
    margin: 0 0 15px 0;
    color: #9ca3af;
    font-size: 14px;
    word-break: break-all;
}

.user-role {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-guest {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.role-user {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.role-premium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.3));
    color: #fbbf24;
}

.role-admin {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
    color: #a78bfa;
}

.provider-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: #9ca3af;
}

.provider-info strong {
    color: #e0e0e0;
}

/* Main Content */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Settings Card */
.settings-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-card h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    color: #ffffff;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input.disabled {
    background: rgba(0, 0, 0, 0.5);
    color: #6b7280;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.3);
}

.btn-upgrade {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    width: 100%;
}

.btn-upgrade:hover:not(:disabled) {
    background: linear-gradient(135deg, #d97706, #b45309);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Budget Settings */
.settings-description {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.budget-settings {
    margin-top: 15px;
}

.budget-info {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.budget-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.budget-row:last-child {
    border-bottom: none;
}

.budget-row.current {
    background: rgba(99, 102, 241, 0.1);
    margin: 10px -15px -15px;
    padding: 15px;
    border-radius: 0 0 12px 12px;
}

.budget-label {
    color: #9ca3af;
    font-size: 14px;
}

.budget-value {
    color: #22c55e;
    font-size: 16px;
    font-weight: 600;
}

.budget-unlimited {
    color: #6366f1;
    font-style: italic;
}

.budget-row.current .budget-label {
    color: #e0e0e0;
    font-weight: 500;
}

.budget-row.current .budget-value {
    color: #4ade80;
    font-size: 18px;
}

/* Tier Display */
.tier-display {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
}

.tier-badge {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tier-guest {
    background: rgba(107, 114, 128, 0.3);
    color: #9ca3af;
}

.tier-user {
    background: rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.tier-premium {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(217, 119, 6, 0.3));
    color: #fbbf24;
}

.tier-admin {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.3));
    color: #a78bfa;
}

.tier-description {
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

/* Feature List */
.tier-features h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #e0e0e0;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    font-size: 13px;
}

.feature-list li.enabled {
    color: #4ade80;
}

.feature-list li.disabled {
    color: #6b7280;
}

.feature-icon {
    font-size: 14px;
    width: 16px;
}

/* Tier Upgrade */
.tier-upgrade {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.tier-upgrade p {
    margin: 0 0 15px 0;
    color: #9ca3af;
    font-size: 14px;
}

/* Account Info */
.account-info {
    margin-bottom: 20px;
}

.account-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #9ca3af;
}

.account-info strong {
    color: #e0e0e0;
}

.account-actions {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Profile Card (for access denied) */
.profile-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    margin: 100px auto;
}

.profile-card h1 {
    margin: 0 0 15px 0;
    color: #f87171;
}

.profile-card p {
    margin: 0 0 25px 0;
    color: #9ca3af;
}

/* Upgrade Options */
.upgrade-options {
    margin-top: 10px;
}

.test-mode-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.upgrade-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-yearly {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.btn-yearly:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Subscription Info */
.subscription-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subscription-info h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #e0e0e0;
}

.subscription-info p {
    margin: 8px 0;
    font-size: 14px;
    color: #9ca3af;
}

.subscription-info strong {
    color: #e0e0e0;
}

.cancel-notice {
    color: #fbbf24 !important;
    font-style: italic;
}

/* Subscription Details */
.subscription-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.subscription-details p {
    margin: 5px 0;
}

.status-active {
    color: #4ade80;
}

.status-canceled,
.status-past_due,
.status-unpaid {
    color: #f87171;
}

.status-trialing {
    color: #60a5fa;
}

/* Subscription Countdown */
.subscription-countdown {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.countdown-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.countdown-unit {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.countdown-date {
    font-size: 12px;
    color: #6b7280;
    margin: 10px 0 0 0;
}

/* Plan Comparison Table */
.plans-comparison {
    overflow-x: auto;
    margin-bottom: 25px;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
    background: rgba(0, 0, 0, 0.3);
    color: #e0e0e0;
    font-weight: 600;
    font-size: 14px;
}

.comparison-table th small {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    font-weight: normal;
    margin-top: 3px;
}

.comparison-table th.current-plan {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border-top: 2px solid #6366f1;
}

.comparison-table td:first-child {
    text-align: left;
    color: #e0e0e0;
}

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

.comparison-table .check {
    color: #4ade80;
    font-size: 16px;
}

.comparison-table .cross {
    color: #6b7280;
    font-size: 16px;
}

.current-badge {
    display: block;
    font-size: 10px;
    background: #6366f1;
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 5px;
}

/* Plan Selection */
.plan-selection {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-selection h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #e0e0e0;
    text-align: center;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
}

.toggle-btn:hover {
    border-color: #6366f1;
    color: #fff;
}

.toggle-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
    font-weight: 600;
}

.discount-badge {
    background: #10b981;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 5px;
}

/* Plan Buttons */
.plan-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.plan-option {
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.plan-option:hover {
    border-color: rgba(255, 255, 255, 0.3);
}

.plan-option.current {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

.plan-option.featured {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.plan-option h5 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #fff;
}

.plan-option .plan-price {
    font-size: 24px;
    font-weight: 700;
    color: #00d4ff;
    margin: 0 0 15px 0;
}

.plan-option .plan-price small {
    font-size: 12px;
    font-weight: normal;
    color: #9ca3af;
}

.plan-option .btn {
    width: 100%;
    padding: 10px;
    font-size: 13px;
}

.current-label {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.2);
    color: #a78bfa;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

/* Payments Not Configured */
.payments-not-configured {
    text-align: center;
    padding: 30px;
    color: #6b7280;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 600px) {
    .billing-toggle {
        flex-direction: column;
        align-items: center;
    }

    .toggle-btn {
        width: 100%;
        max-width: 200px;
    }

    .plan-buttons {
        grid-template-columns: 1fr;
    }

    .countdown-timer {
        gap: 15px;
    }

    .countdown-value {
        font-size: 24px;
    }

    .comparison-table {
        font-size: 11px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 5px;
    }
}

/* ============================================
   DASHBOARD STYLES
   ============================================ */

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 8px;
    color: #9ca3af;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #6366f1;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

/* Dashboard Loading */
.dashboard-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    gap: 20px;
}

/* Stats Cards */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card.positive {
    border-left: 4px solid #4ade80;
}

.stat-card.negative {
    border-left: 4px solid #f87171;
}

.stat-icon {
    font-size: 32px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.stat-percent {
    font-size: 14px;
    font-weight: 600;
    margin-top: 5px;
}

.stat-percent.positive,
.positive {
    color: #4ade80;
}

.stat-percent.negative,
.negative {
    color: #f87171;
}

.stat-detail {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
}

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

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.chart-legend {
    font-size: 12px;
    color: #6b7280;
}

.chart-container {
    height: 250px;
}

.chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6b7280;
    font-size: 14px;
}

/* Best/Worst List */
.best-worst-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
}

.best-simulation,
.worst-simulation {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.best-simulation .label,
.worst-simulation .label {
    font-size: 14px;
    color: #9ca3af;
    min-width: 100px;
}

.best-simulation .name,
.worst-simulation .name {
    flex: 1;
    font-size: 14px;
    color: #e0e0e0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.best-simulation .pnl,
.worst-simulation .pnl {
    font-size: 16px;
    font-weight: 600;
}

/* Simulations Section */
.simulations-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 25px;
}

.simulations-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.simulations-section .section-header h3 {
    margin: 0;
    font-size: 18px;
    color: #ffffff;
}

.simulation-limit {
    font-size: 13px;
    color: #9ca3af;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
}

.simulations-filters {
    margin-bottom: 20px;
}

.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #e0e0e0;
}

.filter-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Simulations Table */
.simulations-table-wrapper {
    overflow-x: auto;
}

.simulations-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.simulations-table th,
.simulations-table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.simulations-table th {
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

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

.simulations-table tbody tr.favorite {
    background: rgba(245, 158, 11, 0.05);
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.favorite-btn:hover {
    opacity: 1;
}

.name-cell a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.name-cell a:hover {
    text-decoration: underline;
}

.model-badge {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(99, 102, 241, 0.2);
    color: #a78bfa;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.actions-cell {
    display: flex;
    gap: 5px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 5px;
}

.action-btn:hover {
    opacity: 1;
}

.action-btn.delete:hover {
    color: #f87171;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #e0e0e0;
}

.empty-state p {
    margin: 0 0 25px 0;
    color: #6b7280;
    font-size: 14px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: #1e293b;
    border-radius: 16px;
    max-width: 900px;
    max-height: 90vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
}

/* Simulation Detail Modal */
.simulation-detail-modal {
    max-width: 1000px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.simulation-detail-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.modal-header-actions .btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Detail Tabs */
.detail-tabs {
    display: flex;
    gap: 5px;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.detail-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    position: relative;
}

.detail-tab:hover {
    color: #e0e0e0;
}

.detail-tab.active {
    color: #60a5fa;
}

.detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: #60a5fa;
}

.tab-content {
    animation: fadeIn 0.2s ease-in-out;
}

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

/* Snapshot Section */
.snapshot-section {
    margin-bottom: 25px;
}

.snapshot-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #e0e0e0;
}

.snapshot-value {
    font-size: 28px;
    font-weight: 600;
    color: #60a5fa;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    display: inline-block;
}

/* Settings Section */
.settings-section {
    margin-bottom: 25px;
}

.settings-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

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

.setting-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
}

.setting-label {
    color: #9ca3af;
}

.setting-value {
    color: #e0e0e0;
    font-weight: 500;
}

/* Empty Note */
.empty-note {
    color: #6b7280;
    font-style: italic;
    padding: 15px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

/* Cash Flow Transactions */
.cashflow-transactions {
    margin-top: 25px;
}

.cashflow-transactions h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #e0e0e0;
}

.simulation-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.meta-item {
    font-size: 13px;
    color: #9ca3af;
}

.meta-item strong {
    color: #e0e0e0;
}

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

.stat-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-box.positive {
    border-left: 3px solid #4ade80;
}

.stat-box.negative {
    border-left: 3px solid #f87171;
}

.stat-box .stat-label {
    margin-bottom: 8px;
}

.stat-box .stat-value {
    font-size: 24px;
}

.stat-box .stat-percent,
.stat-box .stat-detail {
    margin-top: 5px;
}

/* Detail Chart Section */
.detail-chart-section {
    margin-bottom: 25px;
}

.detail-chart-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #e0e0e0;
}

.detail-chart-container {
    height: 200px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Trade History Section */
.trade-history-section {
    margin-top: 25px;
}

.trade-history-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.trade-history-section h4 {
    margin: 0;
    font-size: 16px;
    color: #e0e0e0;
}

.btn-small {
    padding: 8px 15px;
    font-size: 12px;
}

.trades-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.trades-table th,
.trades-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.trades-table th {
    color: #9ca3af;
    font-weight: 600;
    font-size: 10px;
    text-transform: uppercase;
}

.trade-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    font-size: 10px;
}

.trades-table .buy {
    color: #4ade80;
}

.trades-table .sell {
    color: #f87171;
}

/* Share Modal */
.share-modal {
    max-width: 500px;
}

.share-link-box {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.share-link-box input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
}

.share-notice {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

/* Dashboard Responsive */
@media (max-width: 768px) {
    .tab-navigation {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .simulation-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .simulations-table {
        font-size: 11px;
    }

    .simulations-table th,
    .simulations-table td {
        padding: 8px 5px;
    }

    .modal-content {
        max-height: 95vh;
    }
}
