/* Floating Action Button (FAB) */
.fab-btn {
    position: fixed;
    right: 22px;
    bottom: 28px;
    z-index: 120;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 60%, #10b981 100%);
    box-shadow: 0 8px 32px rgba(59,130,246,0.22), 0 2px 8px rgba(16,185,129,0.12);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.18s;
}
.fab-btn:hover {
    box-shadow: 0 12px 40px rgba(59,130,246,0.32), 0 4px 16px rgba(16,185,129,0.18);
    transform: translateY(-2px) scale(1.04);
}
.fab-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

@media (max-width: 640px) {
    .fab-btn {
        right: 14px;
        bottom: 16px;
        width: 52px;
        height: 52px;
    }
    .fab-img {
        width: 30px;
        height: 30px;
    }
}
:root {
    --bg-primary: #08091f;
    --bg-surface: #191f39;
    --bg-card: #1e293b;
    --bg-hover: #0f1729;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(59, 130, 246, 0.5);
    --border-premium: rgba(96, 165, 250, 0.2);
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --blue-light: #60a5fa;
    --green: #10b981;
    --green-light: #34d399;
    --amber: #f59e0b;
    --text-primary: #f0f4f8;
    --text-mid: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --container: 1200px;
    --glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --glow-green: 0 0 20px rgba(16, 185, 129, 0.12);
    --mobile-tab-bar: 58px;
    --mobile-tab-fab-size: 50px;
    --nav-height: 52px;
}

/* FontAwesome icon tweaks used across the UI */
.pill-icon,
.icon {
    margin-right: 8px;
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    color: currentColor;
}

.prompt-pill .pill-icon svg,
.prompt-pill .pill-icon,
.prompt-pill .icon {
    margin-right: 8px;
}

.prompt-pill .icon {
    opacity: 0.95;
    width: 16px;
    height: 16px;
}

.main-stock-pill .icon,
.stock-pill .icon {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    color: var(--text-mid);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    min-height: 100dvh;
    font-family: 'Segoe UI', 'Helvetica Neue', Inter, -apple-system, sans-serif;
    background: linear-gradient(180deg, #08091f 0%, #191f39 50%, #0f1729 100%);
    color: var(--text-primary);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    display: flex;
    flex-direction: column;
}

html {
    overflow-x: hidden;
    font-size: 0.8rem;
}

a {
    color: inherit;
    text-decoration: none;
}

.ai-page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 25%, rgba(59, 130, 246, 0.14) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.11) 0%, transparent 50%),
        radial-gradient(circle at 50% -20%, rgba(96, 165, 250, 0.08) 0%, transparent 60%);
}

.ai-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
    height: var(--nav-height);
    border-bottom: 1px solid var(--border-premium);
    background: rgba(8, 9, 31, 0.92);
    backdrop-filter: blur(24px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.nav-wrap {
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

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

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-logo-img {
    width: auto;
    height: 24px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.35));
    transition: filter 0.3s ease;
}

.nav-brand:hover .brand-logo-img {
    filter: drop-shadow(0 4px 12px rgba(59, 130, 246, 0.45));
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.logo-ai {
    color: var(--blue);
}

.ai-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.42);
    color: var(--green-light);
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 1.7s infinite;
}

@keyframes pulse {
    0%,
    100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(1.35); }
}

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

.nav-center a {
    color: var(--text-mid);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.nav-center a:hover {
    color: var(--text-primary);
}

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

a.btn-live-market.mobile-live-market {
    display: none;
}

.btn-live-market {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px 5px 6px;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    white-space: nowrap;
    color: #93c5fd;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(96, 165, 250, 0.42);
    box-shadow:
        0 2px 10px rgba(59, 130, 246, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.btn-live-market-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #bfdbfe;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.35), rgba(34, 211, 238, 0.15));
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.btn-live-market-text {
    line-height: 1;
}

.btn-live-market-dot {
    width: 6px;
    height: 6px;
    background: #60a5fa;
    box-shadow: 0 0 8px rgba(96, 165, 250, 0.65);
}

.btn-live-market:hover {
    color: #dbeafe;
    border-color: rgba(125, 211, 252, 0.55);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.16));
    box-shadow:
        0 4px 18px rgba(59, 130, 246, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.btn-live-market:hover .btn-live-market-icon {
    color: #fff;
    border-color: rgba(125, 211, 252, 0.4);
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.5), rgba(34, 211, 238, 0.25));
}

.btn-live-market:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(59, 130, 246, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: #dbeafe;
}

.mobile-drawer {
    display: none;
}

.mobile-drawer-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(10, 14, 39, 0.96);
}

.mobile-drawer-inner a {
    color: var(--text-mid);
    font-size: 0.9rem;
}

.mobile-drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.btn-ghost-nav,
.btn-blue-nav {
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-ghost-nav {
    color: var(--text-mid);
    border: 1px solid var(--border-subtle);
}

.btn-ghost-nav:hover {
    border-color: var(--border-focus);
    color: var(--text-primary);
}

.btn-blue-nav {
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4), 0 0 40px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-blue-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.btn-blue-nav:hover::before {
    left: 100%;
}

.btn-blue-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.45), 0 0 50px rgba(59, 130, 246, 0.15);
}

.ai-main {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    padding: 8px 12px 6px;
    overflow: hidden;
}

.ai-workspace {
    /* width: 100%; */
    max-width: 100%;
    margin: 0 6%;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr) 248px;
    gap: 10px;
    align-items: stretch;
    box-sizing: border-box;
}

.ai-workspace > .left-drawer,
.ai-workspace > .right-drawer,
.ai-workspace > .workspace-center {
    min-height: 0;
}

.hero-section {
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 4px 4px 2px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.2) transparent;
}

.hero-section::-webkit-scrollbar {
    width: 4px;
}

.hero-section::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 999px;
}

.mobile-section-tabs,
.mobile-bottom-nav {
    display: none;
}

.mobile-bottom-nav-inner {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.workspace-drawer {
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.72);
    border-radius: 14px;
    padding: 10px;
    position: relative;
    top: auto;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
}

.left-drawer {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.drawer-header {
    position: relative;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.drawer-kicker {
    color: #22d3ee;
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.drawer-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.drawer-title-accent {
    width: 3px;
    height: 18px;
    border-radius: 999px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #3b82f6, #22d3ee);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.drawer-title {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.feed-live-badge {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.22);
}

.feed-live-badge .pulse-dot {
    width: 5px;
    height: 5px;
}

.drawer-feed-scroll {
    flex: 1 1 0;
    min-height: 0;
    max-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) rgba(148, 163, 184, 0.08);
}

.drawer-feed-scroll::-webkit-scrollbar {
    width: 5px;
}

.drawer-feed-scroll::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.06);
    border-radius: 999px;
}

.drawer-feed-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.drawer-feed-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.drawer-feed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-right: 2px;
}

.drawer-feed-list:not(.has-items) {
    min-height: 100%;
}

.drawer-feed-empty {
    flex: 1;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 12px;
    text-align: center;
    color: var(--text-faint);
}

.drawer-feed-empty svg {
    opacity: 0.4;
    color: var(--text-muted);
}

.drawer-feed-empty p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    max-width: 200px;
}

.drawer-feed-list.has-items .drawer-feed-empty {
    display: none;
}

.drawer-feed-cards {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.drawer-feed-stocks {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.drawer-feed-stocks-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.72);
    padding: 0 2px;
}

.drawer-feed-stocks-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.drawer-feed-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-mid);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.drawer-feed-stock-pill:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.drawer-feed-stock-pill.is-buy {
    border-color: rgba(74, 222, 128, 0.28);
}

.drawer-feed-stock-pill.is-sell {
    border-color: rgba(248, 113, 113, 0.28);
}

.drawer-feed-stock-symbol {
    color: var(--text-primary);
}

.drawer-feed-stock-signal {
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.drawer-message-card {
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    padding: 8px 10px 8px 12px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.drawer-message-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: rgba(148, 163, 184, 0.2);
}

.drawer-message-card--bullish::before {
    background: linear-gradient(180deg, #4ade80, #22c55e);
}

.drawer-message-card--neutral::before {
    background: linear-gradient(180deg, #60a5fa, #3b82f6);
}

.drawer-message-card--alert::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.drawer-message-card:hover {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(15, 23, 42, 0.72);
    transform: translateY(-1px);
}

.drawer-message-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.drawer-ai-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(34, 211, 238, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.drawer-ai-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
    font-weight: 800;
    color: #dbeafe;
    background: linear-gradient(135deg, var(--blue), var(--green));
}

.drawer-message-meta {
    flex: 1;
    min-width: 0;
}

.drawer-message-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.drawer-message-time {
    margin-top: 1px;
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-faint);
}

.drawer-message-tag {
    flex-shrink: 0;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.drawer-message-tag--bullish {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.drawer-message-tag--alert {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.22);
}

.drawer-message-card p,
.drawer-message-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    padding-left: 36px;
}

.drawer-message-price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
}

.drawer-message-change {
    font-size: 0.75rem;
    font-weight: 600;
}

.drawer-message-change.is-up {
    color: #4ade80;
}

.drawer-message-change.is-down {
    color: #f87171;
}

.drawer-message-confidence {
    font-size: 0.6875rem;
    color: var(--text-faint);
}

.drawer-message-query {
    margin: 5px 0 0;
    padding-left: 0;
    color: var(--text-mid);
    font-size: 0.71875rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.automation-lines {
    display: grid;
    gap: 6px;
}

.automation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.45);
    color: var(--text-mid);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.automation-item:hover {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.06);
}

