html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Group highlighting styles for executions table */
#executions-table tbody tr.group-highlight {
  background: rgba(59, 130, 246, 0.3) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
  border-left: 3px solid #3b82f6;
  transition: all 0.3s ease;
}

#executions-table tbody tr.group-highlight:hover {
  background: rgba(59, 130, 246, 0.4) !important;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.7);
}

#executions-table .group-cell:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  transform: scale(1.05);
}

/* Executions table: self-contained scroll so horizontal bar stays visible when scrolling down */
#executions-table-container {
  max-height: 65vh;
  overflow: auto;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #0f172a;
  color: #e5e7eb;
  line-height: 1.6;
}

/* Modern Scrollbar Styles */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  border-radius: 5px;
  border: 2px solid #0f172a;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #334155 #0f172a;
}

/* When login section is active, center it */
body:has(#section-login.active) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* Ensure body doesn't have flex when app-main is shown */
body:has(#app-main:not([style*="display: none"])) {
  display: block;
  height: 100vh;
  overflow: hidden;
}

#app-main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Navigation Bar Styles */
#top-navbar {
  flex-shrink: 0;
  z-index: 100;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-bottom: 1px solid #334155;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle {
  background: transparent;
  border: 1px solid #334155;
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background-color: #1e293b;
  border-color: #475569;
  transform: scale(1.05);
}

.sidebar-toggle .toggle-icon {
  display: block;
  transition: transform 0.3s;
}

.navbar-brand {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #e5e7eb;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-user-info {
  color: #94a3b8;
  font-size: 14px;
  padding: 6px 12px;
  background-color: rgba(30, 41, 59, 0.5);
  border-radius: 6px;
  border: 1px solid #334155;
}

/* Market Status Indicator */
.market-status-indicator {
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
}

.market-status-indicator.market-active {
  background-color: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.market-status-indicator.market-closed {
  background-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid #f59e0b;
}

.market-status-indicator.market-loading {
  background-color: rgba(100, 116, 139, 0.2);
  color: #94a3b8;
  border: 1px solid #64748b;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-btn-secondary {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #e5e7eb;
  padding: 8px 16px;
  border: 1px solid #334155;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.navbar-btn-secondary:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #475569;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


/* Sidebar Styles */
#app {
  display: flex;
  flex: 1;
  overflow: hidden;
  transition: margin-left 0.3s ease;
  min-height: 0;
  width: 100%;
}

#sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s ease, width 0.3s ease;
  border-right: 1px solid #334155;
}

#sidebar.sidebar-closed {
  transform: translateX(-100%);
  width: 0;
}

#sidebar-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #334155;
}

.sidebar-title {
  font-size: 18px;
  font-weight: 600;
  color: #e5e7eb;
  margin: 0;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-user-info {
  padding: 12px;
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 14px;
  background-color: rgba(30, 41, 59, 0.5);
  border-radius: 8px;
  border: 1px solid #334155;
  text-align: center;
}

.sidebar-nav {
  flex: 1;
}

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

#sidebar li {
  padding: 12px 14px;
  margin-bottom: 4px;
  border-radius: 8px;
  cursor: pointer;
  color: #cbd5e1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  position: relative;
}

#sidebar li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity 0.2s;
}

#sidebar li:hover:not(.menu-divider) {
  background-color: rgba(30, 41, 59, 0.8);
  color: #e5e7eb;
  transform: translateX(4px);
}

#sidebar li:hover:not(.menu-divider)::before {
  opacity: 1;
}

#sidebar li.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #e5e7eb;
  font-weight: 500;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

#sidebar li.active::before {
  opacity: 1;
}

#sidebar li.menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #334155 50%, transparent 100%);
  margin: 16px 0;
  padding: 0;
  cursor: default;
}

#sidebar li.menu-group-header {
  padding: 8px 16px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: default;
  margin-top: 8px;
  margin-bottom: 4px;
}

#sidebar li.menu-group-header:hover {
  background-color: transparent;
  transform: none;
}

#sidebar li.menu-group-header::before {
  display: none;
}

.menu-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.menu-text {
  flex: 1;
}

#sidebar li a {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.test-menu {
  color: #fbbf24;
}

.test-menu:hover {
  background-color: rgba(251, 191, 36, 0.1);
}

#main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #0f172a;
  transition: margin-left 0.3s ease;
  min-width: 0;
  min-height: 0;
  width: 100%;
}

#app.sidebar-closed-main {
  margin-left: 0;
}

/* Custom scrollbar for main content */
#main-content::-webkit-scrollbar {
  width: 12px;
}

