/* Custom CSS Component Classes for Stock Analysis App */

html {
    height: 100%;
    overflow: hidden;
}

body {
    touch-action: manipulation;
}

/* Shared Surfaces */
.app-chrome {
    background-color: #0b0f14;
    border-color: rgba(255,255,255,0.08);
}

.app-surface {
    background-color: #0b0f14;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.app-card-surface {
    background-color: #111820;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.app-border {
    border: 1px solid rgba(255,255,255,0.08);
}

.app-divider-bottom {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.app-divider-top {
    border-top: 1px solid rgba(255,255,255,0.08);
}

.app-inset-border {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.safe-area-footer {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.modal-content-accent {
    border-color: rgba(88,166,255,0.2);
    box-shadow: 0 18px 40px rgba(5,10,18,0.6), 0 0 0 1px rgba(88,166,255,0.18);
}

.ai-analysis-mobile-backdrop {
    background: rgba(0,0,0,0.8);
}

.ai-analysis-mobile-content {
    max-height: 100%;
    border: 1px solid rgba(88,166,255,0.2);
    box-shadow: 0 18px 40px rgba(5,10,18,0.6), 0 0 0 1px rgba(88,166,255,0.18);
}

.flex-scroll-body {
    flex: 1 1 0%;
    min-height: 0;
}

.mobile-link-card {
    background: rgba(255,255,255,0.03);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.mobile-link-card-data {
    background: rgba(88,166,255,0.06);
    box-shadow: inset 0 0 0 1px rgba(88,166,255,0.12);
}

.mobile-link-card-seekingalpha {
    background: rgba(251,146,60,0.06);
    box-shadow: inset 0 0 0 1px rgba(251,146,60,0.15);
    color: #fb923c;
}

.mobile-link-card-whalewisdom {
    background: rgba(74,222,128,0.06);
    box-shadow: inset 0 0 0 1px rgba(74,222,128,0.15);
    color: #4ade80;
}

.mobile-link-card-ai {
    background: rgba(192,132,252,0.08);
    box-shadow: inset 0 0 0 1px rgba(192,132,252,0.18);
    color: #c084fc;
}

.ai-filter-btn {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.ai-filter-btn.text-whale-blue {
    box-shadow: inset 0 0 0 1px rgba(88,166,255,0.25);
}

.overscroll-x-contained {
    overscroll-behavior-x: none;
}

.analysis-inline-row {
    gap: 12px;
}

/* Button Components */
.btn-secondary {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    background-color: #4b5563;
    color: #fff;
    font-weight: 500;
    transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.btn-secondary:hover {
    background-color: #6b7280;
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6b7280;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Card Components */
.card {
    padding: 1.5rem;
    border-radius: 0.5rem;
    background-color: #111820;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}

.card-header {
    margin: -1.5rem -1.5rem 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: rgba(17, 24, 39, 0.5);
    border-bottom: 1px solid rgba(88,166,255,0.15);
    color: #f0f6fc;
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
}

/* Form Components */
.input-field {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #30363d;
    border-radius: 0.375rem;
    background-color: #1f2937;
    color: #c9d1d9;
}

.input-field:focus {
    outline: none;
    border-color: transparent;
    box-shadow: 0 0 0 2px #58a6ff;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #f0f6fc;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

/* Table Components */
table tbody.divide-y > tr {
    border-color: rgba(255,255,255,0.06);
}

.table-panel-surface {
    background-color: #0b0f14;
}

.table-toolbar-surface,
.table-tab-surface,
.table-tab-content-surface {
    background-color: #0b0f14;
}

.table-tab-surface .tab-button:hover {
    background-color: #0d1317;
}

.table-tab-surface .tab-button.active {
    background-color: #0d1317;
}

.table-filter-select {
    background-color: #10151b;
    border-color: rgba(255,255,255,0.12);
}

.table-control-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 4px 0;
    overflow-x: auto;
    scrollbar-width: thin;
}

.table-control-toggle,
.table-tab-button,
.table-mini-action,
.table-control-select,
.table-meta-badge {
    border-radius: 6px;
    background: rgba(255,255,255,0.025);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.table-control-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    flex: 0 0 auto;
    padding: 0 8px;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.table-control-toggle:hover {
    color: #f0f6fc;
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.table-control-switch {
    position: relative;
    width: 30px;
    height: 16px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.table-control-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #e5e7eb;
    transition: transform 150ms ease, background-color 150ms ease;
}

.table-control-toggle input:focus-visible + .table-control-switch {
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.42), 0 0 0 2px rgba(88, 166, 255, 0.16);
}

.table-control-toggle input:checked + .table-control-switch::after {
    transform: translateX(14px);
    background: #f8fafc;
}

.table-control-toggle-watchlist input:checked + .table-control-switch {
    background: rgba(250, 204, 21, 0.26);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.34);
}

.table-control-toggle-watchlist input:checked ~ .table-control-label {
    color: #fde68a;
}

.table-control-toggle-ema input:checked + .table-control-switch {
    background: rgba(248, 113, 113, 0.24);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.34);
}

.table-control-toggle-ema input:checked ~ .table-control-label {
    color: #fca5a5;
}

.table-control-select {
    min-height: 28px;
    max-width: 116px;
    flex: 0 0 auto;
    padding: 0 26px 0 9px;
    border: 0;
    color: #c9d1d9;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    outline: none;
    transition: background-color 150ms ease, box-shadow 150ms ease;
}

.table-control-select:hover,
.table-control-select:focus {
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.34);
}

.table-tab-list {
    display: flex;
    gap: 6px;
    padding: 0 0 6px;
}

.table-tab-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    flex: 1 1 0;
    padding: 0 10px;
    border: 0;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.table-tab-button:hover {
    color: #f0f6fc;
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.table-tab-surface .table-tab-button:hover {
    background: rgba(255,255,255,0.055);
}

.table-tab-button.active,
.table-tab-surface .table-tab-button.active {
    color: #dbeafe;
    background: rgba(88, 166, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.28);
}

.table-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: #8b949e;
    font-size: 0.72rem;
    line-height: 1;
}

.table-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 8px;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.table-toolbar-count {
    margin-left: auto;
}

.table-meta-badge.is-watchlist {
    color: #fde68a;
    background: rgba(250, 204, 21, 0.08);
    box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.18);
}

.table-meta-badge.is-ai {
    color: #bfdbfe;
    background: rgba(88, 166, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.18);
}

.table-meta-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
}

.table-mini-action {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 6px;
    padding: 0 7px;
    border: 0;
    color: #bfdbfe;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.table-mini-action:hover {
    color: #eff6ff;
    background: rgba(88, 166, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.28);
}

.table-shell {
    background-color: #07090d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.055);
    isolation: isolate;
}

.table-shell table {
    border-collapse: separate;
    border-spacing: 0;
}

.table-header-surface {
    background-color: #0b0f14;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.06);
}

.table-body-surface {
    background-color: #07090d;
    --tw-divide-opacity: 1;
    --tw-divide-color: rgba(255,255,255,0.06);
}

.table-body-surface tr + tr > td {
    border-top: 1px solid rgba(255,255,255,0.06);
}

.table-row-neutral {
    transition: none;
}

.table-row-neutral:hover {
    background-color: #0d1317;
}

.table-header-surface .sticky-first-col {
    background-color: #0b0f14;
}

.table-body-surface .sticky-first-col {
    background-color: #07090d;
    box-shadow: 1px 0 0 #07090d, 2px 0 0 rgba(255,255,255,0.035);
}

.table-body-surface .table-row-neutral:hover .sticky-first-col {
    background-color: #0d1317;
    box-shadow: 1px 0 0 #0d1317, 2px 0 0 rgba(255,255,255,0.035);
}

.watchlist-accent {
    color: #facc15;
}

.watchlist-toggle-track {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.watchlist-badge-neutral {
    background-color: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
    color: #cbd5e1;
}

/* Modal Components */
.modal {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #111820;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    color: #f0f6fc;
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
}

.modal-close {
    color: #8b949e;
    transition: color 150ms ease;
}

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

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* AI ticker modal positioning */
.ai-ticker-modal {
    background-color: transparent;
}

@media (min-width: 1024px) {
    .ai-ticker-modal {
        justify-content: flex-end;
        padding: 0 2rem;
        background: transparent;
    }

    .ai-ticker-modal .ai-ticker-modal-content {
        margin-left: auto;
        margin-right: 0;
        width: min(48vw, 42rem);
        max-width: none;
    }
}

.ai-ticker-modal .ai-ticker-modal-content {
    border-color: rgba(88, 166, 255, 0.45);
    box-shadow: 0 18px 40px rgba(5, 10, 18, 0.6), 0 0 0 1px rgba(88, 166, 255, 0.18);
}

/* Message Components */
.message {
    padding: 0.75rem;
    border-radius: 0.375rem;
}

.message-error {
    border: 1px solid #ef4444;
    background-color: rgba(127, 29, 29, 0.2);
    color: #f87171;
}

.message-success {
    border: 1px solid #22c55e;
    background-color: rgba(20, 83, 45, 0.2);
    color: #4ade80;
}

.message-info {
    border: 1px solid #3b82f6;
    background-color: rgba(30, 58, 138, 0.2);
    color: #60a5fa;
}

.message-warning {
    border: 1px solid #eab308;
    background-color: rgba(113, 63, 18, 0.2);
    color: #facc15;
}

/* Chart Components */
.chart-wrapper {
    width: 100%;
    flex: 0 1 auto;
    min-height: 0;
    padding-top: 6px;
}

/* Analysis Toolbar */
.analysis-toolbar {
    --toolbar-control-height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 8px 0 0;
    overflow-x: auto;
    padding: 4px 0 0;
    scrollbar-width: thin;
}

.symbol-form {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid rgba(88, 166, 255, 0.22);
    border-radius: 7px;
    background: #07090d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 1px 0 rgba(255,255,255,0.04);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.symbol-form:focus-within {
    border-color: rgba(88, 166, 255, 0.68);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.18), 0 0 0 2px rgba(88, 166, 255, 0.12);
}

.ticker-input {
    width: calc(6ch + 22px);
    min-height: var(--toolbar-control-height);
    padding: 0 9px;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    background: #10151b;
    box-shadow: none;
    color: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    outline: none;
    text-transform: uppercase;
    transition: background-color 150ms ease;
}

.ticker-input:focus {
    background: #111820;
    box-shadow: none;
}

.analysis-button {
    min-height: var(--toolbar-control-height);
    padding: 0 10px;
    border-radius: 0;
    border: none;
    background: rgba(35, 134, 54, 0.28);
    box-shadow: none;
    color: #bbf7d0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.analysis-button:hover {
    background: rgba(35, 134, 54, 0.42);
    box-shadow: none;
    color: #f0fdf4;
}

.analysis-button:focus-visible {
    outline: none;
    color: #f0fdf4;
}

@media (max-width: 640px) {
    .analysis-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .symbol-form {
        flex-shrink: 0;
        border-radius: 5px;
    }

    .ticker-input {
        min-height: 24px;
        padding: 0 6px;
        font-size: 0.62rem;
        width: calc(6ch + 16px);
    }

    .analysis-button {
        min-height: 24px;
        padding: 0 6px;
        font-size: 0.62rem;
    }

    .table-tab-button {
        min-height: 24px;
        height: 24px;
        padding: 0 6px;
        font-size: 0.62rem;
        line-height: 1;
    }

    .table-control-bar {
        min-height: 30px;
        gap: 4px;
    }

    .table-control-toggle,
    .table-meta-badge,
    .table-control-select {
        min-height: 24px;
        padding: 0 6px;
        font-size: 0.62rem;
        gap: 4px;
    }

    .table-control-switch {
        width: 26px;
        height: 14px;
    }

    .table-control-switch::after {
        width: 10px;
        height: 10px;
    }

    .table-shell thead th {
        padding: 0.125rem 0.375rem !important;
        font-size: 0.6rem !important;
    }

    .table-shell tbody td {
        padding: 0.125rem 0.375rem !important;
        font-size: 0.65rem !important;
    }

    footer * {
        font-size: 0.58rem !important;
    }
}

.chart-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    background-color: #0b0f14;
    object-fit: contain;
}

.chart-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20rem;
    border-radius: 0.5rem;
    background-color: #1f2937;
    color: #8b949e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}

.ai-chart-analysis {
    margin-top: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #07090d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    flex-direction: column;
    flex: 1 1 0;
    min-height: 120px;
    overflow: hidden;
}

.ai-chart-analysis.is-empty {
    display: none !important;
}

.ai-chart-analysis-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ai-chart-analysis-header h3 {
    margin: 0;
    color: #f0f6fc;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
}

.ai-chart-analysis-header p,
.ai-chart-analysis-meta {
    margin: 2px 0 0;
    color: #8b949e;
    font-size: 0.68rem;
    line-height: 1.25;
}

.ai-chart-analysis-meta {
    flex-shrink: 0;
    text-align: right;
}

.ai-chart-analysis-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
    color: #c9d1d9;
    font-size: 0.72rem;
    line-height: 1.5;
}

.ai-chart-analysis-body h3,
.ai-chart-analysis-body h4,
.ai-chart-analysis-body h5 {
    margin: 12px 0 5px;
    color: #f0f6fc;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.3;
}

.ai-chart-analysis-body h3:first-child,
.ai-chart-analysis-body h4:first-child,
.ai-chart-analysis-body h5:first-child,
.ai-chart-analysis-body p:first-child {
    margin-top: 0;
}

.ai-chart-analysis-body p {
    margin: 0 0 8px;
}

.ai-chart-analysis-body ul,
.ai-chart-analysis-body ol {
    margin: 0 0 10px 1rem;
    padding: 0;
}

.ai-chart-analysis-body li {
    margin: 0 0 5px;
}

.ai-chart-analysis-body strong {
    color: #f0f6fc;
    font-weight: 700;
}

@media (min-width: 768px) {
    .dashboard-analysis-content > #external-links {
        flex: 0 0 auto;
    }
}

@media (min-width: 1024px) {
    .dashboard-analysis-content .chart-image {
        max-height: clamp(250px, 44vh, 520px);
    }
}

@media (max-width: 767px) {
    .dashboard-layout {
        height: 100%;
        overflow: hidden;
    }

    .dashboard-layout,
    .dashboard-analysis-column,
    .dashboard-analysis-card,
    .dashboard-analysis-content,
    .dashboard-table-column,
    .dashboard-table-card,
    .dashboard-table-content {
        min-height: 0;
    }

    .dashboard-analysis-column {
        flex: 0 0 auto;
        overflow: hidden;
    }

    .dashboard-analysis-card,
    .dashboard-analysis-content {
        height: auto;
    }

    .dashboard-analysis-content {
        overflow: hidden;
    }

    .dashboard-analysis-content .chart-wrapper {
        min-height: 0;
        max-height: calc(46dvh - 64px);
        overflow: hidden;
    }

    .dashboard-analysis-content .chart-image {
        min-height: 0;
        max-height: calc(46dvh - 64px);
        object-fit: contain;
    }

    .dashboard-analysis-content .chart-placeholder {
        height: 180px;
        max-height: calc(46dvh - 64px);
    }

    .dashboard-table-column {
        flex: 1 1 auto;
        overflow: hidden;
    }

    .dashboard-table-content {
        overflow: hidden;
    }

    .ai-chart-analysis {
        display: none !important;
    }
}

/* Tab Components */
.tab-button {
    padding: 0.5rem 1rem;
    border-bottom: 2px solid transparent;
    color: #8b949e;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.tab-button:hover {
    border-color: #30363d;
    color: #c9d1d9;
}

.tab-button.active {
    border-color: #58a6ff;
    background-color: rgba(30, 58, 138, 0.2);
    color: #58a6ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* External Links */
.external-links-panel {
    flex: 0 0 auto;
    margin: 0;
    min-width: 0;
}

.external-links-trigger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--toolbar-control-height);
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: rgba(255,255,255,0.025);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    color: #c9d1d9;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.external-links-trigger-button:hover,
.external-links-trigger-button:focus-visible {
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 0 0 1px rgba(88, 166, 255, 0.32);
    color: #f0f6fc;
    outline: none;
}

@media (max-width: 640px) {
    .external-links-mobile-actions {
        gap: 4px;
    }

    .external-links-trigger-button {
        min-height: 24px;
        height: 24px;
        padding: 0 6px;
        border-radius: 5px;
        font-size: 0.62rem;
        line-height: 1;
    }
}

.external-actions {
    align-items: center;
    gap: 5px;
    min-height: var(--toolbar-control-height);
    overflow-x: auto;
    padding: 0;
    scrollbar-width: thin;
}

.external-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--toolbar-control-height);
    flex: 0 0 auto;
    padding: 0 9px;
    border-radius: 6px;
    color: #8b949e;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    background: rgba(255,255,255,0.025);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.external-action:hover {
    color: #f0f6fc;
    background: rgba(255,255,255,0.055);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
}

