* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: #f7f7f8;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Page Management */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Header */
.header {
    background: white;
    color: #1a1a1a;
    padding: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e5e5e5;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: #7c3aed;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    padding: 8px;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Makes the logo white on purple background */
}

.logo-text {
    color: #1a1a1a;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-link:hover {
    color: #1a1a1a;
    background: #f3f4f6;
}

.nav-link.active {
    color: #1a1a1a;
    background: #f3f4f6;
    font-weight: 600;
}

.wallet-badge {
    background: #f9fafb;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
}

.wallet-badge:before {
    content: "💰";
    font-size: 16px;
}

.btn-logout {
    background: transparent;
    border: 1px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.btn-logout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 24px 80px;
}

.badge {
    display: inline-block;
    background: #f3e8ff;
    color: #7c3aed;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 64px;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 22px;
    color: #6B7280;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 80px;
}

.feature-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feature-card p {
    color: #6B7280;
    font-size: 15px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: #7c3aed;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

.btn-success {
    background: #10B981;
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #EF4444;
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-lg {
    font-size: 18px;
    padding: 18px 40px;
}

/* Main Content */
.main-content {
    padding: 40px 24px;
    min-height: calc(100vh - 80px);
}

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

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    color: #6B7280;
    font-size: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.empty-state h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 18px;
    color: #6B7280;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
}

.stat-label {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.stat-value.positive {
    color: #10B981;
}

.stat-value.negative {
    color: #EF4444;
}

/* Agents List */
.agents-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agent-card {
    background: white;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
    transition: box-shadow 0.2s;
}

.agent-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.agent-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.agent-info {
    display: flex;
    gap: 16px;
}

.agent-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 800;
    color: white;
    padding: 8px;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.agent-avatar.polymarket {
    background: #7c3aed;
}

.agent-avatar.morpho {
    background: #10b981;
}

.agent-avatar.aave {
    background: #8b5cf6;
}

.agent-avatar.katana {
    background: #f59e0b;
}

/* Legacy support */
.agent-avatar.crypto {
    background: #7c3aed;
}

.agent-avatar.sports {
    background: #f59e0b;
}

.agent-avatar.politics {
    background: #8b5cf6;
}

.agent-details h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.agent-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.agent-meta {
    font-size: 14px;
    color: #6B7280;
}

.agent-pnl {
    text-align: right;
}

.agent-pnl-value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}

.agent-pnl-label {
    font-size: 14px;
    color: #6B7280;
}

.agent-actions {
    display: flex;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

/* Badges */
.badge-tag {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-tag.info {
    background: #ede9fe;
    color: #7c3aed;
}

.badge-tag.success {
    background: #d1fae5;
    color: #059669;
}

.badge-tag.warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-tag.danger {
    background: #fee2e2;
    color: #b91c1c;
}

/* Card */
.card {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
}

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

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

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.5;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #6B7280;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.category-option input[type="radio"] {
    display: none;
}

.category-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.category-option input:checked + .category-card {
    border-color: #7c3aed;
    background: #f3e8ff;
}

.category-card:hover {
    border-color: #7c3aed;
}

.category-icon {
    font-size: 48px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
}

.category-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.category-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.category-desc {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.coming-soon {
    margin-top: 8px;
    padding: 4px 8px;
    background: #fef3c7;
    color: #d97706;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
}

.category-option input:disabled + .category-card {
    opacity: 0.6;
    cursor: not-allowed;
}

.category-option input:disabled + .category-card:hover {
    border-color: #E5E7EB;
}

.approval-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.approval-option input[type="radio"] {
    display: none;
}

.approval-card {
    background: white;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.approval-option input:checked + .approval-card {
    border-color: #7c3aed;
    background: #f3e8ff;
}

.approval-card:hover {
    border-color: #7c3aed;
}

.approval-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.approval-desc {
    font-size: 14px;
    color: #6B7280;
}

.form-actions {
    display: flex;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

.form-actions .btn {
    flex: 1;
}

/* Recommendation Card */
.rec-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid #E5E7EB;
    margin-bottom: 24px;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.rec-question {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.rec-action {
    background: linear-gradient(135deg, #F0FDF4, #D1FAE5);
    border: 2px solid #10B981;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.rec-action-label {
    font-size: 12px;
    color: #065F46;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.rec-action-details {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: 800;
    color: #065F46;
}

.confidence-meter {
    margin: 24px 0;
}

.confidence-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.confidence-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 600;
}

.confidence-value {
    font-size: 20px;
    font-weight: 800;
    color: #10B981;
}

.confidence-bar {
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
}

.confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, #FBBF24 0%, #10B981 100%);
    border-radius: 6px;
    transition: width 0.5s;
}

.rec-reasoning {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.rec-reasoning-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.rec-reasoning ul {
    list-style: none;
}

.rec-reasoning li {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.rec-reasoning li:before {
    content: "•";
    color: #7c3aed;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.rec-actions {
    display: flex;
    gap: 12px;
}

.rec-actions .btn {
    flex: 1;
}

/* Positions Table */
.positions-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

.positions-table table {
    width: 100%;
    border-collapse: collapse;
}

.positions-table thead {
    background: #F9FAFB;
}

.positions-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    border-bottom: 2px solid #E5E7EB;
}

.positions-table td {
    padding: 20px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.positions-table tbody tr:hover {
    background: #F9FAFB;
}

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

.json-block {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
}

.json-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.json-content {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.json-content.collapsed {
    max-height: 160px;
    overflow: auto;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 3px solid #E5E7EB;
    border-top-color: #7c3aed;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Enhanced Login Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-modal-card {
    background: white;
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

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

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

.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1a1a1a;
}

.login-content {
    padding: 32px 24px 24px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 28px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
}

.input-wrapper input {
    padding-left: 44px !important;
    padding-right: 44px !important;
    height: 42px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-password:hover {
    opacity: 1;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #7c3aed;
}

.forgot-password {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: #6d28d9;
}

.btn-block {
    width: 100%;
    justify-content: center;
    position: relative;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 28px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-social svg {
    flex-shrink: 0;
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.login-footer p {
    font-size: 14px;
    color: #6b7280;
}

.login-footer a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: #6d28d9;
}

#login-btn-spinner {
    position: absolute;
    right: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .nav {
        display: none;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
    }

    .agent-header {
        flex-direction: column;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .login-modal-card {
        max-width: 95%;
    }

    .social-login {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Recommendations Page Styles */
.recommendations-empty-state {
    background-color: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 80px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    border: 1px solid #E5E7EB;
    margin-top: 24px;
}

.recommendations-empty-icon {
    font-size: 96px;
    margin-bottom: 32px;
    animation: bounce-gentle 2s infinite;
}

@keyframes bounce-gentle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.recommendations-empty-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.recommendations-empty-description {
    font-size: 18px;
    color: #6B7280;
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.6;
}

.recommendations-empty-links {
    font-size: 15px;
    color: #9CA3AF;
}

.recommendations-empty-links a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.recommendations-empty-links a:hover {
    color: #6d28d9;
    text-decoration: underline;
}

/* Recommendation Cards (when data exists) */
.recommendation-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}

.recommendation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.recommendation-market {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.recommendation-agent {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 4px;
}

.recommendation-confidence {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #F3F4F6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.confidence-high {
    background: #D1FAE5;
    color: #065F46;
}

.confidence-medium {
    background: #FEF3C7;
    color: #92400E;
}

.confidence-low {
    background: #FEE2E2;
    color: #991B1B;
}

/* Confidence Progress Bar */
.confidence-progress-container {
    margin: 16px 0;
}

.confidence-progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.confidence-progress-title {
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confidence-progress-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.confidence-progress-bar {
    width: 100%;
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.confidence-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #F59E0B 0%, #EAB308 25%, #84CC16 50%, #22C55E 75%, #10B981 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
}

.confidence-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.recommendation-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
}

.recommendation-detail {
    display: flex;
    flex-direction: column;
}

.recommendation-detail-label {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.recommendation-detail-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.recommendation-reasoning {
    padding: 16px;
    background: #F9FAFB;
    border-left: 3px solid #7c3aed;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
}

.recommendation-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.recommendation-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #F59E0B;
    font-weight: 500;
}

.recommendation-outcome-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.outcome-yes {
    background: #D1FAE5;
    color: #065F46;
}

.outcome-no {
    background: #FEE2E2;
    color: #991B1B;
}

/* Enhanced Positions Page Styles */
.positions-empty-state {
    background-color: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 80px 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    border: 1px solid #E5E7EB;
    margin-top: 24px;
}

.positions-empty-icon {
    font-size: 96px;
    margin-bottom: 32px;
    animation: pulse-gentle 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.positions-empty-title {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.positions-empty-description {
    font-size: 18px;
    color: #6B7280;
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.6;
}

.positions-empty-links {
    font-size: 15px;
    color: #9CA3AF;
}

.positions-empty-links a {
    color: #7c3aed;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.positions-empty-links a:hover {
    color: #6d28d9;
    text-decoration: underline;
}

/* Position Cards */
.position-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
}

.position-card:hover {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
    transform: translateY(-2px);
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.position-market {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.position-agent {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 4px;
}

.position-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open {
    background: #D1FAE5;
    color: #065F46;
}

.status-closed {
    background: #F3F4F6;
    color: #4B5563;
}

.position-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 12px;
}

.position-metric {
    display: flex;
    flex-direction: column;
}

.position-metric-label {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.position-metric-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.position-pnl {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.position-pnl.positive {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #6EE7B7;
}

.position-pnl.negative {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    border: 1px solid #FCA5A5;
}

.position-pnl-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-pnl.positive .position-pnl-label {
    color: #065F46;
}

.position-pnl.negative .position-pnl-label {
    color: #991B1B;
}

.position-pnl-value {
    font-size: 24px;
    font-weight: 700;
}

.position-pnl.positive .position-pnl-value {
    color: #047857;
}

.position-pnl.negative .position-pnl-value {
    color: #DC2626;
}

.position-pnl-percentage {
    font-size: 16px;
    font-weight: 600;
    margin-left: 8px;
}

.position-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.position-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6B7280;
    margin-top: 12px;
}

.position-outcome-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
}

/* Agent Logs Table */
.logs-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #E5E7EB;
}

.logs-table table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table thead {
    background: #F9FAFB;
    border-bottom: 2px solid #E5E7EB;
}

.logs-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logs-table td {
    padding: 16px;
    border-bottom: 1px solid #F3F4F6;
    vertical-align: top;
}

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

.logs-table tr:hover {
    background: #F9FAFB;
}

.log-step {
    font-weight: 700;
    color: #7c3aed;
    font-size: 16px;
}

.log-tool {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 600;
}

.log-reasoning {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    max-width: 300px;
}

.log-data-container {
    position: relative;
}

.log-data-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.log-data-btn {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #E5E7EB;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.log-data-btn:hover {
    background: #F3F4F6;
    border-color: #7c3aed;
}

.log-data-btn.copy:hover {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}

.log-data-content {
    display: none;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #1a1a1a;
    max-height: 200px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-data-content.show {
    display: block;
}

.log-timestamp {
    font-size: 13px;
    color: #6B7280;
    white-space: nowrap;
}

.copy-feedback {
    position: absolute;
    top: -30px;
    right: 0;
    background: #10B981;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    animation: fadeInOut 2s;
    pointer-events: none;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    10%, 90% { opacity: 1; }
}

/* Streaming Logs Format */
.logs-stream {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.log-entry {
    background: white;
    border: 1px solid #E5E7EB;
    border-left: 4px solid #7c3aed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}

.log-entry:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1);
    border-left-color: #6d28d9;
}

.log-entry-header {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.log-entry-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.log-step-badge {
    background: #7c3aed;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.log-tool-name {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    background: #F3F4F6;
    padding: 6px 12px;
    border-radius: 6px;
}

.log-timestamp {
    font-size: 13px;
    color: #9CA3AF;
    margin-left: auto;
}

.log-entry-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.log-reasoning-section {
    background: #F9FAFB;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #7c3aed;
}

.log-section-label {
    font-size: 12px;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.log-reasoning-text {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

.log-data-section {
    background: #FAFAFA;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.log-data-stream-container {
    margin-top: 8px;
}

.log-data-preview,
.log-data-full {
    background: #1F2937;
    color: #10B981;
    padding: 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    overflow-x: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.log-data-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.log-data-action-btn {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #D1D5DB;
    background: white;
    color: #6B7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.log-data-action-btn:hover {
    background: #7c3aed;
    color: white;
    border-color: #7c3aed;
}
