/**
 * Main Stylesheet (Optimized)
 * - Duplicates merged (91 rules consolidated)
 * - 286 unused classes removed
 */

.multi-filter-cell .multi-filter-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.multi-summary-group.include { border-left-color: #2e7d32; }

.multi-summary-group.exclude { border-left-color: #c62828; }

#type-filter-modal,
#home-category-filter-modal {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1100;
}

#type-filter-modal .modal-backdrop,
#home-category-filter-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.multi-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 90%);
    max-height: 75vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.multi-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.multi-modal-header h4 { margin: 0; }

.multi-modal-close {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
}

.multi-modal-body {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.multi-modal-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.multi-modal-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.multi-name {
    font-weight: 600;
    font-size: 13px;
    color: #1f2937;
}

.multi-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
}

.multi-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}

.multi-modal-empty {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

:root {
    /* Light theme (default) */
    --color-text-primary: #202122;
    --color-text-secondary: #5f6368;
    --color-text-muted: #6a737d;
    --color-text-light: #8f8f8f;
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f6f8fa;
    --color-bg-hover: #f1f3f5;
    --color-bg-hover-subtle: #0d0d0d0d;
    --color-bg-gray: #eaecf0;
    --color-bg-gray-light: #f3f4f6;
    --color-bg-dark: #0d0d0d;
    --color-bg-dark-hover: #212121;
    --color-border-light: #e5e7eb;
    --color-border-medium: #d1d5db;
    --color-border-separator: #dfe2e5;
    --color-border-subtle: #eaecef;
    --color-border-gray: #ececec;
    --color-border-table: #ebebeb;
    --color-border-alpha: #00000026;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #007cba;
    --color-error: #dc2626;
    --color-link: #007cba;
    --color-link-visited: #551a8b;
    /* Input/form specific */
    --color-input-bg: #ffffff;
    --color-input-border: rgba(13, 13, 13, 0.1);
    --color-input-text: #202122;
    /* Card/surface colors */
    --color-surface: #ffffff;
    --color-surface-elevated: #ffffff;
    --spacing-0: 0;
    --spacing-1: 2px;
    --spacing-2: 4px;
    --spacing-3: 6px;
    --spacing-4: 8px;
    --spacing-5: 10px;
    --spacing-6: 12px;
    --spacing-7: 13px;
    --spacing-8: 15px;
    --spacing-9: 16px;
    --spacing-10: 18px;
    --spacing-12: 20px;
    --spacing-14: 24px;
    --spacing-16: 25px;
    --spacing-18: 30px;
    --spacing-20: 32px;
    --spacing-24: 40px;
    --radius-none: 0;
    --radius-sm: 3px;
    --radius-base: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 17px;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --line-height-none: 1;
    --line-height-tight: 1.2;
    --line-height-snug: 1.25;
    --line-height-normal: 1.42857;
    --line-height-relaxed: 1.45;
    --line-height-loose: 1.6;
    --shadow-sm: 0px 4px 4px 0px #00000000, 0px 0px 1px 0px #0000009e;
    --shadow-md: 0px 8px 16px 0px rgba(0,0,0,0.2);
    --shadow-avatar: 0 2px 8px rgba(0, 0, 0, 0.05);
    --z-base: 0;
    --z-dropdown: 999;
    --z-header: 1001;
    --z-dropdown-top: 1002;
    --header-height: 54px;
    --sidebar-width: 200px;
    --max-width-content: 900px;
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.2s ease-in-out;
}

/* Dark theme - activated by data-theme="dark" on html element */
[data-theme="dark"] {
    --color-text-primary: #bfbfbf;
    --color-text-secondary: #a1a1aa;
    --color-text-muted: #71717a;
    --color-text-light: #52525b;
    --color-bg-primary: #1f1f1f;
    --color-bg-secondary: #18181b;
    --color-bg-hover: #27272a;
    --color-bg-hover-subtle: rgba(255, 255, 255, 0.06);
    --color-bg-gray: #27272a;
    --color-bg-gray-light: #1f1f23;
    --color-bg-dark: #fafafa;
    --color-bg-dark-hover: #e4e4e7;
    --color-border-light: #27272a;
    --color-border-medium: #3f3f46;
    --color-border-separator: #27272a;
    --color-border-subtle: #1f1f23;
    --color-border-gray: #27272a;
    --color-border-table: #27272a;
    --color-border-alpha: rgba(255, 255, 255, 0.1);
    --color-success: #22c55e;
    --color-danger: #ef4444;
    --color-warning: #eab308;
    --color-info: #3b82f6;
    --color-error: #ef4444;
    --color-link: #60a5fa;
    --color-link-visited: #c084fc;
    --color-input-bg: #18181b;
    --color-input-border: rgba(255, 255, 255, 0.1);
    --color-input-text: #e4e4e7;
    --color-surface: #18181b;
    --color-surface-elevated: #27272a;
    --shadow-sm: 0px 4px 4px 0px rgba(0,0,0,0.3), 0px 0px 1px 0px rgba(0,0,0,0.8);
    --shadow-md: 0px 8px 16px 0px rgba(0,0,0,0.4);
}

/* System preference detection (when theme is "device") */
@media (prefers-color-scheme: dark) {
    [data-theme="device"] {
        --color-text-primary: #bfbfbf;
        --color-text-secondary: #a1a1aa;
        --color-text-muted: #71717a;
        --color-text-light: #52525b;
        --color-bg-primary: #1f1f1f;
        --color-bg-secondary: #18181b;
        --color-bg-hover: #27272a;
        --color-bg-hover-subtle: rgba(255, 255, 255, 0.06);
        --color-bg-gray: #27272a;
        --color-bg-gray-light: #1f1f23;
        --color-bg-dark: #fafafa;
        --color-bg-dark-hover: #e4e4e7;
        --color-border-light: #27272a;
        --color-border-medium: #3f3f46;
        --color-border-separator: #27272a;
        --color-border-subtle: #1f1f23;
        --color-border-gray: #27272a;
        --color-border-table: #27272a;
        --color-border-alpha: rgba(255, 255, 255, 0.1);
        --color-success: #22c55e;
        --color-danger: #ef4444;
        --color-warning: #eab308;
        --color-info: #3b82f6;
        --color-error: #ef4444;
        --color-link: #60a5fa;
        --color-link-visited: #c084fc;
        --color-input-bg: #18181b;
        --color-input-border: rgba(255, 255, 255, 0.1);
        --color-input-text: #e4e4e7;
        --color-surface: #18181b;
        --color-surface-elevated: #27272a;
        --shadow-sm: 0px 4px 4px 0px rgba(0,0,0,0.3), 0px 0px 1px 0px rgba(0,0,0,0.8);
        --shadow-md: 0px 8px 16px 0px rgba(0,0,0,0.4);
    }
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
}

a { text-decoration: none; }

a:hover { text-decoration: underline; }

table { border-spacing: 0; }

td { min-width: 43px; }

th {
    text-align: left;
    color: var(--color-text-light);
    font-weight: var(--font-weight-normal);
}

textarea { font-family: Arial, Helvetica, sans-serif; font-size: var(--font-size-lg); }

.block { display: block; }

.inline-block { display: inline-block; }

.flex { display: flex; }

.grid { display: grid; }

.hidden { display: none; }

.hide { display: none !important; }

.show { display: table-row; }

.flex-row {
    flex-direction: row;
    display: flex;
    gap: 10px;
    align-items: center;
}

.flex-col { flex-direction: column; display: flex; }

.flex-wrap { flex-wrap: wrap; }

.flex-1 { flex: 1; }

.flex-grow { flex-grow: 1; }

.flex-shrink-0 { flex-shrink: 0; }

.items-center { align-items: center; }

.items-baseline { align-items: baseline; }

.justify-between { justify-content: space-between; }

.gap-1 { gap: var(--spacing-2); }

.gap-2 { gap: var(--spacing-4); }

.gap-3 { gap: var(--spacing-6); }

.gap-5 { gap: var(--spacing-12); }

.m-0 { margin: 0; }

.mt-0 { margin-top: 0; }

.mt-1 { margin-top: var(--spacing-2); }

.mt-5 { margin-top: 5px; }

.mt-6 { margin-top: var(--spacing-14); }

.mt-10 { margin-top: 10px; }

.mr-0 { margin-right: 0; }

.mr-3 { margin-right: 3px; }

.mr-6 { margin-right: var(--spacing-12); }

.mb-0 { margin-bottom: 0; }

.mb-1 { margin-bottom: var(--spacing-1); }

.mb-2 { margin-bottom: var(--spacing-4); }

.mb-3 { margin-bottom: 3px; }

.mb-4 { margin-bottom: 4px; }

.mb-5 { margin-bottom: 5px; }

.mb-10 { margin-bottom: 15px; }

.ml-1 { margin-left: var(--spacing-2); }

.ml-2 { margin-left: var(--spacing-4); }

.ml-3 { margin-left: var(--spacing-6); }

.p-0 { padding: 0; }

.p-3 { padding: var(--spacing-6); }

.p-4 { padding: var(--spacing-9); }

.px-3 { padding-left: var(--spacing-6); padding-right: var(--spacing-6); }

.py-2 { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); }

.pt-4 { padding-top: var(--spacing-9); }

.pr-1 { padding-right: 5px; }

.w-full { width: 100%; }

.min-w-260 { min-width: 260px; }

.absolute { position: absolute; }

.relative { position: relative; }

.z-10 { z-index: 10; }

.overflow-visible { overflow: visible; }

.overflow-y-visible { overflow-y: visible; }

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

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

.text-xs { font-size: var(--font-size-xs); }

.text-base { font-size: var(--font-size-base); }

.text-md { font-size: var(--font-size-md); }

.text-lg { font-size: var(--font-size-lg); }

.text-2xl { font-size: 24px; }

.font-normal { font-weight: var(--font-weight-normal); }

.font-semibold { font-weight: var(--font-weight-semibold); }

.leading-normal { line-height: var(--line-height-loose); }

.text-secondary { color: var(--color-text-secondary); }