.external-action-data:hover {
    color: #58a6ff;
}

.external-action-seekingalpha:hover {
    color: #fb923c;
}

.external-action-whalewisdom:hover {
    color: #4ade80;
}

.external-action-social:hover {
    color: #d1d5db;
}

.external-action-ai:hover {
    color: #c084fc;
}

.external-action-primary {
    color: #d8b4fe;
    background: rgba(126, 34, 206, 0.18);
    box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.22);
}

.external-action-primary:hover {
    color: #f5f3ff;
    background: rgba(126, 34, 206, 0.26);
    box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.34);
}

.external-action-divider {
    width: 1px;
    height: 18px;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.08);
}


/* Sort Indicators */
.sort-asc::after {
    content: ' ↑';
    color: #58a6ff;
}

.sort-desc::after {
    content: ' ↓';
    color: #58a6ff;
}

/* Highlighted Row */
.row-highlighted {
    background-color: rgba(30, 58, 138, 0.2);
}

.row-active {
    background-color: rgba(34, 197, 94, 0.08);
    border-left: 3px solid #22c55e;
}

.ai-highlight {
    background-color: rgba(88, 166, 255, 0.08);
}

.ai-highlight:hover {
    background-color: rgba(88, 166, 255, 0.14);
}

/* Navigation Menu Styles */
.nav-menu-dropdown {
    position: absolute;
    right: 0;
    z-index: 50;
    width: 12rem;
    margin-top: 0.5rem;
    border-radius: 0.375rem;
    background-color: #0b0f14;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-menu-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #c9d1d9;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: color 150ms ease, background-color 150ms ease;
}