#main-content::-webkit-scrollbar-track {
  background: #0f172a;
}

#main-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 6px;
  border: 2px solid #0f172a;
}

#main-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

/* Custom scrollbar for sidebar */
#sidebar-content::-webkit-scrollbar {
  width: 8px;
}

#sidebar-content::-webkit-scrollbar-track {
  background: #020617;
}

#sidebar-content::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  border-radius: 4px;
}

#sidebar-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

.section {
  display: none;
}

.section.active {
  display: block;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-row label {
  margin-bottom: 6px;
  font-weight: 500;
  color: #e5e7eb;
  font-size: 14px;
}

.form-row small {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

/* Ensure form inputs respect max-width when set inline */
.form-row input[style*="max-width"],
.form-row select[style*="max-width"] {
  max-width: inherit !important;
}

input,
select {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background-color: #0f172a;
  color: #e5e7eb;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Executions page dropdowns - ensure white background with dark text */
#section-executions select {
  background-color: white !important;
  color: #1f2937 !important;
}

#section-executions select:focus {
  background-color: white !important;
  color: #1f2937 !important;
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#section-executions select option {
  background-color: white;
  color: #1f2937;
  padding: 8px 12px;
}

/* Executions page button active state */
#section-executions button.active {
  background-color: #4b5563 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#section-executions button.active#executions-view-list,
#section-executions button.active#executions-view-summary {
  background-color: #7c3aed !important;
}

input:focus,
select:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #1e293b;
}

input::placeholder {
  color: #64748b;
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: 8px;
  cursor: pointer;
}

input[type="date"] {
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(1);
}

button {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  background-color: #22c55e;
  color: #022c22;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background-color: #16a34a;
}

.table-btn {
  padding: 4px 10px;
  font-size: 12px;
  margin-right: 6px;
}

.delete-option-type-btn,
.delete-broker-btn,
.delete-wallet-btn {
  background-color: #dc2626;
  color: #fff;
}

.delete-option-type-btn:hover,
.delete-broker-btn:hover,
.delete-wallet-btn:hover {
  background-color: #b91c1c;
}

pre {
  margin-top: 16px;
  padding: 12px;
  background-color: #020617;
  border-radius: 4px;
  border: 1px solid #1f2937;
  color: #a5b4fc;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

th,
td {
  border: 1px solid #1f2937;
  padding: 6px 8px;
}

th {
  background-color: #030712;
}

.checkbox-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  background: #0f172a;
  border-radius: 6px;
  border: 1px solid #334155;
  min-height: 50px;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s ease;
  user-select: none;
}

.checkbox-list label:hover {
  background: #1e293b;
}

.checkbox-list input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: #3b82f6;
}

.checkbox-list input[type="checkbox"]:checked + span {
  font-weight: 500;
  color: #60a5fa;
}

.editable-cell {
  padding: 0;
}

.editable-cell input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 8px;
  color: #e5e7eb;
}

.editable-cell input:focus {
  outline: 2px solid #22c55e;
  background-color: #1f2937;
}

.save-row-btn {
  background-color: #22c55e;
  color: #022c22;
  margin-right: 4px;
}

.save-row-btn:hover {
  background-color: #16a34a;
}

/* Menu divider styles are now handled in #sidebar li.menu-divider above */

.test-menu {
  color: #fbbf24;
  font-weight: 600;
}

.test-menu:hover {
  background-color: #1f2937;
}

.test-description {
  color: #9ca3af;
  font-size: 14px;
  margin-bottom: 24px;
}

/* CodeMirror custom styling for dark theme */
.CodeMirror {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border: none !important;
  height: 500px !important;
  font-family: 'Courier New', monospace !important;
  font-size: 14px !important;
}

.CodeMirror-scroll {
  background: #0f172a !important;
}

.CodeMirror-gutters {
  background: #1e293b !important;
  border-right: 1px solid #334155 !important;
}

.CodeMirror-linenumber {
  color: #64748b !important;
}

.CodeMirror-cursor {
  border-left: 2px solid #60a5fa !important;
}

.CodeMirror-selected {
  background: #1e3a5f !important;
}

.CodeMirror-focused .CodeMirror-selected {
  background: #1e3a5f !important;
}

/* Python syntax highlighting colors (monokai theme compatible with dark background) */
.CodeMirror .cm-keyword {
  color: #c678dd !important;
}

.CodeMirror .cm-string {
  color: #98c379 !important;
}

.CodeMirror .cm-comment {
  color: #5c6370 !important;
  font-style: italic;
}

