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

.multi-filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #444;
}

.multi-summary-empty {
    color: #888;
    font-size: 12px;
}

.multi-summary-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f3f4f6;
    border-left: 3px solid transparent;
}

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

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

.multi-summary-title {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #555;
}

.multi-summary-values {
    font-size: 12px;
    color: #333;
}

#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;
}
/**
 * Main Stylesheet
 */

/* ============================================
   CSS VARIABLES (Design System)
   ============================================ */
:root {
    /* Colors - Text */
    --color-text-primary: #202122;
    --color-text-secondary: #5f6368;
    --color-text-muted: #6a737d;
    --color-text-light: #8f8f8f;
    
    /* Colors - Backgrounds */
    --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;
    
    /* Colors - Borders */
    --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;
    
    /* Colors - Status */
    --color-success: #28a745;
    --color-danger: #dc3545;
    --color-warning: #ffc107;
    --color-info: #007cba;
    --color-error: #dc2626;
    --color-link: #007cba;
    
    /* Spacing Scale */
    --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;
    
    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 3px;
    --radius-base: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Typography - Font Sizes */
    --font-size-xs: 12px;
    --font-size-sm: 13px;
    --font-size-base: 14px;
    --font-size-md: 15px;
    --font-size-lg: 16px;
    --font-size-xl: 17px;
    
    /* Typography - Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Typography - Line Heights */
    --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;
    
    /* Shadows */
    --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-Index Scale */
    --z-base: 0;
    --z-dropdown: 999;
    --z-header: 1001;
    --z-dropdown-top: 1002;
    
    /* Layout */
    --header-height: 54px;
    --sidebar-width: 200px;
    --max-width-content: 900px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-base: 0.2s ease-in-out;
}

/* ============================================
   BASE STYLES
   ============================================ */

html,
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
    color: var(--color-text-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);
}

/* ============================================
   TAILWIND-STYLE UTILITY CLASSES
   ============================================ */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.hide { display: none !important; }
.show { display: table-row; }
.flow-root { display: flow-root; }

/* Flex Direction */
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }

/* Flex Wrap */
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }

/* Flex */
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Align Items */
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.items-stretch { align-items: stretch; }

/* Justify Content */
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

/* Gap */
.gap-0 { gap: 0; }
.gap-1 { gap: var(--spacing-2); }
.gap-2 { gap: var(--spacing-4); }
.gap-3 { gap: var(--spacing-6); }
.gap-4 { gap: var(--spacing-9); }
.gap-5 { gap: var(--spacing-12); }
.gap-6 { gap: var(--spacing-14); }

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: var(--spacing-2); }
.m-2 { margin: var(--spacing-4); }
.m-3 { margin: var(--spacing-6); }
.m-4 { margin: var(--spacing-9); }
.m-5 { margin: var(--spacing-12); }

.mx-auto { margin-left: auto; margin-right: auto; }
.my-auto { margin-top: auto; margin-bottom: auto; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-2); }
.mt-2 { margin-top: var(--spacing-4); }
.mt-3 { margin-top: var(--spacing-6); }
.mt-4 { margin-top: var(--spacing-9); }
.mt-5 { margin-top: var(--spacing-12); }
.mt-6 { margin-top: var(--spacing-14); }
.mt-8 { margin-top: var(--spacing-18); }
.mt-10 { margin-top: var(--spacing-20); }
.mt-12 { margin-top: var(--spacing-24); }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: var(--spacing-2); }
.mr-2 { margin-right: var(--spacing-4); }
.mr-3 { margin-right: var(--spacing-6); }
.mr-4 { margin-right: var(--spacing-9); }
.mr-5 { margin-right: var(--spacing-5); }
.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: var(--spacing-6); }
.mb-4 { margin-bottom: var(--spacing-9); }
.mb-5 { margin-bottom: var(--spacing-12); }
.mb-6 { margin-bottom: var(--spacing-8); }
.mb-8 { margin-bottom: var(--spacing-16); }
.mb-10 { margin-bottom: var(--spacing-12); }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: var(--spacing-2); }
.ml-2 { margin-left: var(--spacing-4); }
.ml-3 { margin-left: var(--spacing-6); }
.ml-4 { margin-left: var(--spacing-9); }
.ml-5 { margin-left: var(--spacing-5); }
.ml-6 { margin-left: var(--spacing-12); }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--spacing-2); }
.p-2 { padding: var(--spacing-4); }
.p-3 { padding: var(--spacing-6); }
.p-4 { padding: var(--spacing-9); }
.p-5 { padding: var(--spacing-12); }
.p-6 { padding: var(--spacing-14); }

.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 3px; padding-right: 3px; }
.px-2 { padding-left: var(--spacing-4); padding-right: var(--spacing-4); }
.px-3 { padding-left: var(--spacing-6); padding-right: var(--spacing-6); }
.px-4 { padding-left: var(--spacing-9); padding-right: var(--spacing-9); }
.px-5 { padding-left: var(--spacing-8); padding-right: var(--spacing-8); }
.px-6 { padding-left: var(--spacing-10); padding-right: var(--spacing-10); }

