/**
 * Trading GUI V2 - Shared Stylesheet
 * ====================================
 * 
 * CSS styles for all V2 components following design standards.
 * Uses CSS variables for easy theme customization.
 */

/* ========================================================================== */
/* CSS VARIABLES - THEME CUSTOMIZATION                                       */
/* ========================================================================== */

:root {
    /* === PRIMARY COLORS === */
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    
    /* === BACKGROUND COLORS === */
    --bg-dark: #1a1a1a;
    --bg-section: #2a2a2a;
    --bg-hover: #333;
    --bg-border: #3a3a3a;
    
    /* === TEXT COLORS === */
    --text-primary: #e0e0e0;
    --text-muted: #888;
    --text-dark: #666;
    --text-current: #f97316;        /* Orange - for current/live prices */
    
    /* === STATUS COLORS === */
    --status-success: #4caf50;
    --status-error: #f44336;
    --status-warning: #ff9800;
    --status-info: #2196f3;
    
    /* === POSITION TYPE COLORS === */
    --pos-long-stock: #2196f3;      /* Blue */
    --pos-short-stock: #ff9800;     /* Orange */
    --pos-long-option: #4caf50;     /* Green */
    --pos-short-option: #f44336;    /* Red */
    
    /* === CHART COLORS === */
    --chart-underlying: #EAB308;    /* Yellow - for underlying price series */
    --chart-base: #3B82F6;          /* Blue - for base position series (to be added) */
    --chart-short: #EF4444;         /* Red - for short position series */
    --chart-combined: #22C55E;      /* Green - for combined series */
}

/* ========================================================================== */
/* PRICE MODE TOGGLE                                                          */
/* ========================================================================== */

.v2-price-mode-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.v2-price-mode-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.v2-price-mode-switch {
    display: flex;
    background: var(--bg-section);
    border: 1px solid var(--bg-border);
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.v2-price-mode-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.v2-price-mode-btn.active {
    background: var(--status-info);
    color: white;
    font-weight: 600;
}

.v2-price-mode-toggle-compact .v2-price-mode-btn {
    padding: 4px 10px;
    font-size: 11px;
}

/* ========================================================================== */
/* GLOBAL STYLES                                                              */
/* ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 14px;
    padding: 20px;
}

/* ========================================================================== */
/* ENVIRONMENT INDICATOR                                                      */
/* ========================================================================== */

.env-badge {
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.env-badge.development {
    background: #ff6b6b;
    color: white;
    animation: env-pulse 2s infinite;
}

.env-badge.production {
    background: #51cf66;
    color: white;
}

@keyframes env-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ========================================================================== */
/* CONNECTION INDICATOR                                                       */
/* ========================================================================== */

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

.v2-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: background 0.3s;
}

.v2-status-dot.connected {
    background: var(--status-success);
    box-shadow: 0 0 10px var(--status-success);
}

.v2-status-dot.disconnected {
    background: var(--status-error);
    box-shadow: 0 0 10px var(--status-error);
}

.v2-status-dot.reconnecting {
    background: var(--status-warning);
    box-shadow: 0 0 10px var(--status-warning);
    animation: v2-pulse 1s infinite;
}

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

/* ========================================================================== */
/* STATUS BAR                                                                 */
/* ========================================================================== */

.v2-status-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
}

.v2-status-metric {
    color: var(--text-primary);
}

.v2-status-metric strong {
    color: var(--color-primary);
}

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

/* ========================================================================== */
/* ACCOUNT INFO COMPONENT                                                     */
/* ========================================================================== */

.v2-account-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.v2-account-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
}

.v2-account-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.7);
}

.v2-account-value {
    font-size: 20px;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
}

.v2-account-separator {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================================================== */
/* Responsive adjustments */
@media (max-width: 1200px) {
    .v2-account-info {
        gap: 12px;
    }
    
    .v2-account-metric {
        min-width: 120px;
    }
    
    .v2-account-value {
        font-size: 18px;
    }
}

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

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

.v2-table th {
    background: var(--bg-hover);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

.v2-table td {
    padding: 12px;
    border-bottom: 1px solid var(--bg-border);
}

.v2-table tr:hover {
    background: var(--bg-hover);
}

.v2-row-clickable {
    cursor: pointer;
}

.v2-group-header td,
.group-header td {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%) !important;
    border-top: 2px solid var(--color-primary);
    font-weight: 600;
    color: white !important;
    padding: 12px;
}

.group-header {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%) !important;
    color: white !important;
}

.group-header:hover {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%) !important;
}