.CodeMirror .cm-number {
  color: #d19a66 !important;
}

.CodeMirror .cm-def {
  color: #61afef !important;
}

.CodeMirror .cm-variable {
  color: #e06c75 !important;
}

.CodeMirror .cm-operator {
  color: #56b6c2 !important;
}
}

.test-section {
  margin-bottom: 32px;
  padding: 20px;
  background-color: #020617;
  border-radius: 8px;
  border: 1px solid #1f2937;
}

.test-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #fbbf24;
}

.test-result {
  margin-top: 16px;
  padding: 12px;
  background-color: #020617;
  border-radius: 4px;
  border: 1px solid #1f2937;
  color: #a5b4fc;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Editable cell select styling */
.editable-cell select {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 8px;
  color: #e5e7eb;
  cursor: pointer;
}

.editable-cell select:focus {
  outline: 2px solid #22c55e;
  background-color: #1f2937;
}

/* Toggle Switch */
.toggle-track {
  width: 50px;
  height: 26px;
  background: #374151;
  border-radius: 13px;
  position: relative;
  transition: background 0.3s ease;
  border: 2px solid #4b5563;
}

.toggle-track.active {
  background: #22c55e;
  border-color: #16a34a;
}

.toggle-thumb {
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-track.active .toggle-thumb {
  transform: translateX(24px);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Dashboard Styles */
#section-live-dashboard .dashboard-card {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#section-live-dashboard .dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#dashboard-positions-table td {
  vertical-align: middle;
}

#dashboard-positions-table tbody tr:hover {
  background-color: #1f2937;
}

/* Option Chain Viewer Styles */
#section-option-chain .option-chain-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

#oc-table-container {
  overflow-x: auto;
  max-height: 70vh;
  border: 1px solid #374151;
  border-radius: 6px;
  background: #111827;
}

#oc-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  background: #111827;
}

#oc-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

#oc-table th {
  background: #1f2937;
  padding: 8px 10px;
  text-align: center;
  border: 1px solid #374151;
  font-weight: 500;
  color: #9ca3af;
}

#oc-table th:first-child {
  font-weight: 600;
  color: #e5e7eb;
}

#oc-table tbody tr {
  transition: background 0.2s;
}

#oc-table tbody tr:hover {
  background-color: #1f2937;
}

#oc-table tbody tr.atm-strike {
  background-color: #1e3a5f;
  font-weight: bold;
}

#oc-table tbody tr.itm-ce {
  background-color: rgba(34, 197, 94, 0.1);
}

#oc-table tbody tr.itm-pe {
  background-color: rgba(239, 68, 68, 0.1);
}

#oc-table tbody tr.atm-strike.itm-ce {
  background-color: rgba(30, 58, 95, 0.8);
}

#oc-table tbody tr.atm-strike.itm-pe {
  background-color: rgba(30, 58, 95, 0.8);
}

/* Strike-level sentiment color coding */
#oc-table tbody tr.strike-bullish {
  border-left: 3px solid #22c55e;
}

#oc-table tbody tr.strike-bearish {
  border-left: 3px solid #ef4444;
}

#oc-table tbody tr.strike-bullish:hover {
  background-color: rgba(34, 197, 94, 0.15);
}

#oc-table tbody tr.strike-bearish:hover {
  background-color: rgba(239, 68, 68, 0.15);
}

#oc-table td {
  padding: 8px;
  text-align: center;
  border: 1px solid #374151;
  color: #e5e7eb;
}

.oc-oi-col {
  display: none;
}

.oc-oi-col.visible {
  display: table-cell;
}

.oc-greeks-col {
  display: none;
}

.oc-greeks-col.visible {
  display: table-cell;
}

.oc-greeks {
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  min-width: 80px;
}

.oc-greek-item {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
}

.oc-greek-label {
  color: #9ca3af;
}

.oc-greek-value {
  font-weight: 500;
  color: #e5e7eb;
}

#oc-underlying-info {
  display: flex;
  gap: 30px;
  margin-bottom: 15px;
  padding: 12px;
  background: #1f2937;
  border-radius: 6px;
  align-items: center;
}

#oc-status {
  margin-top: 10px;
  font-style: italic;
  color: #666;
}

/* PCR Help Icon */
#oc-pcr-help {
  display: inline-block;
  cursor: help;
  transition: transform 0.2s;
}

#oc-pcr-help:hover {
  transform: scale(1.2);
  color: #60a5fa;
}

.profit {
  color: #22c55e;
}

.loss {
  color: #dc3545;
}