.automation-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.16);
}

.drawer-title-accent--amber {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.right-drawer {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.drawer-body-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.25) transparent;
}

.drawer-body-scroll::-webkit-scrollbar {
    width: 4px;
}

.drawer-body-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.25);
    border-radius: 999px;
}

.drawer-divider {
    margin: 10px 0;
    height: 1px;
    background: rgba(148, 163, 184, 0.1);
}

.drawer-stocks-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.drawer-subtitle {
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.drawer-stocks-hint {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stock-list-wrap,
.stock-pill-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-row-item {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 10px;
    padding: 7px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
    overflow: hidden;
}

.stock-row-item::after {
    display: none !important;
}

.stock-row-item:hover {
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.06);
    transform: translateY(-1px);
}

.stock-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stock-row-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.stock-row-item.stock-pill {
    display: flex;
}

.pill-symbol {
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pill-change {
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pill-change.positive {
    color: #4ade80;
}

.pill-change.negative {
    color: #f87171;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    border-radius: var(--radius-pill);
    padding: 5px 12px;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
}

.hero-title {
    margin: 10px 0 6px;
    font-size: clamp(1.35rem, 3.2vw, 1.65rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-weight: 800;
    text-rendering: optimizeLegibility;
}

/* When chat history is present, hide the hero badge/title/subtitle to avoid overlap */
.hero-section.hero-collapsed .hero-badge,
.hero-section.hero-collapsed .hero-title,
.hero-section.hero-collapsed .hero-subtitle {
    display: none !important;
}

.hero-section.hero-collapsed .hero-chat-wrap {
    margin-top: 0;
}

.hero-section.hero-collapsed .chat-thread-head {
    margin-bottom: 0;
}

.hero-section.hero-collapsed .chat-response-area.has-items {
    padding-top: 2px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.hero-title-gradient {
    background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    margin: 0 auto;
    max-width: 520px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    font-weight: 400;
}

.hero-chat-wrap {
    margin: 10px auto 0;
    width: 100%;
    max-width: 540px;
}

.chat-thread-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 2px;
    padding: 0 1px;
    min-height: 30px;
}

.thread-head-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}

.thread-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    margin-left: auto;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.08);
    color: var(--blue-light);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.thread-download-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(96, 165, 250, 0.55);
    color: #fff;
}

.thread-download-btn svg {
    flex-shrink: 0;
}

.thread-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.thread-icon svg {
    width: 13px;
    height: 13px;
}

.thread-title {
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
}

.thread-subtitle {
    color: var(--text-faint);
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
}

.chat-response-area {
    max-width: 540px;
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 6px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-height: 260px;
    overflow: hidden;
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    text-align: center;
    color: var(--text-faint);
}

.chat-empty-state svg {
    opacity: 0.45;
    color: var(--text-muted);
}

.chat-empty-state p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    max-width: 260px;
}

.chat-response-area.has-items {
    padding: 2px 3px 3px;
}

.chat-response-area.has-items .chat-empty-state {
    display: none;
}

.chat-response-area.has-items .chat-thread-scroll {
    gap: 4px;
    padding: 0 1px 1px 0;
}

.chat-thread-scroll {
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 2px 4px 2px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.28) transparent;
}

.chat-thread-scroll::-webkit-scrollbar {
    width: 5px;
}

.chat-thread-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.chat-thread-scroll::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.28);
    border-radius: 999px;
}

.chat-thread-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.4);
}

.chat-thread-item {
    display: block;
    animation: slideUp 0.28s ease;
}

.chat-bubble {
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.user-bubble {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.22);
}

.ai-bubble {
    background: rgba(26, 34, 54, 0.55);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.bubble-head {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--blue-light);
    margin-bottom: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bubble-body {
    color: var(--text-mid);
    font-size: 0.875rem;
    line-height: 1.5;
}

.processing-bubble {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.06);
}

.processing-line + .processing-line {
    margin-top: 6px;
}

.spinner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
    background: var(--blue-light);
    animation: pulse 1.2s infinite;
}

.error-bubble {
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.08);
}

.error-help {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 6px;
}

.error-query {
    color: #fca5a5;
    font-size: 0.8125rem;
    margin-top: 4px;
}