.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: var(--spacing-2); padding-bottom: var(--spacing-2); }
.py-2 { padding-top: var(--spacing-4); padding-bottom: var(--spacing-4); }
.py-3 { padding-top: var(--spacing-6); padding-bottom: var(--spacing-6); }
.py-4 { padding-top: var(--spacing-9); padding-bottom: var(--spacing-9); }

.pt-0 { padding-top: 0; }
.pt-2 { padding-top: var(--spacing-4); }
.pt-3 { padding-top: var(--spacing-6); }
.pt-4 { padding-top: var(--spacing-9); }
.pt-5 { padding-top: var(--spacing-5); }

.pr-1 { padding-right: 5px; }
.pr-2 { padding-right: var(--spacing-4); }
.pr-3 { padding-right: var(--spacing-6); }
.pr-4 { padding-right: var(--spacing-9); }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 3px; }
.pb-2 { padding-bottom: var(--spacing-4); }
.pb-3 { padding-bottom: var(--spacing-5); }
.pb-5 { padding-bottom: var(--spacing-5); }

.pl-0 { padding-left: 0; }
.pl-2 { padding-left: var(--spacing-4); }
.pl-3 { padding-left: var(--spacing-6); }
.pl-4 { padding-left: var(--spacing-8); }
.pl-6 { padding-left: var(--spacing-18); }

/* Width */
.w-auto { width: auto; }
.w-full { width: 100%; }
.w-screen { width: 100vw; }

/* Min Width */
.min-w-0 { min-width: 0; }
.min-w-55 { min-width: 55px; }
.min-w-63 { min-width: 63px; }
.min-w-260 { min-width: 260px; }

/* Max Width */
.max-w-350 { max-width: 350px; }
.max-w-900 { max-width: 900px; }
.max-w-content { max-width: var(--max-width-content); }

/* Height */
.h-auto { height: auto; }
.h-full { height: 100%; }

/* Position */
.static { position: static; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }

/* Top / Right / Bottom / Left */
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-999 { z-index: 999; }
.z-1001 { z-index: 1001; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-visible { overflow-y: visible; }

/* Text Align */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-align-right { text-align: right; }

/* Font Size */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.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-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: 24px; }

/* Font Weight */
.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Line Height */
.leading-none { line-height: var(--line-height-none); }
.leading-tight { line-height: var(--line-height-tight); }
.leading-snug { line-height: var(--line-height-snug); }
.leading-normal { line-height: var(--line-height-loose); }

/* Text Color */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #666; }
.text-gray-800 { color: #333; }
.text-muted-light { color: #888; }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-info { color: var(--color-info); }
.text-error { color: var(--color-error); }

/* Background Color */
.bg-white { background-color: var(--color-bg-primary); }
.bg-gray-50 { background-color: var(--color-bg-secondary); }
.bg-gray-100 { background-color: #f8f9fa; }
.bg-blue-50 { background-color: #f0f9ff; }
.bg-transparent { background: transparent; }

/* Border */
.border { border: 1px solid var(--color-border-light); }
.border-0 { border: 0; }
.border-t { border-top: 1px solid var(--color-border-light); }
.border-r { border-right: 1px solid var(--color-border-light); }
.border-b { border-bottom: 1px solid var(--color-border-gray); }
.border-l { border-left: 3px solid var(--color-info); }
.border-none { border: none; }
.border-blue { border-color: #bae6fd; }

/* Border Radius */
.rounded-none { border-radius: 0; }
.rounded { border-radius: var(--radius-sm); }
.rounded-sm { border-radius: var(--radius-base); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* White Space */
.whitespace-normal { white-space: normal; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre { white-space: pre; }

/* Vertical Align */
.align-baseline { vertical-align: baseline; }
.align-top { vertical-align: top; }
.align-middle { vertical-align: middle; }
.align-bottom { vertical-align: bottom; }

/* Float */
.float-left { float: left; }
.float-right { float: right; }
.clear-both { clear: both; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* User Select */
.select-none { user-select: none; }

/* Transform */
.capitalize { text-transform: capitalize; }
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }

/* Box Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }

/* Outline */
.outline-none { outline: none; }

/* Object Fit */
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Grid */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(260px, max-content)); }
.grid-cols-auto-2 { display: grid; grid-template-columns: max-content auto; }
.grid-cols-auto-3 { display: grid; grid-template-columns: repeat(3, max-content); }
.grid-gap-2 { gap: 0 10px; }
.grid-gap-5 { gap: 20px; }
.grid-gap-7 { gap: 28px; }

/* Special Utilities */
.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; }

/* Special Margin Utilities */
.my-negative { margin: -15px 0 20px 0; }
.my-custom { margin: 12px 0 -4px 0; }

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    /* background-color: var(--color-bg-primary); */
    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 {
    /* padding: 0; */
}
/* Avatar Link - No Background */
.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 MENUS
   ============================================ */

.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;
}

/* Avatar Dropdown - Click to Open */
.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 Bridge - Invisible Area */
.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

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

/* ============================================
   SUBMENU
   ============================================ */

.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
   ============================================ */

.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;
}

/* ============================================
   SEARCH
   ============================================ */

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 dropdown on prompt edit page */
.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 rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    outline: none;
}

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: rgba(13, 13, 13, 0.2);
}