.v2-no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* Column visibility */
.col-hidden {
    display: none !important;
}

/* Danger button (red) */
.v2-btn-danger {
    background: #dc2626;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.v2-btn-danger:hover {
    background: #b91c1c;
}

/* Status badges for Trade Ledger */
.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open {
    background: var(--status-warning) !important;  /* Orange */
    color: white !important;
}

.status-closed {
    background: var(--status-success) !important;  /* Green */
    color: white !important;
}

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

.v2-type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.v2-badge-stk-long {
    background: var(--pos-long-stock);
}

.v2-badge-stk-short {
    background: var(--pos-short-stock);
}

.v2-badge-opt-long {
    background: var(--pos-long-option);
}

.v2-badge-opt-short {
    background: var(--pos-short-option);
}

.v2-badge-unknown {
    background: var(--text-muted);
}

/* ========================================================================== */
/* P&L COLORS                                                                 */
/* ========================================================================== */

.v2-profit {
    color: var(--status-success);
}

.v2-loss {
    color: var(--status-error);
}

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

.v2-btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    font-family: inherit;
}

.v2-btn:hover {
    background: #5568d3;
}

.v2-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

.v2-btn-secondary {
    background: var(--bg-section);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
}

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

.v2-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* ========================================================================== */
/* SECTIONS                                                                   */
/* ========================================================================== */

.v2-section {
    background: var(--bg-section);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.v2-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--color-primary);
}

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

/* ========================================================================== */
/* HEADER                                                                     */
/* ========================================================================== */

.v2-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.v2-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
}

/* ========================================================================== */
/* CONTROLS                                                                   */
/* ========================================================================== */

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

/* ========================================================================== */
/* MODAL DIALOGS                                                              */
/* ========================================================================== */

.v2-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.v2-modal-overlay.active {
    display: flex;
}