.compact-head {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.compact-signal-strip {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
}

.compact-signal-strip .signal-badge {
    margin-top: 0;
    flex-shrink: 0;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compact-signal-text {
    color: var(--text-mid);
    font-size: 0.8125rem;
    line-height: 1.4;
}

.compact-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.compact-price-grid .price-metric,
.compact-price-grid div {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 10px 12px;
    text-align: left;
    transition: border-color 0.2s ease;
}

.compact-price-grid .price-metric:hover,
.compact-price-grid div:hover {
    border-color: rgba(59, 130, 246, 0.2);
}

.compact-price-grid span {
    display: block;
    color: var(--text-faint);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.compact-price-grid strong {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.compact-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.compact-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.compact-title {
    color: var(--text-muted);
    font-size: 0.6875rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ta-row {
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 10px;
    padding: 10px 12px;
}

.ta-row + .ta-row {
    margin-top: 6px;
}

.ta-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ta-metric {
    color: var(--text-mid);
    font-size: 0.8125rem;
    font-weight: 600;
}

.ta-value {
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ta-insight {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.compact-list {
    margin: 0;
    padding-left: 16px;
    color: var(--text-mid);
    display: grid;
    gap: 6px;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.compact-list li::marker {
    color: var(--blue-light);
}

.compact-empty {
    color: var(--text-faint);
    font-size: 0.8125rem;
    font-style: italic;
}

.analysis-card {
    padding: 14px 16px;
}

.trader-report-card {
    padding: 0;
    text-align: left;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(8, 12, 28, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.trader-report-card .compact-head {
    padding: 12px 14px 10px;
    margin: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.55);
}

.trader-report-card > .trader-verdict,
.trader-report-card > .trader-panel,
.trader-report-card > .trader-split-row,
.trader-report-card > .next-action-bar {
    margin-left: 12px;
    margin-right: 12px;
}

.trader-report-card > .trader-verdict {
    margin-top: 12px;
}

.trader-report-card > .next-action-bar {
    margin-bottom: 4px;
}

.trader-verdict {
    position: relative;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 52%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(10, 16, 34, 0.95));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.trader-verdict::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: linear-gradient(180deg, #60a5fa, #22d3ee);
}

.trader-verdict.verdict-buy::before {
    background: linear-gradient(180deg, #4ade80, #16a34a);
}

.trader-verdict.verdict-sell::before {
    background: linear-gradient(180deg, #fb7185, #ef4444);
}

.trader-verdict.verdict-wait::before {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.trader-verdict-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.trader-verdict-kicker {
    font-size: 0.5625rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #67e8f9;
}

.trader-verdict-stock {
    margin-top: 4px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.trader-verdict-signal {
    margin-top: 0;
    padding: 7px 14px;
    font-size: 0.6875rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.trader-verdict-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.verdict-stat {
    padding: 9px 10px;
    border-radius: 11px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.verdict-stat-highlight {
    border-color: rgba(34, 211, 238, 0.22);
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.08), rgba(2, 6, 23, 0.45));
}

.verdict-stat span {
    display: block;
    font-size: 0.5625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 4px;
}

.verdict-stat strong {
    font-size: 0.8125rem;
    color: #f1f5f9;
    font-weight: 700;
    line-height: 1.35;
}

.verdict-stat strong em {
    font-style: normal;
    color: #4ade80;
    font-weight: 700;
    font-size: 0.75rem;
}

.live-price-text {
    color: #93c5fd !important;
}

.trader-panel {
    margin-top: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.38);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.trader-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #cbd5e1;
}

.trader-block-accent {
    width: 3px;
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #3b82f6, #22d3ee);
    flex-shrink: 0;
}

.trader-block-accent-warn {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.trade-setup-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.setup-cell {
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.setup-cell span {
    display: block;
    font-size: 0.5625rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 5px;
}

.setup-cell strong {
    display: block;
    font-size: 0.8125rem;
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
}

.setup-entry {
    grid-column: 1 / -1;
    border-color: rgba(59, 130, 246, 0.24);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(15, 23, 42, 0.72));
}

.setup-target strong {
    color: #4ade80;
}

.setup-stop strong {
    color: #f87171;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.why-panel {
    padding: 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.why-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.why-panel-icon {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    flex-shrink: 0;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.24);
    position: relative;
}

.why-panel-icon::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 2px;
    background: #93c5fd;
    opacity: 0.9;
}

.why-icon-volume::after {
    inset: 7px 5px;
    border-radius: 999px 999px 2px 2px;
}

.why-icon-trend::after {
    inset: 8px 5px 5px;
    clip-path: polygon(0 100%, 45% 35%, 70% 55%, 100% 0, 100% 100%);
    border-radius: 0;
    background: #67e8f9;
}

.why-panel-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #dbeafe;
}

.why-factor-list {
    display: grid;
    gap: 7px;
}

.why-factor {
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-left: 3px solid rgba(148, 163, 184, 0.28);
}

.why-factor.tone-bullish {
    border-left-color: #22c55e;
}

.why-factor.tone-bearish {
    border-left-color: #ef4444;
}

.why-factor.tone-neutral {
    border-left-color: #64748b;
}

.why-factor-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.why-factor-metric {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #e2e8f0;
}

.why-factor-value {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #93c5fd;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.why-factor-insight {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #94a3b8;
}

.trader-split-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.trader-panel-half {
    margin-top: 0;
}

.conf-meter-list {
    display: grid;
    gap: 10px;
}

.conf-meter-row {
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.conf-meter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.conf-meter-label {
    font-size: 0.6875rem;
    color: #cbd5e1;
    font-weight: 600;
}

.conf-meter-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

.conf-meter-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #22d3ee);
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.28);
}

.conf-meter-row.tier-high .conf-meter-fill {
    background: linear-gradient(90deg, #22c55e, #2dd4bf);
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.28);
}

.conf-meter-row.tier-mid .conf-meter-fill {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

.conf-meter-value {
    font-size: 0.75rem;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

.trader-panel-risk {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.05), rgba(2, 6, 23, 0.38));
}

.risk-factor-list {
    display: grid;
    gap: 7px;
}

.risk-factor-card {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(245, 158, 11, 0.16);
}

.risk-factor-icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border-radius: 999px;
    flex-shrink: 0;
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.35);
    position: relative;
}

.risk-factor-icon::after {
    content: "!";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 800;
    color: #fbbf24;
}

.risk-factor-card p {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.45;
    color: #fde68a;
    text-align: left;
}

.scenario-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.scenario-card {
    padding: 10px 11px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(15, 23, 42, 0.55);
}

.scenario-label {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.scenario-card p {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #cbd5e1;
    text-align: left;
}

.scenario-card.bull {
    border-color: rgba(34, 197, 94, 0.2);
}

.scenario-card.bull .scenario-label {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.18);
}

.scenario-card.bear {
    border-color: rgba(239, 68, 68, 0.2);
}

.scenario-card.bear .scenario-label {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.trader-panel-timing .timing-insight {
    margin: 0;
    padding: 10px 11px;
    border-radius: 11px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.16);
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #dbeafe;
    text-align: left;
}

.hist-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.hist-outcomes {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.outcome-chip {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 800;
}

.outcome-chip.win {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
}

.outcome-chip.loss {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
}

.hist-rate,
.hist-empty {
    font-size: 0.75rem;
    color: #94a3b8;
}

.alert-chip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.alert-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 10px;
    font-size: 0.6875rem;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
}

.alert-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22d3ee;
    box-shadow: 0 0 8px rgba(34, 211, 238, 0.55);
    flex-shrink: 0;
}

.next-action-bar {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.next-action-icon {
    width: 24px;
    height: 24px;
    border-radius: 8px;
    flex-shrink: 0;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.28);
    position: relative;
}

.next-action-icon::after {
    content: "→";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4ade80;
    font-size: 0.8125rem;
    font-weight: 800;
}

.next-action-copy {
    min-width: 0;
}

.next-action-label {
    display: block;
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #4ade80;
    margin-bottom: 3px;
}

.next-action-bar p {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #f8fafc;
    text-align: left;
}

.trader-report-card .compact-actions {
    margin: 0 8px 2px;
    padding: 4px 0 2px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.trader-report-card .signal-action-pills.compact-actions {
    flex-wrap: nowrap;
}

.trader-report-card .next-action-bar {
    margin: 8px 8px 2px;
    padding: 8px 10px;
}

@media (min-width: 720px) {
    .why-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .trader-split-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .scenario-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trader-verdict-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

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

.price-metric.price-target {
    border-color: rgba(34, 197, 94, 0.15);
}

.price-metric.price-stop {
    border-color: rgba(239, 68, 68, 0.15);
}

.price-metric.price-live strong {
    color: var(--blue-light);
}

.compact-signal-strip .signal-badge::before {
    display: none;
}

.search-bar-wrap {
    width: 100%;
    margin-top: 4px;
}

.search-icon,
.send-icon {
    display: block;
    flex-shrink: 0;
}

.search-divider {
    width: 1px;
    height: 26px;
    flex-shrink: 0;
    background: rgba(148, 163, 184, 0.2);
}

.search-field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-input-box {
    width: 100%;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    padding: 4px 5px 4px 6px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input-box:focus-within {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow:
        0 8px 32px rgba(59, 130, 246, 0.14),
        0 0 0 3px rgba(59, 130, 246, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transform: none;
}

.chat-input-inner {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
}

.main-stock-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 10px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-mid);
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.main-stock-pill:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

.main-stock-pill .search-icon {
    color: var(--blue-light);
    opacity: 0.9;
}

.stock-pill-text {
    max-width: 88px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-bot-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(34, 211, 238, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.22);
}

.chat-text-input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 38px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.4;
}

.chat-text-input::placeholder {
    color: var(--text-faint);
    opacity: 1;
}

.chat-text-input::-webkit-search-cancel-button,
.chat-text-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(145deg, var(--blue) 0%, var(--blue-dark) 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
}

.chat-send-btn:active {
    transform: translateY(0);
}

.chat-send-btn.active {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22), 0 6px 20px rgba(59, 130, 246, 0.4);
}

.send-arrow {
    font-size: 1.1rem;
    line-height: 1;
}

.prompt-pills-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 4px;
    overflow: hidden;
}

.prompt-pills-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 8px;
    width: 40px;
    background: linear-gradient(to left, rgba(8, 9, 31, 0.95) 20%, transparent);
    pointer-events: none;
    z-index: 1;
}

.prompt-pills-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    padding: 2px 36px 4px 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.prompt-pills-row::-webkit-scrollbar {
    display: none;
}

.stock-suggest-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 4px;
    overflow: hidden;
}

.stock-suggest-wrap[hidden] {
    display: none !important;
}

.stock-suggest-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px 4px;
}

.stock-suggest-label {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stock-suggest-hint {
    font-size: 0.625rem;
    color: var(--text-faint);
}

.stock-suggest-wrap::after {
    content: "";
    position: absolute;
    top: 18px;
    right: 0;
    bottom: 4px;
    width: 36px;
    background: linear-gradient(to left, rgba(8, 9, 31, 0.96) 15%, transparent);
    pointer-events: none;
    z-index: 1;
}

.stock-suggest-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scroll-snap-type: x proximity;
    padding: 2px 32px 4px 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.stock-suggest-row::-webkit-scrollbar {
    height: 4px;
}

.stock-suggest-row::-webkit-scrollbar-track {
    background: transparent;
}

.stock-suggest-row::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.stock-suggest-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 118px;
    max-width: 168px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: rgba(15, 23, 42, 0.88);
    color: var(--text-mid);
    cursor: pointer;
    flex: 0 0 auto;
    scroll-snap-align: start;
    text-align: left;
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.15s ease,
        box-shadow 0.18s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.stock-suggest-pill:hover,
.stock-suggest-pill:focus-visible {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(30, 58, 138, 0.35);
    color: var(--text-primary);
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.18);
}

.stock-suggest-symbol {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stock-suggest-name {
    font-size: 0.6875rem;
    color: var(--text-muted);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stock-suggest-price {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--green-light);
}

.stock-suggest-price-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.stock-suggest-change {
    font-size: 0.625rem;
    font-weight: 700;
}

.stock-suggest-change.is-up {
    color: var(--green-light);
}

.stock-suggest-change.is-down {
    color: #f87171;
}

.stock-suggest-empty {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.45);
    text-align: left;
}

.stock-suggest-empty-title {
    margin: 0 0 6px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fbbf24;
}

.stock-suggest-empty-text {
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.prompt-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-mid);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 0 auto;
    scroll-snap-align: start;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prompt-pill::before {
    display: none;
}

.prompt-pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.16);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.prompt-pill-icon svg {
    display: block;
}

.prompt-pill-icon--alert {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.18);
}

.prompt-pill-text {
    padding-right: 2px;
}

.wishlist-scroll-block {
    margin-bottom: 6px;
}

.wishlist-scroll-head {
    display: flex;
    align-items: center;
    padding: 0 2px 4px;
}

.wishlist-scroll-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.72);
}

.wishlist-scroll-label svg {
    color: #fbbf24;
    flex-shrink: 0;
}

.wishlist-pills-row {
    padding-top: 0;
}

