    * { margin: 0; padding: 0; box-sizing: border-box; }
    
    /* Theme: Black (Default) */
    :root, [data-theme="black"] {
      --bg-primary: #0a0a0a;
      --bg-secondary: #171717;
      --bg-card: #262626;
      --bg-hover: #404040;
      --border-color: #404040;
      --text-primary: #f5f5f5;
      --text-secondary: #a3a3a3;
      --text-muted: #737373;
      
      --gray-950: #0a0a0a;
      --gray-900: #171717;
      --gray-800: #262626;
      --gray-700: #404040;
      --gray-600: #525252;
      --gray-500: #737373;
      --gray-400: #a3a3a3;
      --gray-300: #d4d4d4;
      --gray-100: #f5f5f5;
      --brand-500: #6366f1;
      --brand-600: #4f46e5;
      --brand-700: #4338ca;
      --green-300: #86efac;
      --green-400: #4ade80;
      --green-700: #15803d;
      --green-800: #166534;
      --green-900: #14532d;
      --rose-300: #fda4af;
      --rose-400: #fb7185;
      --rose-700: #be123c;
      --rose-800: #9f1239;
      --rose-900: #881337;
      --yellow-300: #fde047;
      --yellow-400: #facc15;
      --yellow-700: #a16207;
      --yellow-800: #854d0e;
      --yellow-900: #713f12;
      --emerald-500: #10b981;
      --emerald-600: #059669;
      --emerald-700: #047857;
    }
    
    /* Theme: White/Light */
    [data-theme="white"] {
      --bg-primary: #ffffff;
      --bg-secondary: #f9fafb;
      --bg-card: #ffffff;
      --bg-hover: #f3f4f6;
      --border-color: #e5e7eb;
      --text-primary: #111827;
      --text-secondary: #6b7280;
      --text-muted: #9ca3af;
      
      --gray-950: #ffffff;
      --gray-900: #f9fafb;
      --gray-800: #ffffff;
      --gray-700: #e5e7eb;
      --gray-600: #d1d5db;
      --gray-500: #6b7280;
      --gray-400: #9ca3af;
      --gray-300: #374151;
      --gray-100: #111827;
      --brand-500: #6366f1;
      --brand-600: #4f46e5;
      --brand-700: #4338ca;
      --green-300: #065f46;
      --green-400: #047857;
      --green-700: #d1fae5;
      --green-800: #a7f3d0;
      --green-900: #6ee7b7;
      --rose-300: #9f1239;
      --rose-400: #be123c;
      --rose-700: #ffe4e6;
      --rose-800: #fecdd3;
      --rose-900: #fda4af;
      --yellow-300: #78350f;
      --yellow-400: #92400e;
      --yellow-700: #fef3c7;
      --yellow-800: #fde68a;
      --yellow-900: #fcd34d;
    }
    
    /* Theme: Finance (Professional Blue/Green) */
    [data-theme="finance"] {
      --bg-primary: #0c1e2e;
      --bg-secondary: #122738;
      --bg-card: #1a3348;
      --bg-hover: #234158;
      --border-color: #2d5168;
      --text-primary: #e8f4f8;
      --text-secondary: #94b8c8;
      --text-muted: #6b8fa3;
      
      --gray-950: #0c1e2e;
      --gray-900: #122738;
      --gray-800: #1a3348;
      --gray-700: #2d5168;
      --gray-600: #4a6b80;
      --gray-500: #6b8fa3;
      --gray-400: #94b8c8;
      --gray-300: #c2dce8;
      --gray-100: #e8f4f8;
      --brand-500: #0ea5e9;
      --brand-600: #0284c7;
      --brand-700: #0369a1;
      --green-300: #6ee7b7;
      --green-400: #34d399;
      --green-700: #059669;
      --green-800: #047857;
      --green-900: #065f46;
      --rose-300: #fca5a5;
      --rose-400: #f87171;
      --rose-700: #dc2626;
      --rose-800: #b91c1c;
      --rose-900: #991b1b;
      --yellow-300: #fde047;
      --yellow-400: #facc15;
      --yellow-700: #ca8a04;
      --yellow-800: #a16207;
      --yellow-900: #854d0e;
      --emerald-500: #10b981;
      --emerald-600: #059669;
      --emerald-700: #047857;
    }
    
    html { height: 100%; }
    body { 
      min-height: 100vh; 
      background-color: var(--bg-primary); 
      color: var(--text-primary);
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      line-height: 1.5;
      transition: background-color 0.3s ease, color 0.3s ease;
    }
    
    .container { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }
    .space-y-6 > * + * { margin-top: 1.5rem; }
    .space-y-4 > * + * { margin-top: 1rem; }
    .space-y-3 > * + * { margin-top: 0.75rem; }
    .space-y-2 > * + * { margin-top: 0.5rem; }
    .gap-2 { gap: 0.5rem; }
    .gap-3 { gap: 0.75rem; }
    .gap-4 { gap: 1rem; }
    .gap-6 { gap: 1.5rem; }
    
    .flex { display: flex; }
    .flex-col { flex-direction: column; }
    .flex-wrap { flex-wrap: wrap; }
    .items-center { align-items: center; }
    .justify-between { justify-content: space-between; }
    
    .grid { display: grid; }
    .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
    .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    
    @media (min-width: 768px) {
      .md\\:flex-row { flex-direction: row; }
      .md\\:items-center { align-items: center; }
      .md\\:justify-between { justify-content: space-between; }
      .md\\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
      .md\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    }
    
    @media (min-width: 1024px) {
      .lg\\:flex-row { flex-direction: row; }
      .lg\\:items-center { align-items: center; }
      .lg\\:justify-between { justify-content: space-between; }
    }
    
    @media (min-width: 1280px) {
      .xl\\:col-span-2 { grid-column: span 2 / span 2; }
      .xl\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }
    
    .card { 
      background-color: var(--bg-card); 
      border-radius: 1rem; 
      border: 1px solid var(--border-color); 
      padding: 1rem;
      transition: background-color 0.3s ease, border-color 0.3s ease;
    }
    
    .badge { 
      display: inline-block;
      font-size: 0.75rem; 
      line-height: 1rem;
      padding: 0.125rem 0.5rem; 
      border-radius: 9999px; 
      border: 1px solid var(--gray-700); 
      background-color: var(--gray-800);
    }
    
    .btn { 
      padding: 0.5rem 0.75rem; 
      border-radius: 0.5rem; 
      font-size: 0.875rem; 
      line-height: 1.25rem;
      font-weight: 500;
      cursor: pointer;
      border: none;
      transition: background-color 0.15s;
      display: inline-flex;
      align-items: center;
      gap: 0.5rem;
    }
    
    .btn:disabled { opacity: 0.5; cursor: not-allowed; }
    
    .btn-primary { 
      background-color: var(--brand-600); 
      color: white; 
    }
    .btn-primary:hover:not(:disabled) { background-color: var(--brand-700); }
    
    .btn-ghost { 
      background-color: var(--gray-800); 
      color: var(--gray-100); 
    }
    .btn-ghost:hover:not(:disabled) { background-color: var(--gray-700); }
    
    .btn-success { background-color: var(--emerald-600); color: white; }
    .btn-success:hover:not(:disabled) { background-color: var(--emerald-700); }
    
    .btn-danger { background-color: var(--rose-700); color: white; }
    .btn-danger:hover:not(:disabled) { background-color: var(--rose-800); }
    
    .input { 
      width: 100%; 
      padding: 0.5rem 0.75rem; 
      border-radius: 0.5rem; 
      background-color: var(--bg-card); 
      border: 1px solid var(--border-color); 
      font-size: 0.875rem; 
      line-height: 1.25rem;
      color: var(--text-primary);
      transition: all 0.3s ease;
    }
    
    .input:focus { 
      outline: none; 
      border-color: var(--brand-600);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }
    
    #themeSelector {
      cursor: pointer;
      font-weight: 500;
      background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
      color: white;
      border: none;
    }
    
    #themeSelector:hover {
      background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .label { font-size: 0.75rem; line-height: 1rem; color: var(--gray-400); }
    
    .text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .text-xs { font-size: 0.75rem; line-height: 1rem; }
    
    .font-semibold { font-weight: 600; }
    .font-medium { font-weight: 500; }
    .font-bold { font-weight: 700; }
    
    .text-gray-400 { color: var(--gray-400); }
    .text-gray-500 { color: var(--gray-500); }
    .text-gray-300 { color: var(--gray-300); }
    .text-gray-100 { color: var(--gray-100); }
    .text-green-300 { color: var(--green-300); }
    .text-green-400 { color: var(--green-400); }
    .text-rose-300 { color: var(--rose-300); }
    .text-rose-400 { color: var(--rose-400); }
    .text-yellow-300 { color: var(--yellow-300); }
    .text-yellow-400 { color: var(--yellow-400); }
    .text-emerald-400 { color: var(--emerald-500); }
    
    .bg-green-900 { background-color: var(--green-900); }
    .border-green-700 { border-color: var(--green-700); }
    .bg-rose-900 { background-color: var(--rose-900); }
    .border-rose-700 { border-color: var(--rose-700); }
    .bg-yellow-900 { background-color: var(--yellow-900); }
    .border-yellow-700 { border-color: var(--yellow-700); }
    .bg-gray-800 { background-color: var(--gray-800); }
    .bg-gray-950 { background-color: var(--gray-950); }
    
    .rounded-lg { border-radius: 0.5rem; }
    .rounded-2xl { border-radius: 1rem; }
    .rounded-full { border-radius: 9999px; }
    
    .border { border-width: 1px; }
    .border-gray-800 { border-color: var(--gray-800); }
    .divide-y > * + * { border-top-width: 1px; border-top-color: var(--gray-800); }
    
    .overflow-auto { overflow: auto; }
    .max-h-48 { max-height: 12rem; }
    
    /* ===== UX Enhancements - Header & Titles ===== */
    
    /* TradingView-Style Modern Header */
    .header-modern {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    .header-top {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 12px 20px;
      border-bottom: 1px solid var(--border-color);
    }
    
    .header-left {
      display: flex;
      align-items: center;
      gap: 24px;
    }
    
    .logo-group {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    .logo-icon {
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #6366f1, #8b5cf6);
      border-radius: 8px;
      color: white;
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
      transition: transform 0.3s ease;
    }
    
    .logo-icon:hover {
      transform: scale(1.05) rotate(5deg);
    }
    
    .logo-text {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .brand-name {
      font-size: 18px;
      font-weight: 700;
      background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
    
    .brand-divider {
      color: var(--gray-600);
      font-weight: 300;
    }
    
    .product-name {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .nav-tabs {
      display: flex;
      gap: 4px;
    }
    
    .nav-tab {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      color: var(--text-secondary);
      text-decoration: none;
      transition: all 0.2s ease;
    }
    
    .nav-tab:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
    }
    
    .nav-tab-active {
      background: var(--brand-600);
      color: white;
    }
    
    .header-right {
      display: flex;
      align-items: center;
      gap: 16px;
    }
    
    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .toolbar-btn {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      border-radius: 8px;
      background: transparent;
      border: 1px solid transparent;
      color: var(--text-secondary);
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .toolbar-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
      border-color: var(--border-color);
    }
    
    .toolbar-badge {
      position: absolute;
      top: -4px;
      right: -4px;
      min-width: 18px;
      height: 18px;
      padding: 0 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #ef4444;
      color: white;
      font-size: 10px;
      font-weight: 700;
      border-radius: 9px;
      box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    }
    
    .user-badge {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 6px 12px;
      border-radius: 8px;
      background: var(--green-900);
      border: 1px solid var(--green-700);
    }
    
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: var(--green-400);
      box-shadow: 0 0 8px var(--green-400);
    }
    
    .user-email {
      font-size: 12px;
      font-weight: 500;
      color: var(--green-300);
    }
    
    .icon-btn-sm {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      background: transparent;
      border: none;
      color: var(--green-300);
      cursor: pointer;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    
    .icon-btn-sm:hover {
      background: var(--green-800);
      color: var(--green-200);
    }
    
    .theme-selector {
      padding: 8px 12px;
      border-radius: 8px;
      background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
      border: none;
      color: white;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .theme-selector:hover {
      background: linear-gradient(135deg, var(--brand-700), var(--brand-600));
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    /* Header Controls - Symbol Search (Center) */
    .header-controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 20px;
      gap: 16px;
      border-bottom: 1px solid var(--border-color);
    }
    
    .symbol-search-container {
      flex: 1;
      max-width: 500px;
    }
    
    .symbol-search-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }
    
    .search-icon {
      position: absolute;
      left: 14px;
      width: 18px;
      height: 18px;
      color: var(--gray-400);
      pointer-events: none;
    }
    
    .symbol-search-input {
      width: 100%;
      padding: 12px 16px 12px 44px;
      border-radius: 10px;
      background: var(--bg-secondary);
      border: 2px solid var(--border-color);
      font-size: 15px;
      font-weight: 600;
      color: var(--text-primary);
      transition: all 0.2s ease;
    }
    
    .symbol-search-input:focus {
      outline: none;
      border-color: var(--brand-600);
      background: var(--bg-card);
      box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    }
    
    .symbol-search-input::placeholder {
      color: var(--gray-500);
      font-weight: 500;
    }
    
    .symbol-restore-badge {
      position: absolute;
      right: 12px;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 4px 8px;
      border-radius: 6px;
      background: var(--brand-600);
      color: white;
      font-size: 11px;
      animation: fadeIn 0.3s ease;
    }
    
    .symbol-suggestions {
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      max-height: 400px;
      overflow-y: auto;
      background: var(--bg-card);
      border: 2px solid var(--brand-600);
      border-radius: 12px;
      box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
      z-index: 9999;
      display: none;
      animation: slideDown 0.2s ease-out;
    }
    
    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-8px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .symbol-suggestions::-webkit-scrollbar {
      width: 8px;
    }
    
    .symbol-suggestions::-webkit-scrollbar-track {
      background: var(--bg-secondary);
      border-radius: 4px;
    }
    
    .symbol-suggestions::-webkit-scrollbar-thumb {
      background: var(--brand-600);
      border-radius: 4px;
    }
    
    .symbol-suggestions::-webkit-scrollbar-thumb:hover {
      background: var(--brand-500);
    }
    
    .suggestion-item:last-child {
      border-bottom: none !important;
    }
    
    .symbol-suggestions.visible {
      display: block;
    }
    
    .control-group {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    
    .control-select {
      padding: 8px 12px;
      border-radius: 8px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .control-select:hover {
      background: var(--bg-hover);
      border-color: var(--gray-600);
    }
    
    .control-select:focus {
      outline: none;
      border-color: var(--brand-600);
    }
    
    .control-checkbox {
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 8px 12px;
      border-radius: 8px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      font-size: 13px;
      font-weight: 500;
      color: var(--text-primary);
      cursor: pointer;
      transition: all 0.2s ease;
      user-select: none;
    }
    
    .control-checkbox:hover {
      background: var(--bg-hover);
    }
    
    .control-checkbox input[type="checkbox"] {
      width: 16px;
      height: 16px;
      cursor: pointer;
    }
    
    .control-divider {
      width: 1px;
      height: 24px;
      background: var(--border-color);
      margin: 0 8px;
    }
    
    .control-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 20px;
      border-radius: 8px;
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      color: var(--text-primary);
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .control-btn:hover {
      background: var(--bg-hover);
      border-color: var(--gray-600);
      transform: translateY(-2px);
    }
    
    .control-btn-primary {
      background: linear-gradient(135deg, #10b981, #059669);
      border-color: transparent;
      color: white;
    }
    
    .control-btn-primary:hover {
      background: linear-gradient(135deg, #059669, #047857);
      box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    }
    
    .control-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }
    
    /* Header Status Bar */
    .header-status {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 10px 20px;
      background: var(--bg-secondary);
      font-size: 12px;
    }
    
    .status-item {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .status-label {
      color: var(--gray-500);
      font-weight: 500;
    }
    
    .status-value {
      color: var(--text-primary);
      font-weight: 600;
    }
    
    .status-badge-success {
      padding: 4px 10px;
      border-radius: 6px;
      background: var(--green-900);
      color: var(--green-300);
      border: 1px solid var(--green-700);
    }
    
    .network-indicator {
      display: flex;
      align-items: center;
      gap: 6px;
      font-weight: 600;
      transition: all 0.3s ease;
    }
    
    .network-indicator.offline {
      background: var(--rose-900);
      color: var(--rose-300);
      border-color: var(--rose-700);
    }
    
    .network-indicator.slow {
      background: var(--yellow-900);
      color: var(--yellow-300);
      border-color: var(--yellow-700);
    }
    
    .network-indicator i {
      animation: pulse 2s ease-in-out infinite;
    }
    
    .network-indicator.offline i {
      animation: none;
    }
    
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.5; }
    }
    
    .status-code {
      padding: 3px 8px;
      border-radius: 4px;
      background: var(--gray-800);
      color: var(--gray-300);
      font-family: 'Courier New', monospace;
      font-size: 11px;
    }
    
    .status-divider {
      width: 1px;
      height: 16px;
      background: var(--border-color);
    }
    
    /* Responsive adjustments */
    @media (max-width: 1024px) {
      .header-top {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
      }
      
      .header-left {
        flex-direction: column;
        gap: 12px;
      }
      
      .nav-tabs {
        overflow-x: auto;
      }
      
      .header-controls {
        flex-direction: column;
        gap: 12px;
      }
      
      .symbol-search-container {
        max-width: 100%;
      }
      
      .control-group {
        flex-wrap: wrap;
        justify-content: center;
      }
      
      .nav-tab span {
        display: none;
      }
      
      .control-btn span {
        display: none;
      }
    }
    
    /* Header gradient animation */
    @keyframes gradient-shift {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(-4px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .bg-gradient-to-r {
      background-size: 200% 200%;
      animation: gradient-shift 8s ease infinite;
    }
    
    /* Icon background hover effect */
    header .p-2\.5, .p-2 {
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    header .p-2\.5:hover, .p-2:hover {
      transform: scale(1.05) rotate(5deg);
      box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }
    
    /* Title gradient styles */
    .bg-clip-text {
      -webkit-background-clip: text;
      background-clip: text;
    }
    
    .text-transparent {
      color: transparent;
    }
    
    /* Badge enhanced styles */
    .badge {
      transition: all 0.3s ease;
    }
    
    .badge:hover {
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    /* Section headers with borders */
    header {
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    
    /* Card hover effect */
    .card {
      transition: all 0.3s ease;
    }
    
    .card:hover {
      border-color: var(--brand-600);
      box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    }
    
    /* Enhanced h2 and h3 styles */
    h2, h3 {
      transition: all 0.3s ease;
    }
    
    h2:hover, h3:hover {
      transform: translateX(4px);
    }
    
    /* Improved code blocks */
    code {
      font-family: 'Courier New', monospace;
      font-size: 0.85em;
      transition: all 0.2s ease;
    }
    
    code:hover {
      background-color: var(--brand-900);
      color: var(--brand-300);
      transform: scale(1.05);
    }
    
    /* Offcanvas header styling */
    .offcanvas > div:first-child {
      position: sticky;
      top: 0;
      background: var(--bg-primary);
      z-index: 10;
    }
    
    .hidden { display: none; }
    .block { display: block; }
    
    .mb-1 { margin-bottom: 0.25rem; }
    .mb-2 { margin-bottom: 0.5rem; }
    .mb-3 { margin-bottom: 0.75rem; }
    .mb-4 { margin-bottom: 1rem; }
    .mt-2 { margin-top: 0.5rem; }
    .mt-3 { margin-top: 0.75rem; }
    .mt-4 { margin-top: 1rem; }
    
    .w-24 { width: 6rem; }
    .w-28 { width: 7rem; }
    .w-32 { width: 8rem; }
    .w-full { width: 100%; }
    
    .min-w-full { min-width: 100%; }
    .min-h-screen { min-height: 100vh; }
    
    .p-4 { padding: 1rem; }
    .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
    .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
    .pr-3 { padding-right: 0.75rem; }
    
    .animate-spin { animation: spin 1s linear infinite; }
    @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
    
    .h-12 { height: 3rem; }
    .h-64 { height: 16rem; }
    .mx-auto { margin-left: auto; margin-right: auto; }
    
    .text-center { text-align: center; }
    .text-left { text-align: left; }
    .text-right { text-align: right; }
    
    .accent-brand { accent-color: var(--brand-600); }
    .accent-emerald { accent-color: var(--emerald-500); }
    
    table { width: 100%; border-collapse: collapse; }
    th, td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; }
    
    pre { white-space: pre-wrap; word-wrap: break-word; }
    
    code { 
      background-color: var(--gray-800); 
      padding: 0.125rem 0.375rem; 
      border-radius: 0.25rem; 
      font-family: 'Courier New', monospace;
      font-size: 0.875em;
    }
    
    .text-2xs {
      font-size: 0.6875rem;
      line-height: 1rem;
    }
    
    /* TradingView Chart styling */
    #tvChartContainer {
      width: 100%;
      height: 500px;
      position: relative;
      background: var(--bg-card);
    }
    
    #tvVolumeContainer {
      width: 100%;
      height: 120px;
      margin-top: 0.75rem;
      position: relative;
      background: var(--bg-card);
    }
    
    #tvRsiContainer {
      width: 100%;
      height: 140px;
      margin-top: 0.75rem;
      position: relative;
      background: var(--bg-card);
    }
    
    #tvMacdContainer {
      width: 100%;
      height: 150px;
      margin-top: 0.75rem;
      position: relative;
      background: var(--bg-card);
    }
    
    .tv-chart-wrapper {
      border-radius: 0.5rem;
      overflow: hidden;
      position: relative;
      display: flex;
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Drawing Canvas Overlay */
    .drawing-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 10;
    }
    
    .drawing-overlay.active {
      pointer-events: all;
      cursor: crosshair;
    }
    
    #drawingCanvas {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    
    /* KPI Toolbar Styles (TradingView Inspired) */
    .kpi-toolbar {
      background: var(--bg-secondary);
      border: 1px solid var(--border-color);
      border-radius: 0.5rem;
      padding: 0.75rem 1rem;
      margin-bottom: 1rem;
      display: flex;
      flex-wrap: wrap;
      gap: 1.5rem;
      align-items: center;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    }
    
    .kpi-section {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    
    .kpi-group {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    
    .kpi-item {
      display: flex;
      flex-direction: column;
      gap: 0.125rem;
      min-width: 60px;
    }
    
    .kpi-label {
      font-size: 0.625rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted);
      opacity: 0.7;
    }
    
    .kpi-value {
      font-size: 1.125rem;
      font-weight: 700;
      line-height: 1.2;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums;
      display: flex;
      align-items: center;
      gap: 0.375rem;
    }
    
    .kpi-value-sm {
      font-size: 0.875rem;
      font-weight: 600;
      line-height: 1.2;
      color: var(--text-primary);
      font-variant-numeric: tabular-nums;
    }
    
    .kpi-change {
      font-size: 0.75rem;
      font-weight: 600;
      padding: 0.125rem 0.375rem;
      border-radius: 0.25rem;
      display: inline-flex;
      align-items: center;
      gap: 0.25rem;
    }
    
    .kpi-change-neutral {
      color: var(--text-secondary);
      background: var(--bg-hover);
    }
    
    .kpi-change-positive {
      color: var(--green-400);
      background: rgba(74, 222, 128, 0.1);
    }
    
    .kpi-change-negative {
      color: var(--rose-400);
      background: rgba(251, 113, 133, 0.1);
    }
    
    .kpi-value-neutral {
      color: var(--text-primary);
    }
    
    .kpi-positive {
      color: var(--green-400);
    }
    
    .kpi-negative {
      color: var(--rose-400);
    }
    
    .kpi-divider {
      width: 1px;
      height: 32px;
      background: var(--border-color);
      opacity: 0.5;
    }
    
    .kpi-market-state {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      font-weight: 600;
      font-size: 0.8rem;
    }
    
    .kpi-warning {
      color: var(--yellow-400);
    }
    
    /* Market Closed Overlay */
    #marketClosedOverlay {
      animation: fadeIn 0.3s ease-in-out;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    /* Chart Title Dynamic Styles */
    #titlePrice {
      font-size: 1.125rem;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      transition: color 0.3s ease;
    }
    
    #titleChange {
      padding: 0.125rem 0.375rem;
      border-radius: 0.25rem;
      font-weight: 600;
      font-variant-numeric: tabular-nums;
      transition: all 0.3s ease;
    }
    
    #titleChange.positive {
      color: var(--green-400);
      background: rgba(74, 222, 128, 0.1);
    }
    
    #titleChange.negative {
      color: var(--rose-400);
      background: rgba(251, 113, 133, 0.1);
    }
    
    #titleChange.neutral {
      color: var(--text-secondary);
      background: var(--bg-hover);
    }
    
    /* Responsive KPI Toolbar */
    @media (max-width: 1200px) {
      .kpi-toolbar {
        gap: 1rem;
      }
      
      .kpi-section {
        gap: 0.5rem;
      }
      
      .kpi-group {
        gap: 0.5rem;
      }
    }
    
    @media (max-width: 768px) {
      .kpi-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
      }
      
      .kpi-section {
        width: 100%;
      }
      
      .kpi-group {
        justify-content: space-between;
        width: 100%;
      }
      
      .kpi-divider {
        height: 24px;
      }
    }
    
    /* Drawing Toolbar (TradingView Style - Vertical - COMPACTO) */
    .drawing-toolbar {
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      background: var(--bg-card);
      border-right: 1px solid var(--border-color);
      padding: 0.5rem 0.125rem;
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      align-items: center;
      justify-content: flex-start;
      padding-top: 0.5rem;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
      z-index: 100;
      width: 48px;
      overflow-y: auto;
      overflow-x: hidden;
      transition: box-shadow 0.2s ease;
      scroll-behavior: smooth;
      scrollbar-gutter: stable;
    }
    
    .drawing-toolbar:hover {
      box-shadow: inset -2px 0 8px rgba(0, 0, 0, 0.1);
    }
    
    /* Scrollbar para a barra de ferramentas */
    .drawing-toolbar::-webkit-scrollbar {
      width: 2px;
    }
    
    .drawing-toolbar::-webkit-scrollbar-track {
      background: transparent;
    }
    
    .drawing-toolbar::-webkit-scrollbar-thumb {
      background: var(--border-color);
      border-radius: 2px;
    }
    
    /* Ajuste do container do gráfico para dar espaço à barra - COMPACTO */
    #tvChartContainer {
      flex: 1;
      margin-left: 48px;
      background: var(--bg-primary);
    }
    
    .drawing-overlay {
      margin-left: 48px;
    }
    
    .drawing-tool-group {
      display: flex;
      flex-direction: column;
      gap: 0.125rem;
      padding: 0.25rem 0;
      background: transparent;
      border-radius: 0;
      border: none;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      width: 100%;
    }
    
    .drawing-tool-group:first-child {
      padding-top: 0.125rem;
    }
    
    .drawing-tool-group:last-child {
      border-bottom: none;
      padding-bottom: 0.125rem;
    }
    
    .drawing-tool-btn {
      padding: 0;
      width: 32px;
      height: 32px;
      background: transparent;
      border: none;
      border-radius: 0.25rem;
      color: var(--text-secondary);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.875rem;
      font-weight: 500;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
    }
    
    .drawing-tool-btn svg {
      width: 16px;
      height: 16px;
    }
    
    .drawing-tool-btn:hover {
      background: var(--bg-hover);
      color: var(--text-primary);
      transform: scale(1.1);
    }
    
    .drawing-tool-btn.active {
      background: var(--brand-600);
      color: white;
      box-shadow: 0 0 0 2px var(--brand-600), 0 2px 8px rgba(99, 102, 241, 0.3);
      position: relative;
    }
    
    .drawing-tool-btn.active::after {
      content: '';
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      width: 2px;
      height: 24px;
      background: white;
      border-radius: 0 2px 2px 0;
      box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
    }
    
    .drawing-tool-btn i {
      width: 20px;
      height: 20px;
      stroke-width: 2;
    }
    
    .drawing-tool-btn svg {
      width: 20px;
      height: 20px;
    }
    
    .drawing-tool-divider {
      width: 100%;
      height: 1px;
      background: linear-gradient(90deg, transparent, var(--border-color) 20%, var(--border-color) 80%, transparent);
      opacity: 0.4;
      margin: 0.25rem 0;
    }
    
    .drawing-metrics {
      display: none; /* Hide metrics on vertical toolbar */
    }
    
    .drawing-metric {
      display: flex;
      flex-direction: column;
      gap: 0.125rem;
    }
    
    .drawing-metric-label {
      color: var(--text-muted);
      font-size: 0.625rem;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .drawing-metric-value {
      color: var(--text-primary);
      font-weight: 600;
      font-variant-numeric: tabular-nums;
    }
    
    /* Drawing Metrics Display - COMPACTO para toolbar 48px */
    .drawing-metrics-display {
      display: none !important; /* Esconder na toolbar compacta */
      flex-direction: column;
      gap: 0.25rem;
      padding: 0.25rem;
      background: rgba(99, 102, 241, 0.1);
      border-radius: 0.25rem;
      margin: 0.25rem 0;
      width: 100%;
      border: 1px solid rgba(99, 102, 241, 0.3);
    }
    
    .metric-item {
      display: flex;
      flex-direction: column;
      gap: 0.0625rem;
      align-items: center;
      padding: 0.125rem;
      background: rgba(0, 0, 0, 0.15);
      border-radius: 0.125rem;
    }
    
    .metric-label {
      color: var(--text-muted);
      font-size: 0.5rem;
      font-weight: 500;
      text-transform: uppercase;
      letter-spacing: 0.3px;
      white-space: nowrap;
      text-align: center;
    }
    
    .metric-value {
      color: #a5b4fc;
      font-size: 0.625rem;
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      max-width: 100%;
      text-shadow: 0 0 8px rgba(165, 180, 252, 0.4);
      text-align: center;
    }
    
    .metric-value:not(:empty):not([data-value="—"]) {
      color: #c7d2fe;
      text-shadow: 0 0 12px rgba(199, 210, 254, 0.6);
    }
    
    .color-picker-btn {
      width: 32px;
      height: 32px;
      border-radius: 0.25rem;
      border: 2px solid var(--border-color);
      cursor: pointer;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    .color-picker-btn:hover {
      transform: scale(1.1);
      border-color: var(--brand-500);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }
    
    .line-width-selector {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      padding: 0.25rem 0;
      background: transparent;
      border-radius: 0;
      border: none;
      width: 100%;
    }
    
    .line-width-btn {
      width: 32px;
      height: 32px;
      background: transparent;
      border: none;
      border-radius: 0.25rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .line-width-btn:hover {
      background: var(--bg-hover);
      transform: scale(1.1);
    }
    
    .line-width-btn.active {
      background: var(--brand-600);
      box-shadow: 0 0 0 2px var(--brand-600), 0 2px 8px rgba(99, 102, 241, 0.3);
    }
    
    .line-width-btn::before {
      content: '';
      background: currentColor;
      border-radius: 999px;
    }
    
    .line-width-btn.active::before {
      background: white;
    }
    
    .line-width-btn[data-width="1"]::before {
      width: 12px;
      height: 1px;
    }
    
    .line-width-btn[data-width="2"]::before {
      width: 12px;
      height: 2px;
    }
    
    .line-width-btn[data-width="3"]::before {
      width: 12px;
      height: 3px;
    }
    
    .line-width-btn[data-width="4"]::before {
      width: 12px;
      height: 4px;
    }
    
    /* Tooltip para barra vertical */
    .drawing-tool-btn[title]:hover::after {
      content: attr(title);
      position: absolute;
      left: calc(100% + 10px);
      top: 50%;
      transform: translateY(-50%);
      background: var(--bg-card);
      color: var(--text-primary);
      padding: 0.375rem 0.625rem;
      border-radius: 0.25rem;
      font-size: 0.6875rem;
      white-space: nowrap;
      z-index: 10000;
      border: 1px solid var(--border-color);
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
      pointer-events: none;
      font-weight: 500;
      letter-spacing: 0.01em;
    }
    
    .drawing-tool-btn[title]:hover::before {
      content: '';
      position: absolute;
      left: calc(100% + 5px);
      top: 50%;
      transform: translateY(-50%);
      border: 5px solid transparent;
      border-right-color: var(--border-color);
      z-index: 10000;
      pointer-events: none;
    }
    
    @media (max-width: 768px) {
      .drawing-toolbar {
        position: relative;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        border-radius: 0.5rem;
        border: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        margin-bottom: 0.75rem;
        padding: 0.5rem;
        box-shadow: none;
        width: auto;
        height: auto;
        top: auto;
        left: auto;
        justify-content: flex-start;
        overflow-y: visible;
      }
      
      .drawing-tool-group {
        flex-direction: row;
        width: auto;
      }
      
      .drawing-tool-divider {
        width: 1px;
        height: 28px;
        margin: 0 0.25rem;
      }
      
      .line-width-selector {
        flex-direction: row;
        width: auto;
      }
      
      .drawing-metrics {
        display: flex !important;
        margin-left: auto;
        gap: 0.5rem;
        padding: 0.375rem 0.5rem;
        background: var(--bg-card);
        border-radius: 0.25rem;
        font-size: 0.65rem;
      }
      
      .drawing-metrics-display {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: auto;
        max-width: none;
        margin-left: auto;
      }
      
      .metric-item {
        flex-direction: row;
        gap: 0.25rem;
        align-items: center;
      }
      
      .drawing-tool-btn[title]:hover::after,
      .drawing-tool-btn[title]:hover::before {
        display: none;
      }
      
      #tvChartContainer {
        margin-left: 0;
      }
    }
    }
    
    /* Section Divider / Separator Bar */
    .section-divider {
      height: 1px;
      background: linear-gradient(90deg, 
        transparent 0%, 
        var(--border-color) 10%, 
        var(--border-color) 90%, 
        transparent 100%
      );
      margin: 1.5rem 0;
      position: relative;
    }
    
    .section-divider::before {
      content: '';
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      width: 8px;
      height: 8px;
      background: var(--border-color);
      border-radius: 50%;
    }
    
    .section-divider-thick {
      height: 2px;
      background: var(--border-color);
      margin: 2rem 0;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    
    .section-title-divider {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin: 1.5rem 0 1rem 0;
    }
    
    .section-title-divider::before,
    .section-title-divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border-color);
    }
    
    .section-title-divider span {
      color: var(--text-secondary);
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
    }
    
    /* Offcanvas */
    .offcanvas {
      position: fixed;
      top: 0;
      right: -100%;
      width: 100%;
      max-width: 600px;
      height: 100vh;
      background: var(--gray-900);
      border-left: 1px solid var(--gray-800);
      box-shadow: -4px 0 12px rgba(0,0,0,0.5);
      transition: right 0.3s ease-in-out;
      z-index: 1000;
      overflow-y: auto;
      padding: 2rem;
    }
    
    .offcanvas.show {
      right: 0;
    }
    
    .offcanvas-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background: rgba(0,0,0,0.7);
      z-index: 999;
      display: none;
    }
    
    .offcanvas-backdrop.show {
      display: block;
    }
    
    .info-row {
      display: flex;
      justify-content: space-between;
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--gray-800);
    }
    
    .info-row:last-child {
      border-bottom: none;
    }
    
    .info-label {
      color: var(--gray-400);
      font-size: 0.875rem;
    }
    
    .info-value {
      font-weight: 600;
      font-size: 0.875rem;
    }
    
    /* Loading Screen */
    #loadingScreen {
      position: fixed;
      inset: 0;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
      z-index: 9999;
      display: flex;
      align-items: center;
      justify-content: center;
      animation: fadeOut 0.5s ease-out 2s forwards;
    }
    
    @keyframes fadeOut {
      to { opacity: 0; pointer-events: none; }
    }
    
    .loading-content {
      text-align: center;
      color: white;
    }
    
    .loading-logo {
      width: 80px;
      height: 80px;
      background: rgba(255,255,255,0.2);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 20px;
      animation: pulse 2s ease-in-out infinite;
    }
    
    @keyframes pulse {
      0%, 100% { transform: scale(1); opacity: 1; }
      50% { transform: scale(1.05); opacity: 0.8; }
    }
    
    .loading-spinner {
      width: 40px;
      height: 40px;
      border: 4px solid rgba(255,255,255,0.3);
      border-top-color: white;
      border-radius: 50%;
      animation: spin 1s linear infinite;
      margin: 0 auto 20px;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    /* Login Modal - Mobile First */
    .login-modal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(8px);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      z-index: 99998;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
      padding: 0;
    }
    
    @media (min-width: 640px) {
      .login-modal {
        align-items: center;
        padding: 1rem;
      }
    }
    
    .login-modal.show {
      opacity: 1;
      pointer-events: auto;
    }
    
    .login-modal-content {
      position: relative;
      background: var(--gray-900);
      border-radius: 1.25rem 1.25rem 0 0;
      padding: 1rem 1rem 1.5rem;
      max-width: 100%;
      width: 100%;
      overflow-y: auto;
      box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
      transform: translateY(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      border: 1px solid var(--gray-800);
      overscroll-behavior: contain;
    }
    
    @media (min-width: 640px) {
      .login-modal-content {
        border-radius: 1rem;
        padding: 1.5rem;
        max-width: 360px;
        width: 90%;
        max-height: none;
        transform: scale(0.9) translateY(0);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
      }
    }
    
    .login-modal.show .login-modal-content {
      transform: translateY(0);
    }
    
    @media (min-width: 640px) {
      .login-modal.show .login-modal-content {
        transform: scale(1);
      }
    }
    
    .social-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.625rem;
      width: 100%;
      padding: 0.75rem 1rem;
      background: var(--gray-800);
      border: 1.5px solid var(--gray-700);
      border-radius: 0.625rem;
      font-weight: 600;
      font-size: 0.875rem;
      color: var(--gray-100);
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      margin-bottom: 0;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
    }
    
    @media (min-width: 640px) {
      .social-btn {
        padding: 0.875rem 1.125rem;
        gap: 0.75rem;
        font-size: 0.9375rem;
      }
    }
    
    .social-btn:hover {
      background: var(--gray-700);
      border-color: var(--brand-600);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(102,126,234,0.2);
    }
    
    .social-btn:active {
      transform: translateY(0);
    }
    
    .social-btn.google {
      background: white;
      color: #374151;
    }
    
    .social-btn.google:hover {
      background: #f9fafb;
    }
    
    .social-btn.apple {
      background: #000;
      color: white;
      border-color: #000;
    }
    
    .social-btn.apple:hover {
      background: #1a1a1a;
    }
    
    .divider {
      display: flex;
      align-items: center;
      gap: 0.625rem;
      margin: 1.125rem 0;
      color: var(--gray-500);
      font-size: 0.6875rem;
    }
    
    @media (min-width: 640px) {
      .divider {
        gap: 0.75rem;
        margin: 1.25rem 0;
        font-size: 0.75rem;
      }
    }
    
    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--gray-800);
    }
    
    .login-input {
      width: 100%;
      padding: 0.75rem 1rem;
      background: var(--gray-800);
      border: 1.5px solid var(--gray-700);
      border-radius: 0.625rem;
      font-size: 0.875rem;
      color: var(--gray-100);
      margin-bottom: 0;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      touch-action: manipulation;
      -webkit-appearance: none;
    }
    
    @media (min-width: 640px) {
      .login-input {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
      }
    }
    
    .login-input:focus {
      outline: none;
      border-color: var(--brand-600);
      background: var(--gray-750);
      box-shadow: 0 0 0 4px rgba(102,126,234,0.15);
    }
    
    .login-input::placeholder {
      color: var(--gray-500);
    }
    
    .btn-login {
      width: 100%;
      padding: 0.875rem 1.25rem;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      border: none;
      border-radius: 0.625rem;
      font-weight: 700;
      font-size: 0.9375rem;
      cursor: pointer;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      margin-top: 0;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    }
    
    @media (min-width: 640px) {
      .btn-login {
        padding: 1rem 1.25rem;
        font-size: 1rem;
      }
    }
    
    .btn-login:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 24px rgba(102,126,234,0.4);
    }
    
    .btn-login:active {
      transform: translateY(0);
      box-shadow: 0 4px 12px rgba(102,126,234,0.3);
    }
    
    .login-footer {
      text-align: center;
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid var(--gray-800);
      color: var(--gray-400);
      font-size: 0.75rem;
    }
    
    @media (min-width: 640sm) {
      .login-footer {
        margin-top: 1.25rem;
        padding-top: 1.25rem;
        font-size: 0.8125rem;
      }
    }
    
    .login-footer a {
      color: var(--brand-600);
      text-decoration: none;
      font-weight: 600;
      transition: color 0.2s;
    }
    
    .login-footer a:hover {
      color: var(--brand-500);
      text-decoration: underline;
    }
    
    .close-login {
      position: absolute;
      top: 0.875rem;
      right: 0.875rem;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(255, 255, 255, 0.2);
      width: 1.75rem;
      height: 1.75rem;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      color: var(--gray-300);
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      z-index: 10;
    }
    
    @media (min-width: 640px) {
      .close-login {
        width: 2rem;
        height: 2rem;
        top: 1rem;
        right: 1rem;
      }
    }
    
    .close-login:hover {
      background: rgba(255, 255, 255, 0.2);
      transform: rotate(90deg) scale(1.1);
      color: white;
    }
    
    .close-login:active {
      transform: rotate(90deg) scale(0.95);
    }
    
    /* Alert Badge Animation */
    #alertBadge {
      animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    }
    
    @keyframes pulse {
      0%, 100% {
        opacity: 1;
        transform: scale(1);
      }
      50% {
        opacity: .8;
        transform: scale(1.1);
      }
    }
    
    /* Toggle Switch */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border-width: 0;
    }
    
    /* Alert Card Hover */
    .card:hover {
      transform: translateY(-2px);
      transition: transform 0.2s ease;
    }
    
    /* Space utilities */
    .space-y-2 > * + * {
      margin-top: 0.5rem;
    }
    
    .space-y-3 > * + * {
      margin-top: 0.75rem;
    }
    
    .space-y-4 > * + * {
      margin-top: 1rem;
    }
    
    /* Symbol Search Suggestions */
    #symbolSuggestions {
      backdrop-filter: blur(8px);
      animation: slideDown 0.2s ease-out;
    }
    
    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .suggestion-item {
      animation: fadeIn 0.15s ease-out;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    .animate-fade-in {
      animation: fadeIn 0.5s ease-in-out;
    }
    
    /* Scrollbar styling for suggestions */
    #symbolSuggestions::-webkit-scrollbar {
      width: 6px;
    }
    
    #symbolSuggestions::-webkit-scrollbar-track {
      background: var(--bg-secondary);
      border-radius: 3px;
    }
    
    #symbolSuggestions::-webkit-scrollbar-thumb {
      background: var(--border-color);
      border-radius: 3px;
    }
    
    #symbolSuggestions::-webkit-scrollbar-thumb:hover {
      background: var(--gray-600);
    }
    
    /* Responsive utilities */
    @media (max-width: 640px) {
      .offcanvas {
        max-width: 100%;
      }
      
      #symbolSuggestions {
        width: calc(100vw - 3rem) !important;
        max-width: 300px;
      }
    }