/* Strategies Table Styles */
#strategies-table {
  background: #1e293b;
  border: 1px solid #334155;
}

#strategies-table thead tr {
  background: #0f172a;
}

#strategies-table th {
  color: #e5e7eb;
  font-weight: 600;
  border-bottom: 2px solid #334155;
}

#strategies-table tbody tr {
  border-bottom: 1px solid #334155;
  transition: background-color 0.2s ease;
}

#strategies-table tbody tr:hover {
  background-color: #0f172a;
}

#strategies-table tbody td {
  color: #cbd5e1;
  padding: 12px;
}

#strategies-table tbody td strong {
  color: #e5e7eb;
}

/* Login Section Styles */
#section-login {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  margin: 20px auto;
}

#section-login.active {
  display: flex;
}

#login-tab,
#register-tab {
  width: 100%;
  max-width: 450px;
}

#login-tab h3,
#register-tab h3 {
  text-align: center;
  margin-bottom: 24px;
  color: #e5e7eb;
  font-size: 24px;
}

#section-login form {
  width: 100%;
}

#section-login .form-row {
  margin-bottom: 20px;
}

#section-login input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 15px;
  transition: all 0.2s ease;
}

#section-login input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #1e293b;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#section-login label {
  display: block;
  margin-bottom: 8px;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 14px;
}

#section-login button[type="submit"] {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
}

#section-login a {
  color: #60a5fa;
  text-decoration: none;
  transition: color 0.2s ease;
}

#section-login a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* Form Error Messages */
#login-error,
#register-error,
#credential-form-error,
#subscription-form-error,
#strategy-form-error {
  padding: 12px;
  background-color: rgba(220, 53, 69, 0.1);
  border: 1px solid #dc3545;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Form Success Messages */
#strategy-status,
#subscription-status {
  padding: 12px;
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid #22c55e;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

/* Primary Button Styles */
.primary-btn {
  background-color: #3b82f6;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.primary-btn:hover {
  background-color: #2563eb;
}

/* Dashboard Save Buttons */
.dashboard-save-btn:hover:not(:disabled) {
  background-color: #2563eb !important;
}

.dashboard-save-btn:active:not(:disabled) {
  background-color: #1d4ed8 !important;
  transform: scale(0.98);
}

/* Sentiment Analyzer Styles */
#section-sentiment-analyzer .sentiment-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: nowrap;
  align-items: flex-end;
}

#section-sentiment-analyzer select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#section-sentiment-analyzer select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  outline: none;
}

#sentiment-analyze-btn {
  min-width: 100px;
  box-sizing: border-box;
  text-align: center;
}

#sentiment-autorefresh-btn {
  min-width: 130px;
  text-align: center;
}

#sentiment-analyze-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

#sentiment-analyze-btn:active {
  transform: translateY(0);
}

#sentiment-autorefresh-btn.active {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #ffffff;
}

#sentiment-autorefresh-btn:hover {
  background: #4b5563;
  color: #e5e7eb;
}

#sentiment-autorefresh-btn.active:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

#sentiment-help-btn:hover {
  background: #4b5563;
  color: #e5e7eb;
}

/* Sentiment Result Cards */
.sentiment-banner {
  animation: fadeIn 0.3s ease;
}

.signal-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.signal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.confidence-bar div {
  transition: width 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Collapsible sentiment widgets (theta, decision matrix, trade state, alert history) */
.collapsible-widget {
  margin-bottom: 20px;
}
.collapsible-widget-header {
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.collapsible-widget-toggle {
  background: transparent;
  border: 1px solid #374151;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.collapsible-widget-toggle:hover {
  background: #374151;
  color: #e5e7eb;
}
.collapsible-widget.minimized .collapsible-widget-body {
  display: none !important;
}

/* Responsive adjustments for sentiment analyzer */
@media (max-width: 768px) {
  .signals-panel {
    grid-template-columns: 1fr !important;
  }

  .metadata-footer {
    flex-direction: column !important;
    gap: 10px !important;
    text-align: center;
  }

  .confidence-factors {
    grid-template-columns: 1fr !important;
  }
}

/* Option Chain Dashboard metric card info icon */
.metric-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  min-width: 16px;
  font-size: 11px;
  font-weight: 700;
  font-style: italic;
  color: #6b7280;
  background: #374151;
  border: 1px solid #4b5563;
  border-radius: 50%;
  cursor: help;
  transition: color 0.2s, background 0.2s;
}
.metric-info-icon:hover {
  color: #60a5fa;
  background: #1e3a5f;
}