.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;
}

/* ============================================
   BUTTONS
   ============================================ */

.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;
    /* transition: background-color var(--transition-fast); */
}

.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;
}

/* Button Variants */
.btn-primary {
    background-clip: padding-box;
    background-color: var(--color-bg-dark);
    color: var(--color-bg-primary);
    border-color: var(--color-text-primary);
    /*border-radius: 38px;
    border-color: #0d0d0d;
    background-color: #0d0d0d;
    height: 36px;
    font-size: 15px;
    min-width: 65px;*/
    font-size: 15px;
}

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

.btn-secondary {
    color: var(--color-text-primary);
    border-color: var(--color-border-alpha);
}

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

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--color-text-primary);
    padding-left: 0;
    padding-right: 0;
}

.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;
}

/* Button Sizes */
.btn-sm {
    padding: var(--spacing-2) var(--spacing-5);
    font-size: var(--font-size-sm);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: var(--spacing-4) var(--spacing-7);
    font-size: var(--font-size-md);
    border-radius: var(--radius-lg);
}

/* Special Button */
.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 Button */
.icon-btn {
    border: none;
    background-color: transparent;
    color: var(--color-text-secondary);
}

.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;
}

/* ============================================
   BADGES
   ============================================ */

.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);
}

/* ============================================
   LINKS
   ============================================ */

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

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

.financials-a {
    color: var(--color-text-primary);
    cursor: pointer;
}

.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);
}

.compare-link {
    margin-left: 5px;
}

.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;
}

.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;
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

input[type="text"] {
    /*width: 118px;
    font-size: var(--font-size-lg);
    height: 25px;
    box-sizing: border-box;*/
}

input.labels {
    width: 350px;
}

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

select:focus {
    outline: none;
}

.search-form {
    /* border-bottom: 1px solid var(--color-border-table); */
}

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

.search-space {
    margin-bottom: var(--spacing-9);
}

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

/* ============================================
   TABLES
   ============================================ */


.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-company {
    max-width: 350px;
}

.td-label {
    padding-right: var(--spacing-3) !important;
    min-width: 63px;
}

.td-space {
    width: var(--spacing-5);
}

.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);
}

.td-border-bottom {
    padding-bottom: 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);
}

/* Financial Table Utilities */
.td-financial {
    padding: 0 3px;
    text-align: right;
}

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

/* ============================================
   GICS / TAXONOMY TABLES
   ============================================ */

.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;
}

.country-td {
    white-space: nowrap;
}

/* ============================================
   CRITERIA & PARAMETERS
   ============================================ */

.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);
}

.parameters {
    cursor: pointer;
    color: var(--color-text-secondary);
    margin-block-start: 1.1em;
}

.columns {
    color: var(--color-text-secondary);
    font-size: var(--font-size-md);
    margin-top: var(--spacing-12);
    margin-bottom: var(--spacing-8);
    cursor: pointer;
}

/* ============================================
   LAYOUT & CONTENT
   ============================================ */

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

/* Company page - remove left padding since sidebar provides it */
.content:has(.main-content-wrapper) {
    padding-left: 0;
}

/* Remove padding for pages with sidebars */
.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;
}

/* Shared content area style for all sidebar pages */
.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
   ============================================ */

.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 PAGE
   ============================================ */

.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;
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.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"]) {
    /*width: 100%;*/
    height: 36px;
    font-size: var(--font-size-lg);
    padding: 0 0 0 12px;
    box-sizing: border-box;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
    outline: none;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus {
    border-color: rgba(13, 13, 13, 0.2);
}

.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-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.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 PAGE
   ============================================ */

.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 PAGE
   ============================================ */

.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%; }

/* Truncate long keys */
.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-sm {
    padding: 5px 10px;
    font-size: 12px;
}

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

.inline-form {
    display: inline;
}

/* ============================================
   NOTIFICATION SETTINGS (API Keys Page)
   ============================================ */

.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;
}

/* ============================================
   NOTIFICATION TOGGLES (Prompt Tools Page)
   ============================================ */

.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);
}

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

/* ============================================
   USERS PAGE
   ============================================ */

.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;
}

/* ============================================
   CRONJOBS PAGE
   ============================================ */

.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;
}

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

.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;
    /*color: var(--color-text-secondary);
    font-weight: 600;*/
}

.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-label {
    text-transform: uppercase;
}

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

.status-warning {
    background: #fff3cd;
    color: #856404;
}

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

.status-unknown {
    background: #e2e3e5;
    color: #383d41;
}

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

.status-incomplete {
    background: #f8d7da;
    color: #721c24;
}