.text-muted { color: #666; font-size: 12px; }

.text-gray-500 { color: #6b7280; }

.text-gray-800 { color: #333; }

.text-muted-light { color: #888; }

.text-success { color: #28a745; }

.text-info { color: #007cba; }

.text-error { color: #dc3545; }

.bg-white { background-color: var(--color-surface); }

.bg-gray-100 { background-color: var(--color-bg-secondary); }

.bg-blue-50 { background-color: #f0f9ff; }

.bg-transparent { background: transparent; }

.border { border: 1px solid var(--color-border-light); }

.border-t { border-top: 1px solid var(--color-border-light); }

.border-l { border-left: 3px solid var(--color-info); }

.border-none { border: none; }

.border-blue { border-color: #bae6fd; }

.rounded-none { border-radius: 0; }

.rounded { border-radius: var(--radius-sm); }

.rounded-md { border-radius: var(--radius-md); }

.rounded-lg { border-radius: var(--radius-lg); }

.whitespace-nowrap { white-space: nowrap; }

.align-middle { vertical-align: middle; }

.cursor-pointer { cursor: pointer; }

.select-none { user-select: none; }

.capitalize { text-transform: capitalize; }

.object-cover { object-fit: cover; }

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(260px, max-content));
}

.grid-gap-7 { gap: 28px; }

.max-h-none { max-height: none; }

.font-inherit { font-family: inherit; }

.flex-basis-120 { flex: 0 0 120px; width: 120px; }

.scroll-mt-5 { scroll-margin-top: 20px; }

.collapse { border-collapse: collapse; }

.my-custom { margin: 12px 0 -4px 0; }

header { position: relative; z-index: var(--z-header); }

header * { position: relative; z-index: var(--z-header); }

.menu {
    margin: var(--spacing-5) var(--spacing-5);
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.menu-item {
    text-decoration: none;
    color: var(--color-text-primary);
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 8px;
    line-height: 16px;
    height: 26px;
    box-sizing: border-box;
}

.menu-item:hover { text-decoration: none; background-color: var(--color-bg-hover-subtle); }

.menu-item.active { background-color: var(--color-bg-hover-subtle); }

.menu-item svg { display: inline-block; vertical-align: middle; }

.avatar-link:hover,
.avatar-link.active { background-color: transparent; }

.menu-right {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--color-bg-primary);
    min-width: 130px;
    box-shadow: var(--shadow-md);
    z-index: var(--z-dropdown);
    border-radius: var(--radius-base);
    margin-top: 5px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--color-text-primary);
    padding: var(--spacing-4) var(--spacing-6);
    text-decoration: none;
    display: block;
    border-radius: var(--radius-base);
    margin: 1px;
    font-size: var(--font-size-lg);
}

.dropdown-content a:hover { background-color: var(--color-bg-hover-subtle); text-decoration: none; }

.dropdown:hover .dropdown-content { display: block; }

.dropdown-content:hover { display: block; }

.menu-right .dropdown:hover .dropdown-content { display: none; }

.menu-right .dropdown.open .dropdown-content { display: block !important; }

.menu-right .dropdown.open .avatar-circle { outline: 2px solid var(--color-text-light); }

.menu-right .dropdown-content {
    right: 0;
    left: auto;
    margin-top: 5px;
    min-width: 100px;
    position: absolute;
    z-index: var(--z-dropdown);
}

header .dropdown-content { z-index: var(--z-dropdown-top) !important; }

.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.menu-right .dropdown::after { left: auto; right: 0; }

.submenu-item { position: relative; }

.submenu {
    display: none;
    position: absolute;
    right: 100%;
    top: -1px;
    background-color: var(--color-bg-primary);
    min-width: 180px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-base);
    margin-right: 5px;
}

.submenu a {
    color: var(--color-text-primary);
    padding: var(--spacing-4) var(--spacing-6);
    text-decoration: none;
    display: block;
    border-radius: var(--radius-base);
    margin: 1px;
    font-size: var(--font-size-lg);
}

.submenu a:hover { background-color: var(--color-bg-hover-subtle); text-decoration: none; }

.submenu-item:hover .submenu { display: block; }

.submenu:hover { display: block; }

.submenu-item::after {
    content: '';
    position: absolute;
    top: 0;
    right: 100%;
    width: 10px;
    height: 100%;
    background: transparent;
}

.submenu-arrow {
    float: right;
    margin-left: var(--spacing-4);
    margin-right: -4px;
}

.avatar-dropdown-container { display: flex; align-items: center; }

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background-color: var(--color-bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color var(--transition-fast);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-none);
}

.avatar-circle:hover { background-color: var(--color-bg-gray-light); }

img.avatar-circle { object-fit: cover; flex-shrink: 0; }

input[type="text"].search-input {
    margin: 0 var(--spacing-4);
    box-sizing: border-box;
    width: 160px;
    height: 34px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 var(--spacing-9);
    box-shadow: var(--shadow-sm);
    border: 0;
    border-radius: var(--radius-xl);
    outline: none;
    vertical-align: middle;
    line-height: 34px;
    margin-left: 8px;
    margin-right: 8px;
}

input[type="text"].search-input::placeholder { line-height: 34px; vertical-align: middle; }

.search-container { position: relative; }

.search-results {
    z-index: var(--z-dropdown);
    position: absolute;
    background: var(--color-bg-primary);
    min-width: 300px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-base);
    margin-top: 5px;
    left: var(--spacing-4);
    top: 100%;
}

.xhr-search-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.xhr-search-list li { margin: 0; }

.xhr-search-list a {
    padding: var(--spacing-4) var(--spacing-6);
    text-decoration: none;
    display: block;
    border-radius: var(--radius-base);
    margin: 1px;
    font-size: var(--font-size-lg);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xhr-search-list a:hover { background-color: var(--color-bg-hover-subtle); text-decoration: none; }

.xhr-search-list a.active { background-color: var(--color-bg-hover-subtle); text-decoration: none; }

.symbol-search-container { position: relative; }

input[type="text"].symbol-search-input {
    width: 240px;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    outline: none;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

input[type="text"].symbol-search-input.symbol-search-input-sm {
    width: 120px;
    height: 26px;
    font-size: 13px;
}

input[type="text"].symbol-search-input:focus { border-color: var(--color-border-medium); }

.symbol-search-results {
    z-index: var(--z-dropdown);
    position: absolute;
    background: var(--color-bg-primary);
    min-width: 400px;
    max-width: 600px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-base);
    margin-top: 5px;
    left: 0;
    top: 100%;
    max-height: 400px;
    overflow-y: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-medium);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-snug);
    cursor: pointer;
}

.btn:hover { background-color: var(--color-bg-gray-light); text-decoration: none; }

.btn:active { background-color: var(--color-bg-primary); transform: none; }

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

a.btn { text-decoration: none; }

a.btn:hover { text-decoration: none; }

.btn-primary {
    background-clip: padding-box;
    background-color: var(--color-bg-dark);
    color: var(--color-bg-primary);
    border-color: var(--color-text-primary);
    font-size: 15px;
}

.btn-primary:hover { background-color: var(--color-bg-dark-hover); }

.btn-secondary { background-color: var(--color-bg-hover-subtle); border-color: var(--color-border-medium); }

.btn-secondary:hover { background-color: var(--color-bg-hover); }

.btn-link:hover { background: transparent; text-decoration: underline; }

.btn-ghost {
    background-color: transparent;
    color: var(--color-text-primary);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--color-bg-gray-light);
    border-color: transparent;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: var(--radius-md);
}

.btn-test {
    margin-left: auto;
    background-clip: padding-box;
    background-color: var(--color-bg-dark);
    color: var(--color-bg-primary);
    border-color: transparent;
    border-radius: 3.40282e+38px;
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

.btn-test:hover { background-color: var(--color-bg-dark-hover); }

.btn-test:active { background-color: var(--color-bg-dark-hover); transform: none; }

.btn-test:disabled,
.btn-test[disabled] { opacity: 0.6; cursor: not-allowed; }

.icon-btn:hover,
.icon-btn.active,
.icon-btn.highlighted { background-color: transparent; color: #495057; }

.icon-btn.btn-secondary,
.icon-btn.btn-outline-secondary { background-color: transparent !important; border: none !important; }

.badge {
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-base);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
}

.badge-success { background: var(--color-success); color: var(--color-bg-primary); }

.badge-danger { background: var(--color-danger); color: var(--color-bg-primary); }

.badge-warning { background: var(--color-warning); color: var(--color-text-primary); }

.badge-info { background: var(--color-info); color: var(--color-bg-primary); }

.ordinary-a { color: var(--color-text-primary); }

.ordinary-a:hover { text-decoration: underline; }

.financials-a:hover { text-decoration: none; }

.parameters-link {
    cursor: pointer;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    margin-left: var(--spacing-5);
    color: var(--color-text-light);
}

.parameters-link i { font-size: var(--font-size-lg); }

.control-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--spacing-2);
}

.control-link:hover,
.control-link.active,
.control-link.highlighted { background-color: var(--color-bg-hover); text-decoration: none; }

/* Save/Watchlist dropdown */
.save-menu-wrapper {
    position: relative;
    display: inline-block;
}

.save-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: var(--spacing-2);
}

.save-dropdown-header {
    padding: var(--spacing-3) var(--spacing-4);
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-light);
}

.watchlists-list {
    max-height: 240px;
    overflow-y: auto;
    padding: var(--spacing-2) 0;
}

.watchlist-item {
    display: flex;
    align-items: center;
    padding: var(--spacing-2) var(--spacing-4);
    cursor: pointer;
    transition: background 0.15s;
    gap: var(--spacing-3);
}

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

.watchlist-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-text-primary);
    flex-shrink: 0;
}

.watchlist-name {
    flex: 1;
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watchlist-count {
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    background: var(--color-bg-hover);
    padding: 2px 6px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.watchlist-loading,
.watchlist-empty,
.watchlist-error {
    padding: var(--spacing-4);
    text-align: center;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.watchlist-error {
    color: var(--color-error);
}

.save-dropdown-footer {
    border-top: 1px solid var(--color-border-light);
    padding: var(--spacing-3) var(--spacing-4);
}

.create-watchlist-link,
.create-watchlist-link:visited,
.create-watchlist-link:hover,
.create-watchlist-link:active {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    color: var(--color-text-secondary);
    text-decoration: none !important;
    font-size: var(--font-size-sm);
    padding: var(--spacing-2) 0;
}

.create-watchlist-link:hover {
    color: var(--color-text-primary);
}

.create-watchlist-link svg {
    flex-shrink: 0;
}

.new-watchlist-input {
    width: 100%;
    padding: var(--spacing-2) var(--spacing-3);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-2);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    box-sizing: border-box;
}

.new-watchlist-input:focus {
    outline: none;
    border-color: var(--color-border-medium);
}

.create-watchlist-buttons {
    display: flex;
    gap: var(--spacing-2);
    justify-content: flex-end;
}

.create-watchlist-buttons button {
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.btn-cancel:hover {
    background: var(--color-bg-hover-subtle);
}

.btn-create {
    background: var(--color-bg-dark);
    color: white;
}

.btn-create:hover {
    background: var(--color-bg-dark-hover);
}

/* Saved page styles */
.saved-content {
    max-width: 900px;
}

.watchlist-section {
    margin-bottom: var(--spacing-8);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-4) var(--spacing-5);
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border-light);
}

.watchlist-title {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
}

.watchlist-count-badge {
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.watchlist-actions {
    display: flex;
    gap: var(--spacing-2);
}

.btn-icon {
    background: none;
    border: none;
    padding: var(--spacing-2);
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all 0.15s;
}

.btn-icon:hover {
    background: var(--color-bg-hover);
    color: var(--color-danger);
}

.btn-icon-sm {
    background: none;
    border: none;
    padding: var(--spacing-1);
    cursor: pointer;
    color: var(--color-text-muted);
    border-radius: var(--radius-md);
    transition: all 0.15s;
    opacity: 0;
}

.stocks-table tr:hover .btn-icon-sm {
    opacity: 1;
}

.btn-icon-sm:hover {
    background: var(--color-bg-hover);
    color: var(--color-danger);
}

.watchlist-stocks {
    padding: 0;
}

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

.stocks-table th {
    text-align: left;
    padding: var(--spacing-3) var(--spacing-5);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    border-bottom: 1px solid var(--color-border-light);
}

.stocks-table th:first-child,
.stocks-table td:first-child {
    width: 1%;
    white-space: nowrap;
}

.stocks-table td {
    padding: var(--spacing-3) var(--spacing-5);
    border-bottom: 1px solid var(--color-border-light);
}

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

.stocks-table tr:hover {
    /* background: var(--color-bg-hover-subtle); */
}

.stocks-table a {
    text-decoration: none;
}

.stocks-table a:hover {
    text-decoration: underline;
}

.stocks-table a:hover {
    text-decoration: underline;
}

.stock-symbol {
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.stock-symbol:hover {
    text-decoration: underline;
}

.stock-name {
    color: var(--color-text-primary);
    text-decoration: none;
}

.stock-name:hover {
    text-decoration: underline;
}

.stock-sector {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.watchlist-empty-state {
    padding: var(--spacing-8) var(--spacing-5);
    text-align: center;
    color: var(--color-text-secondary);
}

.empty-state {
    text-align: center;
    padding: var(--spacing-12) var(--spacing-8);
    color: var(--color-text-secondary);
}

.empty-state svg {
    margin-bottom: var(--spacing-4);
    color: var(--color-text-muted);
}

.empty-state h3 {
    margin: 0 0 var(--spacing-2);
    color: var(--color-text-primary);
}

.empty-state p {
    margin: 0;
}

.create-list-section {
    margin-top: var(--spacing-6);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-2);
    padding: var(--spacing-3) var(--spacing-4);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-medium);
}

/* Modal styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--color-bg-primary);
    padding: var(--spacing-6);
    border-radius: var(--radius-lg);
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content h3 {
    margin: 0 0 var(--spacing-4);
}

.modal-input {
    width: 100%;
    padding: var(--spacing-3);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-4);
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: var(--color-border-medium);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-2);
}

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

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

.description-toggle-btn {
    color: var(--color-text-primary);
    text-decoration: none;
    padding: 2px 3px 3px 6px;
    border-radius: var(--radius-lg);
    background-color: var(--color-bg-hover-subtle);
}

.description-toggle-btn:hover { background-color: var(--color-bg-hover); text-decoration: none; }

.description-toggle-btn svg {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 2px;
    vertical-align: middle;
}

input.labels { width: 350px; }

select { padding: 1px 2px; outline: none; }

select:focus { outline: none; }

.search-form td { vertical-align: middle; }

.search-table tr:last-child td { padding-bottom: 1em; }

.table-financials { padding-right: var(--spacing-4); }

.table-financials .component { padding-left: var(--spacing-8); }

.table-financials .component-l2 { padding-left: var(--spacing-18); }

.table-financials .pd-component { padding-bottom: var(--spacing-5); }

.table-financials td { padding: var(--spacing-1); white-space: nowrap; }

.table-financials .row-header-right {
    padding-left: var(--spacing-5);
    min-width: 150px;
    white-space: nowrap;
}

.table-financials .row-header-right.expanded {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
}

.td-label {
    padding-right: var(--spacing-3) !important;
    min-width: 63px;
    font-weight: 400;
    width: 120px;
    font-size: 14px;
}

.td-header { border-bottom: 1px solid var(--color-border-gray); padding-bottom: 3px !important; }

.td-header-map { padding-bottom: 3px !important; }

.td-border-top { border-top: 1px solid var(--color-border-gray); padding-top: var(--spacing-5); }

.td-border-top-map { border-top: 1px solid var(--color-border-gray); padding-top: var(--spacing-5); }

.row-header {
    min-width: 150px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.row-header.expanded {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.header-td {
    padding-bottom: 5px;
    white-space: nowrap;
    color: var(--color-text-secondary);
}

.results td { padding-right: var(--spacing-8); }

.full-table td { padding-right: var(--spacing-8); }

.dashboard td { padding-right: var(--spacing-7); }

.dashboard td.text-align-right { padding-right: 0; }

.tr-space td { padding-top: var(--spacing-12) !important; }

.first-tr { padding-top: var(--spacing-5); }

.td-financial { padding: 0 3px; text-align: right; }

.td-financial-header {
    padding: 0 3px;
    text-align: right;
    min-width: 55px;
}

/* Year separator for quarterly data */
.td-financial.year-start,
.td-financial-header.year-start {
    border-left: 2px solid #c4c4c4;
}

.gics-table { font-size: var(--font-size-md); }

.gics-table td:nth-child(2) { min-width: 170px; }

.gics-table td:nth-child(3) { min-width: 200px; }

.gics-table tr:nth-child(odd) td { padding-bottom: var(--spacing-5); }

.sub-industry { font-weight: var(--font-weight-bold); }

.sector-id,
.industry-group-id,
.industry-id,
.sub-industry-id { display: none; }

.criteria-table {
    width: 100%;
    border-bottom: 1px solid var(--color-border-table);
}

.criteria-td { width: 55%; padding: 0; }

.criteria-table td { vertical-align: top; }

.ul-criteria { padding: 0; margin-right: var(--spacing-24); }

.ul-criteria li { margin-bottom: 5px; list-style: none; }

.ul-criteria li.parameters-space { margin-bottom: var(--spacing-8); }

.content { display: flow-root; padding: 0 var(--spacing-10); }

.content:has(.main-content-wrapper) { padding-left: 0; }

.content:has(.prompt-edit-page),
.content:has(.datasets-page),
.content:has(.evaluations-page),
.content:has(.tools-page),
.content:has(.prompt-properties-page),
.content:has(.dataset-detail-page),
.content:has(.documentation-container) { padding: 0; }

.prompt-page-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-top: var(--spacing-8);
}

footer {
    margin-top: var(--spacing-24);
    margin-bottom: var(--spacing-8);
    padding: 0 var(--spacing-8);
    font-size: var(--font-size-base);
    color: var(--color-text-light);
}

.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: start;
}