.v2-modal-content {
    background: var(--bg-section);
    border-radius: 8px;
    max-width: 900px;  /* Wider for order form two-column layout */
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.v2-modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--bg-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.v2-modal-close {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 1;
}

.v2-modal-close:hover {
    color: var(--status-error);
}

.v2-modal-body {
    padding: 20px;
}

.v2-modal-footer {
    padding: 20px;
    border-top: 1px solid var(--bg-border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ========================================================================== */
/* FORMS                                                                      */
/* ========================================================================== */

.v2-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.v2-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-form-group label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.v2-form-group input,
.v2-form-group select,
.v2-form-group textarea {
    padding: 10px 12px;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.v2-form-group input:focus,
.v2-form-group select:focus,
.v2-form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.v2-form-group input::placeholder,
.v2-form-group textarea::placeholder {
    color: var(--text-dark);
}

.v2-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* ========================================================================== */
/* DROPDOWNS / SELECTS                                                        */
/* ========================================================================== */

.v2-select {
    padding: 8px 12px;
    background: var(--bg-section);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}

.v2-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* ========================================================================== */
/* ERROR & LOADING STATES                                                     */
/* ========================================================================== */

.v2-error-message {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--status-error);
    border-radius: 4px;
    padding: 15px;
    color: var(--status-error);
}

.v2-error-message strong {
    display: block;
    margin-bottom: 8px;
}

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

.v2-spinner {
    border: 3px solid var(--bg-border);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: v2-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes v2-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================================================== */
/* TIMESTAMPS                                                                 */
/* ========================================================================== */

.v2-timestamp {
    color: var(--text-muted);
    font-size: 12px;
}

/* ========================================================================== */
/* DEBUG PANEL (for test pages)                                               */
/* ========================================================================== */

.debug-panel {
    background: var(--bg-dark);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.debug-message {
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-section);
    border-radius: 4px;
    border-left: 3px solid var(--color-primary);
}

.debug-timestamp {
    color: var(--text-muted);
    margin-right: 10px;
}

.debug-type {
    color: var(--color-primary);
    font-weight: 600;
    margin-right: 10px;
}

/* ========================================================================== */
/* STAT CARDS (for test pages)                                                */
/* ========================================================================== */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid var(--bg-border);
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
}

.data-display {
    background: var(--bg-dark);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.data-item {
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-section);
    border-radius: 4px;
    border-left: 3px solid var(--color-primary);
}

/* ========================================================================== */
/* UTILITY CLASSES                                                            */
/* ========================================================================== */

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

.v2-text-small {
    font-size: 12px;
}

.v2-text-large {
    font-size: 18px;
}

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

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

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

/* Legacy class aliases for backwards compatibility */
.header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.status-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

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

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #666;
    transition: background 0.3s;
}

.status-dot.connected {
    background: var(--status-success);
    box-shadow: 0 0 10px var(--status-success);
}

.status-dot.disconnected {
    background: var(--status-error);
    box-shadow: 0 0 10px var(--status-error);
}

.status-dot.reconnecting {
    background: var(--status-warning);
    box-shadow: 0 0 10px var(--status-warning);
    animation: v2-pulse 1s infinite;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.section {
    background: var(--bg-section);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--color-primary);
}

button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:disabled {
    background: #666;
    cursor: not-allowed;
}

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

th {
    background: var(--bg-hover);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--bg-border);
}

tr:hover {
    background: var(--bg-hover);
}

.type-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.type-stk-long {
    background: var(--pos-long-stock);
}

.type-stk-short {
    background: var(--pos-short-stock);
}

.type-opt-long {
    background: var(--pos-long-option);
}

.type-opt-short {
    background: var(--pos-short-option);
}

.price-positive {
    color: var(--status-success);
}

.price-negative {
    color: var(--status-error);
}

.no-data {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

.timestamp {
    color: var(--text-muted);
    font-size: 12px;
}

/* ========================================================================== */
/* ORDER FORM COMPONENTS                                                      */
/* ========================================================================== */

/* Order Form Modal */
.order-form-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 8px;
}

@media (max-width: 768px) {
    .order-form-modal-content {
        grid-template-columns: 1fr;
    }
}

/* Toggle Buttons (Stock/Option, Buy/Sell) */
.type-toggle-btn,
.action-toggle-btn {
    flex: 1;
    padding: 10px 20px;
    background: var(--bg-dark);
    border: 1px solid var(--bg-border);
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.type-toggle-btn:hover,
.action-toggle-btn:hover {
    border-color: var(--color-primary);
}

.type-toggle-btn.active,
.action-toggle-btn.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Input hints */
.input-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Standard Form Elements */
.v2-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-section);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.v2-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Date input styling */
.v2-date-input {
    color-scheme: dark; /* Makes native calendar dark-mode compatible */
}

/* Force calendar popup to have light background (browser-specific) */
.v2-date-input::-webkit-calendar-picker-indicator {
    filter: invert(1); /* Makes calendar icon visible on dark background */
    cursor: pointer;
}

/* Chrome/Edge/Safari date picker styling */
.v2-date-input::-webkit-datetime-edit-fields-wrapper {
    color: var(--color-text);
}

.v2-date-input::-webkit-datetime-edit-text {
    color: var(--color-text);
}

.v2-date-input::-webkit-datetime-edit-month-field,
.v2-date-input::-webkit-datetime-edit-day-field,
.v2-date-input::-webkit-datetime-edit-year-field {
    color: var(--color-text);
}

.v2-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-section);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
}

.v2-btn-primary {
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-btn-primary:hover {
    background: #5568d3;
}

.v2-btn-secondary {
    padding: 10px 20px;
    background: var(--bg-dark);
    color: var(--text-primary);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-btn-secondary:hover {
    border-color: var(--color-primary);
}

/* Contract Search Results */
.contract-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--bg-border);
    border-radius: 4px;
    margin-top: 4px;
    max-height: 200px;  /* Reduced to fit within modal */
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-border);
    transition: background 0.2s;
}

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

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

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

.search-result-symbol {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-result-type-inline {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-section);
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: normal;
}

.search-result-company {
    font-size: 12px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-industry {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
}

.search-result-type {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-section);
    padding: 2px 8px;
    border-radius: 3px;
}

.search-result-exchange {
    font-size: 11px;
    color: var(--text-muted);
}

.search-result-loading,
.search-result-empty,
.search-result-error {
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.search-result-error {
    color: var(--status-error);
}

/* ========================================================================== */
/* COLUMN MANAGEMENT SIDEBAR                                                 */
/* ========================================================================== */

.column-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 300px;
    background: var(--bg-section);
    border-right: 2px solid var(--bg-border);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.column-sidebar.open {
    transform: translateX(0);
}

/* Right-side variant */
.column-sidebar-right {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 2px solid var(--bg-border);
    transform: translateX(100%);
}

.column-sidebar-right.open {
    transform: translateX(0);
}

.column-item {
    padding: 10px 15px;
    margin: 4px 10px;
    background: var(--bg-dark);
    border-radius: 4px;
    cursor: move;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.column-item:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.column-item:active {
    cursor: grabbing;
}

.column-item.hidden-col {
    opacity: 0.5;
}