.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;
}

.show-more-count {
    color: #888;
    font-weight: normal;
}

.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 PAGE
   ============================================ */

.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 rgba(13, 13, 13, 0.1);
    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 rgba(13, 13, 13, 0.1);
    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 rgba(13, 13, 13, 0.1);
    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 rgba(13, 13, 13, 0.1);
    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 PAGE
   ============================================ */

.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 {
    /*scroll-margin-top: 20px;*/
    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 {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 20px;
}

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

.variable-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    /*border-left: 4px solid #6366f1;*/
    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 PAGE
   ============================================ */

.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-sort-icon-up {
    vertical-align: middle;
    margin-top: -1px;
}

.prompts-sort-icon-down {
    vertical-align: text-top;
    margin-top: -2px;
}

.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 menu trigger */
.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 rgba(13, 13, 13, 0.1);
    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 PAGE
   ============================================ */

.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 rgba(13, 13, 13, 0.1) !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 rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

/* ============================================
   PROMPT EDIT PAGE
   ============================================ */

/* Overflow control for pre/code blocks */
.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%;
}

/* Link styles */
.prompts-link {
    color: var(--color-text-primary);
    text-decoration: none;
    display: block;
    padding: var(--spacing-3) 0;
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
}

.prompts-link::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;
    /*transition: opacity 0.15s ease;*/
}

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

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

/* Prompt edit sidebar - fully dynamic width based on content */
.prompt-edit-sidebar {
    width: fit-content !important;
    /*padding: var(--spacing-9) 8px var(--spacing-14) var(--spacing-10) !important;*/
    /*min-width: auto !important;*/
    min-width: 140px !important;
    flex: 0 0 auto;
    padding-top: 10px;
}

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

/* Version links */
.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 */
.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;
    /*padding: 4px;*/
    gap: 2px;
}

.tabs-trigger {
    /*height: 24px;*/
    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 styling */
.markdown-content {
    font-size: 14px;
    line-height: 1.6;
    margin-top: 15px; 
   /* margin-top: 24px; */
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-content h1 { font-size: 24px; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
.markdown-content h2 { font-size: 18px; border-bottom: 1px solid #eaecef; padding-bottom: 0.3em; }
.markdown-content h3 { font-size: 16px; }
.markdown-content h4 { font-size: 1em; }
.markdown-content h5 { font-size: 0.875em; }
.markdown-content h6 { font-size: 0.85em; }
.markdown-content p { margin-top: 0; margin-bottom: 16px; }
.markdown-content blockquote { padding: 0 1em; color: #6a737d; border-left: 0.25em solid #dfe2e5; margin: 0 0 16px 0; }
.markdown-content code { padding: 0.2em 0.4em; margin: 0; font-size: 85%; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
.markdown-content pre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f6f8fa; border-radius: 3px; margin-bottom: 16px; }
.markdown-content pre code { padding: 0; background-color: transparent; }
.markdown-content ul, .markdown-content ol { padding-left: 2em; margin-bottom: 16px; }
.markdown-content li { margin-bottom: 0.25em; }
.markdown-content table { border-spacing: 0; border-collapse: collapse; margin-bottom: 16px; width: 100%; }
.markdown-content table th, .markdown-content table td { padding: 6px 13px; border: 1px solid #dfe2e5; }
.markdown-content table th { font-weight: 600; background-color: #f6f8fa; }
.markdown-content table tr:nth-child(2n) { background-color: #f6f8fa; }
.markdown-content hr { height: 0.25em; padding: 0; margin: 24px 0; background-color: #e1e4e8; border: 0; }

/* Fullscreen textarea */
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 icons */
.help-icon {
    position: relative;
    cursor: pointer !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 #ddd;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.help-icon .help-popup {
    opacity: 0;
    visibility: hidden;
}

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

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

.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;
}

/* Fullscreen behaviors */
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 #ddd;
    border-radius: 4px;
    background: white;
    box-sizing: border-box;
    overflow-y: auto;
    line-height: 1.6;
    font-family: inherit;
}

/* Status text */
.text-info { color: #007cba; }
.text-success { color: #28a745; }
.text-error { color: #dc3545; }

/* Layout utilities */
.page-row {
    display: flex;
    gap: 20px;
    /*min-height: calc(100vh - 220px);*/
}

.right-pane {
    /* Edit page specific spacing */
    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;
}

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

.label-block {
    display: block;
    margin: 0;
}

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

.small-muted {
    font-size: 12px;
    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 editors */
#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 #ddd;
    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 #ddd;
    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 select */
#model {
    width: auto !important;
    display: inline-block !important;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    background: white;
    outline: none;
}

/* Switch Component (shadcn style) */
.switch-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.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-color: #18181b;*/
    background: #0076ff;
    /*background-color: #d2d4d9;*/
}

.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;
}

/* Small Switch Variant */
.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: 8px;*/
    gap: 12px;
}

/* Version menu in sidebar */
.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;
    /*transition: opacity 0.15s ease;*/
}

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

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

.version-item-wrapper[data-selected="True"]::before {
    /*background-color: #e6f3ff;*/
    opacity: 1;
}

.version-item-wrapper[data-selected="True"]:hover::before {
    /*background-color: #d4e9ff;*/
}

.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 rgba(13, 13, 13, 0.1);
    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;
}

/* Screen menu in saved screens sidebar */
.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;
}

/* Removed hover background for saved-screen-item-wrapper */

.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 rgba(13, 13, 13, 0.1);
    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 {
    color: #9ca3af;
    cursor: not-allowed;
}

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

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

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

/* Grounding/Thinking */
#groundingContainer {
    display: none;
    margin-top: -8px;
    margin-bottom: 8px;
}

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

/* Prompt output */
#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 inputs */
.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;
}

/* Add Input Modal */
#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;
}

/* Crafted prompt */
#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
   ============================================ */

.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
   ============================================ */

.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: var(--spacing-4);
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    fill: currentColor;
}

