/**
 * TensorStocks - Options Analysis Suite Styles
 */

:root {
  --opt-cyan: #38bdf8;
  --opt-cyan-glow: rgba(56, 189, 248, 0.28);
  --opt-purple: #a855f7;
  --opt-purple-glow: rgba(168, 85, 247, 0.25);
  --opt-emerald: #10b981;
  --opt-rose: #f43f5e;
  --opt-amber: #f59e0b;
  --opt-card-bg: rgba(13, 20, 38, 0.92);
  --opt-border: rgba(56, 189, 248, 0.2);
  --opt-border-subtle: rgba(255, 255, 255, 0.08);
}

body {
  background-color: #070a14;
  color: #f1f5f9;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
  padding-top: 58px;
}

.opt-container {
  max-width: 1520px;
  margin: 0 auto;
  padding: 14px 18px 40px 18px;
}

/* Glass Panels */
.opt-glass-card {
  background: var(--opt-card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--opt-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), 0 0 1px 1px rgba(56, 189, 248, 0.1);
  margin-bottom: 16px;
}

/* Control Bar */
.opt-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.opt-input {
  background: rgba(7, 10, 20, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f8fafc;
  padding: 7px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  outline: none;
}

.opt-input:focus {
  border-color: var(--opt-cyan);
  box-shadow: 0 0 12px var(--opt-cyan-glow);
}

.opt-input-sm {
  background: rgba(7, 10, 20, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  transition: all 0.2s ease;
  outline: none;
}

.opt-input-sm:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.opt-btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff;
  border: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.opt-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(56, 189, 248, 0.45);
}

.opt-btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.opt-btn-secondary:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Preset Chips */
.opt-chip {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.opt-chip:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* Segmented Buttons */
.opt-segmented {
  display: inline-flex;
  background: rgba(7, 10, 20, 0.85);
  border: 1px solid var(--opt-border-subtle);
  border-radius: 8px;
  padding: 2px;
}

.opt-seg-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.opt-seg-btn.active-call {
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.opt-seg-btn.active-put {
  background: rgba(244, 63, 94, 0.22);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.45);
}

.opt-seg-btn.active-buy {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
}

.opt-seg-btn.active-sell {
  background: rgba(16, 185, 129, 0.22);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.opt-seg-btn.active-metric {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Option Chain Table */
.opt-table-wrap {
  max-height: 440px;
  overflow-y: auto;
  border: 1px solid var(--opt-border-subtle);
  border-radius: 8px;
}

.opt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.opt-table th {
  position: sticky;
  top: 0;
  background: rgba(10, 15, 30, 0.98);
  color: #94a3b8;
  padding: 9px 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.opt-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.opt-table th.sortable:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

.opt-table th.sort-active {
  color: #38bdf8;
  border-bottom: 2px solid #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.opt-table th .sort-arrow {
  display: inline-block;
  margin-left: 3px;
  font-size: 0.65rem;
  opacity: 0.85;
}

.opt-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
}

.opt-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.opt-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.08) !important;
}

.opt-table tbody tr.selected-row {
  background: rgba(168, 85, 247, 0.2) !important;
  border-left: 3px solid #c084fc;
}

.opt-itm-call {
  background: rgba(16, 185, 129, 0.04);
}

.opt-itm-put {
  background: rgba(244, 63, 94, 0.04);
}

/* Metric Pills */
.opt-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--opt-border-subtle);
  color: #94a3b8;
}

.opt-pill strong {
  color: #f8fafc;
}

/* Loader */
.opt-loader {
  display: none;
  text-align: center;
  padding: 50px 20px;
}

@media (max-width: 991px) {
  .opt-control-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Mispricing & Edge Badges */
.opt-badge-unfavorable,
.opt-badge-overpriced {
  background: rgba(244, 63, 94, 0.16);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.opt-badge-favorable,
.opt-badge-underpriced {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.opt-badge-fair {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

/* Greek Audit Grid */
.opt-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.opt-audit-table th {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.opt-audit-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

/* Income Strategy Screeners */
.opt-btn-screener {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.opt-btn-screener:hover {
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
  transform: translateY(-1px);
}

.opt-btn-screener.active-cc {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(5, 150, 105, 0.4));
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.opt-btn-screener.active-csp {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.28), rgba(126, 34, 206, 0.4));
  border-color: #a855f7;
  color: #c084fc;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.35);
}

.opt-btn-screener.active-all {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

