/* ============================================
   BLUEFOX TRADING - 4 AGENTS IA STYLES V2
   Version: 2.0
   ============================================ */

/* ============ AGENT COLORS ============ */
:root {
    --agent-trading-coach: #f97316;
    --agent-prop-firm-advisor: #4fd1ff;
    --agent-market-watch: #22c55e;
    --agent-learning-path: #a78bfa;
}

/* ============ BENTO GRID SELECTOR PAGE ============ */
.bento-selector-page {
    padding: 40px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Bento Header - Style Mockup */
.bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.bento-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bento-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f97316;
}

.bento-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.bento-title .gradient-text {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bento-agents-badge {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* ============ BENTO GRID - Asymétrie Diagonale ============ */
.bento-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

/* Bento Card Base */
.bento-card {
    background: var(--bg-card, #1a1f2e);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Card Layout - Grid positions avec hauteurs différentes */
.bento-coach {
    grid-column: 1;
    grid-row: 1;
    min-height: 320px;
}

.bento-advisor {
    grid-column: 2;
    grid-row: 1;
    min-height: 240px;
    align-self: start;
}

.bento-watch {
    grid-column: 1;
    grid-row: 2;
    min-height: 200px;
    align-self: start;
}

.bento-learning {
    grid-column: 2;
    grid-row: 2;
    min-height: 320px;
}

/* Bento Card Header */
.bento-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

/* Icon Backgrounds - Style Mockup */
.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.bento-icon-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

.bento-icon-cyan {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.bento-icon-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.bento-icon-purple {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}

/* Arrow Button */
.bento-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.bento-card:hover .bento-arrow {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateX(4px);
}

/* Bento Card Content */
.bento-verb {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.bento-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.bento-description {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 20px 0;
}

/* Bento Features Tags - Style Mockup */
.bento-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.bento-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.bento-card:hover .bento-tag {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Trading Coach Chart */
.bento-chart-svg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 55%;
    height: 100px;
    opacity: 0.8;
    pointer-events: none;
}

/* Promo Badge - Style Mockup */
.promo-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.promo-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Live Badge - Style Mockup */
.live-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #22c55e;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Learning Path CTA Button - Style Mockup */
.bento-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
}

.bento-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
}

.bento-cta svg {
    flex-shrink: 0;
}

/* Responsive Bento Grid */
@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bento-coach,
    .bento-advisor,
    .bento-watch,
    .bento-learning {
        min-height: auto;
    }
}

/* ============ LARGE SCREENS ============ */
@media (min-width: 1800px) {
    .bento-selector-page {
        max-width: 1400px;
        padding: 48px 32px;
    }

    .bento-grid {
        gap: 28px;
    }

    .bento-card {
        padding: 36px;
    }

    .bento-coach {
        min-height: 380px;
    }

    .bento-learning {
        min-height: 380px;
    }

    .bento-advisor {
        min-height: 290px;
    }

    .bento-watch {
        min-height: 250px;
    }

    .bento-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .bento-card-title {
        font-size: 1.75rem;
    }

    .bento-verb {
        font-size: 0.85rem;
        letter-spacing: 2.5px;
    }

    .bento-description {
        font-size: 1.05rem;
    }

    .bento-tag {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .bento-arrow {
        width: 46px;
        height: 46px;
    }

    .bento-title {
        font-size: 2.2rem;
    }

    .bento-agents-badge {
        font-size: 0.95rem;
        padding: 10px 20px;
    }

    .bento-cta {
        padding: 16px 28px;
        font-size: 1.05rem;
    }

    .bento-chart-svg {
        height: 120px;
    }

    .promo-badge,
    .live-badge {
        font-size: 0.85rem;
        padding: 8px 16px;
    }
}

@media (min-width: 2400px) {
    .bento-selector-page {
        max-width: 1700px;
        padding: 56px 40px;
    }

    .bento-grid {
        gap: 36px;
    }

    .bento-card {
        padding: 44px;
    }

    .bento-coach {
        min-height: 440px;
    }

    .bento-learning {
        min-height: 440px;
    }

    .bento-advisor {
        min-height: 340px;
    }

    .bento-watch {
        min-height: 300px;
    }

    .bento-icon {
        width: 64px;
        height: 64px;
        border-radius: 18px;
    }

    .bento-card-title {
        font-size: 2rem;
    }

    .bento-description {
        font-size: 1.15rem;
    }

    .bento-tag {
        padding: 12px 22px;
        font-size: 1rem;
    }

    .bento-title {
        font-size: 2.6rem;
    }

    .bento-chart-svg {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .bento-selector-page {
        padding: 24px 16px;
    }

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

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 16px;
    }

    .bento-coach,
    .bento-advisor,
    .bento-watch,
    .bento-learning {
        grid-column: 1;
        min-height: auto;
    }

    .bento-coach { grid-row: 1; }
    .bento-advisor { grid-row: 2; }
    .bento-watch { grid-row: 3; }
    .bento-learning { grid-row: 4; }

    .bento-chart-svg {
        width: 60%;
        height: 80px;
    }
}

/* ============ LEGACY AGENTS SELECTOR (kept for compatibility) ============ */
.agents-selector-page {
    padding: 40px 24px;
    max-width: 900px;
    margin: 0 auto;
}

.agents-header {
    margin-bottom: 40px;
}

.agents-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.agents-subtitle {
    font-size: 1.1rem;
    color: var(--agent-trading-coach);
    font-style: italic;
    margin-bottom: 16px;
}

.agents-intro {
    border-left: 3px solid rgba(255, 255, 255, 0.2);
    padding-left: 16px;
    margin-top: 16px;
}

.agents-intro p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============ AGENTS GRID ============ */
.agents-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ============ AGENT CARD ============ */
.agent-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: var(--agent-color);
    opacity: 0.6;
}

.agent-card:hover {
    border-color: var(--agent-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                0 0 24px color-mix(in srgb, var(--agent-color) 15%, transparent);
}

.agent-card:hover::before {
    opacity: 1;
}

/* Agent Card Header */
.agent-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.agent-card-icon {
    color: var(--agent-color);
    display: flex;
    align-items: center;
}

.agent-action-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Agent Card Content */
.agent-card-content {
    padding-left: 36px;
}

.agent-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.agent-tagline {
    font-size: 0.9rem;
    color: var(--agent-color);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-tagline em {
    font-style: italic;
}

.agent-features {
    list-style: disc;
    padding-left: 20px;
    margin: 0 0 16px 0;
}

.agent-features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 4px 0;
    line-height: 1.4;
}

/* Agent Card Footer */
.agent-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 36px;
    margin-top: 16px;
}

.agent-button-label {
    font-size: 0.85rem;
    color: var(--agent-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.agent-card-btn {
    padding: 8px 20px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-card-btn:hover {
    background: var(--agent-color);
    color: white;
    border-color: var(--agent-color);
}

/* Agents Footer */
.agents-footer {
    margin-top: 40px;
    padding: 20px;
    border-left: 3px solid var(--agent-learning-path);
    background: rgba(167, 139, 250, 0.05);
    border-radius: 0 12px 12px 0;
}

.agents-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ AGENT PAGE LAYOUT ============ */
.agent-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 60px);
}

.agent-page-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.back-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: var(--bg-hover);
    border-color: var(--agent-color);
}

.agent-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-icon {
    font-size: 2rem;
}

.agent-title h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.agent-verb-badge {
    display: inline-block;
    padding: 4px 10px;
    background: color-mix(in srgb, var(--agent-color) 15%, transparent);
    color: var(--agent-color);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
}

/* ============ AGENT PAGE CONTENT (Legacy - kept for non-chat pages) ============ */
.agent-page-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.agent-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ============ FULL-WIDTH CHAT LAYOUT ============ */
/* Make agent page-views fill parent height and remove content-area padding */
[id$="-page"].page-view.active:has(.agent-chat-page) {
    height: 100%;
}

.content-area:has(.agent-chat-page) {
    padding: 0;
    overflow: hidden;
}

.agent-chat-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.agent-chat-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bg-card);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.agent-topbar-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agent-topbar-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.agent-chat-topbar .agent-icon {
    color: var(--agent-color);
}

.agent-chat-topbar .agent-verb-badge {
    padding: 3px 10px;
    background: color-mix(in srgb, var(--agent-color) 15%, transparent);
    color: var(--agent-color);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 12px;
}

.agent-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

.agent-chat-bottom {
    flex-shrink: 0;
    background: var(--bg-card);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.agent-chat-bottom .chat-quick-actions {
    padding: 12px 24px 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    border-top: none;
}

.agent-chat-bottom .chat-input-area {
    padding: 12px 24px 16px;
    border-top: none;
    background: transparent;
}

/* Full-width messages */
.agent-chat-body .chat-message {
    max-width: 100%;
}

.agent-chat-body .chat-message.bot {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-self: flex-start;
    border-radius: 4px 16px 16px 16px;
    padding: 16px 20px;
    width: 100%;
}

.agent-chat-body .chat-message.user {
    background: color-mix(in srgb, var(--agent-color) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--agent-color) 30%, transparent);
    color: var(--text-primary);
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    padding: 12px 18px;
    max-width: 70%;
    width: auto;
}

@media (max-width: 768px) {
    .agent-chat-body {
        padding: 16px;
    }

    .agent-chat-bottom .chat-input-area {
        padding: 12px 16px 16px;
    }

    .agent-chat-bottom .chat-quick-actions {
        padding: 8px 16px 4px;
    }

    .agent-chat-body .chat-message.user {
        max-width: 85%;
    }
}

/* ============ AGENT CHAT SIDEBAR (Legacy - kept for backward compat) ============ */
.agent-chat-sidebar {
    width: 400px;
    background: var(--bg-card);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .agent-page-content {
        flex-direction: column;
    }

    .agent-chat-sidebar {
        width: 100%;
        height: 400px;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
}

.chat-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
    color: var(--text-primary);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    max-width: 90%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.chat-message.bot {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.06);
    align-self: flex-start;
}

.chat-message.user {
    background: var(--agent-color);
    color: white;
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.message-sender {
    font-weight: 600;
    color: var(--agent-color);
}

.message-time {
    color: var(--text-muted);
}

.message-content {
    color: var(--text-primary);
}

.message-content strong {
    color: var(--agent-color);
}

.message-content hr.response-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

/* Typing indicator */
.chat-message-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 16px;
    width: fit-content;
}

.chat-message-typing span {
    width: 8px;
    height: 8px;
    background: var(--agent-color);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.chat-message-typing span:nth-child(2) {
    animation-delay: 0.16s;
}

.chat-message-typing span:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick actions */
.chat-quick-actions {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.quick-action-btn {
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: color-mix(in srgb, var(--agent-color) 15%, transparent);
    border-color: var(--agent-color);
    color: var(--agent-color);
}

/* Chat input */
.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--bg-secondary);
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--agent-color);
}

.chat-input-area button {
    width: 44px;
    height: 44px;
    background: var(--agent-color);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input-area button:hover {
    transform: scale(1.05);
}

.chat-input-area button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    max-width: 300px;
}

/* ============ TRADING COACH PAGE ============ */
.coach-stats-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.coach-stats-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-value.positive {
    color: var(--accent-green);
}

.stat-value.negative {
    color: var(--accent-red);
}

.coach-report-panel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    min-height: 300px;
}