/* ============================================
   MISCELLANEOUS
   ============================================ */

.button {
    padding: 3px var(--spacing-5);
    cursor: pointer;
}

.add-a {
    cursor: pointer;
}

.count {
    margin-top: var(--spacing-12);
    margin-bottom: var(--spacing-8);
}

.sort {
    cursor: pointer;
}

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

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

.clear {
    clear: both;
}

.submit {
    cursor: pointer;
}

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

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

.reasearch-queries {
    margin-bottom: var(--spacing-16);
}

.usd {
    color: #898c91;
    font-size: var(--font-size-base);
}

.row {
    display: flex;
}

.column-50 {
    flex: 50%;
}

.modebar-btn--logo {
    display: none !important;
}

.sector-industry-icon {
    margin-left: 2px !important;
    margin-right: 2px !important;
}

/* ============================================
   COMPANY PAGE SPECIFIC
   ============================================ */

/* Ratios Display Wrapper */
.ratios-display-wrapper {
    display: flex;
    align-items: start;
    gap: 32px;
}

/* Ratios Display Grid */
.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 tooltips */
.ratio-item {
    position: relative;
    display: contents;
}

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

.ratio-tooltip {
    position: fixed;
    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 */
.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 */
.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;
}

/* TOC */
#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;
}

/* Markdown Content */
.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;
}

/* Period Switcher */
.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 Indicators */
.trend-number {
    display: inline;
    visibility: hidden;
    width: 0;
    height: 0;
    overflow: hidden;
}

.trend-indicator {
    transform: translateY(-1px);
    margin: 0;
    padding: 0;
}

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

/* Chart Components */
.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);
}

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

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

.chart-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-bg-primary);
    padding: var(--spacing-4) var(--spacing-6);
    border-radius: var(--radius-base);
    font-size: var(--font-size-xs);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base);
    z-index: 1000;
}

.crosshair {
    stroke: #9ca3af;
    stroke-width: 1;
    stroke-dasharray: 3, 3;
}

/* SEC Filings Sidebar */
#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;
}

/* Button Highlighted State */
.btn.highlighted {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    border-color: var(--color-border-medium);
}

/* ============================================
   PROMPT PROPERTIES PAGE
   ============================================ */

.prompt-properties-page {
    /* Uses .page-row for layout */
}

.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 #ddd;
    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 #ddd;
    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 {
    /* Uses .form-select class for styling */
    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 PAGE
   ============================================ */

.datasets-page {
    /* Uses .page-row for layout - no height constraint needed */
}

.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-header .btn {
    /* margin-left removed */
}

.datasets-count {
    margin-bottom: 20px;
}

.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 PAGE
   ============================================ */

.evaluations-page {
    /* Uses .page-row for layout - no height constraint needed */
}

.evaluations-back-link {
    margin: 10px 0 20px 0;
}

.evaluations-version-filter {
    margin-bottom: 20px;
}

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

.evaluations-version-filter select {
    padding: 8px;
    border: 1px solid #ddd;
    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-form {
    /* Uses .form-group for styling */
}

.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 #ddd;
    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 {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
}

.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 PAGE
   ============================================ */

.tools-page {
    /* Uses .page-row for layout */
}

.tools-content {
    /* Tools page specific: limit width */
    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;
}

.schema-field {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
}

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

.field-controls input,
.field-controls select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.remove-field-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.add-field-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.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;
}

.preview-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.json-preview {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* ============================================
   COMPARE PAGE
   ============================================ */

.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 {
    position: relative;
    display: inline-block;
}

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

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

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

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

.compare-add-company-section {
    /* Left side container */
}

.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;
}

.compare-h {
    /* Section headings for each metric */
}

.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;
}

.trend-number {
    display: none;
}

.highlight-positive {
    background-color: #d1e7dd;
    border-radius: 3px;
}

.highlight-negative {
    background-color: #f8d7da;
    border-radius: 3px;
}

.compare-no-results {
    padding: 6px 12px;
}

/* Screen filters specific to compare page */
.screen-filters-compare .btn {
    font-size: 14px;
}