.wishlist-pill-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.wishlist-pill {
    padding-right: 10px;
}

.wishlist-pill--add {
    border-color: rgba(251, 191, 36, 0.22);
    background: rgba(251, 191, 36, 0.06);
}

.wishlist-pill--add:hover {
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(251, 191, 36, 0.12);
}

.wishlist-pill--login {
    border-color: rgba(59, 130, 246, 0.24);
}

.prompt-pill-icon--wishlist {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    border-color: rgba(251, 191, 36, 0.2);
}

.prompt-pill-icon--wishlist-add {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.24);
}

.wishlist-pill-change {
    font-size: 0.6875rem;
    font-weight: 600;
    margin-left: 2px;
}

.wishlist-pill-change.is-up {
    color: #4ade80;
}

.wishlist-pill-change.is-down {
    color: #f87171;
}

.wishlist-pill-remove {
    position: absolute;
    top: -4px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.95);
    color: rgba(148, 163, 184, 0.9);
    font-size: 0.8125rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    z-index: 2;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wishlist-pill-remove:hover {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.45);
    background: rgba(127, 29, 29, 0.35);
}

.wishlist-empty-hint {
    display: inline-flex;
    align-items: center;
    padding: 6px 4px;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.65);
    white-space: nowrap;
    flex: 0 0 auto;
}

.action-wishlist.is-saved {
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.1);
}

.action-wishlist.is-saved .action-pill-icon {
    color: #fbbf24;
}

.prompt-pill:hover {
    border-color: rgba(59, 130, 246, 0.32);
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.prompt-pill:hover .prompt-pill-icon {
    color: #fcd34d;
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.24);
}

.prompt-pill.active {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
    color: var(--text-primary);
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 4px 16px rgba(59, 130, 246, 0.15);
    transform: none;
}

.prompt-pill.active .prompt-pill-icon {
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.28);
}

.prompt-pill.active .prompt-pill-icon--alert {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.28);
}

.prompt-pill:active {
    transform: scale(0.98);
}

.chat-response-card,
.signal-summary-panel,
.generic-response-card {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 22px;
    animation: slideDown 0.26s ease;
}

.generic-response-card {
    color: var(--text-mid);
    line-height: 1.6;
}

.chat-response-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(34, 211, 238, 0.25));
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.chat-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.chat-sender {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.chat-time {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-faint);
}

.signal-stock-name {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
}

.signal-badge {
    padding: 4px 11px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 8px;
}

.signal-badge.buy {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

.signal-badge.sell {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.28);
}

.signal-badge.hold {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
}

.signal-quick-stats,
.signal-prices {
    margin-top: 10px;
}

.stat-row,
.price-row,
.accuracy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
}

.stat-label,
.price-label,
.acc-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.stat-value,
.price-value,
.acc-value {
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
}

.confidence-high,
.green-text,
.buy-text,
.price-value.target {
    color: #4ade80;
}

.red-text,
.price-value.stoploss {
    color: #f87171;
}

.risk-medium,
.amber-text {
    color: #fcd34d;
}

.signal-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0;
}

.signal-action-pills {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.compact-actions {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.signal-action-pills.compact-actions,
.signal-action-pills.action-icon-row,
.compact-actions.action-icon-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    margin-top: 6px;
    padding-top: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
}

.signal-action-pills.compact-actions::-webkit-scrollbar,
.signal-action-pills.action-icon-row::-webkit-scrollbar,
.compact-actions.action-icon-row::-webkit-scrollbar {
    display: none;
}

.action-pill-compact {
    flex: 1 1 0;
    min-width: 52px;
    max-width: none;
    width: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    text-align: center;
    text-decoration: none;
}

.action-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.action-pill-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.action-pill {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    letter-spacing: 0.02em;
    text-transform: none;
    position: relative;
    overflow: hidden;
}

.action-pill.unlock {
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.action-pill.unlock::before {
    display: none;
}

.action-pill.unlock:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.action-pill.summary {
    color: var(--text-mid);
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.action-pill.summary:hover {
    border-color: rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: none;
}

.action-pill.download {
    color: var(--blue-light);
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: none;
}

.action-pill.download:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(59, 130, 246, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.chat-thread-head .thread-download-btn[hidden] {
    display: none !important;
}

.thread-download-btn.is-downloading,
.action-pill.download.is-downloading {
    opacity: 0.65;
    pointer-events: none;
}

.action-pill.paper-buy {
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.32);
    background: rgba(34, 197, 94, 0.1);
}

.action-pill.paper-buy:hover {
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.action-pill.paper-sell {
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.32);
    background: rgba(239, 68, 68, 0.08);
}

.action-pill.paper-sell:hover {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(239, 68, 68, 0.16);
    color: #fecaca;
}

.action-pill.paper-portfolio {
    color: #c4b5fd;
    border: 1px solid rgba(167, 139, 250, 0.32);
    background: rgba(139, 92, 246, 0.1);
}

.action-pill.paper-portfolio:hover {
    border-color: rgba(196, 181, 253, 0.5);
    background: rgba(139, 92, 246, 0.18);
    color: #ede9fe;
}

.paper-trade-card.trader-report-card,
.paper-portfolio-card.trader-report-card {
    padding: 0;
    text-align: left;
    border-radius: 14px;
    overflow: hidden;
}

.paper-trade-card.is-success {
    border-color: rgba(34, 197, 94, 0.22);
}

.paper-trade-card.is-failed {
    border-color: rgba(239, 68, 68, 0.28);
}

.paper-trade-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(10, 16, 34, 0.88));
}

.paper-trade-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.paper-trade-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

.paper-trade-icon.buy {
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.1);
}

.paper-trade-icon.sell {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.1);
}

.paper-trade-icon.portfolio {
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.28);
    background: rgba(139, 92, 246, 0.12);
}

.paper-trade-kicker {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-faint);
    line-height: 1.2;
}

.paper-trade-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
}

.paper-status-chip {
    flex-shrink: 0;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.paper-status-chip.is-success {
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.1);
}

.paper-status-chip.is-failed {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.28);
    background: rgba(239, 68, 68, 0.1);
}

.paper-status-chip.is-live {
    color: #93c5fd;
    border-color: rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.1);
}

.paper-trade-body,
.paper-portfolio-body {
    padding: 10px 12px 12px;
}

.paper-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.paper-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 7px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-width: 0;
}

.paper-metric-label {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.paper-metric-value {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}

.paper-metric-value code {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--blue-light);
    background: rgba(59, 130, 246, 0.08);
    padding: 1px 5px;
    border-radius: 4px;
}

.paper-metric-value em {
    font-style: normal;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.paper-symbol {
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.paper-side-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.paper-side-badge.buy {
    color: #4ade80;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.24);
}

.paper-side-badge.sell {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.24);
}

.paper-pnl.positive {
    color: #4ade80;
}

.paper-pnl.negative {
    color: #f87171;
}

.paper-pnl.neutral {
    color: var(--text-muted);
}

.paper-trade-error {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: #fecaca;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.paper-trade-footnote {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    font-size: 0.625rem;
    line-height: 1.4;
    color: var(--text-faint);
    text-align: left;
}

.paper-portfolio-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.paper-stat-tile {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 9px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(148, 163, 184, 0.1);
    min-width: 0;
}

.paper-stat-tile--accent {
    border-color: rgba(59, 130, 246, 0.24);
    background: rgba(59, 130, 246, 0.08);
}

.paper-stat-tile span {
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.paper-stat-tile strong {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    word-break: break-word;
}

.paper-section {
    margin-top: 8px;
}

.paper-section-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-mid);
}

.paper-section-head em {
    font-style: normal;
    font-size: 0.625rem;
    color: var(--text-faint);
    font-weight: 600;
}

.paper-section-accent {
    width: 3px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #60a5fa, #34d399);
    flex-shrink: 0;
}

.paper-table {
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.015);
}