.dashboard-block {
    flex: 0 0 auto;
    width: fit-content;
    margin-right: 30px;
}

.dashboard-table { max-width: 405px; }

.dashboard-table th { white-space: nowrap; }

.workers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.workers-header h2 { margin-bottom: 0; }

.workers-time-filters { display: flex; gap: 6px; }

.workers-charts-grid {
    margin: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.workers-chart-container {
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 8px;
}

.workers-chart { width: 100%; height: 220px; }

.workers-stats-box {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-9);
    margin: 12px 0;
}

.workers-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.workers-stats-header h4 { margin: 0; font-size: 15px; }

.workers-stats-header a {
    font-size: 13px;
    color: var(--color-link);
    text-decoration: none;
}

.workers-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-9);
}

.workers-stat-label {
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.workers-stat-value { font-size: 20px; font-weight: 600; }

.workers-stat-value-sub {
    font-size: 13px;
    font-weight: normal;
    color: var(--color-text-light);
}

.workers-table th,
.workers-table td { padding-left: 6px; padding-right: 6px; }

.workers-input-inherited { color: #999; }

.workers-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.workers-pagination-info { font-size: 13px; color: var(--color-text-light); }

.workers-pagination-buttons { display: inline-flex; gap: 6px; }

.btn.disabled,
a.disabled { pointer-events: none; opacity: 0.6; }

.settings-container { max-width: 600px; }

.settings-header h1,
.settings-header h2 { font-size: 24px; color: var(--color-text-primary); }

.settings-form {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.62);
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #8f8f8f;
}

.form-group input:not([type="checkbox"]):not([type="radio"]) {
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    outline: none;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus { border-color: var(--color-border-medium); }

.avatar-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.avatar-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--color-text-primary);
}

.avatar-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.avatar-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text-light);
    overflow: hidden;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-display img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-upload { flex: 1; }

.avatar-upload input[type="file"] { display: none; }

.avatar-upload-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--color-bg-subtle);
    color: #374151;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease-in-out;
}

.avatar-upload-label:hover { background-color: var(--color-bg-hover-subtle); }

.avatar-info {
    font-size: 12px;
    margin-top: 8px;
    color: #8f8f8f;
}

.avatar-remove-btn { margin-top: 10px; }

.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

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

.btn-danger:hover { background-color: #c82333; border-color: #bd2130; }

.settings-section {
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.62);
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--color-text-primary);
}

.settings-description {
    color: #8f8f8f;
    font-size: 14px;
    margin-bottom: 20px;
}

.settings-field { margin-bottom: 20px; }

.settings-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text-primary);
}

.settings-field input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 8px 12px;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.settings-field-help {
    color: #8f8f8f;
    font-size: 13px;
    margin-top: 4px;
}

.settings-actions { margin-top: 24px; }

.api-keys-container { max-width: 1200px; }

.api-keys-header h1,
.api-keys-header h2 { font-size: 24px; color: var(--color-text-primary); }

.api-keys-form,
.api-keys-list {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04), 0px 0px 1px 0px rgba(0, 0, 0, 0.62);
}

.api-keys-list { margin-top: 20px; }

.api-keys-list h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: var(--color-text-primary);
}

.form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.form-row .field { flex: 1; min-width: 180px; }

.form-row .field-wide { flex: 2; }

.form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 14px;
}

.form-row input,
.form-row select {
    width: 100%;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
}

.form-help-text {
    margin-top: 8px;
    color: var(--color-text-light);
    font-size: 13px;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    table-layout: auto;
}

.keys-table th,
.keys-table td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.keys-table th {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 13px;
}

.keys-table td { font-size: 14px; }

.keys-table th:nth-child(1) { width: 10%; }

.keys-table th:nth-child(2) { width: 13%; }

.keys-table th:nth-child(3) { width: 22%; }

.keys-table th:nth-child(4) { width: 8%; }

.keys-table th:nth-child(5) { width: 10%; }

.keys-table th:nth-child(6) { width: 8%; }

.keys-table th:nth-child(7) { width: 12%; }

.keys-table th:nth-child(8) { width: 17%; }

.keys-table td:nth-child(3) { max-width: 0; }

.keys-table td:nth-child(3) code {
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.provider-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-light);
    border-radius: 9999px;
    font-size: 12px;
    color: #374151;
    font-weight: 500;
}

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

.key-value {
    font-family: monospace;
    font-size: 13px;
    color: var(--color-text-light);
}

.enabled-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 9999px;
    font-size: 11px;
    color: #065f46;
    font-weight: 500;
}

.disabled-badge {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-light);
    border-radius: 9999px;
    font-size: 11px;
    color: var(--color-text-light);
}

.usage-stats { font-size: 12px; color: var(--color-text-light); }

.usage-stats-empty { color: #999; }

.usage-stats-tokens { line-height: 1.4; }

.btn-group { display: flex; gap: 6px; }

.btn-chart-preview { padding: 4px 10px; font-size: 12px; }

.inline-form { display: inline; }

.notification-settings-section { margin-top: 32px; }

.notification-settings-section .api-keys-header { margin-bottom: 8px; }

.notification-settings-desc {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.notification-form { margin-top: 16px; }

.notification-settings-group {
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.notification-settings-group:last-of-type { border-bottom: none; }

.notification-settings-group h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.notification-settings-group .form-row { margin-bottom: 8px; }

.notification-settings-group .form-help-text { margin-top: 8px; }

.notification-settings-group .form-help-text a { color: var(--color-primary); }

.settings-status {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--color-text-light);
    background: var(--color-bg-subtle);
    border-radius: 4px;
}

.settings-status.configured { color: #065f46; background: #d1fae5; }

.notification-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.notifications-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border-light);
}

.notifications-section h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

.tools-section-desc {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 16px;
}

.tools-section-desc a { color: var(--color-primary); }

.notification-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--color-bg-subtle);
    border-radius: 8px;
    margin-bottom: 8px;
}

.notification-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-toggle-left svg { color: var(--color-text-secondary); flex-shrink: 0; }

.notification-toggle-left span:first-of-type { font-weight: 500; color: var(--color-text-primary); }

.notification-configured {
    font-size: 12px;
    color: #065f46;
    background: #d1fae5;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.notification-not-configured {
    font-size: 12px;
    color: var(--color-text-light);
    margin-left: 8px;
}

.notification-not-configured a { color: var(--color-primary); }