.nav-menu-item:hover {
    background-color: #0d1317;
    color: #f0f6fc;
}

.nav-menu-item-danger {
    color: #f87171;
}

.nav-menu-item-danger:hover {
    color: #fca5a5;
}

.nav-menu-button {
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: #8b949e;
    transition: color 150ms ease, background-color 150ms ease;
}

.nav-menu-button:hover {
    background-color: #0d1317;
    color: #f0f6fc;
}

/* Animation for dropdown */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out;
}

/* Sticky first column in scrollable tables */
.sticky-first-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: inherit;
    background-clip: border-box;
    transition: none;
}

thead .sticky-first-col {
    z-index: 20;
    background-color: #0b0f14;
}

tbody tr:hover .sticky-first-col {
    background-color: #0d1317;
    box-shadow: 1px 0 0 #0d1317, 2px 0 0 rgba(255,255,255,0.035);
}

.row-active .sticky-first-col {
    background-color: #091813;
    box-shadow: 1px 0 0 #091813, 2px 0 0 rgba(34, 197, 94, 0.16);
}

.ai-highlight .sticky-first-col {
    background-color: #0d161f;
    box-shadow: 1px 0 0 #0d161f, 2px 0 0 rgba(88, 166, 255, 0.12);
}

.ai-highlight:hover .sticky-first-col {
    background-color: #121e2d;
    box-shadow: 1px 0 0 #121e2d, 2px 0 0 rgba(88, 166, 255, 0.14);
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        background-color: #fff;
        color: #000;
        border: 1px solid #d1d5db;
    }
}