.paper-table--scroll {
    max-height: 180px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.paper-table-head,
.paper-table-row {
    display: grid;
    gap: 4px;
    align-items: center;
    padding: 6px 8px;
    font-size: 0.6875rem;
}

.paper-table-head {
    background: rgba(15, 23, 42, 0.72);
    color: var(--text-faint);
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.paper-table-head--holdings,
.paper-table-row--holdings {
    grid-template-columns: 1.2fr 0.6fr 0.9fr 0.9fr 0.9fr;
}

.paper-table-head--trades,
.paper-table-row--trades {
    grid-template-columns: 1.3fr 0.7fr 0.9fr 0.5fr 0.8fr 0.8fr;
}

.paper-table-row + .paper-table-row {
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.paper-table-row.is-highlight {
    background: rgba(59, 130, 246, 0.08);
}

.paper-cell-symbol {
    font-weight: 700;
    color: var(--text-primary);
}

.paper-cell-muted {
    color: var(--text-muted);
    font-size: 0.625rem;
    line-height: 1.25;
}

.paper-empty-note {
    margin: 0;
    padding: 10px 12px;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.paper-trades-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.paper-trade-card-row {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.paper-trade-card-row:last-child {
    border-bottom: none;
}

.paper-trade-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.paper-trade-card-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
}

.paper-trade-card-left .paper-cell-symbol {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.paper-trade-card-top .paper-pnl {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.paper-trade-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.paper-trade-card-meta {
    font-size: 0.6875rem;
    color: var(--text-mid);
    white-space: nowrap;
}

.paper-trade-card-bottom .paper-cell-muted {
    flex-shrink: 0;
    text-align: right;
}

@media (max-width: 768px) {
    .paper-table--scroll {
        max-height: 240px;
    }

    .paper-table-head--holdings,
    .paper-table-row--holdings {
        grid-template-columns: 1.1fr 0.55fr 0.85fr 0.85fr 0.85fr;
        gap: 3px;
        padding: 6px;
        font-size: 0.625rem;
    }

    .paper-trade-card-row {
        padding: 9px 8px;
    }

    .paper-trade-card-left .paper-cell-symbol {
        max-width: 42vw;
    }
}

@media (max-width: 480px) {
    .paper-portfolio-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .paper-table-head--holdings,
    .paper-table-row--holdings {
        grid-template-columns: 1fr 0.55fr 0.8fr;
    }

    .paper-table-head--holdings span:nth-child(4),
    .paper-table-row--holdings span:nth-child(4),
    .paper-table-head--holdings span:nth-child(5),
    .paper-table-row--holdings span:nth-child(5) {
        display: none;
    }
}

.signal-summary-panel {
    margin-top: 12px;
    background: rgba(12, 18, 32, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.summary-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 8px;
}

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

.ss-label {
    color: var(--text-faint);
    font-size: 0.68rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ss-val {
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.summary-block {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}

.summary-block-title {
    font-size: 0.8rem;
    color: var(--text-mid);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.trade-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 0;
    font-size: 0.8rem;
}

.trade-row span:first-child {
    color: var(--text-muted);
}

.trade-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.reasoning-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reason-item {
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    font-size: 0.78rem;
    color: var(--text-mid);
}

.reason-item.positive {
    border-left: 3px solid rgba(16, 185, 129, 0.75);
    background: rgba(16, 185, 129, 0.08);
}

.reason-item.negative {
    border-left: 3px solid rgba(239, 68, 68, 0.75);
    background: rgba(239, 68, 68, 0.08);
}

.scenario-row {
    border-radius: var(--radius-sm);
    padding: 7px 9px;
    font-size: 0.78rem;
    color: var(--text-mid);
}

.scenario-row + .scenario-row {
    margin-top: 6px;
}

.scenario-row.bull {
    background: rgba(16, 185, 129, 0.08);
}

.scenario-row.bear {
    background: rgba(239, 68, 68, 0.08);
}

.accuracy-history {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.unlock-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(10, 14, 39, 0.84);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.unlock-modal-box {
    width: min(480px, 100%);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(251, 191, 36, 0.35);
    background: #1e293b;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 50px rgba(251, 191, 36, 0.08);
    padding: 34px;
    position: relative;
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.08);
}

.unlock-icon {
    color: #fbbf24;
    font-weight: 800;
    letter-spacing: 0.05em;
    font-size: 1.5rem;
}

.unlock-modal-box h3 {
    margin: 12px 0 8px;
    font-size: 1.35rem;
}

.unlock-modal-box p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.unlock-features {
    margin: 18px 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uf-item {
    color: var(--text-mid);
    font-size: 0.86rem;
}

.btn-unlock-cta {
    display: block;
    border-radius: var(--radius-md);
    color: #fff;
    padding: 12px 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.trade-qty-modal {
    position: fixed;
    inset: 0;
    z-index: 320;
    background: rgba(6, 10, 28, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.trade-qty-modal[hidden] {
    display: none !important;
}

.trade-qty-modal-box {
    width: min(380px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    padding: 20px;
    position: relative;
    text-align: center;
}

.trade-qty-modal.is-buy .trade-qty-modal-box {
    border-color: rgba(74, 222, 128, 0.25);
}

.trade-qty-modal.is-sell .trade-qty-modal-box {
    border-color: rgba(248, 113, 113, 0.25);
}

.trade-qty-top {
    margin-bottom: 16px;
}

.trade-qty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.trade-qty-modal.is-buy .trade-qty-badge {
    color: #86efac;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.trade-qty-modal.is-sell .trade-qty-badge {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.trade-qty-title {
    margin: 0 0 4px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.85);
}

.trade-qty-symbol {
    margin: 0 0 8px;
    font-size: 1.375rem;
    font-weight: 700;
    color: #f8fafc;
}

.trade-qty-price-line {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(148, 163, 184, 0.9);
    font-variant-numeric: tabular-nums;
}

.trade-qty-meta {
    margin: 10px 0 0;
    padding: 8px 12px;
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.16);
}

.trade-qty-meta[hidden] {
    display: none !important;
}

.trade-qty-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 6px;
}

.trade-qty-step {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.trade-qty-step:hover {
    background: rgba(255, 255, 255, 0.1);
}

.trade-qty-input {
    width: 80px;
    height: 48px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 12, 28, 0.6);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    appearance: textfield;
    -moz-appearance: textfield;
    font-variant-numeric: tabular-nums;
}

.trade-qty-input::-webkit-outer-spin-button,
.trade-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.trade-qty-input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.5);
}

.trade-qty-shares-label {
    margin: 0 0 12px;
    font-size: 0.75rem;
    color: rgba(148, 163, 184, 0.7);
}

.trade-qty-presets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.trade-qty-preset {
    min-width: 40px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(226, 232, 240, 0.85);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.trade-qty-preset:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.trade-qty-preset.is-active {
    color: #fff;
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(59, 130, 246, 0.2);
}

.trade-qty-modal.is-buy .trade-qty-preset.is-active {
    border-color: rgba(74, 222, 128, 0.4);
    background: rgba(34, 197, 94, 0.2);
}

.trade-qty-modal.is-sell .trade-qty-preset.is-active {
    border-color: rgba(248, 113, 113, 0.4);
    background: rgba(239, 68, 68, 0.2);
}

.trade-qty-preset--max {
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.25);
}

.trade-qty-error {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    color: #fecaca;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
}

.trade-qty-error[hidden] {
    display: none !important;
}

.trade-qty-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.trade-qty-cancel,
.trade-qty-confirm {
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.trade-qty-cancel {
    color: rgba(226, 232, 240, 0.85);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.trade-qty-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
}

.trade-qty-modal.is-buy .trade-qty-confirm {
    color: #fff;
    background: #22c55e;
}

.trade-qty-modal.is-sell .trade-qty-confirm {
    color: #fff;
    background: #ef4444;
}

.trade-qty-confirm:hover {
    filter: brightness(1.08);
}

@media (max-width: 480px) {
    .trade-qty-modal-box {
        padding: 16px;
    }

    .trade-qty-symbol {
        font-size: 1.25rem;
    }
}

.unlock-sub {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--text-faint);
}

.unlock-sub a {
    color: #93c5fd;
}

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

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

.ai-insights-section {
    width: 100%;
    margin-top: 28px;
}

.ai-insights-wrap {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: start;
}

.section-kicker {
    color: #93c5fd;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.section-title {
    margin: 8px 0 14px;
    font-size: 1.45rem;
    line-height: 1.2;
}

.ai-insights-left {
    display: grid;
    gap: 12px;
}

.ai-message-card {
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 16px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.ai-message-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.ai-message-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ai-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #dbeafe;
    background: linear-gradient(135deg, var(--blue), var(--green));
}

.ai-message-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ai-message-time {
    font-size: 0.7rem;
    color: var(--text-faint);
}

.ai-message-card p {
    margin: 0;
    color: var(--text-mid);
    font-size: 0.83rem;
    line-height: 1.48;
}

.ai-message-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-action-btn {
    border: 1px solid rgba(96, 165, 250, 0.22);
    background: rgba(59, 130, 246, 0.08);
    color: #bfdbfe;
    border-radius: var(--radius-pill);
    padding: 6px 11px;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: pointer;
}

.card-action-btn:hover {
    border-color: rgba(59, 130, 246, 0.45);
}

.watchlist-panel {
    position: sticky;
    top: 82px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 16px;
}

.watchlist-title {
    font-size: 0.92rem;
    font-weight: 700;
}

.watchlist-subtitle {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 0.76rem;
}

.stock-row {
    margin-top: 10px;
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.08);
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.stock-row:hover {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.stock-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stock-symbol {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.stock-sector {
    color: var(--text-faint);
    font-size: 0.7rem;
}

.stock-change {
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.stock-change.positive {
    color: #6ee7b7;
}

.stock-change.negative {
    color: #fca5a5;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.features-section {
    width: 100%;
    margin-top: 30px;
}

.features-wrap {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
}

.features-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 14px;
    padding: 20px;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.08);
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #dbeafe;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.75), rgba(16, 185, 129, 0.75));
}

.feature-card h3 {
    margin: 14px 0 8px;
    font-size: 0.98rem;
    line-height: 1.3;
}

.feature-card p {
    margin: 0;
    color: var(--text-mid);
    font-size: 0.83rem;
    line-height: 1.48;
}

.feature-tags {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    border-radius: var(--radius-pill);
    padding: 5px 11px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #bfdbfe;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background: rgba(59, 130, 246, 0.1);
}

.ai-footer {
    position: relative;
    z-index: 1;
    background: #060b1c;
    border-top: 1px solid var(--border-subtle);
    padding: 46px 20px 22px;
}

.footer-wrap {
    max-width: var(--container);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, 1fr);
    gap: 30px;
    max-width: 100vw;
    box-sizing: border-box;
}

.footer-col-title {
    color: var(--text-mid);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.footer-brand-text {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    max-width: 260px;
}

.footer-brand-logo .brand-logo-img {
    width: auto;
    height: 34px;
    max-width: 145px;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    font-size: 0.88rem;
    padding: 5px 0;
}

.footer-link:hover {
    color: var(--blue);
}

.footer-bottom {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-faint);
    font-size: 0.81rem;
}

.sebi-strip {
    position: relative;
    flex-shrink: 0;
    z-index: 90;
    width: 100%;
    border-top: none;
    background: rgba(8, 9, 31, 0.95);
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.45;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
}

.sebi-strip-inner {
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
    text-wrap: balance;
    color: #e5e7eb;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.07));
    padding: 7px 12px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.32), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

@media (max-width: 1200px) {
    .ai-workspace {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .workspace-drawer {
        position: static;
    }

    .left-drawer {
        order: 2;
    }

    .right-drawer {
        order: 3;
    }

    .workspace-center {
        order: 1;
    }

    .hero-section {
        min-height: auto;
        padding-top: 12px;
    }

    .hero-chat-wrap,
    .chat-response-area {
        max-width: 100%;
    }

    .nav-wrap {
        padding: 0 16px;
        gap: 12px;
    }

    .nav-center {
        gap: 14px;
    }

    .nav-center a {
        font-size: 0.84rem;
    }

    .btn-live-market {
        padding: 4px 10px 4px 5px;
        font-size: 0.7rem;
        gap: 6px;
    }

    .btn-live-market-icon {
        width: 22px;
        height: 22px;
        border-radius: 7px;
    }

    .btn-live-market-icon svg {
        width: 12px;
        height: 12px;
    }

    .btn-live-market-dot {
        width: 5px;
        height: 5px;
    }

    .ai-live-pill {
        font-size: 0.7rem;
        padding: 4px 9px;
    }


}

@media (max-width: 1024px) {
    .nav-center {
        display: none;
    }

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

@media (min-width: 769px) {
    .search-bar-wrap {
        margin-top: 14px;
    }

    .chat-input-box {
        border-radius: 20px;
        padding: 7px 8px 7px 10px;
    }

    .chat-input-inner {
        min-height: 48px;
        gap: 10px;
    }

    .main-stock-pill {
        height: 38px;
        padding: 0 14px;
        font-size: 0.8125rem;
    }

    .stock-pill-text {
        max-width: 100px;
    }

    .search-divider {
        height: 28px;
    }

    .chat-bot-icon {
        width: 34px;
        height: 34px;
    }

    .chat-text-input {
        height: 48px;
        font-size: 0.9375rem;
    }

    .chat-send-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
}

@media (max-width: 768px) {
    html,
    body {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }

    .mobile-section-tabs,
    .mobile-bottom-nav {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 200;
        margin: 0;
        padding: 5px 0 0;
        border: none;
        border-radius: 0;
        isolation: isolate;
        background: linear-gradient(
            180deg,
            rgba(15, 23, 42, 0.82) 0%,
            rgba(8, 9, 31, 0.97) 100%
        );
        backdrop-filter: blur(28px) saturate(1.45);
        -webkit-backdrop-filter: blur(28px) saturate(1.45);
        border-top: 1px solid rgba(148, 163, 184, 0.1);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            0 -10px 40px rgba(0, 0, 0, 0.42);
    }

    .mobile-bottom-nav::before {
        content: "";
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 1px;
        background: linear-gradient(
            90deg,
            transparent,
            rgba(96, 165, 250, 0.45) 50%,
            transparent
        );
        pointer-events: none;
    }

    .mobile-bottom-nav-inner {
        display: flex;
        align-items: flex-end;
        justify-content: space-around;
        padding: 0 12px calc(10px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-section-tabs::after,
    .mobile-bottom-nav::after {
        display: none;
    }

    .ai-main {
        min-height: 0;
        flex: 1;
        height: calc(100dvh - var(--nav-height));
        max-height: calc(100dvh - var(--nav-height));
        overflow: hidden;
        display: flex;
        flex-direction: column;
        padding: 4px 4px calc(var(--mobile-tab-bar) + env(safe-area-inset-bottom, 0px));
    }

    .ai-workspace {
        height: 100%;
        min-height: 0;
        flex: 1;
        grid-template-columns: 1fr;
        overflow: hidden;
        margin: 0;
        width: 100%;
        max-width: 100%;
        gap: 0;
    }

    .ai-workspace.is-mobile-tabbed {
        display: flex;
        flex-direction: column;
    }

    .hero-section {
        height: 100%;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .workspace-drawer {
        max-height: none;
        overflow: visible;
    }

    .drawer-body-scroll {
        overflow: visible;
        max-height: none;
    }

    .ai-workspace.is-mobile-tabbed > .right-drawer.mobile-panel-active {
        width: 100%;
        padding: 12px;
        flex: 1;
        min-height: 0;
        height: 100%;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .ai-workspace.is-mobile-tabbed > .right-drawer.mobile-panel-active .drawer-body-scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        max-height: none;
    }

    .hero-section {
        justify-content: flex-start;
    }

    .workspace-drawer,
    .workspace-center {
        position: relative;
    }

    .chat-response-area {
        max-height: none;
    }

    .mobile-section-tab {
        position: relative;
        flex: 1 1 0;
        min-width: 0;
        max-width: 108px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        padding: 2px 4px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        gap: 5px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: color 0.22s ease, transform 0.15s ease;
    }

    .mobile-section-tab::before {
        display: none;
    }

    .mobile-section-tab:hover,
    .mobile-section-tab:focus-visible {
        color: var(--text-mid);
        background: transparent;
        outline: none;
    }

    .mobile-section-tab:active:not(.mobile-section-tab--center) {
        transform: scale(0.96);
    }

    .mobile-section-tab.active {
        color: var(--text-primary);
    }

    .mobile-section-tab.active::after {
        display: none;
    }

    .mobile-tab-icon {
        width: 40px;
        height: 34px;
        border-radius: 11px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--text-faint);
        background: transparent;
        border: 1px solid transparent;
        transition:
            color 0.22s ease,
            background 0.22s ease,
            border-color 0.22s ease,
            box-shadow 0.22s ease,
            transform 0.15s ease;
    }

    .mobile-tab-icon svg {
        display: block;
        pointer-events: none;
        opacity: 0.72;
        transition: opacity 0.22s ease;
    }

    .mobile-section-tab.active .mobile-tab-icon:not(.mobile-tab-icon--center) {
        color: #93c5fd;
        background: rgba(59, 130, 246, 0.12);
        border-color: rgba(96, 165, 250, 0.22);
        box-shadow: 0 2px 10px rgba(59, 130, 246, 0.12);
    }

    .mobile-section-tab.active .mobile-tab-icon:not(.mobile-tab-icon--center) svg {
        opacity: 1;
    }

    .mobile-tab-label {
        position: static;
        width: auto;
        height: auto;
        margin: 0;
        padding: 0;
        overflow: visible;
        clip: auto;
        white-space: nowrap;
        border: 0;
        font-size: 0.625rem;
        font-weight: 500;
        letter-spacing: 0.04em;
        line-height: 1.2;
        color: var(--text-faint);
        transition: color 0.22s ease, font-weight 0.22s ease;
    }

    .mobile-section-tab.active .mobile-tab-label {
        color: #e2e8f0;
        font-weight: 600;
    }

    /* Center primary tab — elevated FAB */
    .mobile-section-tab--center {
        padding-top: 0;
        max-width: 120px;
    }

    .mobile-section-tab--center::before {
        display: none;
    }

    .mobile-tab-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: calc((var(--mobile-tab-fab-size) / -2) + 4px);
        margin-bottom: 2px;
        position: relative;
    }

    .mobile-tab-fab::after {
        content: "";
        position: absolute;
        inset: -4px;
        border-radius: 22px;
        background: radial-gradient(circle, rgba(59, 130, 246, 0.28) 0%, transparent 70%);
        pointer-events: none;
        z-index: -1;
        opacity: 0.85;
    }

    .mobile-tab-icon--center {
        width: var(--mobile-tab-fab-size);
        height: var(--mobile-tab-fab-size);
        border-radius: 17px;
        color: #fff;
        background: linear-gradient(155deg, #1e40af 0%, #2563eb 42%, #0891b2 100%);
        box-shadow:
            0 6px 22px rgba(37, 99, 235, 0.4),
            0 2px 4px rgba(0, 0, 0, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            inset 0 -1px 0 rgba(0, 0, 0, 0.12);
        border: 2px solid rgba(8, 9, 31, 0.95);
        outline: 1px solid rgba(125, 211, 252, 0.2);
        transition:
            transform 0.18s ease,
            box-shadow 0.22s ease,
            background 0.22s ease;
    }

    .mobile-tab-icon--center svg {
        opacity: 1;
        filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    }

    .mobile-section-tab--center .mobile-tab-label {
        color: var(--text-muted);
        font-weight: 600;
        letter-spacing: 0.05em;
    }

    .mobile-section-tab--center.active .mobile-tab-label {
        color: #93c5fd;
    }

    .mobile-section-tab--center.active .mobile-tab-icon--center {
        background: linear-gradient(155deg, #2563eb 0%, #3b82f6 45%, #06b6d4 100%);
        box-shadow:
            0 8px 26px rgba(59, 130, 246, 0.48),
            0 2px 6px rgba(0, 0, 0, 0.24),
            inset 0 1px 0 rgba(255, 255, 255, 0.26),
            inset 0 -1px 0 rgba(0, 0, 0, 0.1);
        outline-color: rgba(147, 197, 253, 0.35);
    }

    .mobile-section-tab--center:active .mobile-tab-icon--center {
        transform: scale(0.94);
    }

    .ai-workspace.is-mobile-tabbed {
        grid-template-columns: 1fr;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-drawer,
    .ai-workspace.is-mobile-tabbed > .workspace-center {
        display: none;
    }

    .ai-workspace.is-mobile-tabbed > .mobile-panel-active {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex: 1;
        min-height: 0;
        height: 100%;
        max-height: none;
        padding: 2px 4px 4px;
        overflow: hidden;
        box-sizing: border-box;
        text-align: left;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .hero-chat-wrap,
    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-response-area,
    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .search-bar-wrap,
    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .prompt-pills-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .hero-chat-wrap {
        flex: 1;
        min-height: 0;
        height: 100%;
        margin: 0;
        gap: 4px;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-response-area {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        max-width: 100%;
        max-height: none;
        margin-bottom: 0;
        overflow: hidden;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-response-area:not(.has-items) .chat-thread-scroll {
        display: none;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-empty-state {
        flex: 1;
        min-height: 0;
        justify-content: center;
        padding: 16px 10px;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-empty-state p {
        max-width: none;
        font-size: 0.875rem;
        color: var(--text-muted);
        line-height: 1.45;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-empty-state svg {
        width: 32px;
        height: 32px;
        opacity: 0.55;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-thread-scroll {
        flex: 1;
        min-height: 0;
        max-height: none;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .prompt-pills-wrap,
    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .search-bar-wrap {
        flex-shrink: 0;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .prompt-pills-wrap {
        margin-top: 0;
        padding-top: 0;
        overflow: hidden;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .prompt-pills-row {
        padding: 0 28px 2px 0;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .search-bar-wrap {
        margin-top: 0;
        padding-bottom: 0;
        position: static;
        bottom: auto;
        z-index: 1;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-response-area {
        padding: 2px;
        margin-bottom: 0;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-response-area.has-items {
        padding: 1px 2px 2px;
    }

    .trader-report-card > .next-action-bar {
        margin: 6px 8px 0;
        padding: 7px 9px;
    }

    .trader-report-card .signal-action-pills.compact-actions {
        margin: 0 6px 0;
        padding: 4px 0 0;
    }

    .trader-report-card .action-pill-compact {
        min-width: 0;
        padding: 5px 2px;
    }

    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active .chat-thread-head {
        flex-shrink: 0;
        margin-bottom: 0;
        min-height: 28px;
    }

    .chat-thread-head {
        justify-content: space-between;
        flex-wrap: nowrap;
        text-align: left;
        gap: 4px;
        margin-bottom: 0;
        padding: 0;
    }

    .chat-thread-head .hero-badge {
        display: none;
    }

    .chat-thread-head .thread-download-btn {
        margin-left: auto;
        padding: 4px 7px;
        font-size: 0.5625rem;
        gap: 4px;
    }

    .chat-thread-head .thread-download-btn svg {
        width: 12px;
        height: 12px;
    }

    .thread-head-left {
        justify-content: flex-start;
        flex: 1 1 auto;
        min-width: 0;
    }

    .thread-icon {
        width: 22px;
        height: 22px;
        border-radius: 6px;
    }

    .thread-icon svg {
        width: 12px;
        height: 12px;
    }

    .thread-title {
        font-size: 0.6875rem;
        letter-spacing: 0.06em;
    }

    .thread-subtitle {
        width: 100%;
        text-align: center;
        white-space: normal;
    }

    .nav-wrap {
        padding: 0 14px;
    }

    .nav-brand {
        gap: 8px;
    }

    .ai-live-pill {
        display: none;
    }

    .nav-right {
        display: none;
    }

    a.btn-live-market.mobile-live-market {
        display: inline-flex;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .mobile-drawer.open {
        display: block;
    }

    .btn-ghost-nav {
        display: none;
    }

    .mobile-live-market.btn-live-market {
        padding: 4px 9px 4px 4px;
        font-size: 0.68rem;
        gap: 5px;
    }

    .mobile-live-market .btn-live-market-icon {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .btn-blue-nav {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .hero-title {
        font-size: clamp(1.3rem, 6.2vw, 1.95rem);
    }

    .hero-subtitle {
        font-size: 0.82rem;
    }

    .chat-input-box {
        border-radius: 16px;
        padding: 5px 6px;
        background: rgba(15, 23, 42, 0.96);
    }

    .chat-input-inner {
        min-height: 42px;
        gap: 6px;
    }

    .main-stock-pill {
        height: 34px;
        padding: 0 10px;
        font-size: 0.75rem;
        border-radius: 10px;
    }

    .stock-pill-text {
        max-width: 64px;
    }

    .search-divider {
        height: 22px;
    }

    .chat-bot-icon {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }

    .chat-text-input {
        height: 42px;
        font-size: 1rem;
    }

    .chat-send-btn {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .prompt-pills-wrap {
        margin-top: 6px;
    }

    .prompt-pills-wrap::after {
        width: 28px;
    }

    .prompt-pills-row {
        gap: 8px;
        padding: 2px 12px 6px;
    }

    .prompt-pill {
        padding: 7px 14px 7px 7px;
        font-size: 0.8125rem;
    }

    .prompt-pill-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .workspace-drawer {
        padding: 12px;
    }

    .ai-workspace.is-mobile-tabbed > .left-drawer.mobile-panel-active {
        width: 100%;
        padding: 12px;
        position: static;
        top: auto;
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        height: 100%;
        max-height: none;
        overflow: hidden;
    }

    .left-drawer.mobile-panel-active .drawer-header {
        flex-shrink: 0;
    }

    .left-drawer.mobile-panel-active .drawer-feed-scroll {
        flex: 1 1 0;
        min-height: 0;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }

    .drawer-message-card p {
        padding-left: 0;
    }

    .drawer-message-head {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .drawer-message-tag {
        margin-left: auto;
    }

    .stock-row-item {
        width: 100%;
    }

    .chat-response-card,
    .signal-summary-panel,
    .generic-response-card,
    .unlock-modal-box {
        padding: 16px;
    }

    .chat-response-area {
        padding: 5px;
        border-radius: 14px;
    }

    .ai-workspace.is-mobile-tabbed .chat-response-area {
        max-height: none;
    }

    .ai-workspace.is-mobile-tabbed .chat-thread-scroll {
        max-height: none;
    }

    .chat-thread-head {
        flex-wrap: nowrap;
        gap: 4px;
        margin-bottom: 0;
    }

    .thread-subtitle {
        font-size: 0.625rem;
        width: 100%;
        text-align: left;
    }

    .analysis-card {
        padding: 12px;
    }

    .compact-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .summary-stats-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-title {
        font-size: 1.35rem;
    }

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

    .feature-card {
        padding: 18px;
    }

    .ai-message-card p {
        font-size: 0.86rem;
    }

    .card-action-btn {
        width: calc(50% - 4px);
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .sebi-strip {
        display: none !important;
    }
}

@media (max-width: 640px) {
    .ai-workspace {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .left-drawer,
    .right-drawer,
    .workspace-center {
        width: 100%;
    }

    .left-drawer {
        order: 2;
    }

    .workspace-center {
        order: 1;
    }

    .right-drawer {
        order: 3;
    }

    :root {
        --mobile-tab-bar: 58px;
    }

    .ai-main {
        padding: 2px 2px calc(var(--mobile-tab-bar) + env(safe-area-inset-bottom, 0px));
    }

    .hero-section {
        padding: 0 2px 2px;
        overflow: hidden;
    }

    .hero-chat-wrap {
        margin: 0;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding-bottom: 0;
        flex: 1;
        min-height: 0;
        height: 100%;
    }

    .chat-thread-head {
        padding: 0;
        margin-bottom: 2px;
        flex-shrink: 0;
    }

    .chat-response-area {
        border-radius: 12px;
        padding: 4px;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0;
        flex: 1;
        min-height: 0;
    }

    .chat-response-area:not(.has-items) .chat-thread-scroll {
        display: none;
    }

    .chat-empty-state {
        flex: 1;
        min-height: 0;
        justify-content: center;
        padding: 12px 8px;
    }

    .chat-empty-state p {
        max-width: none;
        font-size: 0.875rem;
    }

    .chat-thread-scroll {
        flex: 1;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        gap: 6px;
        -webkit-overflow-scrolling: touch;
    }

    /* Input pinned above bottom tab via flex — not sticky */
    .search-bar-wrap {
        margin-top: 0;
        width: 100%;
        position: static;
        bottom: auto;
        z-index: 1;
    }

    .prompt-pills-wrap {
        margin-top: 0;
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .prompt-pills-row {
        gap: 6px;
        padding: 0 28px 2px 0;
    }

    .chat-input-box {
        border-radius: 16px;
        padding: 5px 5px 5px 6px;
        background: rgba(15, 23, 42, 0.98);
        border-color: rgba(148, 163, 184, 0.2);
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.35),
            0 0 0 1px rgba(255, 255, 255, 0.04);
    }

    .chat-input-inner {
        gap: 5px;
        min-height: 40px;
    }

    .main-stock-pill {
        height: 32px;
        padding: 0 8px;
        gap: 4px;
    }

    .stock-pill-text {
        max-width: 52px;
        font-size: 0.6875rem;
    }

    .search-divider {
        height: 20px;
    }

    .search-field {
        gap: 8px;
    }

    .chat-bot-icon {
        width: 26px;
        height: 26px;
        border-radius: 8px;
    }

    .chat-bot-icon svg {
        width: 14px;
        height: 14px;
    }

    .chat-text-input {
        height: 40px;
        font-size: 16px;
    }

    .chat-text-input::placeholder {
        font-size: 0.875rem;
    }

    .chat-send-btn {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .send-icon {
        width: 16px;
        height: 16px;
    }

    .prompt-pills-wrap {
        margin-top: 0;
    }

    .prompt-pills-row {
        gap: 6px;
        padding: 0 0 4px;
    }

    .search-bar-wrap {
        width: 100%;
        margin: 0;
        position: static;
        bottom: auto;
    }

    .prompt-pill {
        padding: 7px 12px 7px 7px;
        font-size: 0.75rem;
    }

    .prompt-pill-icon {
        width: 24px;
        height: 24px;
        border-radius: 7px;
    }

    .prompt-pill-icon svg {
        width: 12px;
        height: 12px;
    }

    .stock-row-item {
        padding: 9px 11px;
    }

    .pill-symbol {
        font-size: 0.72rem;
    }

    .pill-change {
        font-size: 0.7rem;
    }

    .sebi-strip {
        padding: 8px 10px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .sebi-strip-inner {
        font-size: 0.7rem;
        line-height: 1.45;
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --mobile-tab-fab-size: 46px;
    }

    .mobile-bottom-nav-inner {
        padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .mobile-tab-icon {
        width: 38px;
        height: 32px;
        border-radius: 10px;
    }

    .mobile-tab-icon--center {
        border-radius: 15px;
    }

    .mobile-tab-label {
        font-size: 0.5875rem;
    }

    .ai-workspace {
        gap: 8px;
    }

    .nav-wrap {
        padding: 0 10px;
    }

    .mobile-live-market.btn-live-market {
        font-size: 0.65rem;
        padding: 4px 8px 4px 4px;
    }

    .mobile-live-market .btn-live-market-dot {
        display: none;
    }

    .brand-logo-img {
        height: 24px;
    }

    .mobile-menu-btn {
        width: 34px;
        height: 34px;
    }

    .hero-title {
        font-size: clamp(1.06rem, 5.2vw, 1.34rem);
    }

    .hero-chat-wrap,
    .chat-response-area {
        max-width: 100%;
    }

    .thread-title {
        font-size: 0.72rem;
    }

    .thread-subtitle {
        font-size: 0.66rem;
    }

    .chat-bubble {
        padding: 9px 9px;
        border-radius: 12px;
    }

    .bubble-body {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .chat-response-card,
    .signal-summary-panel,
    .generic-response-card,
    .unlock-modal-box {
        padding: 13px;
    }

    .trader-report-card .action-pill-compact {
        width: auto;
        min-width: 58px;
    }
}

/* Ensure when mobile tabbing, the center hero panel expands full width and isn't constrained */
@media (max-width: 640px) {
    .ai-workspace.is-mobile-tabbed > .workspace-center.mobile-panel-active.hero-section.hero-collapsed,
    .workspace-center.mobile-panel-active.hero-section.hero-collapsed {
        margin: 0 !important;
        padding: 4px 4px 4px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        align-items: stretch;
        text-align: left;
    }

    .workspace-center.mobile-panel-active.hero-section.hero-collapsed .hero-chat-wrap {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }

    .trader-report-card {
        border-radius: 12px;
    }

    .trader-report-card > .trader-verdict,
    .trader-report-card > .trader-panel,
    .trader-report-card > .trader-split-row,
    .trader-report-card > .next-action-bar,
    .trader-report-card .compact-actions {
        margin-left: 8px;
        margin-right: 8px;
    }

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

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

/* Premium eye-catching enhancements */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.05); }
    50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.08), var(--glow-blue); }
}

@media (max-width: 380px) {
    .stock-pill-text {
        display: none;
    }

    .main-stock-pill {
        width: 32px;
        padding: 0;
        justify-content: center;
    }

    .search-divider {
        display: none;
    }

    .chat-text-input::placeholder {
        font-size: 0.8125rem;
    }
}

/* Hide SEBI disclaimer on small screens to avoid obstructing chat UI */
@media (max-width: 640px) {
    .sebi-strip {
        display: none !important;
    }
}

.signal-badge {
    position: relative;
}

.action-pill.unlock {
    position: relative;
    overflow: hidden;
}

.action-pill.unlock::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: right 0.5s ease;
}

.action-pill.unlock:hover::after {
    right: 100%;
}

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(96, 165, 250, 0.5), transparent);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: translateX(100%);
}

.ai-message-card {
    position: relative;
    overflow: hidden;
}

.ai-message-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.8), transparent);
}

.ui-element-hover {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Premium button enhancement */
.chat-send-btn::after,
.main-stock-pill::after,
.mobile-section-tab::after,
.prompt-pill::after,
.stock-row-item::after,
.stock-pill::after {
    display: none !important;
}

button:not(:disabled) {
    position: relative;
}

button:not(:disabled)::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

button:not(:disabled):hover::after {
    animation: shimmer-effect 0.6s ease-in-out;
}

@keyframes shimmer-effect {
    0% { right: -100%; }
    100% { right: 100%; }
}

/* Premium input focus effect */
input:focus, textarea:focus, select:focus {
    box-shadow: none;
    outline: none;
}

/* Desktop: lock page to viewport — scroll inside panels only */
@media (min-width: 1201px) {
    html,
    body {
        height: 100%;
        height: 100dvh;
        overflow: hidden;
    }

    .ai-main {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        padding: 6px 12px 4px;
    }

    .ai-workspace {
        height: 100%;
    }

    .left-drawer,
    .right-drawer {
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
    }

    .hero-section {
        padding: 4px 6px 4px;
        overflow: hidden;
        align-items: center;
    }

    .workspace-center.hero-section {
        min-height: 0;
    }

    .hero-chat-wrap {
        flex: 1;
        min-height: 0;
        height: 100%;
        max-width: 100%;
        width: 100%;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
    }

    .chat-thread-head {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .chat-thread-head .hero-badge {
        padding: 4px 10px;
        font-size: 0.5625rem;
        margin: 0;
    }

    .chat-response-area {
        flex: 1;
        min-height: 0;
        max-height: none;
        max-width: 100%;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    .chat-empty-state {
        flex: 1;
        min-height: 0;
    }

    .chat-response-area.has-items .chat-thread-scroll {
        flex: 1;
        min-height: 0;
        max-height: none;
        display: flex;
    }

    .chat-response-area:not(.has-items) .chat-thread-scroll {
        display: none;
    }

    .chat-thread-scroll {
        max-height: none;
    }

    .hero-chat-wrap .prompt-pills-wrap {
        flex-shrink: 0;
        margin-top: auto;
        padding-top: 8px;
    }

    .hero-chat-wrap .search-bar-wrap {
        flex-shrink: 0;
        margin-top: 6px;
    }

    .left-drawer .drawer-feed-scroll,
    .right-drawer .drawer-body-scroll {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
    }

    .sebi-strip {
        padding: 6px 12px;
    }

    .sebi-strip-inner {
        padding: 6px 12px;
        font-size: 0.6875rem;
        line-height: 1.35;
    }
}