.notification-toggle-row .toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.users-role-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.users-role-form select {
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.users-empty-value { color: #999; }

.job-section { margin-bottom: var(--spacing-12); }

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-title { margin: 0; }

.job-script {
    font-family: monospace;
    margin-left: 10px;
    font-weight: normal;
}

.logs-table {
    width: auto;
    max-width: 900px;
    border-collapse: collapse;
}

.logs-table th {
    text-align: left;
    padding: 10px 40px 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--color-border);
    border-bottom: 1px solid #dee2e6;
}

.logs-table td {
    padding: 6px 40px 6px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.log-date {
    font-family: monospace;
    font-size: 14px;
    color: var(--color-text-primary);
    white-space: nowrap;
}

.log-size {
    color: var(--color-text-light);
    font-size: 13px;
    white-space: nowrap;
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-success,
.status-completed {
    background-color: #d4edda;
    color: #155724;
}

.status-failed,
.status-error {
    background-color: #f8d7da;
    color: #721c24;
}

.status-running,
.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-partial {
    background-color: #cce5ff;
    color: #004085;
}

.status-label { text-transform: uppercase; }

.log-link { color: var(--color-link); text-decoration: none; }

.log-link:hover { text-decoration: underline; }

.log-row-hidden { display: none !important; }

.show-more-container { padding: 12px 0; }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 { color: var(--color-text-primary); }

.no-logs { color: #999; }

.feedback-container { max-width: 700px; }

.feedback-header { margin-bottom: 8px; }

.feedback-description { color: var(--color-text-light); margin-bottom: 24px; }

.feedback-form-card {
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.feedback-field { margin-bottom: 20px; }

.feedback-field-large { margin-bottom: 24px; }

.feedback-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: var(--color-text-primary);
}

.feedback-required { color: #dc2626; }

.feedback-field input[type="text"] {
    width: 100%;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

.feedback-field select {
    width: 100%;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

.feedback-field textarea {
    width: 100%;
    font-size: var(--font-size-lg);
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    font-family: inherit;
    resize: vertical;
}

.feedback-field-large textarea {
    width: 100%;
    font-size: var(--font-size-lg);
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    font-family: inherit;
    resize: vertical;
}

.feedback-field-help {
    color: var(--color-text-light);
    font-size: 13px;
    margin-top: 4px;
}

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

.feedback-help-section {
    margin-top: 32px;
    padding: 16px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
}

.feedback-help-section h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    color: var(--color-text-primary);
}

.feedback-help-section p {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.feedback-help-section p:last-child { margin: 0; }

.feedback-help-section a { color: var(--color-link); text-decoration: none; }

.feedback-help-section a:hover { text-decoration: underline; }

.documentation-container {
    display: flex;
    gap: 18px;
    margin: 0 auto;
}

.doc-sidebar {
    position: sticky !important;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    flex-shrink: 0;
}

.doc-link { color: var(--color-text-primary); text-decoration: underline; }

.doc-link:hover { color: var(--color-text-secondary); }

.doc-content {
    flex: 1;
    max-width: 900px;
    padding-bottom: 100px;
}

.doc-section { margin-bottom: 50px; }

.doc-section:first-child { margin-top: 0; }

.doc-section h2 {
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 10px;
}

.doc-section code {
    background-color: var(--color-bg-subtle);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.doc-section pre {
    background-color: var(--color-bg-subtle);
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.doc-section pre code { background: none; padding: 0; }

.feature-card h4 { color: var(--color-text-primary); }

.variable-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--color-info);
    border-radius: var(--radius-lg);
    padding: 0 20px;
    margin-bottom: 25px;
}

.variable-card pre {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.example-card {
    background: #fef9e7;
    border: 2px solid #f59e0b;
    border-radius: var(--radius-lg);
    padding: 24px;
}

.example-card pre {
    background-color: #ffffff;
    border: 1px solid #fbbf24;
    padding: 16px;
    border-radius: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.note {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 4px;
}

.note p { margin: 0; color: #1e40af; }

.warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 15px;
    border-radius: 4px;
}

.warning p { margin: 0; color: #92400e; }

@media (max-width: 768px) {
    .documentation-container {
        flex-direction: column;
    }
    
    .doc-sidebar {
        position: static;
    flex: none;
    max-height: none;
    };
}

.prompts-container { display: inline-block; }

.prompts-header { display: flex; align-items: center; }

.prompts-header .btn { margin-left: auto; }

.prompts-table-header { vertical-align: middle; }

.prompts-table-header-right { vertical-align: middle; text-align: right; }

.prompts-sort-link { margin-left: 0; text-decoration: none; }

.prompts-sort-link:hover { text-decoration: none; }

.prompts-item-container { display: flex; align-items: center; }

.prompts-item-indent { padding-left: 10px; border-left: 1px solid var(--color-border-light); }

.prompts-item-no-indent { padding-left: 0; border-left: none; }

.prompts-actions { text-align: right; }

.prompts-action-link { margin-right: 10px; }

.prompts-delete-form { display: none; }

.prompt-row-wrapper { position: relative; }

.prompts-item-indent,
.prompts-item-no-indent { position: relative; }

.prompt-menu-wrapper {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
}

.prompt-menu-trigger {
    opacity: 0;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: opacity 0.2s;
    color: #666;
}

.prompt-row-wrapper:hover .prompt-menu-trigger { opacity: 1; }

.prompt-menu {
    position: fixed;
    background: white;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 9999;
}

.prompt-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.prompt-menu-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.prompt-menu-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.prompt-menu-item:only-child { border-radius: var(--radius-lg); }

.prompt-menu-item:hover { background-color: #f5f5f5; }

.prompt-menu-item-danger { color: #dc3545; }

.prompt-menu-item-danger:hover { background-color: #fff5f5; }

.prompt-new-form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-new-form-row-spaced {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-new-name-input {
    width: 400px !important;
    height: 36px !important;
    font-size: var(--font-size-lg) !important;
    padding: 0 0 0 12px !important;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium) !important;
    border-radius: var(--radius-lg) !important;
    line-height: 1.42857;
}

.prompt-new-parent-label { min-width: 140px; }

.prompt-new-parent-select {
    width: 400px;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

.prompt-edit-page pre { max-width: 800px; }

.prompt-edit-page code {
    white-space: pre !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.prompt-edit-page .markdown-content,
.prompt-edit-page .output-content,
.prompt-edit-page .formatted-view {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

.prompt-edit-page .output-item,
.prompt-edit-page .response-section { overflow-x: auto; max-width: 100%; }

.prompts-link {
    display: block;
    padding: 6px 0;
    position: relative;
    z-index: 1;
    color: var(--color-text-primary);
}

.prompts-link::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -8px;
    right: 0;
    background-color: var(--color-bg-hover-subtle);
    border-radius: var(--radius-md);
    z-index: -1;
    opacity: 0;
}

.prompts-link:hover { text-decoration: none !important; }

.prompts-link:hover::before,
.prompts-link.active::before { opacity: 1; }

.prompt-edit-sidebar {
    width: fit-content !important;
    min-width: 140px !important;
    flex: 0 0 auto;
    padding-top: 10px;
}

.prompt-edit-page .sidebar nav ul li { margin: 0; padding: 0; }

.versions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.versions-list li { margin: 0; padding: 0; }

.version-item {
    display: block;
    padding: var(--spacing-2) 0;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin-bottom: 2px;
}

.version-item:hover { text-decoration: none; }

.tabs-list {
    color: var(--color-text-primary);
    width: fit-content;
    justify-content: center;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    border-radius: 6px;
    gap: 2px;
}

.tabs-trigger {
    border-radius: 8px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    color: #64748b;
    background: transparent;
    user-select: none;
}

.tabs-trigger:hover { color: #475569; text-decoration: none; }

.tabs-trigger.active {
    background: white;
    color: #0f172a;
    border-color: #e2e8f0;
}

.tabs-trigger:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

.markdown-content {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: var(--spacing-14);
    margin-bottom: var(--spacing-9);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
}

.markdown-content h1 {
    font-size: var(--font-size-xl);
    border-bottom: 1px solid var(--color-border-subtle);
    padding-bottom: 0.3em;
}

.markdown-content h2 {
    font-size: var(--font-size-xl);
    border-bottom: 1px solid var(--color-border-subtle);
    padding-bottom: 0.3em;
}

.markdown-content h3 { font-size: var(--font-size-lg); }

.markdown-content h4 { font-size: var(--font-size-md); }

.markdown-content h5 { font-size: var(--font-size-base); }

.markdown-content h6 { font-size: var(--font-size-sm); color: var(--color-text-muted); }

.markdown-content p {
    margin-top: 0;
    margin-bottom: var(--spacing-9);
    font-size: var(--font-size-base);
}

.markdown-content blockquote {
    padding: 0 1em;
    color: var(--color-text-muted);
    border-left: 0.25em solid var(--color-border-separator);
    margin: 0 0 var(--spacing-9) 0;
}

.markdown-content code {
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(27, 31, 35, 0.05);
    border-radius: var(--radius-sm);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.markdown-content pre {
    padding: var(--spacing-9);
    overflow: auto;
    font-size: 85%;
    line-height: var(--line-height-relaxed);
    background-color: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-9);
}

.markdown-content pre code { padding: 0; background-color: transparent; }

.markdown-content ul,
.markdown-content ol { padding-left: 2em; margin-bottom: var(--spacing-9); }

.markdown-content li { margin-bottom: 0.25em; }

.markdown-content table {
    border-spacing: 0;
    border-collapse: collapse;
    margin-bottom: var(--spacing-9);
    width: 100%;
}

.markdown-content table th,
.markdown-content table td { padding: var(--spacing-3) 13px; border: 1px solid var(--color-border-separator); }

.markdown-content table th { font-weight: var(--font-weight-semibold); background-color: var(--color-bg-secondary); }

.markdown-content table tr:nth-child(2n) { background-color: var(--color-bg-secondary); }

.markdown-content hr {
    height: 0.25em;
    padding: 0;
    margin: var(--spacing-14) 0;
    background-color: #e1e4e8;
    border: 0;
}

textarea.fullscreen {
    resize: none !important;
    padding: 20px !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    overflow-y: auto !important;
    max-height: none !important;
    min-height: none !important;
    position: fixed;
    top: 20px;
    left: 20px;
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    z-index: 10000;
}

textarea.fullscreen::-webkit-scrollbar { width: 12px; }

textarea.fullscreen::-webkit-scrollbar-track { background: #f1f1f1; }

textarea.fullscreen::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 6px; }

textarea.fullscreen::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

textarea.fullscreen:focus { outline: none !important; box-shadow: none !important; }

.help-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    top: 120%;
    min-width: 280px;
    max-width: 420px;
    width: max-content;
    white-space: pre-line;
    padding: 10px 12px;
    background: #111827;
    color: white;
    border: 1px solid #111827;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    font-size: 12px;
    line-height: 1.4;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.help-icon:hover::after,
.help-icon:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.help-icon.has-popup::after { display: none !important; }

.help-icon .help-popup {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    top: 120%;
    min-width: 280px;
    max-width: 520px;
    width: max-content;
    white-space: normal;
    padding: 10px 12px;
    background: #111827;
    color: white;
    border: 1px solid #111827;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
    font-size: 12px;
    line-height: 1.4;
    pointer-events: auto;
    user-select: text;
    max-height: none;
    overflow: visible;
}

.help-icon:hover .help-popup,
.help-icon:focus .help-popup,
.help-icon:focus-within .help-popup {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0);
}

.help-icon .help-popup pre {
    margin: 6px 0 0 0;
    background: #0b1220;
    color: #d1e7ff;
    padding: 8px;
    border-radius: 4px;
    white-space: pre-wrap;
}

.help-icon.has-popup {
    color: #666;
    border: 1px solid var(--color-border-medium);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.attributions-section,
.attributions-section a,
.attributions-section li {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.view-link.active { background: #6c757d; color: white; }

.tabs-trigger.view-link,
.tabs-trigger.template-view-link {
    background: transparent !important;
    color: #171717 !important;
    border: 1px solid transparent !important;
    font-size: 12px !important;
    padding: 5px 8px !important;
}

.tabs-trigger.view-link.active,
.tabs-trigger.template-view-link.active { background: oklch(97% 0 0) !important; color: #171717 !important; }

body.body-fullscreen { overflow: hidden; }

.fs-close-btn {
    position: fixed;
    top: 0;
    right: 20px;
    z-index: 10001;
    padding: 6px 10px;
    background: #111827;
    color: white;
    border: 1px solid #111827;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.fs-toolbar {
    position: fixed;
    top: 0;
    right: 160px;
    z-index: 10001;
    display: flex;
    gap: 8px;
}

.fs-link {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 3px;
    text-decoration: none;
    background: white;
    color: #6c757d;
    border: 1px solid #6c757d;
}

.fs-link.active {
    background: #6c757d;
    color: white;
    border: 1px solid #6c757d;
}

.fs-preview {
    position: fixed;
    top: 20px;
    left: 20px;
    width: calc(100vw - 40px);
    height: calc(100vh - 40px);
    z-index: 10000;
    display: none;
    padding: 10px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    background: white;
    box-sizing: border-box;
    overflow-y: auto;
    line-height: 1.6;
    font-family: inherit;
}

.page-row { display: flex; gap: 20px; }

.right-pane { margin-top: var(--spacing-8); padding-right: var(--spacing-10); }

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

.full-flex-col {
    margin-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #666;
}

.container-rel {
    position: relative;
    margin-bottom: 15px;
    min-height: 95px;
}

.textarea-toolbar-top {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 10;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    pointer-events: none;
}

.textarea-toolbar-top .btn-insert-var { pointer-events: auto; }

.textarea-toolbar-top a { pointer-events: auto; }

#template, #system_template {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 95px;
    height: 95px;
    padding: 56px 14px 17px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 12px;
    resize: none;
    box-sizing: border-box;
    margin: 0;
    overflow-y: hidden;
    line-height: 1.4;
    outline: none;
}

#templatePreview, #systemTemplatePreview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: none;
    width: 100%;
    min-height: 95px;
    height: 95px;
    max-height: 424px;
    padding: 56px 14px 17px 14px;
    border: 1px solid var(--color-border-medium);
    border-radius: 12px;
    background: white;
    box-sizing: border-box;
    margin: 0;
    overflow-y: auto;
    line-height: 1.4;
    font-family: inherit;
}

#templatePreview > *:first-child,
#systemTemplatePreview > *:first-child,
.markdown-content > *:first-child,
.markdown-content-output > *:first-child { margin-top: 0; }

#templatePreview > *:last-child,
#systemTemplatePreview > *:last-child,
.markdown-content > *:last-child,
.markdown-content-output > *:last-child { margin-bottom: 0; }

#model {
    width: auto !important;
    display: inline-block !important;
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    background: var(--color-surface);
    color: var(--color-text-primary);
    outline: none;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.2s;
    border-radius: 24px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.switch input:checked + .switch-slider { background: #0076ff; }

.switch input:checked + .switch-slider:before { transform: translateX(20px); }

.switch input:focus + .switch-slider { box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.2); }

.switch-label { font-size: 14px; cursor: pointer; }

.switch-sm { width: 36px; height: 20px; }

.switch-sm .switch-slider { border-radius: 20px; }

.switch-sm .switch-slider:before { height: 16px; width: 16px; }

.switch-sm input:checked + .switch-slider:before { transform: translateX(16px); }

.switch-container-sm {
    display: flex;
    align-items: center;
    gap: 12px;
}

.version-list-item { position: relative; }

.version-item-wrapper { position: relative; display: block; }

.version-item-wrapper .version-item {
    display: block;
    padding: var(--spacing-2) 0;
    padding-right: 24px;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    text-decoration: none;
    position: relative;
    z-index: 1;
    margin-bottom: 2px;
}

.version-item-wrapper .version-item:hover { text-decoration: none; }

.version-item-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -8px;
    right: -8px;
    background-color: var(--color-bg-hover-subtle);
    border-radius: var(--radius-md);
    z-index: -1;
    opacity: 0;
}

.version-item-wrapper:hover::before { opacity: 1; }

.version-item-wrapper[data-selected="True"] { background: transparent; }

.version-item-wrapper[data-selected="True"]::before { opacity: 1; }

.version-menu-trigger {
    opacity: 0;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: opacity 0.2s;
    color: #666;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.version-item-wrapper:hover .version-menu-trigger { opacity: 1; }

.version-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 1000;
    margin-top: 4px;
}

.version-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.version-menu-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.version-menu-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.version-menu-item:only-child { border-radius: var(--radius-lg); }

.version-menu-item:hover { background-color: #f5f5f5; }

.version-menu-item-danger { color: #dc3545; }

.version-menu-item-danger:hover { background-color: #fff5f5; }

.saved-screen-item-wrapper { position: relative; }

.saved-screen-item-wrapper .saved-screen-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 24px;
}

.screen-menu-trigger {
    opacity: 0;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: opacity 0.2s;
    color: #666;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.saved-screen-item-wrapper:hover .screen-menu-trigger { opacity: 1; }

.screen-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    z-index: 1000;
    margin-top: 4px;
}

.screen-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.screen-menu-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.screen-menu-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.screen-menu-item:only-child { border-radius: var(--radius-lg); }

.screen-menu-item:hover { background-color: #f5f5f5; }

.screen-menu-item-danger { color: #dc3545; }

.screen-menu-item-danger:hover { background-color: #fff5f5; }

.screen-menu-item-disabled:hover { background-color: transparent; }

.screen-menu-rename-form { padding: 10px; }

.deployed-badge {
    color: #0066cc;
    font-size: 14px;
    margin-left: 4px;
}

#groundingContainer {
    display: none;
    margin-top: -8px;
    margin-bottom: 8px;
}

#thinkingContainer {
    display: none;
    margin-top: 0;
    margin-bottom: 15px;
}

#promptOutputSelection {
    margin-top: 10px;
    margin-left: 32px;
    display: none;
}

#promptOutputVariablesDoc {
    background: #f9f9f9;
    border-left: 3px solid #4CAF50;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
    display: none;
}

.dataset-input-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.dataset-input-item.looped { background: #e6f7ff; }

#addInputModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

#addInputModal .modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-width: 400px;
}

#craftedPromptSection,
[id^="craftedPromptSection_"] {
    margin-bottom: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

.lc {
    position: absolute;
    padding-bottom: var(--spacing-5);
    margin-top: -10px;
    background: var(--color-bg-primary);
}

#myDIV { background: var(--color-bg-primary); position: absolute; }

.screen-filters-compare button { margin-bottom: 5px; cursor: pointer; }

.screen-filters-compare .btn.btn-sm {
    height: 31px;
    padding: var(--spacing-2) var(--spacing-5);
    font-size: var(--font-size-base);
    display: inline-flex;
    align-items: center;
}

.screen-filters-compare .custom-select-wrapper { display: inline-flex; align-items: center; }

.screen-filters-compare .custom-select-wrapper select {
    height: 31px;
    padding: var(--spacing-2) 28px var(--spacing-2) var(--spacing-5);
    margin: 0 0 5px 0;
}

.screen-filters-compare .btn.btn-sm,
.screen-filters-compare .custom-select-wrapper select { vertical-align: middle; line-height: var(--line-height-tight); }

.custom-select-wrapper { position: relative; display: inline-block; }

.custom-select-wrapper select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 28px;
    background-image: none !important;
}

.custom-select-wrapper select::-ms-expand { display: none; }

.custom-select-wrapper .select-arrow {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    fill: currentColor;
}

.button {
    padding: 0 12px;
    cursor: pointer;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #131313;
    color: #ffffff;
    font-size: 16px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: background-color .15s ease;
}

.sort { cursor: pointer; }

.sort:hover { text-decoration: none; }

.compare-h { margin-bottom: 0; }

.submit { cursor: pointer; }

.chart { margin-top: 0; margin-bottom: var(--spacing-12); }

.ratios-display-wrapper {
    display: flex;
    align-items: start;
    gap: 32px;
}

.ratios-display-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 3px 6px;
    width: fit-content;
}

.ratio-label { white-space: nowrap; color: var(--color-text-primary); }

.ratio-value {
    text-align: right;
    font-weight: 500;
    color: var(--color-text-primary);
}

.ratio-item { position: relative; display: contents; }

.ratio-item .ratio-label,
.ratio-item .ratio-value { position: relative; }

.ratio-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    background: #18181b;
    color: #fafafa;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    max-width: 500px;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-in-out, visibility 0.15s ease-in-out;
    z-index: 10002;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.ratio-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #18181b;
}

.ratio-item:hover .ratio-tooltip { opacity: 1; visibility: visible; }

.ratio-tooltip-formula {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    color: #fafafa;
    font-size: 11px;
    line-height: 1.6;
}

.ratio-tooltip-formula > div:first-child { margin-bottom: 6px; }

.ratio-tooltip-breakdown {
    padding-top: 6px;
    margin-top: 2px;
    border-top: 1px solid #27272a;
    font-size: 10px;
    color: #a1a1aa;
}

.ratio-tooltip-breakdown > div { margin: 2px 0; }

.sidebar {
    position: static;
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    padding: var(--spacing-9) var(--spacing-9) var(--spacing-14) var(--spacing-10);
    overflow: auto;
    z-index: var(--z-base);
}

#left-sidebar { left: 0; }

#right-sidebar { right: 0; }

.main-content-wrapper {
    position: relative;
    z-index: var(--z-base);
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

#markdown-content {
    margin-left: 18px;
    margin-right: 18px;
    margin-top: var(--spacing-8);
    margin-bottom: 0;
    max-width: var(--max-width-content);
    padding: 0;
    flex-grow: 1;
}

#left-sidebar h2 {
    font-size: var(--font-size-lg);
    margin: var(--spacing-2) 0 var(--spacing-6);
    padding: 0;
}

#toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#toc-list li { margin: 0; padding: 0; }

#toc-list a {
    display: block;
    padding: var(--spacing-3) 0;
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    text-decoration: none;
    position: relative;
    z-index: 1;
}

#toc-list a::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -8px;
    right: -8px;
    background-color: var(--color-bg-hover-subtle);
    border-radius: var(--radius-md);
    z-index: -1;
    opacity: 0;
}

#toc-list a:hover::before,
#toc-list a.active::before { opacity: 1; }

.sidebar-sub {
    margin-left: var(--spacing-5);
    padding-left: var(--spacing-5);
    border-left: 1px solid var(--color-border-light);
    list-style: none;
}

.financial-sub {
    margin-left: 6px;
    padding-left: var(--spacing-5);
    border-left: 1px solid var(--color-border-light);
}

.sidebar-sub a::before { left: -18px; }

.financials-period-switcher {
    display: flex;
    gap: var(--spacing-2);
    align-items: center;
}

.period-btn, .template-view-btn {
    padding: 5px var(--spacing-6);
    background: transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    border: none;
    text-decoration: none;
    color: inherit;
}

.period-btn:hover, .template-view-btn:hover { background-color: var(--color-bg-hover-subtle); text-decoration: none; }

.period-btn.active, .template-view-btn.active { background-color: var(--color-bg-hover-subtle); }

.trend-number {
    display: none;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

.trend-indicator .fas {
    position: relative;
    top: 0;
    vertical-align: middle;
    margin: 0;
    padding: 0;
}

.chart-height-285 { height: 285px; }

.chart-height-100 { height: 100px; }

.time-range-btn {
    padding: var(--spacing-2) var(--spacing-5);
    border: none;
    background: transparent;
    border-radius: var(--radius-base);
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
}

.time-range-btn:hover { background-color: var(--color-bg-hover-subtle); }

.time-range-btn.active { background-color: var(--color-bg-hover-subtle); }

/* Price chart tooltip */
.chart-tooltip {
    position: absolute;
    background: #18181b;
    color: #fafafa;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    top: 0;
    left: 0;
    opacity: 0;
}

/* Crosshair lines for price/volume charts */
.crosshair {
    stroke: #9ca3af;
    stroke-width: 1;
    stroke-dasharray: 3,3;
}

#right-sidebar .filings-year { margin-bottom: var(--spacing-4); }

#right-sidebar .year-header { font-weight: var(--font-weight-semibold); margin-bottom: 2px; }

#right-sidebar .filings-type { font-size: var(--font-size-sm); }

#right-sidebar .filings-year-hidden { display: none; }

#sec-filings-toggle {
    display: inline-block;
    font-size: var(--font-size-base);
    margin-top: var(--spacing-3);
    border-width: 1px;
    border-radius: var(--radius-lg);
    border-style: solid;
    border-color: #e5e5e5;
}

.btn.highlighted {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-color: var(--color-border-medium);
}

.prompt-properties-content h2 { margin-bottom: 20px; }

.prompt-properties-form .form-row { margin-bottom: 15px; }

.prompt-properties-form .form-row-spaced { margin-bottom: 20px; }

.prompt-properties-form label { display: block; margin-bottom: 5px; }

.prompt-properties-form input[type="text"],
.prompt-properties-form input[type="number"],
.prompt-properties-form select {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.prompt-properties-form input[type="text"] { width: 300px; }

.prompt-properties-form input[type="number"] { width: 100px; }

.prompt-properties-form select { width: 300px; }

.prompt-properties-form .field-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.prompt-properties-form .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prompt-properties-form .checkbox-row label { margin-bottom: 0; cursor: pointer; }

.prompt-properties-form .checkbox-row .field-help { margin-top: 0; margin-left: 0; }

.properties-section {
    margin-top: 20px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.properties-section h3 { margin: 0 0 10px 0; }

.properties-section-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.properties-section-controls label { font-weight: bold; margin-bottom: 0; }

.properties-section-controls select { min-width: 260px; }

.properties-section-controls select#triggerVersionSelect { min-width: 180px; }

.properties-section-controls .status-msg { font-size: 12px; color: #666; }

.properties-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.properties-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

.properties-list-item.empty {
    color: #666;
    padding: 8px;
    background: transparent;
    border: none;
}

.properties-list-item .item-name { flex: 1; }

.properties-list-item .badge-disabled {
    font-size: 11px;
    padding: 2px 6px;
    background: #ffc107;
    color: #000;
    border-radius: 3px;
    font-weight: 500;
}

.properties-list-item .btn-toggle {
    padding: 4px 8px;
    font-size: 11px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.properties-list-item .btn-toggle.enable { background: #28a745; color: #fff; }

.properties-list-item .btn-toggle.disable { background: #ffc107; color: #000; }

.properties-list-item .btn-remove {
    padding: 4px 8px;
    font-size: 11px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.properties-delete-section { margin-top: 20px; }

.properties-delete-section form { display: inline; }

.datasets-header { margin-bottom: 10px; }

.datasets-header h3 { display: inline; }

.datasets-header-actions { position: relative; display: inline-block; }

.datasets-header-actions form { display: inline; }

.datasets-popup {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 20px;
    width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.datasets-popup.active { display: block; }

.datasets-popup h4 { margin-top: 0; margin-bottom: 15px; }

.datasets-popup-field { margin-bottom: 15px; }

.datasets-popup-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}

.datasets-popup-field input[type="text"],
.datasets-popup-field textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.datasets-popup-field textarea { height: 60px; resize: vertical; }

.datasets-popup-field .field-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.datasets-popup-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.datasets-popup-actions .btn { padding: 6px 12px; font-size: 14px; }

.datasets-info-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff8dc;
    border: 1px solid #ffd700;
    border-radius: 4px;
}

.datasets-info-box h4 { margin: 0 0 10px 0; color: #b8860b; }

.datasets-info-box p { margin: 0; color: #666; }

.datasets-info-box-links { margin-top: 10px; }

.datasets-info-box-links a { margin-right: 10px; }

.datasets-table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.datasets-table-actions a { margin-right: 10px; }

.datasets-table-actions form { display: inline; }

.datasets-table-actions .btn { padding: 4px 8px; }

.datasets-empty-prompt { color: #999; }

.datasets-empty-state {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.datasets-empty-state h4 { margin-top: 0; }

.datasets-empty-state-links { margin-top: 10px; }

.datasets-empty-state-links a { margin-right: 10px; }

.evaluations-version-filter label { font-weight: bold; margin-right: 10px; }

.evaluations-version-filter select {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 3px;
}

.evaluations-attach-section { margin-bottom: 30px; }

.evaluations-attach-section h4 { margin: 0 0 15px 0; }

.evaluations-attach-section > p {
    margin: 5px 0 15px 0;
    color: #666;
    font-size: 13px;
}

.evaluations-attach-result { margin-top: 10px; }

.evaluations-attach-result .success-msg { color: green; }

.evaluations-attach-result .error-msg { color: red; }

.evaluations-attached-box {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.evaluations-attached-box p { margin: 5px 0; }

.evaluations-table-container { flex: 1; overflow-y: auto; }

.evaluations-criteria-result { margin-bottom: 5px; }

.evaluations-not-evaluated { color: #888; font-style: italic; }

.evaluations-framework-info { color: #007cba; }

.evaluations-no-framework,
.evaluations-no-notes { color: #888; }

.evaluations-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.evaluations-actions-separator { margin: 0 5px; }

.evaluations-delete-link { color: #dc3545; }

.evaluations-empty-state h4 { margin-top: 0; }

.evaluations-frameworks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.evaluations-frameworks-info { color: #666; margin: 0; }

.evaluations-type-badge {
    padding: 2px 6px;
    background: #007cba;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    text-transform: uppercase;
}

.evaluations-frameworks-empty {
    text-align: center;
    padding: 20px;
    color: #666;
}

.tools-content { max-width: 800px; }

.tools-info-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.tools-info-box h4 { margin: 0 0 10px 0; }

.tools-info-box p { margin: 0; font-size: 14px; }

.tools-info-box p:not(:first-of-type) {
    margin-top: 8px;
    font-size: 13px;
    color: #444;
}

.tools-enable-row {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tools-enable-row label { font-weight: bold; }

.tools-enabled-status { color: #6c757d; }

.tools-enabled-status.enabled { color: #28a745; }

.tools-configuration { display: none; }

.tools-configuration.active { display: block; }

.tools-usage-box {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.tools-usage-box h4 { margin-top: 0; }

.tools-usage-box p { margin-bottom: 10px; font-size: 14px; }

.tools-usage-box pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    margin: 0;
}

.tools-actions { margin-top: 30px; }

.tools-actions .btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.tools-actions .cancel-link {
    margin-left: 15px;
    color: #6c757d;
    text-decoration: none;
}

.field-controls input,
.field-controls select {
    padding: 5px 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 3px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider { background-color: #2196F3; }

.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.company-tag {
    display: inline-flex;
    align-items: center;
    background-color: #f1f3f5;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1;
}

.remove-tag-icon {
    margin-left: 6px;
    cursor: pointer;
    color: #868e96;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.remove-tag-icon:hover { color: #212529; text-decoration: none; }

.custom-select-wrapper select:focus { outline: none; box-shadow: none; }

.compare-header-row {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.compare-add-form {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 300px;
    position: relative;
}

.compare-add-form input[type="text"] {
    width: 128px;
    height: 26px;
    font-size: 16px;
    padding: 0 0 0 4px;
    margin: 0;
}

.compare-search-results {
    top: 100%;
    left: 0;
    min-width: 300px;
}

.compare-tags-container {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.compare-controls { display: flex; gap: 6px; }

.compare-controls .custom-select-wrapper select {
    font-size: 14px;
    height: 31px;
    padding: 4px 28px 4px 10px;
}

.compare-controls .btn { font-size: 14px; }

.table-financials td.header-cell {
    padding: 0 3px;
    text-align: right;
    min-width: 55px;
}

.table-financials td.company-name-cell { padding: 0 6px 0 0; white-space: nowrap; }

.table-financials td.data-cell { padding: 0 3px; text-align: right; }

.compare-no-results { padding: 6px 12px; }

.screen-filters-compare .btn { font-size: 14px; }

.content:has(.screen-container) { padding: 0 !important; }

.screen-container { width: 100%; }

.criteria-section { padding: 18px; margin-bottom: 20px; }

.screen-inputs-row {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.screen-form,
.saved-screens-container,
.popular-screens-container { flex: 0 1 auto; min-width: 0; }

.screen-form h3,
.saved-screens-container h3,
.popular-screens-container h3 { margin: 0 0 15px 0; }

.saved-screens-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-screens-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.popular-screen-link {
    display: block;
    padding: 8px 10px;
    background: white;
    border: 1px solid #00000026;
    border-radius: 6px;
    text-decoration: none;
}

.popular-screen-link:hover { background: #f5f5f5; text-decoration: none; }

.popular-screen-link.active,
.saved-screen-link.active { background: #f5f5f5; }

.popular-screen-link strong {
    display: block;
    color: #202122;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13px;
}

.popular-screen-link span {
    display: block;
    font-size: 11px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-screen-extra { display: none; }

.popular-screens-section.show-all .popular-screen-extra { display: block; }

.show-all-link {
    display: block;
    padding: 6px 10px;
    background: #f9f9f9;
    border: 1px solid var(--color-border-medium);
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
    color: #202122;
    text-decoration: none;
    cursor: pointer;
    grid-column: 1 / -1;
}

.show-all-link:hover { background: #f0f0f0; text-decoration: none; }

.results-section { padding: 0 18px; }

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

.results-section-header h3 { margin: 0; }

.search-table { width: auto; }

.search-table tr { border-bottom: 1px solid #eee; }

.td-nowrap { white-space: nowrap; }

.search-table input[type="text"]:not(.screen-input-limit) {
    width: 60px;
    padding: 4px 4px 4px 10px;
    margin-right: 4px;
    font-size: 14px;
    box-sizing: border-box;
    height: 28px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

.search-table input[type="text"]:focus {
    outline: none !important;
    border: 1px solid var(--color-border-medium) !important;
}

.search-table select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 4px 10px 4px 10px;
    font-size: 13px;
    box-sizing: border-box;
    height: 30px;
    border: 1px solid var(--color-border-alpha);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-primary);
    background-image: none !important;
    color: var(--color-text-primary);
    cursor: pointer;
}

.search-table select::-ms-expand { display: none; }

.search-table select:hover { background-color: var(--color-bg-gray-light); }

.search-table select:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.search-table .custom-select-wrapper { position: relative; display: inline-block; }

.search-table .select-arrow {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    fill: currentColor;
}

.screen-select-op {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 45px;
    padding: var(--spacing-3) 24px var(--spacing-3) var(--spacing-3);
    margin-right: 2px;
    font-size: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-alpha);
    background-color: var(--color-bg-primary);
    background-image: none !important;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.screen-select-op::-ms-expand { display: none; }

.screen-select-op:hover { background-color: var(--color-bg-gray-light); }

.screen-select-op:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.screen-select-op.op2 { margin-left: 6px; }

.screen-select-dropdown::-ms-expand { display: none; }

.screen-select-dropdown:hover { background-color: var(--color-bg-gray-light); }

.screen-select-dropdown:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.screen-select-sort {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 150px;
    padding: var(--spacing-3) 28px var(--spacing-3) var(--spacing-6);
    font-size: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-alpha);
    background-color: var(--color-bg-primary);
    background-image: none !important;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.screen-select-sort::-ms-expand { display: none; }

.screen-select-sort:hover { background-color: var(--color-bg-gray-light); }

.screen-select-sort:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.screen-select-sorttype {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 120px;
    padding: var(--spacing-3) 28px var(--spacing-3) var(--spacing-6);
    font-size: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-alpha);
    background-color: var(--color-bg-primary);
    background-image: none !important;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.screen-select-sorttype::-ms-expand { display: none; }

.screen-select-sorttype:hover { background-color: var(--color-bg-gray-light); }

.screen-select-sorttype:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.screen-input-limit {
    width: 40px;
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-medium);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

.screen-input-limit[name="extracted_combined"],
.screen-input-limit[name^="extracted_"] { width: 120px; }

.screen-input-limit:focus {
    outline: none !important;
    border: 1px solid var(--color-border-medium) !important;
}

.screen-input-minmax {
    width: 80px;
    padding: var(--spacing-3) var(--spacing-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-medium);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

.screen-input-minmax:focus {
    outline: none !important;
    border: 1px solid var(--color-border-medium) !important;
}

.screen-checkbox-label input[type="checkbox"] { margin-right: 3px; }

.del {
    color: #8f8f8f;
    font-size: 20px;
    cursor: pointer;
    text-decoration: none;
    margin-left: 5px;
}

.del:hover { color: #6f6f6f; text-decoration: none; }

.column-visibility-toggle {
    opacity: 0;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    margin-left: 4px;
    transition: opacity 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    padding: 2px;
}

.column-visibility-toggle svg { display: block; }

.search-table tr:hover .column-visibility-toggle { opacity: 1; }

.column-visibility-toggle:hover { color: #007cba; }

.column-visibility-toggle.column-hidden { opacity: 0.6; color: #999; }

.column-visibility-toggle.column-hidden:hover { opacity: 1; color: #666; }

.column-highlight-toggle {
    opacity: 0;
    color: #666;
    cursor: pointer;
    text-decoration: none;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    padding: 2px;
}

.column-highlight-toggle svg { display: block; }

.search-table tr:hover .column-highlight-toggle { opacity: 1; }

.column-highlight-toggle:hover { color: #ff9800; }

.column-highlight-toggle.column-highlighted { opacity: 1; color: #ff9800; }

.column-highlight-toggle.column-highlighted:hover { color: #f57c00; }

.highlighted-cell { font-weight: 500; transition: background-color 0.2s ease; }

.screen-add-filters-heading { margin-bottom: 8px; }

.screen-add-filters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12px;
}

.add-filter-btn {
    padding: 6px 10px;
    background: #ffffff;
    border: 1px solid #00000026;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}

.add-filter-btn:hover { background-color: #0d0d0d0d; border: 1px solid var(--color-border-medium); }

.screen-form-actions.has-filters { margin-top: 10px; }

.screen-form-actions .btn { margin-left: 0; }

.screen-form-actions .btn + .btn { margin-left: 5px; }

.results-table {
    border-collapse: collapse;
    table-layout: auto;
    width: auto;
}

.results-table thead th {
    padding: 6px 8px 6px 0;
    text-align: left;
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

.results-table thead th.align-right { text-align: right; }

.results-table thead th a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.results-table tbody td { padding: 1px 8px 1px 0; white-space: nowrap; }

.results-table tbody td.align-right { text-align: right; }

.results-table tbody a { text-decoration: none; }

.results-table tbody a:hover { text-decoration: underline; }

.results-table tbody a.symbol-link { font-weight: 500; }

.screen-pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.screen-pagination-link {
    padding: 5px 10px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.screen-pagination-link:hover { background: #e0e0e0; }

.screen-pagination-info { padding: 5px 15px; }

.screen-pagination-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: var(--spacing-2) 28px var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-alpha);
    background-color: var(--color-bg-primary);
    background-image: none !important;
    color: var(--color-text-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.screen-pagination-select::-ms-expand { display: none; }

.screen-pagination-select:hover { background-color: var(--color-bg-gray-light); }

.screen-pagination-select:focus {
    outline: none !important;
    border: 1px solid var(--color-border-alpha) !important;
}

.screen-no-results { color: #666; }

.screen-loading { color: #999; font-size: 12px; }

.saved-screen-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.saved-screen-link {
    display: block;
    padding: 8px 10px;
    background: white;
    border: 1px solid var(--color-border-medium);
    border-radius: 6px;
    text-decoration: none;
    color: #202122;
    flex: 1;
    font-size: 14px;
}

.saved-screen-link:hover { background: #f5f5f5; text-decoration: none; }

.saved-screen-link:visited { color: var(--color-link-visited); }

#save-screen-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 1000;
}

#save-screen-modal .modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
}

#save-screen-modal .modal-content {
    position: relative;
    max-width: 420px;
    margin: 10% auto;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

#save-screen-modal h4 { margin: 0 0 12px 0; font-size: 16px; }

#save-screen-modal label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}

#save-screen-modal input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

#save-screen-modal .modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

#save-screen-error {
    color: #b91c1c;
    font-size: 12px;
    margin-top: 6px;
    min-height: 14px;
}

.site-header {
    box-sizing: border-box;
    width: 100%;
    padding: 12px 16px;
    line-height: 1.6;
}

.site-header-inner { max-width: none; margin: 0; }

.page {
    min-height: calc(100svh - 153px);
    margin-top: -1%;
    display: grid;
    place-items: center;
}

.card { width: 100%; max-width: 360px; }

.stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stack-sm {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.center { text-align: center; }

.brand {
    box-sizing: border-box;
    font-size: 16px;
    margin: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #111827;
}

.brand:hover { color: #111827; text-decoration: none; }

.subtext { max-width: 350px; text-align: center; }

.label { margin-bottom: 5px; }

.input {
    font-size: 16px;
    box-sizing: border-box;
    padding: 12px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #ffffff;
}

.input:focus { border-color: #9ca3af; }

.step-toggle:checked ~ .stack .password-section { display: block; }

.step-toggle:checked ~ .stack .continue-row { display: none; }

.button:hover { background-color: #323232; }

.muted { color: #8f8f8f; }

.muted a { color: #8f8f8f; }

.muted a:hover { color: #a7a7a7; }

.small { font-size: 12px; }

.underline { text-decoration: underline; text-underline-offset: 4px; }

.terms {
    line-height: 16px;
    margin-top: 24px;
    text-wrap: balance;
}

.terms a { color: inherit; }

.terms a:hover { color: #a7a7a7; }

.error-message {
    padding: 12px 16px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 16px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
}

.last-updated {
    color: #8f8f8f;
    font-size: 14px;
    margin-bottom: 32px;
}

.container h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #111827;
}

.container h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

.container p { margin-bottom: 16px; color: #374151; }

.container ul { margin-bottom: 16px; padding-left: 24px; }

.container li { margin-bottom: 8px; color: #374151; }

.container a { color: #2563eb; text-decoration: none; }

.container a:hover { text-decoration: underline; }

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 14px;
}

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

.flex-gap-5 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mb-15 { margin-bottom: 15px; }

.mt-20 { margin-top: 20px; }

.form-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    margin: 0 0 5px 0;
}

.form-select {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 35px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    height: 36px;
    outline: none;
    box-sizing: border-box;
}

.form-select:focus { outline: none; border-color: var(--color-border-medium); }

.form-select-wide {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
    height: 36px;
    outline: none;
}

.form-select-wide:focus { outline: none; border-color: var(--color-border-medium); }

.form-input {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.form-input-number {
    width: 120px;
    padding: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 3px;
    outline: none;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.form-input-version {
    width: auto;
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

.text-mono { font-family: monospace; font-size: 12px; }

.text-italic { color: #666; font-style: italic; }

.text-bold { font-weight: bold; }

.text-capitalize { text-transform: capitalize; }

.text-status { font-size: 14px; }

.status-message { margin-left: 10px; font-size: 14px; }

.looped-input-item {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #e6f7ff;
    border-radius: 4px;
}

.btn-remove {
    padding: 2px 6px;
    font-size: 11px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.btn-add {
    padding: 6px 12px;
    font-size: 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.modal-content-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    min-width: 400px;
}

.modal-header { margin: 0 0 15px 0; }

.modal-section { margin: 0 0 10px 0; font-size: 14px; }

.prompt-output-reference {
    background: #e8f4f8;
    padding: 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-top: 3px;
}

.prompt-output-reference-text { color: #555; }

.placeholder-message {
    background: #f8f9fa;
    border: 1px dashed #ddd;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 10px;
}

.placeholder-text {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.versions-list-margin { margin-top: 20px; }

.display-none { display: none; }

.help-text-inline { color: #666; font-size: 11px; }

.btn-insert-var {
    padding: 5px 12px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    height: 32px;
    color: #737373;
    border: 1px solid #e5e5e5;
    border-radius: 32px;
    user-select: text;
}

.btn-insert-var:hover { background: #f0f0f0; }

.btn-insert-var code { background: none; padding: 0; }

.form-label-sm {
    display: block;
    margin: 0 0 6px 0;
    color: #8f8f8f;
}

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

.form-select-full:focus { outline: none; border-color: var(--color-border-medium); }

.form-input-number-sm {
    width: 220px;
    padding: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    background-color: var(--color-surface);
    color: var(--color-text-primary);
}

.help-text-sm { color: #666; display: block; }

.mt-30 { margin-top: 30px; }

.company-preview-container { margin: 5px 0 10px 0; display: none; }

.run-button-container { margin-top: 10px; }

.display-block { display: block; }

.display-inline-block { display: inline-block; }

.p-10 { padding: 10px; }

.p-8 { padding: 8px; }

.color-muted { color: #666; }

.font-size-13 { font-size: 13px; }

.white-space-pre-wrap { white-space: pre-wrap; }

.scale-11 { transform: scale(1.1); }

.select-full {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    cursor: pointer;
    margin-bottom: 10px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px;
    background-color: white;
}

.input-std {
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.input-full-mb {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.section-mt { margin-top: 15px; }

.modal-section-mb { margin-bottom: 5px; font-weight: bold; }

.label-radio-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.label-checkbox-mb6 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    cursor: pointer;
}

.label-checkbox-mb10 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}

.input-w80 {
    width: 80px;
    padding: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.input-w100 {
    width: 100px;
    padding: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.input-date {
    padding: 6px;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.flex-form-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.flex-form-row-mb10 {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.flex-form-row-wrap {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.flex-grow-1 { flex: 1; }

.form-container-hidden { display: none; margin-bottom: 15px; }

.btn-modal-cancel {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-modal-cancel:hover { background: #5a6268; }

.btn-modal-submit {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-modal-submit:hover { background: #005a8c; }

.flex-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 30px;
}

.action-buttons-inner { display: flex; gap: 10px; }

.alert-warning {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
}

.deploy-toggle {
    margin: 10px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.output-section-hidden { display: none; margin-bottom: 20px; }

.crafted-prompt-section {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    display: none;
}

.system-template-block {
    margin-bottom: 15px;
    padding: 10px;
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    display: none;
}

.system-template-block h5 {
    margin: 0 0 8px 0;
    color: #0c5460;
    font-size: 13px;
}

.system-template-content {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    color: #0c5460;
}

.user-template-block {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
}

.user-template-block h5 {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 13px;
}

.formatted-prompt-content {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 12px;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
    color: #856404;
}

.chart-render-area { margin-top: 15px; }

.ai-response-container {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
    max-height: 400px;
    overflow-y: auto;
}

.ai-response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.output-content-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    margin-top: 5px;
}

.markdown-content-output {
    margin: 0;
    font-family: inherit;
    line-height: 1.6;
}

.bulk-deployment-container { margin-bottom: 15px; }

/* Run section blocks */
.run-section-block {
    flex: 1;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    background-color: var(--color-bg-secondary);
    margin: 0;
}

.bulk-deployment-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bulk-deploy-status {
    margin-left: 10px;
    font-size: 13px;
    color: #666;
}

.output-card {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border: 1px solid var(--color-border-medium);
    border-radius: 4px;
}

.output-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    gap: 16px;
}

.output-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    flex: 1;
}

.output-meta-item {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.output-meta-separator { color: #d1d5db; font-weight: 300; }

.output-crafted-prompt {
    margin-bottom: 15px;
    padding: 12px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    display: none;
}

.output-crafted-prompt h5 {
    margin: 0 0 8px 0;
    color: #856404;
    font-size: 13px;
}

.output-crafted-prompt pre {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 11px;
    margin: 0;
    overflow-y: auto;
    color: #856404;
}

.output-content-layout {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.output-content-main { flex: 1; }

.output-content-wrapper {
    max-height: none;
    overflow-y: visible;
    padding: 12px;
    margin-top: 5px;
}

.raw-view {
    display: none;
    margin: 0;
    font-family: monospace;
    font-size: 12px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
}

.dataset-add-panel {
    min-width: 240px;
    padding: 10px;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    background: #fafafa;
}

.dataset-panel-title {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 6px;
}

.dataset-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    margin-bottom: 6px;
    cursor: pointer;
}

.dataset-empty-message { font-size: 12px; color: #666; }

.add-dataset-status {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    display: none;
}

.extracted-data-container {
    margin-top: 15px;
    padding: 12px;
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 4px;
}

.extracted-data-title {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #2d5a2d;
}

.extracted-data-title i { margin-right: 5px; }

.extracted-data-content {
    font-size: 12px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    overflow-y: auto;
}

.extracted-data-row {
    display: flex;
    gap: 6px;
    margin-bottom: 4px;
    align-items: flex-start;
}

.extracted-data-key {
    min-width: 80px;
    font-weight: 600;
    color: #2d5a2d;
}

.extracted-data-value { white-space: pre-wrap; }

.extracted-data-item {
    padding: 8px;
    border: 1px solid var(--color-border-light);
    border-radius: 4px;
    background: #fff;
    margin-bottom: 6px;
}

.extracted-data-item-row {
    display: flex;
    gap: 6px;
    margin-bottom: 3px;
    align-items: flex-start;
}

.extracted-data-info {
    margin-top: 8px;
    font-size: 11px;
    color: #666;
}

.link-primary { color: #1976d2; }

.attributions-section {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: none;
}

.attributions-section h5 { margin: 0 0 8px 0; font-size: 13px; }

.attributions-list { font-size: 12px; }

.debug-section { margin-top: 10px; }

.debug-summary {
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

.debug-content {
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 11px;
    margin: 8px 0 0 0;
    background: #f8f9fa;
    border: 1px solid var(--color-border-light);
    padding: 8px;
    border-radius: 4px;
}

.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
}

.pagination-info { font-size: 14px; color: #374151; }

.pagination-controls {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.pagination-label { font-size: 14px; color: #374151; }

.pagination-select {
    padding: 6px 8px;
    font-size: 13px;
    cursor: pointer;
}

.test-results-content {
    max-height: 300px;
    overflow-y: auto;
    background: #f9f9f9;
}

.output-actions-container {
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: center;
}

.output-actions-container .tabs-trigger {
    background: transparent;
    color: #171717;
    border: 1px solid transparent;
    font-size: 12px;
    padding: 5px 8px;
}

.output-actions-container .tabs-trigger:hover { background-color: var(--color-bg-hover-subtle); }

.output-actions-container .tabs-trigger.active { background: oklch(97% 0 0); color: #171717; }

.prompt-source { margin-top: 25px; }

#price-section { margin-top: 15px; }

.avatar-dropdown-container .object-cover { margin-top: 13px; }


/* ============================================
   DARK THEME OVERRIDES
   Elements with hardcoded colors that need dark mode support
   ============================================ */

[data-theme="dark"] .multi-modal-content,
[data-theme="dark"] .dropdown-content,
[data-theme="dark"] .submenu,
[data-theme="dark"] .search-results,
[data-theme="dark"] .symbol-search-results,
[data-theme="dark"] .settings-form,
[data-theme="dark"] .settings-section,
[data-theme="dark"] .api-keys-form,
[data-theme="dark"] .api-keys-list,
[data-theme="dark"] .feedback-form-card,
[data-theme="dark"] .prompt-menu,
[data-theme="dark"] .version-menu,
[data-theme="dark"] .screen-menu,
[data-theme="dark"] .modal-content-inner,
[data-theme="dark"] #save-screen-modal .modal-content,
[data-theme="dark"] .datasets-popup,
[data-theme="dark"] .output-card,
[data-theme="dark"] .properties-list-item {
    background: var(--color-surface);
    border-color: var(--color-border-light);
}

[data-theme="dark"] .btn {
    background-color: var(--color-surface);
    border-color: var(--color-border-medium);
    color: var(--color-text-primary);
}

[data-theme="dark"] .btn:hover {
    background-color: var(--color-bg-hover);
}

[data-theme="dark"] .btn-primary {
    background-color: var(--color-bg-dark);
    color: var(--color-bg-primary);
    border-color: var(--color-bg-dark);
}

[data-theme="dark"] .btn-primary:hover {
    background-color: var(--color-bg-dark-hover);
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background-color: var(--color-input-bg);
    border-color: var(--color-input-border);
    color: var(--color-input-text);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--color-text-muted);
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-gray-100 {
    background-color: var(--color-surface) !important;
}

[data-theme="dark"] .bg-blue-50 {
    background-color: #1e3a5f !important;
}

[data-theme="dark"] .border-blue {
    border-color: #3b82f6 !important;
}

[data-theme="dark"] table th {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .results-table thead th {
    background: var(--color-bg-primary);
}

[data-theme="dark"] a {
    color: var(--color-link);
}

[data-theme="dark"] a:visited {
    color: var(--color-link-visited);
}

[data-theme="dark"] .menu-item,
[data-theme="dark"] .dropdown-content a,
[data-theme="dark"] .submenu a {
    color: var(--color-text-primary);
}

[data-theme="dark"] .menu-item:visited,
[data-theme="dark"] .dropdown-content a:visited,
[data-theme="dark"] .submenu a:visited {
    color: var(--color-text-primary);
}

[data-theme="dark"] .ordinary-a,
[data-theme="dark"] .ordinary-a:visited {
    color: var(--color-text-primary);
}

[data-theme="dark"] .control-link,
[data-theme="dark"] .control-link:visited {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .description-toggle-btn,
[data-theme="dark"] .description-toggle-btn:visited {
    color: var(--color-text-primary);
}

[data-theme="dark"] .text-gray-500,
[data-theme="dark"] .text-gray-800 {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .status-success,
[data-theme="dark"] .status-completed {
    background-color: #1e4620;
    color: #8fd694;
}

[data-theme="dark"] .status-failed,
[data-theme="dark"] .status-error {
    background-color: #4a1c1f;
    color: #f5a3a8;
}

[data-theme="dark"] .status-running,
[data-theme="dark"] .status-pending {
    background-color: #4a3f1c;
    color: #f5d98f;
}

[data-theme="dark"] .status-partial {
    background-color: #1c3a5e;
    color: #8fc5f5;
}

[data-theme="dark"] .alert-info {
    background-color: #1e3a5f;
    color: #93c5fd;
    border-color: #3b82f6;
}

[data-theme="dark"] .note {
    background: #1e3a5f;
    border-left-color: #3b82f6;
}

[data-theme="dark"] .note p {
    color: #93c5fd;
}

[data-theme="dark"] .warning {
    background: #422006;
    border-left-color: #f59e0b;
}

[data-theme="dark"] .warning p {
    color: #fcd34d;
}

/* Warning/info boxes */
[data-theme="dark"] #craftedPromptSection,
[data-theme="dark"] [id^="craftedPromptSection_"],
[data-theme="dark"] .crafted-prompt-section,
[data-theme="dark"] .user-template-block,
[data-theme="dark"] .output-crafted-prompt {
    background: #422006;
    border-color: #854d0e;
}

[data-theme="dark"] .system-template-block {
    background: #0c4a6e;
    border-color: #0369a1;
}

[data-theme="dark"] .dataset-input-item,
[data-theme="dark"] .properties-section,
[data-theme="dark"] .placeholder-message {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-light);
}

[data-theme="dark"] .looped-input-item {
    background: #0c4a6e;
}

[data-theme="dark"] .extracted-data-container {
    background: #14532d;
    border-color: #166534;
}

[data-theme="dark"] .extracted-data-content {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .extracted-data-title,
[data-theme="dark"] .extracted-data-key {
    color: #86efac;
}

[data-theme="dark"] .extracted-data-item {
    background: var(--color-surface);
    border-color: var(--color-border-light);
}

[data-theme="dark"] .extracted-data-info {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .dataset-add-panel {
    background: var(--color-surface);
    border-color: var(--color-border-light);
}

[data-theme="dark"] .dataset-panel-title,
[data-theme="dark"] .dataset-checkbox-label,
[data-theme="dark"] .dataset-empty-message,
[data-theme="dark"] .add-dataset-status {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .raw-view {
    background: var(--color-bg-secondary);
}

[data-theme="dark"] .output-card-header {
    border-bottom-color: var(--color-border-light);
}

[data-theme="dark"] .output-meta-separator {
    color: var(--color-text-muted);
}

[data-theme="dark"] .output-card-meta {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .output-content-wrapper {
    background: transparent;
}

[data-theme="dark"] .output-actions-container .tabs-trigger {
    color: var(--color-text-primary);
}

[data-theme="dark"] .output-actions-container .tabs-trigger.active {
    background: var(--color-surface-elevated);
    color: var(--color-text-primary);
}

[data-theme="dark"] .btn-insert-var {
    background: var(--color-surface);
    border-color: var(--color-border-light);
    color: var(--color-text-secondary);
}

[data-theme="dark"] .btn-insert-var:hover {
    background: var(--color-bg-hover);
}

[data-theme="dark"] .form-select,
[data-theme="dark"] .form-select-wide {
    background-color: var(--color-input-bg);
    border-color: var(--color-input-border);
    color: var(--color-input-text);
}

[data-theme="dark"] .menu-item:hover,
[data-theme="dark"] .menu-item.active {
    background-color: var(--color-bg-hover-subtle);
}

[data-theme="dark"] .avatar-link:hover,
[data-theme="dark"] .avatar-link.active {
    background-color: transparent;
}

[data-theme="dark"] .dropdown-content a:hover,
[data-theme="dark"] .submenu a:hover,
[data-theme="dark"] .xhr-search-list a:hover,
[data-theme="dark"] .xhr-search-list a.active {
    background-color: var(--color-bg-hover);
}

[data-theme="dark"] .prompt-menu-item:hover,
[data-theme="dark"] .version-menu-item:hover,
[data-theme="dark"] .screen-menu-item:hover {
    background-color: var(--color-bg-hover);
}

[data-theme="dark"] .prompt-menu-item-danger:hover,
[data-theme="dark"] .version-menu-item-danger:hover,
[data-theme="dark"] .screen-menu-item-danger:hover {
    background-color: #450a0a;
}

[data-theme="dark"] .popular-screen-link,
[data-theme="dark"] .saved-screen-link {
    background: var(--color-surface);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .popular-screen-link:hover,
[data-theme="dark"] .saved-screen-link:hover,
[data-theme="dark"] .popular-screen-link.active,
[data-theme="dark"] .saved-screen-link.active {
    background: var(--color-bg-hover);
}

[data-theme="dark"] .saved-screen-link:visited {
    color: var(--color-link-visited);
}

[data-theme="dark"] .popular-screen-link strong {
    color: var(--color-text-primary);
}

[data-theme="dark"] .popular-screen-link span {
    color: var(--color-text-secondary);
}

[data-theme="dark"] .show-all-link {
    background: var(--color-surface);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .show-all-link:hover {
    background: var(--color-bg-hover);
}

[data-theme="dark"] .screen-select-op,
[data-theme="dark"] .screen-select-sort,
[data-theme="dark"] .screen-select-sorttype {
    background-color: var(--color-surface);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .screen-select-op:hover,
[data-theme="dark"] .screen-select-sort:hover,
[data-theme="dark"] .screen-select-sorttype:hover {
    background-color: var(--color-bg-hover);
}

[data-theme="dark"] .add-filter-btn {
    background: var(--color-surface);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

[data-theme="dark"] .add-filter-btn:hover {
    background-color: var(--color-bg-hover);
}

[data-theme="dark"] .tabs-trigger.active {
    background: var(--color-surface-elevated) !important;
    color: var(--color-text-primary) !important;
}

[data-theme="dark"] .switch-slider {
    background-color: var(--color-bg-gray);
}

[data-theme="dark"] .toggle-slider {
    background-color: var(--color-bg-gray);
}

[data-theme="dark"] .markdown-content code {
    background-color: var(--color-bg-secondary);
}

[data-theme="dark"] .markdown-content pre {
    background-color: var(--color-bg-secondary);
}

[data-theme="dark"] .doc-section code {
    background-color: var(--color-bg-secondary);
}

[data-theme="dark"] .doc-section pre {
    background-color: var(--color-bg-secondary);
}

[data-theme="dark"] .variable-card {
    background: var(--color-bg-secondary);
    border-color: var(--color-border-light);
}

[data-theme="dark"] .example-card {
    background: #422006;
    border-color: #f59e0b;
}

/* Duplicate dark mode rules for device preference */
@media (prefers-color-scheme: dark) {
    [data-theme="device"] .multi-modal-content,
    [data-theme="device"] .dropdown-content,
    [data-theme="device"] .submenu,
    [data-theme="device"] .search-results,
    [data-theme="device"] .symbol-search-results,
    [data-theme="device"] .settings-form,
    [data-theme="device"] .settings-section,
    [data-theme="device"] .api-keys-form,
    [data-theme="device"] .api-keys-list,
    [data-theme="device"] .feedback-form-card,
    [data-theme="device"] .prompt-menu,
    [data-theme="device"] .version-menu,
    [data-theme="device"] .screen-menu,
    [data-theme="device"] .modal-content-inner,
    [data-theme="device"] #save-screen-modal .modal-content,
    [data-theme="device"] .datasets-popup,
    [data-theme="device"] .output-card,
    [data-theme="device"] .properties-list-item {
        background: var(--color-surface);
        border-color: var(--color-border-light);
    }

    [data-theme="device"] .btn {
        background-color: var(--color-surface);
        border-color: var(--color-border-medium);
        color: var(--color-text-primary);
    }

    [data-theme="device"] .btn:hover {
        background-color: var(--color-bg-hover);
    }

    [data-theme="device"] .btn-primary {
        background-color: var(--color-bg-dark);
        color: var(--color-bg-primary);
        border-color: var(--color-bg-dark);
    }

    [data-theme="device"] .btn-primary:hover {
        background-color: var(--color-bg-dark-hover);
    }

    [data-theme="device"] input[type="text"],
    [data-theme="device"] input[type="number"],
    [data-theme="device"] input[type="email"],
    [data-theme="device"] input[type="password"],
    [data-theme="device"] textarea,
    [data-theme="device"] select {
        background-color: var(--color-input-bg);
        border-color: var(--color-input-border);
        color: var(--color-input-text);
    }

    [data-theme="device"] input::placeholder,
    [data-theme="device"] textarea::placeholder {
        color: var(--color-text-muted);
    }

    [data-theme="device"] .bg-white,
    [data-theme="device"] .bg-gray-100 {
        background-color: var(--color-surface) !important;
    }

    [data-theme="device"] .bg-blue-50 {
        background-color: #1e3a5f !important;
    }

    [data-theme="device"] .border-blue {
        border-color: #3b82f6 !important;
    }

    [data-theme="device"] .extracted-data-container {
        background: #14532d;
        border-color: #166534;
    }

    [data-theme="device"] .extracted-data-content {
        background: var(--color-bg-secondary);
    }

    [data-theme="device"] .extracted-data-title,
    [data-theme="device"] .extracted-data-key {
        color: #86efac;
    }

    [data-theme="device"] .extracted-data-item {
        background: var(--color-surface);
        border-color: var(--color-border-light);
    }

    [data-theme="device"] .extracted-data-info {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] table th {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .results-table thead th {
        background: var(--color-bg-primary);
    }

    [data-theme="device"] a {
        color: var(--color-link);
    }

    [data-theme="device"] a:visited {
        color: var(--color-link-visited);
    }

    [data-theme="device"] .menu-item,
    [data-theme="device"] .dropdown-content a,
    [data-theme="device"] .submenu a {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .menu-item:visited,
    [data-theme="device"] .dropdown-content a:visited,
    [data-theme="device"] .submenu a:visited {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .ordinary-a,
    [data-theme="device"] .ordinary-a:visited {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .control-link,
    [data-theme="device"] .control-link:visited {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .description-toggle-btn,
    [data-theme="device"] .description-toggle-btn:visited {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .status-success,
    [data-theme="device"] .status-completed {
        background-color: #1e4620;
        color: #8fd694;
    }

    [data-theme="device"] .status-failed,
    [data-theme="device"] .status-error {
        background-color: #4a1c1f;
        color: #f5a3a8;
    }

    [data-theme="device"] .status-running,
    [data-theme="device"] .status-pending {
        background-color: #4a3f1c;
        color: #f5d98f;
    }

    [data-theme="device"] .status-partial {
        background-color: #1c3a5e;
        color: #8fc5f5;
    }

    [data-theme="device"] .popular-screen-link,
    [data-theme="device"] .saved-screen-link,
    [data-theme="device"] .add-filter-btn {
        background: var(--color-surface);
        border-color: var(--color-border-light);
    }

    [data-theme="device"] .popular-screen-link,
    [data-theme="device"] .saved-screen-link,
    [data-theme="device"] .add-filter-btn {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .saved-screen-link:visited {
        color: var(--color-link-visited);
    }

    [data-theme="device"] .popular-screen-link strong {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .popular-screen-link span {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .show-all-link {
        background: var(--color-surface);
        border-color: var(--color-border-light);
        color: var(--color-text-primary);
    }

    [data-theme="device"] .show-all-link:hover {
        background: var(--color-bg-hover);
    }

    [data-theme="device"] .screen-select-op,
    [data-theme="device"] .screen-select-sort,
    [data-theme="device"] .screen-select-sorttype {
        background-color: var(--color-surface);
        border-color: var(--color-border-light);
        color: var(--color-text-primary);
    }

    [data-theme="device"] .screen-select-op:hover,
    [data-theme="device"] .screen-select-sort:hover,
    [data-theme="device"] .screen-select-sorttype:hover {
        background-color: var(--color-bg-hover);
    }

    [data-theme="device"] .tabs-trigger.active {
        background: var(--color-surface-elevated) !important;
        color: var(--color-text-primary) !important;
    }

    [data-theme="device"] .markdown-content code,
    [data-theme="device"] .markdown-content pre,
    [data-theme="device"] .doc-section code,
    [data-theme="device"] .doc-section pre {
        background-color: var(--color-bg-secondary);
    }

    [data-theme="device"] .dataset-add-panel {
        background: var(--color-surface);
        border-color: var(--color-border-light);
    }

    [data-theme="device"] .dataset-panel-title,
    [data-theme="device"] .dataset-checkbox-label,
    [data-theme="device"] .dataset-empty-message,
    [data-theme="device"] .add-dataset-status {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .raw-view {
        background: var(--color-bg-secondary);
    }

    [data-theme="device"] .output-card-header {
        border-bottom-color: var(--color-border-light);
    }

    [data-theme="device"] .output-meta-separator {
        color: var(--color-text-muted);
    }

    [data-theme="device"] .output-card-meta {
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .output-content-wrapper {
        background: transparent;
    }

    [data-theme="device"] .output-actions-container .tabs-trigger {
        color: var(--color-text-primary);
    }

    [data-theme="device"] .output-actions-container .tabs-trigger.active {
        background: var(--color-surface-elevated);
        color: var(--color-text-primary);
    }

    [data-theme="device"] .btn-insert-var {
        background: var(--color-surface);
        border-color: var(--color-border-light);
        color: var(--color-text-secondary);
    }

    [data-theme="device"] .btn-insert-var:hover {
        background: var(--color-bg-hover);
    }

    [data-theme="device"] .form-select,
    [data-theme="device"] .form-select-wide {
        background-color: var(--color-input-bg);
        border-color: var(--color-input-border);
        color: var(--color-input-text);
    }
}