/* ============================================
   SCREEN PAGE
   ============================================ */

/* Override content padding for screen page */
.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 #ddd;
    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-label {
    font-weight: 400;
    width: 120px;
    font-size: 14px;
}

.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;
    /* transition: background-color var(--transition-fast); */
}

.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 {
    -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-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 {
    margin-left: 8px;
    font-size: 13px;
    cursor: pointer;
}

.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;
}

/* Eye icon for column visibility toggle */
.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;
}

/* Highlight icon for column color gradient toggle */
.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 cells in results table */
.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 #ddd;
}

.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 tr {
    /* Header row styling */
}

.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 tr {
    /* Body row styling */
}

.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 screens */
.saved-screen-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.saved-screen-link {
    display: block;
    padding: 8px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: #202122;
    flex: 1;
    font-size: 14px;
}

.saved-screen-link:hover {
    background: #f5f5f5;
    text-decoration: none;
}

/* Save screen modal */
#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;
}

/* ============================================
   LOGIN PAGE
   ============================================ */

.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;
}

.title {
    /* Heading styles already defined globally */
}

.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;
}

/* Two-step toggle (no JS) */
.step-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}

.password-section {
    display: none;
}

.continue-row {
    display: block;
}

.step-toggle:checked ~ .stack .password-section {
    display: block;
}

.step-toggle:checked ~ .stack .continue-row {
    display: none;
}

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

.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;
}

/* ============================================
   PRIVACY & TERMS PAGES
   ============================================ */

.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;
}

.highlight {
    background-color: #fef3c7;
    padding: 2px 4px;
    border-radius: 3px;
}

/* ============================================
   PROMPT EDIT PAGE STYLES
   ============================================ */

/* Layout utilities */
.flex-row {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
}

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

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

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

.flex-gap-5 {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Spacing utilities */
.mb-5 {
    margin-bottom: 5px;
}

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

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

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

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

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

.ml-10 {
    margin-left: 10px;
}

/* Form elements */
.form-label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.form-label-inline {

}

.form-select {
    padding: 8px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 35px;
    background-color: white;
    height: 36px;
    outline: none;
    box-sizing: border-box;
}

.form-select:focus {
    outline: none;
    border-color: rgba(13, 13, 13, 0.2);
}

.form-select-wide {
    padding: 8px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    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: white;
    height: 36px;
    outline: none;
}

.form-select-wide:focus {
    outline: none;
    border-color: rgba(13, 13, 13, 0.2);
}

.form-input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-input-number {
    width: 120px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    outline: none;
}

.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 rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    line-height: 1.42857;
}

.form-input-chart-symbol {
    width: 120px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.form-checkbox {
    transform: scale(1.2);
}

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

/* Text utilities */
.text-mono {
    font-family: monospace;
    font-size: 12px;
}

.text-small {
    font-size: 13px;
}

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

.text-italic {
    color: #666;
    font-style: italic;
}

.text-bold {
    font-weight: bold;
}

.text-capitalize {
    text-transform: capitalize;
}

.text-tiny {
    font-size: 11px;
}

.text-status {
    font-size: 14px;
}

/* Status messages */
.status-message {
    margin-left: 10px;
    font-size: 14px;
}

/* Section containers */
.run-section {
    min-width: 320px;
}

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

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

/* Buttons */
.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;
}

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

/* Modal styles */
.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;
}

/* Help icon and popup */
.help-icon {
    cursor: pointer;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.help-popup {
    opacity: 0;
    visibility: hidden;
}

/* Prompt output reference */
.prompt-output-reference {
    background: #e8f4f8;
    padding: 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-top: 3px;
}

.prompt-output-reference-text {
    color: #555;
}

/* Placeholder message */
.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;
}

/* List styles */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.versions-list-margin {
    margin-top: 20px;
}

/* Select max widths */
.select-max-200 {
    max-width: 200px;
}

/* Hide utility */
.display-none {
    display: none;
}

/* Icon margins */
.icon-mr-4 {
    margin-right: 4px;
}

/* Small text helpers */
.help-text {
    color: #666;
    display: block;
    margin-top: 5px;
}

.help-text-inline {
    color: #666;
    font-size: 11px;
}

/* ============================================
   INSERT VARIABLE BUTTONS
   ============================================ */

.insert-vars-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-bottom: 5px;
    justify-content: flex-end;
    align-items: center;
}