/* ============ PROP FIRM ADVISOR PAGE ============ */
.pf-profile-panel {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.pf-profile-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

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

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

.profile-item {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.profile-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--agent-prop-firm-advisor);
}

.pf-recommendations {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    min-height: 300px;
}

.pf-compare-table {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
}

.pf-compare-table h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* ============ MARKET WATCH PAGE ============ */
.market-watch-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 380px;
    gap: 0;
}

@media (max-width: 1200px) {
    .market-watch-layout {
        grid-template-columns: 1fr 1fr;
    }

    .mw-chat-column {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .market-watch-layout {
        grid-template-columns: 1fr;
    }

    .mw-chat-column {
        grid-column: span 1;
    }
}

.mw-calendar-column,
.mw-news-column {
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.mw-chat-column {
    display: flex;
}

.mw-chat-column .chat-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mw-panel {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mw-panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.mw-calendar-filters,
.mw-news-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mw-filter {
    padding: 6px 14px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mw-filter:hover {
    border-color: var(--agent-market-watch);
    color: var(--agent-market-watch);
}

.mw-filter.active {
    background: color-mix(in srgb, var(--agent-market-watch) 15%, transparent);
    border-color: var(--agent-market-watch);
    color: var(--agent-market-watch);
}

.mw-calendar-list,
.mw-news-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loading-state {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

/* Calendar events */
.calendar-event {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border-left: 3px solid var(--text-muted);
}

.calendar-event.impact-high {
    border-left-color: #ef4444;
}

.calendar-event.impact-medium {
    border-left-color: #f97316;
}

.calendar-event.impact-low {
    border-left-color: #eab308;
}

.event-time {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 50px;
}

.event-info {
    flex: 1;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.event-country {
    font-size: 1.1rem;
}

.event-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.event-impact {
    font-size: 0.9rem;
}

.event-data {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* News items */
.news-item {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-item:hover {
    background: var(--bg-hover);
}

.news-item.breaking {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.news-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #ef4444;
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 8px;
}

.news-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.news-summary {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============ LEARNING PATH PAGE ============ */
.lp-quiz-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.lp-quiz-header {
    text-align: center;
    margin-bottom: 24px;
}

.lp-quiz-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lp-quiz-header p {
    color: var(--text-muted);
}

.lp-quiz-progress {
    margin-bottom: 32px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--agent-learning-path);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.lp-quiz-content {
    max-width: 600px;
    margin: 0 auto;
}

.quiz-question h4 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: var(--agent-learning-path);
    background: color-mix(in srgb, var(--agent-learning-path) 10%, transparent);
}

.quiz-option.selected {
    border-color: var(--agent-learning-path);
    background: color-mix(in srgb, var(--agent-learning-path) 20%, transparent);
}

/* Learning Path Results */
.lp-results-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lp-profile-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.profile-result {
    max-width: 500px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    justify-content: center;
}

.profile-icon {
    font-size: 2rem;
}

.profile-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-traits {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.trait {
    background: var(--bg-secondary);
    padding: 14px;
    border-radius: 10px;
    text-align: center;
}

.trait-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.trait-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--agent-learning-path);
}

.reset-quiz-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-quiz-btn:hover {
    border-color: var(--agent-learning-path);
    color: var(--agent-learning-path);
}

/* Timeline */
.lp-timeline {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
}

.lp-timeline h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.timeline-steps {
    position: relative;
    padding-left: 40px;
}

.timeline-steps::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.timeline-step {
    position: relative;
    margin-bottom: 24px;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--bg-secondary);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.timeline-step.completed .step-marker {
    background: var(--agent-learning-path);
    border-color: var(--agent-learning-path);
    color: white;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-duration {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.step-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.step-content li {
    padding: 6px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.timeline-summary {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.timeline-summary span {
    padding: 8px 16px;
    background: color-mix(in srgb, var(--agent-learning-path) 15%, transparent);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--agent-learning-path);
}

/* ============ LUCIDE ICONS ============ */
.agent-card-icon svg,
.agent-icon svg,
.header-icon svg,
.footer-icon svg,
.section-icon svg,
.empty-icon svg,
.profile-icon svg,
.step-icon svg,
.li-icon svg,
.summary-icon svg,
.back-btn svg,
.chat-header svg,
.message-sender svg,
.quick-action-btn svg,
.agent-card-btn svg,
.reset-quiz-btn svg {
    display: inline-block;
    vertical-align: middle;
    stroke: currentColor;
}

.agent-card-icon {
    color: var(--agent-color);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.agent-card-icon svg {
    width: 32px;
    height: 32px;
}

.header-icon,
.footer-icon,
.section-icon,
.step-icon,
.li-icon,
.summary-icon {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    color: var(--agent-color, var(--text-muted));
}

.empty-icon {
    color: var(--agent-color, var(--text-muted));
    opacity: 0.6;
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-icon svg {
    width: 48px;
    height: 48px;
}

.profile-icon svg {
    color: var(--agent-learning-path);
}

.back-btn svg,
.agent-card-btn svg,
.quick-action-btn svg,
.reset-quiz-btn svg {
    margin-right: 6px;
}

.chat-input-area button svg {
    display: block;
    margin: auto;
}

/* ============ IMPACT DOTS ============ */
.impact-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #9ca3af;
}

.impact-dot.high {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.impact-dot.medium {
    background: #f97316;
    box-shadow: 0 0 6px rgba(249, 115, 22, 0.5);
}

.impact-dot.low {
    background: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.5);
}

/* Breaking news dot */
.breaking-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    margin-right: 4px;
    animation: pulse-breaking 1.5s infinite;
}

@keyframes pulse-breaking {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .agents-selector-page {
        padding: 20px 16px;
    }

    .agents-header h1 {
        font-size: 1.8rem;
    }

    .agent-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .agent-title h1 {
        font-size: 1.2rem;
    }

    .profile-traits {
        grid-template-columns: 1fr;
    }

    .timeline-summary {
        flex-direction: column;
        align-items: center;
    }
}