.btn-insert-var {
    padding: 5px 12px;
    background: white;
    /*border: 1px solid #ddd;*/
    /*border-radius: 8px;*/
    cursor: pointer;
    font-size: 16px;
    /*background-color: var(--color-bg-hover-subtle);*/
    /*border: none;*/
    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 UTILITIES
   ============================================ */

/* Form labels */
.form-label {
    display: block;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.form-label-inline {
    display: block;
    margin: 0;
}

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

/* Flex layouts */
.flex-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.flex-row-space-between-mb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

/* Form controls */
.checkbox-lg {
    transform: scale(1.2);
    margin: 0;
    vertical-align: middle;
}

.form-select-full {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    box-sizing: border-box;
    cursor: pointer;
    margin: 0;
    margin-bottom: 15px;
    background: white;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px;
    height: 36px;
    outline: none;
}

.form-select-full:focus {
    outline: none;
    border-color: rgba(13, 13, 13, 0.2);
}

.form-input-number-sm {
    width: 220px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Container utilities */
.container-hidden-mt-mb {
    display: none;
    margin-top: -8px;
    margin-bottom: 8px;
}

.container-hidden-mb {
    display: none;
    margin-top: 0;
    margin-bottom: 15px;
}

.label-checkbox-flex {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    line-height: 1;
}

.label-checkbox-flex-mb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px 0;
    cursor: pointer;
}

/* Help text */
.help-text-sm {
    color: #666;
    display: block;
}

/* Spacing utilities */
.mb-10 {
    margin-bottom: 10px;
}

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

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

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

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

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

.company-preview-container {
    margin: 5px 0 10px 0;
    display: none;
}

.run-button-container {
    margin-top: 10px;
}

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

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

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

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

.ml-28 {
    margin-left: 28px;
}

/* Display utilities */
.display-none {
    display: none;
}

.display-block {
    display: block;
}

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

/* Width utilities */
.w-100 {
    width: 100%;
}

.w-220 {
    width: 220px;
}

.w-300 {
    width: 300px;
}

/* Padding utilities */
.p-10 {
    padding: 10px;
}

.p-8 {
    padding: 8px;
}

.p-6 {
    padding: 6px;
}

/* Border utilities */
.border-std {
    border: 1px solid #ddd;
}

.border-radius-4 {
    border-radius: 4px;
}

/* Background utilities */
.bg-white {
    background: white;
}

.bg-light-yellow {
    background: #fff3cd;
}

.bg-light-blue {
    background: #e8f4fd;
}

.bg-light-green {
    background: #f0fff4;
}

.bg-light-red {
    background: #fff5f5;
}

.bg-light-gray {
    background: #f8f9fa;
}

/* Text utilities */
.color-muted {
    color: #666;
}

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

.color-error {
    color: #dc3545;
}

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

.font-size-11 {
    font-size: 11px;
}

.font-size-12 {
    font-size: 12px;
}

.font-size-13 {
    font-size: 13px;
}

.font-size-14 {
    font-size: 14px;
}

.font-bold {
    font-weight: bold;
}

/* Box sizing */
.box-sizing-border {
    box-sizing: border-box;
}

/* Overflow utilities */
.overflow-auto {
    overflow: auto;
}

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

/* Max height utilities */
.max-h-150 {
    max-height: 150px;
}

.max-h-200 {
    max-height: 200px;
}

.max-h-300 {
    max-height: 300px;
}

.max-h-400 {
    max-height: 400px;
}

/* Position utilities */
.pos-relative {
    position: relative;
}

.pos-fixed {
    position: fixed;
}

.pos-sticky {
    position: sticky;
    top: 0;
}

/* Flex utilities */
.flex {
    display: flex;
}

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

.flex-1 {
    flex: 1;
}

.flex-gap-5 {
    display: flex;
    gap: 5px;
}

.flex-gap-8 {
    display: flex;
    gap: 8px;
}

.flex-gap-10 {
    display: flex;
    gap: 10px;
}

.flex-gap-15 {
    display: flex;
    gap: 15px;
}

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

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

.align-items-start {
    align-items: flex-start;
}

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

.justify-end {
    justify-content: flex-end;
}

/* Cursor utilities */
.cursor-pointer {
    cursor: pointer;
}

/* White space utilities */
.white-space-pre-wrap {
    white-space: pre-wrap;
}

/* Font family utilities */
.font-monospace {
    font-family: monospace;
}

/* Transform utilities */
.scale-11 {
    transform: scale(1.1);
}

/* Common component styles */
.select-std {
    width: 300px;
    padding: 6px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    border-radius: var(--radius-lg);
    font-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 35px;
    background-color: white;
}

.select-full {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(13, 13, 13, 0.1);
    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 #ddd;
    border-radius: 4px;
}

.input-full {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.input-full-mb {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.doc-panel {
    background: #f9f9f9;
    border-left: 3px solid #4CAF50;
    padding: 8px;
    margin-top: 8px;
    font-size: 11px;
}

.section-mt {
    margin-top: 15px;
}

.modal-section-mb {
    margin-bottom: 5px;
    font-weight: bold;
}

/* Form layout utilities */
.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 sizing */
.input-w80 {
    width: 80px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.input-w100 {
    width: 100px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.input-date {
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Flex containers for forms */
.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 */
.flex-grow-1 {
    flex: 1;
}

/* Form containers */
.form-container-hidden {
    display: none;
    margin-bottom: 15px;
}

/* Button utilities */
.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 utilities */
.flex-end {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Action button container */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 30px;
}

.action-buttons-inner {
    display: flex;
    gap: 10px;
    /* margin: 10px 0 20px 0; */
}

/* Warning/Alert boxes */
.alert-warning {
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    color: #856404;
}

/* Margin utilities */
.mb-10 {
    margin-bottom: 15px;
}

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

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

.m-0 {
    margin: 0;
}

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

/* Padding utilities */
.p-0 {
    padding: 0;
}

.pt-10 {
    padding-top: 10px;
}

.pb-10 {
    padding-bottom: 10px;
}

.pb-1 {
    padding-bottom: 1px;
}

.p-15 {
    padding: 15px;
}

.p-12 {
    padding: 12px;
}

.pt-5 {
    padding-top: 5px;
}

/* Deploy toggle */
.deploy-toggle {
    margin: 10px 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Output sections */
.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 Display */
.ai-response-container {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    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;
}

/* Button sizing utilities */

.btn-undeploy {
    font-size: 12px;
    padding: 4px 8px;
    cursor: pointer;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
}

.btn-deploy-global {
    font-size: 12px;
    padding: 4px 8px;
    background: #111827;
    color: white;
    border: 1px solid #111827;
}

/* Bulk deployment controls */
.bulk-deployment-container {
    margin-bottom: 15px;
}

.bulk-deployment-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.run-block-style {
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: #fafafa;
    margin-bottom: 20px;
}

.bulk-deploy-status {
    margin-left: 10px;
    font-size: 13px;
    color: #666;
}

/* Output card */
.output-card {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    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;
}

/* Text utilities */
.font-weight-bold {
    font-weight: bold;
}

.font-size-12 {
    font-size: 12px;
}

.font-size-13 {
    font-size: 13px;
}

.color-muted {
    color: #666;
}

.color-warning {
    color: #856404;
}

.cursor-pointer {
    cursor: pointer;
}

/* Output action buttons */
.btn-deploy-output {
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 3px;
    margin-left: 5px;
}

.btn-deploy-global-output {
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    background: #111827;
    color: white;
    border: none;
    border-radius: 3px;
    margin-left: 5px;
}

.btn-undeploy-output {
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 3px;
    margin-left: 5px;
}

.btn-delete-output {
    font-size: 11px;
    padding: 2px 6px;
    cursor: pointer;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    margin-left: 5px;
}

.deployed-indicator {
    font-size: 10px;
    color: #28a745;
    margin-left: 5px;
}

/* Crafted prompt section in output */
.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 */
.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 */
.dataset-add-panel {
    min-width: 240px;
    padding: 10px;
    border: 1px solid #eee;
    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;
}

/* Layout utilities */
.flex-1 {
    flex: 1;
}

.gap-15 {
    gap: 15px;
}

.align-flex-start {
    align-items: flex-start;
}

.ml-5 {
    margin-left: 5px;
}

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

.font-size-10 {
    font-size: 10px;
}

.font-size-11 {
    font-size: 11px;
}

.p-8 {
    padding: 8px;
}

.p-10 {
    padding: 10px;
}

/* Extracted Data Section */
.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 #eee;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 6px;
}

.extracted-data-item-row {
    display: flex;
    gap: 6px;
    margin-bottom: 3px;
    align-items: flex-start;
}

/* Margin utilities */
.mr-5 {
    margin-right: 5px;
}

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

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

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

/* Min-width utilities */
.min-w-80 {
    min-width: 80px;
}

/* Text utilities */
.white-space-pre-wrap {
    white-space: pre-wrap;
}

.font-weight-600 {
    font-weight: 600;
}

.color-success {
    color: #2d5a2d;
}

.extracted-data-info {
    margin-top: 8px;
    font-size: 11px;
    color: #666;
}

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

.link-primary {
    color: #1976d2;
}

/* Grounding Attributions Section */
.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 sections */
.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 #eee;
    padding: 8px;
    border-radius: 4px;
}

/* Pagination controls */
.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;
}

.btn-disabled {
    pointer-events: none;
    opacity: .6;
}

/* Font size utilities */
.font-size-14 {
    font-size: 14px;
}

.color-text {
    color: #374151;
}

/* Test results */
.test-results-content {
    max-height: 300px;
    overflow-y: auto;
    background: #f9f9f9;
}

/* Output action buttons container */
.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;
}

/* New output card (just completed) */
.output-card-new {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

.output-meta-flex-start {
    align-self: flex-start;
}

.inherited-context-badge {
    background: #e8f4f8;
    color: #0066cc;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
}

.just-completed-badge {
    color: #28a745;
    font-size: 12px;
}

.prompt-source {
    margin-top: 25px;
}

#price-section {
    margin-top: 15px;
}

.avatar-dropdown-container .object-cover {
    margin-top: 13px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1280px) {
    #left-sidebar {
        /* display: none; */
    }
}


/* ============================================
   PRICE CHANGE COLORS
   ============================================ */

.change-positive {
    color: #16a34a;
    font-weight: 500;
}

.change-negative {
    color: #dc2626;
    font-weight: 500;
}
